@stacksjs/stx 0.2.511 → 0.2.513

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 (126) hide show
  1. package/dist/{chunk-m6xpg33p.js → chunk-03mkxevd.js} +1 -1
  2. package/dist/{chunk-xd4zvm4x.js → chunk-1aw9qbdf.js} +3 -0
  3. package/dist/chunk-1mkyksne.js +2 -0
  4. package/dist/chunk-1wbmg22q.js +2 -0
  5. package/dist/chunk-2bdxrryj.js +2 -0
  6. package/dist/chunk-2hsp5gee.js +2 -0
  7. package/dist/{chunk-qa53jmk3.js → chunk-2yegk32c.js} +1 -1
  8. package/dist/{chunk-g495xx4v.js → chunk-365ktg70.js} +1 -1
  9. package/dist/{chunk-pj562qnx.js → chunk-38x0j2tz.js} +1 -1
  10. package/dist/chunk-3kxh9rsp.js +2 -0
  11. package/dist/chunk-3vqabd10.js +2 -0
  12. package/dist/{chunk-rvwtyrj4.js → chunk-3y8ykqpx.js} +1 -1
  13. package/dist/chunk-490f2x2r.js +2 -0
  14. package/dist/{chunk-j7bncsd9.js → chunk-4a9tt7cd.js} +1 -1
  15. package/dist/{chunk-qv57r0fa.js → chunk-4c1afy15.js} +1 -1
  16. package/dist/{chunk-8nv7xakv.js → chunk-4njn89w1.js} +5 -5
  17. package/dist/chunk-4yrk774b.js +2 -0
  18. package/dist/chunk-518kr9jb.js +2 -0
  19. package/dist/{chunk-s9fskxy7.js → chunk-5a4wj7t4.js} +5 -5
  20. package/dist/chunk-5c1qesrs.js +2 -0
  21. package/dist/chunk-5pzhcesm.js +2 -0
  22. package/dist/chunk-6bay462v.js +2 -0
  23. package/dist/{chunk-zz5b1g50.js → chunk-6k4f583z.js} +2 -2
  24. package/dist/{chunk-g7g6rc6e.js → chunk-6tmbgcv9.js} +4 -4
  25. package/dist/{chunk-1r3fmmy8.js → chunk-7smpjzzh.js} +1 -1
  26. package/dist/{chunk-mwz1mq51.js → chunk-7tzf1e7f.js} +4 -4
  27. package/dist/{chunk-5q9rmcp7.js → chunk-802qf0vz.js} +1 -1
  28. package/dist/{chunk-ej46bkaw.js → chunk-8fb1mqw1.js} +1 -1
  29. package/dist/{chunk-km9g9drp.js → chunk-9c86wgnk.js} +1 -1
  30. package/dist/{chunk-7pr8gvpc.js → chunk-a59nwgg6.js} +1 -1
  31. package/dist/chunk-a9anp4pr.js +2 -0
  32. package/dist/chunk-b0bgprzs.js +2 -0
  33. package/dist/{chunk-hka18tmt.js → chunk-bqz4wenr.js} +1 -1
  34. package/dist/chunk-bvq2hx8a.js +2 -0
  35. package/dist/{chunk-1149d93e.js → chunk-czmw5xsd.js} +2 -2
  36. package/dist/{chunk-tv2xr7s3.js → chunk-dhrzmvbj.js} +1 -1
  37. package/dist/{chunk-twqmyetp.js → chunk-dq6v78fd.js} +1 -1
  38. package/dist/chunk-epbnttw5.js +2 -0
  39. package/dist/{chunk-46wre9ep.js → chunk-fesb4h31.js} +3 -3
  40. package/dist/{chunk-npth2waq.js → chunk-fjet17jc.js} +1 -1
  41. package/dist/{chunk-5tvxv2v1.js → chunk-fp7dzqze.js} +1 -1
  42. package/dist/{chunk-68tzytfz.js → chunk-fxxrrq9n.js} +3 -3
  43. package/dist/{chunk-5tbqdz94.js → chunk-gbfap7rv.js} +2 -2
  44. package/dist/{chunk-1verz406.js → chunk-gte0wmh8.js} +5 -5
  45. package/dist/{chunk-9p3rtfbv.js → chunk-gynes6rm.js} +8 -8
  46. package/dist/{chunk-s7rbe4c6.js → chunk-h5nv63qx.js} +1 -1
  47. package/dist/{chunk-vtxzaj1h.js → chunk-hktvv0hd.js} +2 -2
  48. package/dist/{chunk-z2775k8r.js → chunk-hmyyq2hh.js} +1 -1
  49. package/dist/{chunk-5vzts63r.js → chunk-hnz2zh9q.js} +1 -1
  50. package/dist/{chunk-t77pz252.js → chunk-hqvdm4h9.js} +1 -1
  51. package/dist/chunk-j49qp4z7.js +2 -0
  52. package/dist/{chunk-vftdacyb.js → chunk-jbvg29t0.js} +1 -1
  53. package/dist/chunk-jc25dv0f.js +2 -0
  54. package/dist/{chunk-k14e9k4h.js → chunk-jf59xwba.js} +1 -1
  55. package/dist/chunk-jg62944p.js +2 -0
  56. package/dist/chunk-md8m0mpb.js +2 -0
  57. package/dist/{chunk-ph4fszwq.js → chunk-mwac03ak.js} +1 -1
  58. package/dist/chunk-ntx4axaf.js +2 -0
  59. package/dist/{chunk-91y360rc.js → chunk-p4gbvge6.js} +1 -1
  60. package/dist/chunk-pjayjj2m.js +2 -0
  61. package/dist/{chunk-5z69phk9.js → chunk-q9kq007t.js} +37 -37
  62. package/dist/chunk-qavbh6vm.js +2 -0
  63. package/dist/{chunk-a6djsvag.js → chunk-qfx532hv.js} +3 -3
  64. package/dist/chunk-qky9zfvx.js +2 -0
  65. package/dist/{chunk-x2ghjgxm.js → chunk-qm8atahn.js} +1 -1
  66. package/dist/{chunk-xmw9e9zn.js → chunk-rgh54rqz.js} +3 -3
  67. package/dist/{chunk-w9kj6t7s.js → chunk-rnnead1w.js} +1 -1
  68. package/dist/{chunk-2j1q5te2.js → chunk-shqtn2bj.js} +2 -2
  69. package/dist/chunk-skve9q8q.js +2 -0
  70. package/dist/{chunk-2dkyyewm.js → chunk-sqf60k0y.js} +2 -2
  71. package/dist/{chunk-4mmd282p.js → chunk-vdzhw78w.js} +1 -1
  72. package/dist/{chunk-g7wgpys2.js → chunk-vp827ah7.js} +4 -4
  73. package/dist/chunk-wy36z6qp.js +2 -0
  74. package/dist/{chunk-pan2t7h3.js → chunk-x1v0qyf9.js} +1 -1
  75. package/dist/chunk-x4xxfpn7.js +2 -0
  76. package/dist/{chunk-xemsypk7.js → chunk-x8mp9yvn.js} +4 -4
  77. package/dist/{chunk-tnxprz69.js → chunk-xevnx24r.js} +2 -2
  78. package/dist/chunk-xqgzwexs.js +2 -0
  79. package/dist/{chunk-e07ptggk.js → chunk-xs48j158.js} +78 -78
  80. package/dist/chunk-y3480mx8.js +2 -0
  81. package/dist/{chunk-068ank60.js → chunk-ygetbydb.js} +3 -3
  82. package/dist/{chunk-g1r4v0mc.js → chunk-yxdyh23k.js} +2 -2
  83. package/dist/{chunk-ke05jx3n.js → chunk-z6gbf119.js} +1 -1
  84. package/dist/{chunk-h6z4s5p3.js → chunk-z6nm6rf1.js} +1 -1
  85. package/dist/{chunk-7wnw3h4p.js → chunk-zgg589w4.js} +1 -1
  86. package/dist/{chunk-5zm23zrb.js → chunk-zsdhaj58.js} +40 -4
  87. package/dist/{chunk-5tkzfw4s.js → chunk-zv0vgamy.js} +3 -3
  88. package/dist/{chunk-gw9ax7xx.js → chunk-zvg1nqgw.js} +1 -1
  89. package/dist/cli.js +10 -10
  90. package/dist/craft-entry.js +2 -2
  91. package/dist/craft.js +2 -2
  92. package/dist/native/runtime/craft-bridge.js +3 -1
  93. package/dist/native/runtime/craft.d.ts +2 -0
  94. package/dist/pwa.js +2 -2
  95. package/dist/signals.js +38 -2
  96. package/dist/ssg.js +2 -2
  97. package/package.json +5 -5
  98. package/dist/chunk-11j2dj0r.js +0 -2
  99. package/dist/chunk-144xhefw.js +0 -2
  100. package/dist/chunk-18y7kk8n.js +0 -2
  101. package/dist/chunk-2a8dw04j.js +0 -2
  102. package/dist/chunk-2djfn17e.js +0 -2
  103. package/dist/chunk-2h4bf7m4.js +0 -2
  104. package/dist/chunk-33meqm5e.js +0 -2
  105. package/dist/chunk-3pczp9c0.js +0 -2
  106. package/dist/chunk-6ygvfpc5.js +0 -2
  107. package/dist/chunk-7bwkc5yf.js +0 -2
  108. package/dist/chunk-8ptefdpy.js +0 -2
  109. package/dist/chunk-8sjctqyw.js +0 -2
  110. package/dist/chunk-abxnep18.js +0 -2
  111. package/dist/chunk-aw8ehxde.js +0 -2
  112. package/dist/chunk-azv7g8rr.js +0 -2
  113. package/dist/chunk-c2vwq6gr.js +0 -2
  114. package/dist/chunk-c82gckm3.js +0 -2
  115. package/dist/chunk-dn4tww9q.js +0 -2
  116. package/dist/chunk-etbszapb.js +0 -2
  117. package/dist/chunk-j7nd8zfe.js +0 -2
  118. package/dist/chunk-jtwx2xte.js +0 -2
  119. package/dist/chunk-pzcw3trh.js +0 -2
  120. package/dist/chunk-q5jc8hmg.js +0 -2
  121. package/dist/chunk-rfqsgs51.js +0 -2
  122. package/dist/chunk-t7djn7zd.js +0 -2
  123. package/dist/chunk-vgkjmrf3.js +0 -2
  124. package/dist/chunk-w5w055g6.js +0 -2
  125. package/dist/chunk-x5gbrjm5.js +0 -2
  126. package/dist/chunk-zddtnyp7.js +0 -2
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Hr,Ao,Po}from"./chunk-tkagcknf.js";import"./chunk-g495xx4v.js";import"./chunk-c57j92td.js";import"./chunk-xd4zvm4x.js";import"./chunk-g1r4v0mc.js";import"./chunk-ba88n1j7.js";import"./chunk-e07ptggk.js";import"./chunk-9p3rtfbv.js";import"./chunk-5tbqdz94.js";import"./chunk-zz5b1g50.js";import"./chunk-twqmyetp.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{vd,ko,wd,xd,Co,zr,Eo,Sd,$o,kd,Cd,To,_o,Ro}from"./chunk-s9fskxy7.js";import"./chunk-2j1q5te2.js";import"./chunk-68tzytfz.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
2
+ import{Hr,Ao,Po}from"./chunk-tkagcknf.js";import"./chunk-365ktg70.js";import"./chunk-c57j92td.js";import"./chunk-1aw9qbdf.js";import"./chunk-yxdyh23k.js";import"./chunk-ba88n1j7.js";import"./chunk-xs48j158.js";import"./chunk-gynes6rm.js";import"./chunk-gbfap7rv.js";import"./chunk-6k4f583z.js";import"./chunk-dq6v78fd.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{wd,ko,vd,xd,Co,zr,Eo,Sd,$o,kd,Cd,_o,To,Ro}from"./chunk-5a4wj7t4.js";import"./chunk-shqtn2bj.js";import"./chunk-fxxrrq9n.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
3
3
  `),scripts:t.scripts.join(`
4
4
  `),metadata:{renderTime:0,cacheHit:!0,totalSize:c.html.length,componentCount:t.metadata.componentCount}}}let a;if(n.streaming)a=await H(t.tree,e);else a=h(t.tree,e);let i;if(n.hydrate){let o=j(a,t,e);a=o.html,i=o.data}if(n.minify)a=D(a);if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`;d.set(o,{html:a,timestamp:Date.now()})}let s=performance.now()-r;return{html:a,styles:t.styles.join(`
5
5
  `),scripts:t.scripts.join(`
6
6
  `),hydrationData:i,metadata:{renderTime:s,cacheHit:!1,totalSize:a.length,componentCount:t.metadata.componentCount}}}function V(t,e){let n=[],r=[],a=[],i=new Map,s=[];return y(t.tree,(o,c)=>{if(o.type==="component"&&o.componentName){if(T(o.componentName))n.push(o.componentName)}if(o.type==="element"&&o.tag){let p=J(o);if(p)s.push(p);if(o.props){for(let[l,f]of Object.entries(o.props))if(l.startsWith("on")&&typeof f==="string"){let g=`handler_${i.size}`;i.set(g,f)}}}if(o.isStatic&&o.type==="element")r.push(b(o));else if(!o.isStatic&&o.type!=="text")a.push(o.tag||o.componentName||"unknown")}),{nativeComponents:n,staticHTML:r,dynamicParts:a,eventHandlers:i,nativeWidgets:s}}function Y(t,e={}){let n=R(t),r=P(n,e),a=new Map,i=[];return y(n.tree,(s)=>{if(s.type==="component"&&s.componentName){if(T(s.componentName)){i.push(s.componentName);let o=`<!--craft:${s.componentName}:${s.hydrationKey||"default"}-->`;a.set(s.hydrationKey||s.componentName,o)}}}),{staticHTML:r,dynamicPlaceholders:a,craftComponents:i}}function M(t){let e={type:"fragment",children:[]},n=e,r=[e],a=t,i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(a.length>0){let s=a.match(/^<(@?[\w-]+)([^>]*)>/);if(s){let[p,l,f]=s,g=z(f),u=l.startsWith("@craft-"),C=u?l:l.toLowerCase(),S={type:u?"component":"element",tag:C,props:g,children:[],componentName:u?C.slice(1):void 0,isStatic:!v(f),hydrationKey:F()};if(n.children=n.children||[],n.children.push(S),!i.has(C)&&!f.endsWith("/"))r.push(S),n=S;a=a.slice(p.length);continue}let o=a.match(/^<\/(@?[\w-]+)>/);if(o){let[p,l]=o,g=l.startsWith("@craft-")?l:l.toLowerCase();while(r.length>1){let u=r.pop();if(n=r[r.length-1],u.tag===g)break}a=a.slice(p.length);continue}let c=a.match(/^[^<]+/);if(c){let p=c[0];if(p.trim()){let l={type:"text",text:p,isStatic:!v(p)};n.children=n.children||[],n.children.push(l)}a=a.slice(p.length);continue}a=a.slice(1)}return e}function z(t){let e={},n=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,r;while((r=n.exec(t))!==null){let[,a,i,s,o]=r,c=i??s??o??!0;e[a]=c}return e}function y(t,e,n=[]){if(e(t,n),t.children)t.children.forEach((r,a)=>{y(r,e,[...n,`${a}`])})}function h(t,e){switch(t.type){case"text":return x(t.text||"",e);case"element":case"component":{let n=t.tag||"div",r=N(t.props||{},e),a=(t.children||[]).map((i)=>h(i,e)).join("");if(!t.children||t.children.length===0){if(["input","br","hr","img","meta","link"].includes(n))return`<${n}${r} />`}return`<${n}${r}>${a}</${n}>`}case"fragment":return(t.children||[]).map((n)=>h(n,e)).join("");case"slot":return`<!--slot:${t.slotName||"default"}-->`;default:return""}}function b(t){if(t.type==="text")return t.text||"";let e=t.tag||"div",n=N(t.props||{},{});return`<${e}${n}></${e}>`}function N(t,e){let n=[];for(let[r,a]of Object.entries(t))if(a===!0)n.push(` ${r}`);else if(a!==!1&&a!==null&&a!==void 0){let i=x(String(a),e);n.push(` ${r}="${k(i)}"`)}return n.join("")}async function H(t,e){return h(t,e)}function P(t,e){let n=[];return y(t.tree,(r)=>{if(r.isStatic)n.push(h(r,e))}),n.join("")}function j(t,e,n){let r={templateId:e.id,context:n,dynamicParts:Array.from(e.dynamicParts.entries())},a=`
7
7
  <script data-craft-hydration>
8
8
  window.__CRAFT_HYDRATION__ = ${JSON.stringify(r)};
9
- </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{vd as CRAFT_BRIDGE_SCRIPT,zr as CRAFT_COMPONENTS,Sd as CRAFT_COMPONENT_RUNTIME,Eo as CRAFT_COMPONENT_STYLES,Hr as NATIVE_COMPONENTS,To as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ao as compileToNative,Po as createHotReloadServer,ko as generateCraftBridgeScript,V as generateCraftOptimizations,Ro as getAvailableFormats,_o as getAvailableTargets,Cd as getCraftComponents,G as getSSRCacheStats,Co as injectCraftBridge,wd as isCraftEnvironment,Y as prerenderForCraft,$o as processCraftComponents,xd as processCraftDirective,kd as registerCraftComponent,Q as renderSSR};
9
+ </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{wd as CRAFT_BRIDGE_SCRIPT,zr as CRAFT_COMPONENTS,Sd as CRAFT_COMPONENT_RUNTIME,Eo as CRAFT_COMPONENT_STYLES,Hr as NATIVE_COMPONENTS,_o as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ao as compileToNative,Po as createHotReloadServer,ko as generateCraftBridgeScript,V as generateCraftOptimizations,Ro as getAvailableFormats,To as getAvailableTargets,Cd as getCraftComponents,G as getSSRCacheStats,Co as injectCraftBridge,vd as isCraftEnvironment,Y as prerenderForCraft,$o as processCraftComponents,xd as processCraftDirective,kd as registerCraftComponent,Q as renderSSR};
package/dist/craft.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Hr,Ao,Po}from"./chunk-tkagcknf.js";import"./chunk-g495xx4v.js";import"./chunk-c57j92td.js";import"./chunk-xd4zvm4x.js";import"./chunk-g1r4v0mc.js";import"./chunk-ba88n1j7.js";import"./chunk-e07ptggk.js";import"./chunk-9p3rtfbv.js";import"./chunk-5tbqdz94.js";import"./chunk-zz5b1g50.js";import"./chunk-twqmyetp.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{vd,ko,wd,xd,Co,zr,Eo,Sd,$o,kd,Cd,To,_o,Ro}from"./chunk-s9fskxy7.js";import"./chunk-2j1q5te2.js";import"./chunk-68tzytfz.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
2
+ import{Hr,Ao,Po}from"./chunk-tkagcknf.js";import"./chunk-365ktg70.js";import"./chunk-c57j92td.js";import"./chunk-1aw9qbdf.js";import"./chunk-yxdyh23k.js";import"./chunk-ba88n1j7.js";import"./chunk-xs48j158.js";import"./chunk-gynes6rm.js";import"./chunk-gbfap7rv.js";import"./chunk-6k4f583z.js";import"./chunk-dq6v78fd.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{wd,ko,vd,xd,Co,zr,Eo,Sd,$o,kd,Cd,_o,To,Ro}from"./chunk-5a4wj7t4.js";import"./chunk-shqtn2bj.js";import"./chunk-fxxrrq9n.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
3
3
  `),scripts:t.scripts.join(`
4
4
  `),metadata:{renderTime:0,cacheHit:!0,totalSize:c.html.length,componentCount:t.metadata.componentCount}}}let a;if(n.streaming)a=await H(t.tree,e);else a=h(t.tree,e);let i;if(n.hydrate){let o=j(a,t,e);a=o.html,i=o.data}if(n.minify)a=D(a);if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`;d.set(o,{html:a,timestamp:Date.now()})}let s=performance.now()-r;return{html:a,styles:t.styles.join(`
5
5
  `),scripts:t.scripts.join(`
6
6
  `),hydrationData:i,metadata:{renderTime:s,cacheHit:!1,totalSize:a.length,componentCount:t.metadata.componentCount}}}function V(t,e){let n=[],r=[],a=[],i=new Map,s=[];return y(t.tree,(o,c)=>{if(o.type==="component"&&o.componentName){if(T(o.componentName))n.push(o.componentName)}if(o.type==="element"&&o.tag){let p=J(o);if(p)s.push(p);if(o.props){for(let[l,f]of Object.entries(o.props))if(l.startsWith("on")&&typeof f==="string"){let g=`handler_${i.size}`;i.set(g,f)}}}if(o.isStatic&&o.type==="element")r.push(b(o));else if(!o.isStatic&&o.type!=="text")a.push(o.tag||o.componentName||"unknown")}),{nativeComponents:n,staticHTML:r,dynamicParts:a,eventHandlers:i,nativeWidgets:s}}function Y(t,e={}){let n=R(t),r=P(n,e),a=new Map,i=[];return y(n.tree,(s)=>{if(s.type==="component"&&s.componentName){if(T(s.componentName)){i.push(s.componentName);let o=`<!--craft:${s.componentName}:${s.hydrationKey||"default"}-->`;a.set(s.hydrationKey||s.componentName,o)}}}),{staticHTML:r,dynamicPlaceholders:a,craftComponents:i}}function M(t){let e={type:"fragment",children:[]},n=e,r=[e],a=t,i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(a.length>0){let s=a.match(/^<(@?[\w-]+)([^>]*)>/);if(s){let[p,l,f]=s,g=z(f),u=l.startsWith("@craft-"),C=u?l:l.toLowerCase(),S={type:u?"component":"element",tag:C,props:g,children:[],componentName:u?C.slice(1):void 0,isStatic:!v(f),hydrationKey:F()};if(n.children=n.children||[],n.children.push(S),!i.has(C)&&!f.endsWith("/"))r.push(S),n=S;a=a.slice(p.length);continue}let o=a.match(/^<\/(@?[\w-]+)>/);if(o){let[p,l]=o,g=l.startsWith("@craft-")?l:l.toLowerCase();while(r.length>1){let u=r.pop();if(n=r[r.length-1],u.tag===g)break}a=a.slice(p.length);continue}let c=a.match(/^[^<]+/);if(c){let p=c[0];if(p.trim()){let l={type:"text",text:p,isStatic:!v(p)};n.children=n.children||[],n.children.push(l)}a=a.slice(p.length);continue}a=a.slice(1)}return e}function z(t){let e={},n=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,r;while((r=n.exec(t))!==null){let[,a,i,s,o]=r,c=i??s??o??!0;e[a]=c}return e}function y(t,e,n=[]){if(e(t,n),t.children)t.children.forEach((r,a)=>{y(r,e,[...n,`${a}`])})}function h(t,e){switch(t.type){case"text":return x(t.text||"",e);case"element":case"component":{let n=t.tag||"div",r=N(t.props||{},e),a=(t.children||[]).map((i)=>h(i,e)).join("");if(!t.children||t.children.length===0){if(["input","br","hr","img","meta","link"].includes(n))return`<${n}${r} />`}return`<${n}${r}>${a}</${n}>`}case"fragment":return(t.children||[]).map((n)=>h(n,e)).join("");case"slot":return`<!--slot:${t.slotName||"default"}-->`;default:return""}}function b(t){if(t.type==="text")return t.text||"";let e=t.tag||"div",n=N(t.props||{},{});return`<${e}${n}></${e}>`}function N(t,e){let n=[];for(let[r,a]of Object.entries(t))if(a===!0)n.push(` ${r}`);else if(a!==!1&&a!==null&&a!==void 0){let i=x(String(a),e);n.push(` ${r}="${k(i)}"`)}return n.join("")}async function H(t,e){return h(t,e)}function P(t,e){let n=[];return y(t.tree,(r)=>{if(r.isStatic)n.push(h(r,e))}),n.join("")}function j(t,e,n){let r={templateId:e.id,context:n,dynamicParts:Array.from(e.dynamicParts.entries())},a=`
7
7
  <script data-craft-hydration>
8
8
  window.__CRAFT_HYDRATION__ = ${JSON.stringify(r)};
9
- </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{vd as CRAFT_BRIDGE_SCRIPT,zr as CRAFT_COMPONENTS,Sd as CRAFT_COMPONENT_RUNTIME,Eo as CRAFT_COMPONENT_STYLES,Hr as NATIVE_COMPONENTS,To as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ao as compileToNative,Po as createHotReloadServer,ko as generateCraftBridgeScript,V as generateCraftOptimizations,Ro as getAvailableFormats,_o as getAvailableTargets,Cd as getCraftComponents,G as getSSRCacheStats,Co as injectCraftBridge,wd as isCraftEnvironment,Y as prerenderForCraft,$o as processCraftComponents,xd as processCraftDirective,kd as registerCraftComponent,Q as renderSSR};
9
+ </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{wd as CRAFT_BRIDGE_SCRIPT,zr as CRAFT_COMPONENTS,Sd as CRAFT_COMPONENT_RUNTIME,Eo as CRAFT_COMPONENT_STYLES,Hr as NATIVE_COMPONENTS,_o as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ao as compileToNative,Po as createHotReloadServer,ko as generateCraftBridgeScript,V as generateCraftOptimizations,Ro as getAvailableFormats,To as getAvailableTargets,Cd as getCraftComponents,G as getSSRCacheStats,Co as injectCraftBridge,vd as isCraftEnvironment,Y as prerenderForCraft,$o as processCraftComponents,xd as processCraftDirective,kd as registerCraftComponent,Q as renderSSR};
@@ -408,7 +408,9 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
408
408
  getHeartRateSamples: (options = {}) => request("Health", "getHeartRateSamples", [options]),
409
409
  getSleepIntervals: (options = {}) => request("Health", "getSleepIntervals", [options]),
410
410
  saveMindfulSession: (session) => request("Health", "saveMindfulSession", [session]),
411
- getMindfulSessions: (options = {}) => request("Health", "getMindfulSessions", [options])
411
+ getMindfulSessions: (options = {}) => request("Health", "getMindfulSessions", [options]),
412
+ startHeartRateUpdates: (options = {}) => request("Health", "startHeartRateUpdates", [{ since: typeof options.since === "number" ? options.since : null }]),
413
+ stopHeartRateUpdates: () => request("Health", "stopHeartRateUpdates", [{}])
412
414
  };
413
415
  craft.scheduleNotification = craft.notifications.schedule;
414
416
  craft.cancelNotification = craft.notifications.cancel;
@@ -191,6 +191,8 @@ export declare interface NativeCraft {
191
191
  getSleepIntervals: (options?: { startDate?: number, endDate?: number }) => Promise<Array<Record<string, unknown>>>
192
192
  saveMindfulSession: (session: { id: string, startDate: number, endDate: number }) => Promise<{ id: string, externalId: string, existing: boolean }>
193
193
  getMindfulSessions: (options?: { startDate?: number, endDate?: number, limit?: number }) => Promise<Array<Record<string, unknown>>>
194
+ startHeartRateUpdates: (options?: { since?: number }) => Promise<boolean>
195
+ stopHeartRateUpdates: () => Promise<boolean>
194
196
  }
195
197
  scheduledWorkouts?: {
196
198
  isSupported: () => Promise<boolean>
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Ln,Oe,Bo,Wa}from"./chunk-qv57r0fa.js";import{Nn,Vr,Ha,Va,Ua}from"./chunk-vftdacyb.js";import{No,Lo,jo,Fa,za}from"./chunk-e62nw7zk.js";import{oe,gt,Ur}from"./chunk-hkjqqx92.js";import{Xc,Gc,Jc,Yc,fr,mu}from"./chunk-3ynfz6h8.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
3
- Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-aw8ehxde.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
2
+ import{Ln,Oe,Bo,Wa}from"./chunk-4c1afy15.js";import{Nn,Vr,Ha,Va,Ua}from"./chunk-jbvg29t0.js";import{No,Lo,jo,Fa,za}from"./chunk-e62nw7zk.js";import{oe,gt,Ur}from"./chunk-hkjqqx92.js";import{Xc,Gc,Jc,Yc,fr,mu}from"./chunk-3ynfz6h8.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
3
+ Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-skve9q8q.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
4
4
  <html lang="en">
5
5
  <head>
6
6
  <meta charset="UTF-8">
package/dist/signals.js CHANGED
@@ -2782,6 +2782,13 @@ catch (e) {
2782
2782
  // :options="environmentOptions".
2783
2783
  function preserveConditionalComponentScopes(root, callerScope) {
2784
2784
  if (!root || !root.querySelectorAll) return;
2785
+ // A <template :if> branch is inert source: what shows is a clone of its
2786
+ // content, hydrated and bound by processTemplateNodes when it is inserted.
2787
+ // A DOM whose querySelectorAll reaches into template content (the test
2788
+ // DOM, a native host) would otherwise bind the SOURCE component's caller
2789
+ // props here, consuming :value on the source, so every clone carried the
2790
+ // value of the moment it was cloned and stopped following the page.
2791
+ if (root.tagName === 'TEMPLATE') return;
2785
2792
  var scopeEls = [];
2786
2793
  if (root.matches && root.matches('[data-stx-scope]')) scopeEls.push(root);
2787
2794
  root.querySelectorAll('[data-stx-scope]').forEach(function(scopeEl) { scopeEls.push(scopeEl); });
@@ -4309,6 +4316,33 @@ catch (e2) {
4309
4316
  return !!row && (!scope || scope[row.name] !== row.signal);
4310
4317
  }
4311
4318
 
4319
+ // Where a structural directive's output goes is wherever its placeholder
4320
+ // is NOW, not the parent it was bound under. Something may move the
4321
+ // placeholder after binding: the router adopts the first page into a
4322
+ // retained screen (<div data-stx-screen>) by moving the container's
4323
+ // children, and an app may move a node itself. A :for or :if at the top
4324
+ // level of a page kept inserting into the container while its placeholder
4325
+ // sat in the screen, and the browser threw "insertBefore: the node before
4326
+ // which the new node is to be inserted is not a child of this node" -- the
4327
+ // page went blank the first time a top-level condition changed. The
4328
+ // if/else chain has always inserted at its placeholder's parent; :if and
4329
+ // :for now do the same. Hidden nodes registered on the old parent (#1954)
4330
+ // follow, so a later disposal walk of the new one still finds them.
4331
+ function followPlaceholder(placeholder, parent, nodes) {
4332
+ var now = placeholder.parentNode;
4333
+ if (!now || now === parent) return parent;
4334
+ var held = parent && parent.__stx_detached_if;
4335
+ if (held && nodes) {
4336
+ nodes.forEach(function(node) {
4337
+ if (!held.has(node)) return;
4338
+ held.delete(node);
4339
+ if (!now.__stx_detached_if) now.__stx_detached_if = new Set();
4340
+ now.__stx_detached_if.add(node);
4341
+ });
4342
+ }
4343
+ return now;
4344
+ }
4345
+
4312
4346
  function bindFor(el, passedScope = componentScope, attrName = '@for') {
4313
4347
  if (el.__stx_for_bound) return;
4314
4348
  el.__stx_for_bound = true;
@@ -4322,7 +4356,7 @@ catch (e2) {
4322
4356
  }
4323
4357
 
4324
4358
  const [, itemName, indexName, listExpr] = match;
4325
- const parent = el.parentNode;
4359
+ let parent = el.parentNode;
4326
4360
 
4327
4361
  // Guard: if element has no parent, it's detached - skip processing
4328
4362
  if (!parent) {
@@ -4631,6 +4665,7 @@ catch (e) {
4631
4665
  };
4632
4666
 
4633
4667
  effect(() => {
4668
+ parent = followPlaceholder(placeholder, parent);
4634
4669
  // Use evalLazy for the list expression \u2014 only tracks the list signal,
4635
4670
  // not every signal in the component scope. This prevents unrelated
4636
4671
  // signals (modalOpen, menuOpen, etc.) from triggering a full rebuild.
@@ -5341,7 +5376,7 @@ catch (e) { /* a disposer of its own is not this branch's problem */ }
5341
5376
  el.__stx_if_bound = true;
5342
5377
 
5343
5378
  const expr = el.getAttribute(attrName);
5344
- const parent = el.parentNode;
5379
+ let parent = el.parentNode;
5345
5380
 
5346
5381
  // Guard: if element has no parent, it's detached - skip processing
5347
5382
  if (!parent) {
@@ -5462,6 +5497,7 @@ catch (e2) {
5462
5497
  const directSignal = fullScope[expr];
5463
5498
 
5464
5499
  effect(() => {
5500
+ parent = followPlaceholder(placeholder, parent, currentNodes);
5465
5501
  var value;
5466
5502
  if (directSignal && (directSignal._isSignal || directSignal._isDerived)) {
5467
5503
  value = directSignal();
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-2hc5mbw8.js";import"./chunk-g495xx4v.js";import"./chunk-c57j92td.js";import{et,tt,nt,rt,st,ot}from"./chunk-xd4zvm4x.js";import"./chunk-g1r4v0mc.js";import"./chunk-ba88n1j7.js";import{f,Be,N,K,n,o}from"./chunk-e07ptggk.js";import"./chunk-9p3rtfbv.js";import{nr}from"./chunk-5tbqdz94.js";import"./chunk-zz5b1g50.js";import"./chunk-twqmyetp.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import"./chunk-mwz1mq51.js";import{ie,mt,ht}from"./chunk-xmw9e9zn.js";import{Do,Oo,Mo}from"./chunk-er7y8hk9.js";import{ft,Yt,Zt}from"./chunk-g7ey7mtw.js";import"./chunk-68tzytfz.js";import{a}from"./chunk-dne8n6h3.js";import x from"fs";import g from"path";import{createHash as Dt}from"crypto";function Rt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Ct(t){return Bun.hash(t).toString(16)}function ut(t,i={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,r=t.replace(kt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(i.minify)h=Rt(h);let S=Ct(h);if(!s.has(S))s.set(S,h);let P=i.integrity?` data-stx-integrity="sha384-${Dt("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(s,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Et=new Set(["visible","idle"]);function dt(t){if(!t.includes("data-stx-src="))return t;let i=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=s.exec(t))!==null)i.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Et.has(i.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var It=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function q(t){let i=t.trim();if(!i)return null;let s=/^https?:\/\//i.test(i)?i:`https://${i}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Bt(t){for(let i of It){let s=t[i];if(!s)continue;let r=q(s);if(r)return{url:r,source:"env",via:i}}return null}function gt(t){if(!t||typeof t!=="object")return null;let i=t,s=i.site?.url??i.url??i.app?.url;return typeof s==="string"?q(s):null}async function jt(t){let{existsSync:i}=await import("fs"),s=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(t,r);if(!i(c))continue;try{let e=await import(c),l=gt(e.default??e);if(l)return l}catch{}}return null}async function pt(t={}){let i=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let l=q(t.explicit);if(l)return{url:l,source:"option"}}let r=gt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await jt(i);if(c)return{url:c,source:"site.config",via:"url"};let e=Bt(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function wt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
2
+ import"./chunk-2hc5mbw8.js";import"./chunk-365ktg70.js";import"./chunk-c57j92td.js";import{et,tt,nt,rt,st,ot}from"./chunk-1aw9qbdf.js";import"./chunk-yxdyh23k.js";import"./chunk-ba88n1j7.js";import{f,Be,N,K,n,o}from"./chunk-xs48j158.js";import"./chunk-gynes6rm.js";import{nr}from"./chunk-gbfap7rv.js";import"./chunk-6k4f583z.js";import"./chunk-dq6v78fd.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import"./chunk-7tzf1e7f.js";import{ie,mt,ht}from"./chunk-rgh54rqz.js";import{Do,Oo,Mo}from"./chunk-er7y8hk9.js";import{ft,Yt,Zt}from"./chunk-g7ey7mtw.js";import"./chunk-fxxrrq9n.js";import{a}from"./chunk-dne8n6h3.js";import x from"fs";import g from"path";import{createHash as Dt}from"crypto";function Rt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Ct(t){return Bun.hash(t).toString(16)}function ut(t,i={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,r=t.replace(kt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(i.minify)h=Rt(h);let S=Ct(h);if(!s.has(S))s.set(S,h);let P=i.integrity?` data-stx-integrity="sha384-${Dt("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(s,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Et=new Set(["visible","idle"]);function dt(t){if(!t.includes("data-stx-src="))return t;let i=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=s.exec(t))!==null)i.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Et.has(i.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var It=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function q(t){let i=t.trim();if(!i)return null;let s=/^https?:\/\//i.test(i)?i:`https://${i}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Bt(t){for(let i of It){let s=t[i];if(!s)continue;let r=q(s);if(r)return{url:r,source:"env",via:i}}return null}function gt(t){if(!t||typeof t!=="object")return null;let i=t,s=i.site?.url??i.url??i.app?.url;return typeof s==="string"?q(s):null}async function jt(t){let{existsSync:i}=await import("fs"),s=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(t,r);if(!i(c))continue;try{let e=await import(c),l=gt(e.default??e);if(l)return l}catch{}}return null}async function pt(t={}){let i=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let l=q(t.explicit);if(l)return{url:l,source:"option"}}let r=gt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await jt(i);if(c)return{url:c,source:"site.config",via:"url"};let e=Bt(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function wt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
3
  `)}class yt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,i=""){this.cacheDir=t,this.salt=i}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let i=JSON.parse(await Bun.file(t).text());for(let[s,r]of Object.entries(i))this.cache.set(s,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),i={};for(let[s,r]of this.cache)i[s]=r;await Bun.write(t,JSON.stringify(i))}getHash(t,i){let s=x.statSync(t),r=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of i)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let c=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);c=(c<<5)-c+l,c=c&c}return Math.abs(c).toString(36)}get(t,i){let s=this.cache.get(t);if(!s)return null;let r=this.getHash(i,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(t),null;return s.html}set(t,i,s,r){let c=this.getHash(i,s);this.cache.set(t,{hash:c,html:r,generatedAt:Date.now(),dependencies:s})}}class St{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let i=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",i)}async get(t){let i=this.getFilePath(t);if(!await Bun.file(i).exists())return null;try{return JSON.parse(await Bun.file(i).text())}catch{return null}}async set(t,i){let s=this.getFilePath(t);await x.promises.mkdir(g.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(i))}async invalidate(t){let i=this.getFilePath(t);if(await Bun.file(i).exists())await x.promises.unlink(i)}async invalidatePattern(t){let i=g.join(this.cacheDir,"isr");if(!x.existsSync(i))return;let s=await x.promises.readdir(i);for(let r of s){let c=r.replace(/_/g,"/").replace(".json","");if(t.test(c))await x.promises.unlink(g.join(i,r))}}async needsRevalidation(t){let i=await this.get(t);if(!i)return!0;return Date.now()>i.revalidateAfter}}async function Ft(t){try{let s=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!s)return null;let r=s[1];if(!r.includes("getStaticPaths"))return null;let c=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!c)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${c[1]}
@@ -41,7 +41,7 @@ ${t.map((r)=>{let c=new URL(r.loc,i).href,e=` <url>
41
41
  ${s.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function zt(t={}){let i=Date.now();ht();let s=await o(process.cwd()),r=s.build||{},c=await pt({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(wt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-6ygvfpc5.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-s7rbe4c6.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new yt(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-6ygvfpc5.js");await u('<div class="bg-black"></div>')}catch{}et();let vt=s?.routeMiddleware?.dir||"middleware";await nt(process.cwd(),vt);let H=tt();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let bt=s?.routeMiddleware?.global||[];Mo(s?.layoutsDir,a(process.cwd()));let V=N(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${V.length} routes`);let _=[];for(let u of V){let m=await Ot(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],X=[];for(let u=0;u<_.length;u+=e.concurrency)X.push(_.slice(u,u+e.concurrency));for(let u of X)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:Pt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Jt(j),$t=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],it=[...bt,...$t];if(it.length>0){let C=rt(d,L,F||{}),O=st(C,null,void 0,{isServer:!0}),E=await ot(it,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Vt(String(R),d),T=Kt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let at=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(at)try{if(!await Function("route",`
44
+ </rss>`}async function zt(t={}){let i=Date.now();ht();let s=await o(process.cwd()),r=s.build||{},c=await pt({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(wt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-518kr9jb.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-h5nv63qx.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new yt(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-518kr9jb.js");await u('<div class="bg-black"></div>')}catch{}et();let vt=s?.routeMiddleware?.dir||"middleware";await nt(process.cwd(),vt);let H=tt();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let bt=s?.routeMiddleware?.global||[];Mo(s?.layoutsDir,a(process.cwd()));let V=N(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${V.length} routes`);let _=[];for(let u of V){let m=await Ot(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],X=[];for(let u=0;u<_.length;u+=e.concurrency)X.push(_.slice(u,u+e.concurrency));for(let u of X)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:Pt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Jt(j),$t=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],it=[...bt,...$t];if(it.length>0){let C=rt(d,L,F||{}),O=st(C,null,void 0,{isServer:!0}),E=await ot(it,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Vt(String(R),d),T=Kt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let at=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(at)try{if(!await Function("route",`
45
45
  const validate = ${at[1]};
46
46
  return validate(route);
47
47
  `)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,ct=!1;if(e.cache){if(k=B.get(d,v.filePath),k)ct=!0,l.cachedCount++}if(!k){let C=await xt(v,L,Pt,e,s);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.511",
4
+ "version": "0.2.513",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -122,12 +122,12 @@
122
122
  "dependencies": {
123
123
  "@stacksjs/ts-css": "^0.3.11",
124
124
  "@stacksjs/clapp": "^0.2.16",
125
- "@stacksjs/desktop": "0.2.511",
126
- "@stacksjs/sanitizer": "0.2.511",
125
+ "@stacksjs/desktop": "0.2.513",
126
+ "@stacksjs/sanitizer": "0.2.513",
127
127
  "@stacksjs/ts-i18n": "^0.1.11",
128
- "bun-plugin-stx": "0.2.511",
128
+ "bun-plugin-stx": "0.2.513",
129
129
  "bunfig": "^0.15.19",
130
- "stx-router": "0.2.511",
130
+ "stx-router": "0.2.513",
131
131
  "ts-broadcasting": "^0.0.11",
132
132
  "ts-images": "^0.2.22",
133
133
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{W,Gr,Jr,Za,wt,Ho,Yr,Vo,Rd,Le,Zr,he}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import{wi,s}from"./chunk-xemsypk7.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{W as BROWSER_CORE_IMPORTS,Za as STX_AUTO_IMPORTS,Gr as extractAndStripCssImports,Le as extractBridgeData,wi as findInterpolationEnd,Vo as generateAutoImportDestructuring,Rd as generateBrowserAutoImportDestructuring,Zr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,he as processClientScript,Yr as referencesName,Jr as renderVendorStyleTags,s as stripCommentsAndLiterals,Ho as transformAutoImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xd,$c,be,ui,Gd,ms,hs,ys}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Gd as clearOnceStore,ui as onceStore,be as partialsCache,ms as processIncludes,hs as processStackPushDirectives,ys as processStackReplacements,Xd as resetUnscopedSignalWarnings,$c as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zc}from"./chunk-qa53jmk3.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Zc as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qc}from"./chunk-m6xpg33p.js";import"./chunk-8nv7xakv.js";import"./chunk-mwz1mq51.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Qc as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{on,gc,as}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import{Se}from"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Se as freeIdentifiers,as as processComponents,gc as processESImports,on as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Nn,Vr,Ha,Va,Ua}from"./chunk-vftdacyb.js";import"./chunk-qv57r0fa.js";export{Va as generateManifestLink,Nn as generatePwaTags,Ha as generateSwRegistrationScript,Ua as generateThemeColorMeta,Vr as injectPwaTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vt,Wr,qr,Kr,_d,Xr}from"./chunk-mwz1mq51.js";import"./chunk-kp4mzspk.js";import"./chunk-zz5b1g50.js";import"./chunk-xd4zvm4x.js";export{qr as buildServerApi,_d as createServerApi,vt as discoverServerApi,Wr as generateApiTypes,Xr as isServerApiSource,Kr as productionApiDispatcher};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$s,Ts,_s,Rs,er,tr,Qd,eu,tu,nu,nr,ru}from"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";export{ru as generateDefaultRobotsTxt,nr as generateRobotsTxt,eu as generateSitemap,tu as generateSitemapIndex,Rs as injectSeoTags,er as metaDirective,$s as processMetaDirectives,_s as processSeoDirective,Ts as processStructuredData,Qd as registerSeoDirectives,nu as scanForSitemapEntries,tr as structuredDataDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hd,Xo,Vd,Go,cc,lc,kt,sn,Ud,dc,uc,pc,f}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{kt as buildCss,dc as extractClassNames,lc as fingerprintConfig,uc as generateCss,Ud as getCachedCSS,Hd as getCssServeAsset,f as injectCss,Xo as loadCssEngine,Go as loadCssEngineConfig,sn as rebuildCss,Vd as resetCssCache,cc as resolveUserCssConfig,pc as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{aa,xl,ca,la,Sl,kl}from"./chunk-ph4fszwq.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{kl as applySlots,Sl as extractSlotContent,xl as parseSlotElement,aa as parseSlots,la as processSlots,ca as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vr,eo,Tn,wr,xr,Dt,dt,to,_n,Rn,Sr,kr,el,tl,Re}from"./chunk-1verz406.js";export{Re as DeployError,eo as calculateSha1,Tn as collectDeployFiles,Rn as createDefaultNetlifyConfig,wr as createFileManifest,vr as createNetlifyClient,el as deploy,_n as detectProjectConfig,xr as filterRequiredFiles,Dt as formatSize,to as generateNetlifyToml,dt as getTotalSize,kr as hasNetlifyConfig,tl as initNetlify,Sr as writeNetlifyConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{To,_o,Ro,Ed}from"./chunk-s9fskxy7.js";import"./chunk-2j1q5te2.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{To as buildNative,Ed as default,Ro as getAvailableFormats,_o as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{nd,rd}from"./chunk-ke05jx3n.js";import"./chunk-xmw9e9zn.js";import"./chunk-mwz1mq51.js";import"./chunk-2hc5mbw8.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{rd as clearStoreCache,nd as getStoreScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{K,vs,ws,xs,n}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{K as injectRouterScript,n as processDirectives,vs as processJsonDirective,ws as processOnceDirective,xs as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xt,gs,di,Ec}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Ec as declareBareLoopHead,xt as parseLoopBinding,di as processLoops,gs as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sa,ka,Ca,Ea,$a,Ta,_a,Ra,Aa,Pa,Il}from"./chunk-068ank60.js";export{Sa as createIslandRegistry,Il as default,Pa as generateIslandManifest,Ca as generatePartialHydrationCSS,Ta as hydrateAll,$a as hydrateByStrategy,Ea as hydrateIsland,_a as isHydrated,Ra as onHydrated,ka as processPartialHydrationDirectives,Aa as processStaticDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ui,Wi}from"./chunk-5z69phk9.js";import"./chunk-qa53jmk3.js";import"./chunk-m6xpg33p.js";import"./chunk-1verz406.js";import"./chunk-2j04bc8c.js";import"./chunk-7pr8gvpc.js";import"./chunk-01rz8h7x.js";import"./chunk-5vzts63r.js";import{io}from"./chunk-8nv7xakv.js";import"./chunk-4hz4g5ym.js";import"./chunk-jcmgj8kk.js";import"./chunk-2dkyyewm.js";import"./chunk-ej46bkaw.js";import"./chunk-n34kagea.js";import"./chunk-ph4fszwq.js";import"./chunk-rvwtyrj4.js";import"./chunk-5tkzfw4s.js";import"./chunk-46wre9ep.js";import"./chunk-g7wgpys2.js";import"./chunk-068ank60.js";import"./chunk-8xpyzcq2.js";import"./chunk-67actssw.js";import"./chunk-npth2waq.js";import"./chunk-h6q8jafh.js";import"./chunk-3s9s1mdt.js";import"./chunk-s9mq9x2k.js";import"./chunk-1c407nky.js";import"./chunk-xx2pk2ay.js";import"./chunk-ke05jx3n.js";import"./chunk-5zm23zrb.js";import"./chunk-7wnw3h4p.js";import"./chunk-2j1q5te2.js";import"./chunk-er7y8hk9.js";import"./chunk-xmw9e9zn.js";import"./chunk-mwz1mq51.js";import"./chunk-2hc5mbw8.js";import{he,nn,rn,K,u,n,Jn,R,o,le}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Jn as buildWebComponents,rn as cacheTemplate,nn as checkCache,io as classifyAllScripts,Ui as createMiddleware,Wi as createRoute,R as defaultConfig,u as extractVariables,K as injectRouterScript,o as loadStxConfig,he as processClientScript,n as processDirectives,le as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Tr,_r,Rr,da,ua,pa,yo,fa,ga}from"./chunk-rvwtyrj4.js";export{Tr as ImageProcessorCache,yo as applyTransformations,da as clearImageCache,fa as generateResponsiveVariants,ga as generateSrcset,_r as getCachedImageResult,pa as optimizeImage,ua as processImage,Rr as setCachedImageResult};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{al}from"./chunk-5vzts63r.js";import"./chunk-8nv7xakv.js";import"./chunk-5zm23zrb.js";import"./chunk-mwz1mq51.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{al as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cl,El,$l,Tl,_l,Rl,Al}from"./chunk-46wre9ep.js";export{El as createKeepAliveCache,Tl as generateKeepAliveCSS,_l as generateKeepAliveRuntime,Rl as onActivated,Al as onDeactivated,Cl as processKeepAliveDirectives,$l as shouldCacheComponent};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ho,wl}from"./chunk-ej46bkaw.js";export{ho as definePlugin,wl as pluginManager};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$e,Te,_e}from"./chunk-1149d93e.js";export{$e as createContext,Te as updateContextStoryFiles,_e as updateContextTree};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{R,Nc,o,A,Yd,Zd}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{A as config,R as defaultConfig,Yd as defineStxConfig,o as loadStxConfig,Nc as resolveStxDirectories,Zd as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lr,Ml,Nl}from"./chunk-npth2waq.js";import"./chunk-xmw9e9zn.js";import"./chunk-mwz1mq51.js";import"./chunk-2hc5mbw8.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Nl as clearComposableCache,Ml as getComposableScript,Lr as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vo,wo,ba,va,wa,xa,Pl}from"./chunk-g7wgpys2.js";export{vo as createVirtualList,Pl as default,ba as generateVirtualListCSS,wa as processInfiniteListDirectives,xa as processVirtualGridDirectives,wo as processVirtualListDirectives,va as useVirtualList};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Et,bc,vc,wc,xc,Sc,u,kc,ps,Cc,ci,li}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Et as STX_ENGINE_BINDING_NAMES,ps as convertToCommonJS,ci as extractScriptFromTemplate,u as extractVariables,li as hasVariables,kc as isCompleteImport,Sc as isMissingBindingFailure,wc as isModuleResolutionFailure,xc as isSyntaxFailure,Cc as splitDeclaration,bc as stripTypeScript,vc as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vl}from"./chunk-2dkyyewm.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{vl as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ie,qa,Fo,mt,ht,Td,zo,yt,Qt,Ka,Xa,Ga,Ja,bt,Ya}from"./chunk-xmw9e9zn.js";import"./chunk-mwz1mq51.js";import"./chunk-2hc5mbw8.js";import"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{Qt as MODULE_SPECIFIER_PREFIX,bt as bundleClientScript,ht as clearBundleFailures,ie as clientBundleDependencies,mt as getBundleFailures,yt as hasUserImports,Xa as normalizeRegistrySpecifiers,Ja as queueClientBundleBuild,Fo as recordBundleFailure,Ka as registryIdForPath,zo as resolveBundlerFallback,Ga as rewriteRegistryImports,Td as setBundlerFallbackMode,qa as shouldLogBundlerDiagnostics,Ya as tempBuildName};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ea,oo,rl,ta,na,sl,ol}from"./chunk-7pr8gvpc.js";import"./chunk-npth2waq.js";import"./chunk-xmw9e9zn.js";import"./chunk-mwz1mq51.js";import"./chunk-2hc5mbw8.js";import{He,fc}from"./chunk-e07ptggk.js";import"./chunk-68tzytfz.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-twqmyetp.js";import"./chunk-zz5b1g50.js";import"./chunk-5tbqdz94.js";import"./chunk-9p3rtfbv.js";import"./chunk-g495xx4v.js";import"./chunk-ba88n1j7.js";import"./chunk-g1r4v0mc.js";import"./chunk-xd4zvm4x.js";import"./chunk-e6y6s7q8.js";export{ea as buildVirtualSource,He as extractScriptBlocks,fc as extractTemplateExpressions,ta as findRuntimeTypeDeclarations,na as findStxModuleDeclarations,ol as formatTypecheckDiagnostics,rl as sourcePathFor,sl as typecheckStxFiles,oo as virtualPathFor};