@stacksjs/stx 0.2.905 → 0.2.908
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/app-shell.d.ts +1 -1
- package/dist/app-shell.js +1 -1
- package/dist/{chunk-n3fgrsva.js → chunk-0d3pkkrv.js} +2 -2
- package/dist/{chunk-fhb86pc9.js → chunk-0ek3s3b6.js} +150 -149
- package/dist/{chunk-qt2mr3f0.js → chunk-0mxkw6m6.js} +14 -9
- package/dist/{chunk-9y83pdcb.js → chunk-0vyytd9v.js} +3 -3
- package/dist/{chunk-4d6p92qh.js → chunk-13awnyq0.js} +1 -1
- package/dist/chunk-14497kj1.js +2 -0
- package/dist/chunk-1dc6h93m.js +2 -0
- package/dist/{chunk-ffytbb4x.js → chunk-1ezcxbpg.js} +5 -5
- package/dist/{chunk-eb5v9npc.js → chunk-1hx6dyy9.js} +2 -2
- package/dist/{chunk-a7bqrjm5.js → chunk-1jxkc6d0.js} +2 -2
- package/dist/{chunk-db7h6mgq.js → chunk-1pdntpwe.js} +4 -4
- package/dist/{chunk-vw6qytwm.js → chunk-1x0wcskp.js} +4 -4
- package/dist/chunk-20hy5p3p.js +2 -0
- package/dist/chunk-2fyey6pn.js +2 -0
- package/dist/chunk-2jkq15je.js +2 -0
- package/dist/{chunk-eb5cma4b.js → chunk-2m4d8jkv.js} +2 -2
- package/dist/{chunk-p89rpak1.js → chunk-2qk2ppgm.js} +1 -1
- package/dist/{chunk-arfpzf17.js → chunk-357qjcj1.js} +2 -2
- package/dist/{chunk-edpsk4bg.js → chunk-3m457a9q.js} +9 -9
- package/dist/{chunk-ng09dc4e.js → chunk-3npzxjr4.js} +2 -2
- package/dist/chunk-3qneemwh.js +2 -0
- package/dist/{chunk-nc5d3a5r.js → chunk-3syagjd7.js} +5 -5
- package/dist/chunk-43kz6rx9.js +2 -0
- package/dist/{chunk-bzndm04n.js → chunk-45326z5v.js} +2 -2
- package/dist/{chunk-zrvgr3hz.js → chunk-4ajsp5dp.js} +15 -15
- package/dist/{chunk-hdfhaddy.js → chunk-4b110x6r.js} +2 -2
- package/dist/chunk-4ge69wvr.js +2 -0
- package/dist/{chunk-xwzefw2r.js → chunk-4hrryats.js} +2 -2
- package/dist/chunk-4jmztn9d.js +2 -0
- package/dist/{chunk-rgrzmr35.js → chunk-59bbk5gx.js} +5 -5
- package/dist/{chunk-az1eczs2.js → chunk-5baag5dz.js} +7 -7
- package/dist/{chunk-pwpge9bj.js → chunk-5jc9hmwg.js} +2 -2
- package/dist/{chunk-ern5hyvr.js → chunk-5jn2qyv7.js} +1 -1
- package/dist/chunk-6756txp1.js +2 -0
- package/dist/{chunk-vtc9zmp6.js → chunk-69wpv1pr.js} +6 -6
- package/dist/chunk-6mw288vd.js +2 -0
- package/dist/{chunk-ayady5ws.js → chunk-6w9av0n9.js} +2 -2
- package/dist/{chunk-hnjeqxqy.js → chunk-6yketqa1.js} +2 -2
- package/dist/{chunk-5yvgzh6n.js → chunk-72pbhpq8.js} +2 -2
- package/dist/chunk-7hgqyea0.js +2 -0
- package/dist/chunk-7k1thytm.js +2 -0
- package/dist/chunk-7m5rpqjy.js +2 -0
- package/dist/chunk-7xpez9tc.js +2 -0
- package/dist/chunk-8f5x16ht.js +2 -0
- package/dist/{chunk-vfctk20v.js → chunk-8n42epb6.js} +3 -3
- package/dist/{chunk-k3ytyhkr.js → chunk-8p3vqt2q.js} +3 -3
- package/dist/{chunk-p92272k0.js → chunk-8tfpv6zf.js} +2 -2
- package/dist/chunk-9343arqn.js +2 -0
- package/dist/chunk-94r6mkcy.js +2 -0
- package/dist/{chunk-rdrstnn9.js → chunk-9atdw0p8.js} +2 -2
- package/dist/{chunk-5jrpzepc.js → chunk-9bexzgws.js} +2 -2
- package/dist/{chunk-0gc1hez6.js → chunk-9tj16d70.js} +3 -3
- package/dist/chunk-a0esj80g.js +3 -0
- package/dist/chunk-abxwggen.js +2 -0
- package/dist/{chunk-68r2zs20.js → chunk-ahf9j8wb.js} +4 -4
- package/dist/{chunk-3qr9ysey.js → chunk-am610nan.js} +7 -7
- package/dist/chunk-amye7vb0.js +2 -0
- package/dist/chunk-asewbsct.js +2 -0
- package/dist/{chunk-t9mjgt3q.js → chunk-av45fw8a.js} +1 -1
- package/dist/{chunk-0b57fgpn.js → chunk-b234w3mf.js} +30 -10
- package/dist/chunk-b25twdd7.js +2 -0
- package/dist/chunk-b7fmkwz2.js +2 -0
- package/dist/chunk-bprjp80g.js +2 -0
- package/dist/{chunk-945zygwa.js → chunk-c08jvjqt.js} +27 -27
- package/dist/{chunk-xc1f0c64.js → chunk-c0kgwh4k.js} +9 -9
- package/dist/chunk-c60egpe6.js +2 -0
- package/dist/{chunk-kf4z4efe.js → chunk-cfbmjgd0.js} +3 -3
- package/dist/{chunk-zzqg8y47.js → chunk-cjntf1jg.js} +2 -2
- package/dist/chunk-cjq455ve.js +2 -0
- package/dist/{chunk-rdnpq89q.js → chunk-ck4ypzet.js} +2 -2
- package/dist/{chunk-46khhke2.js → chunk-cpt9sg6d.js} +1 -1
- package/dist/{chunk-73ebyhqq.js → chunk-cq4cwfqf.js} +2 -2
- package/dist/chunk-cqq68aw8.js +2 -0
- package/dist/chunk-cssvev8r.js +2 -0
- package/dist/{chunk-qs0zk04y.js → chunk-cwcmmgvz.js} +2 -2
- package/dist/{chunk-5gnt3qtn.js → chunk-d4hnj3ct.js} +3 -3
- package/dist/{chunk-3q6x62hs.js → chunk-d8mnaesb.js} +132 -51
- package/dist/{chunk-5dw0xnk6.js → chunk-ddn98yz4.js} +5 -5
- package/dist/{chunk-qykbjg3z.js → chunk-e5rag6rh.js} +2 -2
- package/dist/{chunk-150cz8qq.js → chunk-eca022er.js} +7 -7
- package/dist/{chunk-fksmr50h.js → chunk-ekyx5z50.js} +6 -6
- package/dist/{chunk-xr1s56k5.js → chunk-eptzpvn0.js} +3 -3
- package/dist/chunk-f2yqqpvr.js +2 -0
- package/dist/chunk-f3msm5tk.js +2 -0
- package/dist/chunk-f74qzgp8.js +42 -0
- package/dist/{chunk-de61k0ab.js → chunk-fs43342z.js} +2 -2
- package/dist/{chunk-54x7h3sb.js → chunk-fycxc75p.js} +1 -1
- package/dist/chunk-fzh73jtc.js +2 -0
- package/dist/{chunk-gnf1e5q7.js → chunk-fznjm7qt.js} +2 -2
- package/dist/chunk-g67xjfe6.js +3 -0
- package/dist/{chunk-r0az4z6d.js → chunk-gfp39bzr.js} +2 -2
- package/dist/{chunk-8xb09hnn.js → chunk-gg31th5s.js} +4 -4
- package/dist/chunk-gmczbe3j.js +2 -0
- package/dist/{chunk-7nf7mp27.js → chunk-gyv2bsmn.js} +2 -2
- package/dist/chunk-h7xqba9k.js +2 -0
- package/dist/chunk-hg4vfrxr.js +2 -0
- package/dist/{chunk-9w7whtbx.js → chunk-hhspwfva.js} +2 -2
- package/dist/chunk-hpxhxwda.js +2 -0
- package/dist/{chunk-4j3zmxzw.js → chunk-jg5xc2m1.js} +15 -15
- package/dist/{chunk-4hk1mjtv.js → chunk-jhegz7az.js} +5 -5
- package/dist/chunk-jnk3nk5k.js +2 -0
- package/dist/{chunk-mry67rsk.js → chunk-jttzrv0w.js} +6 -6
- package/dist/{chunk-5tm1pvt3.js → chunk-jz37h2z0.js} +2 -2
- package/dist/chunk-jzbte09f.js +2 -0
- package/dist/chunk-k5v22gn4.js +2 -0
- package/dist/{chunk-50wjk5ap.js → chunk-kmy34he2.js} +2 -2
- package/dist/chunk-kt3f4rpy.js +2 -0
- package/dist/chunk-kydh790y.js +2 -0
- package/dist/chunk-mgcakk1m.js +2 -0
- package/dist/{chunk-vw7crz0z.js → chunk-mpfm5ctr.js} +4 -4
- package/dist/{chunk-7g2snypc.js → chunk-mrx20xza.js} +3 -3
- package/dist/chunk-n3bt1sv5.js +2 -0
- package/dist/chunk-n62nqhey.js +2 -0
- package/dist/chunk-naj7m2av.js +2 -0
- package/dist/{chunk-k3566kgd.js → chunk-nan0ysys.js} +2 -2
- package/dist/chunk-nrap20qt.js +2 -0
- package/dist/chunk-p2b90rz9.js +2 -0
- package/dist/chunk-pb2mztar.js +2 -0
- package/dist/{chunk-9hwg13ec.js → chunk-pc89t52s.js} +5 -5
- package/dist/{chunk-7b3dqeyr.js → chunk-phzhmnnm.js} +2 -2
- package/dist/chunk-pp89n1et.js +2 -0
- package/dist/chunk-ptrz5xwt.js +2 -0
- package/dist/{chunk-n23btj9k.js → chunk-q4nk8sq2.js} +3 -3
- package/dist/chunk-q9yahsww.js +2 -0
- package/dist/chunk-qgc59a7d.js +2 -0
- package/dist/chunk-qjkpwjg6.js +2 -0
- package/dist/chunk-qn9rrwp8.js +2 -0
- package/dist/chunk-qpf782pt.js +2 -0
- package/dist/{chunk-5mrt1enm.js → chunk-razwegar.js} +2 -2
- package/dist/{chunk-d1tcw019.js → chunk-rdeje2dd.js} +43 -43
- package/dist/chunk-s91tcznf.js +2 -0
- package/dist/{chunk-67pq803s.js → chunk-sdf4c754.js} +2 -2
- package/dist/chunk-senrtnx2.js +2 -0
- package/dist/{chunk-nzegc1hd.js → chunk-skxkqh9a.js} +2 -2
- package/dist/{chunk-czhzr5k1.js → chunk-sxqha69q.js} +5 -5
- package/dist/{chunk-bgkj0rxe.js → chunk-ta7cwykn.js} +4 -4
- package/dist/{chunk-nzf3c6n0.js → chunk-tpryfx8t.js} +10 -10
- package/dist/{chunk-jsehp750.js → chunk-trnw1tg5.js} +1 -1
- package/dist/{chunk-vbmvft7g.js → chunk-v0yay1kw.js} +1 -1
- package/dist/{chunk-1pb32z4r.js → chunk-v25gm9d9.js} +19 -19
- package/dist/{chunk-2sz1kh9m.js → chunk-va4xam1q.js} +1 -1
- package/dist/{chunk-pzj2se3m.js → chunk-vkxrsy13.js} +14 -14
- package/dist/chunk-vqys4n8f.js +2 -0
- package/dist/{chunk-bzd387yx.js → chunk-w3y8408q.js} +4 -4
- package/dist/chunk-w4177qn3.js +3 -0
- package/dist/{chunk-esm0pnpz.js → chunk-w98yt4d4.js} +2 -2
- package/dist/{chunk-7nn5s0c3.js → chunk-wbsbrm6n.js} +30 -30
- package/dist/chunk-x1svtz8k.js +2 -0
- package/dist/chunk-xn8eabng.js +2 -0
- package/dist/{chunk-kgyjavqg.js → chunk-xqe3c7pa.js} +5 -5
- package/dist/chunk-xwarwkaw.js +2 -0
- package/dist/{chunk-yqpkdecx.js → chunk-y9xq82ep.js} +6 -6
- package/dist/{chunk-z744ry8a.js → chunk-yjhktn0b.js} +9 -9
- package/dist/chunk-ykx4zt07.js +2 -0
- package/dist/{chunk-wbpnqr7h.js → chunk-yvp5tfrz.js} +3 -3
- package/dist/{chunk-g32hc78c.js → chunk-yzgtsrjb.js} +2 -2
- package/dist/chunk-z8e2m6kz.js +2 -0
- package/dist/{chunk-t14bn66j.js → chunk-zk1c6tg7.js} +3 -3
- package/dist/chunk-zk6qmkhb.js +2 -0
- package/dist/{chunk-30yqa2jw.js → chunk-zkp5awqw.js} +1 -1
- package/dist/cli.js +21 -21
- package/dist/client/signals-loop-conditional-runtime.js +5 -0
- package/dist/component-renderer.js +2 -24
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/native/runtime/craft-bridge.js +5 -1
- package/dist/native/runtime/craft.d.ts +4 -0
- package/dist/offline/app-service-worker.d.ts +1 -0
- package/dist/offline/app-service-worker.js +99 -17
- package/dist/production-server.d.ts +0 -9
- package/dist/production-server.js +26 -11
- package/dist/pwa.js +3 -3
- package/dist/route-response-cache.js +4 -3
- package/dist/server-bindings.js +3 -1
- package/dist/spa-nav.d.ts +6 -0
- package/dist/spa-nav.js +5 -1
- package/dist/ssg.js +10 -10
- package/dist/stx-virtual-ts.d.ts +4 -0
- package/dist/stx-virtual-ts.js +22 -0
- package/dist/utils.js +22 -2
- package/package.json +5 -5
- package/dist/chunk-0ht6exrv.js +0 -2
- package/dist/chunk-1pbghytr.js +0 -2
- package/dist/chunk-31r1tk86.js +0 -2
- package/dist/chunk-3vhczypz.js +0 -2
- package/dist/chunk-4tzay5dt.js +0 -2
- package/dist/chunk-5astk182.js +0 -2
- package/dist/chunk-5tvse0vw.js +0 -2
- package/dist/chunk-6heg0cza.js +0 -2
- package/dist/chunk-726w7fm2.js +0 -2
- package/dist/chunk-73t3w7fh.js +0 -2
- package/dist/chunk-7bjrvyqk.js +0 -2
- package/dist/chunk-7n4mve8h.js +0 -2
- package/dist/chunk-7r294vc9.js +0 -2
- package/dist/chunk-7rn7w53f.js +0 -2
- package/dist/chunk-7v3tgpws.js +0 -2
- package/dist/chunk-81qvg3yd.js +0 -2
- package/dist/chunk-9bcrr81g.js +0 -2
- package/dist/chunk-9g6tfcrv.js +0 -2
- package/dist/chunk-be8x7mkn.js +0 -2
- package/dist/chunk-c87cndsj.js +0 -2
- package/dist/chunk-cp82351f.js +0 -2
- package/dist/chunk-cv609hgq.js +0 -2
- package/dist/chunk-cvxg2rc1.js +0 -2
- package/dist/chunk-dmc91qke.js +0 -2
- package/dist/chunk-dw23nre3.js +0 -2
- package/dist/chunk-fk593bkb.js +0 -2
- package/dist/chunk-fznzn35q.js +0 -2
- package/dist/chunk-gfz0czma.js +0 -2
- package/dist/chunk-ggchpq5r.js +0 -42
- package/dist/chunk-ghmb45zs.js +0 -2
- package/dist/chunk-hc8ks7y3.js +0 -2
- package/dist/chunk-hs2a040z.js +0 -2
- package/dist/chunk-hten266c.js +0 -2
- package/dist/chunk-jr3fmkq7.js +0 -2
- package/dist/chunk-k2fw6paw.js +0 -2
- package/dist/chunk-k79dvx67.js +0 -2
- package/dist/chunk-kf6j1ht4.js +0 -2
- package/dist/chunk-km1k3c4e.js +0 -2
- package/dist/chunk-knxb6d18.js +0 -2
- package/dist/chunk-kvjbpbmw.js +0 -2
- package/dist/chunk-kx9amwwr.js +0 -2
- package/dist/chunk-mhv84p0x.js +0 -2
- package/dist/chunk-mxxb3e9v.js +0 -2
- package/dist/chunk-mz44m7y7.js +0 -2
- package/dist/chunk-p3pjfj65.js +0 -2
- package/dist/chunk-p8eeg64w.js +0 -2
- package/dist/chunk-ph74v3ag.js +0 -3
- package/dist/chunk-pjpy86c3.js +0 -3
- package/dist/chunk-pnbeey2h.js +0 -3
- package/dist/chunk-ps5wfd4c.js +0 -2
- package/dist/chunk-qzx6h6af.js +0 -2
- package/dist/chunk-s0dmb7me.js +0 -2
- package/dist/chunk-tgwwa872.js +0 -2
- package/dist/chunk-tspqdt8e.js +0 -2
- package/dist/chunk-tyv0csb4.js +0 -2
- package/dist/chunk-v0r6zb87.js +0 -2
- package/dist/chunk-vxtna1b1.js +0 -2
- package/dist/chunk-wwtv5cht.js +0 -2
- package/dist/chunk-x2x1cqr0.js +0 -2
- package/dist/chunk-x43x2c6v.js +0 -2
- package/dist/chunk-xb192088.js +0 -2
- package/dist/chunk-xqx8t9w5.js +0 -2
- package/dist/chunk-xy0f5yds.js +0 -2
- package/dist/chunk-z33r3pzy.js +0 -2
- package/dist/chunk-zkr42285.js +0 -2
- package/dist/chunk-zrs22j09.js +0 -2
- package/dist/chunk-zw6tgr0s.js +0 -2
package/dist/utils.js
CHANGED
|
@@ -17,14 +17,14 @@ import { contentKey, depsUnchanged, renderMemo, snapshotDeps } from "./render-me
|
|
|
17
17
|
import { transformStoreImports } from "./store-imports.js";
|
|
18
18
|
import { LRUCache } from "./performance-utils.js";
|
|
19
19
|
import { getPublicEnvDefine } from "./public-env.js";
|
|
20
|
-
import { isUsableParamName } from "./safe-evaluator.js";
|
|
20
|
+
import { freeIdentifiers, isUsableParamName } from "./safe-evaluator.js";
|
|
21
21
|
import { processScopedStyles } from "./style-scoping.js";
|
|
22
22
|
import { findSfcTemplateBlock } from "./sfc-template.js";
|
|
23
23
|
import { importOnce } from "./lazy-module.js";
|
|
24
24
|
import { scanAtElementPosition, scanHtmlScriptElements, skipLeadingHtmlTrivia, stashScriptElements } from "./html-masking.js";
|
|
25
25
|
import { hasReactiveDirectives } from "./reactive.js";
|
|
26
26
|
import { markProjectedRefs, markProjectedSlotRoots } from "./misc-directives.js";
|
|
27
|
-
import { collectBlockDeclarations } from "./stx-virtual-ts.js";
|
|
27
|
+
import { clientScriptNames, collectBlockDeclarations } from "./stx-virtual-ts.js";
|
|
28
28
|
import { CLIENT_LOOP_NAMES_KEY, inheritedClientLoopNames } from "./loop-binding.js";
|
|
29
29
|
import { isFallthroughAttribute } from "./builtins/attrs.js";
|
|
30
30
|
import { StxValidationError } from "./errors/types.js";
|
|
@@ -869,6 +869,16 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
|
|
|
869
869
|
for (const match of callerSlotContent.matchAll(/\{\{([\s\S]*?)\}\}/g))
|
|
870
870
|
callerPreservedExpressions.push(match[1].trim());
|
|
871
871
|
}
|
|
872
|
+
const callerClientNames = new Set(Array.isArray(parentContext.__stx_client_declared_names) ? parentContext.__stx_client_declared_names : []), callerClientBindings = [];
|
|
873
|
+
if (callerClientNames.size > 0 && callerSlotContent)
|
|
874
|
+
for (const tag of callerSlotContent.matchAll(/<[A-Z][\w.-]*\b([^>]*)>/g))
|
|
875
|
+
for (const binding of tag[1].matchAll(/\s(?:v-model(?::[\w-]+)?|:[\w-]+)\s*=\s*"([^"]*)"/g)) {
|
|
876
|
+
const expression = binding[1].trim();
|
|
877
|
+
try {
|
|
878
|
+
if (expression && freeIdentifiers(expression).some((name) => callerClientNames.has(name)))
|
|
879
|
+
callerClientBindings.push(expression);
|
|
880
|
+
} catch {}
|
|
881
|
+
}
|
|
872
882
|
const stashedCallerScripts = stashScriptElements(callerSlotContent), callerClientScripts = [], componentSlotContent = stashedCallerScripts.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g, (_match, index) => {
|
|
873
883
|
const script = stashedCallerScripts.scripts[Number(index)] || "", attrs = script.match(/^<script\b([^>]*)>/i)?.[1] || "", type = attrs.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(), executable = !type || ["module", "text/javascript", "application/javascript"].includes(type), instance = /\sdata-stx-(?:owner|instance)(?=[\s=/>])/i.test(` ${attrs}`);
|
|
874
884
|
if (!/\bserver\b/i.test(attrs) && executable && !instance) {
|
|
@@ -898,6 +908,10 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
|
|
|
898
908
|
__stx_preserved_client_expressions: [
|
|
899
909
|
...Array.isArray(parentContext.__stx_preserved_client_expressions) ? parentContext.__stx_preserved_client_expressions : [],
|
|
900
910
|
...callerPreservedExpressions
|
|
911
|
+
],
|
|
912
|
+
__stx_caller_client_bindings: [
|
|
913
|
+
...Array.isArray(parentContext.__stx_caller_client_bindings) ? parentContext.__stx_caller_client_bindings : [],
|
|
914
|
+
...callerClientBindings
|
|
901
915
|
]
|
|
902
916
|
};
|
|
903
917
|
if (/import\s/.test(componentContent)) {
|
|
@@ -1015,6 +1029,12 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
|
|
|
1015
1029
|
componentContext.__stx_client_signal_names = [...new Set([...inheritedClientSignalNames, ...clientSignalNames])];
|
|
1016
1030
|
else
|
|
1017
1031
|
delete componentContext.__stx_client_signal_names;
|
|
1032
|
+
const ownClientNames = clientScriptNames(clientScripts.join(`
|
|
1033
|
+
`)), inheritedClientNames = (Array.isArray(componentContext.__stx_client_declared_names) ? componentContext.__stx_client_declared_names : []).filter((name) => !ownServerNames.has(name) && !(name in props));
|
|
1034
|
+
if (ownClientNames.size > 0 || inheritedClientNames.length > 0)
|
|
1035
|
+
componentContext.__stx_client_declared_names = [...new Set([...inheritedClientNames, ...ownClientNames])];
|
|
1036
|
+
else
|
|
1037
|
+
delete componentContext.__stx_client_declared_names;
|
|
1018
1038
|
const slotLoopNames = clientLoopNames.filter((name) => !ownServerNames.has(name) && !(name in props));
|
|
1019
1039
|
if (slotLoopNames.length > 0)
|
|
1020
1040
|
componentContext[CLIENT_LOOP_NAMES_KEY] = slotLoopNames;
|
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.908",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/clapp": "^0.2.17",
|
|
130
|
-
"@stacksjs/desktop": "0.2.
|
|
131
|
-
"@stacksjs/sanitizer": "0.2.
|
|
130
|
+
"@stacksjs/desktop": "0.2.908",
|
|
131
|
+
"@stacksjs/sanitizer": "0.2.908",
|
|
132
132
|
"@stacksjs/ts-css": "^0.3.21",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
134
|
"@types/dom-speech-recognition": "^0.0.12",
|
|
135
|
-
"bun-plugin-stx": "0.2.
|
|
135
|
+
"bun-plugin-stx": "0.2.908",
|
|
136
136
|
"bunfig": "^0.15.21",
|
|
137
|
-
"stx-router": "0.2.
|
|
137
|
+
"stx-router": "0.2.908",
|
|
138
138
|
"ts-broadcasting": "^0.0.13",
|
|
139
139
|
"ts-images": "^0.2.22",
|
|
140
140
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-0ht6exrv.js
DELETED
package/dist/chunk-1pbghytr.js
DELETED
package/dist/chunk-31r1tk86.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{le,ue,de,Jn,Ee,Fe,ds,vu,$t,ln,Yn,Zn,Qn,pe,er,tr,ps}from"./chunk-7nf7mp27.js";import"./chunk-9y83pdcb.js";export{ue as DEFAULT_FORMATS,de as DEFAULT_QUALITY,le as DEFAULT_WIDTHS,ps as ImageProcessingError,tr as formatSize,ln as generateSizes,$t as generateSrcSet,Yn as getFallbackVariant,ds as getImageMetadata,pe as getMimeType,er as getTotalSize,Zn as groupVariantsByFormat,Ee as isImageBackendAvailable,Qn as isImageFile,Jn as isSharpAvailable,Fe as processImage,vu as resizeAndConvert};
|
package/dist/chunk-3vhczypz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ia,Am,Do,Pm,fu,gu,Im,Om}from"./chunk-zrvgr3hz.js";import"./chunk-wbpnqr7h.js";import"./chunk-db7h6mgq.js";import"./chunk-5dw0xnk6.js";import"./chunk-qs0zk04y.js";import"./chunk-xc1f0c64.js";import"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import{_e,ro}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Ia as buildScriptVirtualFile,Am as buildVirtualSource,_e as extractScriptBlocks,ro as extractTemplateExpressions,fu as findRuntimeTypeDeclarations,gu as findStxModuleDeclarations,Om as formatTypecheckDiagnostics,Pm as sourcePathFor,Im as typecheckStxFiles,Do as virtualPathFor};
|
package/dist/chunk-4tzay5dt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{yr,i}from"./chunk-3q6x62hs.js";import"./chunk-z744ry8a.js";import"./chunk-nzf3c6n0.js";import"./chunk-de61k0ab.js";import"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-vw6qytwm.js";import"./chunk-5jrpzepc.js";import"./chunk-xc1f0c64.js";import{Ae}from"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-bzndm04n.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import{We,ao,co}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{yr as buildModulesTag,Ae as injectRouterScript,i as processDirectives,ao as processJsonDirective,co as processOnceDirective,We as validateClientScript};
|
package/dist/chunk-5astk182.js
DELETED
package/dist/chunk-5tvse0vw.js
DELETED
package/dist/chunk-6heg0cza.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ay,ug,ct,Oc,cy,Cs,Es,Ts}from"./chunk-nzf3c6n0.js";import"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-5jrpzepc.js";import"./chunk-vbmvft7g.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{cy as clearOnceStore,Oc as onceStore,ct as partialsCache,Cs as processIncludes,Es as processStackPushDirectives,Ts as processStackReplacements,ay as resetUnscopedSignalWarnings,ug as topLevelElements};
|
package/dist/chunk-726w7fm2.js
DELETED
package/dist/chunk-73t3w7fh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ie,zi,Hi,Lg,Xt,xl,jg,Sl,$y,Ke,Pn,Ge}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import{Bl,t}from"./chunk-68r2zs20.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Ie as BROWSER_CORE_IMPORTS,Lg as STX_AUTO_IMPORTS,zi as extractAndStripCssImports,Ke as extractBridgeData,Bl as findInterpolationEnd,Sl as generateAutoImportDestructuring,$y as generateBrowserAutoImportDestructuring,Pn as generateServerDataBridge,Xt as injectBrowserCoreAutoImports,Ge as processClientScript,jg as referencesName,Hi as renderVendorStyleTags,t as stripCommentsAndLiterals,xl as transformAutoImports};
|
package/dist/chunk-7bjrvyqk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{q,wg,bi,Hc,a,j,xy,Sy}from"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{j as config,q as defaultConfig,xy as defineStxConfig,bi as discoverConfig,a as loadStxConfig,Hc as resolveInstalledPackage,wg as resolveStxDirectories,Sy as validateConfig};
|
package/dist/chunk-7n4mve8h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Nm}from"./chunk-zzqg8y47.js";import"./chunk-3qr9ysey.js";import"./chunk-qt2mr3f0.js";import"./chunk-30yqa2jw.js";import"./chunk-5dw0xnk6.js";import"./chunk-3q6x62hs.js";import"./chunk-z744ry8a.js";import"./chunk-nzf3c6n0.js";import"./chunk-de61k0ab.js";import"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-vw6qytwm.js";import"./chunk-5jrpzepc.js";import"./chunk-xc1f0c64.js";import"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-bzndm04n.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Nm as buildForProduction};
|
package/dist/chunk-7r294vc9.js
DELETED
package/dist/chunk-7rn7w53f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ea,My,Dy,Dl,et,Zg,bo,Ly,jy,By,Fy,zy,Hy,Vy,Uy,Wy}from"./chunk-945zygwa.js";import"./chunk-0jdz31q1.js";export{Hy as applyHead,Ly as definePageMeta,ea as getHead,My as getPageMeta,et as mergeHeadConfigs,Vy as processHeadDirective,Wy as processMetaDirective,Uy as processTitleDirective,zy as renderBodyAttrs,By as renderHead,Fy as renderHtmlAttrs,Dy as resetHead,bo as seoMetaToHeadConfig,Dl as useHead,jy as usePageTitle,Zg as useSeoMeta,jy as useTitle};
|
package/dist/chunk-7v3tgpws.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{dy,py,dg,Rs}from"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-5jrpzepc.js";import"./chunk-vbmvft7g.js";import{Br}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import{yt}from"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{yt as freeIdentifiers,Rs as processComponents,dg as processESImports,Br as rendersAsElement,dy as resetMarginStackWarnings,py as resetTemplateLoopWarnings};
|
package/dist/chunk-81qvg3yd.js
DELETED
package/dist/chunk-9bcrr81g.js
DELETED
package/dist/chunk-9g6tfcrv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_m}from"./chunk-n23btj9k.js";import"./chunk-3q6x62hs.js";import"./chunk-z744ry8a.js";import"./chunk-nzf3c6n0.js";import"./chunk-de61k0ab.js";import"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-vw6qytwm.js";import"./chunk-5jrpzepc.js";import"./chunk-xc1f0c64.js";import"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-bzndm04n.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{_m as startInteractive};
|
package/dist/chunk-be8x7mkn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Pe,uo,Kg,Ay,Gg,Py,On,g,Y,ae,Nn,Ne,Xg,Wi,Jg,Iy,P,qi,Yg,Oy,N,Ny}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Yg as applyFilters,Py as clearCustomFilters,Xg as clientLoopScopes,uo as defaultFilters,Nn as escapeAttributeValue,g as escapeHtml,Y as escapeHtmlValue,ae as escapeInterpolatedHtmlValue,N as evaluateExpression,Pe as findMustacheEnd,Gg as getAllFilters,Jg as interpolateScriptAttributes,Wi as interpolateScriptExpressions,Iy as interpolateScriptsInTemplate,P as processExpressions,qi as processExpressionsChunked,Kg as registerFilter,Ay as registerFilters,On as replaceInterpolations,Oy as resetRejectedExpressionWarnings,Ny as unescapeHtml,Ne as usesSignalsInScript};
|
package/dist/chunk-c87cndsj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ht,Ag,Pg,Ig,Og,Ng,y,Mg,Fi,Dg,wl,vl}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{ht as STX_ENGINE_BINDING_NAMES,Fi as convertToCommonJS,wl as extractScriptFromTemplate,y as extractVariables,vl as hasVariables,Mg as isCompleteImport,Ng as isMissingBindingFailure,Ig as isModuleResolutionFailure,Og as isSyntaxFailure,Dg as splitDeclaration,Ag as stripTypeScript,Pg as withoutStxReferrer};
|
package/dist/chunk-cp82351f.js
DELETED
package/dist/chunk-cv609hgq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ts,Eo,ym,tu,To}from"./chunk-vtc9zmp6.js";import"./chunk-4d6p92qh.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";export{ym as buildModuleRegistryScript,To as buildSharedModuleRegistries,tu as exportsMutableBinding,ts as registeredModuleIdsIn,Eo as registeredModuleNamesIn};
|
package/dist/chunk-cvxg2rc1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mm,Dm,Lm,jm,mu,Bm,Fm,zm,Hm,Vm,Um,Wm}from"./chunk-hnjeqxqy.js";export{Um as Broadcast,Wm as BroadcastServer,mu as broadcast,Hm as broadcastPresence,zm as broadcastPrivate,Vm as channel,Mm as getBroadcastServer,jm as loadChannels,Dm as startBroadcasting,Lm as stopBroadcasting,Bm as toUser,Fm as toUsers};
|
package/dist/chunk-dmc91qke.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Uu,qo,lr,Wu,qu,Ku,Gu,Xu,Ju,Yu,Zu,Qu,ed,td,nd,rd,sd,od,id,ad,cd,ld,ud,dd,pd,fd,gd,md,hd,yd,bd,wd,vd,xd,Sd,kd,_d,Cd,Ed,Td,$d,Rd,Ad,Pd,Id,Od,Nd,Md,dn,tc,Dd,Ld,jd,nc,Bd,Fd,zd,Hd,Vd,Ud,rc,Wd,qd,Kd,Gd,Xd,Jd,Yd,Zd,Qd,ur,ep,tp,np,rp,sp,op,ip,ap,cp,lp,up,dp,Ko,pp,fp,gp,mp,hp,bs,ws,yp,bp,wp,vp,xp,sc,Sp,kp,_p,oc,Go,Cp,Ep,ic,ac,vs,cc,Tp,pn,$p,lc,uc,Xo,Rp,Jo,Ap,Pp,Ip,Op,Np,Mp,Dp,dc,Lp,jp,pc,Bp,Fp,zp,Hp,Vp,Up,Wp,qp,Kp,Gp,Xp,Jp,Yp,Zp,Qp,ef,tf,nf,rf,sf,of,af,cf,lf,fc,uf,df,pf,ff,gf,mf,hf,yf,bf,wf,vf,dr,gc,mc,xf,pr,Sf,kf,_f,hc,yc,xs,Ss,Cf,Yo,Ef,Tf,$f,Rf,Af,Pf,If,Of,Nf,Mf,Df,Lf,jf,Bf,Ff,zf,Hf,Vf,Uf,Wf,bc,qf,Kf,wc,vc,Gf,Xf}from"./chunk-7nn5s0c3.js";export{Nd as AVAILABLE_COMPONENTS,sc as AutoUpdater,Md as COMPONENT_STYLES,xs as DEFAULT_WATCH_INTERVAL_MS,yc as MAX_WATCH_INTERVAL_MS,hc as MIN_WATCH_INTERVAL_MS,Ud as MODAL_STYLES,Qu as TOAST_STYLES,Yd as TRAY_MENU_STYLES,ic as UPDATE_MANIFEST_ASSET,Fd as alert,of as appInfo,Pf as appleScript,Xf as applicationDataDirectory,Af as audio,Kf as backgroundDelay,tf as battery,Rf as biometric,wf as bluetooth,Df as bonjour,pn as bundlePathForExecutable,Rp as caffeinate,Sp as canReplaceBundle,kp as clearQuarantine,qp as clipboard,Vd as closeAllModals,dp as closeAllWindows,Bd as confirm,lf as contextMenu,Hf as continuityCamera,zf as coreml,vp as craftBinaryNotFoundMessage,Ko as craftWindowArguments,dr as crashReporter,Sd as createAccordion,md as createAutocomplete,id as createAvatar,od as createBadge,ed as createButton,ad as createCard,Rd as createChart,nd as createCheckbox,bd as createChip,Ad as createCodeEditor,pd as createColorPicker,$d as createDataGrid,fd as createDatePicker,ws as createDiskImage,ld as createDropdown,Id as createFileExplorer,Tp as createGitHubUpdateManifest,cc as createGitHubUpdater,yd as createImageView,Hp as createInterval,hd as createLabel,Cd as createListView,Pd as createMediaPlayer,Wd as createMenubar,_d as createModalComponent,Gf as createNativeUpdateApi,vc as createPantrySelfUpdater,Np as createPreferences,sd as createProgressBar,dd as createRadioButton,ud as createRating,vd as createScrollView,Xo as createSelfUpdater,rd as createSlider,xd as createSplitView,kd as createStepper,rc as createSystemTray,Ed as createTable,cd as createTabs,td as createTextInput,gd as createTimePicker,zp as createTimer,wd as createTooltip,Td as createTreeView,Od as createWebView,pp as createWindow,gp as createWindowWithHTML,Jo as decaffeinate,ef as deepLinks,Vp as delay,Ju as dismissAlertById,Yu as dismissAllAlerts,Zp as dragOut,_p as extractBundle,If as fileAssociations,Yo as focus,Tf as focusShortcutsReady,Wp as formatCompact,Op as formatDuration,Ip as formatRemainingTime,Lp as formatShortcut,Up as formatTime,Gp as fs,oc as generateUpdateManifest,Zu as getActiveAlertCount,Hd as getActiveModalCount,qd as getActiveTrayInstances,lp as getActiveWindowIds,Pp as getCaffeinateStatus,Wf as getCapabilities,bc as getCapability,ap as getDesktopConfig,op as getDialogBridgeScript,Fp as getRegisteredHotkeys,Xd as getSimulatedTrayHTML,Jd as getTrayBridgeScript,Kd as getTrayInstance,up as getWindow,hp as getWindowBridgeScript,ac as githubLatestAssetUrl,vs as githubReleaseAssetUrl,Jp as globalShortcuts,pr as handoff,Ef as hasFocusShortcuts,xf as iap,Dp as isAutoLaunchEnabled,qf as isAvailable,Ap as isCaffeinated,Qp as isDragOutAvailable,mp as isWebviewAvailable,pf as keychain,Sf as liveActivities,$f as localServer,kf as location,Mf as log,yp as macOSRuntimeExecutablePath,cf as menu,Ff as midi,mf as nativeAutoLaunch,hf as nativeTray,yf as nativeWindow,nf as network,Kp as notifications,Xu as notify,fp as openDevWindow,bp as pack,wp as packageApp,wc as parsePantryUpdateManifest,dc as parseShortcut,Nf as pdf,ff as permissions,gf as printing,zd as prompt,lc as quitLauncher,Go as readBundleIdentity,gc as redactPII,jp as registerHotkey,uc as relaunchBundle,Uu as requestNotificationPermission,cp as resetDesktopConfig,xp as resolveCraftBinary,bs as resolveCraftExecutablePath,$p as runningBundleTeamId,df as screen,_f as screenCapture,Ss as screenSharing,Uf as serial,Vf as serviceMenu,Mp as setAutoLaunch,ip as setDesktopConfig,Xp as shell,qo as showAlert,tp as showAlertDialog,ep as showColorPicker,np as showConfirmDialog,rp as showErrorDialog,Ld as showErrorModal,Gu as showErrorToast,tc as showInfoModal,Wu as showInfoToast,ur as showMessageBox,dn as showModal,Zd as showOpenDialog,nc as showQuestionModal,Qd as showSaveDialog,jd as showSuccessModal,qu as showSuccessToast,lr as showToast,sp as showWarningDialog,Dd as showWarningModal,Ku as showWarningToast,fc as sidebar,mc as signPayload,vf as speech,jf as speechRecognition,Lf as spotlight,af as standardMenus,Cp as swapBundle,uf as system,Of as tags,Yp as theme,bf as touchbar,Gd as triggerTrayAction,Bp as unregisterAllHotkeys,pc as unregisterHotkey,rf as updater,Ep as verifyBundleTrust,Bf as vision,Cf as watchScreenSharing,sf as windowEvents};
|
package/dist/chunk-dw23nre3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ou,Ra,iu,au,Aa,cu,lu,uu,du,Pa,pu,Rm}from"./chunk-bgkj0rxe.js";import{Ba,hu}from"./chunk-rdrstnn9.js";import{le,ue,de,Jn,Ee,Fe,ds,$t,ln,Yn,Zn,Qn,pe,er,tr,ps}from"./chunk-7nf7mp27.js";import{xu}from"./chunk-eb5cma4b.js";import"./chunk-9y83pdcb.js";export{ue as DEFAULT_FORMATS,de as DEFAULT_QUALITY,le as DEFAULT_WIDTHS,ps as ImageProcessingError,au as clearImageCache,Aa as createImageDirective,hu as createImageHandler,lu as createImagePlugin,Rm as defaultImageConfig,tr as formatSize,Pa as generateImageManifest,ln as generateSizes,$t as generateSrcSet,Yn as getFallbackVariant,ds as getImageMetadata,pe as getMimeType,er as getTotalSize,Zn as groupVariantsByFormat,Ba as handleImageRequest,cu as imageDirective,Ee as isImageBackendAvailable,Qn as isImageFile,Jn as isSharpAvailable,du as optimizeDirectory,uu as optimizeImage,Ra as parseImageComponent,Fe as processImage,iu as processImageComponents,ou as renderImageComponent,xu as rewriteImagesWithSiblings,pu as writeImageManifest};
|
package/dist/chunk-fk593bkb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Em}from"./chunk-pnbeey2h.js";import"./chunk-3qr9ysey.js";import"./chunk-30yqa2jw.js";import"./chunk-5dw0xnk6.js";import"./chunk-ph74v3ag.js";import"./chunk-az1eczs2.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Em as startProductionServer};
|
package/dist/chunk-fznzn35q.js
DELETED
package/dist/chunk-gfz0czma.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{og,Pc,sy,Ic,ig,ag,Sn,vr,oy,cg,lg,iy,S}from"./chunk-z744ry8a.js";import"./chunk-bzndm04n.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Sn as buildCss,cg as extractClassNames,ag as fingerprintConfig,lg as generateCss,oy as getCachedCSS,og as getCssServeAsset,S as injectCss,Pc as loadCssEngine,Ic as loadCssEngineConfig,vr as rebuildCss,sy as resetCssCache,ig as resolveUserCssConfig,iy as withLinkedModuleBundles};
|
package/dist/chunk-ggchpq5r.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vl,Ul}from"./chunk-hdfhaddy.js";import{J,Or,Ys,Zs,$i,Ai,Qs,Oe,qe,ke,se,Dr,Lr,he,oe,F,mt,jr,Ni,zr,Ye,s,g,Y,Nn}from"./chunk-fhb86pc9.js";import{m,M,yt,p}from"./chunk-945zygwa.js";import{r}from"./chunk-ph74v3ag.js";import{ge}from"./chunk-5jrpzepc.js";import{xr}from"./chunk-eb5v9npc.js";import{w}from"./chunk-v6gkjg5f.js";import{t}from"./chunk-68r2zs20.js";import{createHash as At}from"crypto";import K from"fs";import V from"path";import Le from"fs";function Ae(e,i,n){let o=Buffer.alloc(n),a=Le.readSync(e,o,0,n,i);return o.subarray(0,a)}function ze(e){if(e.length<25)return!1;let i=(o,a)=>String.fromCharCode(...e.subarray(o,a));if(i(0,4)!=="RIFF"||i(8,12)!=="WEBP")return!1;let n=i(12,16);if(n==="VP8X")return(e[20]&16)!==0;if(n==="VP8L")return((e[21]|e[22]<<8|e[23]<<16|e[24]<<24)>>>28&1)===1;return!1}function Ue(e){let i;try{i=Le.openSync(e,"r");let n=Ae(i,0,33);if(n.length>=3&&n[0]===255&&n[1]===216&&n[2]===255)return"none";if(n.length>=26&&n[0]===137&&n.toString("latin1",1,4)==="PNG"){let o=n[25];if(o===4||o===6)return"possible";let a=8;for(let c=0;c<64;c++){let l=Ae(i,a,8);if(l.length<8)return"unknown";let u=l.toString("latin1",4,8);if(u==="tRNS")return"possible";if(u==="IDAT"||u==="IEND")return"none";a+=12+l.readUInt32BE(0)}return"unknown"}if(n.length>=25&&n.toString("latin1",0,4)==="RIFF"&&n.toString("latin1",8,12)==="WEBP"){if(ze(n))return"possible";let o=n.toString("latin1",12,16);return o==="VP8 "||o==="VP8X"?"none":"unknown"}return"unknown"}catch{return"unknown"}finally{if(i!==void 0)Le.closeSync(i)}}import sn from"fs";import Fe from"os";import{fileURLToPath as bt}from"url";var _e=Symbol("stx.image-worker.unavailable");function on(e=typeof Fe.availableParallelism==="function"?Fe.availableParallelism():Fe.cpus().length){return Math.max(1,Math.min(2,e-1))}var Ie=0,vt=[];async function an(){if(Ie<on()){Ie++;return}await new Promise((e)=>vt.push(e)),Ie++}function cn(){Ie--,vt.shift()?.()}var ln="@stacksjs/stx/builtins/image-warmup-worker";function un(e=process.cwd()){let i=import.meta.url.endsWith(".ts")?"ts":"js";try{let n=new URL(`./image-warmup-worker.${i}`,import.meta.url);if(n.protocol==="file:"&&sn.existsSync(bt(n)))return bt(n)}catch{}return xr(ln,e)}var xt=!1;function ue(e){if(!xt)xt=!0,console.warn(`[stx] image worker unavailable (${e}); running the image pass on the serving thread instead. Results are the same, but requests may stall while it runs.`);return _e}function Pe(e){return e instanceof Error?e.message:String(e)}async function We(e,i){let n;try{n=(await import("worker_threads")).Worker}catch(a){return ue(`could not load node:worker_threads: ${Pe(a)}`)}if(typeof n!=="function")return ue("node:worker_threads has no Worker in this runtime");let o=un();if(!o)return ue("no image-warmup-worker entry beside this module or in the installed @stacksjs/stx");await an();try{return await new Promise((a,c)=>{let l;try{l=new n(o)}catch(y){a(ue(`could not start ${o}: ${Pe(y)}`));return}let u=!1,f=!1,v=(y)=>{if(f)return;f=!0,y(),l.terminate()};l.on("message",(y)=>{if(y.type==="ready"){u=!0,l.postMessage({task:e,args:i});return}if(y.type==="result"){v(()=>a(y.value));return}let h=Error(y.error?.message??"image worker failed");if(y.error?.name)h.name=y.error.name;if(y.error?.stack)h.stack=y.error.stack;v(()=>c(h))}),l.on("error",(y)=>{v(()=>u?c(y instanceof Error?y:Error(Pe(y)||"image worker crashed")):a(ue(`the worker failed before it was ready: ${Pe(y)}`)))}),l.on("exit",(y)=>{v(()=>u?c(Error("image worker exited before it finished")):a(ue(`the worker exited with code ${y} before it was ready`)))})})}finally{cn()}}var fn=new Set([".avif",".jpeg",".jpg",".png",".webp"]),dn=[320,640,960,1280,1920],ve="/_stx/images",gn=`stx:${ve}:alpha-1`,pn=`stx:${ve}:opaque-1`,mn=["@stacksjs/ts-webp","@stacksjs/ts-avif","ts-images"],Ee;function hn(e,i){let n=V.dirname(Bun.resolveSync(e,i));while(n!==V.dirname(n)){let o=V.join(n,"package.json");if(K.existsSync(o)){let a=JSON.parse(K.readFileSync(o,"utf8"));if(a.name===e)return a.version}n=V.dirname(n)}return}function wt(){if(Ee!==void 0)return Ee;let e;try{e=V.dirname(Bun.resolveSync("ts-images",import.meta.dir))}catch{}return Ee=mn.map((i)=>{let n;try{n=e?hn(i,e):void 0}catch{}return`${i.replace("@stacksjs/","")}@${n??"unknown"}`}).join("+"),Ee}var $t=Symbol.for("stx.image-delivery");function we(){let e=globalThis;return e[$t]??={catalog:new Map,transparent:new Set},e[$t]}var St=new Set;function yn(e){return`/${e.split(V.sep).map(encodeURIComponent).join("/")}`}function bn(e){let i=V.extname(e),n=e.slice(0,-i.length).replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,""),o=At("sha256").update(e).digest("hex").slice(0,8);return`${n||"image"}-${o}`}function Ct(e,i=`stx:${ve}`){let n=(o)=>`${ve}/${o.split("/").map(encodeURIComponent).join("/")}`;return{cacheNamespace:i,async stat(o){let a=V.join(e,o);try{let c=await K.promises.stat(a);return c.size>0?{bytes:c.size,path:a,url:n(o)}:null}catch{return null}},async write(o,a){let c=V.join(e,o);await K.promises.mkdir(V.dirname(c),{recursive:!0});let l=`${c}.${process.pid}.tmp`;return await K.promises.writeFile(l,a),await K.promises.rename(l,c),{bytes:a.byteLength,path:c,url:n(o)}},url:n}}async function Pt(e,i=e){let n=await K.promises.readdir(i,{withFileTypes:!0});n.sort((a,c)=>a.name.localeCompare(c.name));let o=[];for(let a of n){let c=V.join(i,a.name);if(a.isDirectory()){o.push(...await Pt(e,c));continue}if(!a.isFile()||!fn.has(V.extname(a.name).toLowerCase()))continue;o.push({absolutePath:c,relativePath:V.relative(e,c)})}return o}function Rt(e,i){return e.map((n)=>({key:yn(n.relativePath),input:n.absolutePath,name:bn(n.relativePath),...xn(n.absolutePath)?{options:{storage:i}}:{}}))}function xn(e){return Ue(e)==="possible"}function vn(e){for(let i=3;i<e.length;i+=4)if(e[i]!==255)return!0;return!1}async function wn(e){let i=Object.entries(e).filter(([,c])=>c.fallback.format==="png"),n=new Set,o=8;if(i.length===0)return n;let{decode:a}=await import("ts-images");for(let c=0;c<i.length;c+=8)await Promise.all(i.slice(c,c+8).map(async([l,u])=>{let f=u.variants.filter((v)=>v.format==="png").sort((v,y)=>v.width-y.width)[0];try{let v=await a(new Uint8Array(await K.promises.readFile(f?.path??u.fallback.path)));if(vn(v.data))n.add(l)}catch{n.add(l)}}));return n}function $n(e,i){let n=[];for(let o of i){let a=e[o],c=a?.variants.filter((u)=>u.format==="webp")??[];if(!a||c.length===0)continue;if(!c.some((u)=>{let f;try{return f=K.openSync(u.path,"r"),!ze(Ae(f,0,32))}catch{return!0}finally{if(f!==void 0)K.closeSync(f)}}))continue;if(a.variants=a.variants.filter((u)=>u.format!=="webp"),delete a.sources.webp,n.push(o),!St.has(o))St.add(o),console.warn(`[stx-images] ${o} is transparent but its WebP variants have no alpha channel; serving PNG instead. Upgrade @stacksjs/ts-webp to 0.1.6 or later.`)}return n}async function Sn(e){let i=[],n=8;if(e.length===0)return i;let{generateThumbHash:o}=await import("ts-images");for(let a=0;a<e.length;a+=8){let c=e.slice(a,a+8),l=await Promise.all(c.map(async(u)=>{try{return await o(u.absolutePath),u}catch{return console.warn(`[stx-images] Skipping unreadable raster: ${u.relativePath}`),null}}));i.push(...l.filter((u)=>u!==null))}return i}function He(e){return V.join(e,"undecodable.json")}function Cn(e){try{let i=K.readFileSync(He(e),"utf-8"),n=JSON.parse(i);return n&&typeof n==="object"?n:{}}catch{return{}}}function Rn(e,i){try{K.mkdirSync(V.dirname(He(e)),{recursive:!0}),K.writeFileSync(He(e),JSON.stringify(i))}catch{}}function kt(e){try{let i=K.statSync(e);return{mtimeMs:i.mtimeMs,size:i.size}}catch{return}}function It(e){if(!e||e.startsWith("data:")||e.startsWith("blob:")||/^https?:\/\//i.test(e)||e.startsWith("//"))return;let i=e.split(/[?#]/,1)[0];if(!i)return;try{return`/${i.replace(/^\/+/,"").split("/").map(decodeURIComponent).map(encodeURIComponent).join("/")}`}catch{return}}function oi(e){let i=It(e);return i?we().catalog.get(i):void 0}function ii(e){let i=It(e);return i?we().transparent.has(i):!1}function ai(e){let i=(o)=>e.variants.filter((a)=>a.format===o).reduce((a,c)=>a+c.bytes,0),n=i(e.fallback.format);return["avif","webp"].map((o)=>({format:o,srcset:e.sources[o]||"",bytes:i(o)})).filter((o)=>o.srcset&&o.bytes>0&&o.bytes<n).sort((o,a)=>o.bytes-a.bytes).map(({format:o,srcset:a})=>({format:o,srcset:a}))}function ly(e){let i=oi(e);if(!i)return;return{src:i.fallback.url,srcset:i.sources[i.fallback.format]||"",sources:ai(i).map(({format:n,srcset:o})=>({type:`image/${n}`,srcset:o})),width:i.source.width,height:i.source.height,placeholder:ii(e)?void 0:i.placeholder?.dataUrl}}function $s(){let e=we();e.catalog=new Map,e.transparent=new Set}function An(e){let i=we();i.catalog=new Map(e.entries),i.transparent=new Set(e.transparent)}async function uy(e,i,n={}){if(!e||!K.existsSync(e))return $s(),{count:0,fingerprint:""};if(n.offThread){let d=await We("delivery",{publicDir:e,outputDir:i});if(d!==_e)return An(d.state),d.result}let o=await Pt(e);if(o.length===0)return $s(),{count:0,fingerprint:""};let a=Cn(i),c=o.filter((d)=>{let x=a[d.relativePath];if(!x)return!0;let k=kt(d.absolutePath);return!k||k.mtimeMs!==x.mtimeMs||k.size!==x.size});if(c.length===0)return $s(),{count:0,fingerprint:""};let l=Ct(V.join(i,"_stx","images"),`${gn}:${wt()}`),u={outDir:V.join(i,"_stx","images"),storage:Ct(V.join(i,"_stx","images"),`${pn}:${wt()}`),baseUrl:ve,widths:dn,formats:["avif","webp"],quality:{avif:70,webp:78,jpeg:82,png:100},includeOriginal:!1,placeholder:!0,batchConcurrency:4,concurrency:4},{createImageDeliveryCatalog:f}=await import("ts-images/delivery"),v=c,y;try{y=await f({...u,entries:Rt(c,l)})}catch(d){if(v=await Sn(c),v.length===c.length)throw d;let x=new Set(v.map((A)=>A.relativePath)),k=!1;for(let A of c){if(x.has(A.relativePath))continue;let R=kt(A.absolutePath);if(!R)continue;a[A.relativePath]=R,k=!0}if(k)Rn(i,a);if(v.length===0)return $s(),{count:0,fingerprint:""};y=await f({...u,entries:Rt(v,l)})}let h=await wn(y.entries),C=$n(y.entries,h),S=we();S.catalog=new Map(Object.entries(y.entries)),S.transparent=h;let b=h.size===0&&C.length===0?y.fingerprint:At("sha256").update(y.fingerprint).update(JSON.stringify({transparent:[...h].sort(),droppedWebp:C.sort()})).digest("hex");return{count:v.length,fingerprint:b}}class _t{builtins=new Map;registerBuiltin(e){this.builtins.set(e.name.toLowerCase(),e);for(let i of e.aliases)this.builtins.set(i.toLowerCase(),e)}isBuiltin(e){return this.builtins.has(e.toLowerCase())}getBuiltin(e){return this.builtins.get(e.toLowerCase())??null}async resolveFile(e,i,n,o){let a=$i(e,o);if(a!==void 0)return a;for(let c of Ai(e,i,n,o))if(await s(c))return c;return null}}var fe=new _t;var ne="\x00stx-boolean-attribute";function Xe(e){return e.indexOf("\x00")===-1?e:e.replace(/\0/g,"")}var Pn=new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","part","role","slot","spellcheck","style","tabindex","title","translate","accept","action","alt","autocomplete","capture","cite","cols","colspan","content","controls","datetime","default","download","enctype","for","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","href","hreflang","kind","label","loading","loop","max","maxlength","media","method","min","minlength","multiple","muted","name","open","pattern","placeholder","playsinline","poster","preload","readonly","referrerpolicy","rel","required","reversed","rows","rowspan","scope","selected","shape","size","span","src","srcdoc","srclang","srcset","start","step","target","type","usemap","value","width","wrap"]);function Ze(e){let i=e.toLowerCase();return i.startsWith("aria-")||i.startsWith("data-")||Pn.has(i)}function re(e,i){let n=[];for(let[o,a]of Object.entries(e.static)){if(i.has(o))continue;let c=e.staticNames?.[o]??o;if(typeof a==="boolean"){if(a)n.push(g(c));continue}if(a===ne){n.push(g(c));continue}n.push(`${g(c)}="${Nn(c,Xe(String(a)))}"`)}return n}function ie(e,i){let n=[];for(let[o,a]of Object.entries(e.serverDynamic??{})){if(i.has(o))continue;if(a===null||a===void 0||a===!1)continue;let c=e.serverDynamicNames?.[o]??o;if(a===!0){n.push(g(c));continue}if(typeof a==="object")continue;n.push(`${g(c)}="${Nn(c,Xe(String(a)))}"`)}return n}function In(e){if(e.clientReactive.to)return{value:e.clientReactive.to,reactive:!0};if(e.serverDynamic.to!==void 0)return{value:String(e.serverDynamic.to),reactive:!1};if(typeof e.static.to==="string")return{value:e.static.to,reactive:!1};return{value:"#",reactive:!1}}var Ve={name:"StxLink",aliases:["stx-link"],render(e,i,n){let o=In(e),a=(typeof e.static.class==="string"?e.static.class:"")||(typeof e.static.className==="string"?e.static.className:""),c=typeof e.static.activeClass==="string"?e.static.activeClass:"active",l=typeof e.static.exactActiveClass==="string"?e.static.exactActiveClass:"exact-active",u=e.static.prefetch===!0||e.static.prefetch==="true"||e.serverDynamic.prefetch===!0,f=[];if(o.reactive)f.push(`:href="${r(o.value)}"`);else f.push(`href="${r(Dr(o.value,"navigable"))}"`);if(a)f.push(`class="${r(a)}"`);if(f.push("data-stx-link"),f.push(`data-stx-active-class="${r(c)}"`),f.push(`data-stx-exact-active-class="${r(l)}"`),u)f.push("data-stx-prefetch");let v=typeof e.static.activeMatch==="string"?e.static.activeMatch.trim():"";if(v)f.push(`data-stx-active-match="${r(v)}"`);let y=new Set(["to","class","className","activeClass","exactActiveClass","activeMatch","prefetch"]);return f.push(...re(e,y)),f.push(...ie(e,y)),`<a ${f.join(" ")}>${i}</a>`}};var _n=new Map;function Ge(e){if(!e)return;let i=e.split("?")[0].split("#")[0];return _n.get(i)}var En={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Ke=[320,640,768,1024,1280,1536,1920];function H(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}function Ne(e,i,n=!1){let o=e.serverDynamic[i];if(o!==void 0)return o!==!1&&o!=="false";let a=e.static[i];if(a!==void 0)return a!=="false"&&a!==!1;return n}function Je(e){if(e.includes("(")||e.includes(","))return e;let i=e.trim().split(/\s+/),n=[];for(let o of i)if(o.includes(":")){let[a,c]=o.split(":"),l=En[a];if(l)n.push(`(max-width: ${l}px) ${c}`);else{let u=Number.parseInt(a);if(!Number.isNaN(u))n.push(`(max-width: ${u}px) ${c}`)}}else n.push(o);return n.join(", ")}function Qe(e,i,n,o){return i.map((a)=>`${$e(e,a,void 0,n,o)} ${a}w`).join(", ")}function On(e,i,n,o,a){return i.map((c)=>{let l=n?n*c:void 0;return`${$e(e,l,void 0,o,a)} ${c}x`}).join(", ")}function $e(e,i,n,o,a){if(!o||o==="local"||o==="static")return e;if(o==="cloudinary"){let c=[];if(i)c.push(`w_${i}`);if(n)c.push(`h_${n}`);if(a)c.push(`f_${a}`);c.push("q_auto");let l=c.join(",");return e.replace("/upload/",`/upload/${l}/`)}if(o==="imgix"){let c=new URLSearchParams;if(i)c.set("w",String(i));if(n)c.set("h",String(n));if(a)c.set("fm",a);c.set("auto","format");let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}if(o==="bunny"){let c=new URLSearchParams;if(i)c.set("width",String(i));if(n)c.set("height",String(n));if(a)c.set("format",a);let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}return e}function Bn(e){return`var s=this.style;${e.map((i)=>`s.${i}=''`).join(";")}`}function Tn(e,i,n="#e5e7eb"){let o=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${i}"><rect width="100%" height="100%" fill="${n}"/></svg>`;return`data:image/svg+xml;base64,${btoa(o)}`}var et={name:"StxImage",aliases:["Image","stx-image","stx-img"],render(e,i,n){let o=H(e,"src")||"",a=oi(o),c=H(e,"alt")||"",l=H(e,"width")||(a?String(a.source.width):void 0),u=H(e,"height")||(a?String(a.source.height):void 0),f=H(e,"sizes"),v=H(e,"srcset"),y=H(e,"densities"),h=H(e,"format"),C=ii(o)||Ge(o)?.transparent===!0,S=H(e,"placeholder")||(a&&!C?"thumbhash":void 0),b=H(e,"placeholderColor")||"#e5e7eb",d=H(e,"provider"),x=H(e,"class")||H(e,"className")||"",k=H(e,"style")||"",A=H(e,"objectFit")||H(e,"fit"),R=H(e,"objectPosition")||H(e,"position"),E=H(e,"quality"),G=Ne(e,"lazy",!0),z=Ne(e,"preload",!1),B=Ne(e,"priority",!1),L=H(e,"loading"),N=H(e,"decoding")||"async",q=!!a||Ne(e,"picture",!1)||!!h,P=l?Number.parseInt(l):void 0,_=u?Number.parseInt(u):void 0,T=v||"",U="";if(a)T=a.sources[a.fallback.format]||"",U=f?Je(f):"100vw";else if(!T&&f&&d&&d!=="local"&&d!=="static")T=Qe(o,Ke,d,h),U=Je(f);else if(!T&&y){let Z=y.split(/\s+/).map((I)=>Number.parseFloat(I.replace("x","")));T=On(o,Z,P,d,h)}else if(f)U=Je(f);let D=[];if(k)D.push(k);if(A)D.push(`object-fit:${A}`);if(R)D.push(`object-position:${R}`);if(P&&_)D.push(`aspect-ratio:${P}/${_}`);let te=[],ae=S==="blur"||S==="color"||S==="thumbhash";if(ae&&!C){let Z=a?.placeholder?{dataUrl:a.placeholder.dataUrl,color:b}:Ge(o);if(Z&&S==="color")D.push(`background-color:${Z.color}`),te.push("backgroundColor");else if(Z)D.push(`background-color:${Z.color}`),D.push(`background-image:url(${Z.dataUrl})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),te.push("backgroundColor","backgroundImage");else{let I=Tn(P||16,_||9,b);D.push(`background-image:url(${I})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),te.push("backgroundImage")}}else if(!ae&&S&&S!=="empty"&&S!=="none")D.push(`background-image:url(${r(S)})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),te.push("backgroundImage");let j=a?.fallback.url||$e(o,P,_,d,h),X=[];if(X.push(`src="${r(Dr(j,"fetched"))}"`),X.push(`alt="${r(c)}"`),l)X.push(`width="${r(l)}"`);if(u)X.push(`height="${r(u)}"`);let Ce=L||(B||z?"eager":G?"lazy":"");if(Ce)X.push(`loading="${r(Ce)}"`);if(B)X.push('fetchpriority="high"');if(X.push(`decoding="${r(N)}"`),x)X.push(`class="${r(x)}"`);if(D.length>0)X.push(`style="${r(D.join(";"))}"`);if(T)X.push(`srcset="${r(Dr(T,"fetched"))}"`);if(U)X.push(`sizes="${r(U)}"`);let xe=new Set(["src","alt","width","height","lazy","sizes","srcset","placeholder","placeholderColor","class","className","style","objectFit","objectPosition","fit","position","format","provider","quality","densities","preload","priority","picture","loading","decoding"]);if(te.length>0){let Z=typeof e.static.onload==="string"?e.static.onload:"",I=Bn(te)+(Z?`;${Z}`:"");X.push(`onload="${r(I)}"`),xe.add("onload")}X.push(...re(e,xe)),X.push(...ie(e,xe));let le=`<img ${X.join(" ")} />`,Q="";if(z){let I=h==="webp"?"image/webp":h==="avif"?"image/avif":"";Q=`<link rel="preload" as="image" href="${r(j)}"${I?` type="${I}"`:""}${T?` imagesrcset="${r(T)}"`:""}${U?` imagesizes="${r(U)}"`:""} />
|
|
3
|
-
`}if(q){let Z=[];if(a)for(let I of ai(a))Z.push(`<source type="image/${I.format}" srcset="${r(I.srcset)}"${U?` sizes="${r(U)}"`:""} />`);if(!a&&(h==="avif"||h==="auto")){let I=$e(o,P,_,d,"avif"),O=T?Qe(o,Ke,d,"avif"):`${I}`;Z.push(`<source type="image/avif" srcset="${r(O)}"${U?` sizes="${r(U)}"`:""} />`)}if(!a&&(h==="webp"||h==="auto")){let I=$e(o,P,_,d,"webp"),O=T?Qe(o,Ke,d,"webp"):`${I}`;Z.push(`<source type="image/webp" srcset="${r(O)}"${U?` sizes="${r(U)}"`:""} />`)}return`${Q}<picture>
|
|
4
|
-
${Z.join(`
|
|
5
|
-
`)}
|
|
6
|
-
${le}
|
|
7
|
-
</picture>`}return`${Q}${le}`}};var Et="/images/safe-image-default.svg";function de(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}var Dn=`<script>window.__stxSafeImageHandler||(window.__stxSafeImageHandler=function(i){if(i.__stx_fb)return;i.__stx_fb=1;var f=i.getAttribute('data-fallback')||'${Et}';var c=i.getAttribute('data-fallback-class');i.src=f;if(c)i.className=c;});</script>`,tt={name:"SafeImage",aliases:["safe-image","safe-img"],render(e,i,n){let o=de(e,"src")||"",a=de(e,"alt")||"",c=de(e,"fallback")||Et,l=de(e,"class")||de(e,"className")||"",u=de(e,"fallbackClassName")||"",f=[];if(f.push(`src="${r(o)}"`),f.push(`alt="${r(a)}"`),l)f.push(`class="${r(l)}"`);if(f.push(`data-fallback="${r(c)}"`),u)f.push(`data-fallback-class="${r(u)}"`);f.push('onerror="window.__stxSafeImageHandler(this)"');let v=new Set(["src","alt","fallback","class","className","fallbackClassName"]);f.push(...re(e,v)),f.push(...ie(e,v));let y=`<img ${f.join(" ")} />`,h=n.context;if(!h.__safeImageHandlerEmitted)return h.__safeImageHandlerEmitted=!0,`${Dn}${y}`;return y}};function nt(e){return e.replace(/[;{}()]/g,"").replace(/url/gi,"")}function Se(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}function Be(e,i,n){let o=Se(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return n}var rt={name:"StxLoadingIndicator",aliases:["stx-loading-indicator"],render(e,i,n){let o=nt(Se(e,"color")||"#6366f1"),a=nt(Se(e,"initialColor")||Se(e,"initial-color")||""),c=nt(Se(e,"height")||"3px"),l=Be(e,"duration",2000),u=Be(e,"throttle",200),f=Be(e,"zIndex",999999)||Be(e,"z-index",999999),v=a?`linear-gradient(to right, ${a}, ${o})`:o;return`
|
|
8
|
-
<div id="stx-loading-indicator" style="position:fixed;top:0;left:0;right:0;height:${c};background:${v};z-index:${f};transform:scaleX(0);transform-origin:left;transition:transform 0.1s ease-out,opacity 0.3s ease;opacity:0;pointer-events:none">
|
|
9
|
-
<div style="position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.4) 50%,transparent 100%);animation:stx-shimmer 1.5s infinite"></div>
|
|
10
|
-
</div>
|
|
11
|
-
<style>@keyframes stx-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}</style>
|
|
12
|
-
<script>
|
|
13
|
-
(function(){var el=document.getElementById('stx-loading-indicator'),p=0,l=!1,i=null;function u(v){p=Math.min(Math.max(v,0),100);if(el){el.style.opacity=p>0?'1':'0';el.style.transform='scaleX('+(p/100)+')'}}window.stxLoading={start:function(){l=!0;p=0;u(10);if(i)clearInterval(i);i=setInterval(function(){if(!l)return;var r=90-p,inc=Math.max(0.5,r*0.1);if(p<90)u(p+inc)},${u})},finish:function(){l=!1;if(i){clearInterval(i);i=null}u(100);setTimeout(function(){if(el)el.style.opacity='0';setTimeout(function(){p=0;if(el)el.style.transform='scaleX(0)'},300)},200)},set:function(v){u(v)},clear:function(){l=!1;p=0;if(i){clearInterval(i);i=null}if(el){el.style.opacity='0';el.style.transform='scaleX(0)'}}};document.addEventListener('click',function(e){var a=e.target.closest&&e.target.closest('a');if(!a)return;var h=a.getAttribute('href');if(!h||h.startsWith('http')||h.startsWith('#')||h.startsWith('mailto:')||h.startsWith('tel:')||a.target==='_blank')return;window.stxLoading.start()});window.addEventListener('popstate',function(){window.stxLoading.start()});window.addEventListener('load',function(){window.stxLoading.finish()})})();
|
|
14
|
-
</script>`}};function Ot(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}function jn(e,i,n){let o=Ot(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return n}var Nt={"top-right":"top:1rem;right:1rem","top-left":"top:1rem;left:1rem","top-center":"top:1rem;left:50%;transform:translateX(-50%)","bottom-right":"bottom:1rem;right:1rem","bottom-left":"bottom:1rem;left:1rem","bottom-center":"bottom:1rem;left:50%;transform:translateX(-50%)"},st={name:"StxToast",aliases:["stx-toast"],render(e,i,n){let o=r(Ot(e,"position")||"top-right"),a=jn(e,"max",5),c=Nt[o]||Nt["top-right"];return`<div id="stx-toast-container" data-stx-toast-position="${o}" data-stx-toast-max="${a}" style="position:fixed;${c};z-index:999999;display:flex;flex-direction:column;gap:0.5rem;pointer-events:none;max-width:24rem;width:100%"></div>
|
|
15
|
-
<style>
|
|
16
|
-
@keyframes stx-toast-in{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
|
|
17
|
-
@keyframes stx-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}
|
|
18
|
-
@keyframes stx-toast-in-left{from{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}
|
|
19
|
-
@keyframes stx-toast-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-100%)}}
|
|
20
|
-
@keyframes stx-toast-in-center{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}
|
|
21
|
-
@keyframes stx-toast-out-center{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}
|
|
22
|
-
</style>`}};function Te(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}var Bt={sm:"max-width:24rem",md:"max-width:32rem",lg:"max-width:42rem",xl:"max-width:56rem",full:"max-width:calc(100vw - 2rem);max-height:calc(100vh - 2rem)"},it={name:"StxModal",aliases:["stx-modal"],render(e,i,n){let o=Te(e,"id");if(!o)return console.warn('[stx] <StxModal> requires an "id" prop'),"<!-- StxModal: missing id prop -->";let a=r(o),c=Te(e,"size")||"md",l=Te(e,"closeOnBackdrop")!=="false",u=Te(e,"closeOnEscape")!=="false",f=Bt[c]||Bt.md;return`<div id="stx-modal-${a}" class="stx-modal-backdrop" data-stx-modal="${a}" data-close-backdrop="${l}" data-close-escape="${u}" style="display:none;position:fixed;inset:0;z-index:99999;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease" aria-modal="true" role="dialog">
|
|
23
|
-
<div class="stx-modal-panel" style="${f};width:100%;margin:1rem;border-radius:0.75rem;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;transform:scale(0.95) translateY(8px);transition:transform 0.2s ease,opacity 0.2s ease;opacity:0;background:var(--stx-modal-bg,#fff);color:var(--stx-modal-text,#1f2937)">
|
|
24
|
-
<div style="padding:1.5rem">${i}</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<style>
|
|
28
|
-
@media(prefers-color-scheme:dark){[data-stx-modal]{--stx-modal-bg:#1f2937;--stx-modal-text:#f3f4f6}}
|
|
29
|
-
.stx-modal-backdrop[data-stx-modal-open]{display:flex!important;opacity:1}
|
|
30
|
-
.stx-modal-backdrop[data-stx-modal-open] .stx-modal-panel{transform:scale(1) translateY(0);opacity:1}
|
|
31
|
-
</style>`}};function pe(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let n=e.static[i];if(typeof n==="string")return n;return}var Tt={sm:"16rem",md:"24rem",lg:"32rem",xl:"40rem"},ot={name:"StxDrawer",aliases:["stx-drawer"],render(e,i,n){let o=pe(e,"id");if(!o)return console.warn('[stx] <StxDrawer> requires an "id" prop'),"<!-- StxDrawer: missing id prop -->";let a=r(o),c=pe(e,"side")||"right",l=pe(e,"size")||"md",u=pe(e,"closeOnBackdrop")!=="false",f=pe(e,"closeOnEscape")!=="false",v=pe(e,"overlay")!=="false",y=Tt[l]||Tt.md,h=c==="left",C=h?"left:0":"right:0",S=h?"translateX(-100%)":"translateX(100%)",b=h?"stx-drawer-slide-left":"stx-drawer-slide-right";return`<div id="stx-drawer-${a}" class="stx-drawer-backdrop" data-stx-drawer="${a}" data-close-backdrop="${u}" data-close-escape="${f}" style="display:none;position:fixed;inset:0;z-index:99999;${v?"background:rgba(0,0,0,0.5);backdrop-filter:blur(2px)":"background:transparent;pointer-events:none"};opacity:0;transition:opacity 0.2s ease" role="dialog" aria-modal="true">
|
|
32
|
-
<div class="stx-drawer-panel" style="position:fixed;top:0;bottom:0;${C};width:${y};max-width:100vw;transform:${S};transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);background:var(--stx-drawer-bg,#fff);color:var(--stx-drawer-text,#1f2937);box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow-y:auto;pointer-events:auto">
|
|
33
|
-
<div style="padding:1.5rem">${i}</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<style>
|
|
37
|
-
@media(prefers-color-scheme:dark){[data-stx-drawer]{--stx-drawer-bg:#1f2937;--stx-drawer-text:#f3f4f6}}
|
|
38
|
-
.stx-drawer-backdrop[data-stx-drawer-open]{display:block!important;opacity:1}
|
|
39
|
-
.stx-drawer-backdrop[data-stx-drawer-open] .stx-drawer-panel{transform:translateX(0)}
|
|
40
|
-
</style>`}};import{existsSync as Mn,readFileSync as Ln}from"fs";var De=new Map,Dt=new Set;function zn(e){if(Dt.has(e))return;Dt.add(e),console.warn(`[stx] icon collection "${e}" is not installed, so its icons render as nothing. Install it with \`bun add -d @iconify-json/${e}\`.`)}function Un(e){let i=process.cwd();for(let n of[`${i}/node_modules/@iconify-json/${e}/icons.json`,`${i}/pantry/@iconify-json/${e}/icons.json`,`${i}/node_modules/@iconify/json/json/${e}.json`,`${i}/pantry/@iconify/json/json/${e}.json`])if(Mn(n))return n;for(let n of[`@iconify-json/${e}/icons.json`,`@iconify/json/json/${e}.json`])try{return w.resolve(n)}catch{}return null}function Fn(e){if(De.has(e))return De.get(e);let i=Un(e);if(!i)return zn(e),null;try{let n=JSON.parse(Ln(i,"utf8"));return De.set(e,n),n}catch{return null}}function Wn(e,i,n,o){let a=[];if(i.rotate)a.push(`rotate(${i.rotate*90} ${n/2} ${o/2})`);if(i.hFlip)a.push(`translate(${n} 0) scale(-1 1)`);if(i.vFlip)a.push(`translate(0 ${o}) scale(1 -1)`);return a.length?`<g transform="${a.join(" ")}">${e}</g>`:e}function Hn(e,i){let n=i,o=e.icons[n],a={hFlip:!1,vFlip:!1,rotate:0};for(let u=0;!o&&u<8;u++){let f=e.aliases?.[n];if(!f)return null;if(f.hFlip)a.hFlip=!a.hFlip;if(f.vFlip)a.vFlip=!a.vFlip;if(f.rotate)a.rotate=((a.rotate+f.rotate)%4+4)%4;n=f.parent,o=e.icons[n]}if(!o)return null;let c=o.width??e.width??24,l=o.height??e.height??24;return{body:Wn(o.body,a,c,l),width:c,height:l}}function me(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);if(e.static[i]!==void 0)return String(e.static[i]);if(e.clientReactive[i]!==void 0)return e.clientReactive[i];return}var at={name:"Icon",aliases:["icon","stx-icon"],render(e,i,n){let o=me(e,"name")??me(e,"icon");if(!o)return"<!-- Icon: missing name/icon prop -->";let a="lucide",c=o;if(o.includes(":")){let x=o.split(":");a=x[0],c=x[1]}let l=r(me(e,"size")||"24"),u=r(me(e,"color")||"currentColor"),f=r(me(e,"class")||""),v=r(me(e,"style")||""),y=De.get(a)??Fn(a);if(!y)return`<!-- Icon: collection "${a}" not loaded -->`;let h=Hn(y,c);if(!h)return`<!-- Icon: "${c}" not found in ${a} -->`;let C=`0 0 ${h.width} ${h.height}`,S=h.body;if(u!=="currentColor")S=S.replace(/currentColor/g,u);let b=f?` class="${f}"`:"",d=v?` style="${v}"`:"";return`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="${C}" fill="none"${b}${d}>${S}</svg>`}};function jt(e,...i){for(let n of i){if(e.serverDynamic[n]!==void 0)return String(e.serverDynamic[n]);let o=e.static[n];if(typeof o==="string")return o}return}function Mt(e,i){let n=new RegExp(`<(template|div|span)[^>]*\\bslot=["']${i}["'][^>]*>([\\s\\S]*?)<\\/\\1>`,"i"),o=e.match(n);if(!o)return{region:null,rest:e};return{region:o[2],rest:e.replace(o[0],"")}}var ct={name:"Suspense",aliases:["suspense"],render(e,i,n){let o=Mt(i,"fallback"),a=o.rest,c=Mt(a,"error"),l=c.rest,u=o.region??jt(e,"fallback")??'<div class="stx-suspense-loading">Loading\u2026</div>',f=c.region??jt(e,"errorFallback","error-fallback")??'<div class="stx-suspense-error">Something went wrong.</div>';return`<div data-stx-suspense><div data-stx-suspense-fallback>${u}</div><div data-stx-suspense-error hidden>${f}</div><div data-stx-suspense-content hidden>${l}</div></div>`}};function je(e,...i){for(let n of i){if(e.serverDynamic[n]!==void 0)return String(e.serverDynamic[n]);let o=e.static[n];if(typeof o==="string")return o}return}var lt={name:"TransitionGroup",aliases:["transition-group"],render(e,i,n){let o=(je(e,"name")||"v").replace(/["'<>]/g,""),a=(je(e,"tag")||"div").replace(/[^a-z0-9-]/gi,"")||"div",c=je(e,"class"),l=je(e,"id"),u=[`data-stx-transition-group="${o}"`,c?`class="${c}"`:"",l?`id="${l}"`:""].filter(Boolean).join(" ");return`<${a} ${u}>${i}</${a}>`}};function Lt(e=fe){e.registerBuiltin(Ve),e.registerBuiltin(et),e.registerBuiltin(tt),e.registerBuiltin(rt),e.registerBuiltin(st),e.registerBuiltin(it),e.registerBuiltin(ot),e.registerBuiltin(at),e.registerBuiltin(ct),e.registerBuiltin(lt)}var zt=new Map;function qn(e){let i=zt.get(e.source);if(!i)i=new RegExp(`(${e.source})(?![\\w.:-])`,"y"),zt.set(e.source,i);return i}var Ut=new WeakMap;function Ft(e){let i=Ut.get(e);if(!i)i=new Set([...e].map((o)=>o.toLowerCase())),Ut.set(e,i);let n=i;return(o)=>!/[a-z]/.test(o)&&n.has(o.toLowerCase())}function Xn(e,i){let n="";for(let o=i;o<e.length;o++){let a=e[o];if(n){if(a==="\\")o++;else if(a===n)n=""}else if(a==='"'||a==="'")n=a;else if(a===">")return o}return e.length}function Wt(e,i,n){let o=[],a=0,c=typeof n==="function"?n:n?(l)=>n.has(l.toLowerCase()):void 0;while(a<e.length){let l=e.indexOf("<",a);if(l===-1)break;let u=qn(i);u.lastIndex=l+1;let f=u.exec(e);if(!f){a=l+1;continue}let v=f[1];if(c&&c(v)){let x=l+1+v.length;while(x<e.length&&e[x]!==">")x++;a=x+1;continue}let y=l+1+v.length,h=null,C=y,S=-1,b=!1;while(y<e.length){let x=e[y];if(h){if(x==="\\"&&y+1<e.length){y+=2;continue}if(x===h)h=null;y++;continue}if(x==='"'||x==="'"){h=x,y++;continue}if(x==="/"&&y+1<e.length&&e[y+1]===">"){S=y+2,b=!0;break}if(x===">"){S=y+1;break}y++}if(S===-1){a=l+1;continue}let d=e.slice(C,b?S-2:S-1).trim();if(b)o.push({fullMatch:e.slice(l,S),tagName:v,attributes:d,content:"",startIndex:l,endIndex:S,isSelfClosing:!0}),a=S;else{let x=`<${v}`,k=`</${v}>`,A=1,R=S,E=-1;while(A>0&&R<e.length){let B=e.indexOf(x,R),L=e.indexOf(k,R);if(L===-1)break;if(B!==-1&&B<L){let N=e[B+x.length];if(N===" "||N===">"||N==="/"||N===`
|
|
41
|
-
`||N==="\t"){let q=Xn(e,B+x.length);if(e[q-1]!=="/")A++;R=q+1}else R=B+x.length}else{if(A--,A===0){E=L;break}R=L+k.length}}if(E===-1){a=S;continue}let G=e.slice(S,E),z=E+k.length;o.push({fullMatch:e.slice(l,z),tagName:v,attributes:d,content:G,startIndex:l,endIndex:z,isSelfClosing:!1}),a=z}}return o}function ut(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;/g,"'").replace(/'/gi,"'").replace(/&/g,"&")}function kn(e,i){try{let n=Buffer.from(e,"base64").toString("utf8");return JSON.parse(n)}catch{}try{let n=e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");return JSON.parse(n)}catch(n){if(i?.debug)console.error("Error decoding __stx_ prop:",n);return e}}function Me(e,i){let n=0,o="",a=i;while(a<e.length){let c=e[a];if(o){if(c==="\\")a++;else if(c===o)o=""}else if(c==='"'||c==="'"||c==="`")o=c;else if(c==="{")n++;else if(c==="}"){if(n--,n===0)return e.slice(i,a+1)}a++}return e.slice(i)}function Ht(e){let i=e.trim();if(!i.startsWith("{")||!i.endsWith("}"))return null;if(Me(i,0).length!==i.length)return null;return i.slice(1,-1).trim()}function qt(e){let i=[],n=0,o=e.length;while(n<o){while(n<o&&/\s/.test(e[n]))n++;if(n>=o)break;let a="";while(n<o&&!/[\s=]/.test(e[n]))a+=e[n],n++;if(!a)break;while(n<o&&/\s/.test(e[n]))n++;if(n<o&&e[n]==="="){n++;while(n<o&&/\s/.test(e[n]))n++;let c="";if(n<o&&(e[n]==='"'||e[n]==="'")){let l=e[n];n++;while(n<o&&e[n]!==l){if(e[n]==="\\"&&n+1<o)n++,c+=e[n];else c+=e[n];n++}if(n<o)n++}else if(e[n]==="{")c=Me(e,n),n+=c.length;else while(n<o&&!/\s/.test(e[n]))c+=e[n],n++;i.push({name:a,value:c})}else i.push({name:a,value:!0})}return i}var Zn=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]),Vn=new Set([":for","x-for","v-for","@for"]),Xt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Gn(e){return ft(e).map((i)=>[i.start,i.end])}function ft(e){let i=[],n=new Map;for(let o of Oe(e)){let a=o.name.toLowerCase();if(o.closing){let v=n.get(a)?.pop();if(v)v.end=o.end;continue}let l=/(?::for|x-for|v-for|@for)\s*=/.test(o.attributes)?qt(o.attributes).find((v)=>Vn.has(v.name)):void 0,u=typeof l?.value==="string"?l.value:null,f=u!==null?{start:o.start,end:o.end,names:oe(u),tag:a}:null;if(f)i.push(f);if(!o.selfClosing&&!Xt.has(a)){let v=n.get(a);if(!v)v=[],n.set(a,v);v.push(f)}}return i}var Kn=/(?:^|\s)((?:[\w-]+:)*-?space-[xy]-(?!reverse(?:\s|$))[\w./[\]-]+)(?=\s|$)/;function Zt(e){let i=new Map,n=[];for(let o of Oe(e)){let a=o.name.toLowerCase();if(o.closing){for(let l=n.length-1;l>=0;l--)if(n[l].name===a){n.length=l;break}continue}let c=n.at(-1);if(c){if(c.utility&&c.children>0)i.set(o.start,c.utility);if(!/(?:^|\s)hidden(?=[\s=]|$)/.test(o.attributes))c.children++}if(!o.selfClosing&&!Xt.has(a)){let l=/(?:^|\s)class\s*=\s*(["'])([\s\S]*?)\1/.exec(o.attributes)?.[2];n.push({name:a,utility:l?Kn.exec(l)?.[1]??null:null,children:0})}}return i}function Vt(e){if(typeof e==="string")return e;if(Array.isArray(e))return e.filter(Boolean).map((i)=>Vt(i)).join(" ");if(e&&typeof e==="object")return Object.entries(e).filter(([,i])=>i).map(([i])=>i).join(" ");return e?String(e):""}function Nc(e,i){if(!/:[\w-]+=/.test(e))return e;let n=e,o=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,a=[],c;while((c=o.exec(e))!==null)a.push([c.index,c.index+c[0].length]);a.push(...Gn(e));let l=new Set([...mt(i),...Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]]);function u(h){return a.some(([C,S])=>h>=C&&h<S)}let f=[],v=new Map,y=256;for(let h of Oe(n)){if(h.closing||u(h.start))continue;let C=h.attributes.trimEnd();if(!C||!C.includes(":"))continue;let S=/(?:^|\s)data-native(?:\s|=|$)/i.test(C.replace(/"[^"]*"|'[^']*'/g,"")),b=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,d,x=C,k=!1;while((d=b.exec(C))!==null){if(Lr(C,d.index,!0)?.kind==="attribute")continue;let A=d[1],R=d[2];if(Vl(A))continue;if(F(R,l))continue;if(R.includes("()")&&!R.includes(".get(")||R.includes("$store")||R.includes("$ref"))continue;try{let E=Object.keys(i),G=Object.values(i),z=R.match(/^([a-zA-Z_$][\w$]*)/);if(z&&!E.includes(z[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes(z[1]))continue;let B=JSON.stringify([E,R]),L=v.get(B);if(!L){if(L=Function(...E,`return (${R})`),v.size>=y)v.clear();v.set(B,L)}let N=L(...G);if(A==="class"){let q=Y(Vt(N));if(q){let P=x.match(/\sclass="([^"]*)"/);if(P)x=x.replace(P[0],()=>` class="${P[1]} ${q}"`);else x=x.replace(d[0],()=>` class="${q}"`)}else x=x.replace(d[0],"");k=!0;continue}if(Zn.has(A)){if(N)x=x.replace(d[0],` ${A}`);else x=x.replace(d[0],"");k=!0;continue}if(N===null||N===void 0||N===!1)x=x.replace(d[0],"");else{let q=S&&typeof N==="object"?JSON.stringify(N):String(N),P=Nn(A,q);x=x.replace(d[0],()=>` ${A}="${P}"`)}k=!0}catch(E){if(E instanceof he)throw E;continue}}if(k){let A=h.selfClosing?" /":"",E=`<${h.name}${x}${A}>`;f.push({start:h.start,end:h.end,replacement:E})}}if(f.length>0){let h=Array(f.length*2+1),C=0;for(let S=0;S<f.length;S++){let{start:b,end:d,replacement:x}=f[S];h[S*2]=n.slice(C,b),h[S*2+1]=x,C=d}h[f.length*2]=n.slice(C),n=h.join("")}return n}import Gt from"fs";import Kt from"path";var Jt=!1;function Jn(e,i,n,o=!1,a=new Set){let c={static:{},staticNames:{},serverDynamic:{},serverDynamicNames:{},clientReactive:{},events:{}},l=new Set(Array.isArray(i.__stx_client_signal_names)?i.__stx_client_signal_names:[]),u=(C)=>{if(l.size===0)return!1;let S=t(C),b=S.match(/^\s*[!+~(-]*\s*([a-zA-Z_$][\w$]*)/)?.[1];if(b&&l.has(b))return!0;for(let d of l){let x=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`(?:^|[^\\w$.])${x}\\s*\\(`).test(S))return!0}return!1},f=new Set(Ul),v=(C)=>{if(!C.includes("-")||C.startsWith("@")||C.startsWith(":")||C.startsWith("x-")||C.startsWith("__"))return C;if(C.startsWith("aria-")||C.startsWith("data-"))return C;return C.replace(/-([a-z0-9])/g,(S,b)=>b.toUpperCase())},y=(C,S)=>{let b=v(C);if(c.static[b]=S,b!==C)c.staticNames[b]=C},h={...e};for(let[C,S]of Object.entries(e)){let b=/^v-model(?::([a-zA-Z_][a-zA-Z0-9_]*))?((?:\.[a-zA-Z]+)*)$/.exec(C);if(!b)continue;delete h[C];let d=b[1]||"modelValue";if(h[`:${d}`]=S,h[`@update:${d}`]=`${S} = $event`,b[2]){let x=b[2].slice(1).split(".").map((k)=>`${k}: true`).join(", ");h[`:${b[1]?`${d}Modifiers`:"modelModifiers"}`]=`{ ${x} }`}}for(let[C,S]of Object.entries(h)){let b=C.startsWith("x-")&&!f.has(C)&&!C.startsWith("x-bind:")&&!C.startsWith("x-on:")?`:${C.slice(2)}`:C;if(b.startsWith("@")){c.events[b]=S;continue}if(b.startsWith("__stx_")){let d=v(b.slice(6));c.serverDynamic[d]=kn(S,n);continue}if(b.startsWith(":")){let d=v(b.slice(1)),x=S===ne?d:S;if(d==="if"||d==="for"||d==="show"){c.clientReactive[d]=x;continue}if(o){c.clientReactive[d]=x;continue}if(F(x,a)){c.clientReactive[d]=x;continue}if(u(x)){c.clientReactive[d]=x;continue}try{if(!m(x)){if(n.debug)console.error(`Unsafe expression in :${d} binding: ${x}`);c.clientReactive[d]=x;continue}let k=Object.keys(i),A=new Set(["true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","if","else"]),R=new Set(Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]);if(yt(x).some((B)=>!A.has(B)&&(R.has(B)||!k.includes(B)&&!(B in globalThis)))){c.clientReactive[d]=x;continue}let z=p(x,k)(...Object.values(i));if(c.serverDynamic[d]=z,d!==b.slice(1)&&c.serverDynamicNames)c.serverDynamicNames[d]=b.slice(1)}catch{c.clientReactive[d]=x}continue}if(typeof S==="string"&&S.includes("{{")&&S.includes("}}")){let d=tr(S,a);if(d!==null){c.clientReactive[v(b)]=d;continue}let x=S.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(x)try{let k=x[1];if(m(k)){let R=p(k,Object.keys(i))(...Object.values(i));y(b,R!=null?String(R):"")}else{if(n.debug)console.error(`Unsafe expression in ${b}: ${k}`);y(b,S)}}catch(k){if(n.debug)console.error(`Error evaluating expression for ${b}:`,k);y(b,S)}else{let k=S,A=/\{\{\s*([\s\S]+?)\s*\}\}/g,R;while((R=A.exec(S))!==null)try{let E=R[1];if(!m(E)){if(n.debug)console.error(`Unsafe expression in ${b}: ${E}`);continue}let z=p(E,Object.keys(i))(...Object.values(i));k=k.replace(R[0],String(z??""))}catch(E){if(n.debug)console.error(`Error evaluating expression in ${b}:`,E)}y(b,k)}continue}y(b,S===ne?"true":ut(S))}return c}var dt=new Set;function dy(){dt.clear()}function Yn(e){let i=/^\s*(?:<!--[\s\S]*?-->\s*)*<(?:div|span)\b((?:[^>"']|"[^"]*"|'[^']*')*)>/.exec(e);return!!i&&/\sdata-stx-component-wrapper(?=[\s=]|$)/.test(i[1])&&!/\sstx-hydrate(?=[\s=]|$)/.test(i[1])}function Qn(e,i,n){let o=`${n}\x00${e}\x00${i}`;if(dt.has(o))return;dt.add(o);let a=/space-x-/.test(i)?"flex":"flex flex-col",c=i.replace(/space-[xy]-/,"gap-");console.warn(`[stx] <${e}> in ${n} is a later child of a "${i}" stack, so it gets no spacing: the utility puts its margin on the component's scope wrapper, which generates no box. Use "${a} ${c}" on the parent instead -- gap reaches through the wrapper.`)}var gt=new Set;function py(){gt.clear()}function er(e,i){let n=`${i}\x00${e}`;if(gt.has(n))return;gt.add(n),console.warn(`[stx] <${e}> in ${i} is inside a <template :for>, so its props and slot expressions will not see the loop variables and render empty. Put the directive on the element the loop repeats instead -- <tr :for="..."> or <span :for="..." class="contents"> -- which binds correctly.`)}function tr(e,i){if(i.size===0)return null;let n=/\{\{\s*([\s\S]+?)\s*\}\}/g,o=[...e.matchAll(n)];if(!o.some((u)=>F(u[1],i)))return null;let a=e.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(a&&o.length===1)return a[1];let c="",l=0;for(let u of o)c+=e.slice(l,u.index).replace(/[`\\$]/g,(f)=>`\\${f}`),c+=`\${${u[1]}}`,l=u.index+u[0].length;return c+=e.slice(l).replace(/[`\\$]/g,(u)=>`\\${u}`),`\`${c}\``}var nr=[[/@if\s*\(/,"@endif"],[/@unless\s*\(/,"@endunless"]];function rr(e,i,n){if(!e.includes("@"))return e;if(!nr.some(([a,c])=>a.test(e)&&e.includes(c)))return e;try{return ge(e,i,n)}catch{return e}}function ye(e){let i={},n=0,o=e.length;while(n<o){while(n<o&&/\s/.test(e[n]))n++;if(n>=o)break;let a="";while(n<o&&!/[\s=]/.test(e[n]))a+=e[n],n++;if(!a)break;while(n<o&&/\s/.test(e[n]))n++;if(n<o&&e[n]==="="){n++;while(n<o&&/\s/.test(e[n]))n++;let c="";if(n<o&&(e[n]==='"'||e[n]==="'")){let l=e[n];n++;while(n<o){let u=e[n];if(u==="\\"&&n+1<o){n++,c+=e[n],n++;continue}if(u===l){n++;break}c+=u,n++}}else if(e[n]==="{"){c=Me(e,n),n+=c.length;let l=Ht(c);if(l!==null){i[`:${a}`]=l;continue}}else while(n<o&&!/\s/.test(e[n]))c+=e[n],n++;i[a]=c}else i[a]=ne}return i}function Yt(e){return Object.entries(e).map(([i,n])=>n===ne?i:`${i}="${sr(n)}"`).join(" ")}function sr(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function ir(e){let i=new Set,n=/<([A-Z][A-Za-z0-9]*|stx-[a-z0-9-]+)\b[^>]*>/g,o;while((o=n.exec(e))!==null){let a=o[1];if(fe.isBuiltin(a))i.add(a)}return[...i].sort()}async function dg(e,i,n,o,a){if(!/import\s/.test(e))return e;if(!i.__importedComponents)i.__importedComponents=new Map;let c=i.__importedComponents,l=Kt.dirname(n),u=[],f=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi;for(let h of e.matchAll(f)){let[C,S,b]=h,d=/import\s+(?:(\{[^}]*\})|([A-Za-z_$][\w$]*))\s+from\s+['"]([^'"]+)['"]\s*;?\s*\n?/g,x=b,k,A=[];while((k=d.exec(b))!==null){let[R,E,G,z]=k,B=null,L=null;if(z.startsWith(".")||z.startsWith("/")){let P=Kt.resolve(l,z);if(P.endsWith(".stx"))L=P;else{let _=`${P}.stx`;try{if(Gt.statSync(_).isFile())L=_}catch{try{if(Gt.statSync(P).isDirectory())B=P}catch{}}}}else B=Ys(z,l);if(!B&&!L)continue;let N=!1,q=(P,_)=>{c.set(P,_),c.set(P.toLowerCase(),_);let T=P.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();c.set(T,_),a.add(_)};if(G&&L)q(G,L),N=!0;else if(E){let P=E.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean).map((T)=>{let U=T.match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(U)return{source:U[1],local:U[2]};return{source:T,local:T}}),_=B?Or(B):null;for(let{source:T,local:U}of P){let D=null;if(L)D=L;else if(_)D=_.get(T)??_.get(T.toLowerCase())??_.get(T.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())??null;if(D)q(U,D),N=!0}}if(N)A.push({start:k.index,end:k.index+R.length})}if(A.length===0)continue;for(let R=A.length-1;R>=0;R--)x=x.slice(0,A[R].start)+x.slice(A[R].end);u.push({start:h.index,end:h.index+C.length,value:`<script${S}>${x}</script>`})}if(u.length===0)return e;let v=[],y=0;for(let h of u)v.push(e.slice(y,h.start),h.value),y=h.end;return v.push(e.slice(y)),v.join("")}async function or(e,i,n,o,a){let c=e;if(!i.__importedComponents)i.__importedComponents=new Map;let l=i.__importedComponents,u=/@import\s*\(\s*([^)]+)\s*\)/g,f;while((f=u.exec(c))!==null){let[v,y]=f,h=y.split(",").map((C)=>C.trim().replace(/^['"]|['"]$/g,"")).filter((C)=>C.length>0);for(let C of h){let S=C.split("/"),d=S[S.length-1].replace(/\.stx$/,""),x=d.includes("-")?d.split("-").map((R)=>R.charAt(0).toUpperCase()+R.slice(1)).join(""):d.charAt(0).toUpperCase()+d.slice(1),k=null,A=Zs(C,n,o);for(let R of A)try{if(await Bun.file(R).exists()){k=R;break}}catch{}if(k){l.set(x,k),l.set(d,k),l.set(d.toLowerCase(),k);let R=x.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();if(l.set(R,k),a.add(k),o.debug)console.log(`Imported component: ${x} -> ${k}`)}else if(o.debug)console.warn(`Could not resolve imported component: ${C}`)}c=c.replace(v,""),u.lastIndex=0}return c}async function ar(e,i,n,o,a){let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=/@component\s*\(/g,v;while((v=f.exec(c))!==null){let y=v.index,h=y+v[0].length-1,C=1,S=h+1;while(S<c.length&&C>0){if(c[S]==="(")C++;else if(c[S]===")"){if(C--,C===0)break}S++}if(C!==0)break;let b=c.substring(h+1,S),d=S+1,x=b.match(/^\s*['"]([^'"]+)['"]/);if(!x){f.lastIndex=d;continue}let k=x[1],A,R=b.slice(x[0].length),E=R.match(/^\s*,\s*/);if(E)A=R.slice(E[0].length).trim();let G={};if(A)try{G=M(A,i)}catch(P){let _=P instanceof Error?P.message:String(P);c=c.replace(c.substring(y,d),`[Error parsing component props: ${_}]`);continue}let z="",B=d,N=c.substring(d).match(/^([\s\S]*?)@endcomponent/);if(N)z=N[1].trim(),B=d+N[0].length;let q=await Ye(k,G,z,l,i,n,o,u,a);c=c.substring(0,y)+q+c.substring(B),f.lastIndex=0}return c}async function cr(e,i,n,o,a){if(!e)return e;let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=fr(c);if(f.size>0){let d=Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[];i.__stx_client_declared_names=[...new Set([...d,...f])]}let v=se(c);c=v.output;let y=mt(i);return c=await b(c,/[a-z][a-z0-9]*-[a-z0-9-]*/,!1),c=await b(c,/[A-Z][a-zA-Z0-9]*/,!0,Ft(jr)),c=await b(c,/[a-z][a-z0-9]*/,!1,jr),c=v.restore(c),c;async function b(d,x,k,A){if(!d)return d;let R=d,E=Wt(R,x,A),G=ft(R),z=!o._nativeHostAttrs&&/space-[xy]-/.test(R),B,L=new Map;for(let P=E.length-1;P>=0;P--){let _=E[P],T=k?J(_.tagName):_.tagName,U=ye(rr(_.attributes,i,n)),D=G.filter(({start:O,end:W})=>_.startIndex>=O&&_.startIndex<W);if(D.some((O)=>O.tag==="template"))er(_.tagName,n);let te=D.length>0,ae=new Set(y);for(let O of D)for(let W of O.names)ae.add(W);let j=Jn(U,i,o,te,ae);if(typeof j.clientReactive.for==="string")for(let O of oe(j.clientReactive.for))ae.add(O);let X=fe.getBuiltin(_.tagName),Ce=X?await zr(_.tagName,l,i,n,{...o,_nativePrimitivesFallback:void 0}):!1,xe=_.tagName==="Image"&&Qs([...Object.keys(j.static),...Object.keys(j.serverDynamic),...Object.keys(j.clientReactive)],Object.keys(j.events),{...j.static,...j.serverDynamic})&&(o._pluginComponentDirs??[]).some((O)=>Or(O).has("Image"));if(X&&!Ce&&!xe){let O={context:i,filePath:n,options:o,dependencies:a},W=X.render(j,_.content,O);if(Object.keys(j.events).length>0){let ce=Yt(j.events);W=W.replace(/^(\s*<[a-zA-Z][a-zA-Z0-9-]*)/,`$1 ${ce}`)}if(Object.keys(j.clientReactive).length>0)W=Qt(W,j.clientReactive);L.set(P,W);continue}if(!k&&_.tagName.includes("-")&&!await zr(T,l,i,n,o))continue;let le={};for(let[O,W]of Object.entries(j.static))le[O]=W;for(let[O,W]of Object.entries(j.serverDynamic))le[O]=W;let Q={declaredProps:new Set,consumedProps:new Set,reactiveProps:Object.keys(j.clientReactive),events:Object.keys(j.events)},Z=await Ye(T,le,v.restore(_.content),l,i,n,o,u,a,[...ae],Q,_.tagName);if(z&&Yn(Z)){B??=Zt(R);let O=B.get(_.startIndex);if(O)Qn(_.tagName,O,n)}let I=Z;if(I=lr(I,j,Q.declaredProps,Q.consumedProps,o._nativeHostAttrs),o._nativeHostAttrs){let O=Q.reactiveProps.filter((ee)=>!Q.consumedProps.has(ee)&&!["if","for","show","key","ref"].includes(ee)).map(J),W=pt(I,!0);if(O.length&&W){if(!Object.hasOwn(ye(I.slice(W.insertPos,W.tagEnd)),"data-stx-native-host-root"))I=I.slice(0,W.insertPos)+' data-stx-native-host-root="true"'+I.slice(W.insertPos);let ee=be(I);I=I.slice(0,ee.insertPos)+` data-stx-native-forward="${O.join(" ")}"`+I.slice(ee.insertPos)}let ce=pt(I,!0);if(ce){let ee=ye(I.slice(ce.insertPos,ce.tagEnd)),Re=be(I),rn=ye(I.slice(Re.insertPos,Re.tagEnd));if(Object.hasOwn(ee,"data-stx-native-host-root")&&!Object.hasOwn(rn,"data-stx-native-host-owner"))I=I.slice(0,Re.insertPos)+" data-stx-native-host-owner"+I.slice(Re.insertPos)}}if(Object.keys(j.events).length>0){let O=be(I);if(O){let W=Yt(j.events),ce=Object.keys(j.events).map((ee)=>ee.replace(/^@/,"").split(".")[0]).join(" ");I=I.substring(0,O.insertPos)+` data-stx-parent-events="${ce}" ${W}`+I.substring(O.insertPos)}}if(Object.keys(j.clientReactive).length>0)I=Qt(I,j.clientReactive);L.set(P,I)}if(L.size===0)return R;let N="",q=0;for(let P=0;P<E.length;P++){let _=L.get(P);if(_===void 0)continue;N+=R.slice(q,E[P].startIndex),N+=_,q=E[P].endIndex}return N+=R.slice(q),N}}function Qt(e,i){let n=new Set(["if","for"]),o=new Set(["show"]),a=Object.entries(i).filter(([y])=>!n.has(y)),c=a.filter(([y])=>!o.has(y)).map(([y])=>J(y)).join(" "),l=e,u=a.length>0?be(l):null;if(u){let y=a.map(([C,S])=>`:${J(C)}="${S.replace(/"/g,""")}"`).join(" "),h=c?` data-stx-parent-bindings="${c}"`:"";l=l.substring(0,u.insertPos)+`${h} ${y}`+l.substring(u.insertPos)}let f=i.if;if(f)l=`<template :if="${f.replace(/"/g,""")}">${l}</template>`;let v=i.for;if(v){let y=i.key,h=y?` :key="${y.replace(/"/g,""")}"`:"";l=`<template :for="${v.replace(/"/g,""")}"${h}>${l}</template>`}return l}function lr(e,i,n=new Set,o=new Set,a=!1){let c=pt(e,a);if(!c)return e;let l=a?be(e):null;if(l){let u=tn(e,l).filter((f)=>f.insertPos>c.insertPos);for(let f=u.length-1;f>=0;f--)e=en(e,u[f],i,n,o,a)}return en(e,c,i,n,o,a)}function en(e,i,n,o,a,c){let l=e.slice(i.insertPos,i.tagEnd),u=n.serverDynamic.class??n.static.class;if(c&&typeof u==="string"&&u&&!a.has("class")){let b=/(^|\s)class\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i,d=b.test(l)?l.replace(b,(x,k,A,R,E)=>`${k}class="${r(`${ut(A??R??E)} ${u}`)}"`):` class="${r(u)}"${l}`;e=e.slice(0,i.insertPos)+d+e.slice(i.tagEnd),i.tagEnd+=d.length-l.length,l=d}let f=c||/\bdata-native(?:\s|=)/i.test(l),v=f?a:o,y=new Set(Object.keys(ye(l))),h=new Set(["class","className"]);for(let b of Object.keys(n.static)){let d=n.staticNames[b]??b;if(y.has(d)||v.has(b)||!f&&!Ze(d))h.add(b)}for(let b of Object.keys(n.serverDynamic)){let d=n.serverDynamicNames?.[b]??b;if(y.has(d)||v.has(b)||!f&&!Ze(d))h.add(b)}let C=[];if(f){for(let[b,d]of Object.entries(n.static)){if(h.has(b)||d!==!0&&d!==ne)continue;h.add(b),C.push(`${r(n.staticNames?.[b]??b)}="true"`)}for(let[b,d]of Object.entries(n.serverDynamic)){if(h.has(b)||d!==!0)continue;h.add(b),C.push(`${r(n.serverDynamicNames?.[b]??b)}="true"`)}}let S=[...re(n,h),...ie(n,h),...C];if(f){for(let[b,d]of Object.entries(n.serverDynamic)){if(h.has(b)||d!==!1)continue;let x=n.serverDynamicNames?.[b]??b;S.push(`${r(x)}="false"`)}for(let[b,d]of Object.entries(n.serverDynamic)){if(h.has(b)||d===null||typeof d!=="object")continue;let x=JSON.stringify(d);if(x!==void 0){let k=n.serverDynamicNames?.[b]??b;S.push(`${r(k)}="${r(x)}"`)}}}if(S.length===0)return e;return`${e.slice(0,i.insertPos)} ${S.join(" ")}${e.slice(i.insertPos)}`}function be(e){let i=nn(e,0);if(i)return i;let n=/<([a-zA-Z][a-zA-Z0-9-]*)\b[^>]*\bdata-stx-scope(?:\s|=|>)/i.exec(e);if(n)return{insertPos:n.index+1+n[1].length,tagEnd:ht(e,n.index+1+n[1].length)};return null}function pt(e,i=!1){let n=be(e);if(!n)return null;let o=e.slice(n.insertPos,n.tagEnd),a=/\bdata-stx-component-wrapper(?:\s|=|>|$)/i.test(o)?nn(e,n.tagEnd+1):n;return a&&i?ur(e,a)??a:a}function ur(e,i){return tn(e,i)[0]??null}function tn(e,i){let n=[];if(!e.includes("data-stx-native-host-root"))return n;let o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),a=e.lastIndexOf("<",i.insertPos),c=0,l;while(a>=0&&a<e.length){if(e.startsWith("<!--",a)){let h=e.indexOf("-->",a+4);if(h<0)return n;a=e.indexOf("<",h+3);continue}let u=/^<(\/?)([a-z][\w-]*)\b/i.exec(e.slice(a));if(!u){a=e.indexOf("<",a+1);continue}let f=u[2].toLowerCase(),v=a+u[0].length,y=ht(e,v);if(u[1]){if(c--,l!==void 0&&c<l)l=void 0;if(c<=0)return n}else if(f==="script"||f==="style"){let h=new RegExp(`</${f}\\s*>`,"gi");if(h.lastIndex=y+1,!h.exec(e))return n;a=e.indexOf("<",h.lastIndex);continue}else{let h=ye(e.slice(v,y)),C=c>0&&(Object.hasOwn(h,"data-stx-component-wrapper")||Object.hasOwn(h,"data-stx-native-host-owner")),S=l===void 0&&!C&&Object.hasOwn(h,"data-stx-native-host-root");if(S)n.push({insertPos:v,tagEnd:y});if(!o.has(f)&&e[y-1]!=="/"){if(c++,l===void 0&&(C||S))l=c}else if(c===0)return n}a=e.indexOf("<",y+1)}return n}function nn(e,i){let n=i;while(n<e.length){let o=e.slice(n),a=o.match(/^\s+/);if(a){n+=a[0].length;continue}if(o.startsWith("<!--")){let u=e.indexOf("-->",n+4);if(u===-1)return null;n=u+3;continue}let c=o.match(/^<(script|style)\b[^>]*>/i);if(c){let u=`</${c[1].toLowerCase()}>`,f=e.toLowerCase().indexOf(u,n+c[0].length);if(f===-1)return null;n=f+u.length;continue}let l=o.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(?:\s|>|\/)/);if(!l)return null;return{insertPos:n+1+l[1].length,tagEnd:ht(e,n+1+l[1].length)}}return null}function ht(e,i){let n="";for(let o=i;o<e.length;o++){let a=e[o];if(n){if(a==="\\")o++;else if(a===n)n=""}else if(a==='"'||a==="'")n=a;else if(a===">")return o}return e.length}function fr(e){let i=new Set;for(let n of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi)){let o=n[1];if(!/\bclient\b/.test(o)||/\bserver\b/.test(o))continue;for(let a of Ni(n[2]))i.add(a);for(let a of n[2].matchAll(/^\s*import\s+(?:type\s+)?(?:([\w$]+)\s*,?\s*)?(?:\{([^}]*)\}|\*\s+as\s+([\w$]+))?\s*from\s/gm)){if(a[1])i.add(a[1]);if(a[3])i.add(a[3]);for(let c of(a[2]??"").split(",")){let l=c.replace(/^\s*type\s+/,"").split(/\s+as\s+/).pop().trim();if(/^[A-Za-z_$][\w$]*$/.test(l))i.add(l)}}}return i}async function Rs(e,i,n,o,a){if(!Jt)Lt(fe),Jt=!0;let c=await dg(e,i,n,o,a);c=await or(c,i,n,o,a),c=await ar(c,i,n,o,a);let l=[];for(let u=0;u<3;u++){let f=l.length,v=ke(c,qe,(h,C)=>`\x00STX_COMPONENT_COMMENT_${f+C}\x00`,`STX_COMPONENT_COMMENT:${f}`);l.push(...v.tokens);let y=c;if(c=await cr(v.output,i,n,o,a),c===y)break}if(l.length>0)c=c.replace(/\x00STX_COMPONENT_COMMENT_(\d+)\x00/g,(u,f)=>l[Number(f)]??"");if(o.debug){let u=ir(c);if(u.length>0)console.warn(`[stx] ${n}: unresolved component tag(s) after render passes: ${u.join(", ")}. Check nested component output for malformed root tags or recursive component markup.`)}return c}
|
|
42
|
-
export{oi,ii,ai,ly,$s,uy,kn,Nc,dy,py,dg,Rs};
|
package/dist/chunk-ghmb45zs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Cm}from"./chunk-ng09dc4e.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Cm as buildApp};
|
package/dist/chunk-hc8ks7y3.js
DELETED
package/dist/chunk-hs2a040z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ci,Ei,Dt,Se,$r,Ws,Rr,qs,Ks,xg,Sg,kg,Ar,_g,Cg,Eg,Tg,Yc,Zc,Qc,Ti,el,$g,Lt,jt,Bt,Ft,zt,Ht,ft,Rg}from"./chunk-0b57fgpn.js";export{Rr as Router,Eg as abortNavigation,Ws as bracketPathToRegex,Lt as clearMiddleware,Zc as createClientCookieManager,zt as createMiddlewareContext,Ft as createRouteLocation,Yc as createServerCookieManager,Qc as createStorageManager,Tg as defineMiddleware,Sg as defineRoute,kg as defineRoutes,qs as findErrorPage,Ks as formatRoutes,Ei as generateRouteManifest,Ci as generateRouteTypes,el as getMiddleware,jt as getMiddlewareNames,ft as getRouterScript,Rg as getRouterScriptDev,$g as hasMiddleware,Dt as isFileRequestPath,Bt as loadMiddlewareFromDirectory,$r as matchRoute,Cg as navigateTo,Se as patternToRegex,Ti as registerMiddleware,_g as resetRoutes,Ar as route,Ht as runMiddleware,xg as setAppUrl};
|
package/dist/chunk-hten266c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{y,Fi,wl,vl,Bg,Fg,zg,Hg,Vg,lo,Ug,Xe,ie,Je,Wg,zr,qg,kl,_l,Vi,Ye,s,In,Cl,b,Ce,Ry}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{_l as SIGNAL_COMPOSABLE_CALL,Ce as clearComponentCache,Vi as componentClientSignalNames,Fi as convertToCommonJS,b as createDetailedErrorMessage,Vg as extractDirectiveNames,wl as extractScriptFromTemplate,y as extractVariables,s as fileExists,Ry as getComponentCacheStats,Fg as getPositionInfo,ie as getSharedTranspiler,Cl as getSourceLineInfo,Hg as hasDirectives,vl as hasVariables,qg as isHydrateTrigger,Ug as isJavaScriptScript,Ye as renderComponentWithSlot,In as resolveTemplatePath,Wg as scopeOnRootElement,lo as scopeSequenceKey,Xe as shouldTranspileTypeScript,kl as slotContentHasExpressions,Je as transpileTypeScript,zr as userComponentFileExists,zg as validateDirective,Bg as validateTemplate};
|
package/dist/chunk-jr3fmkq7.js
DELETED
package/dist/chunk-k2fw6paw.js
DELETED
package/dist/chunk-k79dvx67.js
DELETED
package/dist/chunk-kf6j1ht4.js
DELETED
package/dist/chunk-km1k3c4e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Eu,Tu,$u,Ru,Au,Pu,Iu,Ou,Nu,Mu,lh}from"./chunk-fksmr50h.js";export{Eu as createIslandRegistry,lh as default,Mu as generateIslandManifest,$u as generatePartialHydrationCSS,Pu as hydrateAll,Au as hydrateByStrategy,Ru as hydrateIsland,Iu as isHydrated,Ou as onHydrated,Tu as processPartialHydrationDirectives,Nu as processStaticDirectives};
|
package/dist/chunk-knxb6d18.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vn,Zo,Qo,ei,ry,ti}from"./chunk-5dw0xnk6.js";import"./chunk-vw7crz0z.js";import"./chunk-0b57fgpn.js";import"./chunk-esm0pnpz.js";export{Qo as buildServerApi,ry as createServerApi,vn as discoverServerApi,Zo as generateApiTypes,ti as isServerApiSource,ei as productionApiDispatcher};
|
package/dist/chunk-kvjbpbmw.js
DELETED
package/dist/chunk-kx9amwwr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{zo,zh,Hh}from"./chunk-wbpnqr7h.js";import"./chunk-db7h6mgq.js";import"./chunk-5dw0xnk6.js";import"./chunk-qs0zk04y.js";import"./chunk-xc1f0c64.js";import"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Hh as clearComposableCache,zh as getComposableScript,zo as listComposableModules};
|
package/dist/chunk-mhv84p0x.js
DELETED
package/dist/chunk-mxxb3e9v.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{yu,Km,bu,wu,Gm,Xm}from"./chunk-nzegc1hd.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Xm as applySlots,Gm as extractSlotContent,Km as parseSlotElement,yu as parseSlots,wu as processSlots,bu as renderSlot};
|
package/dist/chunk-mz44m7y7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nu,ru}from"./chunk-d1tcw019.js";import"./chunk-5yvgzh6n.js";import"./chunk-n23btj9k.js";import"./chunk-ng09dc4e.js";import"./chunk-pnbeey2h.js";import"./chunk-edpsk4bg.js";import"./chunk-bgkj0rxe.js";import"./chunk-zrvgr3hz.js";import"./chunk-zzqg8y47.js";import"./chunk-3qr9ysey.js";import"./chunk-hnjeqxqy.js";import"./chunk-rdrstnn9.js";import"./chunk-ern5hyvr.js";import"./chunk-nzegc1hd.js";import"./chunk-7nf7mp27.js";import"./chunk-eb5cma4b.js";import"./chunk-8xb09hnn.js";import"./chunk-ffytbb4x.js";import"./chunk-mry67rsk.js";import"./chunk-fksmr50h.js";import"./chunk-7g2snypc.js";import"./chunk-yqpkdecx.js";import"./chunk-k3566kgd.js";import"./chunk-t14bn66j.js";import"./chunk-4hk1mjtv.js";import"./chunk-9hwg13ec.js";import"./chunk-kgyjavqg.js";import"./chunk-wbpnqr7h.js";import"./chunk-qt2mr3f0.js";import"./chunk-czhzr5k1.js";import"./chunk-9y83pdcb.js";import"./chunk-vfctk20v.js";import{gn}from"./chunk-30yqa2jw.js";import{ng}from"./chunk-db7h6mgq.js";import"./chunk-5dw0xnk6.js";import"./chunk-qs0zk04y.js";import{He,i}from"./chunk-3q6x62hs.js";import"./chunk-z744ry8a.js";import"./chunk-nzf3c6n0.js";import"./chunk-de61k0ab.js";import"./chunk-ggchpq5r.js";import"./chunk-ph74v3ag.js";import"./chunk-vw6qytwm.js";import"./chunk-5jrpzepc.js";import"./chunk-xc1f0c64.js";import{Ae}from"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import{Cr,Er}from"./chunk-bzndm04n.js";import"./chunk-4d6p92qh.js";import{Bs,q,a}from"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import{B,y,Ge}from"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";import{ia}from"./chunk-p92272k0.js";import"./chunk-54x7h3sb.js";import"./chunk-5gnt3qtn.js";export{Bs as buildWebComponents,Er as cacheTemplate,Cr as checkCache,gn as classifyAllScripts,nu as createMiddleware,ru as createRoute,q as defaultConfig,y as extractVariables,B as findSfcTemplateBlock,Ae as injectRouterScript,ia as insertBeforeBodyClose,a as loadStxConfig,Ge as processClientScript,i as processDirectives,He as readMarkdownFile,ng as withinBundlerCallback};
|
package/dist/chunk-p3pjfj65.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jf,Yf,Te,Zf,Ec,mn,hn,ty,Tc,yn,mr,Qf,eg,tg,ks,ng,rg,$c,bn,sg,wn,Rc,ny}from"./chunk-db7h6mgq.js";import"./chunk-5dw0xnk6.js";import"./chunk-qs0zk04y.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{mr as MODULE_SPECIFIER_PREFIX,$c as assertBundleBuildCanSettle,Jf as bundleCacheDir,Yf as bundleCacheEntryLimit,ny as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,Te as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,rg as isWithinBundlerCallback,bn as moduleSubstitutionKey,eg as normalizeRegistrySpecifiers,sg as queueClientBundleBuild,Ec as recordBundleFailure,Qf as registryIdForPath,Tc as resolveBundlerFallback,tg as rewriteRegistryImports,ty as setBundlerFallbackMode,Zf as shouldLogBundlerDiagnostics,Rc as tempBuildName,ks as withModuleSubstitutes,ng as withinBundlerCallback};
|
package/dist/chunk-p8eeg64w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dh,Fo,Lh,jh,Bh,Fh}from"./chunk-kgyjavqg.js";import"./chunk-db7h6mgq.js";import"./chunk-5dw0xnk6.js";import"./chunk-qs0zk04y.js";import"./chunk-xc1f0c64.js";import"./chunk-az1eczs2.js";import"./chunk-vbmvft7g.js";import"./chunk-4d6p92qh.js";import"./chunk-4j3zmxzw.js";import"./chunk-kf4z4efe.js";import"./chunk-5mrt1enm.js";import"./chunk-vw7crz0z.js";import"./chunk-150cz8qq.js";import"./chunk-0b57fgpn.js";import"./chunk-fhb86pc9.js";import"./chunk-xwzefw2r.js";import"./chunk-esm0pnpz.js";import"./chunk-945zygwa.js";import"./chunk-7b3dqeyr.js";import"./chunk-rdnpq89q.js";import"./chunk-0jdz31q1.js";import"./chunk-hdfhaddy.js";export{Fh as clearStoreCache,Dh as getStoreScript,Bh as getStoreScriptFor,jh as pageStoresAll,Fo as storesRead,Lh as storesReadInFiles};
|
package/dist/chunk-ph74v3ag.js
DELETED
package/dist/chunk-pjpy86c3.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import i from"path";var Cn=".stx",o="STX_DIR",e=null;function tl(t){e=t?.trim()||null}function Pr(){return process.env[o]?.trim()||e||Cn}function l(t=process.cwd(),...n){let r=Pr();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function Ir(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(Pr(),r):Pr()}
|
|
3
|
-
export{Cn,tl,Pr,l,Ir};
|
package/dist/chunk-pnbeey2h.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ze,z,Jt}from"./chunk-esm0pnpz.js";import{T}from"./chunk-0jdz31q1.js";import{Tt,je,U,st,Be,La,jo,ja,Gn}from"./chunk-3qr9ysey.js";import{Dt,Se,pt}from"./chunk-0b57fgpn.js";import{ei}from"./chunk-5dw0xnk6.js";import{Xn}from"./chunk-gnf1e5q7.js";import{Re}from"./chunk-az1eczs2.js";import Z from"fs";import P from"path";var{serve:ae}=globalThis.Bun;import O from"zlib";import{promisify as Y}from"util";var K=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],ee=["text/event-stream","multipart/x-mixed-replace"],te=1024;function ne(t){if(!t)return!1;let e=t.toLowerCase();if(ee.some((a)=>e.startsWith(a)))return!1;return K.some((a)=>e.startsWith(a))}function re(t){let e=new Map;for(let a of t.split(",")){let[r,...i]=a.trim().split(";"),f=r.trim().toLowerCase();if(!f)continue;let h=1;for(let g of i){let l=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(g);if(!l)continue;let m=Number.parseFloat(l[1]);if(Number.isFinite(m))h=m}e.set(f,h)}return e}function se(t){if(!t)return null;let e=re(t),a=e.get("*"),r=(i)=>e.get(i)??a??0;if(r("br")>0)return"br";if(r("gzip")>0)return"gzip";return null}var J=33554432,V=new Map,D=0;function oe(t,e){if(e.length>J/8)return;V.set(t,e),D+=e.length;for(let[a,r]of V){if(D<=J)break;V.delete(a),D-=r.length}}async function Un(t,e,a={}){if(e.headers.get("content-encoding"))return e;if(e.status===204||e.status===304||!e.body)return e;if(!ne(e.headers.get("content-type")))return e;let r=se(t.headers.get("accept-encoding"));if(!r)return e;let i;try{i=new Uint8Array(await e.arrayBuffer())}catch{return e}let f=()=>new Response(i,{status:e.status,statusText:e.statusText,headers:Q(e.headers)});if(i.length<(a.threshold??te))return f();try{let h=a.quality??5,g=`${r}:${h}:${i.length}:${Bun.hash(i)}`,l=V.get(g);if(!l)l=r==="br"?await Y(O.brotliCompress)(i,{params:{[O.constants.BROTLI_PARAM_QUALITY]:h,[O.constants.BROTLI_PARAM_SIZE_HINT]:i.length}}):await Y(O.gzip)(i),oe(g,l);if(l.length>=i.length)return f();let m=Q(e.headers);return m.set("Content-Encoding",r),m.set("Content-Length",String(l.length)),new Response(l,{status:e.status,statusText:e.statusText,headers:m})}catch{return f()}}function Q(t){let e=new Headers(t),a=e.get("Vary");if(!a)return e.set("Vary","Accept-Encoding"),e;if(!a.split(",").some((i)=>i.trim().toLowerCase()==="accept-encoding"))e.set("Vary",`${a}, Accept-Encoding`);return e}class G{now;entries=new T(1000,{maxBytes:33554432,sizeOf:(t)=>t.body.byteLength+JSON.stringify(t.headers).length*2});pending=new Map;generation=0;constructor(t=Date.now){this.now=t}invalidate(t){this.generation++,this.pending.clear();for(let e of Array.from(this.entries.keys()))if(t===void 0||this.entries.get(e)?.path===t)this.entries.delete(e)}async respond(t,e,a){let r,i=async()=>{let s=r??await a();return s.headers.set("Cache-Control","private, no-store"),s.headers.set("Vary",U(s.headers.get("Vary")).Vary),s};if(!e||t.method!=="GET"||t.headers.has("Cookie")||t.headers.has("Authorization")||t.headers.has("Range"))return i();let f=new URL(t.url),h=`${f.origin}${f.pathname}${f.search}|${je(t)?"fragment":"document"}`,g=this.entries.get(h),l=(s)=>{let b=new Headers(s.headers);return b.set("Cache-Control","private, no-store"),b.set("Age",String(Math.max(0,Math.floor((this.now()-s.created)/1000)))),new Response(s.body.slice(0),{headers:b})},m=g?(this.now()-g.created)/1000:1/0;if(g&&m<e.maxAge)return l(g);let v=this.generation,_=async()=>{let s=await a();r=s;let b=(s.headers.get("Vary")??"").toLowerCase().split(",").map((y)=>y.trim()).filter(Boolean);if(s.status!==200||s.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(s.headers.get("Cache-Control")??"")||b.some((y)=>y!=="x-stx-router"&&y!=="accept-encoding"))return null;let E=await s.clone().arrayBuffer();if(E.byteLength>1048576)return null;s.headers.set("Vary",U(s.headers.get("Vary")).Vary);let n={body:E,headers:Array.from(s.headers.entries()),created:this.now(),path:f.pathname};if(this.generation===v)this.entries.set(h,n);return n},x=this.pending.get(h);if(!x){if(this.pending.size>=1000)return i();x=_().finally(()=>{if(this.pending.get(h)===x)this.pending.delete(h)}),this.pending.set(h,x)}if(g&&m<e.maxAge+(e.swr??0))return x.catch(()=>{}),l(g);let M=await x;return M?l(M):i()}}var ie={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function Em(t={}){let e=P.resolve(t.outputDir||".output"),a=t.port??3000,r=La(e);if(!r)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${r.routes.length} routes...`);let i=Xn(r.routeRules),f=new G,h=ei(e,r.apiRoutes??[]),g=Bun.file(P.join(e,"server/runtime-config.json")),l=t.runtimeConfig??(await g.exists()?await g.json():void 0),m=l?z(l):void 0,v=new Map,_=new Map,x=new Map,M=new Map;for(let n of r.routes)try{let y=P.join(e,n.compiledPath),c=JSON.parse(await Bun.file(y).text());if(m)c.html=Jt(c.html,m);v.set(n.pattern,c),x.set(n.pattern,pt(c.html)),M.set(n.pattern,Re(c.html));let j=P.join(e,n.fragmentPath);if(st(c.html,r.routerContainer||"main")&&await Bun.file(j).exists()){let A=await Bun.file(j).text();_.set(n.pattern,m?Jt(A,m):A)}}catch(y){console.warn(`[stx] Failed to load route ${n.pattern}:`,y)}let s=new Map,b=[];for(let n of r.routes)if(n.hasParams){let{regex:y,params:c}=Se(n.pattern,{page:!0});b.push({regex:y,route:n,paramNames:c})}else s.set(n.pattern,n);let E=ae({port:a,async fetch(n){return Un(n,await Ze(m??z(),async()=>{let c=new URL(n.url).pathname;if(t.onRequest){let p=await t.onRequest(n);if(p)return p}if(t.apiRouter){let p=await t.apiRouter.handleRequest(n);if(p.status!==404)return p}if(t.apiRoutes?.[c])return t.apiRoutes[c](n);let j=await h(n);if(j)return j;if((n.method==="GET"||n.method==="HEAD")&&c!=="/"){let p=P.resolve(e,"public"),d;try{d=decodeURIComponent(c)}catch{d=c}if(!d.includes("\x00")){let u=P.resolve(p,`.${d}`);if(u===p||u.startsWith(`${p}${P.sep}`))try{if(Z.existsSync(u)&&Z.statSync(u).isFile()){let R=P.extname(u).toLowerCase(),B=ie[R]||"application/octet-stream",X=c.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(c);return new Response(Bun.file(u),{headers:{"Content-Type":B,"Cache-Control":X?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let A=je(n),C=null,q={};if(C=s.get(c)||null,!C)for(let{regex:p,route:d,paramNames:u}of b){let o=c.match(p);if(o){C=d,u.forEach((R,B)=>{q[R]=o[B+1]});break}}if(!C){let p=Dt(c)?null:s.get("/404")||null;if(p){let d=v.get(p.pattern);if(d)return new Response(d.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain; charset=utf-8"}})}let N=i(c),W=Object.keys(N).length>0;return f.respond(n,N.cache,async()=>{let p=v.get(C.pattern);if(A&&n.method==="GET"&&p&&!p.hasServerScripts&&Object.keys(p.placeholders).length===0){let o=_.get(C.pattern);if(o){let R=x.get(C.pattern);return new Response(o,{status:p.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...M.has(C.pattern)?{"X-STX-Runtime":M.get(C.pattern)?"true":"false"}:{},...R?{"X-STX-Layout":R.layout,"X-STX-Layout-Group":R.group}:{},...U(),...N.cache?{}:{"Cache-Control":Tt}}})}}let d=jo(n.method),u=v.get(C.pattern);if(!u){let o=s.get("/500")||null;if(o){let R=v.get(o.pattern);if(R)return new Response(R.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(C.prerendered&&d)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!d&&!u.hasServerScripts&&Object.keys(u.placeholders).length===0)return new Response(u.html,{status:u.status??200,headers:{"Content-Type":"text/html",...U(),"Cache-Control":"public, max-age=60"}});try{let{html:o,boundaries:R,redirect:B,cookies:X,status:H,headers:F}=await Gn(u,{params:q,request:n,method:n.method,__stx_strict_hydration:W,__stx_runtime_config:m});if(B)return ja(B,X,F);if(R&&R.length>0){let{renderStreamingPage:S,streamToResponse:I}=await import("./chunk-tyv0csb4.js"),L=new Headers({...U(),...F,"Cache-Control":"private, no-store"});for(let k of X??[])L.append("Set-Cookie",k);if(A&&!d&&st(o,r.routerContainer||"main")){let k=pt(o);L.set("X-STX-Fragment","true"),L.set("X-STX-Runtime",Re(o)?"true":"false"),L.set("X-STX-Layout",k.layout),L.set("X-STX-Layout-Group",k.group)}return I(S(A&&!d&&st(o,r.routerContainer||"main")?Be(o,r.routerContainer||"main",!0):o,R,{timeoutMs:30000}),{status:H??u.status??200,headers:L})}let w=new Headers({"Content-Type":"text/html",...U(),...N.cache?{}:{"Cache-Control":"private, no-store"}});for(let S of X??[])w.append("Set-Cookie",S);for(let[S,I]of Object.entries(F??{}))w.set(S,I);if(w.set("Vary",U(w.get("Vary")).Vary),A&&!d&&st(o,r.routerContainer||"main")){let S=pt(o);return w.set("X-STX-Fragment","true"),w.set("X-STX-Runtime",Re(o)?"true":"false"),w.set("X-STX-Layout",S.layout),w.set("X-STX-Layout-Group",S.group),new Response(Be(o,r.routerContainer||"main",!0),{status:H??u.status??200,headers:w})}return new Response(o,{status:H??u.status??200,headers:w})}catch(o){if(console.error(`[stx] Hydration error for ${c}:`,o),W)return new Response("Internal Server Error",{status:500});return new Response(u.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${E.port}`),console.log(`[stx] Serving ${r.routes.length} routes (${v.size} pre-loaded)`),{port:E.port,stop:()=>{f.invalidate(),E.stop()},invalidate:(n)=>f.invalidate(n)}}
|
|
3
|
-
export{Un,Em};
|
package/dist/chunk-ps5wfd4c.js
DELETED
package/dist/chunk-qzx6h6af.js
DELETED