@stacksjs/stx 0.2.755 → 0.2.759
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-0dsykna3.js → chunk-00ns0516.js} +5 -5
- package/dist/chunk-055v5qz2.js +2 -0
- package/dist/{chunk-kjfzkac7.js → chunk-06zn167b.js} +7 -7
- package/dist/{chunk-024m1xmd.js → chunk-0dkd26t4.js} +5 -5
- package/dist/{chunk-gzbmfwxr.js → chunk-0e9xdrzx.js} +4 -4
- package/dist/chunk-0j7e56zm.js +2 -0
- package/dist/{chunk-8wbgq43c.js → chunk-0jn79fkt.js} +3 -3
- package/dist/chunk-0y44f9rk.js +2 -0
- package/dist/{chunk-d73hh5ar.js → chunk-11kejz35.js} +1 -1
- package/dist/{chunk-p33w8zst.js → chunk-1mfj2j5g.js} +3 -3
- package/dist/{chunk-vc4jww9y.js → chunk-2x112fxs.js} +13 -13
- package/dist/{chunk-6ywa41tr.js → chunk-3ajnrfa2.js} +2 -2
- package/dist/{chunk-3z38swhv.js → chunk-3cn9y08d.js} +7 -7
- package/dist/chunk-3h2yz805.js +2 -0
- package/dist/chunk-3jfes9b0.js +2 -0
- package/dist/{chunk-nsjkmpjf.js → chunk-3kfbs0mw.js} +1 -1
- package/dist/{chunk-z5kdmget.js → chunk-3nxe5xmy.js} +3 -3
- package/dist/{chunk-p2v0r96k.js → chunk-42hcspws.js} +2 -2
- package/dist/{chunk-0tgrqhkr.js → chunk-465resq9.js} +11 -11
- package/dist/{chunk-m0shnhth.js → chunk-4m8bexrn.js} +3 -3
- package/dist/{chunk-8wbcy0cn.js → chunk-4npabwne.js} +3 -3
- package/dist/{chunk-xrzghjvy.js → chunk-4s9kytdz.js} +2 -2
- package/dist/chunk-4tz00fkp.js +2 -0
- package/dist/{chunk-dvakr9p9.js → chunk-4zw118tn.js} +4 -4
- package/dist/chunk-52q8184e.js +2 -0
- package/dist/chunk-59ytzyp1.js +2 -0
- package/dist/chunk-5ffdtfwg.js +2 -0
- package/dist/{chunk-g223zsce.js → chunk-5ge5h2y3.js} +3 -3
- package/dist/chunk-5q551m4w.js +2 -0
- package/dist/{chunk-cb4ybh7g.js → chunk-5q9ss7ty.js} +4 -4
- package/dist/{chunk-txgd0sj1.js → chunk-6n195hvc.js} +5 -5
- package/dist/chunk-6xt3kvq1.js +2 -0
- package/dist/chunk-75r09rqt.js +2 -0
- package/dist/{chunk-90gx5qxn.js → chunk-76fcwbe1.js} +4 -4
- package/dist/chunk-79y41h1d.js +2 -0
- package/dist/{chunk-9r3ehqtx.js → chunk-7g9vd5fv.js} +2 -2
- package/dist/chunk-7h5d35bf.js +2 -0
- package/dist/{chunk-73b6sst8.js → chunk-7r7j7vwt.js} +3 -3
- package/dist/chunk-82ybmdqk.js +2 -0
- package/dist/{chunk-g22absm0.js → chunk-83ezv8yz.js} +2 -2
- package/dist/chunk-8frs2dtp.js +2 -0
- package/dist/chunk-8n2gj4q2.js +11 -0
- package/dist/chunk-8prq9t3b.js +2 -0
- package/dist/chunk-8sxngenk.js +2 -0
- package/dist/chunk-90er677t.js +2 -0
- package/dist/{chunk-bkkwdh13.js → chunk-93j4atq9.js} +2 -2
- package/dist/{chunk-1a2cwee1.js → chunk-9s1qnf90.js} +2 -2
- package/dist/{chunk-j3d9zknp.js → chunk-a5d888es.js} +6 -6
- package/dist/chunk-aakkjjgr.js +2 -0
- package/dist/chunk-abs1k04e.js +2 -0
- package/dist/{chunk-0vvb78yj.js → chunk-asp7ett1.js} +5 -5
- package/dist/{chunk-7mm5mvg0.js → chunk-b6g24qj0.js} +2 -2
- package/dist/{chunk-7djnbbeb.js → chunk-bsq9zg9j.js} +6 -6
- package/dist/{chunk-7ycf8a8d.js → chunk-c05r0rzw.js} +2 -2
- package/dist/{chunk-g45p4y4v.js → chunk-cehjp06v.js} +3 -3
- package/dist/chunk-cpep999n.js +2 -0
- package/dist/chunk-cvwn6mga.js +2 -0
- package/dist/chunk-davr7z73.js +2 -0
- package/dist/{chunk-vpa4xzz3.js → chunk-dh9aagwm.js} +1 -1
- package/dist/chunk-dqs4bgec.js +2 -0
- package/dist/chunk-e30kgg28.js +2 -0
- package/dist/chunk-e3fkq9gb.js +2 -0
- package/dist/chunk-eab8na0z.js +2 -0
- package/dist/chunk-exg7ry7b.js +2 -0
- package/dist/chunk-f4mmk2cx.js +2 -0
- package/dist/chunk-fhwn8j9p.js +2 -0
- package/dist/chunk-fj105fff.js +2 -0
- package/dist/{chunk-cmaxdd8d.js → chunk-fjxhga6w.js} +2 -2
- package/dist/{chunk-thr1m7k7.js → chunk-fpagqrd1.js} +22 -22
- package/dist/chunk-g387j1qv.js +2 -0
- package/dist/{chunk-zqmvhg37.js → chunk-geb6zyxg.js} +10 -10
- package/dist/chunk-gefpzry6.js +2 -0
- package/dist/chunk-ghzycypz.js +2 -0
- package/dist/{chunk-sj2a5twe.js → chunk-gs373714.js} +2 -2
- package/dist/{chunk-nzy4set0.js → chunk-gs6wc7sr.js} +5 -5
- package/dist/chunk-gvaee1w0.js +170 -0
- package/dist/{chunk-5q2tfrcw.js → chunk-gz38jt5j.js} +2 -2
- package/dist/{chunk-pydmzvpq.js → chunk-h692k9xn.js} +1 -1
- package/dist/{chunk-81ysx0tc.js → chunk-hk98vptc.js} +2 -2
- package/dist/{chunk-xzz36k99.js → chunk-hmae7ha6.js} +2 -2
- package/dist/{chunk-qxrsm48h.js → chunk-hmydy949.js} +5 -5
- package/dist/{chunk-7r5vhqtz.js → chunk-j04v4rgf.js} +4 -4
- package/dist/{chunk-1tmq09ch.js → chunk-j4snweyz.js} +3 -3
- package/dist/{chunk-d2vsw1j7.js → chunk-jb1dk0w7.js} +2 -2
- package/dist/{chunk-5evgz54v.js → chunk-jevd16gq.js} +30 -30
- package/dist/{chunk-41sq06t2.js → chunk-jt28zh50.js} +2 -2
- package/dist/chunk-k37472gm.js +2 -0
- package/dist/chunk-k3wnmpt3.js +2 -0
- package/dist/chunk-kfqdx75m.js +2 -0
- package/dist/{chunk-9q1kkfv1.js → chunk-kpr09x3g.js} +6 -6
- package/dist/{chunk-3ap06zzx.js → chunk-m00c7sh0.js} +1 -1
- package/dist/{chunk-8w0cwcvk.js → chunk-m5fjhrpd.js} +62 -62
- package/dist/{chunk-mpmx0n3q.js → chunk-mcynmrbe.js} +26 -26
- package/dist/chunk-mgx71bfg.js +2 -0
- package/dist/chunk-mmhbn7xt.js +2 -0
- package/dist/{chunk-0md73jp8.js → chunk-myynywry.js} +2 -2
- package/dist/chunk-mzcbfra0.js +2 -0
- package/dist/{chunk-j5p191zq.js → chunk-nv9dy71x.js} +7 -7
- package/dist/chunk-ny2qzraq.js +2 -0
- package/dist/{chunk-q0f28539.js → chunk-pes27snj.js} +2 -2
- package/dist/chunk-pg15tx9c.js +2 -0
- package/dist/chunk-ppc5s12t.js +2 -0
- package/dist/{chunk-0dt7ax79.js → chunk-prej5pk6.js} +2 -2
- package/dist/chunk-ptzzpf97.js +2 -0
- package/dist/{chunk-df8cbgf0.js → chunk-pwmkhs7z.js} +2 -2
- package/dist/chunk-qgsrxyh9.js +2 -0
- package/dist/chunk-qmxcs806.js +2 -0
- package/dist/chunk-qn4gt8sx.js +3 -0
- package/dist/chunk-qryg0hgn.js +2 -0
- package/dist/chunk-qt17792g.js +2 -0
- package/dist/{chunk-236bdf7y.js → chunk-qwds327k.js} +2 -2
- package/dist/{chunk-c3dphs36.js → chunk-qwsgc5rc.js} +1 -1
- package/dist/chunk-qz9fzz5k.js +2 -0
- package/dist/{chunk-5wcgg5t4.js → chunk-r4sawwmp.js} +1 -1
- package/dist/chunk-r5jytt0f.js +20 -0
- package/dist/chunk-rh90yh1c.js +2 -0
- package/dist/chunk-rvc0pb16.js +2 -0
- package/dist/{chunk-fxftc455.js → chunk-s4y26fk6.js} +2 -2
- package/dist/{chunk-v0s52tmv.js → chunk-sgm6tg8h.js} +2 -2
- package/dist/chunk-sj5t0tnv.js +2 -0
- package/dist/{chunk-yd2nj0rv.js → chunk-spjpdymh.js} +1 -1
- package/dist/{chunk-nmy72s6r.js → chunk-t4mpq6t0.js} +2 -2
- package/dist/{chunk-np8knskz.js → chunk-t5gabs4x.js} +1 -1
- package/dist/{chunk-4zta7ay1.js → chunk-t6qn1374.js} +2 -2
- package/dist/{chunk-4fc8zs15.js → chunk-tb56j1zt.js} +5 -5
- package/dist/chunk-tb6jcr2v.js +2 -0
- package/dist/chunk-v20cwjgz.js +17 -0
- package/dist/{chunk-k9m36nyw.js → chunk-v2egd4zh.js} +5 -5
- package/dist/{chunk-0fweckq5.js → chunk-vh1d5eqk.js} +6 -6
- package/dist/{chunk-fa3ygt8c.js → chunk-w8p1y4c0.js} +4 -4
- package/dist/{chunk-j2hm8v8b.js → chunk-wp9y6x33.js} +4 -4
- package/dist/{chunk-g5sctfwa.js → chunk-x1q2ape8.js} +10 -10
- package/dist/{chunk-x5sy0tym.js → chunk-x9haxcsj.js} +6 -6
- package/dist/chunk-xcq41ah8.js +2 -0
- package/dist/chunk-y3jbkk7a.js +2 -0
- package/dist/{chunk-fmxtnva8.js → chunk-yftw25sa.js} +2 -2
- package/dist/chunk-yme43vbp.js +2 -0
- package/dist/{chunk-m6w75sq2.js → chunk-yp6w740k.js} +2 -2
- package/dist/chunk-yv8jeqdn.js +2 -0
- package/dist/{chunk-k4dn3ry6.js → chunk-z8k3fx4r.js} +4 -4
- package/dist/chunk-zq7g0687.js +2 -0
- package/dist/{chunk-c85j39f7.js → chunk-ztdjdxjt.js} +3 -3
- package/dist/cli.js +19 -19
- package/dist/client-module-registry.d.ts +56 -0
- package/dist/client-module-registry.js +249 -9
- package/dist/client-script-bundler.d.ts +17 -0
- package/dist/client-script-bundler.js +58 -11
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/native/compiler/bundle.d.ts +1 -0
- package/dist/native/compiler/bundle.js +102 -11
- package/dist/native/compiler/render-screen.js +13 -6
- package/dist/native/compiler/setup-script.d.ts +1 -0
- package/dist/native/compiler/shared-scripts.d.ts +12 -0
- package/dist/native/compiler/shared-scripts.js +83 -0
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +4 -4
- package/dist/store-loader.d.ts +23 -0
- package/dist/store-loader.js +93 -19
- package/package.json +5 -5
- package/dist/chunk-1gan06yr.js +0 -2
- package/dist/chunk-1menbxwb.js +0 -2
- package/dist/chunk-1n2d3cy5.js +0 -2
- package/dist/chunk-2vc2pkyz.js +0 -2
- package/dist/chunk-33bp9m4c.js +0 -2
- package/dist/chunk-361yezje.js +0 -2
- package/dist/chunk-45cvagp1.js +0 -2
- package/dist/chunk-5f0wwwmw.js +0 -2
- package/dist/chunk-5h71xbzk.js +0 -2
- package/dist/chunk-5z9a1vzw.js +0 -2
- package/dist/chunk-67jf2e8x.js +0 -2
- package/dist/chunk-6b7je8dc.js +0 -2
- package/dist/chunk-6fxjs3ay.js +0 -3
- package/dist/chunk-6n5jnd97.js +0 -2
- package/dist/chunk-6wvnfdqq.js +0 -2
- package/dist/chunk-78jkbaz3.js +0 -2
- package/dist/chunk-7e9hfrtb.js +0 -2
- package/dist/chunk-7tc5fj96.js +0 -2
- package/dist/chunk-82q0fy52.js +0 -2
- package/dist/chunk-8q5ec4s1.js +0 -2
- package/dist/chunk-8ysk095d.js +0 -2
- package/dist/chunk-9vbrj55v.js +0 -2
- package/dist/chunk-bcefawtc.js +0 -2
- package/dist/chunk-bd6s91p9.js +0 -2
- package/dist/chunk-bhkqzz91.js +0 -2
- package/dist/chunk-bx1mjwhb.js +0 -2
- package/dist/chunk-dw0m259e.js +0 -2
- package/dist/chunk-dx4g2ec9.js +0 -2
- package/dist/chunk-evdskc25.js +0 -2
- package/dist/chunk-gppv6fez.js +0 -2
- package/dist/chunk-grjr8shp.js +0 -2
- package/dist/chunk-gz1w4cpp.js +0 -2
- package/dist/chunk-h0qtmmq3.js +0 -2
- package/dist/chunk-h6sewvt2.js +0 -20
- package/dist/chunk-hb34m4pp.js +0 -2
- package/dist/chunk-hwvtpx3p.js +0 -2
- package/dist/chunk-k3kav39s.js +0 -2
- package/dist/chunk-k46j2maz.js +0 -2
- package/dist/chunk-ka2f844k.js +0 -2
- package/dist/chunk-kh4dr6gd.js +0 -2
- package/dist/chunk-myd82d80.js +0 -2
- package/dist/chunk-nek0q523.js +0 -130
- package/dist/chunk-nvbjcgzd.js +0 -2
- package/dist/chunk-p13dxvaj.js +0 -2
- package/dist/chunk-pht5z7wa.js +0 -2
- package/dist/chunk-ppvdbstz.js +0 -11
- package/dist/chunk-pwdk7jbx.js +0 -2
- package/dist/chunk-qekyxjy6.js +0 -2
- package/dist/chunk-r10eadgn.js +0 -2
- package/dist/chunk-r8184e10.js +0 -2
- package/dist/chunk-rshaz0df.js +0 -4
- package/dist/chunk-tcrpa52j.js +0 -2
- package/dist/chunk-vp1p250v.js +0 -2
- package/dist/chunk-vqrg5j83.js +0 -2
- package/dist/chunk-vzdfq3b5.js +0 -2
- package/dist/chunk-wzh4ene8.js +0 -2
- package/dist/chunk-x5vwkccx.js +0 -2
- package/dist/chunk-x6cmj5sa.js +0 -2
- package/dist/chunk-xnrfz4c3.js +0 -2
- package/dist/chunk-yaabhcss.js +0 -2
- package/dist/chunk-yazqtmq4.js +0 -2
- package/dist/chunk-zygpvm1x.js +0 -2
- package/dist/chunk-zz247c1r.js +0 -2
package/dist/store-loader.js
CHANGED
|
@@ -8,7 +8,6 @@ import { stripStxRuntimeImports } from "./signal-processing.js";
|
|
|
8
8
|
import { clearSourceSignatures, readSigned, sourceSignature, writeSigned } from "./source-signature.js";
|
|
9
9
|
import { stripModuleImports, transformStoreImports } from "./store-imports.js";
|
|
10
10
|
import { getSharedTranspiler } from "./utils.js";
|
|
11
|
-
const _cachedStoreScripts = new Map;
|
|
12
11
|
function collectDeclaredNames(code, into) {
|
|
13
12
|
for (const match of code.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))
|
|
14
13
|
if (match[1])
|
|
@@ -26,7 +25,8 @@ function collectDeclaredNames(code, into) {
|
|
|
26
25
|
into.add(name);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
|
|
28
|
+
const _cachedStoreChunks = new Map;
|
|
29
|
+
async function loadStoreChunks(storesDir, sharedModules = isProduction()) {
|
|
30
30
|
let resolvedDir;
|
|
31
31
|
if (storesDir)
|
|
32
32
|
resolvedDir = path.resolve(storesDir);
|
|
@@ -34,7 +34,7 @@ export async function getStoreScript(storesDir) {
|
|
|
34
34
|
const config = await loadStxConfig();
|
|
35
35
|
resolvedDir = path.resolve(config.root || process.cwd(), config.storesDir || "stores");
|
|
36
36
|
}
|
|
37
|
-
const cacheKey = `${resolvedDir}\x00${moduleSubstitutionKey()}`, glob = new Bun.Glob("*.ts"), storeFiles = [];
|
|
37
|
+
const cacheKey = `${resolvedDir}\x00${moduleSubstitutionKey()}\x00${sharedModules ? "shared" : "inline"}`, glob = new Bun.Glob("*.ts"), storeFiles = [];
|
|
38
38
|
try {
|
|
39
39
|
for await (const file of glob.scan({ cwd: resolvedDir, absolute: !0 })) {
|
|
40
40
|
const name = path.basename(file, ".ts");
|
|
@@ -45,7 +45,7 @@ export async function getStoreScript(storesDir) {
|
|
|
45
45
|
storeFiles.push(file);
|
|
46
46
|
}
|
|
47
47
|
} catch {
|
|
48
|
-
writeSigned(
|
|
48
|
+
writeSigned(_cachedStoreChunks, cacheKey, "", { chunks: [] });
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
51
|
const storeInputs = () => [...new Set([
|
|
@@ -53,11 +53,11 @@ export async function getStoreScript(storesDir) {
|
|
|
53
53
|
...storeFiles.flatMap((file) => clientBundleDependencies(file))
|
|
54
54
|
])];
|
|
55
55
|
let signature = sourceSignature(storeInputs());
|
|
56
|
-
const cached = readSigned(
|
|
56
|
+
const cached = readSigned(_cachedStoreChunks, cacheKey, signature);
|
|
57
57
|
if (cached !== void 0)
|
|
58
|
-
return cached
|
|
58
|
+
return cached.chunks.length > 0 ? cached : null;
|
|
59
59
|
if (storeFiles.length === 0) {
|
|
60
|
-
writeSigned(
|
|
60
|
+
writeSigned(_cachedStoreChunks, cacheKey, signature, { chunks: [] });
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
const filesWithDeps = [];
|
|
@@ -73,41 +73,115 @@ export async function getStoreScript(storesDir) {
|
|
|
73
73
|
return 0;
|
|
74
74
|
return a.hasUseStore ? 1 : -1;
|
|
75
75
|
});
|
|
76
|
-
const sortedFiles = filesWithDeps.map((f) => f.file), chunks = [],
|
|
76
|
+
const sortedFiles = filesWithDeps.map((f) => f.file), chunks = [], transpiler = getSharedTranspiler({ loader: "ts", target: "browser", define: getPublicEnvDefine() });
|
|
77
77
|
for (const file of sortedFiles)
|
|
78
78
|
try {
|
|
79
79
|
let code = await Bun.file(file).text();
|
|
80
|
-
const storeName = path.basename(file, ".ts");
|
|
81
|
-
collectDeclaredNames(code,
|
|
80
|
+
const storeName = path.basename(file, ".ts"), declared = new Set;
|
|
81
|
+
collectDeclaredNames(code, declared);
|
|
82
|
+
const ids = [...code.matchAll(/\bdefineStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1/g)].map((match) => match[2]), definitions = code.match(/\bdefineStore\s*(?:<[^>()]*>)?\(/g)?.length ?? 0;
|
|
82
83
|
if (hasUserImports(code))
|
|
83
|
-
code = await bundleClientScript(code, file, { projectRoot: process.cwd(), externalizeUserModules:
|
|
84
|
+
code = await bundleClientScript(code, file, { projectRoot: process.cwd(), externalizeUserModules: sharedModules });
|
|
84
85
|
code = stripStxRuntimeImports(code);
|
|
85
86
|
code = transformStoreImports(code);
|
|
86
87
|
code = stripModuleImports(code);
|
|
87
88
|
code = code.replace(/^export\s+(default\s+)?/gm, "");
|
|
88
89
|
code = transpiler.transformSync(code);
|
|
89
|
-
chunks.push(`// Store: ${storeName}
|
|
90
|
-
${code.trim()}`);
|
|
90
|
+
chunks.push({ name: storeName, ids: ids.length === definitions ? ids : [], declared, code: `// Store: ${storeName}
|
|
91
|
+
${code.trim()}` });
|
|
91
92
|
} catch (e) {
|
|
92
93
|
console.warn(`[stx] Failed to load store ${file}:`, e);
|
|
93
94
|
}
|
|
94
95
|
if (chunks.length === 0) {
|
|
95
|
-
writeSigned(
|
|
96
|
+
writeSigned(_cachedStoreChunks, cacheKey, signature, { chunks: [] });
|
|
96
97
|
return null;
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
signature = sourceSignature(storeInputs());
|
|
100
|
+
const built = { chunks };
|
|
101
|
+
writeSigned(_cachedStoreChunks, cacheKey, signature, built);
|
|
102
|
+
return built;
|
|
103
|
+
}
|
|
104
|
+
function assembleStoreScript(chunks) {
|
|
105
|
+
const declaredNames = new Set;
|
|
106
|
+
for (const chunk of chunks)
|
|
107
|
+
for (const name of chunk.declared)
|
|
108
|
+
declaredNames.add(name);
|
|
109
|
+
const joinedChunks = chunks.map((chunk) => chunk.code).join(`
|
|
99
110
|
|
|
100
111
|
`), assembled = `;(function(){
|
|
101
112
|
var __stx = window.stx || {};
|
|
102
113
|
${STX_RUNTIME_GLOBALS.filter((name) => !declaredNames.has(name) && new RegExp(`\\b${name}\\b`).test(joinedChunks)).map((name) => `var ${name} = __stx[${JSON.stringify(name)}];`).join(`
|
|
103
114
|
`)}
|
|
104
115
|
${joinedChunks}
|
|
105
|
-
})()
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
})();`;
|
|
117
|
+
return isProduction() ? minifyClassicScript(assembled) : assembled;
|
|
118
|
+
}
|
|
119
|
+
const _assembledStoreScripts = new WeakMap;
|
|
120
|
+
export async function getStoreScript(storesDir) {
|
|
121
|
+
const built = await loadStoreChunks(storesDir);
|
|
122
|
+
if (!built)
|
|
123
|
+
return null;
|
|
124
|
+
let code = _assembledStoreScripts.get(built);
|
|
125
|
+
if (code === void 0) {
|
|
126
|
+
code = assembleStoreScript(built.chunks);
|
|
127
|
+
_assembledStoreScripts.set(built, code);
|
|
128
|
+
}
|
|
108
129
|
return code;
|
|
109
130
|
}
|
|
131
|
+
export function storesRead(...sources) {
|
|
132
|
+
const names = new Set;
|
|
133
|
+
let all = !1;
|
|
134
|
+
for (const source of sources) {
|
|
135
|
+
if (!source)
|
|
136
|
+
continue;
|
|
137
|
+
if (/__STX_STORES__|\b_stores\b/.test(source))
|
|
138
|
+
all = !0;
|
|
139
|
+
const calls = source.match(/\buseStore\s*(?:<[^>()]*>)?\(/g)?.length ?? 0;
|
|
140
|
+
if (calls === 0)
|
|
141
|
+
continue;
|
|
142
|
+
let literal = 0;
|
|
143
|
+
for (const match of source.matchAll(/\buseStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g)) {
|
|
144
|
+
names.add(match[2]);
|
|
145
|
+
literal++;
|
|
146
|
+
}
|
|
147
|
+
if (literal !== calls)
|
|
148
|
+
all = !0;
|
|
149
|
+
}
|
|
150
|
+
return { names, all };
|
|
151
|
+
}
|
|
152
|
+
export async function getStoreScriptFor(storesDir, usedBy, options = {}) {
|
|
153
|
+
const built = await loadStoreChunks(storesDir, options.sharedModules);
|
|
154
|
+
if (!built)
|
|
155
|
+
return null;
|
|
156
|
+
const { chunks } = built, wanted = storesRead(...usedBy);
|
|
157
|
+
let kept;
|
|
158
|
+
if (wanted.all || chunks.some((chunk) => chunk.ids.length === 0))
|
|
159
|
+
kept = chunks;
|
|
160
|
+
else {
|
|
161
|
+
const byId = new Map;
|
|
162
|
+
for (const chunk of chunks)
|
|
163
|
+
for (const id of chunk.ids)
|
|
164
|
+
byId.set(id, chunk);
|
|
165
|
+
const included = new Set, queue = [...wanted.names];
|
|
166
|
+
let everything = !1;
|
|
167
|
+
while (queue.length > 0 && !everything) {
|
|
168
|
+
const chunk = byId.get(queue.pop());
|
|
169
|
+
if (!chunk || included.has(chunk))
|
|
170
|
+
continue;
|
|
171
|
+
included.add(chunk);
|
|
172
|
+
const next = storesRead(chunk.code);
|
|
173
|
+
if (next.all)
|
|
174
|
+
everything = !0;
|
|
175
|
+
else
|
|
176
|
+
queue.push(...next.names);
|
|
177
|
+
}
|
|
178
|
+
kept = everything ? chunks : chunks.filter((chunk) => included.has(chunk));
|
|
179
|
+
}
|
|
180
|
+
if (kept.length === 0)
|
|
181
|
+
return null;
|
|
182
|
+
return { code: assembleStoreScript(kept), stores: kept.map((chunk) => chunk.name) };
|
|
183
|
+
}
|
|
110
184
|
export function clearStoreCache() {
|
|
111
|
-
|
|
185
|
+
_cachedStoreChunks.clear();
|
|
112
186
|
clearSourceSignatures();
|
|
113
187
|
}
|
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.759",
|
|
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.759",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.759",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.759",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.759",
|
|
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-1gan06yr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ml,Ki,hl,yl,Gi,bl,vl,wl,xl,Xi,Sl,Rg}from"./chunk-7r5vhqtz.js";import{ra,$l}from"./chunk-0dt7ax79.js";import{Q,ee,te,In,me,Ee,Hr,pt,qt,On,Nn,Dn,ne,Mn,Ln,Vr}from"./chunk-0md73jp8.js";import{Yl}from"./chunk-81ysx0tc.js";import"./chunk-q0f28539.js";export{ee as DEFAULT_FORMATS,te as DEFAULT_QUALITY,Q as DEFAULT_WIDTHS,Vr as ImageProcessingError,yl as clearImageCache,Gi as createImageDirective,$l as createImageHandler,vl as createImagePlugin,Rg as defaultImageConfig,Ln as formatSize,Xi as generateImageManifest,qt as generateSizes,pt as generateSrcSet,On as getFallbackVariant,Hr as getImageMetadata,ne as getMimeType,Mn as getTotalSize,Nn as groupVariantsByFormat,ra as handleImageRequest,bl as imageDirective,me as isImageBackendAvailable,Dn as isImageFile,In as isSharpAvailable,xl as optimizeDirectory,wl as optimizeImage,Ki as parseImageComponent,Ee as processImage,hl as processImageComponents,ml as renderImageComponent,Yl as rewriteImagesWithSiblings,Sl as writeImageManifest};
|
package/dist/chunk-1menbxwb.js
DELETED
package/dist/chunk-1n2d3cy5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kl,Ji,Ag,_l,Cl,Pg,Ig}from"./chunk-zqmvhg37.js";import"./chunk-m0shnhth.js";import"./chunk-h6sewvt2.js";import"./chunk-txgd0sj1.js";import"./chunk-19safa6y.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import{At,jf}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{kl as buildVirtualSource,At as extractScriptBlocks,jf as extractTemplateExpressions,_l as findRuntimeTypeDeclarations,Cl as findStxModuleDeclarations,Ig as formatTypecheckDiagnostics,Ag as sourcePathFor,Pg as typecheckStxFiles,Ji as virtualPathFor};
|
package/dist/chunk-2vc2pkyz.js
DELETED
package/dist/chunk-33bp9m4c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qn,i}from"./chunk-thr1m7k7.js";import"./chunk-x5sy0tym.js";import"./chunk-41sq06t2.js";import"./chunk-8wbgq43c.js";import"./chunk-j5p191zq.js";import"./chunk-gzbmfwxr.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-kjfzkac7.js";import{be}from"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-xzz36k99.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import{Ie,Os,Ns}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{Qn as buildModulesTag,be as injectRouterScript,i as processDirectives,Os as processJsonDirective,Ns as processOnceDirective,Ie as validateClientScript};
|
package/dist/chunk-361yezje.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qs,Wi,jr,eo,to,Tn,Wt,qi,Br,Fr,no,ro,Tg,$g,ut}from"./chunk-0vvb78yj.js";export{ut as DeployError,Wi as calculateSha1,jr as collectDeployFiles,Fr as createDefaultNetlifyConfig,eo as createFileManifest,Qs as createNetlifyClient,Tg as deploy,Br as detectProjectConfig,to as filterRequiredFiles,Tn as formatSize,qi as generateNetlifyToml,Wt as getTotalSize,ro as hasNetlifyConfig,$g as initNetlify,no as writeNetlifyConfig};
|
package/dist/chunk-45cvagp1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rl,Gg,Al,Pl,Xg,Jg}from"./chunk-5q2tfrcw.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{Jg as applySlots,Xg as extractSlotContent,Gg as parseSlotElement,Rl as parseSlots,Pl as processSlots,Al as renderSlot};
|
package/dist/chunk-5f0wwwmw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{we,oi,ii,qf,Ot,Mc,ai,Lc,_h,De,hn,Me}from"./chunk-8w0cwcvk.js";import{Vc,s}from"./chunk-g45p4y4v.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{we as BROWSER_CORE_IMPORTS,qf as STX_AUTO_IMPORTS,oi as extractAndStripCssImports,De as extractBridgeData,Vc as findInterpolationEnd,Lc as generateAutoImportDestructuring,_h as generateBrowserAutoImportDestructuring,hn as generateServerDataBridge,Ot as injectBrowserCoreAutoImports,Me as processClientScript,ai as referencesName,ii as renderVendorStyleTags,s as stripCommentsAndLiterals,Mc as transformAutoImports};
|
package/dist/chunk-5h71xbzk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ti,$i,Ri,Sg,Ai,Pi,kg,Ii,Oi,pl,_g}from"./chunk-1tmq09ch.js";export{Ti as VideoProcessorCache,pl as analyzeVideo,Sg as clearVideoCache,Oi as generateDASHManifest,Ii as generateHLSManifest,Ai as generatePoster,kg as generateSpriteSheet,Pi as generateThumbnails,$i as getCachedVideoResult,_g as processVideo,Ri as setCachedVideoResult};
|
package/dist/chunk-5z9a1vzw.js
DELETED
package/dist/chunk-67jf2e8x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Q,ee,te,In,me,Ee,Hr,Il,pt,qt,On,Nn,Dn,ne,Mn,Ln,Vr}from"./chunk-0md73jp8.js";import"./chunk-q0f28539.js";export{ee as DEFAULT_FORMATS,te as DEFAULT_QUALITY,Q as DEFAULT_WIDTHS,Vr as ImageProcessingError,Ln as formatSize,qt as generateSizes,pt as generateSrcSet,On as getFallbackVariant,Hr as getImageMetadata,ne as getMimeType,Mn as getTotalSize,Nn as groupVariantsByFormat,me as isImageBackendAvailable,Dn as isImageFile,In as isSharpAvailable,Ee as processImage,Il as resizeAndConvert};
|
package/dist/chunk-6b7je8dc.js
DELETED
package/dist/chunk-6fxjs3ay.js
DELETED
package/dist/chunk-6n5jnd97.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{fl,gl}from"./chunk-mpmx0n3q.js";import"./chunk-g223zsce.js";import"./chunk-6ywa41tr.js";import"./chunk-0vvb78yj.js";import"./chunk-7r5vhqtz.js";import"./chunk-zqmvhg37.js";import"./chunk-fxftc455.js";import"./chunk-fmxtnva8.js";import"./chunk-0dsykna3.js";import"./chunk-4zta7ay1.js";import"./chunk-0dt7ax79.js";import"./chunk-bkkwdh13.js";import"./chunk-5wcgg5t4.js";import"./chunk-5q2tfrcw.js";import"./chunk-0md73jp8.js";import"./chunk-0fweckq5.js";import"./chunk-7djnbbeb.js";import"./chunk-8wbcy0cn.js";import"./chunk-81ysx0tc.js";import"./chunk-j3d9zknp.js";import"./chunk-9r3ehqtx.js";import"./chunk-73b6sst8.js";import"./chunk-qxrsm48h.js";import"./chunk-nzy4set0.js";import"./chunk-fa3ygt8c.js";import"./chunk-4fc8zs15.js";import"./chunk-ppvdbstz.js";import"./chunk-m0shnhth.js";import"./chunk-90gx5qxn.js";import"./chunk-j2hm8v8b.js";import"./chunk-q0f28539.js";import"./chunk-z5kdmget.js";import{Yt}from"./chunk-np8knskz.js";import"./chunk-h6sewvt2.js";import"./chunk-txgd0sj1.js";import"./chunk-19safa6y.js";import{Re,i}from"./chunk-thr1m7k7.js";import"./chunk-x5sy0tym.js";import"./chunk-41sq06t2.js";import"./chunk-8wbgq43c.js";import"./chunk-j5p191zq.js";import"./chunk-gzbmfwxr.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-kjfzkac7.js";import{be}from"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import{ar,cr}from"./chunk-xzz36k99.js";import{ps,j,a}from"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import{m,Me}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";import"./chunk-vpa4xzz3.js";import"./chunk-1tmq09ch.js";export{ps as buildWebComponents,cr as cacheTemplate,ar as checkCache,Yt as classifyAllScripts,fl as createMiddleware,gl 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-6wvnfdqq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nu,fo,Wn,ru,su,ou,iu,au,cu,lu,uu,du,pu,fu,gu,mu,hu,yu,bu,vu,wu,xu,Su,ku,_u,Cu,Eu,Tu,$u,Ru,Au,Pu,Iu,Ou,Nu,Du,Mu,Lu,ju,Bu,Fu,zu,Hu,Vu,Uu,Wu,qu,Ku,Gt,va,Gu,Xu,Ju,wa,Yu,Zu,Qu,ed,td,nd,xa,rd,sd,od,id,ad,cd,ld,ud,dd,qn,pd,fd,gd,md,hd,yd,bd,vd,wd,xd,Sd,kd,go,_d,Cd,Ed,Td,$d,Gr,Rd,Ad,Pd,Id,Od,Sa,Nd,Dd,Md,ka,mo,Ld,jd,_a,Ca,Xr,Ea,Bd,Xt,Fd,Ta,$a,ho,zd,yo,Hd,Vd,Ud,Wd,qd,Kd,Gd,Ra,Xd,Jd,Aa,Yd,Zd,Qd,ep,tp,np,rp,sp,op,ip,ap,cp,lp,up,dp,pp,fp,gp,mp,hp,yp,bp,vp,wp,Pa,xp,Sp,kp,_p,Cp,Ep,Tp,$p,Rp,Ap,Pp,Kn,Ia,Oa,Ip,Gn,Op,Np,Dp,Na,Da,Jr,Yr,Mp,bo,Lp,jp,Bp,Fp,zp,Hp,Vp,Up,Wp,qp,Kp,Gp,Xp,Jp,Yp,Zp,Qp,ef,tf,nf,Ma,rf,sf,La,ja,of,af}from"./chunk-5evgz54v.js";export{qu as AVAILABLE_COMPONENTS,Sa as AutoUpdater,Ku as COMPONENT_STYLES,Jr as DEFAULT_WATCH_INTERVAL_MS,Da as MAX_WATCH_INTERVAL_MS,Na as MIN_WATCH_INTERVAL_MS,nd as MODAL_STYLES,du as TOAST_STYLES,ld as TRAY_MENU_STYLES,_a as UPDATE_MANIFEST_ASSET,Zu as alert,yp as appInfo,Hp as appleScript,af as applicationDataDirectory,zp as audio,sf as backgroundDelay,fp as battery,Fp as biometric,Ap as bluetooth,Kp as bonjour,Xt as bundlePathForExecutable,zd as caffeinate,Nd as canReplaceBundle,Dd as clearQuarantine,sp as clipboard,td as closeAllModals,kd as closeAllWindows,Yu as confirm,wp as contextMenu,Qp as continuityCamera,Zp as coreml,Id as craftBinaryNotFoundMessage,go as craftWindowArguments,Kn as crashReporter,Nu as createAccordion,Tu as createAutocomplete,bu as createAvatar,yu as createBadge,pu as createButton,vu as createCard,zu as createChart,gu as createCheckbox,Au as createChip,Hu as createCodeEditor,_u as createColorPicker,Fu as createDataGrid,Cu as createDatePicker,xu as createDropdown,Uu as createFileExplorer,Bd as createGitHubUpdateManifest,Ea as createGitHubUpdater,Ru as createImageView,ep as createInterval,$u as createLabel,Lu as createListView,Vu as createMediaPlayer,rd as createMenubar,Mu as createModalComponent,of as createNativeUpdateApi,ja as createPantrySelfUpdater,qd as createPreferences,hu as createProgressBar,ku as createRadioButton,Su as createRating,Iu as createScrollView,ho as createSelfUpdater,mu as createSlider,Ou as createSplitView,Du as createStepper,xa as createSystemTray,ju as createTable,wu as createTabs,fu as createTextInput,Eu as createTimePicker,Qd as createTimer,Pu as createTooltip,Bu as createTreeView,Wu as createWebView,_d as createWindow,Ed as createWindowWithHTML,yo as decaffeinate,pp as deepLinks,tp as delay,cu as dismissAlertById,lu as dismissAllAlerts,up as dragOut,Md as extractBundle,Vp as fileAssociations,bo as focus,jp as focusShortcutsReady,rp as formatCompact,Wd as formatDuration,Ud as formatRemainingTime,Xd as formatShortcut,np as formatTime,ip as fs,ka as generateUpdateManifest,uu as getActiveAlertCount,ed as getActiveModalCount,sd as getActiveTrayInstances,xd as getActiveWindowIds,Vd as getCaffeinateStatus,nf as getCapabilities,Ma as getCapability,vd as getDesktopConfig,yd as getDialogBridgeScript,Zd as getRegisteredHotkeys,ad as getSimulatedTrayHTML,cd as getTrayBridgeScript,od as getTrayInstance,Sd as getWindow,$d as getWindowBridgeScript,Ca as githubLatestAssetUrl,Xr as githubReleaseAssetUrl,cp as globalShortcuts,Gn as handoff,Lp as hasFocusShortcuts,Ip as iap,Gd as isAutoLaunchEnabled,rf as isAvailable,Hd as isCaffeinated,dp as isDragOutAvailable,Td as isWebviewAvailable,kp as keychain,Op as liveActivities,Bp as localServer,Np as location,qp as log,Rd as macOSRuntimeExecutablePath,vp as menu,Yp as midi,Ep as nativeAutoLaunch,Tp as nativeTray,$p as nativeWindow,gp as network,op as notifications,au as notify,Cd as openDevWindow,Ad as pack,Pd as packageApp,La as parsePantryUpdateManifest,Ra as parseShortcut,Wp as pdf,_p as permissions,Cp as printing,Qu as prompt,Ta as quitLauncher,mo as readBundleIdentity,Ia as redactPII,Jd as registerHotkey,$a as relaunchBundle,nu as requestNotificationPermission,wd as resetDesktopConfig,Od as resolveCraftBinary,Gr as resolveCraftExecutablePath,Fd as runningBundleTeamId,Sp as screen,Dp as screenCapture,Yr as screenSharing,tf as serial,ef as serviceMenu,Kd as setAutoLaunch,bd as setDesktopConfig,ap as shell,fo as showAlert,fd as showAlertDialog,pd as showColorPicker,gd as showConfirmDialog,md as showErrorDialog,Xu as showErrorModal,iu as showErrorToast,va as showInfoModal,ru as showInfoToast,qn as showMessageBox,Gt as showModal,ud as showOpenDialog,wa as showQuestionModal,dd as showSaveDialog,Ju as showSuccessModal,su as showSuccessToast,Wn as showToast,hd as showWarningDialog,Gu as showWarningModal,ou as showWarningToast,Pa as sidebar,Oa as signPayload,Pp as speech,Xp as speechRecognition,Gp as spotlight,bp as standardMenus,Ld as swapBundle,xp as system,Up as tags,lp as theme,Rp as touchbar,id as triggerTrayAction,Yd as unregisterAllHotkeys,Aa as unregisterHotkey,mp as updater,jd as verifyBundleTrust,Jp as vision,Mp as watchScreenSharing,hp as windowEvents};
|
package/dist/chunk-78jkbaz3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ll,jl,Bl,Fl,zl,Hl,Vl,Ul,Wl,ql,Zg}from"./chunk-7djnbbeb.js";export{Ll as createIslandRegistry,Zg as default,ql as generateIslandManifest,Bl as generatePartialHydrationCSS,Hl as hydrateAll,zl as hydrateByStrategy,Fl as hydrateIsland,Vl as isHydrated,Ul as onHydrated,jl as processPartialHydrationDirectives,Wl as processStaticDirectives};
|
package/dist/chunk-7e9hfrtb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lh,os,Oo,is,sr,No,Do,as,cs,ls,Mo,Ya,kf,yt}from"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import{z}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{lh as clearScriptScanCache,as as convertServerLoopAttributesToDirectives,No as convertSignalDirectivesToAttributes,cs as convertSignalLoopsToAttributes,sr as extractClientSignalNames,z as extractExports,Ya as findMarkupIndexOutsideScripts,is as hasSignalsSyntax,Oo as parseLoopExpression,Do as preEvalLiteralReactiveIfs,ls as processScriptSetup,Mo as processSignals,kf as rewriteStxImportSpecifiers,os as scanScriptTags,yt as stripStxRuntimeImports};
|
package/dist/chunk-7tc5fj96.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Eg}from"./chunk-6ywa41tr.js";import"./chunk-0dsykna3.js";import"./chunk-np8knskz.js";import"./chunk-txgd0sj1.js";import"./chunk-6fxjs3ay.js";import"./chunk-024m1xmd.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{Eg as startProductionServer};
|
package/dist/chunk-82q0fy52.js
DELETED
package/dist/chunk-8q5ec4s1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ao,Bm,Fm}from"./chunk-m0shnhth.js";import"./chunk-h6sewvt2.js";import"./chunk-txgd0sj1.js";import"./chunk-19safa6y.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{Fm as clearComposableCache,Bm as getComposableScript,ao as listComposableModules};
|
package/dist/chunk-8ysk095d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{gt,Fn,zm}from"./chunk-90gx5qxn.js";import{le,zn,Hm,Hn,co,Ur,Wr,Vm,Um,Wm,Vn,Un,lo,qr,qm}from"./chunk-df8cbgf0.js";import"./chunk-236bdf7y.js";export{co as batch,zm as default,zn as derived,Hn as effect,gt as generateSignalsRuntime,Fn as generateSignalsRuntimeDev,Un as isDerived,Vn as isSignal,Hm as memo,Wr as onDestroy,Ur as onMount,qr as peek,Wm as pendingLifecycleCounts,Um as runDestroyCallbacks,Vm as runMountCallbacks,le as state,lo as untrack,qm as useOptimistic};
|
package/dist/chunk-9vbrj55v.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dg,Mg,Lg,jg,Tl,Bg,Fg,zg,Hg,Vg,Ug,Wg}from"./chunk-4zta7ay1.js";export{Ug as Broadcast,Wg as BroadcastServer,Tl as broadcast,Hg as broadcastPresence,zg as broadcastPrivate,Vg as channel,Dg as getBroadcastServer,jg as loadChannels,Mg as startBroadcasting,Lg as stopBroadcasting,Bg as toUser,Fg as toUsers};
|
package/dist/chunk-bcefawtc.js
DELETED
package/dist/chunk-bd6s91p9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qg}from"./chunk-bkkwdh13.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{qg as buildApp};
|
package/dist/chunk-bhkqzz91.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{j,Tf,Bo,a,P,yh,bh}from"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{P as config,j as defaultConfig,yh as defineStxConfig,Bo as discoverConfig,a as loadStxConfig,Tf as resolveStxDirectories,bh as validateConfig};
|
package/dist/chunk-bx1mjwhb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Sf,ss}from"./chunk-gzbmfwxr.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-nsjkmpjf.js";import{wr}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import{nt}from"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{nt as freeIdentifiers,ss as processComponents,Sf as processESImports,wr as rendersAsElement};
|
package/dist/chunk-dw0m259e.js
DELETED
package/dist/chunk-dx4g2ec9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{mn,Bf,Ff,zf,Hf,Vf,m,Uf,si,Wf,Nc,Dc}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{mn as STX_ENGINE_BINDING_NAMES,si as convertToCommonJS,Nc as extractScriptFromTemplate,m as extractVariables,Dc as hasVariables,Uf as isCompleteImport,Vf as isMissingBindingFailure,zf as isModuleResolutionFailure,Hf as isSyntaxFailure,Wf as splitDeclaration,Bf as stripTypeScript,Ff as withoutStxReferrer};
|
package/dist/chunk-evdskc25.js
DELETED
package/dist/chunk-gppv6fez.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ho,Vo,Uo,Wo,hs,ys,vh,wh,xh,Sh,bs,kh}from"./chunk-3z38swhv.js";import"./chunk-0tgrqhkr.js";export{kh as generateDefaultRobotsTxt,bs as generateRobotsTxt,wh as generateSitemap,xh as generateSitemapIndex,Wo as injectSeoTags,hs as metaDirective,Ho as processMetaDirectives,Uo as processSeoDirective,Vo as processStructuredData,vh as registerSeoDirectives,Sh as scanForSitemapEntries,ys as structuredDataDirective};
|
package/dist/chunk-grjr8shp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_f,uh,dh,ph,fh,Cf,Ef,gh,mh,jo,hh,ar,cr,ds}from"./chunk-xzz36k99.js";import{et}from"./chunk-j2mpqa4p.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{fh as __setSignalsGeneratorsForTest,et as cacheEngineFingerprint,cr as cacheTemplate,ar as checkCache,hh as clearDevCaches,Ef as getCachedRouterScript,Cf as getCachedSignalsRuntime,gh as getServeClientAsset,jo as getServeModuleBundle,ds as hashFilePath,dh as invalidateFileCache,ph as invalidateFileCacheByDir,uh as readFileCached,mh as registerServeModuleBundle,_f as templateCache};
|
package/dist/chunk-gz1w4cpp.js
DELETED
package/dist/chunk-h0qtmmq3.js
DELETED
package/dist/chunk-h6sewvt2.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Zn,$e}from"./chunk-19safa6y.js";import{z,w,hr,$s,C}from"./chunk-8w0cwcvk.js";import{a,P}from"./chunk-g5sctfwa.js";import{ko}from"./chunk-txgd0sj1.js";import{et}from"./chunk-j2mpqa4p.js";import{l}from"./chunk-7ycf8a8d.js";import{s,ge}from"./chunk-g45p4y4v.js";import d from"path";import v from"fs";import{AsyncLocalStorage as ht}from"async_hooks";import{randomUUID as xt}from"crypto";var $t=11;function X(t,e,n){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(d.basename(t))||ko(t,e,n)}var at=2;function cf(t){let e=process.env.STX_BUNDLE_CACHE_DIR?.trim();return e?d.resolve(e):l(t,"bundle-cache")}function st(t,e){let n=t;for(let i of yt(e))if(i!==d.sep)n=n.split(i).join("\x00root");return n}var rt=new Map;function yt(t){let e=d.resolve(t),n=rt.get(e);if(!n){let i=e;try{i=v.realpathSync(e)}catch{}n=[...new Set([e,i])].sort((u,m)=>m.length-u.length),rt.set(e,n)}return n}function bt(t,e){try{let n=v.statSync(t),i=d.resolve(e),u=t.startsWith(`${i}${d.sep}`);return{path:u?d.relative(i,t):t,...u?{inRoot:!0}:{},mtimeMs:n.mtimeMs,size:n.size,hash:Bun.hash(v.readFileSync(t)).toString(36)}}catch{return null}}function ct(t,e){return t.inRoot?d.join(d.resolve(e),t.path):t.path}function wt(t,e){for(let n of t){let i=ct(n,e);try{let u=v.statSync(i);if(u.size!==n.size)return!1;if(u.mtimeMs!==n.mtimeMs&&Bun.hash(v.readFileSync(i)).toString(36)!==n.hash)return!1}catch{return!1}}return!0}var lt=new Map,St=100;function lf(t=process.env){let e=Number(t.STX_BUNDLE_CACHE_LIMIT);return Number.isFinite(e)&&e>=1?Math.floor(e):2000}var G=new Map;async function vt(t){let e=G.get(t)??0;if(e>0&&e<St){G.set(t,e+1);return}G.set(t,1);try{let n=(await v.promises.readdir(t)).filter((c)=>c.endsWith(".js")),i=lf();if(n.length<=i)return;let m=(await Promise.all(n.map(async(c)=>{try{return{name:c,at:(await v.promises.stat(d.join(t,c))).mtimeMs}}catch{return null}}))).filter((c)=>c!==null);m.sort((c,y)=>y.at-c.at);for(let c of m.slice(i)){let y=c.name.slice(0,-3);await v.promises.rm(d.join(t,`${y}.js`),{force:!0}),await v.promises.rm(d.join(t,`${y}.deps.json`),{force:!0})}D("pruned bundle cache to",i,"entries")}catch{}}function Te(t){return lt.get(t)??[]}function q(t,e){if(t)lt.set(t,e)}function uf(t=process.env){return t.STX_DEBUG==="true"||t.STX_DEBUG==="1"}function D(...t){if(uf())console.log("[stx:bundler]",...t)}var Y=[];function Ua(t,e,n){Y.push({filePath:t||"<inline>",message:e,details:n})}function Zt(){return Y.slice()}function Qt(){Y.length=0}var Z;function Qm(t){Z=t}function Wa(){if(Z)return Z;try{let t=P.strict;return typeof t==="object"&&t!==null?t.bundlerFallback??"warn":"warn"}catch{return"warn"}}var Q=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function en(t){let e=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,n;while((n=e.exec(t))!==null){let u=n[1];if(!Q.some((c)=>c.test(u)))return D("detected user import:",u),!0}let i=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((n=i.exec(t))!==null){let u=n[1];if(/\.css(?:\?.*)?$/.test(u))continue;if(!Q.some((c)=>c.test(u)))return D("detected side-effect import:",u),!0}return!1}var Yn="stx-module:",jt=/\.(?:[cm]?[jt]sx?|json)$/i;function df(t,e){return d.relative(t,e).split(d.sep).join("/")}function pf(t,e){if(e.size===0)return t;return t.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(n,i,u,m)=>{let c=e.get(m);return c&&!m.startsWith(Yn)?`${i}${u}${c}${u}`:n})}function ff(t,e){let n=0,i=(m)=>{let c=`__stxMod${n++}`,y=JSON.stringify(m);return e.push(`var ${c} = globalThis.__stxModules && globalThis.__stxModules[${y}];`,`if (${c} === undefined) throw new Error("[stx] module " + ${JSON.stringify(y)} + " is not registered on this page (#1957)");`),c},u=(m,c)=>{for(let y of m.split(",")){let R=y.trim();if(!R)continue;let j=R.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!j)continue;let B=j[1].startsWith('"')?JSON.parse(j[1]):j[1],p=j[2]??B;e.push(`var ${p} = ${c}[${JSON.stringify(B)}];`)}};return t=t.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(m,c,y)=>{let R=y.slice(Yn.length),j=i(R),B=c.trim(),p=B.match(/^([\w$]+)\s*(?:,\s*|$)/);if(p&&!B.startsWith("{")&&!B.startsWith("*"))e.push(`var ${p[1]} = ${j}.default;`),B=B.slice(p[0].length).trim();let r=B.match(/^\*\s*as\s+([\w$]+)$/);if(r)e.push(`var ${r[1]} = ${j};`);else if(B.startsWith("{"))u(B.replace(/^\{|\}$/g,""),j);return""}),t=t.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(m,c)=>(i(c.slice(Yn.length)),"")),t}function it(t){let e=[t,`${t}.ts`,`${t}.tsx`,`${t}.js`,`${t}.mjs`,`${t}.jsx`,d.join(t,"index.ts"),d.join(t,"index.tsx"),d.join(t,"index.js"),d.join(t,"index.mjs")];for(let n of e)try{if(v.existsSync(n)&&v.statSync(n,{throwIfNoEntry:!1})?.isFile())return n}catch{}return}var K=new ht;function vo(t,e){let n=new Bun.CryptoHasher("md5");for(let[i,u]of[...t].sort(([m],[c])=>m<c?-1:m>c?1:0))n.update(`${i}\x00${u}\x00`);return K.run({modules:t,key:n.digest("hex").slice(0,12)},e)}function tn(){return K.getStore()?.key??""}function Bt(t,e,n,i,u,m,c=new Map,y,R){let j=(p,r,o)=>{if(X(r,t,y))return null;if(!m||p!==n||!jt.test(r))return null;try{if(!v.statSync(r,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}u.add(r);let b=`${Yn}${df(process.cwd(),r)}`;return c.set(o,b),{path:b,external:!0}},B=(p,r)=>{let o=p===n?e:d.dirname(p),b=d.resolve(o,r);return it(b)??b};return{name:"stx-client-bundle",setup(p){if(p.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(r)=>({path:r.path,external:!0})),p.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(r)=>({path:r.path,external:!0})),p.onResolve({filter:/^\//},(r)=>{if(r.path===n)return{path:n};let o=it(r.path);if(o){let b=j(r.importer,o,r.path);if(b)return b;if(o!==n)u.add(o);return{path:o}}return{path:r.path,external:!0}}),p.onResolve({filter:/^\.\.?\//},(r)=>{let o=B(r.importer,r.path),b=j(r.importer,o,r.path);if(b)return b;return u.add(o),{path:o}}),p.onResolve({filter:/^[@~]\//},(r)=>{let o=d.resolve(t,r.path.slice(2)),b=[o,`${o}.ts`,`${o}.tsx`,`${o}.js`,`${o}.mjs`,`${o}.jsx`,d.join(o,"index.ts"),d.join(o,"index.tsx"),d.join(o,"index.js"),d.join(o,"index.mjs")];for(let x of b)if(v.existsSync(x)&&v.statSync(x,{throwIfNoEntry:!1})?.isFile()){let A=j(r.importer,x,r.path);if(A)return A;return D(`resolved ${r.path[0]}/ import:`,r.path,"\u2192",x),u.add(x),{path:x}}return console.warn(`[stx:bundler] could not resolve ${r.path[0]}/ import:`,r.path),{path:o}}),m)p.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(r)=>{if(r.importer!==n)return;let o=`${Yn}npm:${r.path}`;return c.set(r.path,o),{path:o,external:!0}});p.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(r)=>{if(r.path===n)return{contents:i,loader:"ts"};if(X(r.path,t,y))throw Error(`Server-only API source cannot be imported by a client script: ${r.path}`);let o=d.extname(r.path).toLowerCase(),b=o===".json"?"json":o===".tsx"?"tsx":o===".jsx"?"jsx":o===".ts"||o===".mts"||o===".cts"?"ts":"js";if(r.path!==n)u.add(r.path);let x=R?.get(r.path);if(x!==void 0)return{contents:x,loader:"js"};return{contents:v.readFileSync(r.path,"utf8"),loader:b}})}}}var H=new Map,k=w(64),ot=Symbol.for("stx.client-bundle-build-queue");function gf(t){let e=globalThis,i=(e[ot]??Promise.resolve()).then(t,t);return e[ot]=i.then(()=>{return},()=>{return}),i}async function nn(t,e,n={}){let i=n.projectRoot||process.cwd(),u=(await a(i)).serverApi,m=n.minify??!1,c=n.externalizeUserModules??!0,y=n.expose?.length?[...new Set(n.expose)].sort():void 0,R=n.cacheDir||cf(i),j=K.getStore(),B=new Bun.CryptoHasher("md5");B.update(`${$t}\x00${et()}\x00${JSON.stringify(u??!1)}\x00${c?"registry":"inline"}\x00${y?y.join(","):"*"}\x00${m?"minified":"readable"}\x00${j?.key??""}\x00${st(t,i)}\x00${st(e,i)}`);let p=B.digest("hex").slice(0,12),r=d.join(R,`${p}.js`),o=k.get(r);if(o){if($s(o.files)&&o.files.every((M)=>!X(M.path,i,u))){D("memo hit:",p);let M=o.files.map((O)=>O.path);return q(e,M),n.collectInputs?.push(...M),o.code}k.delete(r),D("memo invalidated by dep change:",p)}let b=d.join(R,`${p}.deps.json`),x=Bun.file(r);if(await x.exists()){let M=Bun.file(b),O=!1,F=null;if(await M.exists())try{let I=JSON.parse(await M.text());if(I.metadataVersion===at&&Array.isArray(I.files)&&wt(I.files,i))F=hr(I.files.map((g)=>ct(g,i))),O=F.length===I.files.length&&!F.some((g)=>X(g.path,i,u))}catch{O=!1}if(O){if(D("cache hit:",p),F)q(e,F.map((T)=>T.path)),n.collectInputs?.push(...F.map((T)=>T.path));let I=await x.text(),g=new Date;if(v.promises.utimes(r,g,g).catch(()=>{}),F)k.set(r,{code:I,files:F});return I}D("cache invalidated by dep change:",p)}let A=H.get(p);if(A){let M=await A;if(n.collectInputs)n.collectInputs.push(...(k.get(r)?.files??[]).map((O)=>O.path));return M}let V=gf(()=>_t(t,e,{projectRoot:i,minify:m,cacheDir:R,hash:p,cachePath:r,depsPath:b,collectInputs:n.collectInputs,externalizeUserModules:c,serverApi:u,expose:y,throwOnFailure:n.throwOnFailure,substitutes:j?.modules}));H.set(p,V);try{return await V}finally{H.delete(p)}}function mf(t){return`${t}-${process.pid}-${xt()}`}async function _t(t,e,n){let{projectRoot:i,minify:u,cacheDir:m,hash:c,cachePath:y,depsPath:R,externalizeUserModules:j}=n,B=l(i,"bundle-tmp"),p=mf(c),r=d.join(i,`.stx-client-${p}.ts`),o=d.join(B,"out",p);v.mkdirSync(o,{recursive:!0});let b=d.dirname(e),x=new Set,A=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,V=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,M=s(t),{depths:O,balanced:F}=ge(M),I=(_)=>!F||O[_]===0,g;while((g=A.exec(M))!==null){if(g[1])continue;if(!I(g.index))continue;if(g[2])g[2].split(",").forEach((_)=>{let f=Et(_);if(f)x.add(f)});else if(g[3])x.add(g[3])}while((g=V.exec(M))!==null){if(g[1])continue;if(!I(g.index))continue;x.add(g[2])}let T=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((g=T.exec(M))!==null){if(!I(g.index))continue;let _=/^\s*['"]([^'"]+)['"]/.exec(t.slice(g.index+g[0].length))?.[1];if(_&&Q.some((f)=>f.test(_)))continue;if(g[1])x.add(g[1]);if(g[2])x.add(g[2]);for(let f of(g[3]??"").split(",")){let S=f.trim();if(!S||/^type\s/.test(S))continue;let L=/\bas\s+(\w+)\s*$/.exec(S)?.[1]??/^\w+$/.exec(S)?.[0];if(L)x.add(L)}}for(let _ of M.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let f of _[1].split(",")){let S=/\bas\s+(\w+)\s*$/.exec(f)?.[1]??/^\s*(\w+)\s*$/.exec(f)?.[1];if(S)x.delete(S)}let ut=x.size>0?`
|
|
3
|
-
export { ${[...x].join(", ")} }`:"";D("bundling:",c,"from:",d.basename(e));let tt=new Set,nt=new Map;try{let _=await Bun.build({entrypoints:[r],outdir:o,target:"browser",format:"esm",minify:u?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[Bt(i,b,r,t+ut,tt,j,nt,n.serverApi,n.substitutes)],define:{"process.env.NODE_ENV":u?'"production"':'"development"',...C()},root:i});if(!_.success){let E=_.logs.filter((N)=>N.level==="error").map((N)=>N.message).join(", ")||`Unable to bundle ${d.basename(e)}`,U=Zn(_.logs,e||void 0);if(console.warn("[stx:bundler] build failed:",E),Ua(e||"",E,U),n.throwOnFailure||Wa()==="error")throw Error(E);return t}let f="";for(let h of _.outputs){f=await h.text();break}let S=[];for(let h of f.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let E of h[1].split(",")){let U=E.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(U){S.push([U[2],U[1]]);continue}let N=E.trim();if(/^[A-Za-z_$][\w$]*$/.test(N))S.push([N,N])}if(n.expose){let h=new Set(n.expose);for(let E=S.length-1;E>=0;E--)if(!h.has(S[E][0]))S.splice(E,1)}let L=[];f=ff(pf(f,nt),L);let dt=f.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(f=f.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),u&&f)try{f=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(f)}catch{}let J=`__stxBundle_${c}`,pt=new Set(z(t,!0).split(",").map((h)=>h.trim())),ft=S.map(([h,E])=>`get ${JSON.stringify(h)}() { return ${E} }${pt.has(h)?`, set ${JSON.stringify(h)}(__stxValue_${E}) { ${E} = __stxValue_${E} }`:""}`).join(", "),mt=S.map(([h])=>`var ${h} = undefined;`).join(`
|
|
4
|
-
`),gt=S.map(([h])=>`${h} = ${J}[${JSON.stringify(h)}];`).join(`
|
|
5
|
-
`);if(f=`${dt.join(`
|
|
6
|
-
`)}
|
|
7
|
-
${mt}
|
|
8
|
-
var ${J} = (function() {
|
|
9
|
-
${L.join(`
|
|
10
|
-
`)}
|
|
11
|
-
${f}
|
|
12
|
-
return { ${ft} };
|
|
13
|
-
})();
|
|
14
|
-
${gt}
|
|
15
|
-
var __stxLiveBindings = typeof __stxLiveBindings === 'undefined' ? {} : __stxLiveBindings;
|
|
16
|
-
Object.keys(${J}).forEach(function(name) {
|
|
17
|
-
if (!Object.prototype.hasOwnProperty.call(__stxLiveBindings, name))
|
|
18
|
-
Object.defineProperty(__stxLiveBindings, name, Object.getOwnPropertyDescriptor(${J}, name));
|
|
19
|
-
});`.trim(),D("bundled:",c,"output:",f.length,"bytes"),x.size>0&&S.length===0)return console.warn(`[stx:bundler] dropped every binding for ${d.basename(e)} (${c}); serving the unbundled source and not caching this result`),t;v.mkdirSync(m,{recursive:!0}),await Bun.write(y,f);let W=hr(tt);return await Bun.write(R,JSON.stringify({metadataVersion:at,files:W.map((h)=>bt(h.path,i)).filter((h)=>h!==null)})),q(e,W.map((h)=>h.path)),n.collectInputs?.push(...W.map((h)=>h.path)),k.set(y,{code:f,files:W}),await vt(m),f}catch(_){let f=Zn(_,e||void 0),S=$e(_,e||void 0);if(console.warn(`[stx:bundler] error: ${S}`),Ua(e||"",S,f),n.throwOnFailure||Wa()==="error")throw _;return t}finally{try{v.rmSync(o,{recursive:!0,force:!0})}catch{}}}function Et(t){let e=t.trim();if(!e)return null;let n=e.indexOf("=");if(n!==-1)e=e.slice(0,n).trim();let i=e.indexOf(":");if(i!==-1)e=e.slice(i+1).trim();if(e.startsWith("..."))e=e.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(e)?e:null}
|
|
20
|
-
export{cf,lf,Te,uf,Ua,Zt,Qt,Qm,Wa,en,Yn,df,pf,ff,vo,tn,gf,nn,mf};
|
package/dist/chunk-hb34m4pp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{tm,ca,Zl,nm,rm,sm,om,im,Ql,eu,am,cm,lm,um}from"./chunk-j3d9zknp.js";import"./chunk-thr1m7k7.js";import"./chunk-x5sy0tym.js";import"./chunk-41sq06t2.js";import"./chunk-8wbgq43c.js";import"./chunk-j5p191zq.js";import"./chunk-gzbmfwxr.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-xzz36k99.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{Zl as SUSPENSE_RESOLVER_RUNTIME,ca as buildSuspenseResolveScript,im as createStreamRenderer,sm as extractStreamBoundaries,um as generateHydrationRuntime,eu as islandDirective,cm as processSectionDirectives,rm as processStreamDirectives,am as registerStreamingDirectives,nm as renderStreamingPage,tm as streamTemplate,om as streamTemplateSimple,lm as streamToResponse,Ql as streamingSuspenseDirective};
|
package/dist/chunk-hwvtpx3p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qr,rr,wf}from"./chunk-8wbgq43c.js";import"./chunk-v0s52tmv.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import{Rt}from"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{wf as declareBareLoopHead,Rt as parseLoopBinding,rr as processLoops,Qr as reportDeferredLoopWarnings};
|
package/dist/chunk-k3kav39s.js
DELETED
package/dist/chunk-k46j2maz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{fa,ga,ma,ha,Ym}from"./chunk-vc4jww9y.js";import"./chunk-5evgz54v.js";import"./chunk-j2hm8v8b.js";import"./chunk-q0f28539.js";import"./chunk-thr1m7k7.js";import"./chunk-x5sy0tym.js";import"./chunk-41sq06t2.js";import"./chunk-8wbgq43c.js";import"./chunk-j5p191zq.js";import"./chunk-gzbmfwxr.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-kjfzkac7.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-xzz36k99.js";import"./chunk-g5sctfwa.js";import"./chunk-p33w8zst.js";import"./chunk-m6w75sq2.js";import"./chunk-cb4ybh7g.js";import"./chunk-3z38swhv.js";import"./chunk-k4dn3ry6.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{fa as buildNative,Ym as default,ga as findCraftBinary,ha as getAvailableFormats,ma as getAvailableTargets};
|
package/dist/chunk-ka2f844k.js
DELETED
package/dist/chunk-kh4dr6gd.js
DELETED
package/dist/chunk-myd82d80.js
DELETED