@stacksjs/stx 0.2.819 → 0.2.821

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 (212) hide show
  1. package/dist/{chunk-nsxjt6h3.js → chunk-06hc6rs6.js} +1 -1
  2. package/dist/{chunk-skht06a2.js → chunk-076fj387.js} +1 -1
  3. package/dist/{chunk-p7hy0seh.js → chunk-079g8e4w.js} +1 -1
  4. package/dist/chunk-09285y4b.js +2 -0
  5. package/dist/{chunk-v041eh5f.js → chunk-0dvgrqt8.js} +3 -3
  6. package/dist/chunk-0dzmw98y.js +2 -0
  7. package/dist/{chunk-g7mjv276.js → chunk-1f7d1c0y.js} +2 -2
  8. package/dist/chunk-22ekceg9.js +2 -0
  9. package/dist/{chunk-ax16vnn5.js → chunk-242qc25m.js} +6 -6
  10. package/dist/{chunk-4gg9594a.js → chunk-2b8pyef0.js} +5 -5
  11. package/dist/{chunk-sjd6rt97.js → chunk-2c6qbvne.js} +4 -4
  12. package/dist/{chunk-fmawgk87.js → chunk-2nj9aewf.js} +1 -1
  13. package/dist/{chunk-m7hfcxt3.js → chunk-2vqpz4qv.js} +2 -2
  14. package/dist/{chunk-dq9djbgq.js → chunk-30rpspzt.js} +4 -4
  15. package/dist/{chunk-1hg0zb3p.js → chunk-3axb6t08.js} +2 -2
  16. package/dist/chunk-3bf48zrh.js +2 -0
  17. package/dist/chunk-3dnkp861.js +2 -0
  18. package/dist/chunk-3rkh5etz.js +2 -0
  19. package/dist/chunk-3xc2bg6x.js +2 -0
  20. package/dist/{chunk-mr2ke5km.js → chunk-3yh6y00f.js} +6 -6
  21. package/dist/chunk-4ff1hdsh.js +2 -0
  22. package/dist/{chunk-1a8qtvs1.js → chunk-4mj9dem1.js} +2 -2
  23. package/dist/{chunk-p3dc6rg2.js → chunk-4wjsfq4s.js} +6 -6
  24. package/dist/{chunk-s6mte5vy.js → chunk-5v1gp0g1.js} +8 -5
  25. package/dist/{chunk-vmxzktdr.js → chunk-67kbsav0.js} +1 -1
  26. package/dist/chunk-6h1qa3hw.js +2 -0
  27. package/dist/{chunk-xc7nynb9.js → chunk-6qvn1h09.js} +3 -3
  28. package/dist/{chunk-e758jz81.js → chunk-73h35m0a.js} +6 -6
  29. package/dist/{chunk-k3t72x38.js → chunk-76eh43e9.js} +2 -2
  30. package/dist/chunk-7pz76f28.js +2 -0
  31. package/dist/{chunk-6s9bk98p.js → chunk-7yb82rm6.js} +2 -2
  32. package/dist/chunk-817rcghe.js +2 -0
  33. package/dist/chunk-856zaqcm.js +2 -0
  34. package/dist/{chunk-e4d0jgcw.js → chunk-8724whyk.js} +6 -6
  35. package/dist/{chunk-72jt897s.js → chunk-8ttmzcxb.js} +12 -12
  36. package/dist/{chunk-035m9ada.js → chunk-8w9spdbn.js} +4 -4
  37. package/dist/chunk-966f94qx.js +2 -0
  38. package/dist/{chunk-e3t2bqyf.js → chunk-9gmceny5.js} +5 -5
  39. package/dist/chunk-9gpdkqzn.js +2 -0
  40. package/dist/{chunk-brbqz5he.js → chunk-9wab73nn.js} +13 -13
  41. package/dist/{chunk-rccv14mn.js → chunk-a6tajb47.js} +5 -5
  42. package/dist/chunk-a8fy7jv8.js +2 -0
  43. package/dist/chunk-adsyh38d.js +2 -0
  44. package/dist/{chunk-4fbg7gq8.js → chunk-akj26p4b.js} +2 -2
  45. package/dist/chunk-b22yj5j5.js +2 -0
  46. package/dist/{chunk-b9d70mgr.js → chunk-b4x5ndt9.js} +3 -3
  47. package/dist/{chunk-zhvmcj78.js → chunk-bfbh0hfn.js} +5 -5
  48. package/dist/{chunk-0rjcbqk3.js → chunk-brhas9mp.js} +2 -2
  49. package/dist/{chunk-1tzqqr0p.js → chunk-bt0amey5.js} +2 -2
  50. package/dist/{chunk-1rvgv1fr.js → chunk-btxnrqxf.js} +5 -5
  51. package/dist/{chunk-93f6kwht.js → chunk-c0gj3pty.js} +2 -2
  52. package/dist/chunk-c1e45rtv.js +2 -0
  53. package/dist/{chunk-cbt1dchd.js → chunk-ctygc783.js} +4 -4
  54. package/dist/{chunk-4jaet63w.js → chunk-cveanyb3.js} +2 -2
  55. package/dist/{chunk-tj6zvs8f.js → chunk-cxz4cdcn.js} +2 -2
  56. package/dist/{chunk-m7kct2sg.js → chunk-d457yx0w.js} +4 -4
  57. package/dist/{chunk-mbhvf0sv.js → chunk-d6d2s7n6.js} +2 -2
  58. package/dist/chunk-dpndrajq.js +2 -0
  59. package/dist/{chunk-gcje06er.js → chunk-e4jwhmpb.js} +30 -30
  60. package/dist/{chunk-x46hqa74.js → chunk-enhys344.js} +4 -4
  61. package/dist/{chunk-mjg9cx5a.js → chunk-f0txsdpa.js} +3 -3
  62. package/dist/chunk-fb41ty71.js +2 -0
  63. package/dist/{chunk-bnewgd23.js → chunk-fqxcs1h1.js} +2 -2
  64. package/dist/chunk-g8nqmnb7.js +2 -0
  65. package/dist/{chunk-hwcfgs3e.js → chunk-gjf8cjdt.js} +3 -3
  66. package/dist/{chunk-ek5ynvqh.js → chunk-gxg4vvws.js} +1 -1
  67. package/dist/chunk-h67pm636.js +2 -0
  68. package/dist/chunk-hb8jxg45.js +2 -0
  69. package/dist/chunk-hfgzqapw.js +2 -0
  70. package/dist/chunk-hzrdtg2s.js +2 -0
  71. package/dist/chunk-j0hrk24j.js +2 -0
  72. package/dist/{chunk-k3zcadcc.js → chunk-j737tnvt.js} +4 -4
  73. package/dist/chunk-jjbdtj4w.js +2 -0
  74. package/dist/chunk-jyz2g48d.js +2 -0
  75. package/dist/{chunk-nqdh7z2d.js → chunk-jzgyrxye.js} +1 -1
  76. package/dist/chunk-k0xdvegc.js +2 -0
  77. package/dist/{chunk-9gwhs0gk.js → chunk-k81trehg.js} +2 -2
  78. package/dist/{chunk-7c5b0th8.js → chunk-k90sf0w8.js} +10 -10
  79. package/dist/chunk-k9g43d24.js +3 -0
  80. package/dist/chunk-khcb6pm1.js +2 -0
  81. package/dist/chunk-kqgpd3ee.js +2 -0
  82. package/dist/chunk-kqq896j6.js +2 -0
  83. package/dist/chunk-ktna9keb.js +2 -0
  84. package/dist/chunk-m934bzg2.js +2 -0
  85. package/dist/chunk-matr6j2d.js +2 -0
  86. package/dist/{chunk-znx5m1jv.js → chunk-me6kgvsm.js} +1 -1
  87. package/dist/chunk-mmeck545.js +2 -0
  88. package/dist/{chunk-s9b6abkb.js → chunk-mwxbdpb1.js} +2 -2
  89. package/dist/chunk-mz6qjee1.js +2 -0
  90. package/dist/{chunk-baj6w8ja.js → chunk-n7arptzc.js} +2 -2
  91. package/dist/{chunk-he8rmsdq.js → chunk-nfxgpjhk.js} +12 -12
  92. package/dist/{chunk-xka9fdye.js → chunk-npdmeesx.js} +2 -2
  93. package/dist/chunk-nxfkkmxy.js +2 -0
  94. package/dist/{chunk-1ae3megp.js → chunk-p1fpferp.js} +6 -6
  95. package/dist/{chunk-vhzngsmd.js → chunk-p1jzpgej.js} +79 -79
  96. package/dist/chunk-pmk33n5r.js +2 -0
  97. package/dist/{chunk-1p3vmy65.js → chunk-pp7ehbxj.js} +4 -4
  98. package/dist/chunk-prt4ntb0.js +2 -0
  99. package/dist/{chunk-sxad7x2s.js → chunk-pvj0bpqg.js} +4 -4
  100. package/dist/chunk-pvrew37s.js +2 -0
  101. package/dist/chunk-q5bct2ks.js +2 -0
  102. package/dist/{chunk-rpen41w3.js → chunk-q7zwv88b.js} +2 -2
  103. package/dist/{chunk-jgj16jmg.js → chunk-qdea9cew.js} +2 -2
  104. package/dist/{chunk-gtd6qs1r.js → chunk-qj4r08jb.js} +2 -2
  105. package/dist/{chunk-sh1hbhhb.js → chunk-qz3fdmrc.js} +3 -3
  106. package/dist/{chunk-m9dyqae7.js → chunk-r29repjv.js} +5 -5
  107. package/dist/chunk-r2hjn9ds.js +2 -0
  108. package/dist/{chunk-ngh1aeff.js → chunk-rvdsbthd.js} +4 -4
  109. package/dist/{chunk-j476jghg.js → chunk-rx59bmnb.js} +1 -1
  110. package/dist/chunk-s2zsa16d.js +2 -0
  111. package/dist/chunk-sddp2398.js +2 -0
  112. package/dist/chunk-sv4emtcj.js +2 -0
  113. package/dist/{chunk-gahpv8ce.js → chunk-t4ndn1kf.js} +2 -2
  114. package/dist/chunk-tcyvwy8p.js +2 -0
  115. package/dist/{chunk-jdddw8en.js → chunk-te2c0qpt.js} +2 -2
  116. package/dist/chunk-tg18j1yf.js +2 -0
  117. package/dist/chunk-tj7dh2dz.js +2 -0
  118. package/dist/{chunk-j8r0am39.js → chunk-tksjakyv.js} +1 -1
  119. package/dist/chunk-vafxrky2.js +2 -0
  120. package/dist/chunk-vxxcn14a.js +2 -0
  121. package/dist/{chunk-6n11z33h.js → chunk-vzbyn4nh.js} +5 -5
  122. package/dist/chunk-w6nkp7b7.js +2 -0
  123. package/dist/{chunk-f6nk205v.js → chunk-wceg59n0.js} +1 -1
  124. package/dist/{chunk-3dg2zg8d.js → chunk-wers7czp.js} +3 -3
  125. package/dist/{chunk-t2sg2tp2.js → chunk-wf0n9gpj.js} +4 -4
  126. package/dist/chunk-wpam70s6.js +2 -0
  127. package/dist/{chunk-c5vzr1va.js → chunk-wpendr22.js} +2 -2
  128. package/dist/{chunk-427mhgje.js → chunk-wy0gghvh.js} +1 -1
  129. package/dist/chunk-wysfprwt.js +42 -0
  130. package/dist/chunk-x30gh7vt.js +2 -0
  131. package/dist/{chunk-6a0ekt1n.js → chunk-xe1qxxhs.js} +3 -3
  132. package/dist/{chunk-em2yy1te.js → chunk-xpy9yjyx.js} +6 -6
  133. package/dist/{chunk-9egd7tx3.js → chunk-y8p85kcj.js} +2 -2
  134. package/dist/{chunk-7xs45trj.js → chunk-y9bj3566.js} +2 -2
  135. package/dist/{chunk-0s93s6ep.js → chunk-ygwgegyb.js} +3 -3
  136. package/dist/chunk-ytrg9ghh.js +2 -0
  137. package/dist/chunk-z09sgx0d.js +2 -0
  138. package/dist/{chunk-8dmey36n.js → chunk-z23arg8m.js} +2 -2
  139. package/dist/{chunk-jw7cakxt.js → chunk-z3s9rvyh.js} +9 -9
  140. package/dist/{chunk-12sd0ep5.js → chunk-zk88r1yh.js} +15 -15
  141. package/dist/chunk-zn378280.js +2 -0
  142. package/dist/chunk-zvwenqn3.js +2 -0
  143. package/dist/cli.js +19 -19
  144. package/dist/client/signals-dom-ready-runtime.js +4 -1
  145. package/dist/craft-entry.js +2 -2
  146. package/dist/craft.js +2 -2
  147. package/dist/html-masking.d.ts +10 -0
  148. package/dist/html-masking.js +50 -0
  149. package/dist/pwa.js +3 -3
  150. package/dist/server-bindings.js +28 -30
  151. package/dist/ssg.js +4 -4
  152. package/package.json +5 -5
  153. package/dist/chunk-03mtfndv.js +0 -2
  154. package/dist/chunk-0633xsmx.js +0 -2
  155. package/dist/chunk-0wrmcexg.js +0 -2
  156. package/dist/chunk-18qxd18d.js +0 -2
  157. package/dist/chunk-1cd0w20k.js +0 -2
  158. package/dist/chunk-2k3ga51z.js +0 -2
  159. package/dist/chunk-54kn2jtw.js +0 -2
  160. package/dist/chunk-54mc7876.js +0 -2
  161. package/dist/chunk-6e76tz09.js +0 -2
  162. package/dist/chunk-72w08sh9.js +0 -2
  163. package/dist/chunk-7p7hdn42.js +0 -2
  164. package/dist/chunk-88mhhbqj.js +0 -2
  165. package/dist/chunk-9736003n.js +0 -2
  166. package/dist/chunk-9b52cnzm.js +0 -2
  167. package/dist/chunk-9bhvh2dc.js +0 -2
  168. package/dist/chunk-9y1dm510.js +0 -2
  169. package/dist/chunk-a4yzet7p.js +0 -2
  170. package/dist/chunk-abzrvxct.js +0 -2
  171. package/dist/chunk-avbvedyx.js +0 -2
  172. package/dist/chunk-cvq4bz8y.js +0 -2
  173. package/dist/chunk-d7p5jr31.js +0 -2
  174. package/dist/chunk-dh1f8ga0.js +0 -2
  175. package/dist/chunk-dzp2a775.js +0 -2
  176. package/dist/chunk-f86ehf7n.js +0 -2
  177. package/dist/chunk-fn2cqvb1.js +0 -2
  178. package/dist/chunk-fzj3e3zk.js +0 -2
  179. package/dist/chunk-gsc617cx.js +0 -2
  180. package/dist/chunk-h8kbcz9t.js +0 -2
  181. package/dist/chunk-hx575xy8.js +0 -2
  182. package/dist/chunk-j58z3y2g.js +0 -2
  183. package/dist/chunk-j5t40n2g.js +0 -2
  184. package/dist/chunk-jcz6rd9n.js +0 -2
  185. package/dist/chunk-k5nd8zqh.js +0 -2
  186. package/dist/chunk-kz6qw9fm.js +0 -42
  187. package/dist/chunk-m5cdkb11.js +0 -2
  188. package/dist/chunk-mcgqgheq.js +0 -2
  189. package/dist/chunk-mz1mgfq3.js +0 -3
  190. package/dist/chunk-n1tbc7da.js +0 -2
  191. package/dist/chunk-n7dm6prj.js +0 -2
  192. package/dist/chunk-nknpr8cy.js +0 -2
  193. package/dist/chunk-nqn4dvqd.js +0 -2
  194. package/dist/chunk-nt5dh56c.js +0 -2
  195. package/dist/chunk-p04dabqm.js +0 -2
  196. package/dist/chunk-pe89ztq6.js +0 -2
  197. package/dist/chunk-pe9npaby.js +0 -2
  198. package/dist/chunk-pmq2pdr9.js +0 -2
  199. package/dist/chunk-r2v042ym.js +0 -2
  200. package/dist/chunk-r3zmbpv2.js +0 -2
  201. package/dist/chunk-r57s8jqs.js +0 -2
  202. package/dist/chunk-rjzp7za8.js +0 -2
  203. package/dist/chunk-sata7rh2.js +0 -2
  204. package/dist/chunk-tsb5h4e2.js +0 -2
  205. package/dist/chunk-v7h8vd9n.js +0 -2
  206. package/dist/chunk-v8h2kns0.js +0 -2
  207. package/dist/chunk-vvcfrsjg.js +0 -2
  208. package/dist/chunk-vyw40ym7.js +0 -2
  209. package/dist/chunk-whq40bdm.js +0 -2
  210. package/dist/chunk-xsck49x5.js +0 -2
  211. package/dist/chunk-z0c35c5c.js +0 -2
  212. package/dist/chunk-zwp7n01x.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{lt,ut,dt}from"./chunk-7qk4exw1.js";import{Vt,Ut,ct,Wi,Wt,qt}from"./chunk-rpen41w3.js";import o from"fs";import i from"path";var c=[];function m(a){c=[];for(let e of a.storyFiles)if(c.push({text:e.fileName.toLowerCase(),original:e.fileName,type:"story",storyId:e.id}),c.push({text:e.relativePath.toLowerCase(),original:e.relativePath,type:"story",storyId:e.id}),e.story)for(let t of e.story.variants)c.push({text:t.title.toLowerCase(),original:t.title,type:"story",storyId:e.id,variantId:t.id})}function f(){return JSON.stringify(c)}async function F(a={}){let e=Date.now();Vt();let t=await lt({mode:"build"});if(!t.config.enabled){ct("Story feature is disabled in config.");return}let n=await Wt(t);ut(t,n);let l=qt(t.config,n);dt(t,l),Ut(n.length);let d=a.outDir??t.config.outDir,s=i.resolve(t.root,d);await o.promises.mkdir(s,{recursive:!0}),console.log(` Building to ${d}...`);let g=v(t);await o.promises.writeFile(i.join(s,"index.html"),g);let y={files:n.map((r)=>({id:r.id,fileName:r.fileName,relativePath:r.relativePath,treePath:r.treePath})),tree:l};await o.promises.writeFile(i.join(s,"stories.json"),JSON.stringify(y,null,2));let u={theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets};await o.promises.writeFile(i.join(s,"config.json"),JSON.stringify(u,null,2));let p=i.join(s,"stories");await o.promises.mkdir(p,{recursive:!0});for(let r of n){let b=await o.promises.readFile(r.path,"utf-8");await o.promises.writeFile(i.join(p,`${r.id}.stx`),b)}m(t);let h=f();await o.promises.writeFile(i.join(s,"search-index.json"),h);let x=Date.now()-e;Wi(n.length,d,x)}function v(a){let{theme:e}=a.config,t=e.title||"STX Story";return`<!DOCTYPE html>
2
+ import{lt,ut,dt}from"./chunk-7qk4exw1.js";import{Vt,Ut,ct,qi,Wt,qt}from"./chunk-q7zwv88b.js";import o from"fs";import i from"path";var c=[];function m(a){c=[];for(let e of a.storyFiles)if(c.push({text:e.fileName.toLowerCase(),original:e.fileName,type:"story",storyId:e.id}),c.push({text:e.relativePath.toLowerCase(),original:e.relativePath,type:"story",storyId:e.id}),e.story)for(let t of e.story.variants)c.push({text:t.title.toLowerCase(),original:t.title,type:"story",storyId:e.id,variantId:t.id})}function f(){return JSON.stringify(c)}async function F(a={}){let e=Date.now();Vt();let t=await lt({mode:"build"});if(!t.config.enabled){ct("Story feature is disabled in config.");return}let n=await Wt(t);ut(t,n);let l=qt(t.config,n);dt(t,l),Ut(n.length);let d=a.outDir??t.config.outDir,s=i.resolve(t.root,d);await o.promises.mkdir(s,{recursive:!0}),console.log(` Building to ${d}...`);let g=v(t);await o.promises.writeFile(i.join(s,"index.html"),g);let y={files:n.map((r)=>({id:r.id,fileName:r.fileName,relativePath:r.relativePath,treePath:r.treePath})),tree:l};await o.promises.writeFile(i.join(s,"stories.json"),JSON.stringify(y,null,2));let u={theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets};await o.promises.writeFile(i.join(s,"config.json"),JSON.stringify(u,null,2));let p=i.join(s,"stories");await o.promises.mkdir(p,{recursive:!0});for(let r of n){let b=await o.promises.readFile(r.path,"utf-8");await o.promises.writeFile(i.join(p,`${r.id}.stx`),b)}m(t);let h=f();await o.promises.writeFile(i.join(s,"search-index.json"),h);let x=Date.now()-e;qi(n.length,d,x)}function v(a){let{theme:e}=a.config,t=e.title||"STX Story";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Br}from"./chunk-k3t72x38.js";import{existsSync as m,statSync as x}from"fs";import s from"path";var g=new Map;function M(r){let n=s.extname(r);if(n===".tsx")return"tsx";if(n===".jsx")return"jsx";if(n===".ts"||n===".mts"||n===".cts")return"ts";return"js"}async function j(r,n){let l=Object.entries(n).map(([e,t])=>[s.resolve(r,e),s.resolve(r,t)]),d=l.map(([e,t])=>{try{return`${e}\x00${t}\x00${x(t).mtimeMs}`}catch{return`${e}\x00${t}\x00-`}}).join(`
2
+ import{Br}from"./chunk-76eh43e9.js";import{existsSync as m,statSync as x}from"fs";import s from"path";var g=new Map;function M(r){let n=s.extname(r);if(n===".tsx")return"tsx";if(n===".jsx")return"jsx";if(n===".ts"||n===".mts"||n===".cts")return"ts";return"js"}async function j(r,n){let l=Object.entries(n).map(([e,t])=>[s.resolve(r,e),s.resolve(r,t)]),d=l.map(([e,t])=>{try{return`${e}\x00${t}\x00${x(t).mtimeMs}`}catch{return`${e}\x00${t}\x00-`}}).join(`
3
3
  `),f=`${r}\x00${JSON.stringify(n)}`,o=g.get(f);if(o&&o.signature===d)return o.standIns;let a=new Map;for(let[e,t]of l){let c=s.relative(r,e);if(!m(e))throw Error(`webModules: ${c} does not exist`);if(!m(t))throw Error(`webModules: ${s.relative(r,t)}, the stand-in for ${c}, does not exist`);if(e===t)throw Error(`webModules: ${c} stands in for itself`);let p=await Bun.file(t).text(),u=new Bun.Transpiler({loader:M(t),target:"browser"});if(s.dirname(t)!==s.dirname(e)){let i=u.scanImports(p).find((h)=>/^\.\.?\//.test(h.path));if(i)throw Error(`webModules: ${s.relative(r,t)} imports ${i.path}, which would resolve from ${s.relative(r,s.dirname(e))||"."}; a stand-in imports relatively only from the directory of the module it replaces`)}let w=u.transformSync(p);for(let i of Br(e))a.set(i,w)}return g.set(f,{signature:d,standIns:a}),a}export{j as loadWebModules};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import"./chunk-72jt897s.js";import"./chunk-1tzqqr0p.js";import"./chunk-r9e0r6jx.js";import"./chunk-vhzngsmd.js";import"./chunk-m7hfcxt3.js";import"./chunk-bnewgd23.js";import"./chunk-9gwhs0gk.js";import"./chunk-3dg2zg8d.js";import{c}from"./chunk-0rjcbqk3.js";import u from"fs";import l from"path";async function d(e,t={}){let s=Date.now(),n={total:0,passed:0,failed:0,new:0,failures:[],duration:0},i=t.snapshotDir||c(e.root,"story","snapshots");await u.promises.mkdir(i,{recursive:!0});let r=e.storyFiles;if(t.filter&&t.filter.length>0)r=r.filter((a)=>t.filter.some((o)=>a.fileName.toLowerCase().includes(o.toLowerCase())));for(let a of r)await h(a,i,t,n);return n.duration=Date.now()-s,n}async function h(e,t,s,n){let i=e.story;if(!i)return;for(let r of i.variants){n.total++;let a=l.join(t,`${e.id}-${r.id}.snap`),o=g(r.source||""),f=await w(a);if(s.update||!f){let p={storyId:e.id,variantId:r.id,component:e.fileName,timestamp:Date.now(),hash:o};if(await u.promises.writeFile(a,JSON.stringify(p,null,2)),!f)n.new++;n.passed++}else try{let p=await u.promises.readFile(a,"utf-8"),m=JSON.parse(p);if(m.hash===o)n.passed++;else n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:"Snapshot mismatch",difference:y(m.hash,o)})}catch(p){n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:`Error reading snapshot: ${p}`})}}}async function x(e,t={}){return(await d(e,{...t,update:!0})).total}function g(e){let t=0;for(let s=0;s<e.length;s++){let n=e.charCodeAt(s);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function y(e,t){if(e===t)return 0;let s=Math.abs(Number.parseInt(e,16)-Number.parseInt(t,16));return Math.min(s/1e6,1)}async function w(e){try{return await u.promises.access(e),!0}catch{return!1}}function F(e){let t=[];if(t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(" STX Story Visual Regression Tests"),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),e.failures.length>0){t.push(" \u274C Failures:"),t.push("");for(let s of e.failures){if(t.push(` \u2022 ${s.component} / ${s.variantId}`),t.push(` ${s.message}`),s.difference!==void 0)t.push(` Difference: ${(s.difference*100).toFixed(2)}%`);t.push("")}}if(t.push(" Summary:"),t.push(` Total: ${e.total}`),t.push(` Passed: ${e.passed} \u2713`),t.push(` Failed: ${e.failed} \u2717`),e.new>0)t.push(` New: ${e.new} \u26A1`);return t.push(` Time: ${e.duration}ms`),t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),t.join(`
2
+ import"./chunk-8ttmzcxb.js";import"./chunk-bt0amey5.js";import"./chunk-r9e0r6jx.js";import"./chunk-p1jzpgej.js";import"./chunk-2vqpz4qv.js";import"./chunk-fqxcs1h1.js";import"./chunk-k81trehg.js";import"./chunk-wers7czp.js";import{c}from"./chunk-brhas9mp.js";import u from"fs";import l from"path";async function d(e,t={}){let s=Date.now(),n={total:0,passed:0,failed:0,new:0,failures:[],duration:0},i=t.snapshotDir||c(e.root,"story","snapshots");await u.promises.mkdir(i,{recursive:!0});let r=e.storyFiles;if(t.filter&&t.filter.length>0)r=r.filter((a)=>t.filter.some((o)=>a.fileName.toLowerCase().includes(o.toLowerCase())));for(let a of r)await h(a,i,t,n);return n.duration=Date.now()-s,n}async function h(e,t,s,n){let i=e.story;if(!i)return;for(let r of i.variants){n.total++;let a=l.join(t,`${e.id}-${r.id}.snap`),o=g(r.source||""),f=await w(a);if(s.update||!f){let p={storyId:e.id,variantId:r.id,component:e.fileName,timestamp:Date.now(),hash:o};if(await u.promises.writeFile(a,JSON.stringify(p,null,2)),!f)n.new++;n.passed++}else try{let p=await u.promises.readFile(a,"utf-8"),m=JSON.parse(p);if(m.hash===o)n.passed++;else n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:"Snapshot mismatch",difference:y(m.hash,o)})}catch(p){n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:`Error reading snapshot: ${p}`})}}}async function x(e,t={}){return(await d(e,{...t,update:!0})).total}function g(e){let t=0;for(let s=0;s<e.length;s++){let n=e.charCodeAt(s);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function y(e,t){if(e===t)return 0;let s=Math.abs(Number.parseInt(e,16)-Number.parseInt(t,16));return Math.min(s/1e6,1)}async function w(e){try{return await u.promises.access(e),!0}catch{return!1}}function F(e){let t=[];if(t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(" STX Story Visual Regression Tests"),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),e.failures.length>0){t.push(" \u274C Failures:"),t.push("");for(let s of e.failures){if(t.push(` \u2022 ${s.component} / ${s.variantId}`),t.push(` ${s.message}`),s.difference!==void 0)t.push(` Difference: ${(s.difference*100).toFixed(2)}%`);t.push("")}}if(t.push(" Summary:"),t.push(` Total: ${e.total}`),t.push(` Passed: ${e.passed} \u2713`),t.push(` Failed: ${e.failed} \u2717`),e.new>0)t.push(` New: ${e.new} \u26A1`);return t.push(` Time: ${e.duration}ms`),t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),t.join(`
3
3
  `)}export{F as formatTestResults,d as runVisualTests,x as updateSnapshots};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{So,va,xa,bh}from"./chunk-6qvn1h09.js";export{So as NATIVE_COMPONENTS,va as compileToNative,xa as createHotReloadServer,bh as default};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{_}from"./chunk-vhzngsmd.js";import{le}from"./chunk-9egd7tx3.js";function g(e,t){let r={};for(let n of e)r[n]=le(t(n));return new Proxy({},{get:(n,a)=>r[a]?.(),set:(n,a,o)=>{if(r[a])r[a].set(o);else r[a]=le(o);return!0},has:(n,a)=>(a in r),deleteProperty:(n,a)=>(delete r[a],!0),ownKeys:()=>Reflect.ownKeys(r),getOwnPropertyDescriptor:(n,a)=>(a in r)?{enumerable:!0,configurable:!0,writable:!0,value:r[a]()}:void 0})}function v(e,t){let r={};for(let n of t)r[n]=e[n];return r}function ya(e,t){let r=Object.keys(e),n=g(r,(i)=>t?.[i]??e[i].getDefaultValue()),a=g(r,()=>[]),o=g(r,()=>!1),c=g(r,()=>!1),f=g(r,()=>!1),s=le(!1);async function u(i){f[i]=!0;let d=await e[i].validate(n[i],n);return a[i]=d,f[i]=!1,d.length===0}async function l(){s.set(!0);let i=await Promise.all(r.map(u));return s.set(!1),i.every(Boolean)}function m(){for(let i of r)n[i]=t?.[i]??e[i].getDefaultValue(),a[i]=[],o[i]=!1,c[i]=!1}function h(i){for(let d of r)if(d in i)n[d]=i[d],c[d]=!0}function b(i,d){n[i]=d,c[i]=!0}function y(i,d=!0){if(o[i]=d,d)u(i)}function p(i){return{value:n[i],errors:a[i],touched:o[i],dirty:c[i],valid:a[i].length===0,validating:f[i]}}function V(i){return async(d)=>{d?.preventDefault?.();for(let w of r)o[w]=!0;if(await l())await i(v(n,r))}}return{values:n,errors:a,touched:o,dirty:c,get isValid(){return r.every((i)=>a[i].length===0)},get isValidating(){return s()||r.some((i)=>f[i])},get isDirty(){return r.some((i)=>c[i])},validate:l,validateField:u,reset:m,setValues:h,setFieldValue:b,setFieldTouched:y,getFieldState:p,handleSubmit:V}}var iu=ya;class Fn{rules=[];defaultValue="";addRule(e){let t=new Fn;return t.rules=[...this.rules,e],t.defaultValue=this.defaultValue,t}required(e="This field is required"){return this.addRule({name:"required",message:e,validate:(t)=>{if(t===null||t===void 0)return e;if(typeof t==="string"&&t.trim()==="")return e;if(Array.isArray(t)&&t.length===0)return e;return!0}})}email(e="Please enter a valid email"){return this.addRule({name:"email",message:e,validate:(t)=>{if(!t)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))||e}})}url(e="Please enter a valid URL"){return this.addRule({name:"url",message:e,validate:(t)=>{if(!t)return!0;try{return new URL(String(t)),!0}catch{return e}}})}min(e,t){let r=t||`Must be at least ${e} characters`;return this.addRule({name:"min",message:r,validate:(n)=>{if(!n)return!0;return String(n).length>=e||r}})}max(e,t){let r=t||`Must be no more than ${e} characters`;return this.addRule({name:"max",message:r,validate:(n)=>{if(!n)return!0;return String(n).length<=e||r}})}length(e,t,r){let n=r||`Must be between ${e} and ${t} characters`;return this.addRule({name:"length",message:n,validate:(a)=>{if(!a)return!0;let o=String(a).length;return o>=e&&o<=t||n}})}pattern(e,t="Invalid format"){return this.addRule({name:"pattern",message:t,validate:(r)=>{if(!r)return!0;return e.test(String(r))||t}})}hasUppercase(e="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,e)}hasLowercase(e="Must contain a lowercase letter"){return this.pattern(/[a-z]/,e)}hasNumber(e="Must contain a number"){return this.pattern(/\d/,e)}hasSpecial(e="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,e)}alphanumeric(e="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,e)}startsWithLetter(e="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,e)}noSpaces(e="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:e,validate:(t)=>{if(!t)return!0;return!String(t).includes(" ")||e}})}number(e="Must be a number"){let t=this.addRule({name:"number",message:e,validate:(r)=>{if(!r&&r!==0)return!0;return!Number.isNaN(Number(r))||e}});return t.defaultValue=0,t}integer(e="Must be a whole number"){return this.addRule({name:"integer",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number.isInteger(Number(t))||e}})}positive(e="Must be a positive number"){return this.addRule({name:"positive",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)>0||e}})}negative(e="Must be a negative number"){return this.addRule({name:"negative",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)<0||e}})}minValue(e,t){let r=t||`Must be at least ${e}`;return this.addRule({name:"minValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)>=e||r}})}maxValue(e,t){let r=t||`Must be no more than ${e}`;return this.addRule({name:"maxValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)<=e||r}})}between(e,t,r){let n=r||`Must be between ${e} and ${t}`;return this.addRule({name:"between",message:n,validate:(a)=>{if(!a&&a!==0)return!0;let o=Number(a);return o>=e&&o<=t||n}})}matches(e,t){let r=t||`Must match ${e}`;return this.addRule({name:"matches",message:r,validate:(n,a)=>{if(!a)return!0;return n===a[e]||r}})}oneOf(e,t){let r=t||`Must be one of: ${e.join(", ")}`;return this.addRule({name:"oneOf",message:r,validate:(n)=>{if(!n)return!0;return e.includes(n)||r}})}notOneOf(e,t){let r=t||`Cannot be one of: ${e.join(", ")}`;return this.addRule({name:"notOneOf",message:r,validate:(n)=>{if(!n)return!0;return!e.includes(n)||r}})}date(e="Must be a valid date"){return this.addRule({name:"date",message:e,validate:(t)=>{if(!t)return!0;let r=new Date(String(t));return!Number.isNaN(r.getTime())||e}})}before(e,t){let r=new Date(e),n=t||`Must be before ${r.toLocaleDateString()}`;return this.addRule({name:"before",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))<r||n}})}after(e,t){let r=new Date(e),n=t||`Must be after ${r.toLocaleDateString()}`;return this.addRule({name:"after",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))>r||n}})}custom(e,t="Invalid value"){return this.addRule({name:"custom",message:t,validate:e})}async(e,t="Invalid value"){return this.addRule({name:"async",message:t,async:!0,validate:e})}when(e,t){let r=new Fn;r.rules=[...this.rules],r.defaultValue=this.defaultValue;for(let n of t.getRules())r.rules.push({...n,validate:(a,o)=>{if(!e(a,o||{}))return!0;return n.validate(a,o)}});return r}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(e){let t=new Fn;return t.rules=[...this.rules],t.defaultValue=e,t}async validate(e,t){let r=[];for(let n of this.rules){let a=await n.validate(e,t);if(a!==!0)r.push(a)}return r}validateSync(e,t){let r=[];for(let n of this.rules){if(n.async)continue;let a=n.validate(e,t);if(a!==!0)r.push(a)}return r}}var Im=new Fn;function au(e,t,r){let n=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>_(c,{...t,message:l},r)).join(`
3
- `)}catch{return""}})}function cu(e,t,r){let n=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>_(c,{...t,message:l},r)).join(`
4
- `)}catch{return""}})}function lu(e,t,r){let n=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return c}catch{return""}})}function Om(e,t,r){let n=e;return n=au(n,t,r),n=cu(n,t,r),n=lu(n,t,r),n}export{ya,iu,Fn,Im,au,cu,lu,Om};
2
+ import{_}from"./chunk-p1jzpgej.js";import{le}from"./chunk-y8p85kcj.js";function g(e,t){let r={};for(let n of e)r[n]=le(t(n));return new Proxy({},{get:(n,a)=>r[a]?.(),set:(n,a,o)=>{if(r[a])r[a].set(o);else r[a]=le(o);return!0},has:(n,a)=>(a in r),deleteProperty:(n,a)=>(delete r[a],!0),ownKeys:()=>Reflect.ownKeys(r),getOwnPropertyDescriptor:(n,a)=>(a in r)?{enumerable:!0,configurable:!0,writable:!0,value:r[a]()}:void 0})}function v(e,t){let r={};for(let n of t)r[n]=e[n];return r}function ba(e,t){let r=Object.keys(e),n=g(r,(i)=>t?.[i]??e[i].getDefaultValue()),a=g(r,()=>[]),o=g(r,()=>!1),c=g(r,()=>!1),f=g(r,()=>!1),s=le(!1);async function u(i){f[i]=!0;let d=await e[i].validate(n[i],n);return a[i]=d,f[i]=!1,d.length===0}async function l(){s.set(!0);let i=await Promise.all(r.map(u));return s.set(!1),i.every(Boolean)}function m(){for(let i of r)n[i]=t?.[i]??e[i].getDefaultValue(),a[i]=[],o[i]=!1,c[i]=!1}function h(i){for(let d of r)if(d in i)n[d]=i[d],c[d]=!0}function b(i,d){n[i]=d,c[i]=!0}function y(i,d=!0){if(o[i]=d,d)u(i)}function p(i){return{value:n[i],errors:a[i],touched:o[i],dirty:c[i],valid:a[i].length===0,validating:f[i]}}function V(i){return async(d)=>{d?.preventDefault?.();for(let w of r)o[w]=!0;if(await l())await i(v(n,r))}}return{values:n,errors:a,touched:o,dirty:c,get isValid(){return r.every((i)=>a[i].length===0)},get isValidating(){return s()||r.some((i)=>f[i])},get isDirty(){return r.some((i)=>c[i])},validate:l,validateField:u,reset:m,setValues:h,setFieldValue:b,setFieldTouched:y,getFieldState:p,handleSubmit:V}}var au=ba;class Fn{rules=[];defaultValue="";addRule(e){let t=new Fn;return t.rules=[...this.rules,e],t.defaultValue=this.defaultValue,t}required(e="This field is required"){return this.addRule({name:"required",message:e,validate:(t)=>{if(t===null||t===void 0)return e;if(typeof t==="string"&&t.trim()==="")return e;if(Array.isArray(t)&&t.length===0)return e;return!0}})}email(e="Please enter a valid email"){return this.addRule({name:"email",message:e,validate:(t)=>{if(!t)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))||e}})}url(e="Please enter a valid URL"){return this.addRule({name:"url",message:e,validate:(t)=>{if(!t)return!0;try{return new URL(String(t)),!0}catch{return e}}})}min(e,t){let r=t||`Must be at least ${e} characters`;return this.addRule({name:"min",message:r,validate:(n)=>{if(!n)return!0;return String(n).length>=e||r}})}max(e,t){let r=t||`Must be no more than ${e} characters`;return this.addRule({name:"max",message:r,validate:(n)=>{if(!n)return!0;return String(n).length<=e||r}})}length(e,t,r){let n=r||`Must be between ${e} and ${t} characters`;return this.addRule({name:"length",message:n,validate:(a)=>{if(!a)return!0;let o=String(a).length;return o>=e&&o<=t||n}})}pattern(e,t="Invalid format"){return this.addRule({name:"pattern",message:t,validate:(r)=>{if(!r)return!0;return e.test(String(r))||t}})}hasUppercase(e="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,e)}hasLowercase(e="Must contain a lowercase letter"){return this.pattern(/[a-z]/,e)}hasNumber(e="Must contain a number"){return this.pattern(/\d/,e)}hasSpecial(e="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,e)}alphanumeric(e="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,e)}startsWithLetter(e="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,e)}noSpaces(e="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:e,validate:(t)=>{if(!t)return!0;return!String(t).includes(" ")||e}})}number(e="Must be a number"){let t=this.addRule({name:"number",message:e,validate:(r)=>{if(!r&&r!==0)return!0;return!Number.isNaN(Number(r))||e}});return t.defaultValue=0,t}integer(e="Must be a whole number"){return this.addRule({name:"integer",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number.isInteger(Number(t))||e}})}positive(e="Must be a positive number"){return this.addRule({name:"positive",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)>0||e}})}negative(e="Must be a negative number"){return this.addRule({name:"negative",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)<0||e}})}minValue(e,t){let r=t||`Must be at least ${e}`;return this.addRule({name:"minValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)>=e||r}})}maxValue(e,t){let r=t||`Must be no more than ${e}`;return this.addRule({name:"maxValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)<=e||r}})}between(e,t,r){let n=r||`Must be between ${e} and ${t}`;return this.addRule({name:"between",message:n,validate:(a)=>{if(!a&&a!==0)return!0;let o=Number(a);return o>=e&&o<=t||n}})}matches(e,t){let r=t||`Must match ${e}`;return this.addRule({name:"matches",message:r,validate:(n,a)=>{if(!a)return!0;return n===a[e]||r}})}oneOf(e,t){let r=t||`Must be one of: ${e.join(", ")}`;return this.addRule({name:"oneOf",message:r,validate:(n)=>{if(!n)return!0;return e.includes(n)||r}})}notOneOf(e,t){let r=t||`Cannot be one of: ${e.join(", ")}`;return this.addRule({name:"notOneOf",message:r,validate:(n)=>{if(!n)return!0;return!e.includes(n)||r}})}date(e="Must be a valid date"){return this.addRule({name:"date",message:e,validate:(t)=>{if(!t)return!0;let r=new Date(String(t));return!Number.isNaN(r.getTime())||e}})}before(e,t){let r=new Date(e),n=t||`Must be before ${r.toLocaleDateString()}`;return this.addRule({name:"before",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))<r||n}})}after(e,t){let r=new Date(e),n=t||`Must be after ${r.toLocaleDateString()}`;return this.addRule({name:"after",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))>r||n}})}custom(e,t="Invalid value"){return this.addRule({name:"custom",message:t,validate:e})}async(e,t="Invalid value"){return this.addRule({name:"async",message:t,async:!0,validate:e})}when(e,t){let r=new Fn;r.rules=[...this.rules],r.defaultValue=this.defaultValue;for(let n of t.getRules())r.rules.push({...n,validate:(a,o)=>{if(!e(a,o||{}))return!0;return n.validate(a,o)}});return r}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(e){let t=new Fn;return t.rules=[...this.rules],t.defaultValue=e,t}async validate(e,t){let r=[];for(let n of this.rules){let a=await n.validate(e,t);if(a!==!0)r.push(a)}return r}validateSync(e,t){let r=[];for(let n of this.rules){if(n.async)continue;let a=n.validate(e,t);if(a!==!0)r.push(a)}return r}}var Om=new Fn;function cu(e,t,r){let n=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>_(c,{...t,message:l},r)).join(`
3
+ `)}catch{return""}})}function lu(e,t,r){let n=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>_(c,{...t,message:l},r)).join(`
4
+ `)}catch{return""}})}function uu(e,t,r){let n=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return c}catch{return""}})}function Nm(e,t,r){let n=e;return n=cu(n,t,r),n=lu(n,t,r),n=uu(n,t,r),n}export{ba,au,Fn,Om,cu,lu,uu,Nm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{on,Ao,Po,Io,Eh,Oo}from"./chunk-enhys344.js";import"./chunk-wf0n9gpj.js";import"./chunk-qj4r08jb.js";import"./chunk-2vqpz4qv.js";export{Po as buildServerApi,Eh as createServerApi,on as discoverServerApi,Ao as generateApiTypes,Oo as isServerApiSource,Io as productionApiDispatcher};
@@ -298,5 +298,5 @@ catch (error) {
298
298
  init();
299
299
  }
300
300
  })();
301
- </script>`}var Tg={name:"pwa.installButton",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return r(t,n)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},$g={name:"pwa.updatePrompt",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return p(t,n)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},Rg={name:"pwa.offlineIndicator",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return d(t,n)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},Ag={name:"pwa.pushSubscribe",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return l(t,n)},hasEndTag:!0,description:"Renders a push notification subscription button"},to=[Tg,$g,Rg,Ag];function py(t){return[...t,...to]}
302
- export{Tg,$g,Rg,Ag,to,py};
301
+ </script>`}var $g={name:"pwa.installButton",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return r(t,n)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Rg={name:"pwa.updatePrompt",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return p(t,n)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},Ag={name:"pwa.offlineIndicator",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return d(t,n)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},Pg={name:"pwa.pushSubscribe",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return l(t,n)},hasEndTag:!0,description:"Renders a push notification subscription button"},to=[$g,Rg,Ag,Pg];function fy(t){return[...t,...to]}
302
+ export{$g,Rg,Ag,Pg,to,fy};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hn,Qf,eg,tg,ng,rg,m,sg,mi,og,qc,Kc}from"./chunk-p1jzpgej.js";import"./chunk-fqxcs1h1.js";import"./chunk-2vqpz4qv.js";import"./chunk-8ttmzcxb.js";import"./chunk-r9e0r6jx.js";import"./chunk-bt0amey5.js";export{hn as STX_ENGINE_BINDING_NAMES,mi as convertToCommonJS,qc as extractScriptFromTemplate,m as extractVariables,Kc as hasVariables,sg as isCompleteImport,rg as isMissingBindingFailure,tg as isModuleResolutionFailure,ng as isSyntaxFailure,og as splitDeclaration,Qf as stripTypeScript,eg as withoutStxReferrer};