@stacksjs/stx 0.2.759 → 0.2.761
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-00nz3pas.js +2 -0
- package/dist/{chunk-3nxe5xmy.js → chunk-0fs9kx0h.js} +3 -3
- package/dist/{chunk-42hcspws.js → chunk-0kq0k4pg.js} +2 -2
- package/dist/chunk-0nynnmya.js +2 -0
- package/dist/{chunk-wp9y6x33.js → chunk-0q5dm9r2.js} +5 -5
- package/dist/{chunk-f4gqzg1y.js → chunk-0wj31pqy.js} +2 -2
- package/dist/chunk-13v3vgb6.js +2 -0
- package/dist/chunk-18gazs55.js +2 -0
- package/dist/chunk-1a9h6r9f.js +2 -0
- package/dist/chunk-1p8t2ekg.js +2 -0
- package/dist/chunk-1rcntvgx.js +2 -0
- package/dist/chunk-1w5gtkd6.js +2 -0
- package/dist/{chunk-fpagqrd1.js → chunk-23t9anc0.js} +75 -75
- package/dist/chunk-298gj90a.js +2 -0
- package/dist/{chunk-m5fjhrpd.js → chunk-2cbd1ew6.js} +101 -101
- package/dist/{chunk-h692k9xn.js → chunk-2typf9dh.js} +4 -4
- package/dist/chunk-2wnfqrv5.js +26 -0
- package/dist/chunk-2wq0h5ye.js +2 -0
- package/dist/{chunk-prej5pk6.js → chunk-2zd51tj4.js} +2 -2
- package/dist/chunk-2zg3jmy7.js +2 -0
- package/dist/{chunk-ztdjdxjt.js → chunk-319aez2f.js} +3 -3
- package/dist/{chunk-7g9vd5fv.js → chunk-37y8sg48.js} +2 -2
- package/dist/{chunk-j2mpqa4p.js → chunk-3csfmhg0.js} +2 -2
- package/dist/{chunk-jb1dk0w7.js → chunk-3mz088mb.js} +2 -2
- package/dist/chunk-3wxb7mfb.js +2 -0
- package/dist/{chunk-cehjp06v.js → chunk-42zqmcnc.js} +3 -3
- package/dist/{chunk-5ge5h2y3.js → chunk-45g1w1ct.js} +5 -5
- package/dist/{chunk-89h4snzd.js → chunk-4833k99b.js} +2 -2
- package/dist/{chunk-jevd16gq.js → chunk-48g9wez2.js} +30 -30
- package/dist/{chunk-t5gabs4x.js → chunk-4c0qcjac.js} +2 -2
- package/dist/{chunk-hmae7ha6.js → chunk-4rxmxc1p.js} +2 -2
- package/dist/chunk-4tgn1frg.js +3 -0
- package/dist/chunk-5fg8hqq0.js +2 -0
- package/dist/chunk-5x0g7e9y.js +2 -0
- package/dist/{chunk-83ezv8yz.js → chunk-5yhv5eqq.js} +3 -3
- package/dist/{chunk-6n195hvc.js → chunk-61qh74q1.js} +5 -5
- package/dist/chunk-64pdwfef.js +177 -0
- package/dist/{chunk-mcynmrbe.js → chunk-6fz2n9w6.js} +43 -43
- package/dist/chunk-72ns4q88.js +2 -0
- package/dist/chunk-7fwcnech.js +2 -0
- package/dist/{chunk-x9haxcsj.js → chunk-7y1rpd4g.js} +8 -8
- package/dist/chunk-7z2mebp5.js +2 -0
- package/dist/chunk-803qm5tk.js +2 -0
- package/dist/chunk-86cg9qqm.js +2 -0
- package/dist/{chunk-gs6wc7sr.js → chunk-89801pjp.js} +5 -5
- package/dist/chunk-8h5mqs28.js +2 -0
- package/dist/chunk-8jh2b5k2.js +2 -0
- package/dist/{chunk-yp6w740k.js → chunk-8rk79ha1.js} +2 -2
- package/dist/{chunk-2x112fxs.js → chunk-8vs5y4h7.js} +14 -14
- package/dist/{chunk-kpr09x3g.js → chunk-8y54tpbr.js} +7 -7
- package/dist/{chunk-s4y26fk6.js → chunk-8yyq3nfg.js} +2 -2
- package/dist/chunk-927ta2dn.js +2 -0
- package/dist/chunk-940wny2b.js +2 -0
- package/dist/{chunk-93j4atq9.js → chunk-98t1cv8x.js} +2 -2
- package/dist/{chunk-sgm6tg8h.js → chunk-9k8ztdcc.js} +2 -2
- package/dist/{chunk-4npabwne.js → chunk-9nhyq39s.js} +3 -3
- package/dist/{chunk-gz38jt5j.js → chunk-aa1y9j3p.js} +2 -2
- package/dist/chunk-ad9dt9rk.js +2 -0
- package/dist/chunk-ak4w2emd.js +2 -0
- package/dist/{chunk-tb56j1zt.js → chunk-ak93e1zz.js} +5 -5
- package/dist/{chunk-jt28zh50.js → chunk-b0z2n941.js} +2 -2
- package/dist/{chunk-qwds327k.js → chunk-b51p56k5.js} +2 -2
- package/dist/{chunk-r4sawwmp.js → chunk-b7x8b83z.js} +1 -1
- package/dist/chunk-b8dtz3v8.js +2 -0
- package/dist/{chunk-0e9xdrzx.js → chunk-bjhesw78.js} +8 -8
- package/dist/{chunk-w8p1y4c0.js → chunk-bvctccab.js} +4 -4
- package/dist/chunk-c5tkxjb0.js +2 -0
- package/dist/{chunk-hk98vptc.js → chunk-cdcrd33m.js} +2 -2
- package/dist/chunk-cgh0k52q.js +2 -0
- package/dist/chunk-ctdw7fh4.js +2 -0
- package/dist/{chunk-asp7ett1.js → chunk-dnsf934e.js} +9 -9
- package/dist/{chunk-7r7j7vwt.js → chunk-ds6mbfdq.js} +3 -3
- package/dist/chunk-e2q79dfs.js +2 -0
- package/dist/chunk-e5vn76f5.js +2 -0
- package/dist/{chunk-9s1qnf90.js → chunk-eb6p3p62.js} +2 -2
- package/dist/chunk-emhbj3xd.js +2 -0
- package/dist/{chunk-3cn9y08d.js → chunk-evxp3wmv.js} +7 -7
- package/dist/{chunk-z8k3fx4r.js → chunk-f8p8ggvw.js} +4 -4
- package/dist/chunk-fjfrgef4.js +2 -0
- package/dist/chunk-fke4s0kk.js +33 -0
- package/dist/{chunk-0dkd26t4.js → chunk-frybxj35.js} +7 -7
- package/dist/{chunk-4s9kytdz.js → chunk-fxmc5006.js} +2 -2
- package/dist/chunk-fxnk5ee8.js +2 -0
- package/dist/chunk-fys1patf.js +2 -0
- package/dist/{chunk-6ts3sthp.js → chunk-g4k0svq6.js} +2 -2
- package/dist/chunk-g9efdc5v.js +2 -0
- package/dist/chunk-gpvfswgj.js +2 -0
- package/dist/chunk-hnen9b45.js +2 -0
- package/dist/chunk-jacb7aw1.js +2 -0
- package/dist/{chunk-4zw118tn.js → chunk-jgk5j35w.js} +4 -4
- package/dist/{chunk-geb6zyxg.js → chunk-jn78c13y.js} +13 -13
- package/dist/chunk-jq1698j4.js +2 -0
- package/dist/{chunk-pwmkhs7z.js → chunk-jyp2mmts.js} +2 -2
- package/dist/{chunk-76fcwbe1.js → chunk-jzajpmke.js} +7 -7
- package/dist/chunk-k0jkpw0q.js +2 -0
- package/dist/{chunk-3kfbs0mw.js → chunk-k2ex94n8.js} +1 -1
- package/dist/{chunk-m00c7sh0.js → chunk-k9247v28.js} +1 -1
- package/dist/chunk-kdqnest3.js +2 -0
- package/dist/{chunk-1mfj2j5g.js → chunk-kj9m0vc6.js} +3 -3
- package/dist/chunk-krsg6dgz.js +3 -0
- package/dist/chunk-m5740sd3.js +2 -0
- package/dist/{chunk-myynywry.js → chunk-mdvtermb.js} +2 -2
- package/dist/chunk-mebf9vwb.js +2 -0
- package/dist/chunk-nm2r4se1.js +2 -0
- package/dist/chunk-p2j38381.js +2 -0
- package/dist/{chunk-3ajnrfa2.js → chunk-p88yh4wt.js} +2 -2
- package/dist/{chunk-fjxhga6w.js → chunk-pqbxa0r7.js} +2 -2
- package/dist/chunk-q245q8z1.js +2 -0
- package/dist/{chunk-5q9ss7ty.js → chunk-q3azy64b.js} +4 -4
- package/dist/chunk-qm3jbse5.js +2 -0
- package/dist/{chunk-yftw25sa.js → chunk-qx0np0hy.js} +2 -2
- package/dist/{chunk-qwsgc5rc.js → chunk-qystt1qc.js} +1 -1
- package/dist/{chunk-v20cwjgz.js → chunk-qyzjkvme.js} +6 -6
- package/dist/chunk-r13fwtas.js +2 -0
- package/dist/{chunk-dh9aagwm.js → chunk-r1tp2gnr.js} +1 -1
- package/dist/chunk-r5tsewzd.js +2 -0
- package/dist/{chunk-v2egd4zh.js → chunk-r6yb0540.js} +5 -5
- package/dist/{chunk-pes27snj.js → chunk-r8zhed35.js} +3 -3
- package/dist/{chunk-hmydy949.js → chunk-rh2qth8r.js} +5 -5
- package/dist/chunk-rha8sv1h.js +3 -0
- package/dist/{chunk-vh1d5eqk.js → chunk-t2cq4bpe.js} +6 -6
- package/dist/chunk-tfy1m821.js +2 -0
- package/dist/{chunk-465resq9.js → chunk-tpfxvw4q.js} +17 -17
- package/dist/{chunk-t6qn1374.js → chunk-tshpcvcy.js} +2 -2
- package/dist/{chunk-spjpdymh.js → chunk-ttqs99jj.js} +2 -2
- package/dist/chunk-v1ff2dfp.js +7 -0
- package/dist/chunk-vc3ppphz.js +2 -0
- package/dist/{chunk-x1q2ape8.js → chunk-vv8dn70r.js} +14 -14
- package/dist/{chunk-06zn167b.js → chunk-vvs28yqw.js} +8 -8
- package/dist/chunk-w2pch5xn.js +4 -0
- package/dist/chunk-w512gnft.js +2 -0
- package/dist/{chunk-j4snweyz.js → chunk-wby7qzha.js} +3 -3
- package/dist/{chunk-b6g24qj0.js → chunk-wghtdgwj.js} +2 -2
- package/dist/chunk-wk8y89q2.js +25 -0
- package/dist/{chunk-19safa6y.js → chunk-wmnzapn8.js} +2 -2
- package/dist/chunk-wmxsaxt0.js +2 -0
- package/dist/chunk-wq1vs94k.js +2 -0
- package/dist/chunk-wwnqbv9j.js +3 -0
- package/dist/{chunk-a5d888es.js → chunk-wycrtkw4.js} +6 -6
- package/dist/chunk-x1q7b7jg.js +2 -0
- package/dist/chunk-x1x69g3s.js +2 -0
- package/dist/{chunk-gs373714.js → chunk-x5seqmrv.js} +2 -2
- package/dist/{chunk-r5jytt0f.js → chunk-x7q4tp3f.js} +4 -4
- package/dist/{chunk-bsq9zg9j.js → chunk-xt034729.js} +6 -6
- package/dist/chunk-y5emxzbt.js +2 -0
- package/dist/chunk-y6mqq78g.js +2 -0
- package/dist/{chunk-11kejz35.js → chunk-yh5658q8.js} +1 -1
- package/dist/chunk-yhbsvf65.js +54 -0
- package/dist/{chunk-00ns0516.js → chunk-yjzk7rwt.js} +6 -6
- package/dist/chunk-yn3kff5k.js +2 -0
- package/dist/chunk-ynjm2tm0.js +2 -0
- package/dist/chunk-yp80rx17.js +2 -0
- package/dist/chunk-z5xermzg.js +2 -0
- package/dist/{chunk-j04v4rgf.js → chunk-zhrz4zvw.js} +5 -5
- package/dist/cli.js +20 -20
- package/dist/composable-loader.d.ts +1 -1
- package/dist/composable-loader.js +47 -10
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/message-catalogs.d.ts +39 -0
- package/dist/message-catalogs.js +128 -0
- package/dist/native/compiler/bundle.js +11 -36
- package/dist/native/compiler/html-to-ir.js +32 -0
- package/dist/native/compiler/render-screen.js +1 -1
- package/dist/native/compiler/setup-script.d.ts +1 -0
- package/dist/native/compiler/shared-scripts.js +10 -0
- package/dist/native/runtime/compact-document.d.ts +20 -0
- package/dist/native/runtime/compact-document.js +101 -0
- package/dist/process.d.ts +1 -1
- package/dist/process.js +87 -22
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +14 -14
- package/dist/store-loader.d.ts +27 -3
- package/dist/store-loader.js +144 -4
- package/dist/types/config-types.d.ts +1 -0
- package/package.json +5 -5
- package/dist/chunk-055v5qz2.js +0 -2
- package/dist/chunk-0b7f2mby.js +0 -2
- package/dist/chunk-0j7e56zm.js +0 -2
- package/dist/chunk-0jn79fkt.js +0 -25
- package/dist/chunk-0y44f9rk.js +0 -2
- package/dist/chunk-3h2yz805.js +0 -2
- package/dist/chunk-3jfes9b0.js +0 -2
- package/dist/chunk-4m8bexrn.js +0 -33
- package/dist/chunk-4tz00fkp.js +0 -2
- package/dist/chunk-52q8184e.js +0 -2
- package/dist/chunk-59ytzyp1.js +0 -2
- package/dist/chunk-5ffdtfwg.js +0 -2
- package/dist/chunk-5q551m4w.js +0 -2
- package/dist/chunk-6ndeycxk.js +0 -2
- package/dist/chunk-6xt3kvq1.js +0 -2
- package/dist/chunk-75r09rqt.js +0 -2
- package/dist/chunk-79y41h1d.js +0 -2
- package/dist/chunk-7h5d35bf.js +0 -2
- package/dist/chunk-82ybmdqk.js +0 -2
- package/dist/chunk-8frs2dtp.js +0 -2
- package/dist/chunk-8n2gj4q2.js +0 -11
- package/dist/chunk-8prq9t3b.js +0 -2
- package/dist/chunk-8sxngenk.js +0 -2
- package/dist/chunk-90er677t.js +0 -2
- package/dist/chunk-aakkjjgr.js +0 -2
- package/dist/chunk-abs1k04e.js +0 -2
- package/dist/chunk-c05r0rzw.js +0 -3
- package/dist/chunk-c7yjhjr2.js +0 -2
- package/dist/chunk-cpep999n.js +0 -2
- package/dist/chunk-cvwn6mga.js +0 -2
- package/dist/chunk-davr7z73.js +0 -2
- package/dist/chunk-dqs4bgec.js +0 -2
- package/dist/chunk-e30kgg28.js +0 -2
- package/dist/chunk-e3fkq9gb.js +0 -2
- package/dist/chunk-eab8na0z.js +0 -2
- package/dist/chunk-exg7ry7b.js +0 -2
- package/dist/chunk-f4mmk2cx.js +0 -2
- package/dist/chunk-fhwn8j9p.js +0 -2
- package/dist/chunk-fj105fff.js +0 -2
- package/dist/chunk-g387j1qv.js +0 -2
- package/dist/chunk-gefpzry6.js +0 -2
- package/dist/chunk-ghzycypz.js +0 -2
- package/dist/chunk-gvaee1w0.js +0 -170
- package/dist/chunk-k37472gm.js +0 -2
- package/dist/chunk-k3wnmpt3.js +0 -2
- package/dist/chunk-kb8654dp.js +0 -4
- package/dist/chunk-kfqdx75m.js +0 -2
- package/dist/chunk-mgx71bfg.js +0 -2
- package/dist/chunk-mmhbn7xt.js +0 -2
- package/dist/chunk-mzcbfra0.js +0 -2
- package/dist/chunk-nv9dy71x.js +0 -54
- package/dist/chunk-ny2qzraq.js +0 -2
- package/dist/chunk-pg15tx9c.js +0 -2
- package/dist/chunk-ppc5s12t.js +0 -2
- package/dist/chunk-ptzzpf97.js +0 -2
- package/dist/chunk-qgsrxyh9.js +0 -2
- package/dist/chunk-qmxcs806.js +0 -2
- package/dist/chunk-qn4gt8sx.js +0 -3
- package/dist/chunk-qryg0hgn.js +0 -2
- package/dist/chunk-qt17792g.js +0 -2
- package/dist/chunk-qz9fzz5k.js +0 -2
- package/dist/chunk-rh90yh1c.js +0 -2
- package/dist/chunk-rvc0pb16.js +0 -2
- package/dist/chunk-sj5t0tnv.js +0 -2
- package/dist/chunk-t4mpq6t0.js +0 -3
- package/dist/chunk-tb6jcr2v.js +0 -2
- package/dist/chunk-tn40nh9e.js +0 -3
- package/dist/chunk-xcq41ah8.js +0 -2
- package/dist/chunk-y3jbkk7a.js +0 -2
- package/dist/chunk-yme43vbp.js +0 -2
- package/dist/chunk-yv8jeqdn.js +0 -2
- package/dist/chunk-zq7g0687.js +0 -2
package/dist/store-loader.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { unboundNames } from "./client-parameter-bindings.js";
|
|
2
5
|
import { bundleClientScript, clientBundleDependencies, hasUserImports, moduleSubstitutionKey } from "./client-script-bundler.js";
|
|
3
6
|
import { loadStxConfig } from "./config.js";
|
|
4
7
|
import { isProduction, minifyClassicScript } from "./env.js";
|
|
@@ -116,6 +119,50 @@ ${joinedChunks}
|
|
|
116
119
|
})();`;
|
|
117
120
|
return isProduction() ? minifyClassicScript(assembled) : assembled;
|
|
118
121
|
}
|
|
122
|
+
function topLevelNames(code) {
|
|
123
|
+
const names = new Set;
|
|
124
|
+
for (const match of code.matchAll(/^(?:export\s+)?(?:async\s+)?(?:const|let|var|function\*?|class)\s+([A-Z_a-z$][\w$]*)/gm))
|
|
125
|
+
names.add(match[1]);
|
|
126
|
+
for (const match of code.matchAll(/^(?:const|let|var)\s*[{[]([^=]*)[}\]]\s*=/gm))
|
|
127
|
+
for (const part of (match[1] ?? "").split(",")) {
|
|
128
|
+
const name = (part.includes(":") ? part.split(":").pop() : part).replace(/=.*$/s, "").replace(/^\s*\.\.\./, "").trim();
|
|
129
|
+
if (/^[A-Z_a-z$][\w$]*$/.test(name))
|
|
130
|
+
names.add(name);
|
|
131
|
+
}
|
|
132
|
+
return names;
|
|
133
|
+
}
|
|
134
|
+
function storeFunctions(chunks) {
|
|
135
|
+
const bound = chunks.map((chunk) => topLevelNames(chunk.code));
|
|
136
|
+
for (const [index, chunk] of chunks.entries()) {
|
|
137
|
+
const others = new Set;
|
|
138
|
+
for (const [other, names] of bound.entries()) {
|
|
139
|
+
if (other === index)
|
|
140
|
+
continue;
|
|
141
|
+
for (const name of names)
|
|
142
|
+
if (!bound[index].has(name) && !chunk.declared.has(name))
|
|
143
|
+
others.add(name);
|
|
144
|
+
}
|
|
145
|
+
if (others.size === 0)
|
|
146
|
+
continue;
|
|
147
|
+
let reads;
|
|
148
|
+
try {
|
|
149
|
+
reads = unboundNames(chunk.code, others);
|
|
150
|
+
} catch {
|
|
151
|
+
reads = new Set([...others].filter((name) => new RegExp(`(?<![\\w$.])${name.replace(/\$/g, "\\$")}(?![\\w$])`).test(chunk.code)));
|
|
152
|
+
}
|
|
153
|
+
if (reads.size > 0)
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
return chunks.map((chunk, index) => {
|
|
157
|
+
const own = new Set([...chunk.declared, ...bound[index]]);
|
|
158
|
+
return `function() {
|
|
159
|
+
var __stx = window.stx || {};
|
|
160
|
+
${STX_RUNTIME_GLOBALS.filter((name) => !own.has(name) && new RegExp(`\\b${name}\\b`).test(chunk.code)).map((name) => `var ${name} = __stx[${JSON.stringify(name)}];`).join(`
|
|
161
|
+
`)}
|
|
162
|
+
${chunk.code}
|
|
163
|
+
}`;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
119
166
|
const _assembledStoreScripts = new WeakMap;
|
|
120
167
|
export async function getStoreScript(storesDir) {
|
|
121
168
|
const built = await loadStoreChunks(storesDir);
|
|
@@ -128,6 +175,29 @@ export async function getStoreScript(storesDir) {
|
|
|
128
175
|
}
|
|
129
176
|
return code;
|
|
130
177
|
}
|
|
178
|
+
function takesUseStoreAsValue(source) {
|
|
179
|
+
if (!/\buseStore\b/.test(source))
|
|
180
|
+
return !1;
|
|
181
|
+
if (/\buseStore\s+as\s+[A-Za-z_$]/.test(source))
|
|
182
|
+
return !0;
|
|
183
|
+
if (/\{[^{}]*\buseStore\s*:\s*[A-Za-z_$[{][^{}]*\}\s*=(?!=)/.test(source))
|
|
184
|
+
return !0;
|
|
185
|
+
if (/\[\s*(['"`])useStore\1\s*\]/.test(source.replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g, " ")))
|
|
186
|
+
return !0;
|
|
187
|
+
const text = source.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/(^|[^:\\'"`])\/\/[^\n]*/g, "$1 ").replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g, " ").replace(/\b(?:const|let|var)\s*\{[^{}]*\}\s*=/g, " ").replace(/\bimport\s*(?:type\s+)?\{[^{}]*\}\s*from\b/g, " ").replace(/\bexport\s*(?:type\s+)?\{[^{}]*\}/g, " ").replace(/\btypeof\s+useStore\b/g, " ").replace(/(['"`])useStore\1/g, " ");
|
|
188
|
+
for (const match of text.matchAll(/\buseStore\b/g)) {
|
|
189
|
+
const before = text.slice(Math.max(0, match.index - 9), match.index);
|
|
190
|
+
if (/\bfunction\s*$/.test(before))
|
|
191
|
+
continue;
|
|
192
|
+
const after = text.slice(match.index + 8).trimStart();
|
|
193
|
+
if (after.startsWith("(") || after.startsWith("<") || after.startsWith("?.("))
|
|
194
|
+
continue;
|
|
195
|
+
if (/^=(?![=>])/.test(after))
|
|
196
|
+
continue;
|
|
197
|
+
return !0;
|
|
198
|
+
}
|
|
199
|
+
return !1;
|
|
200
|
+
}
|
|
131
201
|
export function storesRead(...sources) {
|
|
132
202
|
const names = new Set;
|
|
133
203
|
let all = !1;
|
|
@@ -136,11 +206,13 @@ export function storesRead(...sources) {
|
|
|
136
206
|
continue;
|
|
137
207
|
if (/__STX_STORES__|\b_stores\b/.test(source))
|
|
138
208
|
all = !0;
|
|
139
|
-
|
|
209
|
+
if (takesUseStoreAsValue(source))
|
|
210
|
+
all = !0;
|
|
211
|
+
const calls = source.match(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(/g)?.length ?? 0;
|
|
140
212
|
if (calls === 0)
|
|
141
213
|
continue;
|
|
142
214
|
let literal = 0;
|
|
143
|
-
for (const match of source.matchAll(/\buseStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g)) {
|
|
215
|
+
for (const match of source.matchAll(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g)) {
|
|
144
216
|
names.add(match[2]);
|
|
145
217
|
literal++;
|
|
146
218
|
}
|
|
@@ -149,13 +221,49 @@ export function storesRead(...sources) {
|
|
|
149
221
|
}
|
|
150
222
|
return { names, all };
|
|
151
223
|
}
|
|
224
|
+
const _storesReadByFile = new Map;
|
|
225
|
+
export function storesReadInFiles(files) {
|
|
226
|
+
const names = new Set;
|
|
227
|
+
let all = !1;
|
|
228
|
+
for (const file of files) {
|
|
229
|
+
if (/\.(?:css|json|svg|wasm|png|jpe?g|gif|webp|avif|woff2?|ttf|txt|md)$/i.test(file))
|
|
230
|
+
continue;
|
|
231
|
+
let read;
|
|
232
|
+
try {
|
|
233
|
+
const stat = fs.statSync(file), cached = _storesReadByFile.get(file);
|
|
234
|
+
if (cached && cached.mtimeMs === stat.mtimeMs && cached.size === stat.size)
|
|
235
|
+
read = cached.read;
|
|
236
|
+
else {
|
|
237
|
+
read = storesRead(fs.readFileSync(file, "utf8"));
|
|
238
|
+
_storesReadByFile.set(file, { mtimeMs: stat.mtimeMs, size: stat.size, read });
|
|
239
|
+
}
|
|
240
|
+
} catch {
|
|
241
|
+
read = { names: new Set, all: !0 };
|
|
242
|
+
}
|
|
243
|
+
if (read.all)
|
|
244
|
+
all = !0;
|
|
245
|
+
for (const name of read.names)
|
|
246
|
+
names.add(name);
|
|
247
|
+
}
|
|
248
|
+
return { names, all };
|
|
249
|
+
}
|
|
250
|
+
export function pageStoresAll(env = process.env) {
|
|
251
|
+
return env.STX_PAGE_STORES === "all";
|
|
252
|
+
}
|
|
152
253
|
export async function getStoreScriptFor(storesDir, usedBy, options = {}) {
|
|
153
254
|
const built = await loadStoreChunks(storesDir, options.sharedModules);
|
|
154
255
|
if (!built)
|
|
155
256
|
return null;
|
|
156
257
|
const { chunks } = built, wanted = storesRead(...usedBy);
|
|
258
|
+
if (options.reads) {
|
|
259
|
+
if (options.reads.all)
|
|
260
|
+
wanted.all = !0;
|
|
261
|
+
for (const name of options.reads.names)
|
|
262
|
+
wanted.names.add(name);
|
|
263
|
+
}
|
|
264
|
+
const apart = options.runOnce ? runOnceFunctions(built) : void 0;
|
|
157
265
|
let kept;
|
|
158
|
-
if (wanted.all || chunks.some((chunk) => chunk.ids.length === 0))
|
|
266
|
+
if (options.all || wanted.all || chunks.some((chunk) => chunk.ids.length === 0) || apart === null)
|
|
159
267
|
kept = chunks;
|
|
160
268
|
else {
|
|
161
269
|
const byId = new Map;
|
|
@@ -179,7 +287,39 @@ export async function getStoreScriptFor(storesDir, usedBy, options = {}) {
|
|
|
179
287
|
}
|
|
180
288
|
if (kept.length === 0)
|
|
181
289
|
return null;
|
|
182
|
-
|
|
290
|
+
if (apart) {
|
|
291
|
+
const functions = kept.map((chunk) => apart.get(chunk)), names = kept.map((chunk) => chunk.name);
|
|
292
|
+
let scripts = _runOnceScripts.get(built);
|
|
293
|
+
if (!scripts)
|
|
294
|
+
_runOnceScripts.set(built, scripts = new Map);
|
|
295
|
+
let code = scripts.get(names.join("\x00"));
|
|
296
|
+
if (code === void 0)
|
|
297
|
+
scripts.set(names.join("\x00"), code = runOnceStoreScript(names, functions));
|
|
298
|
+
return { code, stores: names, functions };
|
|
299
|
+
}
|
|
300
|
+
return { code: assembleStoreScript(kept), stores: kept.map((chunk) => chunk.name), functions: storeFunctions(kept) };
|
|
301
|
+
}
|
|
302
|
+
const _runOnceScripts = new WeakMap, _runOnceFunctions = new WeakMap;
|
|
303
|
+
function runOnceFunctions(built) {
|
|
304
|
+
if (_runOnceFunctions.has(built))
|
|
305
|
+
return _runOnceFunctions.get(built);
|
|
306
|
+
const functions = storeFunctions(built.chunks), byChunk = functions ? new Map(built.chunks.map((chunk, index) => [chunk, functions[index]])) : null;
|
|
307
|
+
_runOnceFunctions.set(built, byChunk);
|
|
308
|
+
return byChunk;
|
|
309
|
+
}
|
|
310
|
+
function runOnceStoreScript(names, functions) {
|
|
311
|
+
const assembled = `;(function(){
|
|
312
|
+
var ran = window.__stxStoreFiles || (window.__stxStoreFiles = {});
|
|
313
|
+
function run(name, define) {
|
|
314
|
+
if (ran[name]) return;
|
|
315
|
+
ran[name] = 1;
|
|
316
|
+
try { define(); }
|
|
317
|
+
catch (error) { console.error('[stx] store ' + name + ' failed to load:', error); }
|
|
318
|
+
}
|
|
319
|
+
${names.map((name, index) => `run(${JSON.stringify(name)}, ${functions[index]})`).join(`;
|
|
320
|
+
`)};
|
|
321
|
+
})();`;
|
|
322
|
+
return isProduction() ? minifyClassicScript(assembled) : assembled;
|
|
183
323
|
}
|
|
184
324
|
export function clearStoreCache() {
|
|
185
325
|
_cachedStoreChunks.clear();
|
|
@@ -345,6 +345,7 @@ export declare interface StxConfig {
|
|
|
345
345
|
story?: Partial<import('../story/types').StoryConfig>
|
|
346
346
|
pwa?: Partial<PwaConfig>
|
|
347
347
|
offline?: import('../offline/app-service-worker').OfflineAppConfig
|
|
348
|
+
messages?: import('../message-catalogs').PageMessagesOptions
|
|
348
349
|
components?: Partial<ComponentConfig>
|
|
349
350
|
routeMiddleware?: Partial<RouteMiddlewareConfig>
|
|
350
351
|
heatmap?: Partial<HeatmapConfig>
|
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.761",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/ts-css": "^0.3.11",
|
|
130
130
|
"@stacksjs/clapp": "^0.2.16",
|
|
131
|
-
"@stacksjs/desktop": "0.2.
|
|
132
|
-
"@stacksjs/sanitizer": "0.2.
|
|
131
|
+
"@stacksjs/desktop": "0.2.761",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.761",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.761",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.761",
|
|
137
137
|
"ts-broadcasting": "^0.0.11",
|
|
138
138
|
"ts-images": "^0.2.22",
|
|
139
139
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-055v5qz2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dl,em,Ml,Ll,tm,nm}from"./chunk-gz38jt5j.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{nm as applySlots,tm as extractSlotContent,em as parseSlotElement,Dl as parseSlots,Ll as processSlots,Ml as renderSlot};
|
package/dist/chunk-0b7f2mby.js
DELETED
package/dist/chunk-0j7e56zm.js
DELETED
package/dist/chunk-0jn79fkt.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{hi,zs,u,f,R,nt,d,Hs,t,c,b}from"./chunk-465resq9.js";import{ve,Rt,J,I,Nt,Z,k}from"./chunk-m5fjhrpd.js";import{sr}from"./chunk-06zn167b.js";import{se}from"./chunk-sgm6tg8h.js";import{ps}from"./chunk-3kfbs0mw.js";var de=1000,pe=!1;function he(n,r){let l=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,i;while((i=l.exec(n))!==null){let g=i.index+i[0].length,y=i.index+i[0].indexOf("("),x=b(n,"(",")",y);if(x===-1)continue;let p=n.slice(g,x).trim();if(!p)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(p)))continue;let m;try{let a=R(p,r);if(!a||typeof a!=="object")continue;m=JSON.stringify(a)}catch{continue}e+=n.slice(o,g)+m,o=x,l.lastIndex=x}return o===0?n:e+n.slice(o)}function me(n,r){let l=/@component\s*\(/g,e=n,o,i=[];while((o=l.exec(e))!==null){let g=o.index,y=g+o[0].length-1,x=1,p=y+1;while(p<e.length&&x>0){if(e[p]==="(")x++;else if(e[p]===")"){if(x--,x===0)break}p++}if(x!==0)continue;let s=e.substring(y+1,p),m=p+1,a=s.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let E=a[1],h=s.slice(a[0].length),w=h.match(/^\s*,\s*/);if(!w)continue;let S=h.slice(w[0].length).trim();if(!S)continue;try{let v=R(S,r),W=JSON.stringify(v),F=`@component('${E}', ${W})`;i.push({start:g,end:m,replacement:F})}catch{continue}}for(let g=i.length-1;g>=0;g--){let{start:y,end:x,replacement:p}=i[g];e=e.substring(0,y)+p+e.substring(x)}return e}function oe(n,r,l){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),i;while((i=o.exec(e))!==null){let g=i.index,y=g+i[0].length-1,x=1,p=y+1,s=null,m=!1;while(p<e.length&&x>0){let h=e[p];if(m){m=!1,p++;continue}if(h==="\\"&&s){m=!0,p++;continue}if(s){if(h===s)s=null;p++;continue}if(h==='"'||h==="'"||h==="`"){s=h,p++;continue}if(h==="(")x++;else if(h===")"){if(x--,x===0)break}p++}if(x!==0)break;let a=e.substring(y+1,p),E=l(a);e=e.substring(0,g)+E+e.substring(p+1)}return e}function be(n,r){let l=n;return l=l.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),l=l.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,i)=>{try{if(I(i,r.__stx_client_signal_names||[]))return e;let g=Object.keys(r),y=Object.values(r);hi(i);let x=!1,s=d(i,g,()=>{x=!0})(...y);if(x)return e;let m=JSON.stringify(s);if(m===void 0){if(!nt(i).some((h)=>!(h in r)))return"";return e}let a=Buffer.from(m,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(g){return e}}),l}var ee="<!--__STX_BREAK__-->",ne="<!--__STX_CONTINUE__-->";function le(n,r){let l=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let i=l.exec(n);i;i=l.exec(n)){if(!i[1]){let p=i[0].length===3&&i[0]==="{{{"?3:2,s=i[0]==="{!!"?n.indexOf("!!}",l.lastIndex):ve(n,i.index,p);if(s<0)break;l.lastIndex=s+(i[0]==="{!!"?3:p);continue}let g=l.lastIndex,y=!0,x=/^\s*\(/.exec(n.slice(g));if(x){let p=g+x[0].length-1,s=b(n,"(",")",p);if(s<0)break;g=s+1;try{let m=`!!(${n.slice(p+1,s).trim()})`;y=f(m)?Boolean(d(m,Object.keys(r))(...Object.values(r))):Boolean(u(m,r))}catch{y=!1}}if(e+=n.slice(o,i.index),y)return e+(i[1]==="break"?ee:ne);o=g,l.lastIndex=g}return e+n.slice(o)}function ae(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),l="",e=0;return Nt(n,(o,i,g)=>(l+=ie(r(n.slice(e,g))),l+=`\${__stxRenderLoopValue(${g}, (${i}), ${o.length})}`,e=g+o.length,o)),l+ie(r(n.slice(e)))}function ue(n,r,l,e){return Z(n,r,l==null?"":String(l),!1,e)}function ie(n){let r=n;return r=oe(r,"@break",(l)=>{let e=l.trim();if(!Hs(e))return"";return`\`; if (${e}) { break; } result += \``}),r=oe(r,"@continue",(l)=>{let e=l.trim();if(!Hs(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function xe(n){let r=/@forelse\s*\(/g,l,e=[],o=/@foreach\s*\(/g,i=/@endforeach/g,g;while((g=o.exec(n))!==null)e.push({pos:g.index,delta:1});while((g=i.exec(n))!==null)e.push({pos:g.index,delta:-1});e.sort((s,m)=>s.pos-m.pos);let y=[],x=0;for(let s of e)x+=s.delta,y.push({pos:s.pos,depth:x});function p(s){let m=0,a=y.length-1,E=0;while(m<=a){let h=m+a>>1;if(y[h].pos<=s)E=y[h].depth,m=h+1;else a=h-1}return E}while((l=r.exec(n))!==null){if(p(l.index)>0)continue;let s=l.index,m=l.index+l[0].length-1,a=1,E=m+1,h=-1;while(E<n.length&&a>0){if(n[E]==="(")a++;else if(n[E]===")"){if(a--,a===0){h=E;break}}E++}if(h===-1)continue;let w=n.substring(m+1,h),S=Rt(w);if(!S)continue;let{arrayExpr:v,itemVar:W}=S,F=h+1,A=1,B=F,D=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(A>0&&B<n.length){D.lastIndex=B,L.lastIndex=B;let P=D.exec(n),_=L.exec(n);if(!_)break;if(P&&P.index<_.index)A++,B=P.index+P[0].length;else{if(A--,A===0){V=_.index;break}B=_.index+11}}if(V===-1)continue;let O=n.substring(F,V),K=V+11,U=-1,z=0,N=0;while(N<O.length){let P=O.indexOf("@",N);if(P===-1)break;let _=O.substring(P);if(/^@forelse\s*\(/.test(_))z++,N=P+1;else if(_.startsWith("@endforelse"))z--,N=P+11;else if(z===0&&_.startsWith("@empty")){if(O.length<=P+6||!/[a-z]/i.test(O[P+6])){U=P;break}N=P+1}else N=P+1}if(U===-1)continue;return{start:s,end:K,arrayExpr:v,itemVar:W,foreachContent:O.substring(0,U),emptyContent:O.substring(U+6)}}return null}function ce(n,r){let l=n;while(!0){let e=xe(l);if(!e)break;let{start:o,end:i,arrayExpr:g,itemVar:y,foreachContent:x,emptyContent:p}=e;try{let s;if(f(g))s=d(g,Object.keys(r))(...Object.values(r));else s=u(g,r);let m;if(!Array.isArray(s)||s.length===0)m=p;else m=`@foreach (${g} as ${y})${x}@endforeach`;l=l.substring(0,o)+m+l.substring(i)}catch(s){let m=s instanceof Error?s.message:String(s),a=c("Forelse",`Error in @forelse(${g} as ${y}): ${m}`,t.EVALUATION_ERROR);l=l.substring(0,o)+a+l.substring(i)}}return l}var fe="<!--stx:foreach-not-iterable:",ye=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function Ee(n,r){return`${fe}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function _e(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function ts(n){if(!n.includes(fe))return n;return n.replace(ye,(r,l,e)=>(_e(decodeURIComponent(l),decodeURIComponent(e)),""))}function rr(n,r,l,e,o=!1){let i=n,g=new Set(r.__stx_client_signal_names||[]);for(let s of sr(n))g.add(s);if(g.size)r={...r,__stx_client_signal_names:[...g]};i=ce(i,r);function y(s){let m=/@foreach\s*\(/g,a;while((a=m.exec(s))!==null){let E=a.index,h=a.index+a[0].length-1,w=1,S=h+1,v=-1;while(S<s.length&&w>0){if(s[S]==="(")w++;else if(s[S]===")"){if(w--,w===0){v=S;break}}S++}if(v===-1)continue;let W=s.substring(h+1,v),F=Rt(W);if(!F)continue;let A=E,{arrayExpr:B,itemVar:D}=F,L=v+1,V=1,O=L,K=/@foreach\s*\(/g,U=/@endforeach/g;while(V>0&&O<s.length){K.lastIndex=O,U.lastIndex=O;let z=K.exec(s),N=U.exec(s);if(!N)break;if(z&&z.index<N.index)V++,O=z.index+z[0].length;else{if(V--,V===0){let P=s.substring(L,N.index),_=N.index+11;return{start:A,end:_,arrayExpr:B,itemVar:D,content:P}}O=N.index+11}}}return null}function x(s,m){let a=s;while(!0){let E=y(a);if(!E)break;let{start:h,end:w,arrayExpr:S,itemVar:v,content:W}=E;try{let F=S.trim(),A;if(f(F))A=d(F,Object.keys(m))(...Object.values(m));else A=u(F,m);let B=!1;if(!Array.isArray(A))if(A instanceof Map)A=Array.from(A),B=!0;else if(A instanceof Set)A=Array.from(A);else if(typeof A==="string")A=Array.from(A);else if(A&&typeof A==="object"&&!(A instanceof Date)&&!(A instanceof RegExp))A=Object.entries(A),B=!0;else{let _=Ee(F,l)+c("Foreach",`Error in @foreach: ${F} is not iterable`,t.TYPE_ERROR);a=a.substring(0,h)+_+a.substring(w);continue}let D=e?.loops?.useAltLoopVariable??pe,L=v.trim(),V=null,O,K=!1;if(L.includes("=>")){let _=L.split("=>").map((j)=>j.trim());if(_.length===2&&_[0]&&_[1])V=_[0],O=_[1];else O=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let _=L.split(",").map((j)=>j.trim());if(_.length===2&&_[0]&&_[1])O=_[0],V=_[1],K=!0;else O=L}else O=L;let U="",z=new Set(J(`${S} as ${v}`)),N=A,P=m[zs]??new WeakMap;for(let _=0;_<N.length;_++){let j=N[_],te={index:_,iteration:_+1,first:_===0,last:_===N.length-1,count:N.length},M={...m,loop:te,$loop:te,[zs]:P};if(Array.isArray(m.__stx_client_signal_names))M.__stx_client_signal_names=m.__stx_client_signal_names.filter((H)=>!z.has(H));if(O.startsWith("[")&&O.endsWith("]")){let H=O.slice(1,-1).split(",").map((T)=>T.trim());if(Array.isArray(j))H.forEach((T,X)=>{if(T)M[T]=j[X]});else M[O]=j}else if(O.startsWith("{")&&O.endsWith("}")){let H=O.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean);if(j!==null&&typeof j==="object")H.forEach((T)=>{let X=T.indexOf(":"),Q=(X===-1?T:T.slice(0,X)).trim(),re=X===-1?Q:T.slice(X+1).trim();if(Q&&re)M[re]=j[Q]});else M[O]=j}else M[O]=j;if(V)if(!K&&B&&Array.isArray(j)&&j.length===2)M[V]=j[0],M[O]=j[1];else M[V]=_;let C=ce(W,M);C=rr(C,M,l,e,!0),C=se(C,M,l),C=le(C,M);let q=C.indexOf(ee),G=C.indexOf(ne),Y=q<0?G:G<0?q:Math.min(q,G);if(Y>=0)C=C.slice(0,Y);if(C=k(C,M,l),C=be(C,M),C=me(C,M),C=he(C,M),U+=C,Y>=0&&Y===q)break}a=a.substring(0,h)+U+a.substring(w)}catch(F){let A=c("Foreach",`Error in @foreach(${S.trim()} as ${v.trim()}): ${F instanceof Error?F.message:String(F)}`,t.EVALUATION_ERROR);a=a.substring(0,h)+A+a.substring(w)}}return a}i=x(i,r),i=$e(i,r,l,e);let p=e?.loops?.maxWhileIterations??de;return i=we(i,r,p),o?i:ts(i)}function Cf(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function ge(n){return Hs(n)}function $e(n,r,l,e){let o=n,i=!0;while(i){i=!1;let g=o.match(/@for\s*\(/);if(!g||g.index===void 0)break;let y=g.index,x=y+g[0].length-1,p=b(o,"(",")",x);if(p===-1)break;let s=Cf(o.slice(x+1,p)),m=p+1,a=ps(o.slice(y),"for","endfor");if(a.length===0)break;let E=a[0].content,h=y+a[0].end;if(!ge(s)){let w=c("For",`Unsafe expression in @for: ${s}`,t.UNSAFE_EXPRESSION);o=o.substring(0,y)+w+o.substring(h),i=!0;continue}try{let w=Ae(s),S=/@(?:for|foreach|if|unless)\s*\(/.test(E);if(w.length>0&&S){let D=Re({forExpr:s,content:E,iterVarNames:w,context:r,filePath:l,options:e});o=o.substring(0,y)+D+o.substring(h),i=!0;continue}let v=Object.keys(r),W=Object.values(r),F=ae(E),B=Function(...v,"__stxRenderLoopValue",`
|
|
3
|
-
let result = '';
|
|
4
|
-
for (${s}) {
|
|
5
|
-
result += \`${F}\`;
|
|
6
|
-
}
|
|
7
|
-
return result;
|
|
8
|
-
`)(...W,(D,L,V)=>ue(E,D,L,V));o=o.substring(0,y)+B+o.substring(h),i=!0}catch(w){let S=c("For",`Error in @for(${s}): ${w instanceof Error?w.message:String(w)}`,t.EVALUATION_ERROR);o=o.substring(0,y)+S+o.substring(h),i=!0}}return o}function Ae(n){let r=n.trim(),l=r.match(/^(?:const|let|var)\s+(\[[^\]]+\]|\{[^}]+\})\s+(?:of|in)\s+/);if(l){let i=l[1];return i.slice(1,-1).split(",").map((y)=>{let x=y.trim();if(!x)return"";let p=x.indexOf(":");if(p>=0&&i.startsWith("{")){let a=x.slice(p+1).trim(),E=a.indexOf("=");return(E>=0?a.slice(0,E):a).trim()}let s=x.indexOf("="),m=(s>=0?x.slice(0,s):x).trim();return/^[A-Za-z_$][\w$]*$/.test(m)?m:""}).filter(Boolean)}let e=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s+(?:of|in)\s+/);if(e)return[e[1]];let o=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*;/);if(o)return[o[1]];return[]}function Re(n){let{forExpr:r,content:l,iterVarNames:e,context:o,filePath:i,options:g}=n,y=Object.keys(o),x=Object.values(o),p=i??"inline.stx",s="";return Function(...y,"__renderIteration",`
|
|
9
|
-
for (${r}) {
|
|
10
|
-
if (!__renderIteration([${e.join(", ")}])) break;
|
|
11
|
-
}
|
|
12
|
-
`)(...x,(a)=>{let E={...o};e.forEach((W,F)=>{E[W]=a[F]});let h=rr(l,E,p,g,!0);h=se(h,E,p),h=le(h,E);let w=h.indexOf(ee),S=h.indexOf(ne),v=w<0?S:S<0?w:Math.min(w,S);if(v>=0)h=h.slice(0,v);return s+=k(h,E,p),v<0||v!==w}),s}function we(n,r,l){let e=n,o=!0;while(o){o=!1;let i=e.match(/@while\s*\(/);if(!i||i.index===void 0)break;let g=i.index,y=g+i[0].length-1,x=b(e,"(",")",y);if(x===-1)break;let p=e.slice(y+1,x),s=ps(e.slice(g),"while","endwhile");if(s.length===0)break;let m=s[0].content,a=g+s[0].end;if(!ge(p)){let E=c("While",`Unsafe expression in @while: ${p}`,t.UNSAFE_EXPRESSION);e=e.substring(0,g)+E+e.substring(a),o=!0;continue}try{let E=Object.keys(r),h=Object.values(r),w=ae(m),v=Function(...E,"__stxRenderLoopValue",`
|
|
13
|
-
let result = '';
|
|
14
|
-
let maxIterations = ${l}; // Configurable safety limit
|
|
15
|
-
let counter = 0;
|
|
16
|
-
while (${p} && counter < maxIterations) {
|
|
17
|
-
counter++;
|
|
18
|
-
result += \`${w}\`;
|
|
19
|
-
}
|
|
20
|
-
if (counter > maxIterations) {
|
|
21
|
-
result += '<!-- [While Error [1104]]: Maximum iterations (${l}) exceeded in while loop. Configure via options.loops.maxWhileIterations -->';
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
`)(...h,(W,F,A)=>ue(m,W,F,A));e=e.substring(0,g)+v+e.substring(a),o=!0}catch(E){let h=c("While",`Error in @while(${p}): ${E instanceof Error?E.message:String(E)}`,t.EVALUATION_ERROR);e=e.substring(0,g)+h+e.substring(a),o=!0}}return e}
|
|
25
|
-
export{ts,rr,Cf};
|
package/dist/chunk-0y44f9rk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{we,ci,li,Yf,Ot,zc,ui,Hc,Ih,De,hn,Me}from"./chunk-m5fjhrpd.js";import{Gc,s}from"./chunk-cehjp06v.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{we as BROWSER_CORE_IMPORTS,Yf as STX_AUTO_IMPORTS,ci as extractAndStripCssImports,De as extractBridgeData,Gc as findInterpolationEnd,Hc as generateAutoImportDestructuring,Ih as generateBrowserAutoImportDestructuring,hn as generateServerDataBridge,Ot as injectBrowserCoreAutoImports,Me as processClientScript,ui as referencesName,li as renderVendorStyleTags,s as stripCommentsAndLiterals,zc as transformAutoImports};
|
package/dist/chunk-3h2yz805.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vl,Ul,Wl,ql,Kl,Gl,Xl,Jl,Yl,Zl,sm}from"./chunk-bsq9zg9j.js";export{Vl as createIslandRegistry,sm as default,Zl as generateIslandManifest,Wl as generatePartialHydrationCSS,Gl as hydrateAll,Kl as hydrateByStrategy,ql as hydrateIsland,Xl as isHydrated,Jl as onHydrated,Ul as processPartialHydrationDirectives,Yl as processStaticDirectives};
|
package/dist/chunk-3jfes9b0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ya,ba,va,wa,sh}from"./chunk-2x112fxs.js";import"./chunk-jevd16gq.js";import"./chunk-wp9y6x33.js";import"./chunk-pes27snj.js";import"./chunk-fpagqrd1.js";import"./chunk-x9haxcsj.js";import"./chunk-jt28zh50.js";import"./chunk-0jn79fkt.js";import"./chunk-nv9dy71x.js";import"./chunk-0e9xdrzx.js";import"./chunk-qn4gt8sx.js";import"./chunk-sgm6tg8h.js";import"./chunk-06zn167b.js";import"./chunk-0dkd26t4.js";import"./chunk-3kfbs0mw.js";import"./chunk-hmae7ha6.js";import"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{ya as buildNative,sh as default,ba as findCraftBinary,wa as getAvailableFormats,va as getAvailableTargets};
|
package/dist/chunk-4m8bexrn.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_}from"./chunk-qwds327k.js";import{A,_n}from"./chunk-89h4snzd.js";import{ln,w,x,C,Y}from"./chunk-m5fjhrpd.js";import{a}from"./chunk-x1q2ape8.js";import{Te,en,tn,nn}from"./chunk-r5jytt0f.js";import{yt}from"./chunk-06zn167b.js";import{ft,Bn,Kt,ce}from"./chunk-kb8654dp.js";import{T,Ar}from"./chunk-t4mpq6t0.js";import h from"path";var S=new Map,D=new Map,k=w(64),E=new Map,X=["composables","functions"];function z(t){let n=h.basename(t,".ts");return n==="index"||n==="types"||t.endsWith(".d.ts")}async function Z(t){if(t)return h.resolve(t);let n=`<default>:${process.cwd()}`,i=E.get(n);if(i!==void 0)return i;let e=await q();if(e!==null)E.set(n,e);return e}async function q(){let t=await a(),n=t.root||process.cwd(),i=t.composablesDir;if(i)return h.resolve(n,i);for(let e of X){let s=h.resolve(n,e);try{let d=new Bun.Glob("**/*.ts");for await(let c of d.scan({cwd:s,absolute:!0}))if(!z(c))return s}catch{}}return null}async function G(t){let n=Array.isArray(t)?t:t?[h.resolve(t)]:(await a())._layerComposableDirs??[await Z()].filter((e)=>!!e),i=new Map;for(let e of n){let s=new Bun.Glob("**/*.ts");try{for await(let d of s.scan({cwd:e,absolute:!0})){let c=h.relative(e,d);if(!z(d)&&!i.has(c))i.set(c,d)}}catch{}}return{key:n.join("\x00"),files:[...i.values()].sort()}}async function po(t){let{files:n}=await G(t),i=Y({loader:"ts",target:"browser",define:C()}),e=[];for(let s of n)try{let d=await Bun.file(s).text(),c=i.scan(d).exports.filter((m)=>m!=="default");if(c.length>0)e.push({file:s,names:c})}catch{}return e}function Q(t,n){return new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t)}function J(t,n){let i=new Set(t.match(/\w+/g)),e=new Set;for(let s of n)if(/^\w+$/.test(s)?i.has(s):Q(t,s))e.add(s);return e}var U=w(64);function V(t,n){let i=x(t,n.size),e=U.get(i);if(e)return e;let s;try{s=ln(t,n)}catch{s=J(t,n)}let d=[...t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...t.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let c of d)for(let m of c[1].split(",")){let p=m.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(p&&n.has(p))s.add(p)}return U.set(i,s),s}function ee(t,n,i){let e=new Map;for(let{file:u,names:l}of t)for(let f of l)if(!e.has(f))e.set(f,u);let s=(u)=>{let l=[];for(let f of J(u,e.keys()))l.push(e.get(f));return l},d=new Set(e.keys()),c=(u)=>{let l=[];for(let f of V(u,d))l.push(e.get(f));return l},m=new Set,p=i.flatMap((u,l)=>l===0?s(u):c(u));while(p.length>0){let u=[];for(let l of p){if(m.has(l))continue;m.add(l);for(let f of c(n.get(l)??""))if(!m.has(f))u.push(f)}p=u}return m}async function qm(t,n,i){let{key:e,files:s}=await G(t);if(!e)return null;let d=()=>[...new Set([...s,...s.flatMap((o)=>Te(o))])],c=ft(d());if(s.length===0)return ce(S,e,c,""),null;s.sort();let m=Y({loader:"ts",target:"browser",define:C()}),p=Kt(D,e,c);if(!p){let o=new Map,r=[];for(let g of s)try{let y=await Bun.file(g).text();o.set(g,y);let b=m.scan(y).exports.filter((W)=>W!=="default");if(b.length>0)r.push({file:g,names:b})}catch{o.set(g,"")}p=ce(D,e,c,{codeByFile:o,modules:r})}let{codeByFile:u,modules:l}=p,f;if(n===void 0)f=new Set(s);else{let o=i?[n,...i]:[n],r=x(o.join("\x00"),e,o.length,c),g=k.get(r);if(f=g??ee(l,u,o),!g)k.set(r,f)}if(f.size===0)return null;let I=s.filter((o)=>f.has(o)),B=`${e}\x00${I.join("\x00")}\x00${tn()}`,F=Kt(S,B,c);if(F!==void 0)return F||null;let M=[],v=new Set,R=new Set;for(let o of I)try{let r=u.get(o)??await Bun.file(o).text(),g=h.basename(o,".ts");for(let b of r.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(b[1])R.add(b[1]);let y=[];try{for(let b of m.scan(r).exports)if(b!=="default")v.add(b),y.push(b)}catch{}if(r=A(r),en(r))r=await nn(r,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:y}),r=yt(r);r=_n(r),r=r.replace(/^export\s+(default\s+)?/gm,""),r=m.transformSync(r),M.push(`// Composable: ${g}
|
|
3
|
-
${r.trim()}`)}catch(r){console.warn(`[stx] Failed to load composable ${o}:`,r)}if(M.length===0||v.size===0)return ce(S,B,c,""),null;let L=[...v].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
|
|
4
|
-
`),j=JSON.stringify([...v]),N=M.join(`
|
|
5
|
-
|
|
6
|
-
`),H=_.filter((o)=>!R.has(o)&&new RegExp(`\\b${o}\\b`).test(N)).map((o)=>`var ${o} = __stx[${JSON.stringify(o)}];`).join(`
|
|
7
|
-
`),P=JSON.stringify(new Bun.CryptoHasher("md5").update(`${j}\x00${N}`).digest("hex").slice(0,12)),K=`;(function(){
|
|
8
|
-
var __bundles = window.__stxComposableBundles || (window.__stxComposableBundles = {});
|
|
9
|
-
if (__bundles[${P}]) return;
|
|
10
|
-
__bundles[${P}] = true;
|
|
11
|
-
var __published = window.__stxComposableGlobals || (window.__stxComposableGlobals = {});
|
|
12
|
-
window.__composables = window.__composables || {};
|
|
13
|
-
var __c = window.__composables;
|
|
14
|
-
var __stx = window.stx || {};
|
|
15
|
-
${H}
|
|
16
|
-
${N}
|
|
17
|
-
${L}
|
|
18
|
-
var __names = ${j};
|
|
19
|
-
for (var __i = 0; __i < __names.length; __i++) {
|
|
20
|
-
var __n = __names[__i];
|
|
21
|
-
if (!(__n in __c) || __published[__n]) continue;
|
|
22
|
-
var __takenByBuiltin = !!(window.stx && __n in window.stx);
|
|
23
|
-
if (__takenByBuiltin || __n in window) {
|
|
24
|
-
console.warn('[stx] composable "' + __n + '" is not available as a bare identifier: '
|
|
25
|
-
+ (__takenByBuiltin ? 'a built-in of that name already exists' : 'window already defines that property')
|
|
26
|
-
+ '. Rename it, or use: import { ' + __n + ' } from "@composables"');
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
window[__n] = __c[__n];
|
|
30
|
-
__published[__n] = true;
|
|
31
|
-
}
|
|
32
|
-
})();`,O=T()?Ar(K):K;return c=ft(d()),ce(S,B,c,O),O}function Km(){S.clear(),Bn(),D.clear(),k.clear(),E.clear()}
|
|
33
|
-
export{po,qm,Km};
|
package/dist/chunk-4tz00fkp.js
DELETED
package/dist/chunk-52q8184e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ro,Gi,Br,so,oo,Tn,Wt,Xi,Fr,zr,io,ao,Og,Ng,ut}from"./chunk-asp7ett1.js";export{ut as DeployError,Gi as calculateSha1,Br as collectDeployFiles,zr as createDefaultNetlifyConfig,so as createFileManifest,ro as createNetlifyClient,Og as deploy,Fr as detectProjectConfig,oo as filterRequiredFiles,Tn as formatSize,Xi as generateNetlifyToml,Wt as getTotalSize,ao as hasNetlifyConfig,Ng as initNetlify,io as writeNetlifyConfig};
|
package/dist/chunk-59ytzyp1.js
DELETED
package/dist/chunk-5ffdtfwg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{m,ai,Bc,Fc,Zf,Qf,eg,tg,ng,Ls,rg,Le,Y,je,sg,Sr,og,Vc,di,Be,r,yn,Uc,h,fe,Oh}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{fe as clearComponentCache,di as componentClientSignalNames,ai as convertToCommonJS,h as createDetailedErrorMessage,ng as extractDirectiveNames,Bc as extractScriptFromTemplate,m as extractVariables,r as fileExists,Oh as getComponentCacheStats,Qf as getPositionInfo,Y as getSharedTranspiler,Uc as getSourceLineInfo,tg as hasDirectives,Fc as hasVariables,og as isHydrateTrigger,rg as isJavaScriptScript,Be as renderComponentWithSlot,yn as resolveTemplatePath,sg as scopeOnRootElement,Ls as scopeSequenceKey,Le as shouldTranspileTypeScript,Vc as slotContentHasExpressions,je as transpileTypeScript,Sr as userComponentFileExists,eg as validateDirective,Zf as validateTemplate};
|
package/dist/chunk-5q551m4w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ve,js,ig,Nh,ag,Dh,Nt,p,V,Z,bn,xe,cg,fi,lg,Mh,k,ug,Lh,E,jh}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{ug as applyFilters,Dh as clearCustomFilters,cg as clientLoopScopes,js as defaultFilters,bn as escapeAttributeValue,p as escapeHtml,V as escapeHtmlValue,Z as escapeInterpolatedHtmlValue,E as evaluateExpression,ve as findMustacheEnd,ag as getAllFilters,lg as interpolateScriptAttributes,fi as interpolateScriptExpressions,Mh as interpolateScriptsInTemplate,k as processExpressions,ig as registerFilter,Nh as registerFilters,Nt as replaceInterpolations,Lh as resetRejectedExpressionWarnings,jh as unescapeHtml,xe as usesSignalsInScript};
|
package/dist/chunk-6ndeycxk.js
DELETED
package/dist/chunk-6xt3kvq1.js
DELETED
package/dist/chunk-75r09rqt.js
DELETED
package/dist/chunk-79y41h1d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{gt,Fn,Gm}from"./chunk-76fcwbe1.js";import{le,zn,Xm,Hn,fo,Wr,qr,Jm,Ym,Zm,Vn,Un,go,Kr,Qm}from"./chunk-pwmkhs7z.js";import"./chunk-qwds327k.js";export{fo as batch,Gm as default,zn as derived,Hn as effect,gt as generateSignalsRuntime,Fn as generateSignalsRuntimeDev,Un as isDerived,Vn as isSignal,Xm as memo,qr as onDestroy,Wr as onMount,Kr as peek,Zm as pendingLifecycleCounts,Ym as runDestroyCallbacks,Jm as runMountCallbacks,le as state,go as untrack,Qm as useOptimistic};
|
package/dist/chunk-7h5d35bf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ti,$i,Ri,Sg,kg,_g,hl,Cg,Eg}from"./chunk-dh9aagwm.js";export{Ti as ImageProcessorCache,hl as applyTransformations,Sg as clearImageCache,Cg as generateResponsiveVariants,Eg as generateSrcset,$i as getCachedImageResult,_g as optimizeImage,kg as processImage,Ri as setCachedImageResult};
|
package/dist/chunk-82ybmdqk.js
DELETED
package/dist/chunk-8frs2dtp.js
DELETED
package/dist/chunk-8n2gj4q2.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_}from"./chunk-qwds327k.js";import{A,_n}from"./chunk-89h4snzd.js";import{C,Y}from"./chunk-m5fjhrpd.js";import{a}from"./chunk-x1q2ape8.js";import{Te,en,tn,nn}from"./chunk-r5jytt0f.js";import{yt}from"./chunk-06zn167b.js";import{ft,Bn,Kt,ce}from"./chunk-kb8654dp.js";import{T,Ar}from"./chunk-t4mpq6t0.js";import S from"path";function I(c,r){for(let t of c.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(t[1])r.add(t[1]);for(let t of c.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let o of(t[1]??"").split(",")){let n=((o.includes(":")?o.split(":").pop():o)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(n))r.add(n)}for(let t of c.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let o of(t[1]??"").split(",")){let i=o.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(i))r.add(i)}}var p=new Map;async function v(c,r=T()){let t;if(c)t=S.resolve(c);else{let s=await a();t=S.resolve(s.root||process.cwd(),s.storesDir||"stores")}let o=`${t}\x00${tn()}\x00${r?"shared":"inline"}`,i=new Bun.Glob("*.ts"),n=[];try{for await(let s of i.scan({cwd:t,absolute:!0})){let e=S.basename(s,".ts");if(["index","types"].includes(e))continue;if(s.includes(".d.ts"))continue;n.push(s)}}catch{return ce(p,o,"",{chunks:[]}),null}let u=()=>[...new Set([...n,...n.flatMap((s)=>Te(s))])],f=ft(u()),d=Kt(p,o,f);if(d!==void 0)return d.chunks.length>0?d:null;if(n.length===0)return ce(p,o,f,{chunks:[]}),null;let h=[];for(let s of n){let e=await Bun.file(s).text();h.push({file:s,hasUseStore:/useStore\s*\(/.test(e)})}h.sort((s,e)=>{if(s.hasUseStore===e.hasUseStore)return 0;return s.hasUseStore?1:-1});let g=h.map((s)=>s.file),l=[],m=Y({loader:"ts",target:"browser",define:C()});for(let s of g)try{let e=await Bun.file(s).text(),w=S.basename(s,".ts"),k=new Set;I(e,k);let y=[...e.matchAll(/\bdefineStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1/g)].map((B)=>B[2]),U=e.match(/\bdefineStore\s*(?:<[^>()]*>)?\(/g)?.length??0;if(en(e))e=await nn(e,s,{projectRoot:process.cwd(),externalizeUserModules:r});e=yt(e),e=A(e),e=_n(e),e=e.replace(/^export\s+(default\s+)?/gm,""),e=m.transformSync(e),l.push({name:w,ids:y.length===U?y:[],declared:k,code:`// Store: ${w}
|
|
3
|
-
${e.trim()}`})}catch(e){console.warn(`[stx] Failed to load store ${s}:`,e)}if(l.length===0)return ce(p,o,f,{chunks:[]}),null;f=ft(u());let b={chunks:l};return ce(p,o,f,b),b}function M(c){let r=new Set;for(let n of c)for(let u of n.declared)r.add(u);let t=c.map((n)=>n.code).join(`
|
|
4
|
-
|
|
5
|
-
`),i=`;(function(){
|
|
6
|
-
var __stx = window.stx || {};
|
|
7
|
-
${_.filter((n)=>!r.has(n)&&new RegExp(`\\b${n}\\b`).test(t)).map((n)=>`var ${n} = __stx[${JSON.stringify(n)}];`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
${t}
|
|
10
|
-
})();`;return T()?Ar(i):i}var x=new WeakMap;async function Vm(c){let r=await v(c);if(!r)return null;let t=x.get(r);if(t===void 0)t=M(r.chunks),x.set(r,t);return t}function pa(...c){let r=new Set,t=!1;for(let o of c){if(!o)continue;if(/__STX_STORES__|\b_stores\b/.test(o))t=!0;let i=o.match(/\buseStore\s*(?:<[^>()]*>)?\(/g)?.length??0;if(i===0)continue;let n=0;for(let u of o.matchAll(/\buseStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g))r.add(u[2]),n++;if(n!==i)t=!0}return{names:r,all:t}}async function Um(c,r,t={}){let o=await v(c,t.sharedModules);if(!o)return null;let{chunks:i}=o,n=pa(...r),u;if(n.all||i.some((f)=>f.ids.length===0))u=i;else{let f=new Map;for(let l of i)for(let m of l.ids)f.set(m,l);let d=new Set,h=[...n.names],g=!1;while(h.length>0&&!g){let l=f.get(h.pop());if(!l||d.has(l))continue;d.add(l);let m=pa(l.code);if(m.all)g=!0;else h.push(...m.names)}u=g?i:i.filter((l)=>d.has(l))}if(u.length===0)return null;return{code:M(u),stores:u.map((f)=>f.name)}}function Wm(){p.clear(),Bn()}
|
|
11
|
-
export{Vm,pa,Um,Wm};
|
package/dist/chunk-8prq9t3b.js
DELETED
package/dist/chunk-8sxngenk.js
DELETED
package/dist/chunk-90er677t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{j,If,Ho,a,P,Ch,Eh}from"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{P as config,j as defaultConfig,Ch as defineStxConfig,Ho as discoverConfig,a as loadStxConfig,If as resolveStxDirectories,Eh as validateConfig};
|
package/dist/chunk-aakkjjgr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Tf,is}from"./chunk-0e9xdrzx.js";import"./chunk-qn4gt8sx.js";import"./chunk-sgm6tg8h.js";import"./chunk-3kfbs0mw.js";import{wr}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import{nt}from"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{nt as freeIdentifiers,is as processComponents,Tf as processESImports,wr as rendersAsElement};
|
package/dist/chunk-abs1k04e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Q,ee,te,In,me,Ee,Vr,jl,pt,qt,On,Nn,Dn,ne,Mn,Ln,Ur}from"./chunk-myynywry.js";import"./chunk-pes27snj.js";export{ee as DEFAULT_FORMATS,te as DEFAULT_QUALITY,Q as DEFAULT_WIDTHS,Ur as ImageProcessingError,Ln as formatSize,qt as generateSizes,pt as generateSrcSet,On as getFallbackVariant,Vr as getImageMetadata,ne as getMimeType,Mn as getTotalSize,Nn as groupVariantsByFormat,me as isImageBackendAvailable,Dn as isImageFile,In as isSharpAvailable,Ee as processImage,jl as resizeAndConvert};
|
package/dist/chunk-c05r0rzw.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import i from"path";var cn=".stx",o="STX_DIR",e=null;function xc(t){e=t?.trim()||null}function fr(){return process.env[o]?.trim()||e||cn}function l(t=process.cwd(),...n){let r=fr();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function gr(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==cn&&!n.startsWith(`${cn}/`))return t;let r=n.slice(cn.length+1);return r?i.join(fr(),r):fr()}
|
|
3
|
-
export{cn,xc,fr,l,gr};
|
package/dist/chunk-c7yjhjr2.js
DELETED
package/dist/chunk-cpep999n.js
DELETED
package/dist/chunk-cvwn6mga.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Zg}from"./chunk-93j4atq9.js";import"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{Zg as buildApp};
|
package/dist/chunk-davr7z73.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lh,Za,uh,Qa,xf,Sf,on,nr,dh,kf,_f,ph,y}from"./chunk-x9haxcsj.js";import"./chunk-hmae7ha6.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{on as buildCss,kf as extractClassNames,Sf as fingerprintConfig,_f as generateCss,dh as getCachedCSS,lh as getCssServeAsset,y as injectCss,Za as loadCssEngine,Qa as loadCssEngineConfig,nr as rebuildCss,uh as resetCssCache,xf as resolveUserCssConfig,ph as withLinkedModuleBundles};
|
package/dist/chunk-dqs4bgec.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{zg,Hg,Vg,Ug,Ol,Wg,qg,Kg,Gg,Xg,Jg,Yg}from"./chunk-t6qn1374.js";export{Jg as Broadcast,Yg as BroadcastServer,Ol as broadcast,Gg as broadcastPresence,Kg as broadcastPrivate,Xg as channel,zg as getBroadcastServer,Ug as loadChannels,Hg as startBroadcasting,Vg as stopBroadcasting,Wg as toUser,qg as toUsers};
|
package/dist/chunk-e30kgg28.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{xi,Bh,Fh,nl,He,dg,Ws,zh,Hh,Vh,Uh,Wh,qh,Kh,Gh,Xh}from"./chunk-465resq9.js";export{qh as applyHead,zh as definePageMeta,xi as getHead,Bh as getPageMeta,He as mergeHeadConfigs,Kh as processHeadDirective,Xh as processMetaDirective,Gh as processTitleDirective,Wh as renderBodyAttrs,Vh as renderHead,Uh as renderHtmlAttrs,Fh as resetHead,Ws as seoMetaToHeadConfig,nl as useHead,Hh as usePageTitle,dg as useSeoMeta,Hh as useTitle};
|
package/dist/chunk-e3fkq9gb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Xo,Jo,wt,ue,ur,xs,dr,Ss,ks,Nf,Df,Mf,pr,Lf,jf,Bf,Ff,yc,bc,vc,Yo,wc,zf,xt,St,kt,_t,Ct,Et,Qe,Hf}from"./chunk-z8k3fx4r.js";export{dr as Router,Bf as abortNavigation,xs as bracketPathToRegex,xt as clearMiddleware,bc as createClientCookieManager,Ct as createMiddlewareContext,_t as createRouteLocation,yc as createServerCookieManager,vc as createStorageManager,Ff as defineMiddleware,Df as defineRoute,Mf as defineRoutes,Ss as findErrorPage,ks as formatRoutes,Jo as generateRouteManifest,Xo as generateRouteTypes,wc as getMiddleware,St as getMiddlewareNames,Qe as getRouterScript,Hf as getRouterScriptDev,zf as hasMiddleware,wt as isFileRequestPath,kt as loadMiddlewareFromDirectory,ur as matchRoute,jf as navigateTo,ue as patternToRegex,Yo as registerMiddleware,Lf as resetRoutes,pr as route,Et as runMiddleware,Nf as setAppUrl};
|
package/dist/chunk-eab8na0z.js
DELETED
package/dist/chunk-exg7ry7b.js
DELETED
package/dist/chunk-f4mmk2cx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qn,i}from"./chunk-fpagqrd1.js";import"./chunk-x9haxcsj.js";import"./chunk-jt28zh50.js";import"./chunk-0jn79fkt.js";import"./chunk-nv9dy71x.js";import"./chunk-0e9xdrzx.js";import"./chunk-qn4gt8sx.js";import"./chunk-sgm6tg8h.js";import"./chunk-06zn167b.js";import{be}from"./chunk-0dkd26t4.js";import"./chunk-3kfbs0mw.js";import"./chunk-hmae7ha6.js";import"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import{Ie,Ds,Ms}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{Qn as buildModulesTag,be as injectRouterScript,i as processDirectives,Ds as processJsonDirective,Ms as processOnceDirective,Ie as validateClientScript};
|
package/dist/chunk-fhwn8j9p.js
DELETED
package/dist/chunk-fj105fff.js
DELETED
package/dist/chunk-g387j1qv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rl,Qi,Mg,Al,Pl,Lg,jg}from"./chunk-geb6zyxg.js";import"./chunk-4m8bexrn.js";import"./chunk-r5jytt0f.js";import"./chunk-6n195hvc.js";import"./chunk-19safa6y.js";import"./chunk-06zn167b.js";import"./chunk-0dkd26t4.js";import"./chunk-3kfbs0mw.js";import"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import{At,Vf}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{Rl as buildVirtualSource,At as extractScriptBlocks,Vf as extractTemplateExpressions,Al as findRuntimeTypeDeclarations,Pl as findStxModuleDeclarations,jg as formatTypecheckDiagnostics,Mg as sourcePathFor,Lg as typecheckStxFiles,Qi as virtualPathFor};
|
package/dist/chunk-gefpzry6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vl,wl}from"./chunk-mcynmrbe.js";import"./chunk-5ge5h2y3.js";import"./chunk-3ajnrfa2.js";import"./chunk-asp7ett1.js";import"./chunk-j04v4rgf.js";import"./chunk-geb6zyxg.js";import"./chunk-s4y26fk6.js";import"./chunk-yftw25sa.js";import"./chunk-00ns0516.js";import"./chunk-t6qn1374.js";import"./chunk-prej5pk6.js";import"./chunk-93j4atq9.js";import"./chunk-r4sawwmp.js";import"./chunk-gz38jt5j.js";import"./chunk-myynywry.js";import"./chunk-vh1d5eqk.js";import"./chunk-bsq9zg9j.js";import"./chunk-4npabwne.js";import"./chunk-hk98vptc.js";import"./chunk-a5d888es.js";import"./chunk-7g9vd5fv.js";import"./chunk-7r7j7vwt.js";import"./chunk-hmydy949.js";import"./chunk-gs6wc7sr.js";import"./chunk-w8p1y4c0.js";import"./chunk-tb56j1zt.js";import"./chunk-8n2gj4q2.js";import"./chunk-4m8bexrn.js";import"./chunk-76fcwbe1.js";import"./chunk-wp9y6x33.js";import"./chunk-pes27snj.js";import"./chunk-3nxe5xmy.js";import{Yt}from"./chunk-t5gabs4x.js";import"./chunk-r5jytt0f.js";import"./chunk-6n195hvc.js";import"./chunk-19safa6y.js";import{Re,i}from"./chunk-fpagqrd1.js";import"./chunk-x9haxcsj.js";import"./chunk-jt28zh50.js";import"./chunk-0jn79fkt.js";import"./chunk-nv9dy71x.js";import"./chunk-0e9xdrzx.js";import"./chunk-qn4gt8sx.js";import"./chunk-sgm6tg8h.js";import"./chunk-06zn167b.js";import{be}from"./chunk-0dkd26t4.js";import"./chunk-3kfbs0mw.js";import{ar,cr}from"./chunk-hmae7ha6.js";import{ms,j,a}from"./chunk-x1q2ape8.js";import"./chunk-1mfj2j5g.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import{m,Me}from"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";import"./chunk-dh9aagwm.js";import"./chunk-j4snweyz.js";export{ms as buildWebComponents,cr as cacheTemplate,ar as checkCache,Yt as classifyAllScripts,vl as createMiddleware,wl as createRoute,j as defaultConfig,m as extractVariables,be as injectRouterScript,a as loadStxConfig,Me as processClientScript,i as processDirectives,Re as readMarkdownFile};
|
package/dist/chunk-ghzycypz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ua,Ql,jn,om,eu,tu,nu,im}from"./chunk-4npabwne.js";import"./chunk-m5fjhrpd.js";import"./chunk-b6g24qj0.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-qwds327k.js";export{jn as Validator,Ql as defineForm,eu as processErrorDirective,tu as processErrorsDirective,im as processFormValidationDirectives,nu as processHasErrorsDirective,ua as useForm,om as v};
|