@histoire/plugin-svelte
Version:
Histoire plugin for Svelte support
2 lines (1 loc) • 1.54 kB
JavaScript
import{create_slot as I,space as M,insert as h,get_all_dirty_from_scope as R,get_slot_changes as U,update_slot_base as w,transition_in as y,transition_out as C,detach as g,empty as k,compute_slots as v,SvelteComponent as A,safe_not_equal as P,init as S}from"svelte/internal";import"svelte/internal/disclose-version";import{getContext as m,afterUpdate as V}from"svelte";function j(a){let e,s,o=!1;return{c(){o&&o.c(),e=k()},m(l,i){o&&o.m(l,i),h(l,e,i),s=!0},p(l,[i]){},i(l){s||(y(o),s=!0)},o(l){C(o),s=!1},d(l){l&&g(e),o&&o.d(l)}}}function O(a,e,s){let{$$slots:o={},$$scope:l}=e;const i=v(o);let{source:f=null}=e,{responsiveDisabled:c=!1}=e,{autoPropsDisabled:u=!1}=e,{setupApp:r=null}=e,{implicit:_=!1}=e;const n=m("__hstStory"),d=m("__hstIndex"),b=m("__hstSlots"),D=n.variants[d.value];d.value++;function p(){var t;Object.assign(D,{slots:()=>({default:!0,controls:i.controls??b.controls}),source:f,responsiveDisabled:c,autoPropsDisabled:u,setupApp:r,configReady:!0}),!_&&!((t=n.meta)!=null&&t.hasVariantChildComponents)&&(n.meta=n.meta||{},Object.assign(n.meta,{hasVariantChildComponents:!0}))}return p(),V(()=>{p()}),a.$$set=t=>{"source"in t&&s(0,f=t.source),"responsiveDisabled"in t&&s(1,c=t.responsiveDisabled),"autoPropsDisabled"in t&&s(2,u=t.autoPropsDisabled),"setupApp"in t&&s(3,r=t.setupApp),"implicit"in t&&s(4,_=t.implicit),"$$scope"in t&&s(5,l=t.$$scope)},[f,c,u,r,_,l,o]}class E extends A{constructor(e){super(),S(this,e,O,j,P,{source:0,responsiveDisabled:1,autoPropsDisabled:2,setupApp:3,implicit:4})}}export{E as default};