@stacksjs/stx 0.2.422 → 0.2.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ep5jnqdb.js → chunk-02n071n7.js} +6 -6
- package/dist/chunk-03n23sh6.js +2 -0
- package/dist/chunk-07mxghsz.js +2 -0
- package/dist/{chunk-kjkwycce.js → chunk-0bmc75w6.js} +4 -4
- package/dist/{chunk-hyak4dzg.js → chunk-0hhq9hbq.js} +3 -3
- package/dist/{chunk-66k7yxnr.js → chunk-12pvnn1e.js} +4 -4
- package/dist/chunk-1497wcxc.js +2 -0
- package/dist/chunk-17n9e5wk.js +2 -0
- package/dist/chunk-1p8hc1ve.js +2 -0
- package/dist/chunk-1r3ghgsz.js +2 -0
- package/dist/{chunk-681cxw8j.js → chunk-24e7qjb8.js} +2 -2
- package/dist/chunk-259ecbwa.js +2 -0
- package/dist/chunk-26gfsa9w.js +2 -0
- package/dist/{chunk-zp0mg8b2.js → chunk-2bpjq1qz.js} +2 -2
- package/dist/{chunk-11ra3sbc.js → chunk-2x9jd5w0.js} +3 -3
- package/dist/{chunk-k31fwm2w.js → chunk-3hmy75tw.js} +5 -5
- package/dist/{chunk-12b8akfg.js → chunk-3pxp0r0a.js} +3 -3
- package/dist/{chunk-x5ks23vx.js → chunk-3ry9ca1s.js} +2 -2
- package/dist/{chunk-th9s15es.js → chunk-45rfv3a5.js} +2 -2
- package/dist/chunk-47apfsxp.js +2 -0
- package/dist/{chunk-w72p2ak0.js → chunk-48kgnqpk.js} +4 -4
- package/dist/{chunk-rsxvbnp4.js → chunk-4hd5wb8x.js} +3 -3
- package/dist/chunk-535nrr6j.js +2 -0
- package/dist/chunk-5mfhk69g.js +2 -0
- package/dist/{chunk-aync8qmk.js → chunk-5vwg3h5g.js} +2 -2
- package/dist/{chunk-tspmynvh.js → chunk-62chbqev.js} +1 -1
- package/dist/chunk-6c7294j8.js +2 -0
- package/dist/{chunk-qwgdtrhj.js → chunk-6cbvx87h.js} +5 -5
- package/dist/{chunk-q0cehgy2.js → chunk-6fsbny9m.js} +3 -3
- package/dist/chunk-6gh2rvyz.js +2 -0
- package/dist/chunk-6j6gbp0y.js +2 -0
- package/dist/chunk-6jgjmycb.js +2 -0
- package/dist/{chunk-w83djypm.js → chunk-6t278w29.js} +2 -2
- package/dist/{chunk-5vfyxxrp.js → chunk-6t7mxb0b.js} +2 -2
- package/dist/chunk-6wmxrn6x.js +2 -0
- package/dist/chunk-6wweqfg7.js +2 -0
- package/dist/{chunk-ja7znxnz.js → chunk-7a9h7ycs.js} +5 -5
- package/dist/chunk-7pbv9mg7.js +2 -0
- package/dist/{chunk-09hhrjk9.js → chunk-89b2r1q0.js} +6 -6
- package/dist/{chunk-0varh725.js → chunk-8a0r2j8f.js} +3 -3
- package/dist/{chunk-gp8xzbyt.js → chunk-8nsbf2mz.js} +1074 -1074
- package/dist/{chunk-mg13q1kd.js → chunk-8zf5q1m3.js} +2 -2
- package/dist/chunk-9d53d0t6.js +2 -0
- package/dist/chunk-9j72har9.js +2 -0
- package/dist/chunk-9yqz5ge5.js +2 -0
- package/dist/chunk-a5c9n7an.js +2 -0
- package/dist/chunk-a836zn7c.js +2 -0
- package/dist/{chunk-kzkjc12e.js → chunk-a8g6y9kw.js} +5 -5
- package/dist/{chunk-21a7p956.js → chunk-acwgap78.js} +1 -1
- package/dist/{chunk-qx3js9tk.js → chunk-aen2baze.js} +1 -1
- package/dist/chunk-ahgrkva8.js +2 -0
- package/dist/chunk-akbb6j7s.js +2 -0
- package/dist/chunk-avakcrbs.js +2 -0
- package/dist/{chunk-tafebmtg.js → chunk-axydabse.js} +2 -2
- package/dist/{chunk-4n6c5rp5.js → chunk-b7973zvk.js} +2 -2
- package/dist/{chunk-ebkpdc45.js → chunk-bxwe7wxj.js} +10 -10
- package/dist/{chunk-2ewa2sg5.js → chunk-c1dmr865.js} +3 -3
- package/dist/chunk-cenq2n6e.js +2 -0
- package/dist/{chunk-zvh2nnzr.js → chunk-cf6htz63.js} +1 -1
- package/dist/chunk-cnmz9543.js +2 -0
- package/dist/{chunk-h1585jbm.js → chunk-cx2rdew4.js} +13 -13
- package/dist/{chunk-wg1ttvs5.js → chunk-cznsm2n3.js} +2 -2
- package/dist/chunk-d1qzhawc.js +2 -0
- package/dist/chunk-d6hnvwre.js +2 -0
- package/dist/{chunk-7abgzdsm.js → chunk-dcwjxq8n.js} +2 -2
- package/dist/chunk-dhqwg62x.js +2 -0
- package/dist/{chunk-95e3rz88.js → chunk-dmd6yk2x.js} +5 -5
- package/dist/chunk-e18qfegt.js +2 -0
- package/dist/chunk-eej89wkt.js +2 -0
- package/dist/chunk-ekxffxbd.js +2 -0
- package/dist/{chunk-hy9e3ny6.js → chunk-ex0tq6x2.js} +1 -1
- package/dist/{chunk-nqr77pxk.js → chunk-fg5ve6ey.js} +2 -2
- package/dist/{chunk-dejsjk4h.js → chunk-fnt1q1sp.js} +11 -11
- package/dist/chunk-g67gg66e.js +2 -0
- package/dist/chunk-gq16fxc2.js +2 -0
- package/dist/{chunk-5e9zkd65.js → chunk-h3c7z73m.js} +2 -2
- package/dist/chunk-h4avjh3q.js +2 -0
- package/dist/chunk-h7qte7ye.js +2 -0
- package/dist/{chunk-hmdnn9ja.js → chunk-hb9gxad0.js} +3 -3
- package/dist/{chunk-dmxh7zwq.js → chunk-hg4k3nkr.js} +1 -1
- package/dist/{chunk-dhxbjw6k.js → chunk-hnep9jbj.js} +2 -2
- package/dist/chunk-hwycbxg7.js +2 -0
- package/dist/{chunk-34gy5zjm.js → chunk-j1q65enz.js} +2 -2
- package/dist/chunk-j5myfxe8.js +18 -0
- package/dist/{chunk-8jqy69td.js → chunk-j7zywbq0.js} +2 -2
- package/dist/{chunk-788g87ft.js → chunk-jbrdebzs.js} +7 -7
- package/dist/{chunk-wr6b99pw.js → chunk-jj4pyeyj.js} +1 -1
- package/dist/{chunk-g1fxmp9z.js → chunk-k8sqs7j2.js} +4 -4
- package/dist/chunk-mg7jhx5v.js +2 -0
- package/dist/chunk-n16wa755.js +2 -0
- package/dist/chunk-ngv1c807.js +2 -0
- package/dist/{chunk-krr2vb0s.js → chunk-p2x7tjbt.js} +3 -3
- package/dist/{chunk-62r4fa4q.js → chunk-ptjqacjd.js} +2 -2
- package/dist/{chunk-597rfddk.js → chunk-qm1tt8g1.js} +2334 -2334
- package/dist/chunk-r7r5h2eh.js +2 -0
- package/dist/chunk-rhkx17d9.js +2 -0
- package/dist/{chunk-b1fg9vg7.js → chunk-s28eh0jn.js} +2 -2
- package/dist/{chunk-837nb4zv.js → chunk-s295vp9x.js} +3 -3
- package/dist/chunk-sazpw71r.js +4 -0
- package/dist/{chunk-20tdz0zs.js → chunk-sbdzqqr1.js} +6 -6
- package/dist/{chunk-qby6wxat.js → chunk-spx27cs4.js} +2 -2
- package/dist/{chunk-n7jjp08m.js → chunk-stxmwytg.js} +2 -2
- package/dist/{chunk-2tfe2g58.js → chunk-t3wh1jbk.js} +6 -6
- package/dist/{chunk-802pr252.js → chunk-tfexmdkt.js} +2 -2
- package/dist/{chunk-2cn8krpp.js → chunk-tfz95n7j.js} +5 -5
- package/dist/chunk-thdbqsxq.js +2 -0
- package/dist/chunk-tpnfcb83.js +2 -0
- package/dist/chunk-tqkv4th9.js +2 -0
- package/dist/chunk-tznejj9h.js +2 -0
- package/dist/{chunk-ap6fehea.js → chunk-vfk725vm.js} +5 -5
- package/dist/chunk-vsrm9k7p.js +2 -0
- package/dist/chunk-vwms759h.js +2 -0
- package/dist/{chunk-xvzxrt9a.js → chunk-w2085fwx.js} +5 -5
- package/dist/chunk-w252cgnv.js +30 -0
- package/dist/chunk-whdw6dhb.js +2 -0
- package/dist/chunk-wtms9jhs.js +3 -0
- package/dist/chunk-wtqjfar3.js +2 -0
- package/dist/chunk-wx7kfet5.js +2 -0
- package/dist/chunk-wy873fy8.js +2 -0
- package/dist/{chunk-d2z6828s.js → chunk-xa3wsmt5.js} +11 -11
- package/dist/chunk-xrbqf77j.js +2 -0
- package/dist/{chunk-757ec865.js → chunk-yaebdyfr.js} +2 -2
- package/dist/chunk-ycpq3gxc.js +2 -0
- package/dist/chunk-yd50awqp.js +3 -0
- package/dist/{chunk-csjw5esc.js → chunk-ydz7w2mt.js} +2 -2
- package/dist/chunk-yjgbxf26.js +2 -0
- package/dist/{chunk-jjnfj9nf.js → chunk-yqsza22w.js} +2 -2
- package/dist/{chunk-3xm6dyab.js → chunk-zbr333kf.js} +88 -27
- package/dist/chunk-zcyjdcpx.js +33 -0
- package/dist/{chunk-tqnysw0k.js → chunk-zfzcedw4.js} +4 -4
- package/dist/chunk-zm73n103.js +2 -0
- package/dist/cli.js +20 -20
- package/dist/component-renderer.js +54 -2
- package/dist/composables/use-outbox.d.ts +1 -0
- package/dist/composables/use-outbox.js +23 -10
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/database.js +2 -2
- package/dist/native/bridge/protocol.d.ts +5 -0
- package/dist/native/bridge/protocol.js +3 -0
- package/dist/native/cli.js +12 -2
- package/dist/native/compiler/bundle.d.ts +4 -3
- package/dist/native/compiler/bundle.js +46 -51
- package/dist/native/compiler/component-mapping.d.ts +5 -0
- package/dist/native/compiler/component-mapping.js +90 -0
- package/dist/native/compiler/html-to-ir.js +42 -6
- package/dist/native/compiler/ir.d.ts +2 -0
- package/dist/native/compiler/render-screen.d.ts +4 -0
- package/dist/native/compiler/render-screen.js +10 -2
- package/dist/native/compiler/setup-script.d.ts +6 -0
- package/dist/native/compiler/setup-script.js +10 -0
- package/dist/native/components/primitives.d.ts +10 -0
- package/dist/native/index.d.ts +6 -24
- package/dist/native/index.js +1 -17
- package/dist/native/primitives/Button.stx +2 -1
- package/dist/native/primitives/Text.stx +2 -1
- package/dist/native/primitives/TextInput.stx +3 -1
- package/dist/native/prop-names.d.ts +2 -0
- package/dist/native/prop-names.js +71 -0
- package/dist/native/runtime/binding-tree.d.ts +31 -0
- package/dist/native/runtime/binding-tree.js +100 -0
- package/dist/native/runtime/craft-bridge.d.ts +9 -0
- package/dist/native/runtime/craft-bridge.js +231 -0
- package/dist/native/runtime/craft.d.ts +28 -3
- package/dist/native/runtime/jsc-globals.d.ts +16 -0
- package/dist/native/runtime/jsc-globals.js +64 -0
- package/dist/native/runtime/native-host.d.ts +3 -1
- package/dist/native/runtime/native-host.js +183 -33
- package/dist/native/runtime/shared-screen.d.ts +15 -0
- package/dist/native/runtime/shared-screen.js +41 -0
- package/dist/pwa.js +3 -3
- package/dist/signal-processing.d.ts +3 -1
- package/dist/signal-processing.js +4 -3
- package/dist/signals.js +77 -16
- package/dist/ssg.js +28 -28
- package/package.json +5 -5
- package/dist/chunk-10fh9qhe.js +0 -2
- package/dist/chunk-1569v24d.js +0 -2
- package/dist/chunk-18awnp9d.js +0 -2
- package/dist/chunk-1r0c5920.js +0 -30
- package/dist/chunk-2hswgxpb.js +0 -2
- package/dist/chunk-4363reg4.js +0 -2
- package/dist/chunk-48axv7bm.js +0 -2
- package/dist/chunk-50hgr79y.js +0 -2
- package/dist/chunk-54wczcee.js +0 -2
- package/dist/chunk-74gz26zs.js +0 -2
- package/dist/chunk-7906p8zs.js +0 -2
- package/dist/chunk-7dkfjmjw.js +0 -2
- package/dist/chunk-7vr5w75r.js +0 -4
- package/dist/chunk-7zn0yyqk.js +0 -2
- package/dist/chunk-8d2kamh2.js +0 -2
- package/dist/chunk-8ttvazck.js +0 -2
- package/dist/chunk-8y4bqsxz.js +0 -2
- package/dist/chunk-9bpnz431.js +0 -2
- package/dist/chunk-ac033b93.js +0 -2
- package/dist/chunk-aj43359g.js +0 -2
- package/dist/chunk-aj8yq228.js +0 -2
- package/dist/chunk-as72dvvm.js +0 -2
- package/dist/chunk-bfvaxrq0.js +0 -2
- package/dist/chunk-bkaw7sgz.js +0 -2
- package/dist/chunk-d0q2x8e3.js +0 -2
- package/dist/chunk-d2c5727w.js +0 -2
- package/dist/chunk-d5amzers.js +0 -2
- package/dist/chunk-dfchrqw5.js +0 -2
- package/dist/chunk-epv0ahg1.js +0 -2
- package/dist/chunk-f5489ese.js +0 -2
- package/dist/chunk-fqq1w9m1.js +0 -2
- package/dist/chunk-hcgsgnq8.js +0 -2
- package/dist/chunk-hgqcqg1h.js +0 -2
- package/dist/chunk-hjdwf9gp.js +0 -2
- package/dist/chunk-hp7ewdnp.js +0 -2
- package/dist/chunk-jjtzm6dn.js +0 -3
- package/dist/chunk-js79j12f.js +0 -18
- package/dist/chunk-kfsp322p.js +0 -2
- package/dist/chunk-kt557jaj.js +0 -2
- package/dist/chunk-n8kqvzba.js +0 -2
- package/dist/chunk-na70r4sp.js +0 -2
- package/dist/chunk-p083sckk.js +0 -2
- package/dist/chunk-pc178389.js +0 -2
- package/dist/chunk-psqk7932.js +0 -2
- package/dist/chunk-pv5nr9pd.js +0 -2
- package/dist/chunk-q1v0jwr4.js +0 -2
- package/dist/chunk-qeye0901.js +0 -2
- package/dist/chunk-qy59yp2v.js +0 -2
- package/dist/chunk-r5gjb55x.js +0 -2
- package/dist/chunk-tf44jyrh.js +0 -2
- package/dist/chunk-tfypkw4y.js +0 -3
- package/dist/chunk-vv4kkwhn.js +0 -2
- package/dist/chunk-vwhd3h8x.js +0 -2
- package/dist/chunk-vxj8kd2v.js +0 -2
- package/dist/chunk-vzzpvn21.js +0 -2
- package/dist/chunk-w1a2v264.js +0 -2
- package/dist/chunk-wcs7w8wv.js +0 -2
- package/dist/chunk-x6ndnpvr.js +0 -2
- package/dist/chunk-x8rckpyz.js +0 -2
- package/dist/chunk-ya0qecph.js +0 -27
- package/dist/chunk-ykwmqh8z.js +0 -2
- package/dist/chunk-ys71pmrb.js +0 -2
- package/dist/chunk-z5y4qyhg.js +0 -2
- package/dist/chunk-zpcz2kh6.js +0 -2
- package/dist/native/compiler/codegen.d.ts +0 -10
- package/dist/native/compiler/codegen.js +0 -145
- package/dist/native/compiler/parser.d.ts +0 -88
- package/dist/native/compiler/parser.js +0 -753
- package/dist/native/runtime/entry.d.ts +0 -1
- package/dist/native/runtime/entry.js +0 -3
- package/dist/native/runtime/index.d.ts +0 -45
- package/dist/native/runtime/index.js +0 -165
- package/dist/native/runtime/screen.d.ts +0 -43
- package/dist/native/runtime/screen.js +0 -808
package/dist/signals.js
CHANGED
|
@@ -81,8 +81,19 @@ console.log('[stx] entering IIFE');
|
|
|
81
81
|
// exactly as it was: same calls, one property lookup earlier.
|
|
82
82
|
var stxHost = window.__stx_host || {
|
|
83
83
|
setText: function(node, value) { node.textContent = value; },
|
|
84
|
-
setAttribute: function(node, name, value) {
|
|
84
|
+
setAttribute: function(node, name, value) {
|
|
85
|
+
var next = value;
|
|
86
|
+
if (typeof value === 'object' && value !== null) {
|
|
87
|
+
try { next = JSON.stringify(value); }
|
|
88
|
+
catch (e) { next = String(value); }
|
|
89
|
+
}
|
|
90
|
+
node.setAttribute(name, next);
|
|
91
|
+
},
|
|
85
92
|
removeAttribute: function(node, name) { node.removeAttribute(name); },
|
|
93
|
+
setStyle: function(node, value) {
|
|
94
|
+
if (typeof value === 'object' && value !== null) Object.assign(node.style, value);
|
|
95
|
+
else if (typeof value === 'string') node.style.cssText = value;
|
|
96
|
+
},
|
|
86
97
|
|
|
87
98
|
// Structural operations, for the bindings that build rows rather than
|
|
88
99
|
// update one node (#1984).
|
|
@@ -2842,21 +2853,72 @@ catch (e) {
|
|
|
2842
2853
|
* Absent a manifest nothing changes: the walk is still the default, and a
|
|
2843
2854
|
* page that ships no list hydrates exactly as it did.
|
|
2844
2855
|
*/
|
|
2845
|
-
function processFromManifest(root, scope, manifest) {
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2856
|
+
function processFromManifest(root, scope, manifest, resolvedNodes) {
|
|
2857
|
+
// Arrays have an entries() method too. Prefer the array itself before
|
|
2858
|
+
// accepting the compiled document shape { entries: [...] }.
|
|
2859
|
+
var entries = Array.isArray(manifest)
|
|
2860
|
+
? manifest
|
|
2861
|
+
: (manifest && Array.isArray(manifest.entries) ? manifest.entries : null);
|
|
2862
|
+
if (!entries || !entries.length || (!root && !resolvedNodes)) return false;
|
|
2863
|
+
for (var i = 0; i < entries.length; i++) {
|
|
2864
|
+
var entry = entries[i];
|
|
2849
2865
|
var id = entry && entry.id;
|
|
2850
2866
|
if (id === undefined || id === null) continue;
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2867
|
+
// Native compilation already has stable handles for every manifest id.
|
|
2868
|
+
// Accept those handles directly so a non-DOM host never needs selectors
|
|
2869
|
+
// or an attribute walk. The browser keeps its existing lookup fallback.
|
|
2870
|
+
var node = resolvedNodes
|
|
2871
|
+
? (typeof resolvedNodes.get === 'function' ? resolvedNodes.get(id) : resolvedNodes[id])
|
|
2872
|
+
: null;
|
|
2873
|
+
if (!node && root) {
|
|
2874
|
+
node = root.getAttribute && root.getAttribute('data-stx-b') === String(id)
|
|
2875
|
+
? root
|
|
2876
|
+
: (root.querySelector ? root.querySelector('[data-stx-b="' + id + '"]') : null);
|
|
2877
|
+
}
|
|
2854
2878
|
if (!node) continue;
|
|
2879
|
+
// A structural binding can detach its source before a later manifest
|
|
2880
|
+
// entry reaches one of that source's children. Native handles expose
|
|
2881
|
+
// this state directly; do not register effects or handlers for a view
|
|
2882
|
+
// that no longer exists in the host tree. Browser hydration keeps its
|
|
2883
|
+
// existing behaviour because it does not pass resolvedNodes here.
|
|
2884
|
+
if (resolvedNodes && node.__stxId !== undefined && node.isConnected === false) continue;
|
|
2855
2885
|
processElement(node, scope, true);
|
|
2856
2886
|
}
|
|
2857
2887
|
return true;
|
|
2858
2888
|
}
|
|
2859
2889
|
|
|
2890
|
+
// Bind a precompiled host tree without waiting for DOMContentLoaded. Native
|
|
2891
|
+
// passes its manifest id to node-handle table; browser hydration continues
|
|
2892
|
+
// through the document-ready path below. The same state, effect, expression,
|
|
2893
|
+
// event and host implementations are used by both.
|
|
2894
|
+
function hydrateHost(root, setup, manifest, resolvedNodes) {
|
|
2895
|
+
var mountStart = mountCallbacks.length;
|
|
2896
|
+
var destroyStart = destroyCallbacks.length;
|
|
2897
|
+
var outerSink = activeDestroySink;
|
|
2898
|
+
activeDestroySink = null;
|
|
2899
|
+
var values;
|
|
2900
|
+
try { values = typeof setup === 'function' ? setup() : setup; }
|
|
2901
|
+
finally { activeDestroySink = outerSink; }
|
|
2902
|
+
var localMountHooks = mountCallbacks.splice(mountStart);
|
|
2903
|
+
var localDestroyHooks = destroyCallbacks.splice(destroyStart);
|
|
2904
|
+
var scope = Object.assign({ $refs: {} }, values || {});
|
|
2905
|
+
var disposeEffects = trackEffects(function() {
|
|
2906
|
+
processFromManifest(root, scope, manifest, resolvedNodes);
|
|
2907
|
+
});
|
|
2908
|
+
runMountCallbacks(localMountHooks, localDestroyHooks);
|
|
2909
|
+
var mounted = true;
|
|
2910
|
+
return function disposeHost() {
|
|
2911
|
+
if (!mounted) return;
|
|
2912
|
+
mounted = false;
|
|
2913
|
+
disposeEffects();
|
|
2914
|
+
var hooks = localDestroyHooks.splice(0, localDestroyHooks.length);
|
|
2915
|
+
for (var i = 0; i < hooks.length; i++) {
|
|
2916
|
+
try { hooks[i](); }
|
|
2917
|
+
catch (e) { console.warn('[stx] native destroy error:', e); }
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2860
2922
|
// skipChildren: this element's bindings only, because something else already
|
|
2861
2923
|
// knows where the rest are. The manifest path passes it for every entry, so
|
|
2862
2924
|
// the tree is never walked; see processFromManifest.
|
|
@@ -3279,6 +3341,9 @@ else {
|
|
|
3279
3341
|
catch (e) { attrValue = String(v); }
|
|
3280
3342
|
}
|
|
3281
3343
|
var attrValueSafe = safeUrlAttr(attrName, attrValue);
|
|
3344
|
+
// Keep structured values structured for non-DOM hosts. The DOM
|
|
3345
|
+
// host serializes them at its boundary, preserving web output.
|
|
3346
|
+
var hostValue = (typeof v === 'object' && v !== null) ? v : attrValueSafe;
|
|
3282
3347
|
// Writing the value an attribute already has is not nothing: a
|
|
3283
3348
|
// frame given its own src again loads again (an entry in the
|
|
3284
3349
|
// page's history each time) and a video restarts. A player whose
|
|
@@ -3295,11 +3360,11 @@ else {
|
|
|
3295
3360
|
&& el.hasAttribute('src') && el.getAttribute('src') !== String(attrValueSafe)) {
|
|
3296
3361
|
var nextSibling = el.nextSibling;
|
|
3297
3362
|
parentNode.removeChild(el);
|
|
3298
|
-
stxHost.setAttribute(el, attrName,
|
|
3363
|
+
stxHost.setAttribute(el, attrName, hostValue);
|
|
3299
3364
|
parentNode.insertBefore(el, nextSibling);
|
|
3300
3365
|
}
|
|
3301
3366
|
else {
|
|
3302
|
-
stxHost.setAttribute(el, attrName,
|
|
3367
|
+
stxHost.setAttribute(el, attrName, hostValue);
|
|
3303
3368
|
}
|
|
3304
3369
|
}
|
|
3305
3370
|
});
|
|
@@ -3896,12 +3961,7 @@ catch (e2) {
|
|
|
3896
3961
|
effect(() => {
|
|
3897
3962
|
if (isVisible && !isVisible()) return;
|
|
3898
3963
|
const value = evalExpr();
|
|
3899
|
-
|
|
3900
|
-
Object.assign(el.style, value);
|
|
3901
|
-
}
|
|
3902
|
-
else if (typeof value === 'string') {
|
|
3903
|
-
el.style.cssText = value;
|
|
3904
|
-
}
|
|
3964
|
+
stxHost.setStyle(el, value);
|
|
3905
3965
|
});
|
|
3906
3966
|
}
|
|
3907
3967
|
|
|
@@ -7369,6 +7429,7 @@ catch (e) {} }
|
|
|
7369
7429
|
// calling a detached one.
|
|
7370
7430
|
window.stx = Object.assign(window.stx || {}, {
|
|
7371
7431
|
hydrate: hydrateSubtree,
|
|
7432
|
+
hydrateHost,
|
|
7372
7433
|
state,
|
|
7373
7434
|
derived,
|
|
7374
7435
|
effect,
|
package/dist/ssg.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
3
|
-
`)}class
|
|
2
|
+
import"./chunk-89b2r1q0.js";import"./chunk-3ry9ca1s.js";import{Qe,et,tt,nt,rt,st}from"./chunk-12pvnn1e.js";import"./chunk-yaebdyfr.js";import"./chunk-axydabse.js";import{f,je,M,q,n,i}from"./chunk-qm1tt8g1.js";import"./chunk-48kgnqpk.js";import{Yn}from"./chunk-jbrdebzs.js";import"./chunk-ptjqacjd.js";import"./chunk-h3c7z73m.js";import"./chunk-b7973zvk.js";import"./chunk-k8sqs7j2.js";import"./chunk-6cbvx87h.js";import{oe,ft,gt}from"./chunk-tfz95n7j.js";import{Ci,$i,Ei}from"./chunk-c1dmr865.js";import{dt,Xt,Gt}from"./chunk-yd50awqp.js";import"./chunk-2x9jd5w0.js";import{a}from"./chunk-wtms9jhs.js";import x from"fs";import g from"path";import{createHash as $t}from"crypto";function Dt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Rt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function kt(t){return Bun.hash(t).toString(16)}function lt(t,s={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let o=new Map,r=t.replace(Rt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(s.minify)h=Dt(h);let S=kt(h);if(!o.has(S))o.set(S,h);let P=s.integrity?` data-stx-integrity="sha384-${$t("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(o,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Ct=new Set(["visible","idle"]);function ut(t){if(!t.includes("data-stx-src="))return t;let s=new Map,o=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=o.exec(t))!==null)s.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Ct.has(s.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var Et=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function J(t){let s=t.trim();if(!s)return null;let o=/^https?:\/\//i.test(s)?s:`https://${s}`;try{return new URL(o).origin+new URL(o).pathname.replace(/\/$/,"")}catch{return null}}function It(t){for(let s of Et){let o=t[s];if(!o)continue;let r=J(o);if(r)return{url:r,source:"env",via:s}}return null}function pt(t){if(!t||typeof t!=="object")return null;let s=t,o=s.site?.url??s.url??s.app?.url;return typeof o==="string"?J(o):null}async function Bt(t){let{existsSync:s}=await import("fs"),o=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=o.resolve(t,r);if(!s(c))continue;try{let e=await import(c),l=pt(e.default??e);if(l)return l}catch{}}return null}async function ht(t={}){let s=t.cwd??process.cwd(),o=t.env??process.env;if(t.explicit){let l=J(t.explicit);if(l)return{url:l,source:"option"}}let r=pt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await Bt(s);if(c)return{url:c,source:"site.config",via:"url"};let e=It(o);if(e)return e;return{url:"http://localhost",source:"fallback"}}function mt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
|
+
`)}class wt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,s=""){this.cacheDir=t,this.salt=s}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let s=JSON.parse(await Bun.file(t).text());for(let[o,r]of Object.entries(s))this.cache.set(o,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),s={};for(let[o,r]of this.cache)s[o]=r;await Bun.write(t,JSON.stringify(s))}getHash(t,s){let o=x.statSync(t),r=`${this.salt}|${t}:${o.mtimeMs}`;for(let e of s)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let c=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);c=(c<<5)-c+l,c=c&c}return Math.abs(c).toString(36)}get(t,s){let o=this.cache.get(t);if(!o)return null;let r=this.getHash(s,o.dependencies??[]);if(o.hash!==r)return this.cache.delete(t),null;return o.html}set(t,s,o,r){let c=this.getHash(s,o);this.cache.set(t,{hash:c,html:r,generatedAt:Date.now(),dependencies:o})}}class yt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let s=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",s)}async get(t){let s=this.getFilePath(t);if(!await Bun.file(s).exists())return null;try{return JSON.parse(await Bun.file(s).text())}catch{return null}}async set(t,s){let o=this.getFilePath(t);await x.promises.mkdir(g.dirname(o),{recursive:!0}),await Bun.write(o,JSON.stringify(s))}async invalidate(t){let s=this.getFilePath(t);if(await Bun.file(s).exists())await x.promises.unlink(s)}async invalidatePattern(t){let s=g.join(this.cacheDir,"isr");if(!x.existsSync(s))return;let o=await x.promises.readdir(s);for(let r of o){let c=r.replace(/_/g,"/").replace(".json","");if(t.test(c))await x.promises.unlink(g.join(s,r))}}async needsRevalidation(t){let s=await this.get(t);if(!s)return!0;return Date.now()>s.revalidateAfter}}async function jt(t){try{let o=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let r=o[1];if(!r.includes("getStaticPaths"))return null;let c=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!c)return null;return await Function(`
|
|
4
4
|
return (async function getStaticPaths() {
|
|
5
5
|
${c[1]}
|
|
6
6
|
})()
|
|
7
|
-
`)()}catch(s){return console.error(`Error extracting static paths from ${t}:`,s),null}}async function
|
|
7
|
+
`)()}catch(s){return console.error(`Error extracting static paths from ${t}:`,s),null}}async function Ft(t){let s=[];if(!t.isDynamic)s.push({url:t.pattern,params:{}});else{let o=await jt(t.filePath);if(!o||o.paths.length===0)return console.warn(`Warning: Dynamic route ${t.pattern} has no getStaticPaths or returned empty paths`),s;for(let r of o.paths){let c=t.pattern;for(let[e,l]of Object.entries(r.params))c=c.replace(`:${e}`,l).replace(`:${e}*`,l);s.push({url:c,params:r.params,props:r.props,revalidate:r.revalidate})}}return s}async function Ot(t){let s=[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"];for(let o of s)if(await Bun.file(o).exists())try{let r=await import(o);if(typeof r.default==="function")return await r.default();else if(typeof r.default==="object")return r.default;else if(typeof r.getData==="function")return await r.getData();else{let{default:c,...e}=r;return e}}catch(r){console.error(`Error loading data file ${o}:`,r)}return null}async function Tt(t,s,o){let r=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!r)return null;let c=r[1];if(!c.includes("getStaticProps"))return null;try{let e=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
|
|
8
8
|
return (async function getStaticProps() {
|
|
9
9
|
${e[1]}
|
|
10
10
|
})()
|
|
11
|
-
`)(s)}catch(e){return console.error(`Error executing getStaticProps in ${o}:`,e),null}}function
|
|
12
|
-
resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(
|
|
11
|
+
`)(s)}catch(e){return console.error(`Error executing getStaticProps in ${o}:`,e),null}}function At(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function St(t,s,o={},r,c){let e=await Bun.file(t.filePath).text(),l=await Ot(t.filePath),w=await Tt(e,s,t.filePath),y={...l||{},...w||{},...o,params:s,$route:{path:t.pattern,params:s}},h=new Set,S=[],P=[],D={...c,...r.partialsDir?{partialsDir:r.partialsDir}:{},...r.componentsDir?{componentsDir:r.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(b)=>{S.push(`${g.relative(process.cwd(),b.templatePath)}: ${b.message}
|
|
12
|
+
resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(At(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let p=await n(e,y,t.filePath,D,h);for(let b of[t.filePath,...h])for(let B of oe(b))h.add(B);if(Object.keys(s).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(s)};else window.__stx_rp=${JSON.stringify(s)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
|
|
13
13
|
</head>`);else p=`${b}
|
|
14
|
-
${p}`}if(p=await q(p,{router:
|
|
14
|
+
${p}`}if(p=await q(p,{router:r.router}),p=await f(p),r.minify!==!1)return{html:Lt(p),dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P};return{html:p,dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P}}function Lt(t){let s=[],o=0,r=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=r.exec(t))!==null){let l=t.slice(o,c.index);s.push(l.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=c[1],y=c[2],h=c[3];y=y.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),s.push(w+y+h),o=c.index+c[0].length}let e=t.slice(o);return s.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),s.join("").trim()}function Mt(t){let s=0;for(let o=0;o<t.length;o++){let r=t.charCodeAt(o);s=(s<<5)-s+r,s=s&s}return`"${Math.abs(s).toString(36)}"`}function Ut(t,s,o,r){if(o?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(s))return!0;return r.some((c)=>{if(c instanceof RegExp)return c.test(t);return c.endsWith("/")?t===c.slice(0,-1)||t.startsWith(c):t===c})}function _t(t,s){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
15
15
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
16
|
-
${t.map((
|
|
17
|
-
<loc>${I(c)}</loc>`;if(
|
|
18
|
-
<lastmod>${
|
|
19
|
-
<changefreq>${
|
|
20
|
-
<priority>${
|
|
16
|
+
${t.map((r)=>{let c=new URL(r.loc,s).href,e=` <url>
|
|
17
|
+
<loc>${I(c)}</loc>`;if(r.lastmod)e+=`
|
|
18
|
+
<lastmod>${r.lastmod}</lastmod>`;if(r.changefreq)e+=`
|
|
19
|
+
<changefreq>${r.changefreq}</changefreq>`;if(r.priority!==void 0)e+=`
|
|
20
|
+
<priority>${r.priority}</priority>`;return e+=`
|
|
21
21
|
</url>`,e}).join(`
|
|
22
22
|
`)}
|
|
23
|
-
</urlset>`}function I(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function
|
|
24
|
-
<title>${I(
|
|
25
|
-
<link>${I(
|
|
26
|
-
<description>${I(
|
|
27
|
-
<pubDate>${
|
|
28
|
-
<author>${I(
|
|
29
|
-
<category>${I(e)}</category>`;if(
|
|
30
|
-
<guid>${I(
|
|
23
|
+
</urlset>`}function I(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Nt(t,s){let o=s.map((r)=>{let c=" <item>";if(c+=`
|
|
24
|
+
<title>${I(r.title)}</title>`,c+=`
|
|
25
|
+
<link>${I(r.link)}</link>`,r.description)c+=`
|
|
26
|
+
<description>${I(r.description)}</description>`;if(r.pubDate)c+=`
|
|
27
|
+
<pubDate>${r.pubDate.toUTCString()}</pubDate>`;if(r.author)c+=`
|
|
28
|
+
<author>${I(r.author)}</author>`;if(r.categories)for(let e of r.categories)c+=`
|
|
29
|
+
<category>${I(e)}</category>`;if(r.guid)c+=`
|
|
30
|
+
<guid>${I(r.guid)}</guid>`;return c+=`
|
|
31
31
|
</item>`,c});return`<?xml version="1.0" encoding="UTF-8"?>
|
|
32
32
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
33
33
|
<channel>
|
|
@@ -41,18 +41,18 @@ ${t.map((n)=>{let c=new URL(n.loc,s).href,e=` <url>
|
|
|
41
41
|
${o.join(`
|
|
42
42
|
`)}
|
|
43
43
|
</channel>
|
|
44
|
-
</rss>`}async function
|
|
45
|
-
const validate = ${
|
|
44
|
+
</rss>`}async function zt(t={}){let s=Date.now();gt();let o=await i(process.cwd()),r=o.build||{},c=await ht({explicit:t.domain||r.domain,stxConfig:o});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(mt());let e={router:t.router??o?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||o?.partialsDir||"",componentsDir:t.componentsDir||o?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-zm73n103.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-h7qte7ye.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new wt(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-zm73n103.js");await u('<div class="bg-black"></div>')}catch{}Qe();let xt=o?.routeMiddleware?.dir||"middleware";await tt(process.cwd(),xt);let H=et();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let vt=o?.routeMiddleware?.global||[];Ei(o?.layoutsDir,a(process.cwd()));let K=M(".",{pagesDir:e.pagesDir,pagesDirs:o?._layerPageDirs});console.log(`Found ${K.length} routes`);let G=[];for(let u of K){let m=await Ft(u);for(let v of m)G.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=G.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],X=[];for(let u=0;u<G.length;u+=e.concurrency)X.push(G.slice(u,u+e.concurrency));for(let u of X)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:bt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Jt(j),Pt=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],it=[...vt,...Pt];if(it.length>0){let C=nt(d,L,F||{}),O=rt(C,null,void 0,{isServer:!0}),E=await st(it,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,_=Vt(String(R),d),T=Kt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,_),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(_),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let at=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(at)try{if(!await Function("route",`
|
|
45
|
+
const validate = ${at[1]};
|
|
46
46
|
return validate(route);
|
|
47
|
-
`)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,
|
|
47
|
+
`)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,ot=!1;if(e.cache){if(k=B.get(d,v.filePath),k)ot=!0,l.cachedCount++}if(!k){let C=await St(v,L,bt,e,o);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
48
48
|
${C.includeFailures.join(`
|
|
49
49
|
`)}
|
|
50
50
|
Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&C.serverScriptFailures.length>0)throw Error(`${C.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
|
51
51
|
${C.serverScriptFailures.join(`
|
|
52
52
|
`)}
|
|
53
|
-
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)B.set(d,v.filePath,C.dependencies,k)}let U;if(e.trailingSlash)U=g.join(e.outputDir,d,"index.html");else U=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=
|
|
53
|
+
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)B.set(d,v.filePath,C.dependencies,k)}let U;if(e.trailingSlash)U=g.join(e.outputDir,d,"index.html");else U=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=lt(k,{integrity:e.integrityIslands,minify:e.minify});if(O.length>0){let E=g.join(e.outputDir,"_stx","islands");await x.promises.mkdir(E,{recursive:!0});for(let R of O){let _=g.join(E,`${R.hash}.js`);if(!await Bun.file(_).exists())await Bun.write(_,R.code);if(!w.has(R.hash)){w.add(R.hash);let T=Buffer.byteLength(R.code,"utf8");y+=T,h[R.hash]={bytes:T,file:`/_stx/islands/${R.hash}.js`}}}if(S[d]=O.map((R)=>R.hash),k=C,e.prefetchIslands)k=ut(k)}}if(await x.promises.mkdir(g.dirname(U),{recursive:!0}),await Bun.write(U,k),!Ut(d,k,F,e.sitemapExclude))A.push({loc:d,lastmod:new Date().toISOString().split("T")[0],priority:d==="/"?1:0.8});let ct={route:d,outputPath:U,size:Buffer.byteLength(k,"utf8"),cached:ot};if(Q!==!1)ct.revalidateAt=Date.now()+Q*1000;l.pages.push(ct),l.successCount++,await e.hooks.onPageEnd?.(d,k)}catch(j){l.failedCount++,l.errors.push({route:d,error:j}),await e.hooks.onError?.(j,d),console.error(`Error generating ${d}:`,j)}}));let Y=ft();if(Y.length>0){let u=Y.map((m)=>`${m.filePath}: ${m.message}`).join(`
|
|
54
54
|
`);throw Error(`Client script bundling failed:
|
|
55
|
-
${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.stx");if(await Bun.file(u).exists()){let m=new Set,v={...o,debug:!1,cache:!1},d=await
|
|
55
|
+
${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.stx");if(await Bun.file(u).exists()){let m=new Set,v={...o,debug:!1,cache:!1},d=await n(await Bun.file(u).text(),{},u,v,m);await Bun.write(g.join(e.outputDir,"404.html"),d)}else await Bun.write(g.join(e.outputDir,"404.html"),`<!DOCTYPE html>
|
|
56
56
|
<html lang="en">
|
|
57
57
|
<head>
|
|
58
58
|
<meta charset="UTF-8">
|
|
@@ -73,7 +73,7 @@ ${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.
|
|
|
73
73
|
<a href="/">Go home</a>
|
|
74
74
|
</div>
|
|
75
75
|
</body>
|
|
76
|
-
</html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...o,debug:!1,cache:!1},L=await
|
|
76
|
+
</html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...o,debug:!1,cache:!1},L=await n(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let W=g.join(e.pagesDir,"error.stx");if(await Bun.file(W).exists()){let u=new Set,m={...o,debug:!1,cache:!1},v=await n(await Bun.file(W).text(),{},W,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=_t(A,e.domain),m=g.join(e.outputDir,"sitemap.xml");await Bun.write(m,u),l.sitemapPath=m,console.log(`Generated sitemap.xml with ${A.length} URLs`)}if(e.robots!==!1){let u=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((d)=>typeof d==="string"),...u.disallow||[]],v=Yn({rules:[{userAgent:u.userAgent||"*",allow:u.allow||["/"],...m.length>0?{disallow:m}:{}}],...u.sitemap!==!1&&l.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(g.join(e.outputDir,"robots.txt"),v),console.log("Generated robots.txt")}if(e.rss){let u=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(u.getItems)m=await u.getItems();let v=Nt(u,m),d=g.join(e.outputDir,"rss.xml");await Bun.write(d,v),l.rssPath=d,console.log(`Generated rss.xml with ${m.length} items`)}let N=Ci(e.outputDir);if(N.assets>0)console.log(`Externalized ${N.assets} asset(s) from ${N.pages} page(s) (${(N.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let z=$i(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} repeated asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&x.existsSync(e.publicDir))await V(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let Z=Gt();if(Z)await V(Z,g.join(e.outputDir,Xt)),console.log(`Copied assets from ${dt}`)}catch(D){throw await e.hooks.onError?.(D),D}if(l.buildTime=Date.now()-s,w.size>0){l.islandChunks={count:w.size,totalBytes:y};let D={generatedChunks:w.size,totalBytes:y,chunks:h,pages:S};await Bun.write(g.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(D,null,2))}await e.hooks.onBuildEnd?.(l);let P=l.islandChunks?`
|
|
77
77
|
Island chunks: ${l.islandChunks.count} (${(l.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
78
78
|
Build complete!
|
|
79
79
|
Total: ${l.totalPages} pages
|
|
@@ -81,8 +81,8 @@ Build complete!
|
|
|
81
81
|
Cached: ${l.cachedCount}
|
|
82
82
|
Failed: ${l.failedCount}
|
|
83
83
|
Time: ${l.buildTime}ms${P}
|
|
84
|
-
`),l}async function V(t,s){await x.promises.mkdir(s,{recursive:!0});let o=await x.promises.readdir(t,{withFileTypes:!0});for(let
|
|
85
|
-
`)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));
|
|
84
|
+
`),l}async function V(t,s){await x.promises.mkdir(s,{recursive:!0});let o=await x.promises.readdir(t,{withFileTypes:!0});for(let r of o){let c=g.join(t,r.name),e=g.join(s,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await V(c,e);else await x.promises.copyFile(c,e)}}function Ht(t={}){let s=t.cacheDir||a(process.cwd(),"ssg-cache"),o=new yt(s),r=t.revalidate||3600;return{async get(c){let e=await o.get(c);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(c).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${r}, stale-while-revalidate=${r*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(c){let l=M(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>c.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${c}`);return}let w=c.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let h=await i(),{html:S}=await St(l,y,{},t,h);await o.set(c,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:Mt(S)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await o.invalidate(c);else await o.invalidatePattern(c)}}}function Wt(t){return async()=>({paths:await t(),fallback:!1})}function qt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let s=await Bun.file(t).text(),o=s.match(/^---\n([\s\S]*?)\n---/),r={},c=s;if(o){let h=o[1];c=s.slice(o[0].length).trim();for(let S of h.split(`
|
|
85
|
+
`)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));r[D]=p}}}let e=c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),l=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,y;while((y=w.exec(e))!==null){let h=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:h})}return{content:e,data:r,toc:l}}}}function Jt(t){return je(t)}function Vt(t,s){return`<!DOCTYPE html>
|
|
86
86
|
<html>
|
|
87
87
|
<head>
|
|
88
88
|
<meta charset="utf-8">
|
|
@@ -94,4 +94,4 @@ Build complete!
|
|
|
94
94
|
<p>Redirecting to <a href="${t}">${t}</a>...</p>
|
|
95
95
|
<script>window.location.replace('${t}')</script>
|
|
96
96
|
</body>
|
|
97
|
-
</html>`}function
|
|
97
|
+
</html>`}function Kt(t,s){if(t==="/"||t==="")return g.join(s.outputDir,"index.html");let o=t.replace(/^\/|\/$/g,"");if(s.trailingSlash)return g.join(s.outputDir,o,"index.html");return g.join(s.outputDir,`${o}.html`)}var Se={generateStaticSite:zt,createISRHandler:Ht,defineStaticPaths:Wt,createMarkdownLoader:qt};export{Ht as createISRHandler,qt as createMarkdownLoader,At as declaresPageAction,Se as default,Wt as defineStaticPaths,zt as generateStaticSite,Ut as isExcludedFromSitemap};
|
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.424",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -122,12 +122,12 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@stacksjs/ts-css": "^0.3.2",
|
|
124
124
|
"@stacksjs/clapp": "^0.2.16",
|
|
125
|
-
"@stacksjs/desktop": "0.2.
|
|
126
|
-
"@stacksjs/sanitizer": "0.2.
|
|
125
|
+
"@stacksjs/desktop": "0.2.424",
|
|
126
|
+
"@stacksjs/sanitizer": "0.2.424",
|
|
127
127
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
128
|
-
"bun-plugin-stx": "0.2.
|
|
128
|
+
"bun-plugin-stx": "0.2.424",
|
|
129
129
|
"bunfig": "^0.15.19",
|
|
130
|
-
"stx-router": "0.2.
|
|
130
|
+
"stx-router": "0.2.424",
|
|
131
131
|
"ts-broadcasting": "^0.0.11",
|
|
132
132
|
"ts-images": "^0.2.22",
|
|
133
133
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-10fh9qhe.js
DELETED
package/dist/chunk-1569v24d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{St,ns,qi,lc}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{lc as declareBareLoopHead,St as parseLoopBinding,qi as processLoops,ns as reportDeferredLoopWarnings};
|
package/dist/chunk-18awnp9d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kr,Cr,$r,Qo,Er,Tr,ea,_r,Rr,oi,ta}from"./chunk-rsxvbnp4.js";export{kr as VideoProcessorCache,oi as analyzeVideo,Qo as clearVideoCache,Rr as generateDASHManifest,_r as generateHLSManifest,Er as generatePoster,ea as generateSpriteSheet,Tr as generateThumbnails,Cr as getCachedVideoResult,ta as processVideo,$r as setCachedVideoResult};
|
package/dist/chunk-1r0c5920.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mi,Wr,Y,Ne,bt,b,je,Be,Ln,d,nn}from"./chunk-597rfddk.js";import{D}from"./chunk-jjnfj9nf.js";var j=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function F(t,n,e){let r={fullTag:e,content:n,attrs:t};if(/\bserver\b/.test(t))return{...r,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...r,type:"client"};if(j.test(n))return{...r,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...r,type:"client"};return{...r,type:"server"}}var H=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function Js(t){let n=[],e=[],r=[],o=0;while(o<t.length){let s=t.indexOf("<",o);if(s===-1)break;let a=Ne(t,s);if(a>s){o=a;continue}let i=Y(t,s);if(i>s){let c=t.slice(s,i),u=H.exec(c);if(u){let l=F(u[1],u[2],c);switch(l.type){case"signals":n.push(l);break;case"client":e.push(l);break;case"server":r.push(l);break}}o=i;continue}o=s+(t.startsWith("<!--",s)?4:1)}return{signals:n,client:e,server:r}}var L=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function V(t){let n=[],e=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=e.exec(t))!==null)n.push({start:r.index,end:r.index+r[0].length});return n}function P(t,n){return n.some((e)=>t>=e.start&&t<e.end)}function B(t){let n=(t||"").trim();if(!n)return null;if(/[\s>+~,:]/.test(n))return null;let e={},r=n,o=r.match(/^[a-z][\w-]*/i);if(o)e.tag=o[0].toLowerCase(),r=r.slice(o[0].length);while(r.length>0){let s=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(s){if(e.attr=s[1],s[3]!==void 0&&s[3]!=="")e.attrValue=s[3];r=r.slice(s[0].length);continue}let a=r.match(/^#([\w-]+)/);if(a){e.id=a[1],r=r.slice(a[0].length);continue}let i=r.match(/^\.([\w-]+)/);if(i){e.className=i[1],r=r.slice(i[0].length);continue}return null}if(!e.tag&&!e.attr&&!e.id&&!e.className)return null;return e}function q(t,n){if(n.attr){if(!(n.attrValue===void 0?new RegExp(`\\b${n.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${n.attr}\\s*=\\s*(["'])\\s*${n.attrValue}\\s*\\1`,"i")).test(t))return!1}if(n.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${n.id}\\s*\\1`,"i").test(t))return!1}if(n.className){let e=t.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!e)return!1;if(!e[2].split(/\s+/).includes(n.className))return!1}return!0}function T(t,n="main"){let e=B(n);if(!e)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,o=V(t),s;while((s=r.exec(t))!==null){if(P(s.index,o))continue;let a=s[1].toLowerCase(),i=s[2]||"";if(i.trimEnd().endsWith("/")||L.has(a))continue;if(e.tag&&e.tag!==a)continue;if(!q(i,e))continue;let c=s[0],u=s.index+c.length,l=new RegExp(`<(/?)${a}\\b([^>]*)>`,"gi");l.lastIndex=u;let f=1,p;while((p=l.exec(t))!==null){if(P(p.index,o))continue;let h=p[1]==="/";if(!h&&(p[2]||"").trimEnd().endsWith("/"))continue;if(f+=h?-1:1,f===0)return{openTag:c,openIndex:s.index,start:u,end:p.index,tagName:a}}return null}return null}var _e="private, no-store";function Ys(t){return t.replace(/&#(\d+);/g,(n,e)=>O(Number(e),n)).replace(/&#x([0-9a-f]+);/gi,(n,e)=>O(Number.parseInt(e,16),n)).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function O(t,n){if(!Number.isInteger(t)||t<0||t>1114111)return n;try{return String.fromCodePoint(t)}catch{return n}}function ne(t){return t.headers.get("X-STX-Router")==="true"}function z(t,n){if(!t)return n;return t.split(",").some((r)=>r.trim().toLowerCase()===n.toLowerCase())?t:`${t}, ${n}`}function C(t){return{Vary:z(t,"X-STX-Router")}}import E from"path";var G="stx-page-head:",U=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,v={dev:null,prod:null};function W(){let t=D()?"dev":"prod",n=v[t];if(n!==null)return n;try{let e=import.meta.require("./chunk-ac033b93.js"),r=t==="dev"&&typeof e.getRouterScriptDev==="function"?e.getRouterScriptDev:e.getRouterScript;v[t]=`<script>${r()}</script>`}catch{v[t]=""}return v[t]}async function Zs(t,n){if(n===!1)return null;if(n&&typeof n==="string"){let r=E.resolve(t,n);if(await Bun.file(r).exists())return r;return null}let e=E.join(t,"app.stx");if(await Bun.file(e).exists())return e;return null}async function yr(t,n){try{let e=await Bun.file(t).text(),r=e,o=e.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(o)r=o[1].trim();let s=Js(e),a=[...s.client.map((m)=>m.fullTag),...s.signals.map((m)=>m.fullTag)],i=[],c=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,u;while((u=c.exec(e))!==null)i.push(u[0]);let l=r;for(let m of s.server)l=l.replace(m.fullTag,"");for(let m of s.client)l=l.replace(m.fullTag,"");l=l.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let f="<!--__STX_PAGE_SLOT__-->";if(l=l.replace(/<slot\s*\/>/gi,f).replace(/<slot\s*>\s*<\/slot>/gi,f),!l.includes(f))return console.warn(`[stx] Shell ${t} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:p,extractVariables:h,defaultConfig:x,loadStxConfig:y}=await import("./chunk-vzzpvn21.js"),R=await y(),g={__filename:t,__dirname:E.dirname(t)};for(let m of a){let A=m.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(A&&!m.includes("client")&&!m.includes('type="module"'))await h(A[1],g,t)}let S=await p(l,g,t,{...x,...R,...n},new Set),w=S.indexOf(f);if(w===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:S.substring(0,w),afterSlot:S.substring(w+f.length),filePath:t,shellScripts:a,shellStyles:i}}catch(e){return console.error(`[stx] Error processing shell ${t}:`,e),null}}function Sn(t,n,e){let r,o="",s=n.match(U);if(s){n=n.replace(s[0],"");try{let l=Buffer.from(s[1],"base64").toString("utf8"),f=l.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(f)r=f[1].trim();o=l.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let a=e||r||"stx App",i=W(),c="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>${a}</title>
|
|
8
|
-
${o?` ${o}
|
|
9
|
-
`:""} ${t.shellStyles.join(`
|
|
10
|
-
`)}
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
${t.beforeSlot}
|
|
14
|
-
<div data-stx-content>${n}</div>
|
|
15
|
-
${t.afterSlot}
|
|
16
|
-
${t.shellScripts.filter((l)=>!l.includes("server")).join(`
|
|
17
|
-
`)}
|
|
18
|
-
${c}
|
|
19
|
-
${i}
|
|
20
|
-
</body>
|
|
21
|
-
</html>`}function ge(t,n={}){let e=t.trim();if(!nn(e))return t;let r=[],o=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(o){let c=o[1],u=/<style\b[^>]*>[\s\S]*?<\/style>/gi,l;while((l=u.exec(c))!==null)r.push(l[0]);let f=c.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(f)r.push(f[0]);let p=c.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(p)r.push(p[0])}if(n.preserveHead&&o){let c=[],u=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,l;while((l=u.exec(o[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(l[0]))continue;c.push(l[0])}if(c.length>0)r.unshift(`<!--${G}${Buffer.from(c.join(`
|
|
22
|
-
`),"utf8").toString("base64")}-->`)}let s=e.match(/<body\b[^>]*>/i),a=e.lastIndexOf("</body>");if(s&&a!==-1){let c=s.index+s[0].length,u=e.slice(c,a).trim();if(r.length>0)return r.join(`
|
|
23
|
-
`)+`
|
|
24
|
-
`+u;return u}let i=e;if(i=i.replace(/<!DOCTYPE\b[^>]*>/i,""),i=i.replace(/<html\b[^>]*>/i,""),i=i.replace(/<\/html\s*>/i,""),o)i=i.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,r.join(`
|
|
25
|
-
`));return i=i.replace(/<body\b[^>]*>/i,""),i=i.replace(/<\/body\s*>/i,""),i.trim()}var M=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function X(t,n,e,r){if(!M.test(n))return!1;let o=n.slice(0,n.indexOf(">")+1),s=/\sdata-stx-owner="([^"]+)"/i.exec(o)?.[1];if(!s)return!0;let a=`data-stx-scope="${s}"`;for(let i=t.indexOf(a);i!==-1;i=t.indexOf(a,i+a.length))if(i>=e&&i<r)return!1;return!0}function Qs(t){return ne(t)}function re(t,n="main"){let e=t.trim(),r=[],o=[],s=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(s){let y=s[1],R=/<style\b[^>]*>[\s\S]*?<\/style>/gi,g;while((g=R.exec(y))!==null)r.push(g[0]);let S=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((g=S.exec(y))!==null){if(M.test(g[0])||g[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(g[0]))continue;o.push(g[0])}}let a=T(e,n);if(!a)return ge(t);let{tagName:i,start:c,end:u}=a,l=e.slice(c,u).trim(),f=[],p=e.match(/<body\b[^>]*>/i),h=e.lastIndexOf("</body>");if(p&&p.index!==void 0&&h!==-1){let R=[[p.index+p[0].length,a.openIndex],[u+`</${i}>`.length,h]],g=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[S,w]of R){if(S>=w)continue;let m=e.slice(S,w),A;g.lastIndex=0;while((A=g.exec(m))!==null){if(X(e,A[0],c,u))continue;f.push(A[0])}}}let x=[];if(r.length>0)x.push(r.join(`
|
|
26
|
-
`));if(o.length>0)x.push(o.join(`
|
|
27
|
-
`));if(f.length>0)x.push(f.join(`
|
|
28
|
-
`));return x.push(l),x.join(`
|
|
29
|
-
`)}import _ from"fs";import N from"path";function ei(t,n,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:n,outputDir:e}}function ti(t,n){let e=N.join(n,"manifest.json");_.writeFileSync(e,JSON.stringify(t,null,2))}function ni(t){let n=N.join(t,"manifest.json");if(!_.existsSync(n))return null;try{let e=_.readFileSync(n,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}function k(t,n,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function J(t){let n=t.headers.get("content-type")||"",e={},r=(o,s)=>{let a=e[o];if(a===void 0)e[o]=s;else if(Array.isArray(a))a.push(s);else e[o]=[a,s]};if(n.includes("multipart/form-data")){let o=await t.formData();for(let[s,a]of o.entries())if(typeof a==="string")r(s,a);return e}if(n.includes("application/x-www-form-urlencoded")){for(let[o,s]of new URLSearchParams(await t.text()).entries())r(o,s);return e}return e}function br(t){if(!t)return!1;let n=t.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function I(t,n={}){let e=n.request,r=n.method??e?.method;if(!e||!br(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let o={};try{o=await J(e)}catch{}let s=await t.action({request:e,form:o,params:n.params??{},query:t.query??{},cookies:n.cookies??{}});if(s&&typeof s==="object"){let a=s,i=K(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:u,redirect:l,...f}=a;if(Object.assign(t,f),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function K(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let n=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){n.push(k(e,r));continue}if(r&&typeof r==="object"){let o=r;if(typeof o.value!=="string")continue;n.push(k(e,o.value,o))}}return n}function ri(t,n=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let o of n)r.append("Set-Cookie",o);for(let[o,s]of Object.entries(e??{}))if(o.toLowerCase()!=="location")r.set(o,s);return new Response(null,{status:303,headers:r})}async function At(t,n={}){let{html:e,context:r,redirect:o,cookies:s}=await Z(t,n),a=je(r),i=Be(r);if(o)return{html:e,redirect:o,cookies:s,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-vwhd3h8x.js"),u=c(r),l=t.streamTemplates;if(l&&Object.keys(l).length>0){let{processDirectives:f}=await import("./chunk-psqk7932.js"),{defaultConfig:p}=await import("./chunk-7zn0yyqk.js"),h=r.streamBoundaries||{},x={...p,autoShell:!1},y=Object.keys(l).map((g)=>({id:g,render:async()=>{let S=typeof h[g]==="function"?await h[g]():void 0;return f(l[g],{...r,$boundary:S},t.sourceFile,x,new Set)}})),R=new Set(y.map((g)=>g.id));u=[...(u||[]).filter((g)=>!R.has(g.id)),...y]}return{html:e,boundaries:u&&u.length>0?u:void 0,cookies:s,status:a,headers:i}}async function Z(t,n){let e={__filename:t.sourceFile,__dirname:t.sourceFile.replace(/[/\\][^/\\]+$/,""),...n};if(!t.hasServerScripts&&!Wr(t.html))return{html:t.html,context:e};for(let a of t.serverScriptContent)try{await d(a,e,t.sourceFile)}catch(i){if(n.__stx_strict_hydration)throw i;console.warn(`[stx] Server script error in ${t.sourceFile}:`,i)}let r=await I(e,{request:n.request,method:n.method,params:n.params??{},cookies:n.cookies??{}}),o=(a)=>{let i=a.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),c=Ln(e);if(!c)return i;let u=i.indexOf("</head>");return u<0?c+i:i.slice(0,u)+c+i.slice(u)};if(r.redirect)return{html:t.html,context:e,redirect:r.redirect,cookies:r.cookies};if(!Wr(t.html))return{html:o(t.html),context:e,cookies:r.cookies};let s=new Map;for(let[a,i]of Object.entries(t.placeholders))if(i.expression)try{let c=b(i.expression,e);if(i.type==="raw")s.set(a,c!==void 0&&c!==null?String(c):"");else s.set(a,c!==void 0&&c!==null?bt(String(c)):"")}catch(c){if(n.__stx_strict_hydration)throw c;s.set(a,"")}return{html:o(Mi(t.html,s)),context:e,cookies:r.cookies}}
|
|
30
|
-
export{Js,_e,Ys,ne,C,Zs,yr,Sn,ge,Qs,re,ei,ti,ni,br,ri,At};
|
package/dist/chunk-2hswgxpb.js
DELETED
package/dist/chunk-4363reg4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Oe,Va,wu,vu,xu,Su,Ua,Wa,ku,Cu,Ni,$u,Yt,Zt,On}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{Su as __setSignalsGeneratorsForTest,Oe as cacheEngineFingerprint,Zt as cacheTemplate,Yt as checkCache,$u as clearDevCaches,Wa as getCachedRouterScript,Ua as getCachedSignalsRuntime,ku as getServeClientAsset,Ni as getServeModuleBundle,On as hashFilePath,vu as invalidateFileCache,xu as invalidateFileCacheByDir,wu as readFileCached,Cu as registerServeModuleBundle,Va as templateCache};
|
package/dist/chunk-48axv7bm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{oe,Aa,_i,pt,ft,du,Ri,gt,Gt,Pa,Ia,Da,Oa,mt,Ma}from"./chunk-2cn8krpp.js";import"./chunk-qwgdtrhj.js";import"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{Gt as MODULE_SPECIFIER_PREFIX,mt as bundleClientScript,ft as clearBundleFailures,oe as clientBundleDependencies,pt as getBundleFailures,gt as hasUserImports,Ia as normalizeRegistrySpecifiers,Oa as queueClientBundleBuild,_i as recordBundleFailure,Pa as registryIdForPath,Ri as resolveBundlerFallback,Da as rewriteRegistryImports,du as setBundlerFallbackMode,Aa as shouldLogBundlerDiagnostics,Ma as tempBuildName};
|
package/dist/chunk-50hgr79y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{jo,Xs,Bc,Bo,Fo,Fc,zc}from"./chunk-ebkpdc45.js";import"./chunk-q0cehgy2.js";import"./chunk-2cn8krpp.js";import"./chunk-qwgdtrhj.js";import{ze,uc}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{jo as buildVirtualSource,ze as extractScriptBlocks,uc as extractTemplateExpressions,Bo as findRuntimeTypeDeclarations,Fo as findStxModuleDeclarations,zc as formatTypecheckDiagnostics,Bc as sourcePathFor,Fc as typecheckStxFiles,Xs as virtualPathFor};
|
package/dist/chunk-54wczcee.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Wo,il,qo,Ko,ol,al}from"./chunk-w83djypm.js";import"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{al as applySlots,ol as extractSlotContent,il as parseSlotElement,Wo as parseSlots,Ko as processSlots,qo as renderSlot};
|
package/dist/chunk-74gz26zs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{xt,nc,rc,sc,ic,oc,d,ac,ts,cc,Ui,Wi}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{xt as STX_ENGINE_BINDING_NAMES,ts as convertToCommonJS,Ui as extractScriptFromTemplate,d as extractVariables,Wi as hasVariables,ac as isCompleteImport,oc as isMissingBindingFailure,sc as isModuleResolutionFailure,ic as isSyntaxFailure,cc as splitDeclaration,nc as stripTypeScript,rc as withoutStxReferrer};
|
package/dist/chunk-7906p8zs.js
DELETED
package/dist/chunk-7dkfjmjw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ar,pl,fl}from"./chunk-q0cehgy2.js";import"./chunk-2cn8krpp.js";import"./chunk-qwgdtrhj.js";import"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{fl as clearComposableCache,pl as getComposableScript,Ar as listComposableModules};
|
package/dist/chunk-7vr5w75r.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Se}from"./chunk-66k7yxnr.js";import{$n,Vt}from"./chunk-3xm6dyab.js";import{Di,Oi,f,vt,M,jn,Bn,Fn,r,Q,A,i}from"./chunk-597rfddk.js";import{S}from"./chunk-62r4fa4q.js";import{hs}from"./chunk-5e9zkd65.js";import{cn,de}from"./chunk-w72p2ak0.js";import{fo}from"./chunk-g1fxmp9z.js";import{ge,re,ei,ti,At}from"./chunk-1r0c5920.js";import{ht,Br}from"./chunk-qwgdtrhj.js";import{Pt}from"./chunk-mg13q1kd.js";import{ut,Kt,Xt}from"./chunk-jjtzm6dn.js";import m from"fs";import c from"path";import{createHash as ee}from"crypto";function J(o){return ee("sha256").update(o).digest("hex").slice(0,8)}function U(o=!1){let l=o?Vt():$n(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let o=Se(),l=J(o);return{content:o,filename:`router.${l}.js`,hash:l}}import q from"path";import{createHash as te}from"crypto";function se(o={}){let l=new Set;return{context:new Proxy(o,{get(s,e){if(e in s)return s[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(s,e){if(e in s)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(o,l,a={}){let s=q.resolve(o),e=await Bun.file(s).text(),_=te("sha256").update(e).digest("hex").slice(0,16);Di();let R={};try{R=await i(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let v=g[1];if(/\bserver\b/.test(v))y.push(g[2])}let u=new Set(y.flatMap((v)=>Q(v))),{context:w}=se({__filename:s,__dirname:q.dirname(s),__stx_serverDeclared:u}),C=new Set,P={...A,...R,...a,buildMode:"compile",strict:!1},b=await r(e,w,s,P,C),T=ge(b),B=Oi();return{route:l,sourceFile:o,html:b,fragment:T,placeholders:B,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(C),contentHash:_,status:vt(e),streamTemplates:w.__streamTemplates}}var ne=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(o,l){let a=0,s=0;if(!m.existsSync(o))return{copied:a,bytes:s};m.mkdirSync(l,{recursive:!0});function e(_,R){let y=m.readdirSync(_,{withFileTypes:!0});for(let d of y){if(ne.has(d.name))continue;let g=c.join(_,d.name),u=c.join(R,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,s+=m.statSync(u).size}}}return e(o,l),{copied:a,bytes:s}}async function Uc(o={}){let l=Date.now(),a=c.resolve(o.root||process.cwd()),s=c.resolve(a,o.outputDir||".output");console.log("[stx build] Starting production build...");let e=await i(a),_=c.resolve(a,o.componentsDir??e.componentsDir??"components"),R=c.resolve(a,o.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,o.layoutsDir??e.layoutsDir??"layouts"),d=o.publicDir??e.publicDir??"public",g=de(e.app?.head,{known:cn,source:"app.head"}),u=e.app?.colorMode,w=e.router?.container||"main",C=o.routeRules??e.routeRules??{},P=Pt(C),b=o.serverApi??e.serverApi,T=typeof b==="object"?b:{};if(b)ht(a,T);if(e.runtimeConfig)S(e.runtimeConfig,{});if(m.existsSync(s))m.rmSync(s,{recursive:!0});let B=[c.join(s,"public","__stx"),c.join(s,"public","assets"),c.join(s,"server","pages"),c.join(s,"server","fragments")];for(let n of B)m.mkdirSync(n,{recursive:!0});console.log("[stx build] Discovering routes...");let v=M(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],O=v.filter((n)=>!Y.some((h)=>n.pattern.startsWith(`/${h}/`)||n.pattern===`/${h}`));console.log(`[stx build] Found ${O.length} page routes (${v.length-O.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let D=U(o.debug),x=V();await Bun.write(c.join(s,"public","__stx",D.filename),D.content),await Bun.write(c.join(s,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${D.filename} (${(D.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let k=[],H=[];for(let n of O){let h=P(n.pattern),E=h.rendering==="prerender";if(E&&(n.pattern.includes(":")||n.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${n.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(n.filePath,n.pattern,{configDir:a,componentsDir:_,partialsDir:R,layoutsDir:y,debug:o.debug});if(k.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,D.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Fn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=jn(t.html,u);if(g.htmlAttrs)t.html=Bn(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),E){let p=await At(t,{params:{},request:new Request(`http://stx.build${n.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${n.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=re(t.html,w);let z=n.pattern==="/"?"index":n.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),G=c.join("server","pages",`${z}.compiled.json`),I=c.join("server","fragments",`${z}.html`);await Bun.write(c.join(s,G),JSON.stringify(t,null,2)),await Bun.write(c.join(s,I),t.fragment),H.push({pattern:n.pattern,compiledPath:G,fragmentPath:I,isDynamic:t.hasServerScripts,hasParams:n.pattern.includes(":")||n.pattern.includes("["),prerendered:E}),console.log(`[stx build] \u2713 ${n.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${n.pattern}:`,t instanceof Error?t.message:t)}}let F=c.resolve(a,d);if(m.existsSync(F)){let{copied:n,bytes:h}=Z(F,c.join(s,"public"));if(n>0)console.log(`[stx build] Copied ${n} public asset${n===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let N=Xt(a);if(N){let{copied:n,bytes:h}=Z(N,c.join(s,"public",Kt));if(n>0)console.log(`[stx build] Copied ${n} asset${n===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${ut}/`)}let K={runtime:D.filename,router:x.filename},j=ei(H,K,s);if(j.routeRules=C,j.routerContainer=w,b)j.apiRoutes=await Br(a,s,T);if(e.runtimeConfig)await Bun.write(c.join(s,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await hs(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(s,"server/layers.json"),JSON.stringify(fo(e._layerGraph),null,2));ti(j,s);let L=Date.now()-l;return console.log(`
|
|
3
|
-
[stx build] Done in ${L}ms \u2014 ${k.length} pages compiled`),{pageCount:k.length,assets:K,outputDir:s,duration:L}}
|
|
4
|
-
export{Uc};
|
package/dist/chunk-7zn0yyqk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{A,vc,i,T,Mu,Nu}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{T as config,A as defaultConfig,Mu as defineStxConfig,i as loadStxConfig,vc as resolveStxDirectories,Nu as validateConfig};
|
package/dist/chunk-8d2kamh2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{d,ts,Ui,Wi,dc,pc,fc,gc,mc,hc,He,N,Ve,yc,Hn,bc,no,wc,Ue,n,Vn,ro,g,ee,Ou}from"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{ee as clearComponentCache,wc as componentClientSignalNames,ts as convertToCommonJS,g as createDetailedErrorMessage,mc as extractDirectiveNames,Ui as extractScriptFromTemplate,d as extractVariables,n as fileExists,Ou as getComponentCacheStats,pc as getPositionInfo,N as getSharedTranspiler,ro as getSourceLineInfo,gc as hasDirectives,Wi as hasVariables,bc as isHydrateTrigger,hc as isJavaScriptScript,Ue as renderComponentWithSlot,Vn as resolveTemplatePath,yc as scopeOnRootElement,He as shouldTranspileTypeScript,no as slotContentHasExpressions,Ve as transpileTypeScript,Hn as userComponentFileExists,fc as validateDirective,dc as validateTemplate};
|
package/dist/chunk-8ttvazck.js
DELETED
package/dist/chunk-8y4bqsxz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{oa,aa,ca,la,ua,da,pa,fa,ga,ma,ll}from"./chunk-2tfe2g58.js";export{oa as createIslandRegistry,ll as default,ma as generateIslandManifest,ca as generatePartialHydrationCSS,da as hydrateAll,ua as hydrateByStrategy,la as hydrateIsland,pa as isHydrated,fa as onHydrated,aa as processPartialHydrationDirectives,ga as processStaticDirectives};
|
package/dist/chunk-9bpnz431.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ks,Hu,Vu,mo,pe,Sc,Qn,Uu,Wu,qu,Ku,Xu,Gu,Ju,Yu,Zu}from"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";export{Gu as applyHead,Uu as definePageMeta,ks as getHead,Hu as getPageMeta,pe as mergeHeadConfigs,Ju as processHeadDirective,Zu as processMetaDirective,Yu as processTitleDirective,Xu as renderBodyAttrs,qu as renderHead,Ku as renderHtmlAttrs,Vu as resetHead,Qn as seoMetaToHeadConfig,mo as useHead,Wu as usePageTitle,Sc as useSeoMeta,Wu as useTitle};
|
package/dist/chunk-ac033b93.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_s,Rs,Ye,X,fn,nr,gn,rr,sr,kc,Cc,$c,mn,Ec,Tc,_c,Rc,Co,$o,Eo,As,To,Ac,Ze,Qe,et,tt,nt,rt,Se,Pc}from"./chunk-66k7yxnr.js";export{gn as Router,_c as abortNavigation,nr as bracketPathToRegex,Ze as clearMiddleware,$o as createClientCookieManager,nt as createMiddlewareContext,tt as createRouteLocation,Co as createServerCookieManager,Eo as createStorageManager,Rc as defineMiddleware,Cc as defineRoute,$c as defineRoutes,rr as findErrorPage,sr as formatRoutes,Rs as generateRouteManifest,_s as generateRouteTypes,To as getMiddleware,Qe as getMiddlewareNames,Se as getRouterScript,Pc as getRouterScriptDev,Ac as hasMiddleware,Ye as isFileRequestPath,et as loadMiddlewareFromDirectory,fn as matchRoute,Tc as navigateTo,X as patternToRegex,As as registerMiddleware,Ec as resetRoutes,mn as route,rt as runMiddleware,kc as setAppUrl};
|
package/dist/chunk-aj43359g.js
DELETED
package/dist/chunk-aj8yq228.js
DELETED
package/dist/chunk-as72dvvm.js
DELETED
package/dist/chunk-bfvaxrq0.js
DELETED
package/dist/chunk-bkaw7sgz.js
DELETED
package/dist/chunk-d0q2x8e3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nl}from"./chunk-zp0mg8b2.js";import"./chunk-597rfddk.js";import"./chunk-11ra3sbc.js";import"./chunk-x5ks23vx.js";import"./chunk-g1fxmp9z.js";import"./chunk-5e9zkd65.js";import"./chunk-62r4fa4q.js";import"./chunk-788g87ft.js";import"./chunk-w72p2ak0.js";import"./chunk-09hhrjk9.js";import"./chunk-tafebmtg.js";import"./chunk-757ec865.js";import"./chunk-66k7yxnr.js";import"./chunk-4n6c5rp5.js";export{nl as buildApp};
|
package/dist/chunk-d2c5727w.js
DELETED
package/dist/chunk-d5amzers.js
DELETED
package/dist/chunk-dfchrqw5.js
DELETED
package/dist/chunk-epv0ahg1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ht,jr,Br,Fr,pu,zr}from"./chunk-qwgdtrhj.js";import"./chunk-g1fxmp9z.js";import"./chunk-62r4fa4q.js";import"./chunk-66k7yxnr.js";export{Br as buildServerApi,pu as createServerApi,ht as discoverServerApi,jr as generateApiTypes,zr as isServerApiSource,Fr as productionApiDispatcher};
|