@stacksjs/stx 0.2.401 → 0.2.402

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 (162) hide show
  1. package/dist/chunk-020a4q6e.js +2 -0
  2. package/dist/chunk-0j5wwmha.js +2 -0
  3. package/dist/{chunk-197z74b9.js → chunk-111tdjzz.js} +1 -1
  4. package/dist/{chunk-21dz636m.js → chunk-14rh4kd0.js} +1 -1
  5. package/dist/chunk-1a569y4r.js +2 -0
  6. package/dist/chunk-1chgn7qv.js +2 -0
  7. package/dist/chunk-1hw8p2g4.js +2 -0
  8. package/dist/{chunk-fffbzsmv.js → chunk-21adgg8e.js} +1 -1
  9. package/dist/{chunk-x86qttwm.js → chunk-2g3ffsc9.js} +1 -1
  10. package/dist/{chunk-8xm3z6dh.js → chunk-2hy87cn4.js} +1 -1
  11. package/dist/{chunk-dz29q408.js → chunk-2m17v3yx.js} +1 -1
  12. package/dist/{chunk-k2nydt80.js → chunk-2n3twnde.js} +1 -1
  13. package/dist/{chunk-h55mae9h.js → chunk-3t953qe0.js} +1 -1
  14. package/dist/{chunk-1ktxk84n.js → chunk-3tmnemhq.js} +1 -1
  15. package/dist/{chunk-btn4481e.js → chunk-42tn0t54.js} +1 -1
  16. package/dist/{chunk-cy8hgd86.js → chunk-4azk3jdd.js} +1 -1
  17. package/dist/{chunk-v7q2nf37.js → chunk-4m2e8w2g.js} +1 -1
  18. package/dist/{chunk-c9kj8p6j.js → chunk-4yc9gx6h.js} +1 -1
  19. package/dist/chunk-55d66wh7.js +2 -0
  20. package/dist/{chunk-zh3q10wd.js → chunk-5kzcyx1w.js} +1 -1
  21. package/dist/{chunk-cd6pe75s.js → chunk-6jns68ee.js} +1 -1
  22. package/dist/chunk-702rda41.js +2 -0
  23. package/dist/chunk-7r7qcpw2.js +2 -0
  24. package/dist/{chunk-yj5gkn17.js → chunk-7vftjm43.js} +1 -1
  25. package/dist/{chunk-epzm35py.js → chunk-8aa32p8v.js} +1 -1
  26. package/dist/{chunk-zrnppyqz.js → chunk-8e287qw8.js} +1 -1
  27. package/dist/{chunk-e1rv01pn.js → chunk-8ghwewek.js} +2 -2
  28. package/dist/{chunk-p81zbym6.js → chunk-9a79ev5a.js} +1 -1
  29. package/dist/chunk-9csrj2k2.js +2 -0
  30. package/dist/{chunk-88tt0qg0.js → chunk-9rp8f7jz.js} +2 -2
  31. package/dist/chunk-9xs1ekk3.js +2 -0
  32. package/dist/{chunk-7tgjn256.js → chunk-ah8gs0q2.js} +1 -1
  33. package/dist/{chunk-aewsgyzc.js → chunk-av7a1sct.js} +1 -1
  34. package/dist/{chunk-d4km7egg.js → chunk-b1hqgm6j.js} +1 -1
  35. package/dist/{chunk-hh8abhtc.js → chunk-b5na4j0k.js} +1 -1
  36. package/dist/{chunk-bf6zcjr5.js → chunk-b5rc4t8t.js} +1 -1
  37. package/dist/{chunk-aeaf5nsy.js → chunk-b89mqprp.js} +1 -1
  38. package/dist/{chunk-j9x1hxhg.js → chunk-baa5pana.js} +1 -1
  39. package/dist/{chunk-5zmppe0c.js → chunk-bd0eyzgz.js} +1 -1
  40. package/dist/{chunk-caj47vtj.js → chunk-bdy1fpqq.js} +1 -1
  41. package/dist/chunk-bgyh22e9.js +2 -0
  42. package/dist/{chunk-pm8wzxsb.js → chunk-bs2a7a2b.js} +1 -1
  43. package/dist/{chunk-rxz43r6k.js → chunk-cevkpyn9.js} +1 -1
  44. package/dist/{chunk-61cwdy7h.js → chunk-cf05s8c1.js} +1 -1
  45. package/dist/{chunk-45etne17.js → chunk-chn6e3en.js} +1 -1
  46. package/dist/chunk-cqn8qq4v.js +2 -0
  47. package/dist/chunk-crjn0b04.js +2 -0
  48. package/dist/{chunk-0rdhrgff.js → chunk-cvkty3ha.js} +1 -1
  49. package/dist/{chunk-x2wmn8m7.js → chunk-d6rkgay9.js} +2 -2
  50. package/dist/{chunk-kfhm9vh1.js → chunk-db1bf5yj.js} +2 -2
  51. package/dist/{chunk-r1d9x0dy.js → chunk-ddh21d04.js} +1 -1
  52. package/dist/{chunk-ar5stjnb.js → chunk-dnew7qmv.js} +1 -1
  53. package/dist/{chunk-8ded3tn8.js → chunk-e5aqq9ms.js} +1 -1
  54. package/dist/{chunk-nm7jfzmz.js → chunk-eg30ksd8.js} +2 -2
  55. package/dist/{chunk-vs4dafbz.js → chunk-ek069b44.js} +1 -1
  56. package/dist/{chunk-h7sgg3vh.js → chunk-etah20m0.js} +2 -2
  57. package/dist/{chunk-1rskz446.js → chunk-ezwtd7s2.js} +1 -1
  58. package/dist/chunk-f4f5dzfg.js +2 -0
  59. package/dist/chunk-fkht7kzs.js +2 -0
  60. package/dist/{chunk-57yhrery.js → chunk-fpqz7msz.js} +1 -1
  61. package/dist/{chunk-rwtj7j0r.js → chunk-fpxz25xz.js} +1 -1
  62. package/dist/{chunk-pdxbys31.js → chunk-fwc5p9bn.js} +1 -1
  63. package/dist/{chunk-4x73bm95.js → chunk-gbwqy9py.js} +1 -1
  64. package/dist/{chunk-dvpk2rer.js → chunk-gs67nnfb.js} +1 -1
  65. package/dist/{chunk-0fwecpfm.js → chunk-gv6fnbw5.js} +2 -2
  66. package/dist/{chunk-3znzj20j.js → chunk-h37e97qq.js} +1 -1
  67. package/dist/{chunk-wmqhn6rq.js → chunk-h3zqzczc.js} +1 -1
  68. package/dist/{chunk-kdwbpcm4.js → chunk-h7qv6sc5.js} +1 -1
  69. package/dist/{chunk-gtn2agxa.js → chunk-ht9rdkf3.js} +1 -1
  70. package/dist/{chunk-h01bbt3r.js → chunk-hw96m872.js} +1 -1
  71. package/dist/{chunk-xfedcdb2.js → chunk-j665en0c.js} +1 -1
  72. package/dist/{chunk-w4nmvn5v.js → chunk-j6p78bma.js} +1 -1
  73. package/dist/{chunk-8kkqx4sc.js → chunk-j89wctm5.js} +1 -1
  74. package/dist/{chunk-twws9vvz.js → chunk-jbtzq3xt.js} +2 -2
  75. package/dist/{chunk-3769e62c.js → chunk-jct6cs2k.js} +1 -1
  76. package/dist/chunk-jmek11fc.js +2 -0
  77. package/dist/{chunk-4eyzkbzj.js → chunk-kdqcb0r5.js} +1 -1
  78. package/dist/chunk-kvdd2zfn.js +2 -0
  79. package/dist/{chunk-mgndzdqy.js → chunk-m28xqhyz.js} +1 -1
  80. package/dist/chunk-mjdsjxm5.js +2 -0
  81. package/dist/{chunk-g7qmxjyc.js → chunk-mjearf0g.js} +1 -1
  82. package/dist/{chunk-980w4zcq.js → chunk-mntzk6ga.js} +1 -1
  83. package/dist/{chunk-kyw2cbvn.js → chunk-msecn1gm.js} +1 -1
  84. package/dist/chunk-n9cgqpe2.js +2 -0
  85. package/dist/{chunk-7bym5kky.js → chunk-n9nb4e1v.js} +168 -168
  86. package/dist/chunk-n9wmhtap.js +2 -0
  87. package/dist/{chunk-7c8r36ve.js → chunk-ndydf37f.js} +3 -3
  88. package/dist/{chunk-eqhsprr0.js → chunk-nn42gs3q.js} +1 -1
  89. package/dist/{chunk-hm66z7e8.js → chunk-nt03zdme.js} +1 -1
  90. package/dist/{chunk-r0jqyxbc.js → chunk-pj0jjn5b.js} +1 -1
  91. package/dist/chunk-pp8e3t71.js +2 -0
  92. package/dist/{chunk-zstrcmbj.js → chunk-ptad3t7a.js} +335 -326
  93. package/dist/{chunk-d0qy1ezf.js → chunk-qbc0bebg.js} +2 -2
  94. package/dist/chunk-qmr1we72.js +2 -0
  95. package/dist/{chunk-fsvkqeya.js → chunk-qnye902b.js} +1 -1
  96. package/dist/{chunk-bdz7nznw.js → chunk-rk8p4b1z.js} +2 -2
  97. package/dist/chunk-s35w8xjx.js +2 -0
  98. package/dist/{chunk-h8zp2fz9.js → chunk-saf4xhac.js} +1 -1
  99. package/dist/chunk-scak53zc.js +2 -0
  100. package/dist/chunk-scn75qrm.js +2 -0
  101. package/dist/{chunk-q4v62yed.js → chunk-szcxpbfn.js} +38 -6
  102. package/dist/chunk-t3pfdz1r.js +2 -0
  103. package/dist/{chunk-76q768gt.js → chunk-tev79q0a.js} +1 -1
  104. package/dist/{chunk-csgshaeh.js → chunk-v54tq312.js} +1 -1
  105. package/dist/{chunk-wh8vwykh.js → chunk-vaxepwj5.js} +1 -1
  106. package/dist/chunk-vwe0fvez.js +2 -0
  107. package/dist/chunk-vxxj6sqn.js +2 -0
  108. package/dist/{chunk-ekvejzvk.js → chunk-wheh08v2.js} +1 -1
  109. package/dist/{chunk-5zapxgys.js → chunk-wm07h8q1.js} +1 -1
  110. package/dist/{chunk-8qzc5n61.js → chunk-x1c4vcds.js} +1 -1
  111. package/dist/{chunk-ef3y864p.js → chunk-xd2bapap.js} +1 -1
  112. package/dist/{chunk-pqc4sv02.js → chunk-xe06rkka.js} +2 -2
  113. package/dist/chunk-xn9t0hnt.js +2 -0
  114. package/dist/{chunk-4cv7bw5e.js → chunk-y9f9g2kh.js} +2 -2
  115. package/dist/{chunk-re9rv45k.js → chunk-za3zzk6p.js} +1 -1
  116. package/dist/cli.js +14 -14
  117. package/dist/composables/use-offline.d.ts +6 -5
  118. package/dist/composables/use-offline.js +20 -1
  119. package/dist/craft-entry.js +1 -1
  120. package/dist/craft.js +1 -1
  121. package/dist/database.js +1 -1
  122. package/dist/doctor.d.ts +35 -0
  123. package/dist/doctor.js +95 -0
  124. package/dist/offline/app-service-worker.js +15 -6
  125. package/dist/process.d.ts +0 -3
  126. package/dist/process.js +12 -3
  127. package/dist/pwa.js +2 -2
  128. package/dist/signal-processing.d.ts +29 -11
  129. package/dist/signal-processing.js +40 -0
  130. package/dist/signals.js +37 -5
  131. package/dist/ssg.js +2 -2
  132. package/dist/visual-testing.js +1 -1
  133. package/package.json +5 -5
  134. package/dist/chunk-07syq64h.js +0 -2
  135. package/dist/chunk-0nqcv7z7.js +0 -2
  136. package/dist/chunk-160zge7a.js +0 -2
  137. package/dist/chunk-19kj26z3.js +0 -2
  138. package/dist/chunk-1nj174s0.js +0 -2
  139. package/dist/chunk-1s9jswhp.js +0 -2
  140. package/dist/chunk-2m88psbh.js +0 -2
  141. package/dist/chunk-2x9gpv2d.js +0 -2
  142. package/dist/chunk-3t17hkar.js +0 -2
  143. package/dist/chunk-3wsrhb1a.js +0 -2
  144. package/dist/chunk-65y5abx7.js +0 -2
  145. package/dist/chunk-6n0jamtd.js +0 -2
  146. package/dist/chunk-7vnkqnyh.js +0 -2
  147. package/dist/chunk-8ywzw4h9.js +0 -2
  148. package/dist/chunk-9hh5eg8y.js +0 -2
  149. package/dist/chunk-bgy4hwh4.js +0 -2
  150. package/dist/chunk-ch2aycnm.js +0 -2
  151. package/dist/chunk-cmnve329.js +0 -2
  152. package/dist/chunk-k9t7pyb8.js +0 -2
  153. package/dist/chunk-kp4ja0w3.js +0 -2
  154. package/dist/chunk-kxxph6d4.js +0 -2
  155. package/dist/chunk-s4yq7q1d.js +0 -2
  156. package/dist/chunk-vyn2y774.js +0 -2
  157. package/dist/chunk-w680bfze.js +0 -2
  158. package/dist/chunk-waz1sddd.js +0 -2
  159. package/dist/chunk-wdszjnbp.js +0 -2
  160. package/dist/chunk-x3h04mgd.js +0 -2
  161. package/dist/chunk-y5gyez1p.js +0 -2
  162. package/dist/chunk-zfs01pjr.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Io as a,Jo as b,Ko as c,Lo as d,Mo as e,No as f,Oo as g,Po as h,Qo as i,Ro as j,So as k,To as l}from"./chunk-ptad3t7a.js";import"./chunk-y9f9g2kh.js";import"./chunk-ah8gs0q2.js";import"./chunk-saf4xhac.js";import"./chunk-wheh08v2.js";import"./chunk-jct6cs2k.js";import"./chunk-ndydf37f.js";import"./chunk-7vftjm43.js";import"./chunk-4azk3jdd.js";import"./chunk-jbtzq3xt.js";import"./chunk-mjearf0g.js";import"./chunk-9rp8f7jz.js";import"./chunk-8ghwewek.js";import"./chunk-rk8p4b1z.js";import"./chunk-fpxz25xz.js";import"./chunk-nn42gs3q.js";import"./chunk-v54tq312.js";import"./chunk-qbc0bebg.js";import"./chunk-4yc9gx6h.js";import"./chunk-d6rkgay9.js";import"./chunk-cevkpyn9.js";export{c as withoutStxReferrer,b as stripTypeScript,j as splitDeclaration,e as isSyntaxFailure,d as isModuleResolutionFailure,f as isMissingBindingFailure,h as isCompleteImport,l as hasVariables,g as extractVariables,k as extractScriptFromTemplate,i as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{At as SJ}from"./chunk-yj5gkn17.js";import{$w as EJ}from"./chunk-rxz43r6k.js";import G from"path";import{hasLocalConfig as bJ}from"bunfig";var FJ={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function y(J){return`--stx-${J}`}function f(J,Q){let Z=Q.lastIndexOf("-");if(Z===-1)return typeof J[Q]==="string"?J[Q]:void 0;let $=J[Q.slice(0,Z)];if(!$||typeof $!=="object")return;let U=$[Q.slice(Z+1)];return typeof U==="string"?U:void 0}function jJ(J){let Q={};for(let[Z,$]of Object.entries(FJ)){let U=f(J,$.light);if(U===void 0)continue;Q[Z]=`var(${y(Z)}, ${U})`}return Q}function WJ(J){let Q=[],Z=[];for(let[$,U]of Object.entries(FJ)){let F=f(J,U.light),j=f(J,U.dark);if(F===void 0)continue;if(Q.push(` ${y($)}: ${F};`),j!==void 0)Z.push(` ${y($)}: ${j};`)}if(Q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...Q,"}",".dark {",...Z,"}",""].join(`
2
+ import{Bt as SJ}from"./chunk-7vftjm43.js";import{ax as EJ}from"./chunk-cevkpyn9.js";import G from"path";import{hasLocalConfig as bJ}from"bunfig";var FJ={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function y(J){return`--stx-${J}`}function f(J,Q){let Z=Q.lastIndexOf("-");if(Z===-1)return typeof J[Q]==="string"?J[Q]:void 0;let $=J[Q.slice(0,Z)];if(!$||typeof $!=="object")return;let U=$[Q.slice(Z+1)];return typeof U==="string"?U:void 0}function jJ(J){let Q={};for(let[Z,$]of Object.entries(FJ)){let U=f(J,$.light);if(U===void 0)continue;Q[Z]=`var(${y(Z)}, ${U})`}return Q}function WJ(J){let Q=[],Z=[];for(let[$,U]of Object.entries(FJ)){let F=f(J,U.light),j=f(J,U.dark);if(F===void 0)continue;if(Q.push(` ${y($)}: ${F};`),j!==void 0)Z.push(` ${y($)}: ${j};`)}if(Q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...Q,"}",".dark {",...Z,"}",""].join(`
3
3
  `)}var XJ={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function VJ(J){return`--stx-radius-${J}`}function qJ(){let J={};for(let[Q,Z]of Object.entries(XJ))J[Q]=`var(${VJ(Q)}, ${Z.value})`;return J}function zJ(){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(XJ).map(([J,Q])=>` ${VJ(J)}: ${Q.value};`),"}",""].join(`
4
4
  `)}function GJ(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function C(J,Q){let Z={...J};for(let[$,U]of Object.entries(Q))Z[$]=GJ(U)&&GJ(Z[$])?C(Z[$],U):U;return Z}function YJ(J={},Q={}){let Z=J.theme||{},$=Q.theme||{},{extend:U,...F}=$,{extend:j,...V}=Z,W=V.colors||{};V.colors={...W,...jJ(W)};let X=V.borderRadius||{};V.borderRadius={...X,...qJ()};let q=C(V,F),z=C(j||{},U||{});if(Object.keys(z).length>0)q.extend=z;let w=[...J.safelist||[],...Q.safelist||[]],O={...J.shortcuts||{},...Q.shortcuts||{}},K=[...J.preflights||[],...Q.preflights||[]];return{config:{...J,...Q,theme:q,safelist:w,shortcuts:O,...K.length>0?{preflights:K}:{},content:[],output:""},safelist:w,shortcuts:O,includePreflight:Q.preflight!==!1,minify:Q.minify===!0,tokenCSS:WJ(W)+zJ()}}var v=/<script\b[^>]*>/iy,p=/<\/script\s*>/ig,R=/<style\b[^>]*>/iy,m=/<\/style\s*>/ig;function wJ(J,Q,Z,$){Z.lastIndex=Q;let U=Z.exec(J);if(!U||U.index!==Q)return-1;$.lastIndex=Z.lastIndex;let F=$.exec(J);if(!F)return-1;return F.index+F[0].length}function h(J,Q){return wJ(J,Q,v,p)}function LJ(J,Q){return wJ(J,Q,R,m)}function pJ(J,Q){if(!J.startsWith("<!--",Q))return-1;let Z=J.indexOf("-->",Q+4);if(Z===-1)return-1;return Z+3}function BJ(J,Q){if(J.startsWith("<!--",Q)){let U=pJ(J,Q);return U===-1?J.length:U}if(v.lastIndex=Q,v.exec(J)?.index===Q){p.lastIndex=v.lastIndex;let U=p.exec(J);return U?U.index+U[0].length:J.length}if(R.lastIndex=Q,R.exec(J)?.index===Q){m.lastIndex=R.lastIndex;let U=m.exec(J);return U?U.index+U[0].length:J.length}return-1}function mJ(J,Q){let Z=[],$=0,U=J.length,F=!1,j=null;while($<U){let V=J[$];if(F){if(j){if(V===j)j=null}else if(V==='"'||V==="'")j=V;else if(V===">")F=!1;$++;continue}if(V!=="<"){let z=J.indexOf("<",$+1);if(z===-1)break;$=z;continue}let W=Q(J,$);if(W>$){Z.push({start:$,end:W,token:J.slice($,W)}),$=W;continue}let X=BJ(J,$);if(X>$){$=X;continue}let q=J.charCodeAt($+1);if(q>=65&&q<=90||q>=97&&q<=122)F=!0;$++}return Z}function NQ(J){let Q=0,Z=0,$=0,U=!1,F=null;while($<J.length){if(U){let z=J[$];if(F){if(z===F)F=null}else if(z==='"'||z==="'")F=z;else if(z===">")U=!1;$++;continue}let j=J.indexOf("<",$),V=j===-1?J.length:j;while($<V){let z=J[$++];if(z==="{")Q++;else if(z==="}")Z++;if(Q>=2&&Z>=2)return!0}if(j===-1)break;let W=BJ(J,j);if(W>j){$=W;continue}let X=J.charCodeAt(j+1),q=X===47?J.charCodeAt(j+2):X;if(q>=65&&q<=90||q>=97&&q<=122)U=!0;$=j+1}return!1}function HJ(J,Q){while(J.size>=Q){let Z=J.keys().next();if(Z.done)return;J.delete(Z.value)}}var hJ=65536,iJ=12,g=new Map;function i(J,Q,Z,$){let U=$!==void 0&&J.length>=hJ,F=U?`${$}\x00${J}`:"";if(U){let q=g.get(F);if(q)return{output:q.output,tokens:q.tokens.slice()}}let j=mJ(J,Q);if(j.length===0)return{output:J,tokens:[]};let V=j.map((q)=>q.token),W="",X=0;for(let q=0;q<j.length;q++){let z=j[q];W+=J.slice(X,z.start),W+=Z(z.token,q),X=z.end}if(W+=J.slice(X),U)return HJ(g,iJ),g.set(F,{output:W,tokens:V}),{output:W,tokens:V.slice()};return{output:W,tokens:V}}var nJ=65536,cJ=4,u=new Map;function d(J,Q,Z){return{output:Q,scripts:Z,restore:($)=>$===Q?J:rJ($,Z)}}function MQ(J){let Q=J.length>=nJ;if(Q){let U=u.get(J);if(U)return d(J,U.output,U.scripts.slice())}let{output:Z,tokens:$}=i(J,h,(U,F)=>`\x00STX_SCRIPT_${F}\x00`);if(Q)return HJ(u,cJ),u.set(J,{output:Z,scripts:$}),d(J,Z,$.slice());return d(J,Z,$)}function rJ(J,Q){if(Q.length===0)return J;return J.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(Z,$)=>Q[+$]??"")}function OJ(J,Q=""){let Z=`${J}${Q}`,$=0;for(let U=0;U<Z.length;U++){let F=Z.charCodeAt(U);$=($<<5)-$+F,$=$&$}return`stx-${Math.abs($).toString(36)}`}function KJ(J,Q,Z={}){let{prefix:$="",preserveHost:U=!0,scopeKeyframes:F=!0,scopeCustomProperties:j=!1}=Z;if(!J.trim())return"";let V=n(J),W=[],X=new Map;if(F)for(let q of V){let z=q.selector.match(/@keyframes\s+([a-z_-][a-z0-9_-]*)/i);if(z){let w=z[1],O=`${Q}_${w}`;X.set(w,O)}}for(let q of V){let z=IJ(q,Q,$,U,X,j);W.push(z)}return W.join(`
5
5
 
@@ -18,7 +18,7 @@ catch (e) {
18
18
  }
19
19
  throw e;
20
20
  }
21
- `),U.set(X,q)}return q(...V)}catch{return}}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:j,context:Q.slice()});return j}clear(){this.pool.length=0,this.fnCache.clear()}}var xQ=new AJ;class _J{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(J){this.enabled=J}isEnabled(){return this.enabled}setBudget(J,Q){this.budgets.set(J,{warnThreshold:0.8,action:"warn",...Q})}setBudgets(J){for(let[Q,Z]of Object.entries(J))this.setBudget(Q,Z)}removeBudget(J){this.budgets.delete(J)}getBudgets(){let J={};for(let[Q,Z]of this.budgets.entries())J[Q]=Z;return J}onViolation(J){this.violationHandlers.push(J)}offViolation(J){let Q=this.violationHandlers.indexOf(J);if(Q!==-1)this.violationHandlers.splice(Q,1)}time(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}async timeAsync(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=await Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}checkBudget(J,Q){let Z=this.budgets.get(J);if(!Z)return;let $=Q/Z.maxTime*100,U=Z.warnThreshold!==void 0?Q>=Z.maxTime*Z.warnThreshold&&Q<Z.maxTime:!1,F=Q>=Z.maxTime;if(!U&&!F)return;let j={label:J,actualTime:Q,budgetTime:Z.maxTime,exceedancePercent:$,timestamp:new Date,isWarning:U};this.violations.push(j);while(this.violations.length>this.maxViolations)this.violations.shift();for(let W of this.violationHandlers)try{W(j)}catch{}let V=U?`[Performance Warning] "${J}" took ${Q.toFixed(2)}ms (${$.toFixed(1)}% of ${Z.maxTime}ms budget)`:`[Performance Budget Exceeded] "${J}" took ${Q.toFixed(2)}ms (exceeded ${Z.maxTime}ms budget by ${($-100).toFixed(1)}%)`;switch(Z.action){case"log":console.log(V);break;case"warn":console.warn(V);break;case"error":console.error(V);break;case"throw":if(F)throw Error(V);else console.warn(V);break}}recordTime(J,Q){let Z=this.metrics.get(J);if(Z)Z.count++,Z.totalTime+=Q,Z.maxTime=Math.max(Z.maxTime,Q),Z.minTime=Math.min(Z.minTime,Q);else this.metrics.set(J,{count:1,totalTime:Q,maxTime:Q,minTime:Q})}getStats(J){if(J){let Z=this.metrics.get(J);if(!Z)return{};let $=this.budgets.get(J);return{count:Z.count,avgTime:Z.totalTime/Z.count,totalTime:Z.totalTime,maxTime:Z.maxTime,minTime:Z.minTime,budget:$?.maxTime,budgetUtilization:$?Z.totalTime/Z.count/$.maxTime*100:void 0}}let Q={};for(let[Z,$]of this.metrics.entries()){let U=this.budgets.get(Z);Q[Z]={count:$.count,avgTime:$.totalTime/$.count,totalTime:$.totalTime,maxTime:$.maxTime,minTime:$.minTime,budget:U?.maxTime,budgetUtilization:U?$.totalTime/$.count/U.maxTime*100:void 0}}return Q}getViolations(J){if(J)return this.violations.filter((Q)=>Q.label===J);return[...this.violations]}getViolationStats(){let J={},Q=0,Z=0;for(let $ of this.violations)if(J[$.label]=(J[$.label]||0)+1,$.isWarning)Q++;else Z++;return{total:this.violations.length,byLabel:J,warnings:Q,errors:Z}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var a=null;function ZQ(){if(!a)a=new _J;return a}var EQ=new Proxy({},{get(J,Q){return ZQ()[Q]}});var RJ=[];function TJ(J){let Q=new s(J);return RJ.push(Q),Q}function CQ(){for(let J of RJ)J.clear()}function t(J,...Q){return`${Q.map((Z)=>String(Z??"")).join("\x00")}\x00${J.length}\x00${Bun.hash(J)}`}function gQ(J){let Q=[];for(let Z of new Set(J))try{Q.push({path:Z,mtimeMs:vJ.statSync(Z).mtimeMs})}catch{}return Q}function uQ(J){for(let Q of J)try{if(vJ.statSync(Q.path).mtimeMs!==Q.mtimeMs)return!1}catch{return!1}return!0}var B=null,JJ=!1,D=null,_="",M=!1,yJ=256,I=new Map,H=new Map,T=null,fJ=null,b=new Map;function k(J){return Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)}function e(J,Q){if(I.has(J))I.delete(J);else if(I.size>=yJ)I.delete(I.keys().next().value);I.set(J,Q)}function UQ(J){let Q=k(J);if(H.has(Q))H.delete(Q);else if(H.size>=yJ)H.delete(H.keys().next().value);return H.set(Q,J),Q}function lQ(J){let Q=H.get(J);if(Q===void 0)return;return H.delete(J),H.set(J,Q),Q}async function FQ(J,Q=T){if(!Q)return null;try{let Z=Bun.file(G.join(Q,`cw-${k(J)}.css`));if(!await Z.exists())return null;return await Z.text()}catch{return null}}async function jQ(J,Q,Z=T){if(!Z)return;try{if(!fs.existsSync(Z))fs.mkdirSync(Z,{recursive:!0});await Bun.write(G.join(Z,`cw-${k(J)}.css`),Q)}catch{}}async function kJ(J){try{let Q=await import(J);if(Q&&Q.CSSGenerator)return{CSSGenerator:Q.CSSGenerator,config:Q.config,build:Q.build,defaultConfig:Q.defaultConfig,extractClasses:Q.extractClasses}}catch{}return null}var WQ=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],XQ=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function VQ(){let J=[],Q=process.cwd();while(Q!==G.dirname(Q)){for(let Z of["node_modules","pantry"])for(let $ of WQ)J.push(G.join(Q,Z,...$));Q=G.dirname(Q)}return J}function qQ(){let J=[],Q=process.env.HOME||process.env.USERPROFILE||"",Z=[Q&&G.join(Q,"Code","Tools","ts-css"),Q&&G.join(Q,"Code","Tools","crosswind"),Q&&G.join(Q,"repos","stacks-org","ts-css"),Q&&G.join(Q,"repos","stacks-org","crosswind"),G.join(process.cwd(),"..","ts-css"),G.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let $ of Z)J.push(G.join($,"packages","toolkit","dist","engine","index.js")),J.push(G.join($,"packages","toolkit","src","engine","index.ts"));if(Q)J.push(G.join(Q,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return J}async function CJ(){if(JJ)return B;JJ=!0;try{let J=async(U)=>{for(let F of U){if(!await Bun.file(F).exists())continue;let j=await kJ(F);if(j){if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded from ${G.dirname(G.dirname(F))}`);return j}}return null};if(process.env.CROSSWIND_SRC){let U=G.resolve(process.env.CROSSWIND_SRC),F=await J([U]);if(!F)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${U}`);return B=F,B}let Q=await J(VQ());if(Q)return B=Q,B;let Z=XQ;for(let U of Z){let F=await kJ(U);if(F){if(B=F,!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded`);return B}}let $=await J(qQ());if($)return B=$,B;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${Y.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${Y.reset}`),console.warn(`${Y.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${Y.reset}`),null}}function oQ(){QJ.clear(),B=null,JJ=!1,D=null,_="",I.clear(),H.clear(),fJ=null,b.clear()}var xJ=!1;async function gJ(J){try{let Q=bJ({name:"css",cwd:J})?"css":bJ({name:"crosswind",cwd:J})?"crosswind":null;if(!Q)return null;if(Q==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!xJ)xJ=!0,console.warn(`${Y.yellow}[ts-css]${Y.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:Z}=await import("bunfig"),$=await Z({name:Q,cwd:J,defaultConfig:{},checkEnv:!1,verbose:!1});if(!$?.path||!$.config||Object.keys($.config).length===0)return null;let U=G.relative(J,$.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from ${U||$.path}`);return $.config}catch(Q){if(Q instanceof Error&&Q.name==="ConfigNotFoundError")return null;return console.warn(`${Y.yellow}[ts-css]${Y.reset} Failed to load css config:`,Q instanceof Error?Q.message:Q),null}}async function zQ(J){let Q=null;try{let{loadStxConfig:Z}=await import("./chunk-8ywzw4h9.js"),$=await Z(J);if($.css)if(typeof $.css==="string"){let U=G.isAbsolute($.css)?$.css:G.resolve(J,$.css);if(await Bun.file(U).exists()){let F=await import(U);Q=F.default||F,console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from stx.config.ts \u2192 ${$.css}`)}}else{if(Q={...$.css,content:$.css.content||[],preflight:$.css.preflight??!0,minify:$.css.minify??!1},$.css.config){let U=G.isAbsolute($.css.config)?$.css.config:G.resolve(J,$.css.config);if(await Bun.file(U).exists()){let F=await import(U);Q={...F.default||F,...Q}}}console.log(`${Y.green}[ts-css]${Y.reset} Using inline CSS config from stx.config.ts`)}}catch{}return Q||await gJ(J)}function GQ(J){try{let Q=new WeakSet;return k(JSON.stringify(J??{},(Z,$)=>{if(typeof $==="function")return`[fn]${String($)}`;if(typeof $==="object"&&$!==null){if(Q.has($))return"[circular]";Q.add($)}return $})??"")}catch{return"unhashable"}}async function YQ(J){if(M)return _;M=!0;try{let Q=await CJ();if(!Q||!Q.build)return M=!1,"";if(!D)D=await gJ(J);if(!D)return M=!1,"";let Z=Q.defaultConfig?.theme||{},$=D.theme||{},U={...Q.defaultConfig,...D,theme:{...Z,...$,extend:{...Z.extend||{},...$.extend||{}}}},F=performance.now(),j=await Q.build(U),V=performance.now()-F;if(_=j.css,console.log(`${Y.cyan}[ts-css]${Y.reset} Built ${j.classes.size} classes in ${V.toFixed(1)}ms`),U.output){let W=G.isAbsolute(U.output)?U.output:G.join(J,U.output),X=G.dirname(W);if(!fs.existsSync(X))fs.mkdirSync(X,{recursive:!0});await Bun.write(W,j.css)}return M=!1,j.css}catch(Q){return console.error(`${Y.red}[ts-css]${Y.reset} Build error:`,Q),M=!1,_}}async function aQ(J){D=null,await YQ(J)}function sQ(){return _}function wQ(J){let Q=new Set,Z=/class\s*=\s*["']([^"']+)["']/gi,$=Z.exec(J);while($!==null){for(let j of $[1].split(/\s+/))if(j.trim())Q.add(j.trim());$=Z.exec(J)}let U=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,F=U.exec(J);while(F!==null){let j=F[1].match(/'([^']+)'/g);if(j){for(let V of j)for(let W of V.slice(1,-1).split(/\s+/))if(W.trim())Q.add(W.trim())}F=U.exec(J)}return Q}var QJ=TJ(64);async function LQ(J,Q){let Z=()=>b.get(Q?G.resolve(Q):process.cwd())?.fingerprint??null,$=QJ.get(t(J,Q,Z()));if($!==void 0)return $;let U=await BQ(J,Q);if(U)QJ.set(t(J,Q,Z()),U);return U}async function BQ(J,Q){try{let Z=await CJ();if(!Z)return"";let $=typeof Z.extractClasses==="function"?Z.extractClasses(J):wQ(J);if($.size===0)return"";let U=Q?G.resolve(Q):process.cwd(),F=SJ(U,"cache");if(!T)T=F;let j=b.get(U);if(!j){let L=await zQ(U);j={config:L,fingerprint:GQ(L)},b.set(U,j),fJ=j.fingerprint}let V=[...$].sort().join(" "),W=`${j.fingerprint||"default"}::${V}`,X=I.get(W);if(X!==void 0)return e(W,X),X;let q=await FQ(W,F);if(q!==null)return e(W,q),q;let z=Z.defaultConfig||Z.config,w=j.config||{},O=YJ(z,w),{safelist:K,includePreflight:$J,minify:ZJ,tokenCSS:uJ}=O,x=O.config,E=new Z.CSSGenerator(x),S=x.shortcuts||w.shortcuts||{},UJ=Object.keys(S).filter((L)=>$.has(L)||K.includes(L));for(let L of K)if(!S[L])E.generate(L);for(let L of $)if(!S[L])E.generate(L);let P="";if(UJ.length>0){let L=new Z.CSSGenerator(x);for(let dJ of UJ)L.generate(dJ);if(P=L.toCSS(!1,ZJ),P&&!P.endsWith(`
21
+ `),U.set(X,q)}return q(...V)}catch{return}}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:j,context:Q.slice()});return j}clear(){this.pool.length=0,this.fnCache.clear()}}var xQ=new AJ;class _J{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(J){this.enabled=J}isEnabled(){return this.enabled}setBudget(J,Q){this.budgets.set(J,{warnThreshold:0.8,action:"warn",...Q})}setBudgets(J){for(let[Q,Z]of Object.entries(J))this.setBudget(Q,Z)}removeBudget(J){this.budgets.delete(J)}getBudgets(){let J={};for(let[Q,Z]of this.budgets.entries())J[Q]=Z;return J}onViolation(J){this.violationHandlers.push(J)}offViolation(J){let Q=this.violationHandlers.indexOf(J);if(Q!==-1)this.violationHandlers.splice(Q,1)}time(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}async timeAsync(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=await Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}checkBudget(J,Q){let Z=this.budgets.get(J);if(!Z)return;let $=Q/Z.maxTime*100,U=Z.warnThreshold!==void 0?Q>=Z.maxTime*Z.warnThreshold&&Q<Z.maxTime:!1,F=Q>=Z.maxTime;if(!U&&!F)return;let j={label:J,actualTime:Q,budgetTime:Z.maxTime,exceedancePercent:$,timestamp:new Date,isWarning:U};this.violations.push(j);while(this.violations.length>this.maxViolations)this.violations.shift();for(let W of this.violationHandlers)try{W(j)}catch{}let V=U?`[Performance Warning] "${J}" took ${Q.toFixed(2)}ms (${$.toFixed(1)}% of ${Z.maxTime}ms budget)`:`[Performance Budget Exceeded] "${J}" took ${Q.toFixed(2)}ms (exceeded ${Z.maxTime}ms budget by ${($-100).toFixed(1)}%)`;switch(Z.action){case"log":console.log(V);break;case"warn":console.warn(V);break;case"error":console.error(V);break;case"throw":if(F)throw Error(V);else console.warn(V);break}}recordTime(J,Q){let Z=this.metrics.get(J);if(Z)Z.count++,Z.totalTime+=Q,Z.maxTime=Math.max(Z.maxTime,Q),Z.minTime=Math.min(Z.minTime,Q);else this.metrics.set(J,{count:1,totalTime:Q,maxTime:Q,minTime:Q})}getStats(J){if(J){let Z=this.metrics.get(J);if(!Z)return{};let $=this.budgets.get(J);return{count:Z.count,avgTime:Z.totalTime/Z.count,totalTime:Z.totalTime,maxTime:Z.maxTime,minTime:Z.minTime,budget:$?.maxTime,budgetUtilization:$?Z.totalTime/Z.count/$.maxTime*100:void 0}}let Q={};for(let[Z,$]of this.metrics.entries()){let U=this.budgets.get(Z);Q[Z]={count:$.count,avgTime:$.totalTime/$.count,totalTime:$.totalTime,maxTime:$.maxTime,minTime:$.minTime,budget:U?.maxTime,budgetUtilization:U?$.totalTime/$.count/U.maxTime*100:void 0}}return Q}getViolations(J){if(J)return this.violations.filter((Q)=>Q.label===J);return[...this.violations]}getViolationStats(){let J={},Q=0,Z=0;for(let $ of this.violations)if(J[$.label]=(J[$.label]||0)+1,$.isWarning)Q++;else Z++;return{total:this.violations.length,byLabel:J,warnings:Q,errors:Z}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var a=null;function ZQ(){if(!a)a=new _J;return a}var EQ=new Proxy({},{get(J,Q){return ZQ()[Q]}});var RJ=[];function TJ(J){let Q=new s(J);return RJ.push(Q),Q}function CQ(){for(let J of RJ)J.clear()}function t(J,...Q){return`${Q.map((Z)=>String(Z??"")).join("\x00")}\x00${J.length}\x00${Bun.hash(J)}`}function gQ(J){let Q=[];for(let Z of new Set(J))try{Q.push({path:Z,mtimeMs:vJ.statSync(Z).mtimeMs})}catch{}return Q}function uQ(J){for(let Q of J)try{if(vJ.statSync(Q.path).mtimeMs!==Q.mtimeMs)return!1}catch{return!1}return!0}var B=null,JJ=!1,D=null,_="",M=!1,yJ=256,I=new Map,H=new Map,T=null,fJ=null,b=new Map;function k(J){return Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)}function e(J,Q){if(I.has(J))I.delete(J);else if(I.size>=yJ)I.delete(I.keys().next().value);I.set(J,Q)}function UQ(J){let Q=k(J);if(H.has(Q))H.delete(Q);else if(H.size>=yJ)H.delete(H.keys().next().value);return H.set(Q,J),Q}function lQ(J){let Q=H.get(J);if(Q===void 0)return;return H.delete(J),H.set(J,Q),Q}async function FQ(J,Q=T){if(!Q)return null;try{let Z=Bun.file(G.join(Q,`cw-${k(J)}.css`));if(!await Z.exists())return null;return await Z.text()}catch{return null}}async function jQ(J,Q,Z=T){if(!Z)return;try{if(!fs.existsSync(Z))fs.mkdirSync(Z,{recursive:!0});await Bun.write(G.join(Z,`cw-${k(J)}.css`),Q)}catch{}}async function kJ(J){try{let Q=await import(J);if(Q&&Q.CSSGenerator)return{CSSGenerator:Q.CSSGenerator,config:Q.config,build:Q.build,defaultConfig:Q.defaultConfig,extractClasses:Q.extractClasses}}catch{}return null}var WQ=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],XQ=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function VQ(){let J=[],Q=process.cwd();while(Q!==G.dirname(Q)){for(let Z of["node_modules","pantry"])for(let $ of WQ)J.push(G.join(Q,Z,...$));Q=G.dirname(Q)}return J}function qQ(){let J=[],Q=process.env.HOME||process.env.USERPROFILE||"",Z=[Q&&G.join(Q,"Code","Tools","ts-css"),Q&&G.join(Q,"Code","Tools","crosswind"),Q&&G.join(Q,"repos","stacks-org","ts-css"),Q&&G.join(Q,"repos","stacks-org","crosswind"),G.join(process.cwd(),"..","ts-css"),G.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let $ of Z)J.push(G.join($,"packages","toolkit","dist","engine","index.js")),J.push(G.join($,"packages","toolkit","src","engine","index.ts"));if(Q)J.push(G.join(Q,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return J}async function CJ(){if(JJ)return B;JJ=!0;try{let J=async(U)=>{for(let F of U){if(!await Bun.file(F).exists())continue;let j=await kJ(F);if(j){if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded from ${G.dirname(G.dirname(F))}`);return j}}return null};if(process.env.CROSSWIND_SRC){let U=G.resolve(process.env.CROSSWIND_SRC),F=await J([U]);if(!F)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${U}`);return B=F,B}let Q=await J(VQ());if(Q)return B=Q,B;let Z=XQ;for(let U of Z){let F=await kJ(U);if(F){if(B=F,!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded`);return B}}let $=await J(qQ());if($)return B=$,B;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${Y.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${Y.reset}`),console.warn(`${Y.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${Y.reset}`),null}}function oQ(){QJ.clear(),B=null,JJ=!1,D=null,_="",I.clear(),H.clear(),fJ=null,b.clear()}var xJ=!1;async function gJ(J){try{let Q=bJ({name:"css",cwd:J})?"css":bJ({name:"crosswind",cwd:J})?"crosswind":null;if(!Q)return null;if(Q==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!xJ)xJ=!0,console.warn(`${Y.yellow}[ts-css]${Y.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:Z}=await import("bunfig"),$=await Z({name:Q,cwd:J,defaultConfig:{},checkEnv:!1,verbose:!1});if(!$?.path||!$.config||Object.keys($.config).length===0)return null;let U=G.relative(J,$.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from ${U||$.path}`);return $.config}catch(Q){if(Q instanceof Error&&Q.name==="ConfigNotFoundError")return null;return console.warn(`${Y.yellow}[ts-css]${Y.reset} Failed to load css config:`,Q instanceof Error?Q.message:Q),null}}async function zQ(J){let Q=null;try{let{loadStxConfig:Z}=await import("./chunk-7r7qcpw2.js"),$=await Z(J);if($.css)if(typeof $.css==="string"){let U=G.isAbsolute($.css)?$.css:G.resolve(J,$.css);if(await Bun.file(U).exists()){let F=await import(U);Q=F.default||F,console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from stx.config.ts \u2192 ${$.css}`)}}else{if(Q={...$.css,content:$.css.content||[],preflight:$.css.preflight??!0,minify:$.css.minify??!1},$.css.config){let U=G.isAbsolute($.css.config)?$.css.config:G.resolve(J,$.css.config);if(await Bun.file(U).exists()){let F=await import(U);Q={...F.default||F,...Q}}}console.log(`${Y.green}[ts-css]${Y.reset} Using inline CSS config from stx.config.ts`)}}catch{}return Q||await gJ(J)}function GQ(J){try{let Q=new WeakSet;return k(JSON.stringify(J??{},(Z,$)=>{if(typeof $==="function")return`[fn]${String($)}`;if(typeof $==="object"&&$!==null){if(Q.has($))return"[circular]";Q.add($)}return $})??"")}catch{return"unhashable"}}async function YQ(J){if(M)return _;M=!0;try{let Q=await CJ();if(!Q||!Q.build)return M=!1,"";if(!D)D=await gJ(J);if(!D)return M=!1,"";let Z=Q.defaultConfig?.theme||{},$=D.theme||{},U={...Q.defaultConfig,...D,theme:{...Z,...$,extend:{...Z.extend||{},...$.extend||{}}}},F=performance.now(),j=await Q.build(U),V=performance.now()-F;if(_=j.css,console.log(`${Y.cyan}[ts-css]${Y.reset} Built ${j.classes.size} classes in ${V.toFixed(1)}ms`),U.output){let W=G.isAbsolute(U.output)?U.output:G.join(J,U.output),X=G.dirname(W);if(!fs.existsSync(X))fs.mkdirSync(X,{recursive:!0});await Bun.write(W,j.css)}return M=!1,j.css}catch(Q){return console.error(`${Y.red}[ts-css]${Y.reset} Build error:`,Q),M=!1,_}}async function aQ(J){D=null,await YQ(J)}function sQ(){return _}function wQ(J){let Q=new Set,Z=/class\s*=\s*["']([^"']+)["']/gi,$=Z.exec(J);while($!==null){for(let j of $[1].split(/\s+/))if(j.trim())Q.add(j.trim());$=Z.exec(J)}let U=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,F=U.exec(J);while(F!==null){let j=F[1].match(/'([^']+)'/g);if(j){for(let V of j)for(let W of V.slice(1,-1).split(/\s+/))if(W.trim())Q.add(W.trim())}F=U.exec(J)}return Q}var QJ=TJ(64);async function LQ(J,Q){let Z=()=>b.get(Q?G.resolve(Q):process.cwd())?.fingerprint??null,$=QJ.get(t(J,Q,Z()));if($!==void 0)return $;let U=await BQ(J,Q);if(U)QJ.set(t(J,Q,Z()),U);return U}async function BQ(J,Q){try{let Z=await CJ();if(!Z)return"";let $=typeof Z.extractClasses==="function"?Z.extractClasses(J):wQ(J);if($.size===0)return"";let U=Q?G.resolve(Q):process.cwd(),F=SJ(U,"cache");if(!T)T=F;let j=b.get(U);if(!j){let L=await zQ(U);j={config:L,fingerprint:GQ(L)},b.set(U,j),fJ=j.fingerprint}let V=[...$].sort().join(" "),W=`${j.fingerprint||"default"}::${V}`,X=I.get(W);if(X!==void 0)return e(W,X),X;let q=await FQ(W,F);if(q!==null)return e(W,q),q;let z=Z.defaultConfig||Z.config,w=j.config||{},O=YJ(z,w),{safelist:K,includePreflight:$J,minify:ZJ,tokenCSS:uJ}=O,x=O.config,E=new Z.CSSGenerator(x),S=x.shortcuts||w.shortcuts||{},UJ=Object.keys(S).filter((L)=>$.has(L)||K.includes(L));for(let L of K)if(!S[L])E.generate(L);for(let L of $)if(!S[L])E.generate(L);let P="";if(UJ.length>0){let L=new Z.CSSGenerator(x);for(let dJ of UJ)L.generate(dJ);if(P=L.toCSS(!1,ZJ),P&&!P.endsWith(`
22
22
  `))P+=`
23
23
  `}let A=P+E.toCSS($J,ZJ);return A=uJ+A,e(W,A),jQ(W,A,F),A}catch(Z){return console.warn("Failed to generate Css CSS:",Z),""}}async function tQ(J,Q,Z=!1,$=!1){let U=await LQ(J,Q);if(!U)return $?o(J):J;let F=Z?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${UQ(U)}.css">`:`<style data-css="generated">
24
24
  ${U}
@@ -29,4 +29,4 @@ ${F}`);return F+J}function HQ(J,Q){let Z=l(J).map((W)=>({...W,replacement:""})),
29
29
  ${Q}`});else Z.push({start:0,end:0,replacement:Q})}}Z.sort((W,X)=>W.start-X.start||W.end-X.end);for(let W=1;W<Z.length;W++)if(Z[W].start<Z[W-1].end)return OQ(o(J),Q);let F=Array(Z.length*2+1),j=0,V=0;for(let W of Z)F[V++]=J.slice(j,W.start),F[V++]=W.replacement,j=W.end;return F[V]=J.slice(j),F.join("")}function OQ(J,Q){let Z=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(Z.test(J)){let $=!1;return J.replace(Z,()=>{if($)return"";return $=!0,Q})}if(J.includes("</head>"))return J.replace("</head>",`${Q}
30
30
  </head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>
31
31
  ${Q}`);return Q+J}
32
- export{s as Ps,kQ as Qs,EQ as Rs,TJ as Ss,CQ as Ts,t as Us,gQ as Vs,uQ as Ws,h as Xs,LJ as Ys,pJ as Zs,mJ as _s,NQ as $s,HJ as at,i as bt,MQ as ct,rJ as dt,C as et,YJ as ft,l as gt,o as ht,RQ as it,Y as jt,lQ as kt,CJ as lt,oQ as mt,gJ as nt,zQ as ot,GQ as pt,YQ as qt,aQ as rt,sQ as st,wQ as tt,LQ as ut,tQ as vt};
32
+ export{s as Qs,kQ as Rs,EQ as Ss,TJ as Ts,CQ as Us,t as Vs,gQ as Ws,uQ as Xs,h as Ys,LJ as Zs,pJ as _s,mJ as $s,NQ as at,HJ as bt,i as ct,MQ as dt,rJ as et,C as ft,YJ as gt,l as ht,o as it,RQ as jt,Y as kt,lQ as lt,CJ as mt,oQ as nt,gJ as ot,zQ as pt,GQ as qt,YQ as rt,aQ as st,sQ as tt,wQ as ut,LQ as vt,tQ as wt};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function X(Q){return Q.replace(/[^\n]/g," ")}function R(Q){let H=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,X).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,X).replace(/<!--[\s\S]*?-->/g,X).replace(/\{\{\{[\s\S]*?\}\}\}/g,X).replace(/\{\{[\s\S]*?\}\}/g,X).replace(/\{!![\s\S]*?!!\}/g,X),F=new Map,J=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,z;while((z=Y.exec(H))!==null){let j=z[1]==="/",q=z[2],W=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(W)continue;if(j)J.set(q,(J.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=H.slice(0,z.index).split(`
3
3
  `).length;F.set(q,{count:1,firstLine:B})}}}let M=[];for(let j of new Set([...F.keys(),...J.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,W=J.get(j)??0;if(q!==W)M.push({tag:j,opened:q,closed:W,firstOpenLine:F.get(j)?.firstLine??0})}return M}var $=new Set;function U(Q,H){let F;try{F=R(Q)}catch{return}if(F.length===0)return;let J=`${H}:${Q.length}`;if($.has(J))return;$.add(J);let Y=H?H.split(/[/\\]/).pop()||H:"template";for(let{tag:z,opened:M,closed:j,firstOpenLine:q}of F)if(M>j){let W=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 an unclosed <${z}>${W} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 ${j-M} stray </${z}>.`)}
4
- export{R as Cv,U as Dv};
4
+ export{R as Dv,U as Ev};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Au as g,Bu as h,Cu as i,Du as j,Eu as k,Fu as l,Gu as m,Hu as n,Iu as o,Ju as p,uu as a,vu as b,wu as c,xu as d,yu as e,zu as f}from"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
2
+ import{Au as f,Bu as g,Cu as h,Du as i,Eu as j,Fu as k,Gu as l,Hu as m,Iu as n,Ju as o,Ku as p,vu as a,wu as b,xu as c,yu as d,zu as e}from"./chunk-8ghwewek.js";import"./chunk-rk8p4b1z.js";import"./chunk-d6rkgay9.js";import"./chunk-cevkpyn9.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ni as T,Oi as u,Pi as A}from"./chunk-452k8psm.js";import{bl as g,il as h,ol as b}from"./chunk-21dz636m.js";import{Do as f,Fr as I,em as k,nq as B}from"./chunk-zstrcmbj.js";import{Av as D,Bv as S}from"./chunk-rwtj7j0r.js";import{Fv as F}from"./chunk-csgshaeh.js";import P from"path";var j=new Map,K=new Map,n=["composables","functions"];function p(z){let H=P.basename(z,".ts");return H==="index"||H==="types"||z.endsWith(".d.ts")}async function r(z){if(z)return P.resolve(z);let H=`<default>:${process.cwd()}`,Y=K.get(H);if(Y!==void 0)return Y;let J=await l();if(J!==null)K.set(H,J);return J}async function l(){let z=await I(),H=z.root||process.cwd(),Y=z.composablesDir;if(Y)return P.resolve(H,Y);for(let J of n){let V=P.resolve(H,J);try{let Z=new Bun.Glob("**/*.ts");for await(let W of Z.scan({cwd:V,absolute:!0}))if(!p(W))return V}catch{}}return null}async function m(z){let H=Array.isArray(z)?z:z?[P.resolve(z)]:(await I())._layerComposableDirs??[await r()].filter((J)=>!!J),Y=new Map;for(let J of H){let V=new Bun.Glob("**/*.ts");try{for await(let Z of V.scan({cwd:J,absolute:!0})){let W=P.relative(J,Z);if(!p(Z)&&!Y.has(W))Y.set(W,Z)}}catch{}}return{key:H.join("\x00"),files:[...Y.values()].sort()}}async function Wq(z){let{files:H}=await m(z),Y=B({loader:"ts",target:"browser",define:k()}),J=[];for(let V of H)try{let Z=await Bun.file(V).text(),W=Y.scan(Z).exports.filter((G)=>G!=="default");if(W.length>0)J.push({file:V,names:W})}catch{}return J}function c(z,H){return new RegExp(`\\b${H.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(z)}function a(z,H,Y){let J=new Map;for(let{file:G,names:$}of z)for(let O of $)if(!J.has(O))J.set(O,G);let V=(G)=>{let $=[];for(let[O,w]of J)if(c(G,O))$.push(w);return $},Z=new Set,W=Y.flatMap(V);while(W.length>0){let G=[];for(let $ of W){if(Z.has($))continue;Z.add($);for(let O of V(H.get($)??""))if(!Z.has(O))G.push(O)}W=G}return Z}async function Yq(z,H,Y){let{key:J,files:V}=await m(z);if(!J)return null;let Z=()=>[...new Set([...V,...V.flatMap((q)=>g(q))])],W=T(Z());if(V.length===0)return A(j,J,W,""),null;V.sort();let G=B({loader:"ts",target:"browser",define:k()}),$=new Map,O=[];for(let q of V)try{let Q=await Bun.file(q).text();$.set(q,Q);let U=G.scan(Q).exports.filter((X)=>X!=="default");if(U.length>0)O.push({file:q,names:U})}catch{$.set(q,"")}let w=H===void 0?new Set(V):a(O,$,Y?[H,...Y]:[H]);if(w.size===0)return null;let _=V.filter((q)=>w.has(q)),M=`${J}\x00${_.join("\x00")}`,v=u(j,M,W);if(v!==void 0)return v||null;let R=[],L=new Set,C=new Set;for(let q of _)try{let Q=$.get(q)??await Bun.file(q).text(),U=P.basename(q,".ts");for(let X of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])C.add(X[1]);try{for(let X of G.scan(Q).exports)if(X!=="default")L.add(X)}catch{}if(Q=D(Q),h(Q))Q=await b(Q,q,{projectRoot:process.cwd(),externalizeUserModules:!1}),Q=f(Q);Q=S(Q),Q=Q.replace(/^export\s+(default\s+)?/gm,""),Q=G.transformSync(Q),R.push(`// Composable: ${U}
2
+ import{Ni as T,Oi as u,Pi as A}from"./chunk-452k8psm.js";import{bl as g,il as h,ol as b}from"./chunk-14rh4kd0.js";import{Eo as f,Gr as I,em as k,oq as B}from"./chunk-ptad3t7a.js";import{Bv as D,Cv as S}from"./chunk-fpxz25xz.js";import{Gv as F}from"./chunk-v54tq312.js";import P from"path";var j=new Map,K=new Map,n=["composables","functions"];function p(z){let H=P.basename(z,".ts");return H==="index"||H==="types"||z.endsWith(".d.ts")}async function r(z){if(z)return P.resolve(z);let H=`<default>:${process.cwd()}`,Y=K.get(H);if(Y!==void 0)return Y;let J=await l();if(J!==null)K.set(H,J);return J}async function l(){let z=await I(),H=z.root||process.cwd(),Y=z.composablesDir;if(Y)return P.resolve(H,Y);for(let J of n){let V=P.resolve(H,J);try{let Z=new Bun.Glob("**/*.ts");for await(let W of Z.scan({cwd:V,absolute:!0}))if(!p(W))return V}catch{}}return null}async function m(z){let H=Array.isArray(z)?z:z?[P.resolve(z)]:(await I())._layerComposableDirs??[await r()].filter((J)=>!!J),Y=new Map;for(let J of H){let V=new Bun.Glob("**/*.ts");try{for await(let Z of V.scan({cwd:J,absolute:!0})){let W=P.relative(J,Z);if(!p(Z)&&!Y.has(W))Y.set(W,Z)}}catch{}}return{key:H.join("\x00"),files:[...Y.values()].sort()}}async function Wq(z){let{files:H}=await m(z),Y=B({loader:"ts",target:"browser",define:k()}),J=[];for(let V of H)try{let Z=await Bun.file(V).text(),W=Y.scan(Z).exports.filter((G)=>G!=="default");if(W.length>0)J.push({file:V,names:W})}catch{}return J}function c(z,H){return new RegExp(`\\b${H.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(z)}function a(z,H,Y){let J=new Map;for(let{file:G,names:$}of z)for(let O of $)if(!J.has(O))J.set(O,G);let V=(G)=>{let $=[];for(let[O,w]of J)if(c(G,O))$.push(w);return $},Z=new Set,W=Y.flatMap(V);while(W.length>0){let G=[];for(let $ of W){if(Z.has($))continue;Z.add($);for(let O of V(H.get($)??""))if(!Z.has(O))G.push(O)}W=G}return Z}async function Yq(z,H,Y){let{key:J,files:V}=await m(z);if(!J)return null;let Z=()=>[...new Set([...V,...V.flatMap((q)=>g(q))])],W=T(Z());if(V.length===0)return A(j,J,W,""),null;V.sort();let G=B({loader:"ts",target:"browser",define:k()}),$=new Map,O=[];for(let q of V)try{let Q=await Bun.file(q).text();$.set(q,Q);let U=G.scan(Q).exports.filter((X)=>X!=="default");if(U.length>0)O.push({file:q,names:U})}catch{$.set(q,"")}let w=H===void 0?new Set(V):a(O,$,Y?[H,...Y]:[H]);if(w.size===0)return null;let _=V.filter((q)=>w.has(q)),M=`${J}\x00${_.join("\x00")}`,v=u(j,M,W);if(v!==void 0)return v||null;let R=[],L=new Set,C=new Set;for(let q of _)try{let Q=$.get(q)??await Bun.file(q).text(),U=P.basename(q,".ts");for(let X of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])C.add(X[1]);try{for(let X of G.scan(Q).exports)if(X!=="default")L.add(X)}catch{}if(Q=D(Q),h(Q))Q=await b(Q,q,{projectRoot:process.cwd(),externalizeUserModules:!1}),Q=f(Q);Q=S(Q),Q=Q.replace(/^export\s+(default\s+)?/gm,""),Q=G.transformSync(Q),R.push(`// Composable: ${U}
3
3
  ${Q.trim()}`)}catch(Q){console.warn(`[stx] Failed to load composable ${q}:`,Q)}if(R.length===0||L.size===0)return A(j,M,W,""),null;let t=[...L].map((q)=>` try { if (!(${JSON.stringify(q)} in __c)) __c[${JSON.stringify(q)}] = ${q}; } catch (e) {}`).join(`
4
4
  `),N=JSON.stringify([...L]),E=R.join(`
5
5
 
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{li as a}from"./chunk-1t5vwavd.js";import"./chunk-cevkpyn9.js";export{a as processDeferDirectives};