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