@stacksjs/stx 0.2.769 → 0.2.771
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-80gg1k0h.js → chunk-07thf07b.js} +2 -2
- package/dist/chunk-0qgdex7z.js +2 -0
- package/dist/{chunk-dbpzrkmj.js → chunk-1925kbjc.js} +1 -1
- package/dist/chunk-1gpvkgb0.js +2 -0
- package/dist/chunk-1se5y83a.js +2 -0
- package/dist/chunk-1y4agex5.js +2 -0
- package/dist/{chunk-nr3pepv1.js → chunk-2bm97z09.js} +3 -3
- package/dist/{chunk-528b302x.js → chunk-2g7yg3na.js} +5 -5
- package/dist/chunk-2p301rsb.js +2 -0
- package/dist/{chunk-33jagtss.js → chunk-2s0157xg.js} +3 -3
- package/dist/{chunk-1a4vpk9x.js → chunk-2vbgm9t4.js} +6 -6
- package/dist/chunk-33gccrx0.js +2 -0
- package/dist/{chunk-tykyhmyx.js → chunk-38c5cw2c.js} +1 -1
- package/dist/chunk-3jkbs3fc.js +2 -0
- package/dist/{chunk-svrjbeyq.js → chunk-3jv81hw3.js} +3 -3
- package/dist/chunk-3pxche1k.js +2 -0
- package/dist/chunk-3vankrf5.js +2 -0
- package/dist/{chunk-ysfeg3cn.js → chunk-477gjb2b.js} +2 -2
- package/dist/{chunk-s5kfndxv.js → chunk-4fkxm22d.js} +2 -2
- package/dist/{chunk-2w16z2y1.js → chunk-4q292036.js} +5 -5
- package/dist/{chunk-wp4nqnn7.js → chunk-4qng287p.js} +1 -1
- package/dist/chunk-4tvty67c.js +2 -0
- package/dist/chunk-4xdapekt.js +2 -0
- package/dist/{chunk-s2py8kg7.js → chunk-4xzk9529.js} +2 -2
- package/dist/chunk-53md2scd.js +2 -0
- package/dist/{chunk-zg43k117.js → chunk-55rg4qyr.js} +2 -2
- package/dist/chunk-5c4g0v5g.js +2 -0
- package/dist/chunk-5g5v7yns.js +2 -0
- package/dist/{chunk-7s9wx19m.js → chunk-5s2dwh5z.js} +11 -11
- package/dist/{chunk-py818vbj.js → chunk-5t33zwwg.js} +1 -1
- package/dist/{chunk-s6ss1qnq.js → chunk-618d3ng3.js} +6 -6
- package/dist/{chunk-fz717vpc.js → chunk-6b32wt31.js} +30 -30
- package/dist/{chunk-rk2v0wzs.js → chunk-6d1jmx97.js} +6 -6
- package/dist/{chunk-n5dd6rpt.js → chunk-6sa5adg6.js} +2 -2
- package/dist/{chunk-r3qez0ph.js → chunk-6weh2dhz.js} +15 -15
- package/dist/chunk-75st1ttq.js +2 -0
- package/dist/{chunk-nrh8t8re.js → chunk-79x0812m.js} +2 -2
- package/dist/{chunk-vp8sjx6w.js → chunk-7h0mjwkq.js} +5 -5
- package/dist/chunk-7k95121a.js +2 -0
- package/dist/chunk-7p4tvw5x.js +2 -0
- package/dist/{chunk-8x4gmead.js → chunk-81x4xnv9.js} +6 -6
- package/dist/chunk-825zg5ar.js +2 -0
- package/dist/chunk-83aq0n9s.js +2 -0
- package/dist/chunk-83c3vrbg.js +3 -0
- package/dist/{chunk-jb1c4e49.js → chunk-83fh7j8g.js} +2 -2
- package/dist/{chunk-342e6mhn.js → chunk-91q55gjp.js} +3 -3
- package/dist/chunk-9pgnhayn.js +2 -0
- package/dist/chunk-9vgkp3nj.js +2 -0
- package/dist/chunk-9za2wr5r.js +2 -0
- package/dist/{chunk-qdysx0fd.js → chunk-afxt272e.js} +13 -13
- package/dist/chunk-ba43drcj.js +2 -0
- package/dist/chunk-bpbhjn4w.js +2 -0
- package/dist/{chunk-enzrpxsj.js → chunk-bwv5j7z3.js} +4 -4
- package/dist/{chunk-ztbk9yqv.js → chunk-bwzjjxnj.js} +4 -4
- package/dist/{chunk-30kemrry.js → chunk-c9ygnsx5.js} +22 -22
- package/dist/{chunk-cz3trbvn.js → chunk-cak9fp9b.js} +7 -7
- package/dist/chunk-cgv3r6q9.js +2 -0
- package/dist/{chunk-5q97egpw.js → chunk-cn7d3389.js} +41 -41
- package/dist/{chunk-j34wqxb1.js → chunk-cn7zpm1x.js} +5 -5
- package/dist/chunk-cnt08b67.js +2 -0
- package/dist/{chunk-zj32s5na.js → chunk-ddhazq2g.js} +3 -3
- package/dist/{chunk-zmesddf4.js → chunk-ddjkt87h.js} +1 -1
- package/dist/{chunk-t70s45hc.js → chunk-dmj9gk6d.js} +2 -2
- package/dist/{chunk-4qrr2mdd.js → chunk-e6az23ep.js} +53 -53
- package/dist/{chunk-0hf0mtaf.js → chunk-e6ynacgc.js} +2 -2
- package/dist/{chunk-zv924m9g.js → chunk-erjp2w63.js} +5 -5
- package/dist/{chunk-a81m2ewb.js → chunk-f7h5ty84.js} +2 -2
- package/dist/chunk-g3sgf16e.js +2 -0
- package/dist/{chunk-ecakhzkq.js → chunk-g53y0v3f.js} +7 -7
- package/dist/chunk-g5ebz7hm.js +2 -0
- package/dist/chunk-g6m3q9n4.js +2 -0
- package/dist/{chunk-90n5kb78.js → chunk-g9kgxx0t.js} +3 -3
- package/dist/chunk-h2ymq7fa.js +2 -0
- package/dist/{chunk-kc3kt59e.js → chunk-hgm6f2t2.js} +2 -2
- package/dist/chunk-hy91tn1w.js +2 -0
- package/dist/chunk-j46nvncc.js +2 -0
- package/dist/{chunk-jgmmg2fw.js → chunk-jasfbhp3.js} +5 -5
- package/dist/chunk-jjvrm2j8.js +2 -0
- package/dist/chunk-k4pwpr5q.js +2 -0
- package/dist/chunk-kh0szwf3.js +2 -0
- package/dist/chunk-krdc3c87.js +7 -0
- package/dist/chunk-kzx3t7q6.js +2 -0
- package/dist/{chunk-1e67szzk.js → chunk-m0deyakx.js} +6 -6
- package/dist/{chunk-2bb4g9qr.js → chunk-m207mdpy.js} +2 -2
- package/dist/chunk-mvfj17fr.js +2 -0
- package/dist/{chunk-9y6hbdfh.js → chunk-nbwmcm2p.js} +4 -4
- package/dist/{chunk-wb2ej5by.js → chunk-ngzdcvry.js} +1 -1
- package/dist/{chunk-pqgk9mxp.js → chunk-nj2q40p8.js} +2 -2
- package/dist/{chunk-ddpt7ejx.js → chunk-nk4jhdnk.js} +3 -3
- package/dist/chunk-nmjgcw4g.js +2 -0
- package/dist/{chunk-ev4zxhpd.js → chunk-nnzmbfjq.js} +2 -2
- package/dist/{chunk-586xes7a.js → chunk-nwhv1889.js} +3 -3
- package/dist/{chunk-1g5fg1ys.js → chunk-p1mbbdwj.js} +2 -2
- package/dist/chunk-p454tj1h.js +2 -0
- package/dist/chunk-p7ksex4f.js +2 -0
- package/dist/{chunk-3g8cnsbk.js → chunk-pgkcbm6g.js} +2 -2
- package/dist/{chunk-ggvnmmv3.js → chunk-pqyhxpa6.js} +4 -4
- package/dist/chunk-q4m5p4wx.js +2 -0
- package/dist/chunk-q85s8ne0.js +2 -0
- package/dist/{chunk-hpdb8vkt.js → chunk-qk61pv1v.js} +4 -4
- package/dist/{chunk-rfzfk8zd.js → chunk-qmwaqdc1.js} +10 -10
- package/dist/chunk-qr5ddqbf.js +3 -0
- package/dist/{chunk-4rtr07x9.js → chunk-qtja7fpr.js} +2 -2
- package/dist/chunk-qy01jdzk.js +2 -0
- package/dist/{chunk-a2yptg7r.js → chunk-rc4zsymn.js} +2 -2
- package/dist/chunk-rfp5f55f.js +2 -0
- package/dist/{chunk-7yx2ztt5.js → chunk-rkz3k2td.js} +3 -3
- package/dist/{chunk-napd81ht.js → chunk-s369wfsp.js} +5 -5
- package/dist/{chunk-mg38q3jh.js → chunk-snbnhqn3.js} +10 -10
- package/dist/{chunk-pzt3g2m0.js → chunk-spr5bxm8.js} +1 -1
- package/dist/{chunk-a627f39k.js → chunk-ssd9g1wz.js} +1 -1
- package/dist/{chunk-p7cvn8q9.js → chunk-tahdfsp4.js} +2 -2
- package/dist/chunk-tk17tjzw.js +2 -0
- package/dist/chunk-tw2c09tw.js +2 -0
- package/dist/chunk-tynz075x.js +2 -0
- package/dist/chunk-v0tewfbx.js +2 -0
- package/dist/{chunk-cyd10m6m.js → chunk-v3kynq6v.js} +5 -5
- package/dist/{chunk-xj1k9bx9.js → chunk-vdxjyrjf.js} +2 -2
- package/dist/{chunk-jd84zgn3.js → chunk-vht2rhrj.js} +4 -4
- package/dist/chunk-vk494kgn.js +2 -0
- package/dist/{chunk-7vqq2w3x.js → chunk-vke28xq8.js} +2 -2
- package/dist/chunk-vyr8zzyr.js +2 -0
- package/dist/{chunk-p7h4y7mk.js → chunk-w07n2ddj.js} +2 -2
- package/dist/chunk-w1sjp421.js +2 -0
- package/dist/{chunk-zjar9jdd.js → chunk-wabahwkj.js} +2 -2
- package/dist/chunk-wq0wbvgd.js +2 -0
- package/dist/chunk-wr6b3a1w.js +2 -0
- package/dist/{chunk-msy46ges.js → chunk-x0qtgyqr.js} +5 -5
- package/dist/{chunk-znhzrjbm.js → chunk-x148cxrj.js} +4 -4
- package/dist/chunk-x3xtyr95.js +2 -0
- package/dist/{chunk-h8yk9qm7.js → chunk-xaqtk05e.js} +2 -2
- package/dist/chunk-xb16yy2x.js +2 -0
- package/dist/{chunk-knvt4bap.js → chunk-xr28hjkp.js} +6 -6
- package/dist/{chunk-q69dvpg1.js → chunk-xw8ygkyb.js} +1 -1
- package/dist/chunk-y7df8y9a.js +2 -0
- package/dist/chunk-ybd2tfqm.js +2 -0
- package/dist/{chunk-hxyarbb6.js → chunk-yjdnfxm7.js} +3 -3
- package/dist/chunk-yrh9yfnv.js +2 -0
- package/dist/chunk-ysm6gaq9.js +2 -0
- package/dist/{chunk-07c8rk93.js → chunk-yzbdm457.js} +2 -2
- package/dist/{chunk-fxy7jjnv.js → chunk-z1br7qeb.js} +4 -4
- package/dist/{chunk-mkk8k3nd.js → chunk-z5vkzbct.js} +4 -4
- package/dist/chunk-z6xfmrtc.js +2 -0
- package/dist/{chunk-rj9dcjeg.js → chunk-zkwtrmwg.js} +2 -2
- package/dist/{chunk-5fab5wt2.js → chunk-zs35vgyy.js} +4 -4
- package/dist/cli.js +19 -19
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/message-catalogs.d.ts +6 -0
- package/dist/message-catalogs.js +12 -8
- package/dist/native/compiler/component-mapping.js +1 -0
- package/dist/native/compiler/html-to-ir.js +1 -0
- package/dist/native/compiler/ir.d.ts +2 -0
- package/dist/native/primitives/WebView.stx +7 -0
- package/dist/native/runtime/browser-renderer.js +1 -1
- package/dist/native/runtime/craft-bridge.js +24 -0
- package/dist/native/runtime/craft.d.ts +66 -0
- package/dist/process.js +18 -4
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +4 -4
- package/dist/types/config-types.d.ts +1 -0
- package/dist/web-modules.d.ts +9 -0
- package/dist/web-modules.js +47 -0
- package/package.json +5 -5
- package/dist/chunk-01484snf.js +0 -2
- package/dist/chunk-096g00ba.js +0 -2
- package/dist/chunk-0ga7sn1k.js +0 -2
- package/dist/chunk-0nhk9p9r.js +0 -2
- package/dist/chunk-1nzg53pv.js +0 -2
- package/dist/chunk-1respkkp.js +0 -2
- package/dist/chunk-20dsfgmq.js +0 -2
- package/dist/chunk-3k6tem86.js +0 -2
- package/dist/chunk-3pma2q0h.js +0 -2
- package/dist/chunk-4cr8bep2.js +0 -2
- package/dist/chunk-4ew0291t.js +0 -2
- package/dist/chunk-5ftthxab.js +0 -2
- package/dist/chunk-5ttj2c0h.js +0 -2
- package/dist/chunk-5wp7s24b.js +0 -3
- package/dist/chunk-9v21mwfs.js +0 -2
- package/dist/chunk-b6kfq08s.js +0 -2
- package/dist/chunk-b94xf9vs.js +0 -2
- package/dist/chunk-bjggcj45.js +0 -2
- package/dist/chunk-bk3b5jyw.js +0 -2
- package/dist/chunk-bntw35k0.js +0 -2
- package/dist/chunk-bt01gdaj.js +0 -2
- package/dist/chunk-bwkw2dw3.js +0 -2
- package/dist/chunk-ctmadzad.js +0 -2
- package/dist/chunk-cwmjqker.js +0 -2
- package/dist/chunk-dbx628ra.js +0 -2
- package/dist/chunk-ddwsms1t.js +0 -2
- package/dist/chunk-dpjf62qw.js +0 -2
- package/dist/chunk-e4bsnxsj.js +0 -2
- package/dist/chunk-f8jwrvky.js +0 -2
- package/dist/chunk-h8yy3y3p.js +0 -2
- package/dist/chunk-hddwx35m.js +0 -2
- package/dist/chunk-hfcmbbkq.js +0 -2
- package/dist/chunk-hyqsvw1b.js +0 -2
- package/dist/chunk-j5dd5ncz.js +0 -7
- package/dist/chunk-j835421z.js +0 -2
- package/dist/chunk-mhc72pp2.js +0 -2
- package/dist/chunk-nsxg0t06.js +0 -2
- package/dist/chunk-p66fgjeb.js +0 -2
- package/dist/chunk-phjfsm8d.js +0 -2
- package/dist/chunk-pts7jpqc.js +0 -2
- package/dist/chunk-qcjtfrzm.js +0 -2
- package/dist/chunk-qr6jyd08.js +0 -2
- package/dist/chunk-rqpktvkn.js +0 -2
- package/dist/chunk-s1a69a8q.js +0 -2
- package/dist/chunk-s922mx0k.js +0 -2
- package/dist/chunk-spmbnchd.js +0 -2
- package/dist/chunk-t1gk6y8z.js +0 -2
- package/dist/chunk-t3cdnbq1.js +0 -2
- package/dist/chunk-t96gj0ey.js +0 -2
- package/dist/chunk-vcks4gwd.js +0 -2
- package/dist/chunk-vg6p0zst.js +0 -2
- package/dist/chunk-vjsyf8m1.js +0 -2
- package/dist/chunk-vq88tjma.js +0 -2
- package/dist/chunk-vqa2s0v4.js +0 -2
- package/dist/chunk-wtqj99tg.js +0 -2
- package/dist/chunk-xqa8f03q.js +0 -2
- package/dist/chunk-y7a0y5jq.js +0 -2
- package/dist/chunk-ydj0r3kw.js +0 -2
- package/dist/chunk-ydq170j1.js +0 -2
- package/dist/chunk-ytzzth34.js +0 -2
- package/dist/chunk-yz30cgyx.js +0 -2
- package/dist/chunk-yz85drm8.js +0 -2
package/dist/message-catalogs.js
CHANGED
|
@@ -44,6 +44,16 @@ function pageMessagesStub(language, area) {
|
|
|
44
44
|
export default kept[${key}] || (kept[${key}] = {});`;
|
|
45
45
|
}
|
|
46
46
|
const collected = new Map;
|
|
47
|
+
export function pathSpellings(file) {
|
|
48
|
+
const names = [file];
|
|
49
|
+
try {
|
|
50
|
+
names.push(realpathSync(file));
|
|
51
|
+
} catch {}
|
|
52
|
+
for (const named of [...names])
|
|
53
|
+
if (named.startsWith("/private/"))
|
|
54
|
+
names.push(named.slice(8));
|
|
55
|
+
return [...new Set(names)];
|
|
56
|
+
}
|
|
47
57
|
export function pageMessagesEnabled(options, env = process.env) {
|
|
48
58
|
if (!options.messages || env.STX_PAGE_MESSAGES === "0")
|
|
49
59
|
return !1;
|
|
@@ -61,14 +71,8 @@ export async function loadPageMessages(root, options) {
|
|
|
61
71
|
return cached.messages;
|
|
62
72
|
const catalogs = await collectMessageCatalogs(root, options), stubs = new Map;
|
|
63
73
|
for (const [file, { language, area }] of catalogs.files) {
|
|
64
|
-
const stub = pageMessagesStub(language, area)
|
|
65
|
-
|
|
66
|
-
names.push(realpathSync(file));
|
|
67
|
-
} catch {}
|
|
68
|
-
for (const named of [...names])
|
|
69
|
-
if (named.startsWith("/private/"))
|
|
70
|
-
names.push(named.slice(8));
|
|
71
|
-
for (const named of names)
|
|
74
|
+
const stub = pageMessagesStub(language, area);
|
|
75
|
+
for (const named of pathSpellings(file))
|
|
72
76
|
stubs.set(named, stub);
|
|
73
77
|
}
|
|
74
78
|
const fallback = options.fallback ?? options.languages[0];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{{-- WebView: a web page beside native controls (WKWebView in Craft's AppKit host, built with
|
|
2
|
+
`webkit: true`). `tab` names a tab created through `craft.web`; the host owns the tab, so its
|
|
3
|
+
page survives re-renders and moves when another WebView names it. --}}
|
|
4
|
+
<script server>
|
|
5
|
+
const classes = $props.class ?? $props.className ?? ''
|
|
6
|
+
</script>
|
|
7
|
+
<iframe data-native="WebView" class="{{ classes }}"></iframe>
|
|
@@ -4,7 +4,7 @@ const SYMBOL_TO_ICON = {};
|
|
|
4
4
|
for (const [name, symbol] of Object.entries(LUCIDE_TO_SF))
|
|
5
5
|
if (!(symbol in SYMBOL_TO_ICON) || name === symbol)
|
|
6
6
|
SYMBOL_TO_ICON[symbol] = name;
|
|
7
|
-
const SVG_NS = "http://www.w3.org/2000/svg", SVG = { Svg: "svg", G: "g", Path: "path", Line: "line", Rect: "rect", Circle: "circle", Ellipse: "ellipse", Polyline: "polyline", Polygon: "polygon", SvgText: "text", Animate: "animate" }, TAGS = { View: "div", SafeAreaView: "div", ScrollView: "div", KeyboardAvoidingView: "div", Text: "span", TextInput: "input", Button: "button", Link: "a", TouchableOpacity: "button", TouchableHighlight: "button", Pressable: "button", Icon: "span", Image: "img", ImageBackground: "div", Video: "video", FlatList: "div", SectionList: "div", Switch: "input", Checkbox: "input", Slider: "input", Picker: "select", SegmentedControl: "div", DatePicker: "input", Modal: "dialog", ActivityIndicator: "progress", StatusBar: "div", RefreshControl: "progress", Sidebar: "aside", SplitView: "div" }, CONTAINERS = new Set(["View", "SafeAreaView", "ScrollView", "KeyboardAvoidingView", "FlatList", "SectionList", "Sidebar", "SplitView", "ImageBackground"]), UNITLESS = new Set(["opacity", "flex", "flexGrow", "flexShrink", "fontWeight", "zIndex", "aspectRatio", "order"]), SVG_PROPS = { viewBox: "viewBox", fillRule: "fill-rule", clipRule: "clip-rule", strokeWidth: "stroke-width", strokeLinecap: "stroke-linecap", strokeLinejoin: "stroke-linejoin", strokeDasharray: "stroke-dasharray", strokeDashoffset: "stroke-dashoffset", fillOpacity: "fill-opacity", strokeOpacity: "stroke-opacity", textAnchor: "text-anchor" };
|
|
7
|
+
const SVG_NS = "http://www.w3.org/2000/svg", SVG = { Svg: "svg", G: "g", Path: "path", Line: "line", Rect: "rect", Circle: "circle", Ellipse: "ellipse", Polyline: "polyline", Polygon: "polygon", SvgText: "text", Animate: "animate" }, TAGS = { View: "div", SafeAreaView: "div", ScrollView: "div", KeyboardAvoidingView: "div", Text: "span", TextInput: "input", Button: "button", Link: "a", TouchableOpacity: "button", TouchableHighlight: "button", Pressable: "button", Icon: "span", Image: "img", ImageBackground: "div", Video: "video", WebView: "iframe", FlatList: "div", SectionList: "div", Switch: "input", Checkbox: "input", Slider: "input", Picker: "select", SegmentedControl: "div", DatePicker: "input", Modal: "dialog", ActivityIndicator: "progress", StatusBar: "div", RefreshControl: "progress", Sidebar: "aside", SplitView: "div" }, CONTAINERS = new Set(["View", "SafeAreaView", "ScrollView", "KeyboardAvoidingView", "FlatList", "SectionList", "Sidebar", "SplitView", "ImageBackground"]), UNITLESS = new Set(["opacity", "flex", "flexGrow", "flexShrink", "fontWeight", "zIndex", "aspectRatio", "order"]), SVG_PROPS = { viewBox: "viewBox", fillRule: "fill-rule", clipRule: "clip-rule", strokeWidth: "stroke-width", strokeLinecap: "stroke-linecap", strokeLinejoin: "stroke-linejoin", strokeDasharray: "stroke-dasharray", strokeDashoffset: "stroke-dashoffset", fillOpacity: "fill-opacity", strokeOpacity: "stroke-opacity", textAnchor: "text-anchor" };
|
|
8
8
|
|
|
9
9
|
export class BrowserScreenRenderer {
|
|
10
10
|
container;
|
|
@@ -58,6 +58,7 @@ function capabilityFlags(capabilities) {
|
|
|
58
58
|
health: capabilities.has("health"),
|
|
59
59
|
dialogs: capabilities.has("dialog"),
|
|
60
60
|
browser: capabilities.has("browser"),
|
|
61
|
+
web: capabilities.has("web"),
|
|
61
62
|
appleSignIn: capabilities.has("appleSignIn"),
|
|
62
63
|
background: capabilities.has("background"),
|
|
63
64
|
crashReporter: capabilities.has("crashReporter"),
|
|
@@ -299,6 +300,29 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
|
|
|
299
300
|
callback(payload.detail.id);
|
|
300
301
|
})
|
|
301
302
|
};
|
|
303
|
+
if (capabilities.has("web")) {
|
|
304
|
+
const call = (method, args) => request("Web", method, args), web = {
|
|
305
|
+
create: (options = {}) => call("create", [options]),
|
|
306
|
+
list: () => call("list", []),
|
|
307
|
+
on: (type, callback) => protocol.on("CRAFT_EVENT", ({ payload }) => {
|
|
308
|
+
if (payload?.event === "craftWebView" && payload.detail && (type === "*" || payload.detail.type === type))
|
|
309
|
+
callback(payload.detail);
|
|
310
|
+
})
|
|
311
|
+
};
|
|
312
|
+
for (const method of ["navigate", "back", "forward", "reload", "stop", "close", "state", "focus", "setZoom", "setInspectable", "evaluate", "find", "snapshot"])
|
|
313
|
+
web[method] = (id, ...args) => call(method, [String(id), ...args]);
|
|
314
|
+
web.tab = (id) => {
|
|
315
|
+
const tab = { id: String(id) };
|
|
316
|
+
for (const method of ["navigate", "back", "forward", "reload", "stop", "close", "state", "focus", "setZoom", "setInspectable", "evaluate", "find", "snapshot"])
|
|
317
|
+
tab[method] = (...args) => web[method](id, ...args);
|
|
318
|
+
tab.on = (type, callback) => web.on(type, (event) => {
|
|
319
|
+
if (event.tab === tab.id)
|
|
320
|
+
callback(event);
|
|
321
|
+
});
|
|
322
|
+
return tab;
|
|
323
|
+
};
|
|
324
|
+
craft.web = web;
|
|
325
|
+
}
|
|
302
326
|
if (capabilities.has("background"))
|
|
303
327
|
craft.background = { complete: (ok = !0, id) => request("Background", "complete", [ok !== !1, typeof id === "string" ? id : null]).then(() => !0, () => !1) };
|
|
304
328
|
if (capabilities.has("appleSignIn"))
|
|
@@ -151,6 +151,7 @@ export declare interface NativeFile {
|
|
|
151
151
|
export declare interface NativeCraft {
|
|
152
152
|
liveActivity?: NativeLiveActivities
|
|
153
153
|
desktop?: NativeDesktop
|
|
154
|
+
web?: NativeWeb
|
|
154
155
|
platform: string
|
|
155
156
|
capabilityProtocolVersion: number
|
|
156
157
|
route: NativeRoute
|
|
@@ -319,4 +320,69 @@ export declare interface NativeDesktop {
|
|
|
319
320
|
setBadge: (count: number) => Promise<boolean>
|
|
320
321
|
onCommand: (callback: (id: string) => void) => () => void
|
|
321
322
|
}
|
|
323
|
+
/** What a tab reports: in `create`, `state` and `list` answers and in every `state` event. */
|
|
324
|
+
export declare interface NativeWebTabState {
|
|
325
|
+
tab: string
|
|
326
|
+
profile: string
|
|
327
|
+
private: boolean
|
|
328
|
+
title: string
|
|
329
|
+
url: string
|
|
330
|
+
progress: number
|
|
331
|
+
loading: boolean
|
|
332
|
+
canGoBack: boolean
|
|
333
|
+
canGoForward: boolean
|
|
334
|
+
secure: boolean
|
|
335
|
+
zoom: number
|
|
336
|
+
themeColor?: string
|
|
337
|
+
camera: boolean
|
|
338
|
+
microphone: boolean
|
|
339
|
+
}
|
|
340
|
+
export declare interface NativeWebTab {
|
|
341
|
+
readonly id: string
|
|
342
|
+
navigate: (url: string) => Promise<boolean>
|
|
343
|
+
back: () => Promise<boolean>
|
|
344
|
+
forward: () => Promise<boolean>
|
|
345
|
+
reload: (options?: { ignoreCache?: boolean }) => Promise<boolean>
|
|
346
|
+
stop: () => Promise<boolean>
|
|
347
|
+
close: () => Promise<boolean>
|
|
348
|
+
state: () => Promise<NativeWebTabState>
|
|
349
|
+
focus: () => Promise<boolean>
|
|
350
|
+
setZoom: (zoom: number) => Promise<number>
|
|
351
|
+
setInspectable: (inspectable: boolean) => Promise<boolean>
|
|
352
|
+
evaluate: <T = unknown>(script: string, options?: { isolated?: boolean }) => Promise<T>
|
|
353
|
+
find: (text: string, options?: { backwards?: boolean, caseSensitive?: boolean, wraps?: boolean }) => Promise<{ found: boolean }>
|
|
354
|
+
snapshot: (options?: { width?: number }) => Promise<string>
|
|
355
|
+
on: <K extends NativeWebEvent['type']>(type: K | '*', callback: (event: Extract<NativeWebEvent, { type: K }>) => void) => () => void
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Tabs the host owns, shown by `<WebView tab="id">`. A tab outlives the view
|
|
359
|
+
* showing it, so a page survives re-renders and moves between panes.
|
|
360
|
+
*/
|
|
361
|
+
export declare interface NativeWeb {
|
|
362
|
+
create: (options?: { id?: string, url?: string, profile?: string, private?: boolean, inspectable?: boolean }) => Promise<NativeWebTabState>
|
|
363
|
+
list: () => Promise<NativeWebTabState[]>
|
|
364
|
+
tab: (id: string) => NativeWebTab
|
|
365
|
+
on: <K extends NativeWebEvent['type']>(type: K | '*', callback: (event: Extract<NativeWebEvent, { type: K }>) => void) => () => void
|
|
366
|
+
navigate: (id: string, url: string) => Promise<boolean>
|
|
367
|
+
back: (id: string) => Promise<boolean>
|
|
368
|
+
forward: (id: string) => Promise<boolean>
|
|
369
|
+
reload: (id: string, options?: { ignoreCache?: boolean }) => Promise<boolean>
|
|
370
|
+
stop: (id: string) => Promise<boolean>
|
|
371
|
+
close: (id: string) => Promise<boolean>
|
|
372
|
+
state: (id: string) => Promise<NativeWebTabState>
|
|
373
|
+
focus: (id: string) => Promise<boolean>
|
|
374
|
+
setZoom: (id: string, zoom: number) => Promise<number>
|
|
375
|
+
setInspectable: (id: string, inspectable: boolean) => Promise<boolean>
|
|
376
|
+
evaluate: <T = unknown>(id: string, script: string, options?: { isolated?: boolean }) => Promise<T>
|
|
377
|
+
find: (id: string, text: string, options?: { backwards?: boolean, caseSensitive?: boolean, wraps?: boolean }) => Promise<{ found: boolean }>
|
|
378
|
+
snapshot: (id: string, options?: { width?: number }) => Promise<string>
|
|
379
|
+
}
|
|
322
380
|
export type NativePermissionStatus = 'granted' | 'denied' | 'undetermined';
|
|
381
|
+
export type NativeWebEvent = | ({ type: 'state' } & NativeWebTabState)
|
|
382
|
+
| { type: 'navigationStart' | 'navigationFinish', tab: string, url: string }
|
|
383
|
+
| { type: 'navigationError', tab: string, url: string, code: number, domain: string, message: string }
|
|
384
|
+
| { type: 'favicon', tab: string, url: string }
|
|
385
|
+
/** `target=_blank` and `window.open` bring a ready `child` tab; a modifier click brings only the `url`. */
|
|
386
|
+
| { type: 'open', tab: string, url: string, child?: string, popup?: boolean, width?: number, height?: number, background?: boolean, reason: 'script' | 'modifier' }
|
|
387
|
+
| { type: 'close' | 'crashed', tab: string, url?: string }
|
|
388
|
+
| { type: 'download', tab: string, id: string, state: 'started' | 'progress' | 'finished' | 'failed', path: string, name: string, url: string, received: number, total: number, fraction: number, message?: string }
|
package/dist/process.js
CHANGED
|
@@ -302,15 +302,22 @@ async function buildPageBundles(result, options, dependencies, context) {
|
|
|
302
302
|
return built;
|
|
303
303
|
}
|
|
304
304
|
async function pageBundleTags(result, options, dependencies, context = {}) {
|
|
305
|
-
const { withModuleSubstitutes, moduleSubstitutionKey } = await import("./client-script-bundler.js"), catalogs = await import("./message-catalogs.js"), messagesOption = options
|
|
306
|
-
let messages = null;
|
|
307
|
-
|
|
305
|
+
const { withModuleSubstitutes, moduleSubstitutionKey } = await import("./client-script-bundler.js"), catalogs = await import("./message-catalogs.js"), { messages: messagesOption, webModules: webModulesOption } = options;
|
|
306
|
+
let messages = null, standIns = null;
|
|
307
|
+
const substitutable = moduleSubstitutionKey() === "" && !context.__stx_native_screen;
|
|
308
|
+
if (messagesOption && catalogs.pageMessagesEnabled(options) && substitutable)
|
|
308
309
|
try {
|
|
309
310
|
messages = await catalogs.loadPageMessages(process.cwd(), messagesOption);
|
|
310
311
|
} catch (error) {
|
|
311
312
|
warnPageMessagesOnce(error);
|
|
312
313
|
}
|
|
313
|
-
|
|
314
|
+
if (webModulesOption && Object.keys(webModulesOption).length && substitutable)
|
|
315
|
+
try {
|
|
316
|
+
standIns = await (await import("./web-modules.js")).loadWebModules(process.cwd(), webModulesOption);
|
|
317
|
+
} catch (error) {
|
|
318
|
+
warnWebModulesOnce(error);
|
|
319
|
+
}
|
|
320
|
+
const substitutes = new Map([...standIns ?? [], ...messages?.stubs ?? []]), build = () => buildPageBundles(result, options, dependencies, context), built = substitutes.size ? await withModuleSubstitutes(substitutes, build) : await build();
|
|
314
321
|
let messagesTag = null;
|
|
315
322
|
if (messages) {
|
|
316
323
|
const areas = catalogs.messageAreasIn(built.modulesCode, built.storeCode, built.composableCode), code = catalogs.pageMessagesScript(messages, catalogs.pageLanguages(result, messages), areas);
|
|
@@ -328,6 +335,13 @@ function warnPageMessagesOnce(error) {
|
|
|
328
335
|
warnedPageMessages = !0;
|
|
329
336
|
console.warn(`[stx] messages: ${error instanceof Error ? error.message : String(error)}; pages ship every language`);
|
|
330
337
|
}
|
|
338
|
+
let warnedWebModules = !1;
|
|
339
|
+
function warnWebModulesOnce(error) {
|
|
340
|
+
if (warnedWebModules)
|
|
341
|
+
return;
|
|
342
|
+
warnedWebModules = !0;
|
|
343
|
+
console.warn(`[stx] ${error instanceof Error ? error.message : String(error)}; pages bundle the real modules`);
|
|
344
|
+
}
|
|
331
345
|
function placeSignalsRuntimeBeforeScripts(html, afterRuntime = "") {
|
|
332
346
|
const runtime = findScriptBlockByAttribute(html, "data-stx-runtime");
|
|
333
347
|
if (!runtime)
|
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-
|
|
2
|
+
import{Ys,zt,bl,xg}from"./chunk-x148cxrj.js";import{Js,Ri,bg,wg,vg}from"./chunk-xr28hjkp.js";import{ml,hl,yl,hg,yg}from"./chunk-vke28xq8.js";import{Ue,En,Ai}from"./chunk-nnzmbfjq.js";import{Sg,kg,_g,Cg,Zs,ay}from"./chunk-qtja7fpr.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
|
|
3
|
+
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-y7df8y9a.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
6
6
|
<meta charset="UTF-8">
|
|
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
|
|
|
233
233
|
}, 5000);
|
|
234
234
|
</script>
|
|
235
235
|
</body>
|
|
236
|
-
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=Ue(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=
|
|
236
|
+
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=Ue(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Ys(n,t);if(a){let s=zt(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return Ri(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,hl as auditBuildOutput,ml as auditConfig,re as buildPwaAssets,yl as calculateAuditResult,yg as formatAuditResult,Ai as formatSize,j as generateManifest,_ as generateManifestJson,wg as generateManifestLink,F as generateOfflinePage,Ue as generatePrecacheManifest,En as generatePrecacheManifestJs,M as generatePwaIcons,Js as generatePwaTags,Ys as generateServiceWorker,xg as generateServiceWorkerAuto,bg as generateSwRegistrationScript,vg as generateThemeColorMeta,N as getExpectedIconPaths,zt as getServiceWorkerFileName,Ri as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,bl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Zs as pwaDirectives,Sg as pwaInstallDirective,_g as pwaOfflineDirective,Cg as pwaPushDirective,kg as pwaUpdateDirective,ay as registerPwaDirectives,hg as runPwaAudit,D as validateManifest};
|
package/dist/ssg.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-wmnzapn8.js";import{w,
|
|
3
|
-
`)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=w(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=w(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=
|
|
2
|
+
import"./chunk-wmnzapn8.js";import{w,Qc}from"./chunk-5s2dwh5z.js";import"./chunk-yzbdm457.js";import"./chunk-4833k99b.js";import{$t,S}from"./chunk-e6az23ep.js";import"./chunk-p1mbbdwj.js";import"./chunk-zkwtrmwg.js";import"./chunk-79x0812m.js";import{St,kt,_t,Ct,Et,Tt}from"./chunk-z1br7qeb.js";import{a}from"./chunk-qmwaqdc1.js";import{_s}from"./chunk-cak9fp9b.js";import"./chunk-bwzjjxnj.js";import"./chunk-v3kynq6v.js";import{he,Qt,en}from"./chunk-zs35vgyy.js";import"./chunk-4fkxm22d.js";import{y}from"./chunk-6d1jmx97.js";import{ht,i}from"./chunk-cn7d3389.js";import"./chunk-bwv5j7z3.js";import"./chunk-81x4xnv9.js";import{us}from"./chunk-g53y0v3f.js";import"./chunk-yjdnfxm7.js";import"./chunk-xaqtk05e.js";import{Xa,Ga,Ja}from"./chunk-rkz3k2td.js";import{Yt,Jn,Yn}from"./chunk-wwnqbv9j.js";import{Zt}from"./chunk-xw8ygkyb.js";import"./chunk-83c3vrbg.js";import"./chunk-w07n2ddj.js";import{X,we}from"./chunk-jasfbhp3.js";import"./chunk-5t33zwwg.js";import"./chunk-3jv81hw3.js";import{l}from"./chunk-4xzk9529.js";import{s,ge}from"./chunk-2bm97z09.js";import D from"fs";import f from"path";import{createHash as Pt}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 It(t){return Bun.hash(t).toString(16)}function ot(t,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Rt,(e,u,g,v)=>{let x=v.trim();if(!x)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)x=Dt(x);let p=It(x);if(!n.has(p))n.set(p,x);let P=r.integrity?` data-stx-integrity="sha384-${Pt("sha384").update(x).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let x=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!x)return t;return t.slice(0,v)+x+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=K(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?K(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){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
|
+
`)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=w(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=w(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=Qc(r,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let r="read";try{let n=await Bun.file(t).text();r="parse";let o=Zt(n),c=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of c){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&$t(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(q);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let x=await v();r="result";let p=Array.isArray(x)?{paths:x}:x;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let c=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=mt(r).some((u)=>D.existsSync(u)),c=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&us(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let c=this.getHash(r,n);this.cache.set(t,{hash:c,html:o,generatedAt:Date.now(),dependencies:n})}}class ft{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let c=o.replace(/_/g,"/").replace(".json","");if(t.test(c))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let c of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(c.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:c.params,props:c.props,revalidate:c.revalidate})}}return r}function mt(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let r of mt(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...c}=n;return c}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[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",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${e[1]}
|
|
6
6
|
})()
|
|
@@ -37,7 +37,7 @@ ${t.map((o)=>{let c=new URL(o.loc,r).href,e=` <url>
|
|
|
37
37
|
${n.join(`
|
|
38
38
|
`)}
|
|
39
39
|
</channel>
|
|
40
|
-
</rss>`}async function Vt(t={}){let r=Date.now();en();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,x={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-
|
|
40
|
+
</rss>`}async function Vt(t={}){let r=Date.now();en();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,x={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-g5ebz7hm.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-9pgnhayn.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-g5ebz7hm.js");await d('<div class="bg-black"></div>')}catch{}St();let yt=n?.routeMiddleware?.dir||"middleware";await _t(process.cwd(),yt);let J=kt();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let xt=n?.routeMiddleware?.global||[];Ja(n?.layoutsDir,l(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:n?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:G,props:bt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=te(A),vt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...xt,...vt];if(nt.length>0){let B=Ct(h,G,O||{}),L=Et(B,null,void 0,{isServer:!0}),j=await Tt(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=ee(String(C),h),U=re(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,H),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(H),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
|
|
41
41
|
const validate = ${it[1]};
|
|
42
42
|
return validate(route);
|
|
43
43
|
`)({params:G})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await wt(k,G,bt,e,n);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
@@ -69,7 +69,7 @@ ${d}`)}if(e.cache)await T.save();if(e.generate404){let d=f.join(e.pagesDir,"404.
|
|
|
69
69
|
<a href="/">Go home</a>
|
|
70
70
|
</div>
|
|
71
71
|
</body>
|
|
72
|
-
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),G)}}let V=f.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(V).text(),{},V,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=
|
|
72
|
+
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),G)}}let V=f.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(V).text(),{},V,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=_s({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...m.length>0?{disallow:m}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(f.join(e.outputDir,"robots.txt"),k),console.log("Generated robots.txt")}if(e.rss){let d=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(d.getItems)m=await d.getItems();let k=Jt(d,m),h=f.join(e.outputDir,"rss.xml");await Bun.write(h,k),u.rssPath=h,console.log(`Generated rss.xml with ${m.length} items`)}let z=Xa(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let W=Ga(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} repeated asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&D.existsSync(e.publicDir))await Y(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let et=Yn();if(et)await Y(et,f.join(e.outputDir,Jn)),console.log(`Copied assets from ${Yt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-r,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:x,pages:p};await Bun.write(f.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await e.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
|
|
73
73
|
Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
74
74
|
Build complete!
|
|
75
75
|
Total: ${u.totalPages} pages
|
|
@@ -348,6 +348,7 @@ export declare interface StxConfig {
|
|
|
348
348
|
pwa?: Partial<PwaConfig>
|
|
349
349
|
offline?: import('../offline/app-service-worker').OfflineAppConfig
|
|
350
350
|
messages?: import('../message-catalogs').PageMessagesOptions
|
|
351
|
+
webModules?: import('../web-modules').WebModulesOption
|
|
351
352
|
components?: Partial<ComponentConfig>
|
|
352
353
|
routeMiddleware?: Partial<RouteMiddlewareConfig>
|
|
353
354
|
heatmap?: Partial<HeatmapConfig>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stand-ins, as JavaScript by every spelling of each replaced module's
|
|
3
|
+
* path (the bundler's substitutes, `withModuleSubstitutes`). Read again when
|
|
4
|
+
* a stand-in changes. Throws on a module or stand-in that is not there, or a
|
|
5
|
+
* stand-in whose relative imports would resolve elsewhere.
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadWebModules(root: string, option: WebModulesOption): Promise<Map<string, string>>;
|
|
8
|
+
/** Each module (relative to the project root) and the module a web page loads instead. */
|
|
9
|
+
export type WebModulesOption = Record<string, string>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { existsSync, statSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { pathSpellings } from "./message-catalogs.js";
|
|
4
|
+
const loaded = new Map;
|
|
5
|
+
function loaderFor(file) {
|
|
6
|
+
const extension = path.extname(file);
|
|
7
|
+
if (extension === ".tsx")
|
|
8
|
+
return "tsx";
|
|
9
|
+
if (extension === ".jsx")
|
|
10
|
+
return "jsx";
|
|
11
|
+
if (extension === ".ts" || extension === ".mts" || extension === ".cts")
|
|
12
|
+
return "ts";
|
|
13
|
+
return "js";
|
|
14
|
+
}
|
|
15
|
+
export async function loadWebModules(root, option) {
|
|
16
|
+
const pairs = Object.entries(option).map(([module, standIn]) => [path.resolve(root, module), path.resolve(root, standIn)]), signature = pairs.map(([module, standIn]) => {
|
|
17
|
+
try {
|
|
18
|
+
return `${module}\x00${standIn}\x00${statSync(standIn).mtimeMs}`;
|
|
19
|
+
} catch {
|
|
20
|
+
return `${module}\x00${standIn}\x00-`;
|
|
21
|
+
}
|
|
22
|
+
}).join(`
|
|
23
|
+
`), cacheKey = `${root}\x00${JSON.stringify(option)}`, cached = loaded.get(cacheKey);
|
|
24
|
+
if (cached && cached.signature === signature)
|
|
25
|
+
return cached.standIns;
|
|
26
|
+
const standIns = new Map;
|
|
27
|
+
for (const [module, standIn] of pairs) {
|
|
28
|
+
const name = path.relative(root, module);
|
|
29
|
+
if (!existsSync(module))
|
|
30
|
+
throw Error(`webModules: ${name} does not exist`);
|
|
31
|
+
if (!existsSync(standIn))
|
|
32
|
+
throw Error(`webModules: ${path.relative(root, standIn)}, the stand-in for ${name}, does not exist`);
|
|
33
|
+
if (module === standIn)
|
|
34
|
+
throw Error(`webModules: ${name} stands in for itself`);
|
|
35
|
+
const source = await Bun.file(standIn).text(), transpiler = new Bun.Transpiler({ loader: loaderFor(standIn), target: "browser" });
|
|
36
|
+
if (path.dirname(standIn) !== path.dirname(module)) {
|
|
37
|
+
const relative = transpiler.scanImports(source).find((entry) => /^\.\.?\//.test(entry.path));
|
|
38
|
+
if (relative)
|
|
39
|
+
throw Error(`webModules: ${path.relative(root, standIn)} imports ${relative.path}, which would resolve from ${path.relative(root, path.dirname(module)) || "."}; a stand-in imports relatively only from the directory of the module it replaces`);
|
|
40
|
+
}
|
|
41
|
+
const code = transpiler.transformSync(source);
|
|
42
|
+
for (const spelling of pathSpellings(module))
|
|
43
|
+
standIns.set(spelling, code);
|
|
44
|
+
}
|
|
45
|
+
loaded.set(cacheKey, { signature, standIns });
|
|
46
|
+
return standIns;
|
|
47
|
+
}
|
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.771",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/ts-css": "^0.3.11",
|
|
130
130
|
"@stacksjs/clapp": "^0.2.16",
|
|
131
|
-
"@stacksjs/desktop": "0.2.
|
|
132
|
-
"@stacksjs/sanitizer": "0.2.
|
|
131
|
+
"@stacksjs/desktop": "0.2.771",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.771",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.771",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.771",
|
|
137
137
|
"ts-broadcasting": "^0.0.11",
|
|
138
138
|
"ts-images": "^0.2.22",
|
|
139
139
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-01484snf.js
DELETED
package/dist/chunk-096g00ba.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{mt,zn,sh}from"./chunk-hpdb8vkt.js";import{le,Hn,oh,Vn,ho,Kr,Xr,ih,ah,ch,Un,Wn,yo,Gr,lh}from"./chunk-3g8cnsbk.js";import"./chunk-07c8rk93.js";export{ho as batch,sh as default,Hn as derived,Vn as effect,mt as generateSignalsRuntime,zn as generateSignalsRuntimeDev,Wn as isDerived,Un as isSignal,oh as memo,Xr as onDestroy,Kr as onMount,Gr as peek,ch as pendingLifecycleCounts,ah as runDestroyCallbacks,ih as runMountCallbacks,le as state,yo as untrack,lh as useOptimistic};
|
package/dist/chunk-0ga7sn1k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Gg}from"./chunk-zg43k117.js";import"./chunk-napd81ht.js";import"./chunk-hpdb8vkt.js";import"./chunk-q69dvpg1.js";import"./chunk-cyd10m6m.js";import"./chunk-5q97egpw.js";import"./chunk-rk2v0wzs.js";import"./chunk-h8yk9qm7.js";import"./chunk-hxyarbb6.js";import"./chunk-8x4gmead.js";import"./chunk-enzrpxsj.js";import"./chunk-5wp7s24b.js";import"./chunk-p7h4y7mk.js";import"./chunk-ecakhzkq.js";import"./chunk-jgmmg2fw.js";import"./chunk-py818vbj.js";import"./chunk-s5kfndxv.js";import"./chunk-rfzfk8zd.js";import"./chunk-svrjbeyq.js";import"./chunk-nrh8t8re.js";import"./chunk-ztbk9yqv.js";import"./chunk-cz3trbvn.js";import"./chunk-fxy7jjnv.js";import"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{Gg as buildForProduction};
|
package/dist/chunk-0nhk9p9r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Wl,ql,Kl,Xl,Gl,Jl,Yl,Zl,Ql,eu,wm}from"./chunk-1a4vpk9x.js";export{Wl as createIslandRegistry,wm as default,eu as generateIslandManifest,Kl as generatePartialHydrationCSS,Jl as hydrateAll,Gl as hydrateByStrategy,Xl as hydrateIsland,Yl as isHydrated,Zl as onHydrated,ql as processPartialHydrationDirectives,Ql as processStaticDirectives};
|
package/dist/chunk-1nzg53pv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{If,$h,Rh,Ah,Ph,Of,Nf,Ih,Oh,Uo,Nh,cr,lr,hs}from"./chunk-s5kfndxv.js";import{tt}from"./chunk-3csfmhg0.js";import"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{Ph as __setSignalsGeneratorsForTest,tt as cacheEngineFingerprint,lr as cacheTemplate,cr as checkCache,Nh as clearDevCaches,Nf as getCachedRouterScript,Of as getCachedSignalsRuntime,Ih as getServeClientAsset,Uo as getServeModuleBundle,hs as hashFilePath,Rh as invalidateFileCache,Ah as invalidateFileCacheByDir,$h as readFileCached,Oh as registerServeModuleBundle,If as templateCache};
|
package/dist/chunk-1respkkp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{zg}from"./chunk-0hf0mtaf.js";import"./chunk-rfzfk8zd.js";import"./chunk-svrjbeyq.js";import"./chunk-nrh8t8re.js";import"./chunk-ztbk9yqv.js";import"./chunk-cz3trbvn.js";import"./chunk-fxy7jjnv.js";import"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{zg as buildApp};
|
package/dist/chunk-20dsfgmq.js
DELETED
package/dist/chunk-3k6tem86.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{m,ui,zc,Hc,tg,ng,rg,sg,og,Bs,ig,je,Y,Be,ag,_r,cg,Wc,gi,Fe,r,yn,qc,h,fe,Vh}from"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{fe as clearComponentCache,gi as componentClientSignalNames,ui as convertToCommonJS,h as createDetailedErrorMessage,og as extractDirectiveNames,zc as extractScriptFromTemplate,m as extractVariables,r as fileExists,Vh as getComponentCacheStats,ng as getPositionInfo,Y as getSharedTranspiler,qc as getSourceLineInfo,sg as hasDirectives,Hc as hasVariables,cg as isHydrateTrigger,ig as isJavaScriptScript,Fe as renderComponentWithSlot,yn as resolveTemplatePath,ag as scopeOnRootElement,Bs as scopeSequenceKey,je as shouldTranspileTypeScript,Wc as slotContentHasExpressions,Be as transpileTypeScript,_r as userComponentFileExists,rg as validateDirective,tg as validateTemplate};
|
package/dist/chunk-3pma2q0h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rs,sr,Tf}from"./chunk-hxyarbb6.js";import"./chunk-p7h4y7mk.js";import"./chunk-ecakhzkq.js";import"./chunk-jgmmg2fw.js";import"./chunk-py818vbj.js";import"./chunk-rfzfk8zd.js";import"./chunk-svrjbeyq.js";import"./chunk-nrh8t8re.js";import"./chunk-ztbk9yqv.js";import"./chunk-cz3trbvn.js";import"./chunk-fxy7jjnv.js";import{At}from"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{Tf as declareBareLoopHead,At as parseLoopBinding,sr as processLoops,rs as reportDeferredLoopWarnings};
|
package/dist/chunk-4cr8bep2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{oo,Yi,zr,io,ao,$n,qt,Zi,Hr,Vr,co,lo,Vg,Ug,dt}from"./chunk-msy46ges.js";export{dt as DeployError,Yi as calculateSha1,zr as collectDeployFiles,Vr as createDefaultNetlifyConfig,io as createFileManifest,oo as createNetlifyClient,Vg as deploy,Hr as detectProjectConfig,ao as filterRequiredFiles,$n as formatSize,Zi as generateNetlifyToml,qt as getTotalSize,lo as hasNetlifyConfig,Ug as initNetlify,co as writeNetlifyConfig};
|
package/dist/chunk-4ew0291t.js
DELETED
package/dist/chunk-5ftthxab.js
DELETED
package/dist/chunk-5ttj2c0h.js
DELETED
package/dist/chunk-5wp7s24b.js
DELETED
package/dist/chunk-9v21mwfs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hg}from"./chunk-xj1k9bx9.js";import"./chunk-napd81ht.js";import"./chunk-q69dvpg1.js";import"./chunk-cyd10m6m.js";import"./chunk-5wp7s24b.js";import"./chunk-jgmmg2fw.js";import"./chunk-rfzfk8zd.js";import"./chunk-svrjbeyq.js";import"./chunk-nrh8t8re.js";import"./chunk-ztbk9yqv.js";import"./chunk-cz3trbvn.js";import"./chunk-fxy7jjnv.js";import"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{Hg as startProductionServer};
|
package/dist/chunk-b6kfq08s.js
DELETED
package/dist/chunk-b94xf9vs.js
DELETED
package/dist/chunk-bjggcj45.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Sm,ga,iu,km,_m,Cm,Em,Tm,au,cu,$m,Rm,Am,Pm}from"./chunk-1e67szzk.js";import"./chunk-5q97egpw.js";import"./chunk-rk2v0wzs.js";import"./chunk-h8yk9qm7.js";import"./chunk-hxyarbb6.js";import"./chunk-8x4gmead.js";import"./chunk-enzrpxsj.js";import"./chunk-5wp7s24b.js";import"./chunk-p7h4y7mk.js";import"./chunk-ecakhzkq.js";import"./chunk-jgmmg2fw.js";import"./chunk-py818vbj.js";import"./chunk-s5kfndxv.js";import"./chunk-rfzfk8zd.js";import"./chunk-svrjbeyq.js";import"./chunk-nrh8t8re.js";import"./chunk-ztbk9yqv.js";import"./chunk-cz3trbvn.js";import"./chunk-fxy7jjnv.js";import"./chunk-4qrr2mdd.js";import"./chunk-rj9dcjeg.js";import"./chunk-1g5fg1ys.js";import"./chunk-7s9wx19m.js";import"./chunk-4833k99b.js";import"./chunk-07c8rk93.js";export{iu as SUSPENSE_RESOLVER_RUNTIME,ga as buildSuspenseResolveScript,Tm as createStreamRenderer,Cm as extractStreamBoundaries,Pm as generateHydrationRuntime,cu as islandDirective,Rm as processSectionDirectives,_m as processStreamDirectives,$m as registerStreamingDirectives,km as renderStreamingPage,Sm as streamTemplate,Em as streamTemplateSimple,Am as streamToResponse,au as streamingSuspenseDirective};
|