@stacksjs/stx 0.2.887 → 0.2.888
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.
- package/dist/chunk-000mwmfq.js +1203 -0
- package/dist/chunk-043d0en0.js +2 -0
- package/dist/{chunk-3cq4a4x7.js → chunk-0d7ypcjb.js} +2 -2
- package/dist/{chunk-02qmvcmv.js → chunk-0dq9svfb.js} +2 -2
- package/dist/{chunk-cb0c6959.js → chunk-0hj5apb9.js} +1 -1
- package/dist/chunk-0w66z6eq.js +2 -0
- package/dist/{chunk-n22xtagg.js → chunk-11fxbd71.js} +2 -2
- package/dist/chunk-13wd9gf0.js +3 -0
- package/dist/{chunk-zch65qrd.js → chunk-1kc0jyhj.js} +1 -1
- package/dist/{chunk-ram5944w.js → chunk-1wkp3pks.js} +2 -2
- package/dist/{chunk-69ezjc8k.js → chunk-1xpq83mc.js} +4 -4
- package/dist/chunk-1znqedae.js +2 -0
- package/dist/{chunk-gvd8nb8z.js → chunk-2assyczz.js} +1 -1
- package/dist/{chunk-cev5z6gj.js → chunk-2drzzjcm.js} +1 -1
- package/dist/{chunk-y6eaqs8v.js → chunk-2rmqmajd.js} +3 -3
- package/dist/{chunk-59er0fc7.js → chunk-303vzq80.js} +3 -3
- package/dist/{chunk-zj5eq4b6.js → chunk-372xh1g1.js} +4 -4
- package/dist/chunk-3c7nt5qp.js +2 -0
- package/dist/{chunk-zpj6ggee.js → chunk-3ed2erm6.js} +3 -3
- package/dist/{chunk-gbncp2gp.js → chunk-3fbgpv1d.js} +2 -2
- package/dist/chunk-3zyzhcd9.js +2 -0
- package/dist/chunk-44rb9fk0.js +2 -0
- package/dist/chunk-472j3bhp.js +2 -0
- package/dist/chunk-4acce1m8.js +2 -0
- package/dist/{chunk-2r0nrvqe.js → chunk-4c9p434g.js} +2 -2
- package/dist/chunk-4kasmp98.js +2 -0
- package/dist/{chunk-e41pgmgk.js → chunk-4nnmrp7w.js} +2 -2
- package/dist/{chunk-c47stwqj.js → chunk-52mhrbps.js} +1 -1
- package/dist/chunk-53kkjn23.js +2 -0
- package/dist/{chunk-7wqz32ay.js → chunk-55kwxxm5.js} +2 -2
- package/dist/chunk-5gwvy612.js +2 -0
- package/dist/{chunk-0rdh8bw3.js → chunk-5ymf5c8m.js} +6 -6
- package/dist/{chunk-xcsgpf83.js → chunk-5ysv0499.js} +1 -1
- package/dist/{chunk-4n45qa0b.js → chunk-605g9qhp.js} +4 -4
- package/dist/chunk-61vbqrde.js +2 -0
- package/dist/chunk-6fpzwryt.js +2 -0
- package/dist/{chunk-rv0a3stz.js → chunk-6fsnnj5v.js} +5 -5
- package/dist/{chunk-q74affc4.js → chunk-6qq3wy3m.js} +2 -2
- package/dist/{chunk-h63ma36g.js → chunk-6zq3eh7d.js} +2 -2
- package/dist/chunk-7195598h.js +2 -0
- package/dist/{chunk-czcx3nbx.js → chunk-7hm1tpw0.js} +4 -4
- package/dist/{chunk-a7ryj8z8.js → chunk-7nhgpjjw.js} +6 -6
- package/dist/{chunk-0mx7rg07.js → chunk-7s3j8pqq.js} +3 -3
- package/dist/chunk-7zvf79vb.js +2 -0
- package/dist/chunk-88a735jw.js +2 -0
- package/dist/chunk-8v7yjq3b.js +2 -0
- package/dist/{chunk-463weehv.js → chunk-98mj0es1.js} +1 -1
- package/dist/{chunk-ef9m5fjb.js → chunk-9qrgdekg.js} +11 -11
- package/dist/{chunk-fg67643b.js → chunk-9tecekzq.js} +4 -4
- package/dist/chunk-a8c9j9cj.js +2 -0
- package/dist/chunk-acw851e8.js +2 -0
- package/dist/{chunk-d2pexm3z.js → chunk-ah6nc29h.js} +1 -1
- package/dist/chunk-andfvr3g.js +2 -0
- package/dist/chunk-ay5zkfdg.js +2 -0
- package/dist/{chunk-xpbakn6t.js → chunk-b0jekg4c.js} +2 -2
- package/dist/chunk-b4gptdtc.js +2 -0
- package/dist/{chunk-agd2b928.js → chunk-b8528fra.js} +2 -2
- package/dist/chunk-baaw9w7y.js +2 -0
- package/dist/{chunk-sc1gmts0.js → chunk-btsgt6w3.js} +2 -2
- package/dist/chunk-bw2p9h2g.js +2 -0
- package/dist/{chunk-6mfpns00.js → chunk-c1b0fy70.js} +4 -4
- package/dist/{chunk-qt39mb2a.js → chunk-c3ca056p.js} +1 -1
- package/dist/chunk-ce0vv7kz.js +2 -0
- package/dist/chunk-d1yj29g2.js +2 -0
- package/dist/{chunk-4j50hrgq.js → chunk-dbhmbef1.js} +4 -4
- package/dist/chunk-dfsykk1r.js +2 -0
- package/dist/{chunk-satrf398.js → chunk-dj9ztcth.js} +1 -1
- package/dist/{chunk-pgrm1vet.js → chunk-e1qcfesw.js} +5 -5
- package/dist/{chunk-cv4bfhn1.js → chunk-e2ws79vt.js} +4 -4
- package/dist/chunk-e9p596bp.js +2 -0
- package/dist/{chunk-q3epnfp4.js → chunk-e9tjxnhn.js} +4 -4
- package/dist/{chunk-dz7amds0.js → chunk-edysherg.js} +3 -3
- package/dist/{chunk-g2xy0z0e.js → chunk-em6fqvjy.js} +2 -2
- package/dist/{chunk-kaem8q20.js → chunk-fce8wj3t.js} +1 -1
- package/dist/{chunk-f2twg7ze.js → chunk-fepezvdq.js} +5 -5
- package/dist/chunk-ftecsa8e.js +2 -0
- package/dist/{chunk-50cnypys.js → chunk-gdtj5rfa.js} +5 -5
- package/dist/chunk-ge2h5v46.js +2 -0
- package/dist/chunk-gqvnz8a7.js +2 -0
- package/dist/chunk-j41gp8p3.js +2 -0
- package/dist/{chunk-nzpzyz22.js → chunk-j51wss7s.js} +1 -1
- package/dist/chunk-jxvccj30.js +2 -0
- package/dist/chunk-k5bbre7d.js +2 -0
- package/dist/chunk-kd47vgs8.js +2 -0
- package/dist/chunk-keqjafdz.js +2 -0
- package/dist/{chunk-kwf3kfr0.js → chunk-kvxdyg7e.js} +2 -2
- package/dist/chunk-kz3mejc4.js +2 -0
- package/dist/{chunk-ezna4dhj.js → chunk-mbm3ma63.js} +2 -2
- package/dist/{chunk-qx1nbryq.js → chunk-mk6thhwf.js} +2 -2
- package/dist/{chunk-twmkz0xs.js → chunk-mm1eg2pg.js} +7 -7
- package/dist/chunk-ngkh0t5b.js +2 -0
- package/dist/chunk-nx9895m6.js +2 -0
- package/dist/chunk-nxgtt1t1.js +2 -0
- package/dist/chunk-nyw2ztar.js +2 -0
- package/dist/{chunk-km14pdrt.js → chunk-p33npqjt.js} +11 -11
- package/dist/chunk-p5q27adr.js +2 -0
- package/dist/chunk-pczb7xav.js +2 -0
- package/dist/{chunk-sfyyn0mg.js → chunk-pm4kn9h2.js} +6 -6
- package/dist/chunk-ps37r6hj.js +2 -0
- package/dist/chunk-pvbhk17r.js +2 -0
- package/dist/chunk-q252qvsy.js +2 -0
- package/dist/{chunk-6qpe4f8e.js → chunk-q3bkxg2n.js} +4 -4
- package/dist/chunk-q5b0vpmm.js +2 -0
- package/dist/{chunk-4251fy7d.js → chunk-qjy5yq25.js} +9 -9
- package/dist/{chunk-pdprhg5k.js → chunk-qsnpqa8q.js} +1 -1
- package/dist/{chunk-2v7v6jcs.js → chunk-r561zt9v.js} +3 -3
- package/dist/{chunk-ybjgnnyf.js → chunk-r57jz09p.js} +5 -5
- package/dist/{chunk-dwyhpbpx.js → chunk-r8xper92.js} +2 -2
- package/dist/{chunk-sv7fdqmc.js → chunk-ry6w43p6.js} +6 -6
- package/dist/{chunk-e362e615.js → chunk-s7wp7a2x.js} +30 -30
- package/dist/chunk-sbr85vda.js +2 -0
- package/dist/{chunk-57q4nvs9.js → chunk-sbwvvjkc.js} +3 -3
- package/dist/chunk-tkab24xr.js +2 -0
- package/dist/{chunk-16aqrwmk.js → chunk-v47xc2fr.js} +5 -5
- package/dist/{chunk-q1mb0fbt.js → chunk-v8e2c2r1.js} +2 -2
- package/dist/{chunk-aaea157p.js → chunk-vazk5qbh.js} +2 -2
- package/dist/{chunk-6df3j3qq.js → chunk-vgr7gd8k.js} +1 -1
- package/dist/{chunk-kee5a3ce.js → chunk-vgsasnwm.js} +2 -2
- package/dist/{chunk-32twt3wx.js → chunk-vjfp8n6p.js} +3 -3
- package/dist/chunk-vn59yrjh.js +2 -0
- package/dist/{chunk-shcnt6aa.js → chunk-w1q86c89.js} +3 -3
- package/dist/{chunk-ws2h92mm.js → chunk-w50yggy3.js} +2 -2
- package/dist/{chunk-8e1cv1hh.js → chunk-w624s5jf.js} +3 -3
- package/dist/chunk-wa9q1gyv.js +2 -0
- package/dist/{chunk-a0q0kb0s.js → chunk-wbxmn5gk.js} +5 -5
- package/dist/{chunk-pc8dt8xs.js → chunk-wf8pdjq5.js} +1 -1
- package/dist/{chunk-88tshy2f.js → chunk-whsdyf4t.js} +6 -6
- package/dist/{chunk-3bfheqe3.js → chunk-wm287dz2.js} +2 -2
- package/dist/{chunk-rsxxajv6.js → chunk-wpa3r3b9.js} +2 -2
- package/dist/chunk-wpgxhrd7.js +2 -0
- package/dist/{chunk-yasdj4ve.js → chunk-wscry63p.js} +2 -2
- package/dist/chunk-x3azrbpr.js +2 -0
- package/dist/chunk-x50hk1hq.js +2 -0
- package/dist/{chunk-8va3fs07.js → chunk-xavx271y.js} +5 -5
- package/dist/chunk-xbkbvfcg.js +2 -0
- package/dist/{chunk-295bykzd.js → chunk-xw291tn7.js} +13 -11
- package/dist/{chunk-94ctmp0j.js → chunk-xy4j8t7w.js} +2 -2
- package/dist/{chunk-azf6tdq6.js → chunk-y76znqmh.js} +17 -17
- package/dist/{chunk-yp4tn4zn.js → chunk-y8p59h6c.js} +4 -4
- package/dist/{chunk-s7xywsqd.js → chunk-z55rpt3s.js} +2 -2
- package/dist/{chunk-ssg6ne5b.js → chunk-zf29ahhd.js} +4 -4
- package/dist/{chunk-mxvgft6p.js → chunk-zje94z0k.js} +9 -9
- package/dist/{chunk-gtv9jd68.js → chunk-znnvq1jp.js} +26 -26
- package/dist/{chunk-08cb7cyw.js → chunk-zwde52kw.js} +1 -1
- package/dist/chunk-zxff7kq9.js +2 -0
- package/dist/cli.js +19 -19
- package/dist/component-library.js +118 -21
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +6 -6
- package/package.json +5 -5
- package/dist/chunk-0gkxqcpj.js +0 -2
- package/dist/chunk-0h1dyd38.js +0 -2
- package/dist/chunk-0sew66hf.js +0 -2
- package/dist/chunk-13dgqekj.js +0 -2
- package/dist/chunk-15n20xwe.js +0 -2
- package/dist/chunk-1ta1pj1t.js +0 -2
- package/dist/chunk-1z3r2jjp.js +0 -2
- package/dist/chunk-1z6rrqvm.js +0 -2
- package/dist/chunk-41353gyc.js +0 -2
- package/dist/chunk-4pjqj54a.js +0 -2
- package/dist/chunk-53cc06w7.js +0 -2
- package/dist/chunk-5m02cbxg.js +0 -2
- package/dist/chunk-5rd0an89.js +0 -2
- package/dist/chunk-5s0w910j.js +0 -2
- package/dist/chunk-6fy11vfb.js +0 -2
- package/dist/chunk-6mjk28s3.js +0 -2
- package/dist/chunk-8h5nje66.js +0 -2
- package/dist/chunk-9h3qq2d2.js +0 -2
- package/dist/chunk-9kza7gxd.js +0 -2
- package/dist/chunk-a02gt4tz.js +0 -1199
- package/dist/chunk-a30zpnqp.js +0 -2
- package/dist/chunk-aq0fz4mr.js +0 -2
- package/dist/chunk-axra1yas.js +0 -2
- package/dist/chunk-b2vhsyf9.js +0 -2
- package/dist/chunk-c42b1y7z.js +0 -2
- package/dist/chunk-c89wryyz.js +0 -2
- package/dist/chunk-ch57kgb6.js +0 -2
- package/dist/chunk-cv1vm1w0.js +0 -2
- package/dist/chunk-d7b30bg6.js +0 -2
- package/dist/chunk-f3j1h3ch.js +0 -2
- package/dist/chunk-fz4c5e9m.js +0 -2
- package/dist/chunk-gd04nvj3.js +0 -2
- package/dist/chunk-gmp10259.js +0 -2
- package/dist/chunk-gr956aar.js +0 -2
- package/dist/chunk-h3fv0q25.js +0 -2
- package/dist/chunk-jghpzx5m.js +0 -2
- package/dist/chunk-kcqfrw10.js +0 -2
- package/dist/chunk-kfzvtzsz.js +0 -2
- package/dist/chunk-kqgspa3s.js +0 -2
- package/dist/chunk-mast9wb2.js +0 -2
- package/dist/chunk-mqy1wz09.js +0 -3
- package/dist/chunk-mv21mc9p.js +0 -2
- package/dist/chunk-n9bw9bsn.js +0 -2
- package/dist/chunk-ngzyzcrp.js +0 -2
- package/dist/chunk-nnqyn7db.js +0 -2
- package/dist/chunk-p5qac909.js +0 -2
- package/dist/chunk-pa6kgbmw.js +0 -2
- package/dist/chunk-pd089tq0.js +0 -2
- package/dist/chunk-pjjrx9pk.js +0 -2
- package/dist/chunk-pt3rp3zg.js +0 -2
- package/dist/chunk-t8r40wgf.js +0 -2
- package/dist/chunk-wjafpvjv.js +0 -2
- package/dist/chunk-x44f0eq1.js +0 -2
- package/dist/chunk-xhr35ctb.js +0 -2
- package/dist/chunk-xk15vzb6.js +0 -2
- package/dist/chunk-xmmr0916.js +0 -2
- package/dist/chunk-ywnqjqns.js +0 -2
- package/dist/chunk-z7k1xn6k.js +0 -2
package/dist/craft-entry.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-000mwmfq.js";import{Fo,Va,Ua}from"./chunk-sbwvvjkc.js";import"./chunk-s7wp7a2x.js";import"./chunk-s29hp1qw.js";import"./chunk-xw291tn7.js";import"./chunk-11fxbd71.js";import"./chunk-hxhmhw23.js";import"./chunk-kvxdyg7e.js";import"./chunk-6t04tqvh.js";import"./chunk-fce8wj3t.js";import"./chunk-6zq3eh7d.js";import"./chunk-b8528fra.js";import"./chunk-zje94z0k.js";import"./chunk-5ymf5c8m.js";import"./chunk-zf29ahhd.js";import"./chunk-55kwxxm5.js";import"./chunk-pm4kn9h2.js";import"./chunk-znnvq1jp.js";import"./chunk-e1qcfesw.js";import"./chunk-qjy5yq25.js";import"./chunk-mm1eg2pg.js";import"./chunk-edysherg.js";import"./chunk-c0g30cjs.js";import"./chunk-vgsasnwm.js";import{zu,Wa,Gh,Xh,qa,zo,ps,Ka,Ga,Jh,Yh,Xa,Ja,Ya,Za}from"./chunk-p33npqjt.js";import"./chunk-c1b0fy70.js";import"./chunk-13wd9gf0.js";import"./chunk-ah6nc29h.js";import"./chunk-fepezvdq.js";import"./chunk-0hj5apb9.js";import"./chunk-52mhrbps.js";import"./chunk-7s3j8pqq.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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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{
|
|
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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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{zu as CRAFT_BRIDGE_SCRIPT,zo as CRAFT_COMPONENTS,Ka as CRAFT_COMPONENT_RUNTIME,ps as CRAFT_COMPONENT_STYLES,Fo as NATIVE_COMPONENTS,Xa as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Va as compileToNative,Ua as createHotReloadServer,Ja as findCraftBinary,Wa as generateCraftBridgeScript,V as generateCraftOptimizations,Za as getAvailableFormats,Ya as getAvailableTargets,Yh as getCraftComponents,G as getSSRCacheStats,qa as injectCraftBridge,Gh as isCraftEnvironment,Y as prerenderForCraft,Ga as processCraftComponents,Xh as processCraftDirective,Jh as registerCraftComponent,Q as renderSSR};
|
package/dist/craft.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-000mwmfq.js";import{Fo,Va,Ua}from"./chunk-sbwvvjkc.js";import"./chunk-s7wp7a2x.js";import"./chunk-s29hp1qw.js";import"./chunk-xw291tn7.js";import"./chunk-11fxbd71.js";import"./chunk-hxhmhw23.js";import"./chunk-kvxdyg7e.js";import"./chunk-6t04tqvh.js";import"./chunk-fce8wj3t.js";import"./chunk-6zq3eh7d.js";import"./chunk-b8528fra.js";import"./chunk-zje94z0k.js";import"./chunk-5ymf5c8m.js";import"./chunk-zf29ahhd.js";import"./chunk-55kwxxm5.js";import"./chunk-pm4kn9h2.js";import"./chunk-znnvq1jp.js";import"./chunk-e1qcfesw.js";import"./chunk-qjy5yq25.js";import"./chunk-mm1eg2pg.js";import"./chunk-edysherg.js";import"./chunk-c0g30cjs.js";import"./chunk-vgsasnwm.js";import{zu,Wa,Gh,Xh,qa,zo,ps,Ka,Ga,Jh,Yh,Xa,Ja,Ya,Za}from"./chunk-p33npqjt.js";import"./chunk-c1b0fy70.js";import"./chunk-13wd9gf0.js";import"./chunk-ah6nc29h.js";import"./chunk-fepezvdq.js";import"./chunk-0hj5apb9.js";import"./chunk-52mhrbps.js";import"./chunk-7s3j8pqq.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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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{
|
|
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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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{zu as CRAFT_BRIDGE_SCRIPT,zo as CRAFT_COMPONENTS,Ka as CRAFT_COMPONENT_RUNTIME,ps as CRAFT_COMPONENT_STYLES,Fo as NATIVE_COMPONENTS,Xa as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Va as compileToNative,Ua as createHotReloadServer,Ja as findCraftBinary,Wa as generateCraftBridgeScript,V as generateCraftOptimizations,Za as getAvailableFormats,Ya as getAvailableTargets,Yh as getCraftComponents,G as getSSRCacheStats,qa as injectCraftBridge,Gh as isCraftEnvironment,Y as prerenderForCraft,Ga as processCraftComponents,Xh as processCraftDirective,Jh as registerCraftComponent,Q as renderSSR};
|
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{bo,en,
|
|
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-
|
|
2
|
+
import{bo,en,Jl,nm}from"./chunk-1xpq83mc.js";import{yo,na,Qg,em,tm}from"./chunk-gdtj5rfa.js";import{Kl,Gl,Xl,Yg,Zg}from"./chunk-4nnmrp7w.js";import{tt,Fn,ra}from"./chunk-0dq9svfb.js";import{rm,sm,om,im,wo,Uy}from"./chunk-r8xper92.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-pczb7xav.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">
|
|
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
|
|
|
233
233
|
}, 5000);
|
|
234
234
|
</script>
|
|
235
235
|
</body>
|
|
236
|
-
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=tt(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=bo(n,t);if(a){let s=en(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return
|
|
236
|
+
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=tt(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=bo(n,t);if(a){let s=en(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return na(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,Gl as auditBuildOutput,Kl as auditConfig,re as buildPwaAssets,Xl as calculateAuditResult,Zg as formatAuditResult,ra as formatSize,j as generateManifest,_ as generateManifestJson,em as generateManifestLink,F as generateOfflinePage,tt as generatePrecacheManifest,Fn as generatePrecacheManifestJs,M as generatePwaIcons,yo as generatePwaTags,bo as generateServiceWorker,nm as generateServiceWorkerAuto,Qg as generateSwRegistrationScript,tm as generateThemeColorMeta,N as getExpectedIconPaths,en as getServiceWorkerFileName,na as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,Jl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,wo as pwaDirectives,rm as pwaInstallDirective,om as pwaOfflineDirective,im as pwaPushDirective,sm as pwaUpdateDirective,Uy as registerPwaDirectives,Yg as runPwaAudit,D as validateManifest};
|
package/dist/ssg.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-s29hp1qw.js";import"./chunk-
|
|
3
|
-
`)}function V(e){return async()=>({paths:await e(),fallback:!1})}var Ot;function Ut(e){let n=t(e),{depths:s}=E(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=k(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=k(n,"{","}",g);if(u<0||g<0||v<0)break;return e.slice(c.index,v+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u
|
|
2
|
+
import"./chunk-s29hp1qw.js";import"./chunk-kvxdyg7e.js";import"./chunk-9f31gs4m.js";import{k,$l}from"./chunk-xw291tn7.js";import"./chunk-11fxbd71.js";import"./chunk-hxhmhw23.js";import{zt,w}from"./chunk-000mwmfq.js";import"./chunk-6t04tqvh.js";import"./chunk-fce8wj3t.js";import"./chunk-6zq3eh7d.js";import{Mt,Dt,Lt,jt,Bt,Ft}from"./chunk-b8528fra.js";import{a}from"./chunk-zje94z0k.js";import{Fs}from"./chunk-5ymf5c8m.js";import"./chunk-zf29ahhd.js";import"./chunk-e9tjxnhn.js";import{Ee,gn,mn}from"./chunk-dbhmbef1.js";import"./chunk-55kwxxm5.js";import{x}from"./chunk-pm4kn9h2.js";import{Rt,i}from"./chunk-znnvq1jp.js";import"./chunk-e1qcfesw.js";import"./chunk-qjy5yq25.js";import{Ts}from"./chunk-mm1eg2pg.js";import"./chunk-edysherg.js";import"./chunk-c0g30cjs.js";import{xc,Sc,kc}from"./chunk-303vzq80.js";import{pn,ur,dr}from"./chunk-p6hcrg3r.js";import{fn}from"./chunk-2assyczz.js";import"./chunk-13wd9gf0.js";import"./chunk-ah6nc29h.js";import{ne,Re}from"./chunk-fepezvdq.js";import"./chunk-0hj5apb9.js";import"./chunk-52mhrbps.js";import"./chunk-7s3j8pqq.js";import{l}from"./chunk-z55rpt3s.js";import{et}from"./chunk-w50yggy3.js";import{t,E}from"./chunk-3ed2erm6.js";import{f}from"./chunk-b0jekg4c.js";import R from"fs";import m from"path";import{createHash as Pt}from"crypto";function $t(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Et(e){return Bun.hash(e).toString(16)}function lt(e,n={}){if(!e.includes('type="stx/island"'))return{html:e,chunks:[]};let s=new Map,o=e.replace(kt,(r,u,g,v)=>{let S=v.trim();if(!S)return r;if(/\bdata-stx-src=/.test(g))return r;if(n.minify)S=$t(S);let p=Et(S);if(!s.has(p))s.set(p,S);let P=n.integrity?` data-stx-integrity="sha384-${Pt("sha384").update(S).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(s,([r,u])=>({hash:r,code:u}));return{html:o,chunks:c}}var Ct=new Set(["visible","idle"]);function ut(e){if(!e.includes("data-stx-src="))return e;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(e))!==null)n.set(o[1],o[2]);let c=new Set,r=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=r.exec(e))!==null)if(Ct.has(n.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=w(e,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return e;let S=Array.from(c).filter((p)=>!e.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!S)return e;return e.slice(0,v)+S+e.slice(v)}var It=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function Y(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Tt(e){for(let n of It){let s=e[n];if(!s)continue;let o=Y(s);if(o)return{url:o,source:"env",via:n}}return null}function dt(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?Y(s):null}async function At(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=dt(r.default??r);if(u)return u}catch{}}return null}async function gt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=Y(e.explicit);if(u)return{url:u,source:"option"}}let o=dt(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await At(n);if(c)return{url:c,source:"site.config",via:"url"};let r=Tt(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function pt(){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
|
+
`)}function V(e){return async()=>({paths:await e(),fallback:!1})}var Ot;function Ut(e){let n=t(e),{depths:s}=E(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=k(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=k(n,"{","}",g);if(u<0||g<0||v<0)break;return e.slice(c.index,v+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=$l(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function ft(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=fn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let g=Ut(u);if(/\bdefineStaticPaths\b/.test(t(g))&&zt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let v=Function("defineStaticPaths",`return (${g})`)(V);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let S=await v();n="result";let p=Array.isArray(S)?{paths:S}:S;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class ht{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=m.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await R.promises.mkdir(this.cacheDir,{recursive:!0});let e=m.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=R.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(R.existsSync(r)){let u=R.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=wt(n).some((u)=>R.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&R.existsSync(u)&&Ts(R.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class mt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return m.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await R.promises.mkdir(m.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await R.promises.unlink(n)}async invalidatePattern(e){let n=m.join(this.cacheDir,"isr");if(!R.existsSync(n))return;let s=await R.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await R.promises.unlink(m.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function _t(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await ft(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,g]of Object.entries(c.params))r=r.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function wt(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function Gt(e){for(let n of wt(e))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Ht(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${r[1]}
|
|
6
6
|
})()
|
|
7
7
|
`)(n)}catch(r){return console.error(`Error executing getStaticProps in ${s}:`,r),null}}function Nt(e){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(e)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(e)}async function yt(e,n,s={},o,c){let r=await Bun.file(e.filePath).text(),u=await Gt(e.filePath),g=await Ht(r,n,e.filePath),v={...u||{},...g||{},...s,params:n,$route:{path:e.pattern,params:n}},S=new Set,p=[],P=[],I={...c,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(C)=>{p.push(`${m.relative(process.cwd(),C.templatePath)}: ${C.message}
|
|
8
|
-
resolved against partialsDir: ${C.partialsDir}`)},onServerScriptError:(C)=>{P.push(`${m.relative(process.cwd(),C.sourcePath)} (${C.kind}): ${C.message}`)}};if(Nt(r))console.warn(`Warning: ${e.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let b=await i(r,v,e.filePath,I,S);for(let C of[e.filePath,...S])for(let L of
|
|
9
|
-
${b}`}if(b=await
|
|
8
|
+
resolved against partialsDir: ${C.partialsDir}`)},onServerScriptError:(C)=>{P.push(`${m.relative(process.cwd(),C.sourcePath)} (${C.kind}): ${C.message}`)}};if(Nt(r))console.warn(`Warning: ${e.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let b=await i(r,v,e.filePath,I,S);for(let C of[e.filePath,...S])for(let L of Ee(C))S.add(L);if(Object.keys(n).length>0){let C=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(b.includes("</head>"))b=f(b,C);else b=`${C}
|
|
9
|
+
${b}`}if(b=await Re(b,{router:o.router}),b=await x(b),o.minify!==!1)return{html:Wt(b),dependencies:Array.from(S),includeFailures:p,serverScriptFailures:P};return{html:b,dependencies:Array.from(S),includeFailures:p,serverScriptFailures:P}}function Wt(e){let n=[],s=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(e))!==null){let u=e.slice(s,c.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let g=c[1],v=c[2],S=c[3];v=et(v).replace(/<\/script/gi,"<\\/script"),n.push(g+v+S),s=c.index+c[0].length}let r=e.slice(s);return n.push(r.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function qt(e){let n=0;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);n=(n<<5)-n+o,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Jt(e,n,s,o){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(e);return c.endsWith("/")?e===c.slice(0,-1)||e.startsWith(c):e===c})}function Vt(e,n){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
10
10
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
11
11
|
${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
|
|
12
12
|
<loc>${A(c)}</loc>`;if(o.lastmod)r+=`
|
|
@@ -36,7 +36,7 @@ ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
|
|
|
36
36
|
${s.join(`
|
|
37
37
|
`)}
|
|
38
38
|
</channel>
|
|
39
|
-
</rss>`}async function Xt(e={}){let n=Date.now();mn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,S={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let I=r.cacheSalt;if(!I){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-
|
|
39
|
+
</rss>`}async function Xt(e={}){let n=Date.now();mn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,S={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let I=r.cacheSalt;if(!I){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-gqvnz8a7.js");try{I=y(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-bw2p9h2g.js"),C=await b(r.publicDir,r.outputDir);if(C.count>0)console.log(`Optimized ${C.count} image(s) for responsive delivery`),I=[I,C.fingerprint].filter(Boolean).join(":");let L=new ht(r.cacheDir,I);if(r.cache)await L.load();try{let{generateCss:d}=await import("./chunk-gqvnz8a7.js");await d('<div class="bg-black"></div>')}catch{}Mt();let St=s?.routeMiddleware?.dir||"middleware";await Lt(process.cwd(),St);let K=Dt();if(K.length>0)console.log(`Loaded ${K.length} middleware: ${K.join(", ")}`);let xt=s?.routeMiddleware?.global||[];kc(s?.layoutsDir,l(process.cwd()));let Q=ne(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Q.length} routes`);let _=[];for(let d of Q)try{let y=await _t(d);for(let D of y)_.push({route:d,url:D.url,params:D.params,props:D.props,revalidate:D.revalidate??r.revalidate})}catch(y){let D=y instanceof Error?y:Error(String(y));u.failedCount++,u.errors.push({route:d.pattern,error:D}),await r.hooks.onError?.(D,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,D)}u.totalPages=_.length+u.failedCount,console.log(`Generating ${_.length} pages...`);let M=[],tt=[];for(let d=0;d<_.length;d+=r.concurrency)tt.push(_.slice(d,d+r.concurrency));for(let d of tt)await Promise.all(d.map(async(y)=>{let{route:D,url:h,params:G,props:bt,revalidate:it}=y;try{await r.hooks.onPageStart?.(h);let H=await Bun.file(D.filePath).text(),O=Qt(H),vt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],st=[...xt,...vt];if(st.length>0){let F=jt(h,G,O||{}),z=Bt(F,null,void 0,{isServer:!0}),T=await Ft(st,z);if(T.redirect){let B=typeof T.redirect==="string"?T.redirect:T.redirect.path||T.redirect,W=te(String(B),h),U=ee(h,r);await R.promises.mkdir(m.dirname(U),{recursive:!0}),await Bun.write(U,W),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(W),cached:!1}),M.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${B}`);return}if(T.abort){let B=typeof T.abort==="string"?T.abort:T.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${B}`);return}}let at=O?.validate;if(typeof at==="function")try{if(!await at({params:G})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let j=null,ot=!1;if(r.cache){if(j=L.get(h,D.filePath),j)ot=!0,u.cachedCount++}if(!j){let F=await yt(D,G,bt,r,s);if(j=F.html,r.failOnIncludeError&&F.includeFailures.length>0)throw Error(`${F.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
40
40
|
${F.includeFailures.join(`
|
|
41
41
|
`)}
|
|
42
42
|
Set ssg.failOnIncludeError to false to build anyway.`);if(r.failOnServerScriptError&&F.serverScriptFailures.length>0)throw Error(`${F.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
|
@@ -65,7 +65,7 @@ ${d}`)}if(r.cache)await L.save();if(r.generate404){let d=m.join(r.pagesDir,"404.
|
|
|
65
65
|
<a href="/">Go home</a>
|
|
66
66
|
</div>
|
|
67
67
|
</body>
|
|
68
|
-
</html>`)}for(let d of[500]){let y=m.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,h,D);await Bun.write(m.join(r.outputDir,`${d}.html`),G)}}let X=m.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(m.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Vt(M,r.domain),y=m.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],D=Fs({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...y.length>0?{disallow:y}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(m.join(r.outputDir,"robots.txt"),D),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},y=[];if(d.getItems)y=await d.getItems();let D=Kt(d,y),h=m.join(r.outputDir,"rss.xml");await Bun.write(h,D),u.rssPath=h,console.log(`Generated rss.xml with ${y.length} items`)}let q=
|
|
68
|
+
</html>`)}for(let d of[500]){let y=m.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,h,D);await Bun.write(m.join(r.outputDir,`${d}.html`),G)}}let X=m.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(m.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Vt(M,r.domain),y=m.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],D=Fs({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...y.length>0?{disallow:y}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(m.join(r.outputDir,"robots.txt"),D),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},y=[];if(d.getItems)y=await d.getItems();let D=Kt(d,y),h=m.join(r.outputDir,"rss.xml");await Bun.write(h,D),u.rssPath=h,console.log(`Generated rss.xml with ${y.length} items`)}let q=xc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let J=Sc(r.outputDir);if(J.assets>0)console.log(`Externalized ${J.assets} repeated asset(s) from ${J.pages} page(s) (${(J.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&R.existsSync(r.publicDir))await Z(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let nt=dr();if(nt)await Z(nt,m.join(r.outputDir,ur)),console.log(`Copied assets from ${pn}`)}catch(I){throw await r.hooks.onError?.(I),I}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let I={generatedChunks:g.size,totalBytes:v,chunks:S,pages:p};await Bun.write(m.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(I,null,2))}await r.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
|
|
69
69
|
Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
70
70
|
Build complete!
|
|
71
71
|
Total: ${u.totalPages} pages
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.888",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/clapp": "^0.2.17",
|
|
130
|
-
"@stacksjs/desktop": "0.2.
|
|
131
|
-
"@stacksjs/sanitizer": "0.2.
|
|
130
|
+
"@stacksjs/desktop": "0.2.888",
|
|
131
|
+
"@stacksjs/sanitizer": "0.2.888",
|
|
132
132
|
"@stacksjs/ts-css": "^0.3.21",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
134
|
"@types/dom-speech-recognition": "^0.0.12",
|
|
135
|
-
"bun-plugin-stx": "0.2.
|
|
135
|
+
"bun-plugin-stx": "0.2.888",
|
|
136
136
|
"bunfig": "^0.15.21",
|
|
137
|
-
"stx-router": "0.2.
|
|
137
|
+
"stx-router": "0.2.888",
|
|
138
138
|
"ts-broadcasting": "^0.0.13",
|
|
139
139
|
"ts-images": "^0.2.22",
|
|
140
140
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-0gkxqcpj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$t,tr,Fh}from"./chunk-fg67643b.js";import{we,nr,zh,rr,jo,ls,us,Hh,Vh,Uh,sr,or,Bo,ds,Wh}from"./chunk-rsxxajv6.js";import"./chunk-n22xtagg.js";export{jo as batch,Fh as default,nr as derived,rr as effect,$t as generateSignalsRuntime,tr as generateSignalsRuntimeDev,or as isDerived,sr as isSignal,zh as memo,us as onDestroy,ls as onMount,ds as peek,Uh as pendingLifecycleCounts,Vh as runDestroyCallbacks,Hh as runMountCallbacks,we as state,Bo as untrack,Wh as useOptimistic};
|
package/dist/chunk-0h1dyd38.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{aa,ca,la,dm,ua,da,pm,pa,fa,Yl,fm}from"./chunk-shcnt6aa.js";export{aa as VideoProcessorCache,Yl as analyzeVideo,dm as clearVideoCache,fa as generateDASHManifest,pa as generateHLSManifest,ua as generatePoster,pm as generateSpriteSheet,da as generateThumbnails,ca as getCachedVideoResult,fm as processVideo,la as setCachedVideoResult};
|
package/dist/chunk-0sew66hf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{sy,ag,at,Ac,oy,xs,Ss,ks}from"./chunk-4251fy7d.js";import"./chunk-pgrm1vet.js";import"./chunk-mqy1wz09.js";import"./chunk-d2pexm3z.js";import"./chunk-cb0c6959.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{oy as clearOnceStore,Ac as onceStore,at as partialsCache,xs as processIncludes,Ss as processStackPushDirectives,ks as processStackReplacements,sy as resetUnscopedSignalWarnings,ag as topLevelElements};
|
package/dist/chunk-13dgqekj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Pm}from"./chunk-3bfheqe3.js";import"./chunk-16aqrwmk.js";import"./chunk-fg67643b.js";import"./chunk-gvd8nb8z.js";import"./chunk-q3epnfp4.js";import"./chunk-gtv9jd68.js";import"./chunk-sfyyn0mg.js";import"./chunk-4251fy7d.js";import"./chunk-c0g30cjs.js";import"./chunk-pgrm1vet.js";import"./chunk-mqy1wz09.js";import"./chunk-dz7amds0.js";import"./chunk-d2pexm3z.js";import"./chunk-twmkz0xs.js";import"./chunk-f2twg7ze.js";import"./chunk-cb0c6959.js";import"./chunk-7wqz32ay.js";import"./chunk-c47stwqj.js";import"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{Pm as buildForProduction};
|
package/dist/chunk-15n20xwe.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lo,jh,Bh}from"./chunk-2v7v6jcs.js";import"./chunk-4j50hrgq.js";import"./chunk-q3epnfp4.js";import"./chunk-9f31gs4m.js";import"./chunk-twmkz0xs.js";import"./chunk-f2twg7ze.js";import"./chunk-cb0c6959.js";import"./chunk-c47stwqj.js";import"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{Bh as clearComposableCache,jh as getComposableScript,Lo as listComposableModules};
|
package/dist/chunk-1ta1pj1t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{fg,dy,py,fy,gy,gg,mg,my,hy,fi,yy,Sr,kr,Os}from"./chunk-7wqz32ay.js";import{ft}from"./chunk-6c1vm6bs.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{gy as __setSignalsGeneratorsForTest,ft as cacheEngineFingerprint,kr as cacheTemplate,Sr as checkCache,yy as clearDevCaches,mg as getCachedRouterScript,gg as getCachedSignalsRuntime,my as getServeClientAsset,fi as getServeModuleBundle,Os as hashFilePath,py as invalidateFileCache,fy as invalidateFileCacheByDir,dy as readFileCached,hy as registerServeModuleBundle,fg as templateCache};
|
package/dist/chunk-1z3r2jjp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ng,$c,ty,Rc,rg,sg,xn,yr,ny,og,ig,ry,x}from"./chunk-sfyyn0mg.js";import"./chunk-7wqz32ay.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{xn as buildCss,og as extractClassNames,sg as fingerprintConfig,ig as generateCss,ny as getCachedCSS,ng as getCssServeAsset,x as injectCss,$c as loadCssEngine,Rc as loadCssEngineConfig,yr as rebuildCss,ty as resetCssCache,rg as resolveUserCssConfig,ry as withLinkedModuleBundles};
|
package/dist/chunk-1z6rrqvm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{xi,Si,Nt,ve,Cr,zs,Er,Hs,Vs,bg,wg,vg,Tr,xg,Sg,kg,_g,Gc,Xc,Jc,ki,Yc,Cg,Mt,Dt,Lt,jt,Bt,Ft,pt,Eg}from"./chunk-agd2b928.js";export{Er as Router,kg as abortNavigation,zs as bracketPathToRegex,Mt as clearMiddleware,Xc as createClientCookieManager,Bt as createMiddlewareContext,jt as createRouteLocation,Gc as createServerCookieManager,Jc as createStorageManager,_g as defineMiddleware,wg as defineRoute,vg as defineRoutes,Hs as findErrorPage,Vs as formatRoutes,Si as generateRouteManifest,xi as generateRouteTypes,Yc as getMiddleware,Dt as getMiddlewareNames,pt as getRouterScript,Eg as getRouterScriptDev,Cg as hasMiddleware,Nt as isFileRequestPath,Lt as loadMiddlewareFromDirectory,Cr as matchRoute,Sg as navigateTo,ve as patternToRegex,ki as registerMiddleware,xg as resetRoutes,Tr as route,Ft as runMiddleware,bg as setAppUrl};
|
package/dist/chunk-41353gyc.js
DELETED
package/dist/chunk-4pjqj54a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ku,_u,Cu,Eu,Tu,$u,Ru,Au,Pu,Iu,ih}from"./chunk-a7ryj8z8.js";export{ku as createIslandRegistry,ih as default,Iu as generateIslandManifest,Cu as generatePartialHydrationCSS,$u as hydrateAll,Tu as hydrateByStrategy,Eu as hydrateIsland,Ru as isHydrated,Au as onHydrated,_u as processPartialHydrationDirectives,Pu as processStaticDirectives};
|
package/dist/chunk-53cc06w7.js
DELETED
package/dist/chunk-5m02cbxg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ql,eu}from"./chunk-azf6tdq6.js";import"./chunk-94ctmp0j.js";import"./chunk-32twt3wx.js";import"./chunk-qx1nbryq.js";import"./chunk-yasdj4ve.js";import"./chunk-4n45qa0b.js";import"./chunk-czcx3nbx.js";import"./chunk-ef9m5fjb.js";import"./chunk-3bfheqe3.js";import"./chunk-16aqrwmk.js";import"./chunk-2r0nrvqe.js";import"./chunk-q1mb0fbt.js";import"./chunk-pdprhg5k.js";import"./chunk-sc1gmts0.js";import"./chunk-q74affc4.js";import"./chunk-gbncp2gp.js";import"./chunk-yp4tn4zn.js";import"./chunk-8va3fs07.js";import"./chunk-sv7fdqmc.js";import"./chunk-a7ryj8z8.js";import"./chunk-y6eaqs8v.js";import"./chunk-88tshy2f.js";import"./chunk-aaea157p.js";import"./chunk-8e1cv1hh.js";import"./chunk-ybjgnnyf.js";import"./chunk-a0q0kb0s.js";import"./chunk-cv4bfhn1.js";import"./chunk-2v7v6jcs.js";import"./chunk-fg67643b.js";import"./chunk-6mfpns00.js";import"./chunk-kee5a3ce.js";import"./chunk-59er0fc7.js";import{fn}from"./chunk-gvd8nb8z.js";import{Qf}from"./chunk-4j50hrgq.js";import"./chunk-q3epnfp4.js";import"./chunk-9f31gs4m.js";import{ze,i}from"./chunk-gtv9jd68.js";import"./chunk-sfyyn0mg.js";import"./chunk-4251fy7d.js";import"./chunk-c0g30cjs.js";import"./chunk-pgrm1vet.js";import"./chunk-mqy1wz09.js";import"./chunk-dz7amds0.js";import"./chunk-d2pexm3z.js";import"./chunk-twmkz0xs.js";import{$e}from"./chunk-f2twg7ze.js";import"./chunk-cb0c6959.js";import{Sr,kr}from"./chunk-7wqz32ay.js";import"./chunk-c47stwqj.js";import{Ms,W,a}from"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import{j,h,Ke}from"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";import{ra}from"./chunk-xpbakn6t.js";import"./chunk-463weehv.js";import"./chunk-shcnt6aa.js";export{Ms as buildWebComponents,kr as cacheTemplate,Sr as checkCache,fn as classifyAllScripts,Ql as createMiddleware,eu as createRoute,W as defaultConfig,h as extractVariables,j as findSfcTemplateBlock,$e as injectRouterScript,ra as insertBeforeBodyClose,a as loadStxConfig,Ke as processClientScript,i as processDirectives,ze as readMarkdownFile,Qf as withinBundlerCallback};
|
package/dist/chunk-5rd0an89.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Im,Om,Nm,Mm,pu,Dm,Lm,jm,Bm,Fm,zm,Hm}from"./chunk-2r0nrvqe.js";export{zm as Broadcast,Hm as BroadcastServer,pu as broadcast,Bm as broadcastPresence,jm as broadcastPrivate,Fm as channel,Im as getBroadcastServer,Mm as loadChannels,Om as startBroadcasting,Nm as stopBroadcasting,Dm as toUser,Lm as toUsers};
|
package/dist/chunk-5s0w910j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ra,Tm,Io,$m,uu,du,Rm,Am}from"./chunk-ef9m5fjb.js";import"./chunk-2v7v6jcs.js";import"./chunk-4j50hrgq.js";import"./chunk-q3epnfp4.js";import"./chunk-9f31gs4m.js";import"./chunk-twmkz0xs.js";import"./chunk-f2twg7ze.js";import"./chunk-cb0c6959.js";import"./chunk-c47stwqj.js";import"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import{Se,Qs}from"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{Ra as buildScriptVirtualFile,Tm as buildVirtualSource,Se as extractScriptBlocks,Qs as extractTemplateExpressions,uu as findRuntimeTypeDeclarations,du as findStxModuleDeclarations,Am as formatTypecheckDiagnostics,$m as sourcePathFor,Rm as typecheckStxFiles,Io as virtualPathFor};
|
package/dist/chunk-6fy11vfb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cy,ly,cg,Cs}from"./chunk-pgrm1vet.js";import"./chunk-mqy1wz09.js";import"./chunk-d2pexm3z.js";import"./chunk-cb0c6959.js";import{Dr}from"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import{ht}from"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{ht as freeIdentifiers,Cs as processComponents,cg as processESImports,Dr as rendersAsElement,cy as resetMarginStackWarnings,ly as resetTemplateLoopWarnings};
|
package/dist/chunk-6mjk28s3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{uy,Ts,ci,$s,wr,li,ui,dg,Rs,As,Ps,di,Ic,pg,Pt}from"./chunk-twmkz0xs.js";import"./chunk-f2twg7ze.js";import"./chunk-cb0c6959.js";import"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import{G}from"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{dg as bindLoopInterpolations,uy as clearScriptScanCache,Rs as convertServerLoopAttributesToDirectives,li as convertSignalDirectivesToAttributes,As as convertSignalLoopsToAttributes,wr as extractClientSignalNames,G as extractExports,Ic as findMarkupIndexOutsideScripts,$s as hasSignalsSyntax,ci as parseLoopExpression,ui as preEvalLiteralReactiveIfs,Ps as processScriptSetup,di as processSignals,pg as rewriteStxImportSpecifiers,Ts as scanScriptTags,Pt as stripStxRuntimeImports};
|
package/dist/chunk-8h5nje66.js
DELETED
package/dist/chunk-9h3qq2d2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{km}from"./chunk-yasdj4ve.js";import"./chunk-16aqrwmk.js";import"./chunk-gvd8nb8z.js";import"./chunk-q3epnfp4.js";import"./chunk-mqy1wz09.js";import"./chunk-f2twg7ze.js";import"./chunk-mxvgft6p.js";import"./chunk-0mx7rg07.js";import"./chunk-h63ma36g.js";import"./chunk-ssg6ne5b.js";import"./chunk-0rdh8bw3.js";import"./chunk-agd2b928.js";import"./chunk-a02gt4tz.js";import"./chunk-kaem8q20.js";import"./chunk-6t04tqvh.js";import"./chunk-295bykzd.js";import"./chunk-hxhmhw23.js";import"./chunk-kwf3kfr0.js";import"./chunk-s29hp1qw.js";import"./chunk-n22xtagg.js";export{km as startProductionServer};
|
package/dist/chunk-9kza7gxd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{sa,oa,ia,im,am,cm,Jl,lm,um}from"./chunk-463weehv.js";export{sa as ImageProcessorCache,Jl as applyTransformations,im as clearImageCache,lm as generateResponsiveVariants,um as generateSrcset,oa as getCachedImageResult,cm as optimizeImage,am as processImage,ia as setCachedImageResult};
|