@stacksjs/stx 0.2.343 → 0.2.344
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/binding-manifest.d.ts +32 -0
- package/dist/binding-manifest.js +64 -0
- package/dist/chunk-020hpw7m.js +2 -0
- package/dist/{chunk-zr1x54bt.js → chunk-05zfez2g.js} +1 -1
- package/dist/{chunk-jagf7h9y.js → chunk-0k1mtwby.js} +1 -1
- package/dist/chunk-1bct7pfj.js +2 -0
- package/dist/{chunk-jh6f1a9y.js → chunk-1c9453w0.js} +1 -1
- package/dist/chunk-1exk54qt.js +2 -0
- package/dist/{chunk-7zxv2631.js → chunk-1vt1h19d.js} +1 -1
- package/dist/{chunk-p3awq80d.js → chunk-1yh6pq6b.js} +1 -1
- package/dist/{chunk-wyhb3nb0.js → chunk-34f8c48f.js} +1 -1
- package/dist/chunk-39qy76ek.js +2 -0
- package/dist/{chunk-safmgrq5.js → chunk-3n8avn17.js} +1 -1
- package/dist/{chunk-hq3phk1a.js → chunk-3xpk99z4.js} +1 -1
- package/dist/{chunk-57dxdvjh.js → chunk-4kbaky4w.js} +1 -1
- package/dist/{chunk-wdaf98ya.js → chunk-59906baj.js} +1 -1
- package/dist/chunk-5apmxb4e.js +2 -0
- package/dist/{chunk-xgw269cf.js → chunk-5atmahe4.js} +286 -286
- package/dist/{chunk-yefnrr5z.js → chunk-5yhv1pe5.js} +1 -1
- package/dist/{chunk-z9hb80mk.js → chunk-64n10kpa.js} +1 -1
- package/dist/{chunk-1bfvdjpy.js → chunk-6h3r8v55.js} +1 -1
- package/dist/chunk-6z9pm31g.js +2 -0
- package/dist/{chunk-q6825wwz.js → chunk-72x5v5an.js} +1 -1
- package/dist/{chunk-53sjbp3z.js → chunk-72x62kch.js} +2 -2
- package/dist/chunk-7d2gfyk8.js +2 -0
- package/dist/{chunk-7mc1k1tq.js → chunk-7h9fajgs.js} +1 -1
- package/dist/{chunk-amfq5rnz.js → chunk-7kcfbc0j.js} +2 -2
- package/dist/{chunk-3d3x7dwy.js → chunk-7qp3zphs.js} +1 -1
- package/dist/{chunk-kbah2k8e.js → chunk-7t6h8crt.js} +2 -2
- package/dist/{chunk-grnmr3y1.js → chunk-86c461ca.js} +1 -1
- package/dist/chunk-86q2h34b.js +2 -0
- package/dist/{chunk-7r79j1hs.js → chunk-89mqnh67.js} +1 -1
- package/dist/{chunk-5hq25yky.js → chunk-8cc4vdkh.js} +1 -1
- package/dist/chunk-8tjg4wbr.js +2 -0
- package/dist/{chunk-45ydb29q.js → chunk-8v2k21n4.js} +1 -1
- package/dist/{chunk-aqxwwq6w.js → chunk-8y1ve8tc.js} +2 -2
- package/dist/chunk-94sxzp5x.js +2 -0
- package/dist/{chunk-ag8gdk51.js → chunk-99b5tfxc.js} +1 -1
- package/dist/{chunk-4vd0rqfs.js → chunk-9jbssgem.js} +197 -88
- package/dist/{chunk-s60eccqk.js → chunk-9nrgjtah.js} +1 -1
- package/dist/chunk-9p5gbhwp.js +2 -0
- package/dist/chunk-9yqt0nf2.js +2 -0
- package/dist/{chunk-stqm4brp.js → chunk-a1ghxrb1.js} +1 -1
- package/dist/chunk-a29x23g7.js +2 -0
- package/dist/{chunk-k8skvm0d.js → chunk-at622hg0.js} +1 -1
- package/dist/{chunk-1qtd4ex2.js → chunk-avwywzsj.js} +2 -2
- package/dist/{chunk-a0ajg9z5.js → chunk-b5hank5e.js} +1 -1
- package/dist/{chunk-4fafxr8d.js → chunk-bk1zb1xp.js} +1 -1
- package/dist/{chunk-rns7wjy9.js → chunk-bpb3xkg4.js} +1 -1
- package/dist/{chunk-hrdd26r4.js → chunk-bqdfbwdf.js} +1 -1
- package/dist/{chunk-c7qdnc5d.js → chunk-c30qnb6z.js} +1 -1
- package/dist/chunk-cappe4hd.js +2 -0
- package/dist/{chunk-7yfk9393.js → chunk-cdq28mek.js} +1 -1
- package/dist/chunk-cmccdayf.js +2 -0
- package/dist/chunk-csv48xrx.js +2 -0
- package/dist/{chunk-fbmjw0bh.js → chunk-d86q27j8.js} +1 -1
- package/dist/{chunk-dj5mqnp1.js → chunk-dgv43ccd.js} +1 -1
- package/dist/{chunk-em8cr7wy.js → chunk-dsztk2kp.js} +1 -1
- package/dist/{chunk-daxr6p6q.js → chunk-dx2s51rr.js} +1 -1
- package/dist/{chunk-mwvxhv0r.js → chunk-dxkjvajv.js} +1 -1
- package/dist/chunk-e4yskgtb.js +2 -0
- package/dist/{chunk-4pg6wbt6.js → chunk-e631svvs.js} +1 -1
- package/dist/{chunk-h6y99nak.js → chunk-e7np0h2q.js} +1 -1
- package/dist/chunk-efx05ah0.js +2 -0
- package/dist/{chunk-0s3ry262.js → chunk-ejqpq0wc.js} +1 -1
- package/dist/chunk-erb294sv.js +2 -0
- package/dist/{chunk-5azeswj2.js → chunk-evfr2zgg.js} +1 -1
- package/dist/chunk-ewpbxy5m.js +2 -0
- package/dist/chunk-fs2t4rs3.js +33 -0
- package/dist/{chunk-62vng8g8.js → chunk-g28fs4aa.js} +2 -2
- package/dist/chunk-gmm82dst.js +2 -0
- package/dist/{chunk-5zemhhwe.js → chunk-gsc2vds7.js} +1 -1
- package/dist/chunk-hke0k33t.js +2 -0
- package/dist/{chunk-e53pwshq.js → chunk-hsbbfp0c.js} +1 -1
- package/dist/chunk-j5qygdy9.js +2 -0
- package/dist/{chunk-zcytk5w9.js → chunk-jekrtm2j.js} +1 -1
- package/dist/chunk-jzfk5ect.js +2 -0
- package/dist/{chunk-brjfzbq9.js → chunk-kfkf9v2d.js} +1 -1
- package/dist/chunk-kq30wqp6.js +2 -0
- package/dist/{chunk-s7qbba8r.js → chunk-krfx5562.js} +10 -10
- package/dist/{chunk-0dpgh7a6.js → chunk-kw9cgyfc.js} +1 -1
- package/dist/{chunk-0fp16c1x.js → chunk-m2j5skez.js} +1 -1
- package/dist/{chunk-vj3nx26v.js → chunk-mph46gkj.js} +1 -1
- package/dist/{chunk-e6rxvz3p.js → chunk-mpyjnwje.js} +1 -1
- package/dist/{chunk-1h1c2048.js → chunk-msywnv5n.js} +1 -1
- package/dist/{chunk-8ah5mhst.js → chunk-mvat8js5.js} +2 -2
- package/dist/{chunk-pwhf5kte.js → chunk-mz4breg8.js} +1 -1
- package/dist/{chunk-649dfqqz.js → chunk-n5657hm3.js} +1 -1
- package/dist/{chunk-gvfgrve8.js → chunk-nexpxxsa.js} +1 -1
- package/dist/{chunk-t00ga194.js → chunk-njx93b4z.js} +1 -1
- package/dist/{chunk-m0xaw0qw.js → chunk-nm60wh6r.js} +1 -1
- package/dist/{chunk-ey1tsk22.js → chunk-ppzz953j.js} +1 -1
- package/dist/chunk-q5gzpn1n.js +2 -0
- package/dist/{chunk-tqw1yean.js → chunk-rwwfzkz4.js} +1 -1
- package/dist/{chunk-rzg9pars.js → chunk-san1eq0r.js} +2 -2
- package/dist/{chunk-eh3meyd3.js → chunk-tc4pj651.js} +2 -2
- package/dist/chunk-tscr6bs8.js +2 -0
- package/dist/{chunk-y5sxa2sq.js → chunk-tthrw91n.js} +1 -1
- package/dist/{chunk-6g8rvnhc.js → chunk-v6e35j4g.js} +1 -1
- package/dist/{chunk-wnmegbw0.js → chunk-v7aa7v85.js} +1 -1
- package/dist/{chunk-k3dtvay1.js → chunk-vhta1be7.js} +1 -1
- package/dist/{chunk-tz68qv47.js → chunk-w5j9tbsk.js} +1 -1
- package/dist/{chunk-hzbty7hz.js → chunk-wfwj4390.js} +1 -1
- package/dist/{chunk-ec18ftcg.js → chunk-wj21f1e0.js} +1 -1
- package/dist/{chunk-12qteqk8.js → chunk-ws0282jr.js} +1 -1
- package/dist/chunk-x054qzma.js +2 -0
- package/dist/{chunk-36j9qset.js → chunk-xh9paa2g.js} +2 -2
- package/dist/{chunk-q9ckfwhh.js → chunk-xj6bcwqa.js} +1 -1
- package/dist/{chunk-ay336sqb.js → chunk-xvh1k1a4.js} +1 -1
- package/dist/{chunk-vaggjvsm.js → chunk-y2f41kaq.js} +1 -1
- package/dist/{chunk-1zav2sf1.js → chunk-y6xzr30x.js} +1 -1
- package/dist/{chunk-kgbz86sa.js → chunk-yg5r7bnm.js} +2 -2
- package/dist/{chunk-2853ye06.js → chunk-zkwk82ss.js} +2 -2
- package/dist/chunk-zkxnarrh.js +2 -0
- package/dist/chunk-zp14ksx1.js +2 -0
- package/dist/{chunk-g0dbtyk7.js → chunk-zwhnkxgy.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/expressions.d.ts +1 -1
- package/dist/expressions.js +15 -3
- package/dist/includes.js +2 -2
- package/dist/pwa.js +2 -2
- package/dist/runtime-globals.d.ts +22 -0
- package/dist/runtime-globals.js +46 -0
- package/dist/signals.js +193 -84
- package/dist/slots.js +3 -3
- package/dist/ssg.js +2 -2
- package/dist/theme-tokens.d.ts +59 -0
- package/dist/theme-tokens.js +77 -17
- package/dist/ts-css-config.js +4 -2
- package/dist/utils.d.ts +10 -0
- package/dist/utils.js +77 -12
- package/dist/variable-extractor.d.ts +1 -1
- package/dist/variable-extractor.js +23 -3
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-160g7ynw.js +0 -2
- package/dist/chunk-16hr5y08.js +0 -2
- package/dist/chunk-3h97y3n3.js +0 -2
- package/dist/chunk-3j915h2d.js +0 -2
- package/dist/chunk-4hkg6kx4.js +0 -2
- package/dist/chunk-57494khk.js +0 -2
- package/dist/chunk-5xavmr4t.js +0 -2
- package/dist/chunk-6rsfkms1.js +0 -2
- package/dist/chunk-6xs80tka.js +0 -32
- package/dist/chunk-905j49fe.js +0 -2
- package/dist/chunk-9czj483k.js +0 -2
- package/dist/chunk-9kv0qavn.js +0 -2
- package/dist/chunk-bcz8yp2g.js +0 -2
- package/dist/chunk-bxefsc7k.js +0 -2
- package/dist/chunk-c4kv3r8t.js +0 -2
- package/dist/chunk-fytemc96.js +0 -2
- package/dist/chunk-g7gc0ten.js +0 -2
- package/dist/chunk-gqsxxd81.js +0 -2
- package/dist/chunk-gx9z0wmm.js +0 -2
- package/dist/chunk-jnxzzzm4.js +0 -2
- package/dist/chunk-jy6jwxhs.js +0 -2
- package/dist/chunk-khqn40gv.js +0 -2
- package/dist/chunk-mhbzrh5y.js +0 -2
- package/dist/chunk-p8anntjb.js +0 -2
- package/dist/chunk-pwe51myj.js +0 -2
- package/dist/chunk-rqqdvnp5.js +0 -2
- package/dist/chunk-w1mbrq1g.js +0 -2
- package/dist/chunk-w84qe2m6.js +0 -2
- package/dist/chunk-wjm7hv5e.js +0 -2
- package/dist/chunk-yr7s02f7.js +0 -2
- package/dist/chunk-zq3tm2c2.js +0 -2
|
@@ -299,4 +299,4 @@ catch (error) {
|
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
301
|
</script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
|
|
302
|
-
export{N as
|
|
302
|
+
export{N as Ew,Q as Fw,T as Gw,V as Hw,X as Iw,Z as Jw};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Hi as a,Ii as b}from"./chunk-dx2s51rr.js";import"./chunk-7we3xfde.js";import"./chunk-4kbaky4w.js";import"./chunk-zkwk82ss.js";import"./chunk-fvsefztj.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as getStoreScript,b as clearStoreCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Te as a}from"./chunk-a1ghxrb1.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as startInteractive};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Gm as W,Jp as X}from"./chunk-
|
|
2
|
+
import{Gm as W,Jp as X}from"./chunk-5atmahe4.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
|
|
3
3
|
${j.bold}${q[0]}${j.reset} - ${A.description}`),console.log(` Usage: ${j.cyan}${A.usage}${j.reset}
|
|
4
4
|
`)}else{console.log(`
|
|
5
5
|
${j.bold}Available Commands:${j.reset}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ei as a,fi as b,gi as c}from"./chunk-zwhnkxgy.js";import"./chunk-7we3xfde.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{hu as a,iu as b,ju as c,ku as d,lu as e,mu as f,nu as g,ou as h,pu as i,qu as j,ru as k,su as l,tu as m,uu as n,vu as o,wu as p}from"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-ejqpq0wc.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nw as z}from"./chunk-ejqpq0wc.js";var Vq={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},L={},u="en";function Gq(q){u=q}function Bq(){return u}function Hq(q){L={...L,...q}}function Wq(){L={}}function f(q,J={}){let Q=L[q]||Vq[q]||{message:`Unknown error (code: ${q})`},Z=Q.message,$=Q.help;for(let[X,V]of Object.entries(J)){let Y=`{{${X}}}`;if(Z=Z.replace(new RegExp(Y,"g"),V),$)$=$.replace(new RegExp(Y,"g"),V)}return{message:Z,help:$}}function Mq(q,J={}){let{message:Q,help:Z}=f(q,J);return Z?`${Q}
|
|
3
3
|
Help: ${Z}`:Q}var w={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function S(q){for(let[J,Q]of Object.entries(w))if(Q===q)return J;return}function Iq(){return!1}function k(){return!Iq()||process.env.STX_DEBUG==="true"}function aq(){return!1}import wq from"path";var x={showRelativePaths:!1,enableAutoRecovery:k(),logRecoveryWarnings:!0},D={...x};function Fq(q){D={...D,...q}}function _(){return{...D}}function jq(){D={...x}}function N(q){if(!D.showRelativePaths||!q)return q;let J=D.baseDir||process.cwd();try{let Q=wq.relative(J,q);return Q.startsWith("..")?q:Q}catch{return q}}class U extends Error{code;filePath;line;column;context;numericCode;constructor(q,J,Q,Z,$,X,V){super(q);this.code=J;this.filePath=Q;this.line=Z;this.column=$;this.context=X;if(this.name="StxError",this.numericCode=V||w.EVALUATION_ERROR,this.filePath)this.filePath=N(this.filePath)}}class m extends U{constructor(q,J,Q,Z,$,X){super(q,"stx_SYNTAX_ERROR",J,Q,Z,$,X||w.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class c extends U{constructor(q,J,Q,Z,$,X){super(q,"stx_RUNTIME_ERROR",J,Q,Z,$,X||w.EVALUATION_ERROR);this.name="StxRuntimeError"}}class d extends U{constructor(q,J,Q,Z,$,X){super(q,"stx_SECURITY_ERROR",J,Q,Z,$,X||w.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class p extends U{constructor(q,J,Q,Z,$,X){super(q,"stx_FILE_ERROR",J,Q,Z,$,X||w.FILE_NOT_FOUND);this.name="StxFileError"}}class l extends U{isFatal=!0;constructor(q,J,Q,Z,$,X){super(q,"stx_VALIDATION_ERROR",J,Q,Z,$,X||w.DOM_API_VIOLATION);this.name="StxValidationError"}}function P(q){let{type:J,message:Q,code:Z,filePath:$,line:X,column:V,template:Y,offset:B,snippet:G,suggestion:H,format:W="text"}=q,M=X,I=V;if(!M&&Y&&B!==void 0){let y=s(Y,B);M=y.line,I=y.column}let j=$?N($):void 0,Yq=Z?S(Z):void 0,K={type:J,code:Z,codeName:Yq,message:Q,filePath:j,line:M,column:I,snippet:G,suggestion:H,timestamp:new Date().toISOString()},O;switch(W){case"html":O=Dq(K);break;case"json":O=JSON.stringify(K,null,2);break;case"console":O=Kq(K,Y,B);break;case"text":default:O=Uq(K,Y,B);break}return{formatted:O,data:K}}function Uq(q,J,Q){let Z=[],$=q.code?` [${q.codeName||q.code}]`:"";if(Z.push(`[${q.type} Error${$}]`),q.filePath){let X=q.filePath;if(q.line){if(X+=`:${q.line}`,q.column)X+=`:${q.column}`}Z.push(`at ${X}`)}if(Z.push(`
|
|
4
4
|
${q.message}`),J&&q.line){let X=Oq(J,q.line,2);if(X)Z.push(`
|
|
5
5
|
${X}`)}if(q.snippet)Z.push(`
|
|
@@ -44,4 +44,4 @@ catch (e) {
|
|
|
44
44
|
throw e;
|
|
45
45
|
}
|
|
46
46
|
`;return nq(Z?(G)=>{let H=a([b,...X,...G],Y);return(...W)=>H($q,...W)}:(G)=>a([...X,...G],Y),X,J,$,V)}function nq(q,J,Q,Z,$){let X=q([]),V=Z.every((B,G)=>B.index===G);if(J.length===Q.length&&V)return t(X,J,q);return t((...B)=>{let G=Array($.length);for(let H=0;H<$.length;H++)G[H]=B[$[H]];return X(...G)},J,q,(B)=>{X=q(B)})}function t(q,J,Q,Z){let X=/^(\w+) is not defined$/,V=q,Y=[],B=new Set(J);return(...G)=>{for(let H=0;H<=8;H++)try{return V(...G)}catch(W){let M=W instanceof Error?W.message:"",I=X.exec(M);if(!(W instanceof ReferenceError)||!I)return;let j=I[1];if(B.has(j)||Xq.has(j))return;if(B.add(j),Y.push(j),Z)Z(Y);else V=Q(Y)}return}}function LJ(q){let J=q.trim(),Q=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let Z of Q)if(Z.test(J))return!1;return!0}
|
|
47
|
-
export{Gq as
|
|
47
|
+
export{Gq as xu,Bq as yu,Hq as zu,Wq as Au,f as Bu,Mq as Cu,w as Du,S as Eu,Iq as Fu,k as Gu,aq as Hu,Fq as Iu,_ as Ju,jq as Ku,N as Lu,U as Mu,m as Nu,c as Ou,d as Pu,p as Qu,l as Ru,P as Su,zq as Tu,Lq as Uu,_q as Vu,Nq as Wu,Tq as Xu,Aq as Yu,C as Zu,Rq as _u,bq as $u,v as av,T as bv,Pq as cv,Cq as dv,gq as ev,r as fv,KJ as gv,cq as hv,dq as iv,pq as jv,OJ as kv,kJ as lv,zJ as mv,sq as nv,rq as ov,LJ as pv};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Nf as T}from"./chunk-
|
|
2
|
+
import{Nf as T}from"./chunk-7qp3zphs.js";import{Nw as I}from"./chunk-ejqpq0wc.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-8cc4vdkh.js")}
|
|
3
3
|
export{g as yf,l as zf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Kt as a,Lt as b,Mt as c,Nt as d,Ot as e,Pt as f,Qt as g,Rt as h,St as i,Tt as j,Ut as k,Vt as l}from"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-ejqpq0wc.js";export{f as structuredDataDirective,j as scanForSitemapEntries,g as registerSeoDirectives,b as processStructuredData,c as processSeoDirective,a as processMetaDirectives,e as metaDirective,d as injectSeoTags,i as generateSitemapIndex,h as generateSitemap,k as generateRobotsTxt,l as generateDefaultRobotsTxt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Am as O,Ho as R,Jp as H,
|
|
2
|
+
import{Am as O,Ho as R,Jp as H,lq as x,qr as g}from"./chunk-5atmahe4.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
|
|
3
3
|
<template data-suspense-fallback>Loading...</template>
|
|
4
4
|
</div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
|
|
5
5
|
<script>
|
|
@@ -8,4 +8,4 @@ function N(D,G){let j=D[G],F=G+1;while(F<D.length){if(D[F]==="\\"){F+=2;continue
|
|
|
8
8
|
`:" ",j++}G+=" ",j++;continue}if(H==="`"){G+=" ",j++;while(j<D.length&&D[j]!=="`"){if(D[j]==="\\"){G+=" ",j+=2;continue}if(D[j]==="$"&&D[j+1]==="{"){let J=j+2,K=M(D,J);if(G+=" ",G+=R(D.slice(J,K)),K<D.length)G+=" ";j=K+1;continue}G+=D[j]===`
|
|
9
9
|
`?`
|
|
10
10
|
`:" ",j++}G+=" ",j++;continue}G+=H,j++}return G}function U(D){let G=new Uint16Array(D.length),j=0,F=!0;for(let H=0;H<D.length;H++){let J=D[H];if(J===")"||J==="]"||J==="}")if(j===0)F=!1;else j--;if(G[H]=j,J==="("||J==="["||J==="{")j++}return{depths:G,balanced:F&&j===0}}
|
|
11
|
-
export{M as
|
|
11
|
+
export{M as ks,R as ls,U as ms};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Kw as W,Lw as k,Mw as G}from"./chunk-ejqpq0wc.js";import A from"fs";import B from"path";function h(j){let q=0;for(let K=0;K<j.length;K++){let Q=j[K];q=(q<<5)-q+Q,q=q&q}return Math.abs(q).toString(16).padStart(8,"0")}function u(j,q){let K=B.basename(j);for(let Q of q)if(Q.startsWith("*.")){let Y=Q.slice(1);if(K.endsWith(Y))return!0}else if(Q.includes("*")){let Y=new RegExp(`^${Q.replace(/\*/g,".*")}$`);if(Y.test(K)||Y.test(j))return!0}else if(K===Q||j.includes(Q))return!0;return!1}function f(j,q,K){let Q=B.extname(j).toLowerCase(),Y=l[Q],X=(K.maxFileSizeKB||500)*1024;if(q>X)return!1;if(K.exclude&&u(j,K.exclude))return!1;if(K.include&&K.include.length>0){for(let Z of K.include)if(Z.startsWith("*.")){if(j.endsWith(Z.slice(1)))return!0}else if(j.includes(Z))return!0}if(Y&&K[Y]===!0)return!0;if(!Y)return!1;return!1}function T(j,q,K,Q){let Y=A.readdirSync(j,{withFileTypes:!0});for(let X of Y){let Z=B.join(j,X.name);if(X.isDirectory()){if(["node_modules",".git",".stx"].includes(X.name))continue;T(Z,q,K,Q)}else if(X.isFile()){let O=A.statSync(Z),_=B.relative(q,Z);if(f(_,O.size,K)){let $=A.readFileSync(Z),L=h($),V=`/${_.replace(/\\/g,"/")}`;Q.push({url:V,revision:L,size:O.size})}}}}function U(j,q){let K=q.pwa?.precache,Q=[];if(!K?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!A.existsSync(j))return{entries:[],totalSize:0,fileCount:0};T(j,j,K,Q),Q.sort((X,Z)=>X.url.localeCompare(Z.url));let Y=Q.reduce((X,Z)=>X+Z.size,0);return{entries:Q,totalSize:Y,fileCount:Q.length}}function J(j){if(j.entries.length===0)return"[]";return`[
|
|
3
3
|
${j.entries.map((K)=>` { url: '${K.url}', revision: '${K.revision}' }`).join(`,
|
|
4
4
|
`)}
|
|
5
5
|
]`}function E(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(2)} MB`}var l;var F=G(()=>{l={".html":"includeHtml",".htm":"includeHtml",".js":"includeJs",".mjs":"includeJs",".css":"includeCss",".png":"includeImages",".jpg":"includeImages",".jpeg":"includeImages",".gif":"includeImages",".webp":"includeImages",".svg":"includeImages",".ico":"includeImages",".woff":"includeFonts",".woff2":"includeFonts",".ttf":"includeFonts",".eot":"includeFonts",".otf":"includeFonts"}});function g(j){let q={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return q[j]||q["network-first"]}function R(j){return g(j).className}function M(j){let q=j.pwa;if(!q?.enabled)return"";let K=q.routes||[],Q=q.cacheStorage,Y=[];for(let X of K){let Z=R(X.strategy),O=[];if(X.maxAgeSeconds||X.maxEntries||Q?.maxEntries){let $=X.maxEntries||Q?.maxEntries||100,L=X.maxAgeSeconds||(Q?.maxAge?Q.maxAge*24*60*60:void 0);O.push(`new ExpirationPlugin({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ei as s}from"./chunk-
|
|
2
|
+
import{ei as s}from"./chunk-zwhnkxgy.js";import{$l as a,Kp as v,Lp as i,Mp as t,Pp as e,Qp as HH,Rp as KH,Sp as QH,Tp as YH,Up as ZH,sr as $H}from"./chunk-5atmahe4.js";import{nt as h}from"./chunk-y2f41kaq.js";import{vv as f}from"./chunk-72x62kch.js";import{existsSync as jH,readFileSync as WH}from"fs";import z from"path";function AH(Q,K="",V=""){let L=Q.startLine>1?`
|
|
3
3
|
`.repeat(Q.startLine-1):"",U=t(i(Q.code)),X=Q.kind==="client"||Q.kind==="plain"?HH(K,Q.code):"";return QH(`${L+U}
|
|
4
4
|
${X}
|
|
5
5
|
export {}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Qo as a,Ro as b,So as c,To as d,Uo as e,Vo as f,Wo as g}from"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as resetUnscopedSignalWarnings,g as processStackReplacements,f as processStackPushDirectives,e as processIncludes,b as partialsCache,c as onceStore,d as clearOnceStore};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Wf as a}from"./chunk-nexpxxsa.js";import"./chunk-xh9paa2g.js";import"./chunk-57atgbyq.js";import"./chunk-9jbssgem.js";import"./chunk-e4g8wz6t.js";import"./chunk-c0n802j1.js";import"./chunk-zkwk82ss.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as buildForProduction};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function X(Q){return Q.replace(/[^\n]/g," ")}function R(Q){let H=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,X).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,X).replace(/<!--[\s\S]*?-->/g,X).replace(/\{\{\{[\s\S]*?\}\}\}/g,X).replace(/\{\{[\s\S]*?\}\}/g,X).replace(/\{!![\s\S]*?!!\}/g,X),F=new Map,J=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/g,z;while((z=Y.exec(H))!==null){let j=z[1]==="/",q=z[2],W=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(W)continue;if(j)J.set(q,(J.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=H.slice(0,z.index).split(`
|
|
3
3
|
`).length;F.set(q,{count:1,firstLine:B})}}}let M=[];for(let j of new Set([...F.keys(),...J.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,W=J.get(j)??0;if(q!==W)M.push({tag:j,opened:q,closed:W,firstOpenLine:F.get(j)?.firstLine??0})}return M}var $=new Set;function U(Q,H){let F;try{F=R(Q)}catch{return}if(F.length===0)return;let J=`${H}:${Q.length}`;if($.has(J))return;$.add(J);let Y=H?H.split(/[/\\]/).pop()||H:"template";for(let{tag:z,opened:M,closed:j,firstOpenLine:q}of F)if(M>j){let W=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 an unclosed <${z}>${W} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 ${j-M} stray </${z}>.`)}
|
|
4
|
-
export{R as
|
|
4
|
+
export{R as sv,U as tv};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ah as h,th as a,uh as b,vh as c,wh as d,xh as e,yh as f,zh as g}from"./chunk-sqvqwd0p.js";import"./chunk-
|
|
2
|
+
import{Ah as h,th as a,uh as b,vh as c,wh as d,xh as e,yh as f,zh as g}from"./chunk-sqvqwd0p.js";import"./chunk-ejqpq0wc.js";export{g as timingPlugin,c as pluginManager,a as definePlugin,f as debugPlugin,h as createVariablesPlugin,e as createFilterPlugin,d as createDirectivePlugin,b as PluginManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Bh as a,Ch as b,Dh as c,Eh as d,Fh as e,Gh as f,Hh as g}from"./chunk-7r9vgzg4.js";import"./chunk-
|
|
2
|
+
import{Bh as a,Ch as b,Dh as c,Eh as d,Fh as e,Gh as f,Hh as g}from"./chunk-7r9vgzg4.js";import"./chunk-ejqpq0wc.js";export{d as useVirtualList,b as processVirtualListDirectives,f as processVirtualGridDirectives,e as processInfiniteListDirectives,c as generateVirtualListCSS,g as default,a as createVirtualList};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ji as O,Ki as w,Li as Z}from"./chunk-7we3xfde.js";import{Zk as R,el as U,kl as T}from"./chunk-
|
|
2
|
+
import{Ji as O,Ki as w,Li as Z}from"./chunk-7we3xfde.js";import{Zk as R,el as U,kl as T}from"./chunk-4kbaky4w.js";import{am as M,aq as k,sr as C,yo as W}from"./chunk-5atmahe4.js";import{qv as E,rv as L}from"./chunk-wj21f1e0.js";import{vv as B}from"./chunk-72x62kch.js";import $ from"path";var Y=new Map;function b(Q,z){for(let J of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(J[1])z.add(J[1]);for(let J of Q.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let H of(J[1]??"").split(",")){let K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();z=$.resolve(q.root||process.cwd(),q.storesDir||"stores")}let J=new Bun.Glob("*.ts"),H=[];try{for await(let q of J.scan({cwd:z,absolute:!0})){let y=$.basename(q,".ts");if(["index","types"].includes(y))continue;if(q.includes(".d.ts"))continue;H.push(q)}}catch{return Z(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
|
|
3
3
|
${y.trim()}`)}catch(y){console.warn(`[stx] Failed to load store ${q}:`,y)}if(G.length===0)return Z(Y,z,K,""),null;let j=G.join(`
|
|
4
4
|
|
|
5
5
|
`),x=`;(function(){
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fk as a,Gk as b,Hk as c,Ik as d,Jk as e}from"./chunk-wvc7t11n.js";import"./chunk-
|
|
2
|
+
import{Fk as a,Gk as b,Hk as c,Ik as d,Jk as e}from"./chunk-wvc7t11n.js";import"./chunk-ejqpq0wc.js";export{d as runPwaAudit,e as formatAuditResult,c as calculateAuditResult,a as auditConfig,b as auditBuildOutput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Jj as b,Kj as c,Lj as d,Mj as e,Nj as f,Oj as g,Pj as h,Qj as i,Rj as j,Sj as k,Tj as l,Uj as m,Vj as n,Wj as o}from"./chunk-3xpk99z4.js";import{tl as a}from"./chunk-fvsefztj.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{At as i,pt as a,tt as b,ut as c,vt as d,wt as e,xt as f,yt as g,zt as h}from"./chunk-xj6bcwqa.js";import"./chunk-ejqpq0wc.js";export{a as webpHeaderHasAlpha,g as snapshotImageDelivery,b as setImageEncoderIdentity,i as prepareImageDelivery,e as isTransparentImage,h as installImageDelivery,c as imageEncoderIdentity,d as getImageDelivery,f as clearImageDeliveryCatalog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Xj as a,Yj as b,Zj as c,_j as d}from"./chunk-f5cw54q3.js";import"./chunk-
|
|
2
|
+
import{Xj as a,Yj as b,Zj as c,_j as d}from"./chunk-f5cw54q3.js";import"./chunk-ejqpq0wc.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Le as c,Me as d,Ne as e,Oe as f,Pe as g,Qe as h}from"./chunk-cdq28mek.js";import"./chunk-zwhnkxgy.js";import"./chunk-7we3xfde.js";import{Kp as a,Np as b}from"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{d as virtualPathFor,g as typecheckStxFiles,e as sourcePathFor,h as formatTypecheckDiagnostics,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var m=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var n=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var o=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=import.meta.require;
|
|
3
|
-
export{m as
|
|
3
|
+
export{m as Kw,n as Lw,o as Mw,p as Nw};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$h as e,Xh as a,Yh as b,Zh as c,_h as d,ai as f,bi as g,ci as h}from"./chunk-1vb2rj09.js";import"./chunk-e4g8wz6t.js";import"./chunk-
|
|
2
|
+
import{$h as e,Xh as a,Yh as b,Zh as c,_h as d,ai as f,bi as g,ci as h}from"./chunk-1vb2rj09.js";import"./chunk-e4g8wz6t.js";import"./chunk-ejqpq0wc.js";export{d as v,a as useForm,g as processHasErrorsDirective,h as processFormValidationDirectives,f as processErrorsDirective,e as processErrorDirective,b as defineForm,c as Validator};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Kg as a,Lg as b,Mg as c,Ng as d,Og as e,Pg as f}from"./chunk-5yhv1pe5.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{nt as iJ}from"./chunk-y2f41kaq.js";import{Nw as hJ}from"./chunk-ejqpq0wc.js";import z from"path";import{hasLocalConfig as dJ}from"bunfig";var BJ={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Placeholders, disabled text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis, links"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"white",dark:"white",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"white",dark:"white",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Placeholder in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function p(J){return`--stx-${J}`}function m(J,Q){let Z=Q.lastIndexOf("-");if(Z===-1)return typeof J[Q]==="string"?J[Q]:void 0;let $=J[Q.slice(0,Z)];if(!$||typeof $!=="object")return;let U=$[Q.slice(Z+1)];return typeof U==="string"?U:void 0}function LJ(J){let Q={};for(let[Z,$]of Object.entries(BJ)){let U=m(J,$.light);if(U===void 0)continue;Q[Z]=`var(${p(Z)}, ${U})`}return Q}function HJ(J){let Q=[],Z=[];for(let[$,U]of Object.entries(BJ)){let F=m(J,U.light),W=m(J,U.dark);if(F===void 0)continue;if(Q.push(` ${p($)}: ${F};`),W!==void 0)Z.push(` ${p($)}: ${W};`)}if(Q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...Q,"}",".dark {",...Z,"}",""].join(`
|
|
3
|
+
`)}var OJ={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function KJ(J){return`--stx-radius-${J}`}function IJ(){let J={};for(let[Q,Z]of Object.entries(OJ))J[Q]=`var(${KJ(Q)}, ${Z.value})`;return J}function DJ(){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(OJ).map(([J,Q])=>` ${KJ(J)}: ${Q.value};`),"}",""].join(`
|
|
4
|
+
`)}function NJ(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function h(J,Q){let Z={...J};for(let[$,U]of Object.entries(Q))Z[$]=NJ(U)&&NJ(Z[$])?h(Z[$],U):U;return Z}function MJ(J={},Q={}){let Z=J.theme||{},$=Q.theme||{},{extend:U,...F}=$,{extend:W,...j}=Z,X=j.colors||{};j.colors={...X,...LJ(X)};let V=j.borderRadius||{};j.borderRadius={...V,...IJ()};let q=h(j,F),G=h(W||{},U||{});if(Object.keys(G).length>0)q.extend=G;let w=[...J.safelist||[],...Q.safelist||[]],K={...J.shortcuts||{},...Q.shortcuts||{}},D=[...J.preflights||[],...Q.preflights||[]];return{config:{...J,...Q,theme:q,safelist:w,shortcuts:K,...D.length>0?{preflights:D}:{},content:[],output:""},safelist:w,shortcuts:K,includePreflight:Q.preflight!==!1,minify:Q.minify===!0,tokenCSS:HJ(X)+DJ()}}var E=/<script\b[^>]*>/iy,c=/<\/script\s*>/ig,S=/<style\b[^>]*>/iy,l=/<\/style\s*>/ig;function PJ(J,Q,Z,$){Z.lastIndex=Q;let U=Z.exec(J);if(!U||U.index!==Q)return-1;$.lastIndex=Z.lastIndex;let F=$.exec(J);if(!F)return-1;return F.index+F[0].length}function o(J,Q){return PJ(J,Q,E,c)}function AJ(J,Q){return PJ(J,Q,S,l)}function lJ(J,Q){if(!J.startsWith("<!--",Q))return-1;let Z=J.indexOf("-->",Q+4);if(Z===-1)return-1;return Z+3}function _J(J,Q){if(J.startsWith("<!--",Q)){let U=lJ(J,Q);return U===-1?J.length:U}if(E.lastIndex=Q,E.exec(J)?.index===Q){c.lastIndex=E.lastIndex;let U=c.exec(J);return U?U.index+U[0].length:J.length}if(S.lastIndex=Q,S.exec(J)?.index===Q){l.lastIndex=S.lastIndex;let U=l.exec(J);return U?U.index+U[0].length:J.length}return-1}function oJ(J,Q){let Z=[],$=0,U=J.length,F=!1,W=null;while($<U){let j=J[$];if(F){if(W){if(j===W)W=null}else if(j==='"'||j==="'")W=j;else if(j===">")F=!1;$++;continue}if(j!=="<"){let G=J.indexOf("<",$+1);if(G===-1)break;$=G;continue}let X=Q(J,$);if(X>$){Z.push({start:$,end:X,token:J.slice($,X)}),$=X;continue}let V=_J(J,$);if(V>$){$=V;continue}let q=J.charCodeAt($+1);if(q>=65&&q<=90||q>=97&&q<=122)F=!0;$++}return Z}function kQ(J){let Q=0,Z=0,$=0,U=!1,F=null;while($<J.length){if(U){let G=J[$];if(F){if(G===F)F=null}else if(G==='"'||G==="'")F=G;else if(G===">")U=!1;$++;continue}let W=J.indexOf("<",$),j=W===-1?J.length:W;while($<j){let G=J[$++];if(G==="{")Q++;else if(G==="}")Z++;if(Q>=2&&Z>=2)return!0}if(W===-1)break;let X=_J(J,W);if(X>W){$=X;continue}let V=J.charCodeAt(W+1),q=V===47?J.charCodeAt(W+2):V;if(q>=65&&q<=90||q>=97&&q<=122)U=!0;$=W+1}return!1}function vJ(J,Q){while(J.size>=Q){let Z=J.keys().next();if(Z.done)return;J.delete(Z.value)}}var aJ=65536,sJ=12,i=new Map;function a(J,Q,Z,$){let U=$!==void 0&&J.length>=aJ,F=U?`${$}\x00${J}`:"";if(U){let q=i.get(F);if(q)return{output:q.output,tokens:q.tokens.slice()}}let W=oJ(J,Q);if(W.length===0)return{output:J,tokens:[]};let j=W.map((q)=>q.token),X="",V=0;for(let q=0;q<W.length;q++){let G=W[q];X+=J.slice(V,G.start),X+=Z(G.token,q),V=G.end}if(X+=J.slice(V),U)return vJ(i,sJ),i.set(F,{output:X,tokens:j}),{output:X,tokens:j.slice()};return{output:X,tokens:j}}var tJ=65536,eJ=4,r=new Map;function n(J,Q,Z){return{output:Q,scripts:Z,restore:($)=>$===Q?J:JQ($,Z)}}function xQ(J){let Q=J.length>=tJ;if(Q){let U=r.get(J);if(U)return n(J,U.output,U.scripts.slice())}let{output:Z,tokens:$}=a(J,o,(U,F)=>`\x00STX_SCRIPT_${F}\x00`);if(Q)return vJ(r,eJ),r.set(J,{output:Z,scripts:$}),n(J,Z,$.slice());return n(J,Z,$)}function JQ(J,Q){if(Q.length===0)return J;return J.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(Z,$)=>Q[+$]??"")}function RJ(J,Q=""){let Z=`${J}${Q}`,$=0;for(let U=0;U<Z.length;U++){let F=Z.charCodeAt(U);$=($<<5)-$+F,$=$&$}return`stx-${Math.abs($).toString(36)}`}function TJ(J,Q,Z={}){let{prefix:$="",preserveHost:U=!0,scopeKeyframes:F=!0,scopeCustomProperties:W=!1}=Z;if(!J.trim())return"";let j=s(J),X=[],V=new Map;if(F)for(let q of j){let G=q.selector.match(/@keyframes\s+([a-z_-][a-z0-9_-]*)/i);if(G){let w=G[1],K=`${Q}_${w}`;V.set(w,K)}}for(let q of j){let G=bJ(q,Q,$,U,V,W);X.push(G)}return X.join(`
|
|
5
|
+
|
|
6
|
+
`)}function s(J){let Q=[],Z=J.replace(/\/\*[\s\S]*?\*\//g,""),$=0,U="",F=!1,W="";for(let j=0;j<Z.length;j++){let X=Z[j];if(X==="@"&&$===0)F=!0;if(X==="{")$++;else if(X==="}"){if($--,$===0){if(F){W+=X;let V=W.match(/@([a-z-]+)\s*([^{]*)\{([\s\S]*)\}/i);if(V){let[,q,G,w]=V;if(q==="keyframes")Q.push({selector:`@keyframes ${G.trim()}`,declarations:w.trim()});else if(q==="media"||q==="supports"||q==="container"){let K=s(w);Q.push({selector:`@${q} ${G.trim()}`,declarations:K.map((D)=>`${D.selector} { ${D.declarations} }`).join(`
|
|
7
|
+
`)})}else Q.push({selector:`@${q} ${G.trim()}`,declarations:w.trim()})}W="",F=!1}else if(U.trim()){U+=X;let V=U.match(/([^{]+)\{([^}]*)\}/);if(V)Q.push({selector:V[1].trim(),declarations:V[2].trim()});U=""}continue}}if(F)W+=X;else U+=X}return Q}function bJ(J,Q,Z,$,U,F){let{selector:W,declarations:j}=J;if(W.startsWith("@")){if(W.startsWith("@keyframes")){let q=W.replace("@keyframes ","").trim();return`@keyframes ${U.get(q)||q} { ${j} }`}if(W.startsWith("@media")||W.startsWith("@supports")||W.startsWith("@container")){let G=s(`x { ${j} }`.replace(/x \{ /,"").replace(/ \}$/,"")).map((w)=>bJ(w,Q,Z,$,U,F)).join(`
|
|
8
|
+
`);return`${W} {
|
|
9
|
+
${G}
|
|
10
|
+
}`}return`${W} { ${j} }`}let X=QQ(W,Q,Z,$),V=j;for(let[q,G]of U)V=V.replace(new RegExp(`\\b${q}\\b`,"g"),G);if(F)V=V.replace(/--([a-z-]+)/gi,`--${Q}-$1`);return`${X} { ${V} }`}function QQ(J,Q,Z,$){let U=J.split(",").map((W)=>W.trim()),F=[];for(let W of U){if(W.startsWith(":host")){if($)F.push(W);else{let V=W.replace(/:host(\([^)]*\))?/,`.${Q}$1`);F.push(V)}continue}if(W.includes("::slotted")){F.push(W);continue}if(W===":root"){F.push(`:root .${Q}`);continue}let j=Z?`${Z} .${Q}`:`.${Q}`;F.push(`${j} ${W}`);let X=$Q(W,Q);if(X)F.push(Z?`${Z} ${X}`:X)}return F.join(", ")}function $Q(J,Q){let Z=0,$=J.length;for(let X=0;X<J.length;X++){let V=J[X];if(V==="["||V==="(")Z++;else if(V==="]"||V===")")Z--;else if(Z===0&&(V===" "||V===">"||V==="+"||V==="~")){$=X;break}}let U=J.slice(0,$),F=J.slice($);if(!U)return"";let W=U.length,j=0;for(let X=0;X<U.length;X++){let V=U[X];if(V==="["||V==="(")j++;else if(V==="]"||V===")")j--;else if(Z===0&&j===0&&V===":"){W=X;break}}return`${U.slice(0,W)}.${Q}${U.slice(W)}${F}`}var EJ=String.raw`(?<![\w-])scoped(?![\w-])`,t=/<style\s+([^>]*)>/gi,kJ=/<style\s+([^>]*)>([\s\S]*?)<\/style>/gi,SJ=new RegExp(EJ,"i"),ZQ=new RegExp(EJ,"gi"),e=/<style\b[^>]*\bdata-stx-scoped(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?[^>]*>[\s\S]*?<\/style>\s*/gi;function UQ(J){t.lastIndex=0;let Q=t.exec(J);while(Q!==null){if(SJ.test(Q[1]))return!0;Q=t.exec(J)}return!1}function JJ(J){let Q=new Set,Z=[];e.lastIndex=0;let $=e.exec(J);while($!==null){let U=$[0].trim();if(Q.has(U))Z.push({start:$.index,end:$.index+$[0].length});else Q.add(U);$=e.exec(J)}return Z}function QJ(J){let Q=JJ(J);if(Q.length===0)return J;let Z=Array(Q.length+1),$=0;for(let U=0;U<Q.length;U++){let F=Q[U];Z[U]=J.slice($,F.start),$=F.end}return Z[Q.length]=J.slice($),Z.join("")}function CQ(J,Q){if(!UQ(J))return{html:J,hasScoped:!1};let Z=RJ(Q),$=`data-v-${Z}`,U=J,F=!1;if(kJ.lastIndex=0,U=U.replace(kJ,(W,j,X)=>{if(!SJ.test(j))return W;F=!0;let V=FQ(X,$),q=j.replace(ZQ,"").trim(),G=q?` ${q}`:"";return`<style data-stx-scoped="${Z}"${G}>${V}</style>`}),!F)return{html:J,hasScoped:!1};return U=XQ(U,$),{html:U,hasScoped:!0}}function FQ(J,Q){return TJ(J,"__SCOPE_PLACEHOLDER__",{preserveHost:!1}).replace(/\.(__SCOPE_PLACEHOLDER__) /g,`[${Q}] `).replace(/\.(__SCOPE_PLACEHOLDER__)/g,`[${Q}]`)}var WQ=(J)=>`\x00stx-scope-mask-${J}\x00`,xJ=/\u0000stx-scope-mask-(\d+)\u0000/g;function XQ(J,Q){let Z=a(J,(U,F)=>{let W=o(U,F);return W>F?W:AJ(U,F)},(U,F)=>WQ(F)),$=jQ(Z.output,Q);return xJ.lastIndex=0,$.replace(xJ,(U,F)=>Z.tokens[Number(F)])}function jQ(J,Q){let Z=new Set(["script","style","template","html","head","body","meta","link","title","base","!doctype","!DOCTYPE"]);return J.replace(/<([a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*)?\/?>/g,($,U,F)=>{if(Z.has(U.toLowerCase()))return $;if($.includes(Q))return $;if(U.toLowerCase()==="style"||U.toLowerCase()==="script")return $;if(F)return $.replace(`<${U}${F}`,`<${U} ${Q}${F}`);if($.endsWith("/>"))return`<${U} ${Q} />`;return`<${U} ${Q}>`})}var Y={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import CJ from"fs";class ZJ{cache=new Map;maxSize;options;sizes;bytes=0;constructor(J=100,Q){this.maxSize=J,this.options=Q??null,this.sizes=Q?new Map:null}get byteSize(){return this.bytes}setMaxBytes(J){if(!this.options)return;this.options={...this.options,maxBytes:J};while(this.bytes>J&&this.cache.size>0){let Q=this.cache.keys().next().value;if(Q===void 0)break;this.delete(Q)}}get(J){if(!this.cache.has(J))return;let Q=this.cache.get(J);return this.cache.delete(J),this.cache.set(J,Q),Q}set(J,Q){if(this.cache.has(J))this.delete(J);let Z=this.options?this.options.sizeOf(Q):0;if(this.options&&Z>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+Z>this.options.maxBytes)){let $=this.cache.keys().next().value;if($===void 0)break;this.delete($)}if(this.cache.set(J,Q),this.sizes)this.sizes.set(J,Z),this.bytes+=Z}has(J){return this.cache.has(J)}delete(J){if(this.sizes){let Q=this.sizes.get(J);if(Q!==void 0)this.bytes-=Q,this.sizes.delete(J)}return this.cache.delete(J)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var P=new Map,VQ=500;function dQ(J,Q){if(Q?.includes("g"))return new RegExp(J,Q);let Z=`${J}:${Q||""}`;if(!P.has(Z)){if(P.size>=VQ){let $=P.keys().next().value;if($)P.delete($)}P.set(Z,new RegExp(J,Q))}return P.get(Z)}class yJ{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(J){let Q=Array.from(new Set(J)),Z=Q.sort().join(","),$=this.pool.find((j)=>j.context.join(",")===Z);if($)return $.func;let U=this.fnCache,F=this.fnCacheMaxSize,W=(...j)=>{return(X)=>{try{let V=`${Z}:${X}`,q=U.get(V);if(!q){if(U.size>=F){let G=U.keys().next().value;if(G)U.delete(G)}q=Function(...Q,`
|
|
11
|
+
'use strict';
|
|
12
|
+
try {
|
|
13
|
+
return ${X};
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
if (e instanceof ReferenceError || e instanceof TypeError) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
`),U.set(V,q)}return q(...j)}catch{return}}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:W,context:Q.slice()});return W}clear(){this.pool.length=0,this.fnCache.clear()}}var pQ=new yJ;class fJ{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(J){this.enabled=J}isEnabled(){return this.enabled}setBudget(J,Q){this.budgets.set(J,{warnThreshold:0.8,action:"warn",...Q})}setBudgets(J){for(let[Q,Z]of Object.entries(J))this.setBudget(Q,Z)}removeBudget(J){this.budgets.delete(J)}getBudgets(){let J={};for(let[Q,Z]of this.budgets.entries())J[Q]=Z;return J}onViolation(J){this.violationHandlers.push(J)}offViolation(J){let Q=this.violationHandlers.indexOf(J);if(Q!==-1)this.violationHandlers.splice(Q,1)}time(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}async timeAsync(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=await Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}checkBudget(J,Q){let Z=this.budgets.get(J);if(!Z)return;let $=Q/Z.maxTime*100,U=Z.warnThreshold!==void 0?Q>=Z.maxTime*Z.warnThreshold&&Q<Z.maxTime:!1,F=Q>=Z.maxTime;if(!U&&!F)return;let W={label:J,actualTime:Q,budgetTime:Z.maxTime,exceedancePercent:$,timestamp:new Date,isWarning:U};this.violations.push(W);while(this.violations.length>this.maxViolations)this.violations.shift();for(let X of this.violationHandlers)try{X(W)}catch{}let j=U?`[Performance Warning] "${J}" took ${Q.toFixed(2)}ms (${$.toFixed(1)}% of ${Z.maxTime}ms budget)`:`[Performance Budget Exceeded] "${J}" took ${Q.toFixed(2)}ms (exceeded ${Z.maxTime}ms budget by ${($-100).toFixed(1)}%)`;switch(Z.action){case"log":console.log(j);break;case"warn":console.warn(j);break;case"error":console.error(j);break;case"throw":if(F)throw Error(j);else console.warn(j);break}}recordTime(J,Q){let Z=this.metrics.get(J);if(Z)Z.count++,Z.totalTime+=Q,Z.maxTime=Math.max(Z.maxTime,Q),Z.minTime=Math.min(Z.minTime,Q);else this.metrics.set(J,{count:1,totalTime:Q,maxTime:Q,minTime:Q})}getStats(J){if(J){let Z=this.metrics.get(J);if(!Z)return{};let $=this.budgets.get(J);return{count:Z.count,avgTime:Z.totalTime/Z.count,totalTime:Z.totalTime,maxTime:Z.maxTime,minTime:Z.minTime,budget:$?.maxTime,budgetUtilization:$?Z.totalTime/Z.count/$.maxTime*100:void 0}}let Q={};for(let[Z,$]of this.metrics.entries()){let U=this.budgets.get(Z);Q[Z]={count:$.count,avgTime:$.totalTime/$.count,totalTime:$.totalTime,maxTime:$.maxTime,minTime:$.minTime,budget:U?.maxTime,budgetUtilization:U?$.totalTime/$.count/U.maxTime*100:void 0}}return Q}getViolations(J){if(J)return this.violations.filter((Q)=>Q.label===J);return[...this.violations]}getViolationStats(){let J={},Q=0,Z=0;for(let $ of this.violations)if(J[$.label]=(J[$.label]||0)+1,$.isWarning)Q++;else Z++;return{total:this.violations.length,byLabel:J,warnings:Q,errors:Z}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var $J=null;function qQ(){if(!$J)$J=new fJ;return $J}var mQ=new Proxy({},{get(J,Q){return qQ()[Q]}});var gJ=[];function uJ(J){let Q=new ZJ(J);return gJ.push(Q),Q}function nQ(){for(let J of gJ)J.clear()}function UJ(J,...Q){return`${Q.map((Z)=>String(Z??"")).join("\x00")}\x00${J.length}\x00${Bun.hash(J)}`}function cQ(J){let Q=[];for(let Z of new Set(J))try{Q.push({path:Z,mtimeMs:CJ.statSync(Z).mtimeMs})}catch{}return Q}function lQ(J){for(let Q of J)try{if(CJ.statSync(Q.path).mtimeMs!==Q.mtimeMs)return!1}catch{return!1}return!0}var H=null,WJ=!1,L=null,T="",A=!1,rJ=256,N=new Map,O=new Map,M=null,b=null;function y(J){return Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)}function FJ(J,Q){if(N.has(J))N.delete(J);else if(N.size>=rJ)N.delete(N.keys().next().value);N.set(J,Q)}function GQ(J){let Q=y(J);if(O.has(Q))O.delete(Q);else if(O.size>=rJ)O.delete(O.keys().next().value);return O.set(Q,J),Q}function Z0(J){let Q=O.get(J);if(Q===void 0)return;return O.delete(J),O.set(J,Q),Q}async function zQ(J){if(!M)return null;try{let Q=Bun.file(z.join(M,`cw-${y(J)}.css`));if(!await Q.exists())return null;return await Q.text()}catch{return null}}async function YQ(J,Q){if(!M)return;try{if(!fs.existsSync(M))fs.mkdirSync(M,{recursive:!0});await Bun.write(z.join(M,`cw-${y(J)}.css`),Q)}catch{}}async function pJ(J){try{let Q=await import(J);if(Q&&Q.CSSGenerator)return{CSSGenerator:Q.CSSGenerator,config:Q.config,build:Q.build,defaultConfig:Q.defaultConfig,extractClasses:Q.extractClasses}}catch{}return null}var wQ=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],BQ=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function LQ(){let J=[],Q=process.cwd();while(Q!==z.dirname(Q)){for(let Z of["node_modules","pantry"])for(let $ of wQ)J.push(z.join(Q,Z,...$));Q=z.dirname(Q)}return J}function HQ(){let J=[],Q=process.env.HOME||process.env.USERPROFILE||"",Z=[Q&&z.join(Q,"Code","Tools","ts-css"),Q&&z.join(Q,"Code","Tools","crosswind"),Q&&z.join(Q,"repos","stacks-org","ts-css"),Q&&z.join(Q,"repos","stacks-org","crosswind"),z.join(process.cwd(),"..","ts-css"),z.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let $ of Z)J.push(z.join($,"packages","toolkit","dist","engine","index.js")),J.push(z.join($,"packages","toolkit","src","engine","index.ts"));if(Q)J.push(z.join(Q,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return J}async function nJ(){if(WJ)return H;WJ=!0;try{let J=async(U)=>{for(let F of U){if(!await Bun.file(F).exists())continue;let W=await pJ(F);if(W){if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded from ${z.dirname(z.dirname(F))}`);return W}}return null};if(process.env.CROSSWIND_SRC){let U=z.resolve(process.env.CROSSWIND_SRC),F=await J([U]);if(!F)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${U}`);return H=F,H}let Q=await J(LQ());if(Q)return H=Q,H;let Z=BQ;for(let U of Z){let F=await pJ(U);if(F){if(H=F,!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded`);return H}}let $=await J(HQ());if($)return H=$,H;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${Y.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${Y.reset}`),console.warn(`${Y.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${Y.reset}`),null}}function U0(){XJ.clear(),H=null,WJ=!1,L=null,T="",N.clear(),O.clear(),b=null}var mJ=!1;async function cJ(J){try{let Q=dJ({name:"css",cwd:J})?"css":dJ({name:"crosswind",cwd:J})?"crosswind":null;if(!Q)return null;if(Q==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!mJ)mJ=!0,console.warn(`${Y.yellow}[ts-css]${Y.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:Z}=await import("bunfig"),$=await Z({name:Q,cwd:J,defaultConfig:{},checkEnv:!1,verbose:!1});if(!$?.path||!$.config||Object.keys($.config).length===0)return null;let U=z.relative(J,$.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from ${U||$.path}`);return $.config}catch(Q){if(Q instanceof Error&&Q.name==="ConfigNotFoundError")return null;return console.warn(`${Y.yellow}[ts-css]${Y.reset} Failed to load css config:`,Q instanceof Error?Q.message:Q),null}}async function OQ(J){let Q=null;try{let{loadStxConfig:Z}=await import("./chunk-7d2gfyk8.js"),$=await Z(J);if($.css)if(typeof $.css==="string"){let U=z.isAbsolute($.css)?$.css:z.resolve(J,$.css);if(await Bun.file(U).exists()){let F=await import(U);Q=F.default||F,console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from stx.config.ts \u2192 ${$.css}`)}}else{if(Q={...$.css,content:$.css.content||[],preflight:$.css.preflight??!0,minify:$.css.minify??!1},$.css.config){let U=z.isAbsolute($.css.config)?$.css.config:z.resolve(J,$.css.config);if(await Bun.file(U).exists()){let F=await import(U);Q={...F.default||F,...Q}}}console.log(`${Y.green}[ts-css]${Y.reset} Using inline CSS config from stx.config.ts`)}}catch{}return Q||await cJ(J)}function KQ(J){try{let Q=new WeakSet;return y(JSON.stringify(J??{},(Z,$)=>{if(typeof $==="function")return`[fn]${String($)}`;if(typeof $==="object"&&$!==null){if(Q.has($))return"[circular]";Q.add($)}return $})??"")}catch{return"unhashable"}}async function IQ(J){if(A)return T;A=!0;try{let Q=await nJ();if(!Q||!Q.build)return A=!1,"";if(!L)L=await cJ(J);if(!L)return A=!1,"";let Z=Q.defaultConfig?.theme||{},$=L.theme||{},U={...Q.defaultConfig,...L,theme:{...Z,...$,extend:{...Z.extend||{},...$.extend||{}}}},F=performance.now(),W=await Q.build(U),j=performance.now()-F;if(T=W.css,console.log(`${Y.cyan}[ts-css]${Y.reset} Built ${W.classes.size} classes in ${j.toFixed(1)}ms`),U.output){let X=z.isAbsolute(U.output)?U.output:z.join(J,U.output),V=z.dirname(X);if(!fs.existsSync(V))fs.mkdirSync(V,{recursive:!0});await Bun.write(X,W.css)}return A=!1,W.css}catch(Q){return console.error(`${Y.red}[ts-css]${Y.reset} Build error:`,Q),A=!1,T}}async function F0(J){L=null,await IQ(J)}function W0(){return T}function DQ(J){let Q=new Set,Z=/class\s*=\s*["']([^"']+)["']/gi,$=Z.exec(J);while($!==null){for(let W of $[1].split(/\s+/))if(W.trim())Q.add(W.trim());$=Z.exec(J)}let U=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,F=U.exec(J);while(F!==null){let W=F[1].match(/'([^']+)'/g);if(W){for(let j of W)for(let X of j.slice(1,-1).split(/\s+/))if(X.trim())Q.add(X.trim())}F=U.exec(J)}return Q}var XJ=uJ(64);async function NQ(J,Q){let Z=XJ.get(UJ(J,Q,b));if(Z!==void 0)return Z;let $=await MQ(J,Q);if($)XJ.set(UJ(J,Q,b),$);return $}async function MQ(J,Q){try{let Z=await nJ();if(!Z)return"";let $=typeof Z.extractClasses==="function"?Z.extractClasses(J):DQ(J);if($.size===0)return"";let U=Q?z.resolve(Q):process.cwd();if(!M)M=iJ(U,"cache");let F=[...$].sort().join(" "),W=`${b||"default"}::${F}`,j=N.get(W);if(j!==void 0)return FJ(W,j),j;let X=await zQ(W);if(X!==null)return FJ(W,X),X;if(!L)L=await OQ(U),b=KQ(L);let V=Z.defaultConfig||Z.config,q=L||{},G=MJ(V,q),{safelist:w,includePreflight:K,minify:D,tokenCSS:jJ}=G,VJ=G.config,_=new Z.CSSGenerator(VJ);for(let B of w)_.generate(B);for(let B of $)_.generate(B);let I=_.toCSS(K,D),qJ=VJ.shortcuts||q.shortcuts||{};for(let[B,f]of Object.entries(qJ)){if(!$.has(B)&&!w.includes(B))continue;let C=f.split(/\s+/).filter(Boolean);for(let R of C)_.generate(R)}I=_.toCSS(K,D);let v=I.split(`
|
|
22
|
+
`);for(let[B,f]of Object.entries(qJ)){if(!$.has(B)&&!w.includes(B))continue;let C=f.split(/\s+/).filter(Boolean),R=[],g=[];for(let u of C){let GJ=u.startsWith("dark:"),zJ=`.${(GJ?u.slice(5):u).replace(/\//g,"\\/").replace(/:/g,"\\:").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/%/g,"\\%")}`;for(let k=0;k<v.length;k++){let YJ=v[k].trim();if(YJ===`${zJ} {`||YJ.startsWith(`${zJ} {`)){let x=k,wJ="";while(x<v.length){if(wJ+=v[x],v[x].includes("}"))break;x++}let d=wJ.match(/\{([^}]+)\}/);if(d)if(GJ)g.push(d[1].trim());else R.push(d[1].trim());break}}}if(R.length)I+=`
|
|
23
|
+
.${B} { ${R.join(" ")} }`;if(g.length)I+=`
|
|
24
|
+
@media (prefers-color-scheme: dark) { .dark .${B} { ${g.join(" ")} } }`}return I=jJ+I,FJ(W,I),YQ(W,I),I}catch(Z){return console.warn("Failed to generate Css CSS:",Z),""}}async function X0(J,Q,Z=!1,$=!1){let U=await NQ(J,Q);if(!U)return $?QJ(J):J;let F=Z?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${GQ(U)}.css">`:`<style data-css="generated">
|
|
25
|
+
${U}
|
|
26
|
+
</style>`;if($)return PQ(J,F);let W=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(W.test(J)){let j=!1;return J.replace(W,()=>{if(j)return"";return j=!0,F})}if(J.includes("</head>"))return J.replace("</head>",`${F}
|
|
27
|
+
</head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>
|
|
28
|
+
${F}`);return F+J}function PQ(J,Q){let Z=JJ(J).map((X)=>({...X,replacement:""})),$=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g,U=$.exec(J);if(U!==null){let X=!0;while(U!==null)Z.push({start:U.index,end:U.index+U[0].length,replacement:X?Q:""}),X=!1,U=$.exec(J)}else{let X=J.indexOf("</head>");if(X!==-1)Z.push({start:X,end:X,replacement:`${Q}
|
|
29
|
+
`});else{let V=J.match(/<body([^>]*)>/);if(V?.index!==void 0)Z.push({start:V.index,end:V.index+V[0].length,replacement:`${V[0]}
|
|
30
|
+
${Q}`});else Z.push({start:0,end:0,replacement:Q})}}Z.sort((X,V)=>X.start-V.start||X.end-V.end);for(let X=1;X<Z.length;X++)if(Z[X].start<Z[X-1].end)return AQ(QJ(J),Q);let F=Array(Z.length*2+1),W=0,j=0;for(let X of Z)F[j++]=J.slice(W,X.start),F[j++]=X.replacement,W=X.end;return F[j]=J.slice(W),F.join("")}function AQ(J,Q){let Z=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(Z.test(J)){let $=!1;return J.replace(Z,()=>{if($)return"";return $=!0,Q})}if(J.includes("</head>"))return J.replace("</head>",`${Q}
|
|
31
|
+
</head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>
|
|
32
|
+
${Q}`);return Q+J}
|
|
33
|
+
export{ZJ as Cs,dQ as Ds,mQ as Es,uJ as Fs,nQ as Gs,UJ as Hs,cQ as Is,lQ as Js,o as Ks,AJ as Ls,lJ as Ms,oJ as Ns,kQ as Os,vJ as Ps,a as Qs,xQ as Rs,JQ as Ss,h as Ts,MJ as Us,JJ as Vs,QJ as Ws,CQ as Xs,Y as Ys,Z0 as Zs,nJ as _s,U0 as $s,cJ as at,OQ as bt,KQ as ct,IQ as dt,F0 as et,W0 as ft,DQ as gt,NQ as ht,X0 as it};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$m as T,Ho as k,Jp as w,Sl as A,Tl as b,Zn as M,an as y,km as B,lo as R,mm as F,
|
|
2
|
+
import{$m as T,Ho as k,Jp as w,Sl as A,Tl as b,Zn as M,an as y,km as B,lo as R,mm as F,qr as P,zo as x}from"./chunk-5atmahe4.js";import{Nw as v}from"./chunk-ejqpq0wc.js";function j(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,Y){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(Y?.some((X)=>q>=X.start&&N<=X.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,Y)=>J.start-Y.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function D(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>b(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as f,resolve as H}from"path";function S(K){let z=K,G=M(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],Y=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],X=$[2],E=$[0],Z=N.includes("server");if(Y(X))J.push(E);else if(Z)Q.push(X);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,X,E=[];while((X=N.exec(q))!==null){let Z=X.index+X[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:X.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function g(K,z){return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -14,5 +14,5 @@ ${Q.join(`
|
|
|
14
14
|
`)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=Y.__stx_event_bindings||[],X=B(Y),Z=(await Promise.all(Q.map(async(I)=>{let W=I.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return I;return await F(W[1],{eventBindings:N,templateContent:q,serverData:X,filePath:z})}))).join(`
|
|
15
15
|
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
|
|
16
16
|
$1`);else q+=`
|
|
17
|
-
${Z}`}q=await R(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-
|
|
17
|
+
${Z}`}q=await R(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-mz4breg8.js");q=await N(q)}catch{}return q}
|
|
18
18
|
export{j as ok,C as pk,D as qk,o as rk,r as sk,V as tk};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ue as a}from"./chunk-mpyjnwje.js";import"./chunk-57atgbyq.js";import"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{a as buildApp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Re as a,Se as b}from"./chunk-2ver2s2y.js";import"./chunk-
|
|
2
|
+
import{Re as a,Se as b}from"./chunk-2ver2s2y.js";import"./chunk-ejqpq0wc.js";export{b as captureScreenshots,a as captureScreenshot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Am as h,Bm as i,Cm as j,Dm as k,Em as l,Fm as m,Gm as n,Hm as o,Im as p,Jm as q,Km as r,tm as a,um as b,vm as c,wm as d,xm as e,ym as f,zm as g}from"./chunk-
|
|
2
|
+
import{Am as h,Bm as i,Cm as j,Dm as k,Em as l,Fm as m,Gm as n,Hm as o,Im as p,Jm as q,Km as r,tm as a,um as b,vm as c,wm as d,xm as e,ym as f,zm as g}from"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{j as usesSignalsInScript,r as unescapeHtml,p as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,n as processExpressions,m as interpolateScriptsInTemplate,k as interpolateScriptExpressions,l as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,q as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,e as clearCustomFilters,o as applyFilters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Gp as b,Hp as c,Ip as d,Jp as e,lo as a}from"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nw as y}from"./chunk-ejqpq0wc.js";function S4(){if(typeof Notification<"u"&&Notification.permission==="granted")return!0;return!1}function jZ(){return typeof window<"u"&&typeof document<"u"}async function w4(){if(typeof Notification>"u")return!1;if(Notification.permission==="granted")return!0;if(Notification.permission==="denied")return!1;return await Notification.requestPermission()==="granted"}var g=new Map;function B4(){return`alert-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function f4(Z){switch(Z){case"info":return"ℹ";case"success":return"✔";case"warning":return"⚠";case"error":return"✖";default:return"ℹ"}}function v4(Z="top-right"){if(!jZ())throw Error("Toast container requires browser environment");try{let $=document.querySelector(`.stx-toast-container[data-position="${Z}"]`);if($)return $}catch{}let Y=document.createElement("div");Y.className=`stx-toast-container ${Z}`,Y.dataset.position=Z;try{if(document.body)document.body.appendChild(Y)}catch{}return Y}function y4(Z){let{options:Y}=Z,$=f4(Y.type),J=Y.type||"info",Q=Y.duration!==0;return`
|
|
3
3
|
<div class="stx-toast ${J}" data-alert-id="${Z.id}" role="alert" aria-live="polite">
|
|
4
4
|
<div class="stx-toast-icon">${$}</div>
|
|
5
5
|
<div class="stx-toast-content">
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Co as a,Do as b,Eo as c,Fo as d,Go as e,Ho as f,Io as g,Jo as h,Ko as i,Lo as j,Mo as k}from"./chunk-5atmahe4.js";import"./chunk-8y1ve8tc.js";import"./chunk-njx93b4z.js";import"./chunk-bqdfbwdf.js";import"./chunk-89mqnh67.js";import"./chunk-xvh1k1a4.js";import"./chunk-fs2t4rs3.js";import"./chunk-y2f41kaq.js";import"./chunk-xj6bcwqa.js";import"./chunk-7t6h8crt.js";import"./chunk-vhta1be7.js";import"./chunk-tc4pj651.js";import"./chunk-san1eq0r.js";import"./chunk-avwywzsj.js";import"./chunk-wj21f1e0.js";import"./chunk-d86q27j8.js";import"./chunk-72x62kch.js";import"./chunk-yg5r7bnm.js";import"./chunk-9nrgjtah.js";import"./chunk-ejqpq0wc.js";export{b as stripTypeScript,i as splitDeclaration,d as isSyntaxFailure,c as isModuleResolutionFailure,e as isMissingBindingFailure,g as isCompleteImport,k as hasVariables,f as extractVariables,j as extractScriptFromTemplate,h as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nj as o,oj as p,pj as q}from"./chunk-
|
|
2
|
+
import{nj as o,oj as p,pj as q}from"./chunk-9jbssgem.js";import{Aj as f,Bj as g,Cj as h,Dj as i,Ej as j,Fj as k,Gj as l,Hj as m,Ij as n,vj as a,wj as b,xj as c,yj as d,zj as e}from"./chunk-e4g8wz6t.js";import"./chunk-72x62kch.js";import"./chunk-ejqpq0wc.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
|