svelte-json-schema-form 0.0.1-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.storybook/main.ts +19 -0
  2. package/.storybook/preview.ts +15 -0
  3. package/.vscode/extensions.json +3 -0
  4. package/LICENSE +21 -0
  5. package/README.md +47 -0
  6. package/package.json +36 -0
  7. package/src/Form.stories.svelte +274 -0
  8. package/src/Form.svelte +121 -0
  9. package/src/components/FormActionButton.svelte +22 -0
  10. package/src/components/FormArrayInput.svelte +92 -0
  11. package/src/components/FormCheckboxInput.svelte +7 -0
  12. package/src/components/FormInputWrapper.svelte +85 -0
  13. package/src/components/FormObjectInput.svelte +22 -0
  14. package/src/components/FormTextInput.svelte +14 -0
  15. package/src/exports.js +21 -0
  16. package/src/formContext.js +3 -0
  17. package/src/formDefaultComponents.js +15 -0
  18. package/src/utils/svelteObjectStore.js +34 -0
  19. package/storybook-static/assets/Color-6VNJS4EI-BwbyGRpv.js +1 -0
  20. package/storybook-static/assets/DocsRenderer-NNNQARDV-Dv5gTx4J.js +401 -0
  21. package/storybook-static/assets/Form.stories-B9d26ABq.js +1 -0
  22. package/storybook-static/assets/Hello.stories-iStloLVx.js +1 -0
  23. package/storybook-static/assets/WithTooltip-V3YHNWJZ-Cu4QOpJO.js +1 -0
  24. package/storybook-static/assets/_commonjsHelpers-Cpj98o6Y.js +1 -0
  25. package/storybook-static/assets/collect-stories-C_xzNuNF.js +1 -0
  26. package/storybook-static/assets/entry-preview-ayMb_JX6.js +5 -0
  27. package/storybook-static/assets/entry-preview-docs-Dn-BUk6f.js +7 -0
  28. package/storybook-static/assets/formatter-SWP5E3XI-BDUqP36L.js +156 -0
  29. package/storybook-static/assets/iframe-COBy1vQP.js +7 -0
  30. package/storybook-static/assets/index-Bdfa_YSh.js +1 -0
  31. package/storybook-static/assets/index-Bw8VTzHM.js +1 -0
  32. package/storybook-static/assets/index-C0DyA3Eb.js +3 -0
  33. package/storybook-static/assets/index-Da9FSDFk.js +1 -0
  34. package/storybook-static/assets/index-DrFu-skq.js +6 -0
  35. package/storybook-static/assets/preview-9J5W8ogQ.js +7 -0
  36. package/storybook-static/assets/preview-BAz7FMXc.js +396 -0
  37. package/storybook-static/assets/preview-BCp7Wgbt.js +27 -0
  38. package/storybook-static/assets/preview-B_0crF9I.js +1 -0
  39. package/storybook-static/assets/preview-BcxrGG1y.js +20 -0
  40. package/storybook-static/assets/preview-CIwosuWp.js +1 -0
  41. package/storybook-static/assets/preview-Cv3rAi2i.js +7 -0
  42. package/storybook-static/assets/preview-D8VCGkL0.js +17 -0
  43. package/storybook-static/assets/preview-Db4Idchh.js +1 -0
  44. package/storybook-static/assets/syntaxhighlighter-B5GMVT5T-CFyDre8b.js +1 -0
  45. package/storybook-static/favicon.svg +7 -0
  46. package/storybook-static/iframe.html +458 -0
  47. package/storybook-static/index.html +135 -0
  48. package/storybook-static/index.json +1 -0
  49. package/storybook-static/project.json +1 -0
  50. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  51. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  52. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
  53. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  54. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
  55. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
  56. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +3 -0
  57. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  58. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +3 -0
  59. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  60. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +3 -0
  61. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  62. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +3 -0
  63. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  64. package/storybook-static/sb-addons/interactions-8/manager-bundle.js +12 -0
  65. package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
  66. package/storybook-static/sb-addons/links-0/manager-bundle.js +3 -0
  67. package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
  68. package/storybook-static/sb-addons/svelte-csf-preset-10/manager-bundle.js +3 -0
  69. package/storybook-static/sb-addons/svelte-csf-preset-10/manager-bundle.js.LEGAL.txt +0 -0
  70. package/storybook-static/sb-addons/svelte-csf-preset-9/manager-bundle.js +3 -0
  71. package/storybook-static/sb-addons/svelte-csf-preset-9/manager-bundle.js.LEGAL.txt +0 -0
  72. package/storybook-static/sb-common-assets/fonts.css +31 -0
  73. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  74. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  75. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  76. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  77. package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js +1 -0
  78. package/storybook-static/sb-manager/chunk-4IYAVH3S.js +348 -0
  79. package/storybook-static/sb-manager/chunk-CXYKRFSY.js +9 -0
  80. package/storybook-static/sb-manager/chunk-LVLAH4SI.js +7 -0
  81. package/storybook-static/sb-manager/chunk-VFHDXWEA.js +406 -0
  82. package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +1 -0
  83. package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
  84. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  85. package/storybook-static/sb-manager/globals.js +1 -0
  86. package/storybook-static/sb-manager/index.js +1 -0
  87. package/storybook-static/sb-manager/runtime.js +1 -0
  88. package/storybook-static/sb-manager/syntaxhighlighter-B5GMVT5T-EA5ASEYD.js +1 -0
  89. package/storybook-static/sb-preview/globals.js +1 -0
  90. package/storybook-static/sb-preview/runtime.js +112 -0
  91. package/storybook-static/stories.json +1 -0
  92. package/svelte.config.js +7 -0
  93. package/tsconfig.json +20 -0
  94. package/tsconfig.node.json +10 -0
  95. package/vite.config.ts +14 -0
@@ -0,0 +1 @@
1
+ import{S as O,i as S,s as N,r as V,a as _,h as d,w as j,j as y,u as T,d as g,B as Oe,E as W,v as Se,y as X,x as E,K as C,g as F,f as v,m as k,k as w,L as D,e as A,t as Ne,b as ue,c as je,M as L,N as B,O as ce,P as Y,Q as Z,n as x,z as Te,l as Ie,p as Ee,q as Ce}from"./index-Da9FSDFk.js";import{p as Ve,M as Me,T as Re,S as De}from"./collect-stories-C_xzNuNF.js";function R(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}const ze={and:(...t)=>{for(let e of t)if(!e)return!1;return!0},or:(...t)=>{for(let e of t)if(e)return!0;return!1},eq:(...t)=>{const e=t[0];for(let n of t.slice(1))if(n!==e)return!1;return!0},neq:(...t)=>{const e=t[0];for(let n of t.slice(1))if(n===e)return!1;return!0},in:{function:(...t)=>t.slice(1).includes(t[0]),validArgs:(...t)=>t.length>1},nin:{function:(...t)=>!t.slice(1).includes(t[0]),validArgs:(...t)=>t.length>1},gt:(...t)=>{if(t.length>2)throw new Error("invalid args for gt");return t[0]>t[1]},gte:(...t)=>{if(t.length>2)throw new Error("invalid args for gte");return t[0]>=t[1]},lt:(...t)=>{if(t.length>2)throw new Error("invalid args for lt");return t[0]<t[1]},lte:(...t)=>{if(t.length>2)throw new Error("invalid args for lte");return t[0]<=t[1]},true:t=>t===!0,truthy:t=>!!t,false:t=>t===!1,falsey:t=>!t,undefined:t=>t===void 0},He=(t,e)=>{const n=[];return t.hasOwnProperty("value")&&n.push(t.value),Array.isArray(e)?n.push(...e):e!==void 0&&n.push(e),n},qe=(t,e,n)=>t==="object"&&typeof t.validArgs=="function"&&t.validArgs(...He(e,n)),Ue=t=>Array.isArray(t)?t:Object.entries(t).map(([e,n])=>({[e]:n})),Ge=(t,e={})=>{const n={...ze,...e.predicates},r=(s,i,a=new Set)=>{if(typeof s=="object"){const o=Ue(s);for(let l of o)for(let[f,u]of Object.entries(l))n.hasOwnProperty(f)&&!qe(n[f],i,u)&&typeof u=="object"&&u!==null||a.add(f),r(u,i,a)}return a};return Array.from(r(t,e))};function Le(t,e,n={}){const r=M(e,n.separator);if(r.length===0)for(let s in t)t.hasOwnProperty(s)&&delete t[s];else{const s=r.slice(0,r.length-1);if(!z(t,s,n))return;delete H(t,s,n)[r[r.length-1]]}}function z(t,e,n={}){const r=M(e,n.separator);return r.length===0?!0:!(t instanceof Object)||!(r[0]in t)?!1:z(t[r[0]],r.slice(1),n)}function H(t,e,n={}){const r=M(e,n.separator);return r.length===0?t:t instanceof Object?H(t[r[0]],r.slice(1),n):void 0}function fe(t,e,n,r={}){const s=M(e,r.separator),i=s[0];return s.length===1?t[i]=n:((typeof t[i]!="object"||t[i]===null)&&(t[i]=r.array&&(typeof i=="number"||typeof i=="string"&&/^\d+$/.test(i))?[]:{}),fe(t[i],s.slice(1),n,r)),t}function*Be(t,e={}){function*n(r,s){const i=e.pathParts?s:pe(s,e.separator),a=typeof r=="object"&&r!==null;if((e.branchNodes||!a)&&(yield[i,r]),a)for(let[o,l]of Object.entries(r))yield*n(l,[...s,o])}yield*n(t,[])}function he(t){return t.filter(e=>e.length)}function M(t,e="."){const n=Array.isArray(t)?t:t.split(e);return he(n)}function pe(t,e="."){return Array.isArray(t)?he(t).join(e):t}const Ke=(t,e,n={})=>{const r=/\${([^}]+)}/g;let s;for(;(s=Array.from(t.matchAll(r))).length;)for(let i=s.length-1;i>=0;i--){const a=s[i];if(!z(e,a[1],n))throw new Error(`Missing replacement "${a[1]}"`);const o=H(e,a[1],n);t=`${t.slice(0,a.index)}${o}${t.slice(a.index+a[0].length)}`}return t},G=(t,e)=>(Array.isArray(t)?t:t.split(e)).map(r=>r.trim()),de=t=>t[0].length===0,me=t=>({separator:"/",parent:"..",current:".",...t}),Je=(t,e)=>{const n=me(e);let r=G(t,n.separator);const s=de(r);r=r.filter(a=>a.length>0);const i=[];for(let a of r)if(a==="..")if(i.length>0)i.pop();else throw new Error("Invalid path (above root)");else a!==n.current&&i.push(a);return{pathParts:i,absolute:s,options:n}},$=(t,e)=>{const{pathParts:n,absolute:r,options:s}=Je(t,e);return r&&n.unshift(""),n.join(s.separator)},Qe=(t,e=[],n={})=>{const{separator:r}=me(n),s=G(t,r);if(de(s))return $(s,n);{const i=G(e,r);return $([...i,...s],n)}},We=(t,e,n={})=>{const r=n.replacements?n.replacements:t,s=Ke(e,r,n);return Qe(s,[],{absolute:!1,...n})},Xe=(t,e)=>typeof t=="string"&&t[0]==="$",Ye=(t,e)=>t.substring(1),Ze=(t,e={})=>n=>Ge(n,e).filter(r=>Xe(r)).map(r=>We(t.get([]),Ye(r),e)),ye=Symbol();function ee(t){let e,n,r,s,i,a=t[3].title&&te(t);function o(u){t[12](u)}var l=t[4][t[3].type];function f(u,c){let h={config:u[3],valuePathParts:u[1],schemaPathParts:u[2]};return u[0]!==void 0&&(h.value=u[0]),{props:h}}return l&&(n=X(l,f(t)),E.push(()=>C(n,"value",o))),{c(){a&&a.c(),e=F(),n&&v(n.$$.fragment),s=V()},m(u,c){a&&a.m(u,c),_(u,e,c),n&&k(n,u,c),_(u,s,c),i=!0},p(u,c){if(u[3].title?a?a.p(u,c):(a=te(u),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),c&8&&l!==(l=u[4][u[3].type])){if(n){j();const h=n;y(h.$$.fragment,1,0,()=>{w(h,1)}),T()}l?(n=X(l,f(u)),E.push(()=>C(n,"value",o)),v(n.$$.fragment),d(n.$$.fragment,1),k(n,s.parentNode,s)):n=null}else if(l){const h={};c&8&&(h.config=u[3]),c&2&&(h.valuePathParts=u[1]),c&4&&(h.schemaPathParts=u[2]),!r&&c&1&&(r=!0,h.value=u[0],D(()=>r=!1)),n.$set(h)}},i(u){i||(n&&d(n.$$.fragment,u),i=!0)},o(u){n&&y(n.$$.fragment,u),i=!1},d(u){u&&(g(e),g(s)),a&&a.d(u),n&&w(n,u)}}}function te(t){let e,n=t[3].title+"",r;return{c(){e=A("h4"),r=Ne(n)},m(s,i){_(s,e,i),ue(e,r)},p(s,i){i&8&&n!==(n=s[3].title+"")&&je(r,n)},d(s){s&&g(e)}}}function xe(t){let e,n,r=t[4]&&t[4][t[3].type]&&ee(t);return{c(){r&&r.c(),e=V()},m(s,i){r&&r.m(s,i),_(s,e,i),n=!0},p(s,[i]){s[4]&&s[4][s[3].type]?r?(r.p(s,i),i&8&&d(r,1)):(r=ee(s),r.c(),d(r,1),r.m(e.parentNode,e)):r&&(j(),y(r,1,1,()=>{r=null}),T())},i(s){n||(d(r),n=!0)},o(s){y(r),n=!1},d(s){s&&g(e),r&&r.d(s)}}}function $e(t,e,n){let r,s,{context:i=ye}=e,{valuePathParts:a}=e,{schemaPathParts:o}=e,{value:l}=e,{config:f={}}=e;const{components:u,stateStore:c,registerAutomation:h}=Oe(i);let p,P=!1;const b=c.store(["config","schema",...o]);W(t,b,m=>n(11,s=m));const J=c.store(["valueSchema",...o,"_input"]);W(t,J,m=>n(10,r=m)),c.subscribe([],m=>{console.log("STOREVAL",m,`values/${c.pathFromPathParts(a)}`)}),Se(()=>(n(9,P=!0),()=>{n(9,P=!1),Q()}));let U=[];const ke=m=>{const Fe={pathReplacements:{valuePath:`values/${c.pathFromPathParts(a)}`}};U=m.map(Ae=>h(Ae,Fe))},Q=()=>{for(let m of U)m();U=[]};function we(m){l=m,n(0,l)}return t.$$set=m=>{"context"in m&&n(7,i=m.context),"valuePathParts"in m&&n(1,a=m.valuePathParts),"schemaPathParts"in m&&n(2,o=m.schemaPathParts),"value"in m&&n(0,l=m.value),"config"in m&&n(8,f=m.config)},t.$$.update=()=>{t.$$.dirty&3328&&n(3,p={...s,...r,...f}),t.$$.dirty&520&&P&&(Q(),p.automations&&ke(p.automations))},[l,a,o,p,u,b,J,i,f,P,r,s,we]}class q extends O{constructor(e){super(),S(this,e,$e,xe,N,{context:7,valuePathParts:1,schemaPathParts:2,value:0,config:8})}}q.__docgen={version:3,name:"FormInputWrapper.svelte",data:[{visibility:"public",description:null,keywords:[],name:"context",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"valuePathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"schemaPathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"value",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"},bind:[{source:"svelte:component",property:"value"}]},{visibility:"public",description:null,keywords:[],name:"config",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function ne(t,e,n){const r=t.slice();return r[9]=e[n],r[10]=e,r[11]=n,r}function re(t){let e,n,r,s,i,a,o,l,f;function u(p){t[7](p,t[11])}let c={config:t[1].input,valuePathParts:[...t[3],t[11]],schemaPathParts:[...t[2],"input"]};t[0][t[11]]!==void 0&&(c.value=t[0][t[11]]),e=new q({props:c}),E.push(()=>C(e,"value",u));function h(){return t[8](t[11])}return{c(){v(e.$$.fragment),r=F(),s=A("input"),i=F(),a=A("br"),L(s,"type","button"),s.value="Remove Item"},m(p,P){k(e,p,P),_(p,r,P),_(p,s,P),_(p,i,P),_(p,a,P),o=!0,l||(f=B(s,"click",h),l=!0)},p(p,P){t=p;const b={};P&2&&(b.config=t[1].input),P&8&&(b.valuePathParts=[...t[3],t[11]]),P&4&&(b.schemaPathParts=[...t[2],"input"]),!n&&P&1&&(n=!0,b.value=t[0][t[11]],D(()=>n=!1)),e.$set(b)},i(p){o||(d(e.$$.fragment,p),o=!0)},o(p){y(e.$$.fragment,p),o=!1},d(p){p&&(g(r),g(s),g(i),g(a)),w(e,p),l=!1,f()}}}function et(t){let e,n,r,s,i,a=R(t[0]),o=[];for(let f=0;f<a.length;f+=1)o[f]=re(ne(t,a,f));const l=f=>y(o[f],1,1,()=>{o[f]=null});return{c(){for(let f=0;f<o.length;f+=1)o[f].c();e=F(),n=A("input"),L(n,"type","button"),n.value="Add Item"},m(f,u){for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(f,u);_(f,e,u),_(f,n,u),r=!0,s||(i=B(n,"click",t[4]),s=!0)},p(f,[u]){if(u&47){a=R(f[0]);let c;for(c=0;c<a.length;c+=1){const h=ne(f,a,c);o[c]?(o[c].p(h,u),d(o[c],1)):(o[c]=re(h),o[c].c(),d(o[c],1),o[c].m(e.parentNode,e))}for(j(),c=a.length;c<o.length;c+=1)l(c);T()}},i(f){if(!r){for(let u=0;u<a.length;u+=1)d(o[u]);r=!0}},o(f){o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)y(o[u]);r=!1},d(f){f&&(g(e),g(n)),ce(o,f),s=!1,i()}}}function tt(t,e,n){let{components:r}=e,{config:s}=e,{value:i=[]}=e,{schemaPathParts:a}=e,{valuePathParts:o}=e;const l=()=>{n(0,i=[...i,void 0])},f=h=>{n(0,i=[...i.slice(0,h),...i.slice(h+1)])};function u(h,p){t.$$.not_equal(i[p],h)&&(i[p]=h,n(0,i))}const c=h=>f(h);return t.$$set=h=>{"components"in h&&n(6,r=h.components),"config"in h&&n(1,s=h.config),"value"in h&&n(0,i=h.value),"schemaPathParts"in h&&n(2,a=h.schemaPathParts),"valuePathParts"in h&&n(3,o=h.valuePathParts)},[i,s,a,o,l,f,r,u,c]}class Pe extends O{constructor(e){super(),S(this,e,tt,et,N,{components:6,config:1,value:0,schemaPathParts:2,valuePathParts:3})}}Pe.__docgen={version:3,name:"FormArrayInput.svelte",data:[{visibility:"public",description:null,keywords:[],name:"components",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"config",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"value",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}},{visibility:"public",description:null,keywords:[],name:"schemaPathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"valuePathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function se(t,e,n){const r=t.slice();return r[5]=e[n][0],r[6]=e[n][1],r[7]=e,r[8]=n,r}function ae(t){let e,n,r=R(Object.entries(t[1].properties)),s=[];for(let a=0;a<r.length;a+=1)s[a]=ie(se(t,r,a));const i=a=>y(s[a],1,1,()=>{s[a]=null});return{c(){for(let a=0;a<s.length;a+=1)s[a].c();e=V()},m(a,o){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(a,o);_(a,e,o),n=!0},p(a,o){if(o&15){r=R(Object.entries(a[1].properties));let l;for(l=0;l<r.length;l+=1){const f=se(a,r,l);s[l]?(s[l].p(f,o),d(s[l],1)):(s[l]=ie(f),s[l].c(),d(s[l],1),s[l].m(e.parentNode,e))}for(j(),l=r.length;l<s.length;l+=1)i(l);T()}},i(a){if(!n){for(let o=0;o<r.length;o+=1)d(s[o]);n=!0}},o(a){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)y(s[o]);n=!1},d(a){a&&g(e),ce(s,a)}}}function ie(t){let e,n,r;function s(a){t[4](a,t[5])}let i={input:t[6],valuePathParts:[...t[2],t[5]],schemaPathParts:[...t[3],"properties",t[5]]};return t[0][t[5]]!==void 0&&(i.value=t[0][t[5]]),e=new q({props:i}),E.push(()=>C(e,"value",s)),{c(){v(e.$$.fragment)},m(a,o){k(e,a,o),r=!0},p(a,o){t=a;const l={};o&2&&(l.input=t[6]),o&6&&(l.valuePathParts=[...t[2],t[5]]),o&10&&(l.schemaPathParts=[...t[3],"properties",t[5]]),!n&&o&3&&(n=!0,l.value=t[0][t[5]],D(()=>n=!1)),e.$set(l)},i(a){r||(d(e.$$.fragment,a),r=!0)},o(a){y(e.$$.fragment,a),r=!1},d(a){w(e,a)}}}function nt(t){let e,n,r=t[1]&&ae(t);return{c(){r&&r.c(),e=V()},m(s,i){r&&r.m(s,i),_(s,e,i),n=!0},p(s,[i]){s[1]?r?(r.p(s,i),i&2&&d(r,1)):(r=ae(s),r.c(),d(r,1),r.m(e.parentNode,e)):r&&(j(),y(r,1,1,()=>{r=null}),T())},i(s){n||(d(r),n=!0)},o(s){y(r),n=!1},d(s){s&&g(e),r&&r.d(s)}}}function rt(t,e,n){let{value:r={}}=e,{config:s}=e,{valuePathParts:i}=e,{schemaPathParts:a}=e;function o(l,f){t.$$.not_equal(r[f],l)&&(r[f]=l,n(0,r))}return t.$$set=l=>{"value"in l&&n(0,r=l.value),"config"in l&&n(1,s=l.config),"valuePathParts"in l&&n(2,i=l.valuePathParts),"schemaPathParts"in l&&n(3,a=l.schemaPathParts)},console.log("CFG!"),[r,s,i,a,o]}class _e extends O{constructor(e){super(),S(this,e,rt,nt,N,{value:0,config:1,valuePathParts:2,schemaPathParts:3})}}_e.__docgen={version:3,name:"FormObjectInput.svelte",data:[{visibility:"public",description:null,keywords:[],name:"value",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{visibility:"public",description:null,keywords:[],name:"config",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"valuePathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"schemaPathParts",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function st(t){let e,n,r,s;return{c(){e=A("div"),n=A("input"),L(n,"type","text"),Y(e,"border","1px solid #ff0000"),Y(e,"padding","5px")},m(i,a){_(i,e,a),ue(e,n),Z(n,t[0]),r||(s=B(n,"input",t[1]),r=!0)},p(i,[a]){a&1&&n.value!==i[0]&&Z(n,i[0])},i:x,o:x,d(i){i&&g(e),r=!1,s()}}}function at(t,e,n){let{value:r=void 0}=e;function s(){r=this.value,n(0,r)}return t.$$set=i=>{"value"in i&&n(0,r=i.value)},[r,s]}class ge extends O{constructor(e){super(),S(this,e,at,st,N,{value:0})}}ge.__docgen={version:3,name:"FormTextInput.svelte",data:[{visibility:"public",description:null,keywords:[],name:"value",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"},bind:[{source:"input",property:"value"}]}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const it={array:Pe,object:_e,text:ge};class be{constructor(e={},n={}){this._object=e,this._options=n}*entries(e={}){yield*Be(this._object,{...this._options,...e})}has(e){return z(this._object,e,this._options)}delete(e){return Le(this._object,e,this._options)}get(e){return H(this._object,e,this._options)}set(e,n){return fe(this._object,e,n,this._options)}pathPartsFromPath(e){return M(e,this._options.separator)}pathFromPathParts(e){return pe(e,this._options.separator)}}class ot{constructor(e={}){this._tree=new be(e),this._options=e}hasValue(e){return this._tree.has(this._hierarchyValuePathParts(e))}getValue(e){return this._tree.get(this._hierarchyValuePathParts(e))}setValue(e,n){return this._tree.set(this._hierarchyValuePathParts(e),n)}deleteValue(e){const n=this._hierarchyPathParts(e),r=[...n,"value"],s=this._tree.delete(r);return this._pruneNodes(n),s}pathPartsFromPath(e){return this._tree.pathPartsFromPath(e,this._options.separator)}pathFromPathParts(e){return this._tree.pathFromPathParts(e,this._options.separator)}*familyNodes(e){const n=this._hierarchyPathParts(e);yield*this._hierarchyFamilyNodes(n)}*familyValues(e){for(let n of this.familyNodes(e))n.hasOwnProperty("value")&&(yield n.value)}*depthFirstNodes(e=[]){const n=this._hierarchyPathParts(e);yield*this._hierarchyDescendantNodes(n)}*depthFirstValues(e){for(let n of this.depthFirstNodes(e))n.hasOwnProperty("value")&&(yield n.value)}*ancestorNodes(e){let n=this._hierarchyPathParts(e);yield*this._hierarchyAncestorNodes(n)}*ancestorValues(e){for(let n of this.ancestorNodes(e))n.hasOwnProperty("value")&&(yield n.value)}*_hierarchyFamilyNodes(e){yield*this._hierarchyDescendantNodes(e),yield*this._hierarchyAncestorNodes(e)}*_hierarchyDescendantNodes(e){this._tree.has(e)&&(yield*this._depthFirstTraverseNodes(this._tree.get(e)))}*_hierarchyAncestorNodes(e){for(;!this._isHierarchyRootPath(e);)e=this._hierarchyParentPathParts(e),this._tree.has(e)&&(yield this._tree.get(e))}*_depthFirstTraverseNodes(e){if(e){if(e.hasOwnProperty("children"))for(let[n,r]of Object.entries(e.children))yield*this._depthFirstTraverseNodes(r);yield e}}_pruneNodes(e){const n=this._tree.get(e);if(!n.hasOwnProperty("value")&&!n.hasOwnProperty("children")&&!this._isHierarchyRootPath(e)){const r=this._hierarchyParentPathParts(e),s=e[e.length-1],i=this._tree.get(r);delete i.children[s],Object.keys(i.children).length===0&&(delete i.children,this._pruneNodes(r))}}_isHierarchyRootPath(e){return this._tree.pathPartsFromPath(e).length<2}_hierarchyParentPathParts(e){return this._tree.pathPartsFromPath(e).slice(0,-2)}_hierarchyPathParts(e){return this._tree.pathPartsFromPath(e).reduce((r,s)=>[...r,"children",s],[])}_hierarchyValuePathParts(e){return[...this._hierarchyPathParts(e),"value"]}}class oe extends Error{constructor(e,n){super(e),Object.assign(this,n)}}class I extends be{constructor(e,n){super(e,n),this._mutationCallbacks=new ot(n)}set(e,n){const r=this.pathPartsFromPath(e),s=this.pathFromPathParts(e);if(!this.has(r)||this.get(r)!==n){const i=super.set(r,n);return this._emitMutation(s,r,n,I.MUTATIONS.SET),i}}delete(e){const n=this.pathPartsFromPath(e),r=this.pathFromPathParts(e);if(this.has(n)){const s=super.delete(n);return this._emitMutation(r,n,void 0,I.MUTATIONS.DELETE),s}}subscribe(e,n,r={}){const s={fetch:!0,...r};let i=!0;const a=this.pathFromPathParts(e),o=this.pathPartsFromPath(e),l=(f,u,c)=>{n(this.get(o),{mutatedPath:f,mutatedValue:u,mutation:c})};return s.fetch&&l(a,this.get(o),I.MUTATIONS.FETCH),this._addSubscription(o,l),()=>{if(i===!1)throw new oe("Already unsubscribed",{code:"canceled_subscription"});i=!1,this._removeSubscription(o,l)}}calculate(e,n,r,s={}){const i=n.map(c=>this.pathPartsFromPath(c)),a=this.pathPartsFromPath(e),o={fetch:!0,...s};let l=!0;const f=()=>{const c=r(...i.map(h=>this.get(h)));c instanceof Promise?c.then(h=>{this.set(a,h)}):this.set(a,c)},u=[];for(let c of n)u.push(this.subscribe(c,f,{fetch:!1}));return o.fetch&&f(),()=>{if(l===!1)throw new oe("Already unsubscribed",{code:"canceled_subscription"});l=!1;for(let c of u)c()}}_addSubscription(e,n){this._mutationCallbacks.hasValue(e)||this._mutationCallbacks.setValue(e,new Set),this._mutationCallbacks.getValue(e).add(n)}_removeSubscription(e,n){const r=this._mutationCallbacks.getValue(e);r.delete(n),r.size===0&&this._mutationCallbacks.deleteValue(e)}_emitMutation(e,n,r,s){for(let i of this._mutationCallbacks.familyValues(n))for(let a of i)a(e,r,s)}static get MUTATIONS(){return Object.freeze({SET:"SET",DELETE:"DELETE",FETCH:"FETCH"})}}class lt extends I{store(e,n){return{subscribe:r=>this.subscribe(e,r,n)}}}function le(t){let e,n,r;function s(a){t[4](a)}let i={input:t[1].schema,schemaPathParts:[],valuePathParts:[]};return t[0]!==void 0&&(i.value=t[0]),e=new q({props:i}),E.push(()=>C(e,"value",s)),{c(){v(e.$$.fragment)},m(a,o){k(e,a,o),r=!0},p(a,o){const l={};o&2&&(l.input=a[1].schema),!n&&o&1&&(n=!0,l.value=a[0],D(()=>n=!1)),e.$set(l)},i(a){r||(d(e.$$.fragment,a),r=!0)},o(a){y(e.$$.fragment,a),r=!1},d(a){w(e,a)}}}function ut(t){let e,n,r=t[1]&&t[1].schema&&le(t);return{c(){r&&r.c(),e=V()},m(s,i){r&&r.m(s,i),_(s,e,i),n=!0},p(s,[i]){s[1]&&s[1].schema?r?(r.p(s,i),i&2&&d(r,1)):(r=le(s),r.c(),d(r,1),r.m(e.parentNode,e)):r&&(j(),y(r,1,1,()=>{r=null}),T())},i(s){n||(d(r),n=!0)},o(s){y(r),n=!1},d(s){s&&g(e),r&&r.d(s)}}}function ct(t,e,n){let{inputComponents:r}=e,{context:s=ye}=e,{config:i}=e,{value:a={}}=e;const o=new lt({config:i,values:{}},{separator:"/"});let l={...it,...r};Te(s,{components:l,stateStore:o,registerAutomation:(u,c)=>{console.log("REGISTER AUTOMATION",u,c),console.log("PR",c.pathReplacements);const h={conditions:{object:{separator:"/"},replacements:c.pathReplacements},actions:{store:o,replacements:c.pathReplacements,object:{separator:"/"}}},p=Ze(o,h.conditions);console.log(p);const P=p(u).map(b=>o.subscribe(b,()=>{console.log("HIT!")}));return()=>{for(let b of P)b()}}});function f(u){a=u,n(0,a)}return t.$$set=u=>{"inputComponents"in u&&n(2,r=u.inputComponents),"context"in u&&n(3,s=u.context),"config"in u&&n(1,i=u.config),"value"in u&&n(0,a=u.value)},t.$$.update=()=>{if(t.$$.dirty&1){const u=typeof a=="object"&&a!==null?{...a}:a;o.set(["values"],u)}t.$$.dirty&2&&(console.log("SETTING CONFIG"),o.set(["config"],i))},o.store([]),[a,i,r,s,f]}class K extends O{constructor(e){super(),S(this,e,ct,ut,N,{inputComponents:2,context:3,config:1,value:0})}}K.__docgen={version:3,name:"Form.svelte",data:[{visibility:"public",description:null,keywords:[],name:"inputComponents",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"context",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"config",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"value",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},bind:[{source:"FormInputWrapper",property:"value"}]}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function ft(t){let e,n;const r=[t[0]];let s={};for(let i=0;i<r.length;i+=1)s=Ie(s,r[i]);return e=new K({props:s}),{c(){v(e.$$.fragment)},m(i,a){k(e,i,a),n=!0},p(i,a){const o=a&1?Ee(r,[Ce(i[0])]):{};e.$set(o)},i(i){n||(d(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){w(e,i)}}}function ht(t){let e,n,r,s,i,a;return e=new Me({props:{title:"JSONSchemaForm/Form",component:K,argTypes:{config:{control:{type:"object"},defaultValue:{value:"my value"}}}}}),r=new Re({props:{$$slots:{default:[ft,({args:o})=>({0:o}),({args:o})=>o?1:0]},$$scope:{ctx:t}}}),i=new De({props:{name:"Primary",args:{config:{schema:{title:"Object Title",type:"object",properties:{key1:{type:"text",automations:[{condition:{"$${valuePath}/../key2":"truthy"},pass:[{action:"delete",args:["$${valuePath}/../key5"]}]}]},key2:{type:"text"},key5:{type:"text"},key3:{type:"array",input:{title:"Array Item",type:"text",xprop:"A"}},key4:{type:"array",input:{title:"Array Item",type:"object",properties:{key1:{title:"Key 1",type:"text"},key2:{title:"Key 2",type:"text"}}}}}}}}}}),{c(){v(e.$$.fragment),n=F(),v(r.$$.fragment),s=F(),v(i.$$.fragment)},m(o,l){k(e,o,l),_(o,n,l),k(r,o,l),_(o,s,l),k(i,o,l),a=!0},p(o,[l]){const f={};l&3&&(f.$$scope={dirty:l,ctx:o}),r.$set(f)},i(o){a||(d(e.$$.fragment,o),d(r.$$.fragment,o),d(i.$$.fragment,o),a=!0)},o(o){y(e.$$.fragment,o),y(r.$$.fragment,o),y(i.$$.fragment,o),a=!1},d(o){o&&(g(n),g(s)),w(e,o),w(r,o),w(i,o)}}}class pt extends O{constructor(e){super(),S(this,e,null,ht,N,{})}}const ve=Ve(pt,{meta:{title:"JSONSchemaForm/Form",description:"More on argTypes: https://storybook.js.org/docs/svelte/api/argtypes"},stories:{"tpl:default":{name:"default",template:!0,source:"<Form {...args} />",hasArgs:!0},Primary:{name:"Primary",template:!1,source:"",hasArgs:!1,description:"More on args: https://storybook.js.org/docs/svelte/writing-stories/args"}},allocatedIds:["default","Meta","Template","Story","Form"]}),yt=ve.meta,Pt=["Primary"],_t=ve.stories.Primary;export{_t as Primary,Pt as __namedExportsOrder,yt as default};
@@ -0,0 +1 @@
1
+ import{S as P,i as T,s as j,e as x,t as C,a as y,b as h,c as B,n as M,d as _,f as p,g as b,m as f,h as c,j as u,k as $,l as z,o as I,p as q,q as U}from"./index-Da9FSDFk.js";import{p as D,M as E,T as O,S as w}from"./collect-stories-C_xzNuNF.js";function V(l){let t,o,a,n;return{c(){t=x("h1"),o=C("Hello "),a=C(l[0]),n=C("!")},m(s,m){y(s,t,m),h(t,o),h(t,a),h(t,n)},p(s,[m]){m&1&&B(a,s[0])},i:M,o:M,d(s){s&&_(t)}}}function F(l,t,o){let{label:a="world"}=t;return l.$$set=n=>{"label"in n&&o(0,a=n.label)},[a]}class A extends P{constructor(t){super(),T(this,t,F,V,j,{label:0})}}A.__docgen={version:3,name:"Hello.svelte",data:[{visibility:"public",description:null,keywords:[],name:"label",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"world"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function G(l){let t,o;const a=[l[0]];let n={};for(let s=0;s<a.length;s+=1)n=z(n,a[s]);return t=new A({props:n}),t.$on("click",function(){I(l[0].onClick)&&l[0].onClick.apply(this,arguments)}),{c(){p(t.$$.fragment)},m(s,m){f(t,s,m),o=!0},p(s,m){l=s;const i=m&1?q(a,[U(l[0])]):{};t.$set(i)},i(s){o||(c(t.$$.fragment,s),o=!0)},o(s){u(t.$$.fragment,s),o=!1},d(s){$(t,s)}}}function J(l){let t,o,a,n,s,m,i,H,g,v,d,k;return t=new E({props:{title:"UI/Hello",component:A,argTypes:{backgroundColor:{control:"color"},label:{control:"text"},onClick:{action:"onClick"},primary:{control:"boolean"},size:{control:{type:"select"},options:["small","medium","large"]}}}}),a=new O({props:{$$slots:{default:[G,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:l}}}),s=new w({props:{name:"Primary",args:{primary:!0,label:"Button"}}}),i=new w({props:{name:"Secondary",args:{label:"Button"}}}),g=new w({props:{name:"Large",args:{size:"large",label:"Button"}}}),d=new w({props:{name:"Small",args:{size:"small",label:"AxButton"}}}),{c(){p(t.$$.fragment),o=b(),p(a.$$.fragment),n=b(),p(s.$$.fragment),m=b(),p(i.$$.fragment),H=b(),p(g.$$.fragment),v=b(),p(d.$$.fragment)},m(e,r){f(t,e,r),y(e,o,r),f(a,e,r),y(e,n,r),f(s,e,r),y(e,m,r),f(i,e,r),y(e,H,r),f(g,e,r),y(e,v,r),f(d,e,r),k=!0},p(e,[r]){const L={};r&3&&(L.$$scope={dirty:r,ctx:e}),a.$set(L)},i(e){k||(c(t.$$.fragment,e),c(a.$$.fragment,e),c(s.$$.fragment,e),c(i.$$.fragment,e),c(g.$$.fragment,e),c(d.$$.fragment,e),k=!0)},o(e){u(t.$$.fragment,e),u(a.$$.fragment,e),u(s.$$.fragment,e),u(i.$$.fragment,e),u(g.$$.fragment,e),u(d.$$.fragment,e),k=!1},d(e){e&&(_(o),_(n),_(m),_(H),_(v)),$(t,e),$(a,e),$(s,e),$(i,e),$(g,e),$(d,e)}}}class K extends P{constructor(t){super(),T(this,t,null,J,j,{})}}const S=D(K,{meta:{title:"UI/Hello",description:"More on argTypes: https://storybook.js.org/docs/svelte/api/argtypes"},stories:{"tpl:default":{name:"default",template:!0,source:"<Hello {...args} on:click={args.onClick} />",hasArgs:!0},Primary:{name:"Primary",template:!1,source:"",hasArgs:!1,description:"More on args: https://storybook.js.org/docs/svelte/writing-stories/args"},Secondary:{name:"Secondary",template:!1,source:"",hasArgs:!1},Large:{name:"Large",template:!1,source:"",hasArgs:!1},Small:{name:"Small",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","Hello"]}),R=S.meta,W=["Primary","Secondary","Large","Small"],X=S.stories.Primary,Y=S.stories.Secondary,Z=S.stories.Large,ee=S.stories.Small;export{Z as Large,X as Primary,Y as Secondary,ee as Small,W as __namedExportsOrder,R as default};
@@ -0,0 +1 @@
1
+ import{W as T,W as e,a as h}from"./DocsRenderer-NNNQARDV-Dv5gTx4J.js";import"./iframe-COBy1vQP.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-Bw8VTzHM.js";import"./index-C0DyA3Eb.js";import"./index-DrFu-skq.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure};
@@ -0,0 +1 @@
1
+ var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{o as c,l as g};
@@ -0,0 +1 @@
1
+ import{n as J,s as O,z as Q,A as le,B as ue,S as T,i as N,l as w,C as E,r as Y,a as B,h as p,w as U,j as g,u as q,d as z,D as ne,E as L,F as fe,G as de,H as pe,I as me,J as Se,y as D,f as A,m as P,k as G,x as Ce}from"./index-Da9FSDFk.js";const C=[];function se(n,e=J){let o;const t=new Set;function s(c){if(O(n,c)&&(n=c,o)){const u=!C.length;for(const a of t)a[1](),C.push(a,n);if(u){for(let a=0;a<C.length;a+=2)C[a][0](C[a+1]);C.length=0}}}function r(c){s(c(n))}function i(c,u=J){const a=[c,u];return t.add(a),t.size===1&&(o=e(s,r)||J),c(n),()=>{t.delete(a),t.size===0&&o&&(o(),o=null)}}return{set:s,update:r,subscribe:i}}const K="storybook-registration-context",H="storybook-registration-context-component";function ye(n={}){Q(K,{render:!0,register:()=>{},meta:{},args:{},...n}),_e()}function we(n){Q(K,{render:!1,register:e=>{n.stories.push(e)},set meta(e){n.meta=e},args:{}})}function Z(){return le(K)||ye(),ue(K)}function _e(){Q(H,{argsStore:se({}),storyContextStore:se({})})}function $(){return le(H)||_e(),ue(H)}function Oe(n,e){const o=$();o.argsStore.set(n),o.storyContextStore.set(e)}function Ee(n,e,o){return Z().meta=e,n.$$set=t=>{o(0,e=w(w({},e),E(t)))},e=E(e),[]}class Te extends T{constructor(e){super(),N(this,e,Ee,null,O,{})}}Te.__docgen={version:3,name:"Meta.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const Ne=n=>n&4,je=n=>({context:n&2,args:n&4}),oe=n=>({...n[2],context:n[1],args:n[2]});function re(n){let e;const o=n[9].default,t=fe(o,n,n[8],oe);return{c(){t&&t.c()},m(s,r){t&&t.m(s,r),e=!0},p(s,r){t&&t.p&&(!e||r&262)&&de(t,o,s,s[8],Ne(r)||!e?pe(s[8]):me(o,s[8],r,je),oe)},i(s){e||(p(t,s),e=!0)},o(s){g(t,s),e=!1},d(s){t&&t.d(s)}}}function Re(n){let e,o,t=n[0]&&re(n);return{c(){t&&t.c(),e=Y()},m(s,r){t&&t.m(s,r),B(s,e,r),o=!0},p(s,[r]){s[0]?t?(t.p(s,r),r&1&&p(t,1)):(t=re(s),t.c(),p(t,1),t.m(e.parentNode,e)):t&&(U(),g(t,1,1,()=>{t=null}),q())},i(s){o||(p(t),o=!0)},o(s){g(t),o=!1},d(s){s&&z(e),t&&t.d(s)}}}function Ie(n,e){e&&n.playFunction&&(n.playFunction.__play=e)}function ve(n,e,o){let t;const s=["name","template","play"];let r=ne(e,s),i,c,{$$slots:u={},$$scope:a}=e;const d=Se(u),y=Z();let{name:m}=e,{template:l=null}=e,{play:b=null}=e;if(!m)throw new Error("Missing Story name");y.register({name:m,...r,play:b,template:l??(d.default?null:"default")});const V=$(),h=V.argsStore;L(n,h,f=>o(2,c=f));const k=V.storyContextStore;return L(n,k,f=>o(1,i=f)),n.$$set=f=>{e=w(w({},e),E(f)),o(13,r=ne(e,s)),"name"in f&&o(5,m=f.name),"template"in f&&o(6,l=f.template),"play"in f&&o(7,b=f.play),"$$scope"in f&&o(8,a=f.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&o(0,t=y.render&&!y.templateName&&y.storyName==m),n.$$.dirty&131&&t&&Ie(i,b)},[t,i,c,h,k,m,l,b,a,u]}class Fe extends T{constructor(e){super(),N(this,e,ve,Re,O,{name:5,template:6,play:7})}}Fe.__docgen={version:3,name:"Story.svelte",data:[{visibility:"public",description:null,keywords:[],name:"name",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"template",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{visibility:"public",description:null,keywords:[],name:"play",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"",name:"default",params:[{name:"{...$args}",type:{kind:"type",text:"*",type:"any"}},{name:"context",type:{kind:"type",text:"*",type:"any"}},{name:"args",type:{kind:"type",text:"*",type:"any"}}],parameters:[{name:"{...$args}",type:{kind:"type",text:"*",type:"any"}},{name:"context",type:{kind:"type",text:"*",type:"any"}},{name:"args",type:{kind:"type",text:"*",type:"any"}}]}],refs:[]};const Me=n=>n&2,Le=n=>({context:n&4,args:n&2}),ie=n=>({...n[1],context:n[2],args:n[1]});function ae(n){let e;const o=n[7].default,t=fe(o,n,n[6],ie);return{c(){t&&t.c()},m(s,r){t&&t.m(s,r),e=!0},p(s,r){t&&t.p&&(!e||r&70)&&de(t,o,s,s[6],Me(r)||!e?pe(s[6]):me(o,s[6],r,Le),ie)},i(s){e||(p(t,s),e=!0)},o(s){g(t,s),e=!1},d(s){t&&t.d(s)}}}function De(n){let e,o,t=n[0]&&ae(n);return{c(){t&&t.c(),e=Y()},m(s,r){t&&t.m(s,r),B(s,e,r),o=!0},p(s,[r]){s[0]?t?(t.p(s,r),r&1&&p(t,1)):(t=ae(s),t.c(),p(t,1),t.m(e.parentNode,e)):t&&(U(),g(t,1,1,()=>{t=null}),q())},i(s){o||(p(t),o=!0)},o(s){g(t),o=!1},d(s){s&&z(e),t&&t.d(s)}}}function Ae(n,e,o){let t,s,r,{$$slots:i={},$$scope:c}=e;const u=Z();let{id:a="default"}=e;u.register({id:a,isTemplate:!0});const d=$(),y=d.argsStore;L(n,y,l=>o(1,s=l));const m=d.storyContextStore;return L(n,m,l=>o(2,r=l)),n.$$set=l=>{"id"in l&&o(5,a=l.id),"$$scope"in l&&o(6,c=l.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&o(0,t=u.render&&u.templateId===a)},[t,s,r,y,m,a,c,i]}class Pe extends T{constructor(e){super(),N(this,e,Ae,De,O,{id:5})}}Pe.__docgen={version:3,name:"Template.svelte",data:[{visibility:"public",description:null,keywords:[],name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"default"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"",name:"default",params:[{name:"{...$args}",type:{kind:"type",text:"*",type:"any"}},{name:"context",type:{kind:"type",text:"*",type:"any"}},{name:"args",type:{kind:"type",text:"*",type:"any"}}],parameters:[{name:"{...$args}",type:{kind:"type",text:"*",type:"any"}},{name:"context",type:{kind:"type",text:"*",type:"any"}},{name:"args",type:{kind:"type",text:"*",type:"any"}}]}],refs:[]};var ce;(ce=module==null?void 0:module.hot)!=null&&ce.decline&&module.hot.decline();function Ge(n){let e,o,t;var s=n[0];function r(i,c){return{}}return s&&(e=D(s,r())),{c(){e&&A(e.$$.fragment),o=Y()},m(i,c){e&&P(e,i,c),B(i,o,c),t=!0},p(i,[c]){if(c&1&&s!==(s=i[0])){if(e){U();const u=e;g(u.$$.fragment,1,0,()=>{G(u,1)}),q()}s?(e=D(s,r()),A(e.$$.fragment),p(e.$$.fragment,1),P(e,o.parentNode,o)):e=null}},i(i){t||(e&&p(e.$$.fragment,i),t=!0)},o(i){e&&g(e.$$.fragment,i),t=!1},d(i){i&&z(o),e&&G(e,i)}}}function Ke(n,e,o){let{Stories:t}=e,{repositories:s}=e;return we(s),n.$$set=r=>{"Stories"in r&&o(0,t=r.Stories),"repositories"in r&&o(1,s=r.repositories)},[t,s]}class ge extends T{constructor(e){super(),N(this,e,Ke,Ge,O,{Stories:0,repositories:1})}}ge.__docgen={version:3,name:"RegisterContext.svelte",data:[{visibility:"public",description:null,keywords:[],name:"Stories",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"repositories",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function Ye(n){let e,o,t;var s=n[0];function r(i,c){return{props:{}}}return s&&(e=D(s,r()),n[4](e)),{c(){e&&A(e.$$.fragment),o=Y()},m(i,c){e&&P(e,i,c),B(i,o,c),t=!0},p(i,[c]){if(c&1&&s!==(s=i[0])){if(e){U();const u=e;g(u.$$.fragment,1,0,()=>{G(u,1)}),q()}s?(e=D(s,r()),i[4](e),A(e.$$.fragment),p(e.$$.fragment,1),P(e,o.parentNode,o)):e=null}else if(s){const u={};e.$set(u)}},i(i){t||(e&&p(e.$$.fragment,i),t=!0)},o(i){e&&g(e.$$.fragment,i),t=!1},d(i){i&&z(o),n[4](null),e&&G(e,i)}}}function Be(n,e,o){let{Stories:t}=e,{args:s={}}=e,{storyContext:r={}}=e,i;ye(e);const c=Object.fromEntries(Object.entries(r.argTypes).filter(([a,d])=>d.action&&s[a]!=null).map(([a,d])=>[d.action,s[a]]));function u(a){Ce[a?"unshift":"push"](()=>{i=a,o(1,i)})}return n.$$set=a=>{o(6,e=w(w({},e),E(a))),"Stories"in a&&o(0,t=a.Stories),"args"in a&&o(2,s=a.args),"storyContext"in a&&o(3,r=a.storyContext)},n.$$.update=()=>{n.$$.dirty&12&&Oe(s,r),n.$$.dirty&2&&i&&Object.entries(c).forEach(([a,d])=>i.$on(a,d))},e=E(e),[t,i,s,r,u]}class be extends T{constructor(e){super(),N(this,e,Be,Ye,O,{Stories:0,args:2,storyContext:3})}}be.__docgen={version:3,name:"RenderContext.svelte",data:[{visibility:"public",description:null,keywords:[],name:"Stories",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"args",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{visibility:"public",description:null,keywords:[],name:"storyContext",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}}],computed:[],methods:[],components:[],description:"@component",keywords:[{name:"component",description:""},{name:"wrapper",description:""}],events:[],slots:[],refs:[]};const{logger:Ue}=__STORYBOOK_MODULE_CLIENT_LOGGER__;function qe(n){const e=n.split("").reduce((o,t)=>(o<<5)-o+t.charCodeAt(0)|0,0);return Math.abs(e).toString(16)}function ze({id:n,name:e},o=[]){if(n)return n;if(!e)throw new Error("Id or Name should be specified");let t=e.replace(/\W+(.|$)/g,(s,r)=>r.toUpperCase());return o.indexOf(t)>=0&&(Ue.warn(`Story name conflict with exports - Please add an explicit id for story ${e}`),t+=qe(e)),t}const{combineParameters:M}=__STORYBOOK_MODULE_CLIENT_API__,{logger:W}=__STORYBOOK_MODULE_CLIENT_LOGGER__,Ve=document.createDocumentFragment?()=>document.createDocumentFragment():()=>document.createElement("div"),Je=(n,{stories:e={},meta:o={},allocatedIds:t=[]},s=void 0)=>{var d,y,m;const r={meta:null,stories:[]};try{new ge({target:Ve(),props:{Stories:n,repositories:r}}).$destroy()}catch(l){W.error(`Error extracting stories ${l.toString()}`,l)}const i=s||r.meta;if(!i)return W.error("Missing module meta export or <Meta/> tag"),{};o.description&&!((m=(y=(d=i.parameters)==null?void 0:d.docs)==null?void 0:y.description)!=null&&m.component)&&(i.parameters=M(i.parameters,{docs:{description:{component:o.description}}}));const{component:c}=i,u=r.stories.filter(l=>l.isTemplate).map(l=>l.id),a=u.filter((l,b)=>u.indexOf(l)!==b);return a.length>0&&W.warn(`Found duplicates templates id for stories '${i.name}': ${a}`),{meta:i,stories:r.stories.filter(l=>!l.isTemplate).reduce((l,b)=>{const{id:V,name:h,template:k,component:f,source:j=!1,play:ee,...ke}=b,R=ze(b,t);if(!R)return l;const xe=k!=null&&u.indexOf(k)<0,_=(x,S)=>{if(xe)throw new Error(`Story ${h} is referencing an unknown template ${k}`);return{Component:be,props:{Stories:n,storyName:h,templateId:k,args:x,storyContext:S,sourceComponent:f||c}}};_.storyName=h,Object.entries(ke).forEach(([x,S])=>{_[x]=S}),ee&&(_.play=x=>{var te;const S=(te=x==null?void 0:x.playFunction)==null?void 0:te.__play;return S?S(x):ee(x)});const I=e[k?`tpl:${k}`:R],he=I?I.hasArgs:!0,X=I?I.source:null;X&&(_.parameters=M(_.parameters||{},{storySource:{source:X}}));let v;j===!0||j===!1&&!he?v=X:typeof j=="string"&&(v=j),v&&(_.parameters=M(_.parameters||{},{docs:{source:{code:v}}}));const F=e[R];return F!=null&&F.description&&(_.parameters=M(_.parameters||{},{docs:{description:{story:F.description}}})),l[R]=_,l},{})}};export{Te as M,Fe as S,Pe as T,Je as p};
@@ -0,0 +1,5 @@
1
+ import{S as P,i as Y,s as B,r as v,a as O,j as d,u as E,h as _,d as R,v as V,w as T,x as j,y as w,f as m,m as y,k as h,p as g,q as k,l as b}from"./index-Da9FSDFk.js";import{d as q}from"./index-DrFu-skq.js";function K(s){let e,n,i;const a=[s[2]];var o=s[1];function f(t,r){let l={};for(let c=0;c<a.length;c+=1)l=b(l,a[c]);return r!==void 0&&r&4&&(l=b(l,g(a,[k(t[2])]))),{props:l}}return o&&(e=w(o,f(s)),s[8](e)),{c(){e&&m(e.$$.fragment),n=v()},m(t,r){e&&y(e,t,r),O(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1])){if(e){T();const l=e;d(l.$$.fragment,1,0,()=>{h(l,1)}),E()}o?(e=w(o,f(t,r)),t[8](e),m(e.$$.fragment),_(e.$$.fragment,1),y(e,n.parentNode,n)):e=null}else if(o){const l=r&4?g(a,[k(t[2])]):{};e.$set(l)}},i(t){i||(e&&_(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&R(n),s[8](null),e&&h(e,t)}}}function W(s){let e,n,i;const a=[s[0].props];var o=s[0].Component;function f(t,r){let l={$$slots:{default:[z]},$$scope:{ctx:t}};for(let c=0;c<a.length;c+=1)l=b(l,a[c]);return r!==void 0&&r&1&&(l=b(l,g(a,[k(t[0].props)]))),{props:l}}return o&&(e=w(o,f(s)),s[7](e)),{c(){e&&m(e.$$.fragment),n=v()},m(t,r){e&&y(e,t,r),O(t,n,r),i=!0},p(t,r){if(r&1&&o!==(o=t[0].Component)){if(e){T();const l=e;d(l.$$.fragment,1,0,()=>{h(l,1)}),E()}o?(e=w(o,f(t,r)),t[7](e),m(e.$$.fragment),_(e.$$.fragment,1),y(e,n.parentNode,n)):e=null}else if(o){const l=r&1?g(a,[k(t[0].props)]):{};r&1038&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)}},i(t){i||(e&&_(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&R(n),s[7](null),e&&h(e,t)}}}function z(s){let e,n,i;const a=[s[2]];var o=s[1];function f(t,r){let l={};for(let c=0;c<a.length;c+=1)l=b(l,a[c]);return r!==void 0&&r&4&&(l=b(l,g(a,[k(t[2])]))),{props:l}}return o&&(e=w(o,f(s)),s[6](e)),{c(){e&&m(e.$$.fragment),n=v()},m(t,r){e&&y(e,t,r),O(t,n,r),i=!0},p(t,r){if(r&2&&o!==(o=t[1])){if(e){T();const l=e;d(l.$$.fragment,1,0,()=>{h(l,1)}),E()}o?(e=w(o,f(t,r)),t[6](e),m(e.$$.fragment),_(e.$$.fragment,1),y(e,n.parentNode,n)):e=null}else if(o){const l=r&4?g(a,[k(t[2])]):{};e.$set(l)}},i(t){i||(e&&_(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&R(n),s[6](null),e&&h(e,t)}}}function G(s){let e,n,i,a;const o=[W,K],f=[];function t(r,l){return r[0]?0:1}return e=t(s),n=f[e]=o[e](s),{c(){n.c(),i=v()},m(r,l){f[e].m(r,l),O(r,i,l),a=!0},p(r,[l]){let c=e;e=t(r),e===c?f[e].p(r,l):(T(),d(f[c],1,1,()=>{f[c]=null}),E(),n=f[e],n?n.p(r,l):(n=f[e]=o[e](r),n.c()),_(n,1),n.m(i.parentNode,i))},i(r){a||(_(n),a=!0)},o(r){d(n),a=!1},d(r){r&&R(i),f[e].d(r)}}}function H(s,e,n){let{decorator:i=void 0}=e,{Component:a}=e,{props:o={}}=e,{on:f=void 0}=e,t,r;function l(){return t||r}f&&Object.keys(f).forEach(p=>{V(()=>l().$on(p,f[p]))});function c(p){j[p?"unshift":"push"](()=>{t=p,n(3,t)})}function S(p){j[p?"unshift":"push"](()=>{r=p,n(4,r)})}function D(p){j[p?"unshift":"push"](()=>{t=p,n(3,t)})}return s.$$set=p=>{"decorator"in p&&n(0,i=p.decorator),"Component"in p&&n(1,a=p.Component),"props"in p&&n(2,o=p.props),"on"in p&&n(5,f=p.on)},[i,a,o,t,r,f,c,S,D]}class U extends P{constructor(e){super(),Y(this,e,H,G,B,{decorator:0,Component:1,props:2,on:5})}}U.__docgen={version:3,name:"SlotDecorator.svelte",data:[{visibility:"public",description:null,keywords:[],name:"decorator",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"Component",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"props",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{visibility:"public",description:null,keywords:[],name:"on",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function J(s){let e,n;return e=new U({props:{Component:s[0],props:s[1],on:{...s[3],...s[2]}}}),{c(){m(e.$$.fragment)},m(i,a){y(e,i,a),n=!0},p(i,[a]){const o={};a&1&&(o.Component=i[0]),a&2&&(o.props=i[1]),a&4&&(o.on={...i[3],...i[2]}),e.$set(o)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){d(e.$$.fragment,i),n=!1},d(i){h(e,i)}}}function Q(s,e,n){let{name:i}=e,{kind:a}=e,{storyFn:o}=e,{showError:f}=e,{storyContext:t}=e,{Component:r,props:l={},on:c}=o(),S=!0;function D(u){return S?(S=!1,{Component:r,props:l,on:c}):u()}const p=Object.fromEntries(Object.entries(t.argTypes).filter(([u,F])=>F.action&&l[u]!=null).map(([u,F])=>[F.action,l[u]]));return r||f({title:`Expecting a Svelte component from the story: "${i}" of "${a}".`,description:q`
2
+ Did you forget to return the Svelte component configuration from the story?
3
+ Use "() => ({ Component: YourComponent, props: {} })"
4
+ when defining the story.
5
+ `}),s.$$set=u=>{"name"in u&&n(4,i=u.name),"kind"in u&&n(5,a=u.kind),"storyFn"in u&&n(6,o=u.storyFn),"showError"in u&&n(7,f=u.showError),"storyContext"in u&&n(8,t=u.storyContext)},s.$$.update=()=>{s.$$.dirty&64&&n(0,{Component:r,props:l={},on:c}=D(o),r,(n(1,l),n(6,o)),(n(2,c),n(6,o)))},[r,l,c,p,i,a,o,f,t]}class L extends P{constructor(e){super(),Y(this,e,Q,J,B,{name:4,kind:5,storyFn:6,showError:7,storyContext:8})}}L.__docgen={version:3,name:"PreviewRender.svelte",data:[{visibility:"public",description:null,keywords:[],name:"name",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"kind",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"storyFn",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"showError",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{visibility:"public",description:null,keywords:[],name:"storyContext",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const{addons:X,sanitizeStoryContextUpdate:Z}=__STORYBOOK_MODULE_PREVIEW_API__,{RESET_STORY_ARGS:x}=__STORYBOOK_MODULE_CORE_EVENTS__;function A(s){return s&&typeof s=="object"&&"default"in s?s.default:s}function I(s,e,n){let i=A(e),a=n&&A(n),o;return!i||Object.keys(i).length===0?o={Component:s.component}:i.Component?o=i:o={Component:i},a?{Component:U,props:{...a,decorator:o}}:o}function te(s,e){return e.reduce((n,i)=>a=>{let o,f=i(t=>(o=n({...a,...Z(t)}),o),a);return o||(o=n(a)),f===o?o:I(a,f,o)},n=>I(n,s(n)))}var C=new Map;function N(s){C.has(s)&&(C.get(s).$destroy(),s.innerHTML="",C.delete(s))}var M=new Set;X.getChannel().on(x,({storyId:s})=>{M.add(s)});function ne({storyFn:s,kind:e,name:n,showMain:i,showError:a,storyContext:o,forceRemount:f},t){let r=C.get(t),l=f;if(M.has(o.id)&&(l=!0,M.delete(o.id)),l&&N(t),!r||l){let c=new L({target:t,props:{storyFn:s,storyContext:o,name:n,kind:e,showError:a}});C.set(t,c)}else r.$set({storyFn:s,storyContext:o,name:n,kind:e,showError:a});return i(),()=>{N(t)}}var oe=(s,e)=>{let{id:n,component:i}=e;if(!i)throw new Error(`Unable to render story ${n} as the component annotation is missing from the default export`);return{Component:i,props:s}},re={renderer:"svelte"};export{te as applyDecorators,re as parameters,oe as render,ne as renderToCanvas};
@@ -0,0 +1,7 @@
1
+ import{e as m,S as _,a as f}from"./index-C0DyA3Eb.js";import"./_commonjsHelpers-Cpj98o6Y.js";const{logger:E,deprecate:$}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{addons:S,useEffect:h}=__STORYBOOK_MODULE_PREVIEW_API__;function T(r,e){return e?e.find(n=>n.name===r)!=null:!1}var O=r=>{try{let e=r.__docgen;if(e)return A(e)}catch(e){E.log(`Error extracting argTypes: ${e}`)}return{}},A=r=>{let e={};return r.data&&r.data.forEach(n=>{var t,a;e[n.name]={control:w(n.type),name:n.name,description:n.description||void 0,type:{required:T("required",n.keywords||[]),name:(t=n.type)==null?void 0:t.text},table:{type:{summary:(a=n.type)==null?void 0:a.text},defaultValue:{summary:n.defaultValue},category:"properties"}}}),r.events&&r.events.forEach(n=>{e[`event_${n.name}`]={name:n.name,action:n.name,control:!1,...n.description?{description:n.description}:{},table:{category:"events"}}}),r.slots&&r.slots.forEach(n=>{var t;e[`slot_${n.name}`]={name:n.name,control:!1,description:[n.description,(t=n.params)==null?void 0:t.map(a=>`\`${a.name}\``).join(" ")].filter(a=>a).join(`
2
+
3
+ `),table:{category:"slots"}}}),e},w=r=>{if(!r)return null;if(r.kind==="type")switch(r.type){case"string":return{type:"text"};case"enum":return{type:"radio"};case"any":return{type:"object"};default:return{type:r.type}}else if(r.kind==="union"&&Array.isArray(r.type)&&!r.type.find(e=>e.type!=="string"))return{type:"radio",options:r.type.filter(e=>e.kind==="const").map(e=>e.value)};return null};function C(r){if(!r)return"";let{__docgen:e={}}=r;return e.description}var D=r=>{var t;let e=(t=r==null?void 0:r.parameters.docs)==null?void 0:t.source,n=r==null?void 0:r.parameters.__isArgsStory;return(e==null?void 0:e.type)===f.DYNAMIC?!1:!n||(e==null?void 0:e.code)||(e==null?void 0:e.type)===f.CODE};function v(r,e,n){if(e==null)return null;let t=n[r];return t&&t.defaultValue===e||t&&t.action?null:e===!0?r:typeof e=="string"?`${r}=${JSON.stringify(e)}`:typeof e=="function"?`${r}={<handler>}`:`${r}={${JSON.stringify(e)}}`}function N(r){if(r==null)return null;let{__docgen:e={}}=r,{name:n}=e;return n?(n.endsWith(".svelte")&&(n=n.substring(0,n.length-7)),n):r.name}function R(r,e,n,t){let a=N(r);if(!a)return null;let s=Object.entries(e).filter(([o])=>o!==t).map(([o,d])=>v(o,d,n)).filter(o=>o),p=s.join(" "),l=p.length>50,u=t?e[t]:null,i=l?`<${a}
4
+ ${s.join(`
5
+ `)}`:`<${a} ${p}`;return u?`${i}>
6
+ ${u}
7
+ </${a}>`:`${i}/>`}function b(r){var n,t,a;let{__docgen:e}=r||{};return e?(n=e.keywords)!=null&&n.find(s=>s.name==="wrapper")?{wrapper:!0,slotProperty:(a=(t=e.data)==null?void 0:t.find(s=>s.keywords.find(p=>p.name==="slot")))==null?void 0:a.name}:{wrapper:!1}:{wrapper:!1}}var j=(r,e)=>{let n=S.getChannel(),t=D(e),a=r(),s;if(h(()=>{if(!t&&s){let{id:y,unmappedArgs:g}=e;n.emit(_,{id:y,args:g,source:s})}}),t)return a;let{parameters:p={},args:l={},component:u}=e||{},{Component:i}=e.originalStoryFn(l,e),{wrapper:o,slotProperty:d}=b(i);o&&(p.component&&$("parameters.component is deprecated. Using context.component instead."),i=u);let c=R(i,l,e==null?void 0:e.argTypes,d);return c&&(s=c),a},L={docs:{story:{inline:!0},extractArgTypes:O,extractComponentDescription:C}},k=[j],K=[m];export{K as argTypesEnhancers,k as decorators,L as parameters};