import{s as rs,ae as rt,af as os,f as l,a as p,g as a,D as o,c as i,j as y,k as g,i as s,u as cs,d as n}from"./scheduler.2f9f1739.js";import{S as ys,i as us,b as Fs,d as ds,m as Bs,a as ms,t as hs,e as vs}from"./index.f9f1dac6.js";import{g as fs,a as ps}from"./styles.a749dd55.js";import{M as xs}from"./MarkdownLayout.50a9a114.js";function ws(Fe){let r,_="If you’re using Svelte, you’re likely already enamored by its awesomeness. For both developers and users, the experience of working on a Svelte app or interacting with one is truly exceptional. But what’s even more exciting is the potential to elevate this experience to new heights. In the world of Svelte, there’s always another level to explore, much like in life, where ease and challenges continually reveal new layers of complexity and simplicity.",d,F,c="Svelte has a framework, with the power of its compiler, that allows you to do less with more, but sometimes you get to dig a little to find these gems, There might be features you’re unaware of or aspects you never thought possible, but they’re there, waiting to be discovered!",u,B,ct="In this article, I will showcase a selection of fascinating Svelte features I’ve come across. Whether you’re already familiar with them or not, I encourage you to stay until the end; you’re sure to take away valuable insights.",de,k,yt="Svelte Actions",Be,T,ut="When I say Svelte actions, I do not mean form actions. Svelte actions are just regular functions you can attach to an element and get called when that element is created. The function will include a reference to the element and you can mess with the element however you want.",me,L,Ft="Actions can be used when you want to perform a sequence of actions on an element when it is initialized, let’s say add a bunch of event listeners, animations, and others and maybe you want something action that can be reusable, then svelte action should definitely be your goto method.",he,P,dt="An exciting use case I’ve recently done is using Svelte action to add tooltips to elements. I don’t know about you, but for me personally, tooltips are very annoying to configure, especially when you’re not using a component library of some sort. It is just an extra hassle added to your development experience.",ve,A,Bt="Well, grieve no more, because you can easily manipulate any element with svelte actions, Let see how it is done:",fe,S,mt="<em>To manipulate</em> an element with a Svelte action, you first need to create an action function. This function will take the element as a parameter and perform the desired manipulation.",xe,H,ht="Once you have created the action function, you can attach it to an element using the <code>use:action</code> directive. This directive takes the name of the action function as a parameter.",we,M,vt="When the element is mounted, the action function will be called with the element as a parameter. You can then use the element object to manipulate the element in any way you want.",be,I,ft="Here is an example of a simple action function that adds a tooltip to an element:",Ce,m,xt=`<code><span class="line"><span style="color: #F97583">function</span><span style="color: #B392F0"> addTooltip(element) {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #6B737C">// element.classList.add('relative');</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">const</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">container</span><span style="color: #B392F0"> </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">document</span><span style="color: #B392F0">.createElement(</span><span style="color: #FFAB70">'div'</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">container</span><span style="color: #B392F0">.classList </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'relative'</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">const</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">tooltip</span><span style="color: #B392F0"> </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">document</span><span style="color: #B392F0">.createElement(</span><span style="color: #FFAB70">'div'</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">const</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">newElement</span><span style="color: #B392F0"> </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">element</span><span style="color: #B392F0">.cloneNode(</span><span style="color: #79B8FF">true</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">tooltip</span><span style="color: #B392F0">.classList </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'p-2 bg-orange-100 rounded-xl absolute bottom-[100%] w-[200px] hidden m-2'</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">tooltip</span><span style="color: #B392F0">.innerText </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'this is a tooltip'</span><span style="color: #B392F0">;</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">container</span><span style="color: #B392F0">.appendChild(tooltip);</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">container</span><span style="color: #B392F0">.appendChild(newElement);</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">element</span><span style="color: #B392F0">.</span><span style="color: #79B8FF">parentElement</span><span style="color: #B392F0">.replaceChild(container</span><span style="color: #BBBBBB">,</span><span style="color: #B392F0"> element);</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">newElement</span><span style="color: #B392F0">.addEventListener(</span><span style="color: #FFAB70">'mouseover'</span><span style="color: #BBBBBB">,</span><span style="color: #B392F0"> (event) </span><span style="color: #F97583">=></span><span style="color: #B392F0"> {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">tooltip</span><span style="color: #B392F0">.</span><span style="color: #79B8FF">classList</span><span style="color: #B392F0">.remove(</span><span style="color: #FFAB70">'hidden'</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0"> });</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">newElement</span><span style="color: #B392F0">.addEventListener(</span><span style="color: #FFAB70">'mouseout'</span><span style="color: #BBBBBB">,</span><span style="color: #B392F0"> (event) </span><span style="color: #F97583">=></span><span style="color: #B392F0"> {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">tooltip</span><span style="color: #B392F0">.</span><span style="color: #79B8FF">classList</span><span style="color: #B392F0">.add(</span><span style="color: #FFAB70">'hidden'</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0"> });</span></span> <span class="line"><span style="color: #B392F0">}</span></span></code>`,_e,j,wt="To use this action function, you would attach it to an element like this:",ge,h,bt='<code><span class="line"><span style="color: #B392F0"><</span><span style="color: #FFAB70">div</span><span style="color: #B392F0"> use:addTooltip>show tooltip</</span><span style="color: #FFAB70">div</span><span style="color: #B392F0">></span></span></code>',ke,E,Ct="When the element is mounted, the <code>addTooltip</code> function will be called and the element will be replaced with a container that contains the original element and a tooltip.",Te,q,_t="Actions can be used to manipulate elements in many different ways. It is a super powerful feature of Svelte that so many don’t know about, or just don’t give it a chance.",Le,$,gt="The possibilities with actions are endless!",Pe,z,kt="Aliases",Ae,R,Tt="Sometimes, auto-import doesn’t cooperate. If you’ve encountered this issue, you can probably empathize with the frustration. The quest to locate the parents, subdirectories, and nested components, or even other files you’re seeking, can be quite taxing – especially when you’re deeply nested in your project. Most of the time, we guess it wrong on the first trial and end up spending a handful of time trying to figure out where.",Se,W,Lt="Or maybe you just want a cleaner-looking import. Believe it or not, Imports takes up a pretty handful of lines or code in projects, and you’ve probably always tried to implement the best practices of sorting them. Aliases can be a really cool one you can configure to reduce the noise in your import by a bit.",He,Y,Pt="In <code>SvelteKit</code>, there is already a default alias added to the <code>src/lib/</code> that is <code>$lib</code> which you know has been very useful, and you populate your aliases as much as you want to make your experience a little bit better.",Me,U,At="Let’s see how it is done:",Ie,O,St="In this example, we’re going to create an alias for our components folder, In your <code>svelte.config.js</code>",je,v,Ht=`<code><span class="line"><span style="color: #B392F0">{</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #FFAB70">"aliases"</span><span style="color: #B392F0">: {</span></span> <span class="line"><span style="color: #B392F0"> $components</span><span style="color: #F97583">:</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">"src/components"</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0">}</span></span></code>`,Ee,D,Mt="And just so you know, you’re aliases can be recognized by your editor and auto import will be able to use that as well.",qe,K,It="Your imports will quickly transform, becoming more easier to navigate and also more elegant:",$e,f,jt=`<code><span class="line"><span style="color: #6B737C">// Before import</span></span> <span class="line"><span style="color: #F97583">import</span><span style="color: #B392F0"> SomeComponent </span><span style="color: #F97583">from</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'../../../../components/someComponent'</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #6B737C">// After import</span></span> <span class="line"><span style="color: #F97583">import</span><span style="color: #B392F0"> SomeComponent </span><span style="color: #F97583">from</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'$components/someComponent'</span><span style="color: #B392F0">;</span></span></code>`,ze,N,Et="Toggle Class",Re,V,qt="So in svelte everything is reactive, and we’ve seen, we’ve experienced it and we fell in love. And even more, you’ve probably used some of its syntactic sugar, it also has the most elegant and easiest way of binding element attributes and listeners using <code>bind:WHATEVER</code>.",We,G,$t="But then, what do I mean by toggle class? Well you know not all the tiny cool features get a name, they are all under the syntactic sugar umbrella, so that’s what I just decided to call it <em>toggle class</em>, you can call it whatever you like. This feature is also part of the super amazing syntactic sugars of svelte.",Ye,J,zt="This is a method of adding or removing a class from an element depending on the truth value of something. Let’s say you have some element and you want to change its background color to red when some variable is false or green when the variable is true.",Ue,Q,Rt="This is where <code>"Toggle class"</code> as I call it comes in, you can remove a class or add, just like the normal way of doing it with javascript (<code>classList.toggle(SOMECLASS)</code>).",Oe,X,Wt="Let’s see how it done in action:",De,x,Yt=`<code><span class="line"><span style="color: #B392F0"><</span><span style="color: #FFAB70">script</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">let</span><span style="color: #B392F0"> buttonSucces </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">false</span><span style="color: #B392F0">;</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">function</span><span style="color: #B392F0"> toggle() {</span></span> <span class="line"><span style="color: #B392F0"> buttonSucces </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #F97583">!</span><span style="color: #B392F0">buttonSuces;</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0"></</span><span style="color: #FFAB70">script</span><span style="color: #B392F0">></span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"><</span><span style="color: #FFAB70">button</span></span> <span class="line"><span style="color: #B392F0"> class</span><span style="color: #F97583">=</span><span style="color: #FFAB70">"p-3 rounded-xl"</span></span> <span class="line"><span style="color: #B392F0"> class:bg-blue</span><span style="color: #F97583">=</span><span style="color: #B392F0">{buttonSucces}</span></span> <span class="line"><span style="color: #B392F0"> class:bg-red</span><span style="color: #F97583">=</span><span style="color: #B392F0">{</span><span style="color: #F97583">!</span><span style="color: #B392F0">buttonSucces}</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">on</span><span style="color: #B392F0">:click</span><span style="color: #F97583">=</span><span style="color: #B392F0">{toggle}</span></span> <span class="line"><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0"> Click</span></span> <span class="line"><span style="color: #B392F0"></</span><span style="color: #FFAB70">button</span><span style="color: #B392F0">></span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0"><</span><span style="color: #FFAB70">style</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0"> .p-3 {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">padding</span><span style="color: #F97583">:</span><span style="color: #B392F0"> </span><span style="color: #F8F8F8">2.5rem</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0"> .rounded-xl {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">border-radius</span><span style="color: #F97583">:</span><span style="color: #B392F0"> </span><span style="color: #F8F8F8">3.5rem</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0"> .bg-blue {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">background-color</span><span style="color: #F97583">:</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">blue</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0"> .bg-red {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #79B8FF">background-color</span><span style="color: #F97583">:</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">red</span><span style="color: #B392F0">;</span></span> <span class="line"><span style="color: #B392F0"> }</span></span> <span class="line"><span style="color: #B392F0"></</span><span style="color: #FFAB70">style</span><span style="color: #B392F0">></span></span></code>`,Ke,Z,Ut="What I have done here is really simple, so when we click, we should be able to see the background color toggle between blue and red.",Ne,ee,Ot="This is a very awesome way of handling this and we can do it so much better than having to do something as simple as toggling a class with javascript.",Ve,te,Dt="Async/Await Block",Ge,se,Kt="Most of the time when building something that requires you to fetch some data across the internet, there is always a promise involved, and It comes in handy especially when you’re using the data to be returned to update the UI using Svelte <code>async/await</code> tag.",Je,ne,Nt="I also think this is one of the least popular ones, especially among beginners in Svelte, you’ve probably used others like the each and if block, which are used for iterating and logic respectively. All of these are powered by Svelte’s reactive nature.",Qe,le,Vt="The async block, just like any other, allows you to pass a promise function that you can await. But not in the way you think.",Xe,ae,Gt="You see, you can have some UI displayed before the Promise is fulfilled and get access to that data when the Promise is fulfilled, you can then update the UI with the data.",Ze,oe,Jt="All this sounds complicated when I’m explaining it (I made it sound so), but wait until you see how Svelte handles this:",et,w,Qt=`<code><span class="line"><span style="color: #B392F0">function sleep(ms) {</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">return</span><span style="color: #B392F0"> </span><span style="color: #F97583">new</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">Promise</span><span style="color: #B392F0">(resolve </span><span style="color: #F97583">=></span><span style="color: #B392F0"> setTimeout(resolve</span><span style="color: #BBBBBB">,</span><span style="color: #B392F0"> ms)).then(() </span><span style="color: #F97583">=></span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'completed'</span><span style="color: #B392F0">);</span></span> <span class="line"><span style="color: #B392F0">}</span></span></code>`,tt,b,Xt=`<code><span class="line"><span style="color: #B392F0">{#</span><span style="color: #F97583">await</span><span style="color: #B392F0"> sleep(</span><span style="color: #F8F8F8">3000</span><span style="color: #B392F0">)}</span></span> <span class="line"><span style="color: #B392F0"> <</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">>Loading</</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0">{:</span><span style="color: #F97583">then</span><span style="color: #B392F0"> sleep_completed}</span></span> <span class="line"><span style="color: #B392F0"> <</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">>Sleep Status: {sleep_completed}!</</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0">{/</span><span style="color: #F97583">await</span><span style="color: #B392F0">}</span></span></code>`,st,pe,Zt="Surprised? Yeah, that’s it, Your UI will show loading and when it is completed, it will show Show what you intended and also give you the returned data in a super cool way. You can literally use anything to catch your returned data, which is sweet for keeping your code readable.",nt,ie,es="You can already see how this can help you build work faster, especially when you’re in the case of configuring a skeleton loader.",lt,re,ts="There is also a catch block in case of any error you will want to show a message for.",at,C,ss=`<code><span class="line"><span style="color: #B392F0">{#</span><span style="color: #F97583">await</span><span style="color: #B392F0"> sleep(</span><span style="color: #F8F8F8">3000</span><span style="color: #B392F0">)}</span></span> <span class="line"><span style="color: #B392F0"> <</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">>Loading</</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0">{:</span><span style="color: #F97583">then</span><span style="color: #B392F0"> sleep_completed}</span></span> <span class="line"><span style="color: #B392F0"> <</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">>Sleep Status: {sleep_completed}!</</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0">{:</span><span style="color: #F97583">catch</span><span style="color: #B392F0"> someError}</span></span> <span class="line"><span style="color: #B392F0"> <</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">>Unable to complete action</</span><span style="color: #FFAB70">p</span><span style="color: #B392F0">></span></span> <span class="line"><span style="color: #B392F0"> {</span><span style="color: #79B8FF">someError</span><span style="color: #B392F0">.message}</span></span> <span class="line"><span style="color: #B392F0">{/</span><span style="color: #F97583">await</span><span style="color: #B392F0">}</span></span></code>`,ot,ce,ns="Overall, Svelte’s design is all about boosting productivity, embracing elegance, and getting your projects out the door quickly. I can’t stress enough how much I adore this framework. It lets you create virtually anything that’s outside the norm, and it does so with remarkable ease, thanks to the magic of its compiler.",pt,ye,ls="If you’re not already a Svelte enthusiast and have stumbled upon this article, I wholeheartedly encourage you to give Svelte a whirl. Believe me, if you’re open to new tools, you’ll fall in love with Svelte and never look back.",it,ue,as="Happy Coding!";return{c(){r=l("p"),r.textContent=_,d=p(),F=l("p"),F.textContent=c,u=p(),B=l("p"),B.textContent=ct,de=p(),k=l("h2"),k.textContent=yt,Be=p(),T=l("p"),T.textContent=ut,me=p(),L=l("p"),L.textContent=Ft,he=p(),P=l("p"),P.textContent=dt,ve=p(),A=l("p"),A.textContent=Bt,fe=p(),S=l("p"),S.innerHTML=mt,xe=p(),H=l("p"),H.innerHTML=ht,we=p(),M=l("p"),M.textContent=vt,be=p(),I=l("p"),I.textContent=ft,Ce=p(),m=l("pre"),m.innerHTML=xt,_e=p(),j=l("p"),j.textContent=wt,ge=p(),h=l("pre"),h.innerHTML=bt,ke=p(),E=l("p"),E.innerHTML=Ct,Te=p(),q=l("p"),q.textContent=_t,Le=p(),$=l("p"),$.textContent=gt,Pe=p(),z=l("h2"),z.textContent=kt,Ae=p(),R=l("p"),R.textContent=Tt,Se=p(),W=l("p"),W.textContent=Lt,He=p(),Y=l("p"),Y.innerHTML=Pt,Me=p(),U=l("p"),U.textContent=At,Ie=p(),O=l("p"),O.innerHTML=St,je=p(),v=l("pre"),v.innerHTML=Ht,Ee=p(),D=l("p"),D.textContent=Mt,qe=p(),K=l("p"),K.textContent=It,$e=p(),f=l("pre"),f.innerHTML=jt,ze=p(),N=l("h2"),N.textContent=Et,Re=p(),V=l("p"),V.innerHTML=qt,We=p(),G=l("p"),G.innerHTML=$t,Ye=p(),J=l("p"),J.textContent=zt,Ue=p(),Q=l("p"),Q.innerHTML=Rt,Oe=p(),X=l("p"),X.textContent=Wt,De=p(),x=l("pre"),x.innerHTML=Yt,Ke=p(),Z=l("p"),Z.textContent=Ut,Ne=p(),ee=l("p"),ee.textContent=Ot,Ve=p(),te=l("h2"),te.textContent=Dt,Ge=p(),se=l("p"),se.innerHTML=Kt,Je=p(),ne=l("p"),ne.textContent=Nt,Qe=p(),le=l("p"),le.textContent=Vt,Xe=p(),ae=l("p"),ae.textContent=Gt,Ze=p(),oe=l("p"),oe.textContent=Jt,et=p(),w=l("pre"),w.innerHTML=Qt,tt=p(),b=l("pre"),b.innerHTML=Xt,st=p(),pe=l("p"),pe.textContent=Zt,nt=p(),ie=l("p"),ie.textContent=es,lt=p(),re=l("p"),re.textContent=ts,at=p(),C=l("pre"),C.innerHTML=ss,ot=p(),ce=l("p"),ce.textContent=ns,pt=p(),ye=l("p"),ye.textContent=ls,it=p(),ue=l("h2"),ue.textContent=as,this.h()},l(e){r=a(e,"P",{"data-svelte-h":!0}),o(r)!=="svelte-1eulka3"&&(r.textContent=_),d=i(e),F=a(e,"P",{"data-svelte-h":!0}),o(F)!=="svelte-1wf66ct"&&(F.textContent=c),u=i(e),B=a(e,"P",{"data-svelte-h":!0}),o(B)!=="svelte-otkk2a"&&(B.textContent=ct),de=i(e),k=a(e,"H2",{"data-svelte-h":!0}),o(k)!=="svelte-1i3uime"&&(k.textContent=yt),Be=i(e),T=a(e,"P",{"data-svelte-h":!0}),o(T)!=="svelte-1820hms"&&(T.textContent=ut),me=i(e),L=a(e,"P",{"data-svelte-h":!0}),o(L)!=="svelte-11vo5l9"&&(L.textContent=Ft),he=i(e),P=a(e,"P",{"data-svelte-h":!0}),o(P)!=="svelte-19ebh96"&&(P.textContent=dt),ve=i(e),A=a(e,"P",{"data-svelte-h":!0}),o(A)!=="svelte-qyu41l"&&(A.textContent=Bt),fe=i(e),S=a(e,"P",{"data-svelte-h":!0}),o(S)!=="svelte-mmiguq"&&(S.innerHTML=mt),xe=i(e),H=a(e,"P",{"data-svelte-h":!0}),o(H)!=="svelte-1mf8suh"&&(H.innerHTML=ht),we=i(e),M=a(e,"P",{"data-svelte-h":!0}),o(M)!=="svelte-vum21r"&&(M.textContent=vt),be=i(e),I=a(e,"P",{"data-svelte-h":!0}),o(I)!=="svelte-1iv33q4"&&(I.textContent=ft),Ce=i(e),m=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(m)!=="svelte-b7cu7f"&&(m.innerHTML=xt),_e=i(e),j=a(e,"P",{"data-svelte-h":!0}),o(j)!=="svelte-13g60op"&&(j.textContent=wt),ge=i(e),h=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(h)!=="svelte-11amn5y"&&(h.innerHTML=bt),ke=i(e),E=a(e,"P",{"data-svelte-h":!0}),o(E)!=="svelte-1j63p51"&&(E.innerHTML=Ct),Te=i(e),q=a(e,"P",{"data-svelte-h":!0}),o(q)!=="svelte-oof3ej"&&(q.textContent=_t),Le=i(e),$=a(e,"P",{"data-svelte-h":!0}),o($)!=="svelte-1oztpa4"&&($.textContent=gt),Pe=i(e),z=a(e,"H2",{"data-svelte-h":!0}),o(z)!=="svelte-1x0b0za"&&(z.textContent=kt),Ae=i(e),R=a(e,"P",{"data-svelte-h":!0}),o(R)!=="svelte-qjkbyt"&&(R.textContent=Tt),Se=i(e),W=a(e,"P",{"data-svelte-h":!0}),o(W)!=="svelte-robwtx"&&(W.textContent=Lt),He=i(e),Y=a(e,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-so13s2"&&(Y.innerHTML=Pt),Me=i(e),U=a(e,"P",{"data-svelte-h":!0}),o(U)!=="svelte-k7jyxp"&&(U.textContent=At),Ie=i(e),O=a(e,"P",{"data-svelte-h":!0}),o(O)!=="svelte-1r3jawj"&&(O.innerHTML=St),je=i(e),v=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(v)!=="svelte-1jc9a9y"&&(v.innerHTML=Ht),Ee=i(e),D=a(e,"P",{"data-svelte-h":!0}),o(D)!=="svelte-ur2vib"&&(D.textContent=Mt),qe=i(e),K=a(e,"P",{"data-svelte-h":!0}),o(K)!=="svelte-gg2jw6"&&(K.textContent=It),$e=i(e),f=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(f)!=="svelte-ds8yje"&&(f.innerHTML=jt),ze=i(e),N=a(e,"H2",{"data-svelte-h":!0}),o(N)!=="svelte-h6fa8m"&&(N.textContent=Et),Re=i(e),V=a(e,"P",{"data-svelte-h":!0}),o(V)!=="svelte-18mbwxt"&&(V.innerHTML=qt),We=i(e),G=a(e,"P",{"data-svelte-h":!0}),o(G)!=="svelte-rnrpn8"&&(G.innerHTML=$t),Ye=i(e),J=a(e,"P",{"data-svelte-h":!0}),o(J)!=="svelte-1sw8lay"&&(J.textContent=zt),Ue=i(e),Q=a(e,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-1to3b3h"&&(Q.innerHTML=Rt),Oe=i(e),X=a(e,"P",{"data-svelte-h":!0}),o(X)!=="svelte-1eaz5ru"&&(X.textContent=Wt),De=i(e),x=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(x)!=="svelte-1ojk284"&&(x.innerHTML=Yt),Ke=i(e),Z=a(e,"P",{"data-svelte-h":!0}),o(Z)!=="svelte-xfgs14"&&(Z.textContent=Ut),Ne=i(e),ee=a(e,"P",{"data-svelte-h":!0}),o(ee)!=="svelte-1fzh7v6"&&(ee.textContent=Ot),Ve=i(e),te=a(e,"H2",{"data-svelte-h":!0}),o(te)!=="svelte-8nivk2"&&(te.textContent=Dt),Ge=i(e),se=a(e,"P",{"data-svelte-h":!0}),o(se)!=="svelte-141e41a"&&(se.innerHTML=Kt),Je=i(e),ne=a(e,"P",{"data-svelte-h":!0}),o(ne)!=="svelte-chd5t4"&&(ne.textContent=Nt),Qe=i(e),le=a(e,"P",{"data-svelte-h":!0}),o(le)!=="svelte-15ysgba"&&(le.textContent=Vt),Xe=i(e),ae=a(e,"P",{"data-svelte-h":!0}),o(ae)!=="svelte-196drtv"&&(ae.textContent=Gt),Ze=i(e),oe=a(e,"P",{"data-svelte-h":!0}),o(oe)!=="svelte-4f5mxs"&&(oe.textContent=Jt),et=i(e),w=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(w)!=="svelte-phxsh"&&(w.innerHTML=Qt),tt=i(e),b=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(b)!=="svelte-1yxfghe"&&(b.innerHTML=Xt),st=i(e),pe=a(e,"P",{"data-svelte-h":!0}),o(pe)!=="svelte-11bg9ez"&&(pe.textContent=Zt),nt=i(e),ie=a(e,"P",{"data-svelte-h":!0}),o(ie)!=="svelte-8ygvjl"&&(ie.textContent=es),lt=i(e),re=a(e,"P",{"data-svelte-h":!0}),o(re)!=="svelte-1tx5ay8"&&(re.textContent=ts),at=i(e),C=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),o(C)!=="svelte-17ak4rh"&&(C.innerHTML=ss),ot=i(e),ce=a(e,"P",{"data-svelte-h":!0}),o(ce)!=="svelte-16qf5v9"&&(ce.textContent=ns),pt=i(e),ye=a(e,"P",{"data-svelte-h":!0}),o(ye)!=="svelte-1sk8bte"&&(ye.textContent=ls),it=i(e),ue=a(e,"H2",{"data-svelte-h":!0}),o(ue)!=="svelte-cxwmqj"&&(ue.textContent=as),this.h()},h(){y(m,"class","shiki min-dark"),g(m,"background-color","#1f1f1f"),y(m,"tabindex","0"),y(h,"class","shiki min-dark"),g(h,"background-color","#1f1f1f"),y(h,"tabindex","0"),y(v,"class","shiki min-dark"),g(v,"background-color","#1f1f1f"),y(v,"tabindex","0"),y(f,"class","shiki min-dark"),g(f,"background-color","#1f1f1f"),y(f,"tabindex","0"),y(x,"class","shiki min-dark"),g(x,"background-color","#1f1f1f"),y(x,"tabindex","0"),y(w,"class","shiki min-dark"),g(w,"background-color","#1f1f1f"),y(w,"tabindex","0"),y(b,"class","shiki min-dark"),g(b,"background-color","#1f1f1f"),y(b,"tabindex","0"),y(C,"class","shiki min-dark"),g(C,"background-color","#1f1f1f"),y(C,"tabindex","0")},m(e,t){s(e,r,t),s(e,d,t),s(e,F,t),s(e,u,t),s(e,B,t),s(e,de,t),s(e,k,t),s(e,Be,t),s(e,T,t),s(e,me,t),s(e,L,t),s(e,he,t),s(e,P,t),s(e,ve,t),s(e,A,t),s(e,fe,t),s(e,S,t),s(e,xe,t),s(e,H,t),s(e,we,t),s(e,M,t),s(e,be,t),s(e,I,t),s(e,Ce,t),s(e,m,t),s(e,_e,t),s(e,j,t),s(e,ge,t),s(e,h,t),s(e,ke,t),s(e,E,t),s(e,Te,t),s(e,q,t),s(e,Le,t),s(e,$,t),s(e,Pe,t),s(e,z,t),s(e,Ae,t),s(e,R,t),s(e,Se,t),s(e,W,t),s(e,He,t),s(e,Y,t),s(e,Me,t),s(e,U,t),s(e,Ie,t),s(e,O,t),s(e,je,t),s(e,v,t),s(e,Ee,t),s(e,D,t),s(e,qe,t),s(e,K,t),s(e,$e,t),s(e,f,t),s(e,ze,t),s(e,N,t),s(e,Re,t),s(e,V,t),s(e,We,t),s(e,G,t),s(e,Ye,t),s(e,J,t),s(e,Ue,t),s(e,Q,t),s(e,Oe,t),s(e,X,t),s(e,De,t),s(e,x,t),s(e,Ke,t),s(e,Z,t),s(e,Ne,t),s(e,ee,t),s(e,Ve,t),s(e,te,t),s(e,Ge,t),s(e,se,t),s(e,Je,t),s(e,ne,t),s(e,Qe,t),s(e,le,t),s(e,Xe,t),s(e,ae,t),s(e,Ze,t),s(e,oe,t),s(e,et,t),s(e,w,t),s(e,tt,t),s(e,b,t),s(e,st,t),s(e,pe,t),s(e,nt,t),s(e,ie,t),s(e,lt,t),s(e,re,t),s(e,at,t),s(e,C,t),s(e,ot,t),s(e,ce,t),s(e,pt,t),s(e,ye,t),s(e,it,t),s(e,ue,t)},p:cs,d(e){e&&(n(r),n(d),n(F),n(u),n(B),n(de),n(k),n(Be),n(T),n(me),n(L),n(he),n(P),n(ve),n(A),n(fe),n(S),n(xe),n(H),n(we),n(M),n(be),n(I),n(Ce),n(m),n(_e),n(j),n(ge),n(h),n(ke),n(E),n(Te),n(q),n(Le),n($),n(Pe),n(z),n(Ae),n(R),n(Se),n(W),n(He),n(Y),n(Me),n(U),n(Ie),n(O),n(je),n(v),n(Ee),n(D),n(qe),n(K),n($e),n(f),n(ze),n(N),n(Re),n(V),n(We),n(G),n(Ye),n(J),n(Ue),n(Q),n(Oe),n(X),n(De),n(x),n(Ke),n(Z),n(Ne),n(ee),n(Ve),n(te),n(Ge),n(se),n(Je),n(ne),n(Qe),n(le),n(Xe),n(ae),n(Ze),n(oe),n(et),n(w),n(tt),n(b),n(st),n(pe),n(nt),n(ie),n(lt),n(re),n(at),n(C),n(ot),n(ce),n(pt),n(ye),n(it),n(ue))}}}function bs(Fe){let r,_;const d=[Fe[0],is];let F={$$slots:{default:[ws]},$$scope:{ctx:Fe}};for(let c=0;c<d.length;c+=1)F=rt(F,d[c]);return r=new xs({props:F}),{c(){Fs(r.$$.fragment)},l(c){ds(r.$$.fragment,c)},m(c,u){Bs(r,c,u),_=!0},p(c,[u]){const B=u&1?fs(d,[u&1&&ps(c[0]),u&0&&ps(is)]):{};u&2&&(B.$$scope={dirty:u,ctx:c}),r.$set(B)},i(c){_||(ms(r.$$.fragment,c),_=!0)},o(c){hs(r.$$.fragment,c),_=!1},d(c){vs(r,c)}}}const is={title:"Svelte Tips and Features to Enhance Your Developer Experience",description:"Svelte has a framework, with the power of its compiler, that allows you to do less with more, but sometimes you get to dig a little to find these gems, There might be features you're unaware of or aspects you never thought possible, but they're there, waiting to be discovered! ",lastmod:"2024-01-12",date:"2023-10-23",categories:["svelte","webdev","tips"],published:!0};function Cs(Fe,r,_){return Fe.$$set=d=>{_(0,r=rt(rt({},r),os(d)))},r=os(r),[r]}class Ls extends ys{constructor(r){super(),us(this,r,Cs,bs,rs,{})}}export{Ls as default,is as metadata};