@stacksjs/stx 0.2.648 → 0.2.654
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-17srvghf.js +2 -0
- package/dist/{chunk-nt0n0vjm.js → chunk-1zb7ar32.js} +2 -2
- package/dist/{chunk-e87xa4r3.js → chunk-26whq1rg.js} +2 -2
- package/dist/{chunk-k79x96ra.js → chunk-28jtt8hn.js} +42 -42
- package/dist/{chunk-zsgcsqat.js → chunk-2yg9y1na.js} +99 -99
- package/dist/{chunk-481d4kr9.js → chunk-2zqg980j.js} +1 -1
- package/dist/{chunk-x5tjb4y4.js → chunk-35zjpdcb.js} +1 -1
- package/dist/chunk-3634ds4n.js +2 -0
- package/dist/{chunk-nj1t4g3a.js → chunk-36649w15.js} +6 -6
- package/dist/chunk-3msbc4zj.js +2 -0
- package/dist/chunk-3q3gsr7m.js +2 -0
- package/dist/{chunk-3q163st5.js → chunk-3v8yejzc.js} +3 -3
- package/dist/chunk-42v0vegr.js +2 -0
- package/dist/{chunk-2jh21f1n.js → chunk-46w53nj5.js} +1 -1
- package/dist/{chunk-0jhdrgpr.js → chunk-48acjmeg.js} +2 -2
- package/dist/{chunk-55zaxb4s.js → chunk-4e0z858k.js} +10 -10
- package/dist/{chunk-yq021b3r.js → chunk-4nbq7mnp.js} +4 -4
- package/dist/{chunk-7rta163c.js → chunk-4qwvqbzf.js} +2 -2
- package/dist/{chunk-hjm69qnj.js → chunk-50pkybyn.js} +1 -1
- package/dist/{chunk-88z4wkrj.js → chunk-5yxd4ryz.js} +2 -2
- package/dist/{chunk-vqc4h16r.js → chunk-6598d3m6.js} +2 -2
- package/dist/{chunk-ab7zqtax.js → chunk-6raq8r7w.js} +1 -1
- package/dist/{chunk-zmh9p9aa.js → chunk-6rparhvs.js} +1 -1
- package/dist/{chunk-t1k9160w.js → chunk-71mthavp.js} +32 -32
- package/dist/chunk-73swyb5p.js +2 -0
- package/dist/{chunk-b0hpshvk.js → chunk-7wnd2psp.js} +1 -1
- package/dist/{chunk-ymymwzt5.js → chunk-8gewq710.js} +1 -1
- package/dist/{chunk-3zyjqvsq.js → chunk-929zbzh7.js} +9 -9
- package/dist/{chunk-v2x9vzgw.js → chunk-9y2ncrnq.js} +2 -2
- package/dist/{chunk-c9k40352.js → chunk-a2a74f6c.js} +1 -1
- package/dist/{chunk-67xhsacd.js → chunk-bgt1dx8c.js} +1 -1
- package/dist/chunk-c9b0cme2.js +2 -0
- package/dist/{chunk-89yj6tcd.js → chunk-cq40n7ak.js} +1 -1
- package/dist/{chunk-f46ht5kq.js → chunk-cvw7gknw.js} +3 -3
- package/dist/chunk-d0xcykw6.js +2 -0
- package/dist/{chunk-vdxjy7j2.js → chunk-d3bsfd10.js} +2 -2
- package/dist/{chunk-rjh2jwxx.js → chunk-d4tf0tfn.js} +4 -4
- package/dist/chunk-dxjc11hx.js +2 -0
- package/dist/{chunk-zhf01af3.js → chunk-dxk5sqtv.js} +2 -2
- package/dist/chunk-edz1h5f9.js +2 -0
- package/dist/{chunk-fg3jw17w.js → chunk-en8jgavy.js} +6 -5
- package/dist/chunk-etw04j02.js +2 -0
- package/dist/chunk-ewng6v6g.js +49 -0
- package/dist/{chunk-9121nkpj.js → chunk-ex1kd5gs.js} +3 -3
- package/dist/chunk-fbd9w4ys.js +2 -0
- package/dist/{chunk-qfe7ps3v.js → chunk-ff1cb7k4.js} +2 -2
- package/dist/chunk-fnj3gja0.js +2 -0
- package/dist/chunk-fsnby15p.js +2 -0
- package/dist/{chunk-pbtkbe48.js → chunk-g7j3mwzd.js} +18 -18
- package/dist/{chunk-3p7mk3mw.js → chunk-gmrc24cb.js} +1 -1
- package/dist/{chunk-p44kmbdg.js → chunk-h09a03ay.js} +4 -4
- package/dist/chunk-h0bg2h0j.js +2 -0
- package/dist/{chunk-wjt0kej9.js → chunk-h4vg78mw.js} +1 -1
- package/dist/{chunk-4q2dtxdk.js → chunk-hjmnsa6a.js} +1 -1
- package/dist/{chunk-er60h3j3.js → chunk-ht3dxx5m.js} +1 -1
- package/dist/{chunk-h5nmf98w.js → chunk-hw7sv4ac.js} +1 -1
- package/dist/{chunk-pg0xzsss.js → chunk-j2bkjtp3.js} +4 -4
- package/dist/chunk-j3472s37.js +3 -0
- package/dist/chunk-jmx4q1yr.js +2 -0
- package/dist/{chunk-j393gsfd.js → chunk-k49fg322.js} +2 -2
- package/dist/{chunk-0vkawews.js → chunk-k7nan28e.js} +5 -5
- package/dist/{chunk-06w0z1cm.js → chunk-kcrtqyek.js} +4 -4
- package/dist/{chunk-t2pzy3x1.js → chunk-khvc43pq.js} +2 -2
- package/dist/{chunk-qm4672dj.js → chunk-ktvr9ta8.js} +2 -2
- package/dist/{chunk-wq6j2h32.js → chunk-m47spkxr.js} +7 -7
- package/dist/chunk-m947aq9a.js +2 -0
- package/dist/{chunk-jkaszw24.js → chunk-mgj34bbg.js} +1 -1
- package/dist/{chunk-r1r6311d.js → chunk-n7xbhzzt.js} +4 -4
- package/dist/chunk-ndtxkps4.js +2 -0
- package/dist/{chunk-np4zm2ph.js → chunk-nttspz8c.js} +4 -4
- package/dist/chunk-pge3bzqx.js +2 -0
- package/dist/{chunk-9txn4rvb.js → chunk-phws2c9s.js} +1 -1
- package/dist/{chunk-j5gd0e53.js → chunk-q1x7ckfw.js} +1 -1
- package/dist/chunk-q79ksfcd.js +2 -0
- package/dist/chunk-qjf1c8fa.js +2 -0
- package/dist/{chunk-gv793yqq.js → chunk-qrt8b179.js} +2 -2
- package/dist/{chunk-w2zceynt.js → chunk-qygynhzc.js} +1 -1
- package/dist/{chunk-6ea6az61.js → chunk-ra56jh7e.js} +1 -1
- package/dist/chunk-rmdw6s65.js +2 -0
- package/dist/chunk-s0crnpyx.js +2 -0
- package/dist/{chunk-8p9kpfk8.js → chunk-s4cs2n2c.js} +1 -1
- package/dist/{chunk-t82be9yf.js → chunk-sd4jwn3y.js} +1 -1
- package/dist/chunk-t7j4h3nf.js +128 -0
- package/dist/{chunk-sgptbhrc.js → chunk-v9bmw06j.js} +1 -1
- package/dist/{chunk-gz90fqn8.js → chunk-vmn2b6p6.js} +1 -1
- package/dist/{chunk-aprhqxky.js → chunk-vngnface.js} +3 -3
- package/dist/{chunk-0h8tg21j.js → chunk-vs8kg85h.js} +1 -1
- package/dist/{chunk-84djpte6.js → chunk-wbzmr6a4.js} +2 -2
- package/dist/{chunk-ye8tgmd3.js → chunk-wh838rdh.js} +1 -1
- package/dist/{chunk-xm2mee4a.js → chunk-x9d4bpmh.js} +21 -21
- package/dist/{chunk-mnp8ecj9.js → chunk-xdgvb5a5.js} +1 -1
- package/dist/{chunk-pxs7sgnp.js → chunk-xhmpfq9d.js} +1 -1
- package/dist/{chunk-hfpv56cp.js → chunk-xq410rsc.js} +1 -1
- package/dist/{chunk-xvs04cnp.js → chunk-y8881za3.js} +1 -1
- package/dist/chunk-z75bp57x.js +2 -0
- package/dist/{chunk-8d2f2e42.js → chunk-znnfjxph.js} +1 -1
- package/dist/chunk-zrqremja.js +2 -0
- package/dist/cli.js +11 -11
- package/dist/client/signals-head-runtime.js +2 -1
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/expressions.js +9 -0
- package/dist/interpolation-context.d.ts +2 -0
- package/dist/interpolation-context.js +8 -0
- package/dist/native/bridge/protocol.d.ts +2 -0
- package/dist/native/compiler/bundle.d.ts +6 -0
- package/dist/native/compiler/bundle.js +16 -9
- package/dist/native/compiler/headwind-to-style.d.ts +5 -1
- package/dist/native/compiler/headwind-to-style.js +188 -3
- package/dist/native/compiler/html-to-ir.d.ts +2 -1
- package/dist/native/compiler/html-to-ir.js +9 -4
- package/dist/native/compiler/ir.d.ts +15 -0
- package/dist/native/compiler/layout-chrome.d.ts +6 -0
- package/dist/native/compiler/layout-chrome.js +72 -0
- package/dist/native/compiler/render-screen.js +19 -3
- package/dist/native/compiler/style-config.d.ts +32 -0
- package/dist/native/compiler/style-config.js +71 -0
- package/dist/native/compiler/stylesheet-rules.d.ts +17 -0
- package/dist/native/compiler/stylesheet-rules.js +107 -0
- package/dist/native/runtime/browser-screen.js +11 -0
- package/dist/native/runtime/craft-bridge.d.ts +3 -0
- package/dist/native/runtime/craft-bridge.js +41 -4
- package/dist/native/runtime/jsc-globals.d.ts +2 -0
- package/dist/native/runtime/jsc-globals.js +8 -1
- package/dist/native/runtime/native-host.d.ts +5 -0
- package/dist/native/runtime/native-host.js +48 -5
- package/dist/native/runtime/shared-screen.js +18 -2
- package/dist/native/runtime/web-navigation.d.ts +33 -0
- package/dist/native/runtime/web-navigation.js +107 -0
- package/dist/native/runtime/web-storage.d.ts +56 -0
- package/dist/native/runtime/web-storage.js +89 -0
- package/dist/native/testing.d.ts +3 -0
- package/dist/native/testing.js +3 -0
- package/dist/native-signing.d.ts +2 -0
- package/dist/native-signing.js +13 -4
- package/dist/process.js +2 -0
- package/dist/pwa.js +3 -3
- package/dist/reactive-bindings.js +3 -1
- package/dist/ssg.js +12 -12
- package/dist/utils.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-0en5jwjy.js +0 -2
- package/dist/chunk-2n3pa5gm.js +0 -2
- package/dist/chunk-354jmw2k.js +0 -3
- package/dist/chunk-3b5bphcn.js +0 -2
- package/dist/chunk-57md41g9.js +0 -2
- package/dist/chunk-6vh8s0pg.js +0 -2
- package/dist/chunk-8fsq2ynj.js +0 -2
- package/dist/chunk-8tpmz4as.js +0 -2
- package/dist/chunk-9x0zt65f.js +0 -2
- package/dist/chunk-a2bw46t9.js +0 -2
- package/dist/chunk-a4sggwcz.js +0 -2
- package/dist/chunk-b4fd2dtk.js +0 -2
- package/dist/chunk-c1479y92.js +0 -2
- package/dist/chunk-embejqx4.js +0 -2
- package/dist/chunk-eyfxw7ds.js +0 -2
- package/dist/chunk-f3y4fnaa.js +0 -2
- package/dist/chunk-f7930sce.js +0 -2
- package/dist/chunk-fsbjat59.js +0 -2
- package/dist/chunk-h15xb2vd.js +0 -2
- package/dist/chunk-m6qfqkbh.js +0 -2
- package/dist/chunk-ncqh5qe5.js +0 -2
- package/dist/chunk-radggg3p.js +0 -49
- package/dist/chunk-sszhz1zh.js +0 -2
- package/dist/chunk-weqc0ssb.js +0 -2
- package/dist/chunk-xfzcv0jc.js +0 -2
- package/dist/chunk-y9x4pyp2.js +0 -2
- package/dist/chunk-zdnc7a4t.js +0 -127
- package/dist/chunk-zyqs6a3p.js +0 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export const NATIVE_WEB_STORAGE_PREFIX = { local: "stx.localStorage:", session: "stx.sessionStorage:" }, NATIVE_SESSION_RUN_KEY = "stx.sessionStorage.run";
|
|
2
|
+
const INDEX = "\x00keys";
|
|
3
|
+
|
|
4
|
+
export class NativeWebStorage {
|
|
5
|
+
#read;
|
|
6
|
+
#prefix;
|
|
7
|
+
#run;
|
|
8
|
+
constructor(store, prefix, run = null) {
|
|
9
|
+
this.#read = store;
|
|
10
|
+
this.#prefix = prefix;
|
|
11
|
+
this.#run = run;
|
|
12
|
+
}
|
|
13
|
+
#store() {
|
|
14
|
+
const store = this.#read();
|
|
15
|
+
if (!store || typeof store.getSync !== "function" || typeof store.setSync !== "function")
|
|
16
|
+
throw Object.assign(Error("This app keeps no storage for native screens"), { name: "SecurityError" });
|
|
17
|
+
return store;
|
|
18
|
+
}
|
|
19
|
+
#keys() {
|
|
20
|
+
const keys = this.#store().getSync(this.#prefix + INDEX);
|
|
21
|
+
return Array.isArray(keys) ? keys.filter((key) => typeof key === "string") : [];
|
|
22
|
+
}
|
|
23
|
+
#writeKeys(keys) {
|
|
24
|
+
this.#store().setSync(this.#prefix + INDEX, keys.length ? keys : null);
|
|
25
|
+
}
|
|
26
|
+
#liveKeys() {
|
|
27
|
+
return this.#run ? this.#keys().filter((key) => this.getItem(key) !== null) : this.#keys();
|
|
28
|
+
}
|
|
29
|
+
get length() {
|
|
30
|
+
return this.#liveKeys().length;
|
|
31
|
+
}
|
|
32
|
+
key(index) {
|
|
33
|
+
return this.#liveKeys()[Number(index)] ?? null;
|
|
34
|
+
}
|
|
35
|
+
getItem(key) {
|
|
36
|
+
const value = this.#store().getSync(this.#prefix + String(key));
|
|
37
|
+
if (this.#run) {
|
|
38
|
+
if (!value || typeof value !== "object" || value.run !== this.#run())
|
|
39
|
+
return null;
|
|
40
|
+
const kept = value.value;
|
|
41
|
+
return typeof kept === "string" ? kept : null;
|
|
42
|
+
}
|
|
43
|
+
return typeof value === "string" ? value : null;
|
|
44
|
+
}
|
|
45
|
+
setItem(key, value) {
|
|
46
|
+
const name = String(key), text = String(value);
|
|
47
|
+
this.#store().setSync(this.#prefix + name, this.#run ? { run: this.#run(), value: text } : text);
|
|
48
|
+
const keys = this.#keys();
|
|
49
|
+
if (!keys.includes(name))
|
|
50
|
+
this.#writeKeys([...keys, name]);
|
|
51
|
+
}
|
|
52
|
+
removeItem(key) {
|
|
53
|
+
const name = String(key);
|
|
54
|
+
this.#store().setSync(this.#prefix + name, null);
|
|
55
|
+
const keys = this.#keys();
|
|
56
|
+
if (keys.includes(name))
|
|
57
|
+
this.#writeKeys(keys.filter((other) => other !== name));
|
|
58
|
+
}
|
|
59
|
+
clear() {
|
|
60
|
+
for (const key of this.#keys())
|
|
61
|
+
this.#store().setSync(this.#prefix + key, null);
|
|
62
|
+
this.#writeKeys([]);
|
|
63
|
+
}
|
|
64
|
+
get [Symbol.toStringTag]() {
|
|
65
|
+
return "Storage";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function newRun() {
|
|
69
|
+
return `${Date.now().toString(36)}.${Math.random().toString(36).slice(2, 10)}`;
|
|
70
|
+
}
|
|
71
|
+
export function installNativeWebStorage(target, craft) {
|
|
72
|
+
const store = () => craft.storage ?? null;
|
|
73
|
+
if (target.localStorage == null)
|
|
74
|
+
target.localStorage = new NativeWebStorage(store, NATIVE_WEB_STORAGE_PREFIX.local);
|
|
75
|
+
if (target.sessionStorage == null)
|
|
76
|
+
target.sessionStorage = new NativeWebStorage(store, NATIVE_WEB_STORAGE_PREFIX.session, () => {
|
|
77
|
+
const run = store()?.getSync(NATIVE_SESSION_RUN_KEY);
|
|
78
|
+
return typeof run === "string" && run ? run : "";
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export function startNativeSessionRun(craft) {
|
|
82
|
+
const storage = craft.storage;
|
|
83
|
+
if (storage && typeof storage.setSync === "function")
|
|
84
|
+
try {
|
|
85
|
+
storage.setSync(NATIVE_SESSION_RUN_KEY, newRun());
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(`[stx native] could not start a new sessionStorage run: ${error instanceof Error ? error.message : String(error)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
package/dist/native/testing.d.ts
CHANGED
|
@@ -45,7 +45,9 @@ export declare interface NativeScreenOptions {
|
|
|
45
45
|
snapshotWrite?: (name: string, value: unknown) => Promise<unknown>
|
|
46
46
|
dialog?: { actionSheet?: (options: any) => Promise<string>, confirm?: (options: any) => Promise<boolean> }
|
|
47
47
|
colorScheme?: 'light' | 'dark'
|
|
48
|
+
viewportWidth?: number
|
|
48
49
|
params?: Record<string, unknown>
|
|
50
|
+
routeURL?: string
|
|
49
51
|
capabilities?: string[]
|
|
50
52
|
capabilityTimeoutMs?: number
|
|
51
53
|
platform?: 'ios' | 'android' | 'web'
|
|
@@ -99,6 +101,7 @@ export declare interface NativeScreen {
|
|
|
99
101
|
background: () => void
|
|
100
102
|
resume: () => void
|
|
101
103
|
appearance: (scheme: 'light' | 'dark') => void
|
|
104
|
+
viewport: (width: number, height?: number) => void
|
|
102
105
|
appear: () => void
|
|
103
106
|
disappear: () => void
|
|
104
107
|
newParams: (params: Record<string, unknown>) => void
|
package/dist/native/testing.js
CHANGED
|
@@ -243,12 +243,14 @@ export function mountNativeScreen(code, screen, options = {}) {
|
|
|
243
243
|
platform: options.platform ?? "ios",
|
|
244
244
|
capabilityTimeoutMs: options.capabilityTimeoutMs ?? 100,
|
|
245
245
|
colorScheme: options.colorScheme ?? "light",
|
|
246
|
+
...options.viewportWidth === void 0 ? {} : { viewportWidth: options.viewportWidth },
|
|
246
247
|
capabilities: options.capabilities ?? [],
|
|
247
248
|
initialAppState: options.initialAppState ?? "active",
|
|
248
249
|
appURL: options.appURL ?? "https://fixture.invalid/m",
|
|
249
250
|
appVersion: options.appVersion ?? "1.0.0",
|
|
250
251
|
appBuild: options.appBuild ?? "1",
|
|
251
252
|
...options.sessionEvents === !1 ? {} : { sessionTokenKey },
|
|
253
|
+
...options.routeURL ? { routeURL: options.routeURL } : {},
|
|
252
254
|
postMessage: (raw) => {
|
|
253
255
|
const message = JSON.parse(raw);
|
|
254
256
|
messages.push(JSON.parse(raw));
|
|
@@ -420,6 +422,7 @@ export function mountNativeScreen(code, screen, options = {}) {
|
|
|
420
422
|
background: () => appState("background"),
|
|
421
423
|
resume: () => appState("active"),
|
|
422
424
|
appearance: (scheme) => send("APPEARANCE", { colorScheme: scheme }),
|
|
425
|
+
viewport: (width, height = 800) => send("VIEWPORT", { width, height }),
|
|
423
426
|
appear: () => send("SCREEN_FOCUS", { focused: !0 }),
|
|
424
427
|
disappear: () => send("SCREEN_FOCUS", { focused: !1 }),
|
|
425
428
|
newParams: (params) => send("ROUTE_PARAMS", { params }),
|
package/dist/native-signing.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Isolate the plist dictionary before converting its JSON-compatible values. */
|
|
2
|
+
export declare function parseMacOSProfileEntitlements(decoded: Uint8Array): Record<string, unknown>;
|
|
1
3
|
export declare function signMacOSBundle(bundle: string, nestedExecutables?: string[], options?: MacOSSigningOptions): Promise<void>;
|
|
2
4
|
/** Bind a bundle's resources and identity to its macOS signature. */
|
|
3
5
|
export declare interface MacOSSigningOptions {
|
package/dist/native-signing.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { copyFileSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
export function parseMacOSProfileEntitlements(decoded) {
|
|
5
|
+
const dictionary = Bun.spawnSync(["/usr/bin/plutil", "-extract", "Entitlements", "xml1", "-o", "-", "-"], { stdin: decoded });
|
|
6
|
+
if (dictionary.exitCode !== 0)
|
|
7
|
+
throw Error(`Could not extract the macOS profile entitlements: ${dictionary.stderr.toString().trim() || dictionary.stdout.toString().trim()}`);
|
|
8
|
+
const json = Bun.spawnSync(["/usr/bin/plutil", "-convert", "json", "-o", "-", "-"], { stdin: dictionary.stdout });
|
|
9
|
+
if (json.exitCode !== 0)
|
|
10
|
+
throw Error(`Could not convert the macOS profile entitlements: ${json.stderr.toString().trim() || json.stdout.toString().trim()}`);
|
|
11
|
+
const entitlements = JSON.parse(json.stdout.toString());
|
|
12
|
+
if (!entitlements || typeof entitlements !== "object" || Array.isArray(entitlements))
|
|
13
|
+
throw Error("The macOS profile entitlements must be a dictionary.");
|
|
14
|
+
return entitlements;
|
|
15
|
+
}
|
|
4
16
|
export async function signMacOSBundle(bundle, nestedExecutables = [], options = {}) {
|
|
5
17
|
if (process.platform !== "darwin")
|
|
6
18
|
return;
|
|
@@ -12,10 +24,7 @@ export async function signMacOSBundle(bundle, nestedExecutables = [], options =
|
|
|
12
24
|
const decoded = Bun.spawnSync(["/usr/bin/security", "cms", "-D", "-i", options.provisioningProfile]);
|
|
13
25
|
if (decoded.exitCode !== 0)
|
|
14
26
|
throw Error("Could not decode the macOS provisioning profile.");
|
|
15
|
-
const
|
|
16
|
-
if (profile.exitCode !== 0)
|
|
17
|
-
throw Error("The macOS profile has no entitlement dictionary.");
|
|
18
|
-
const profileEntitlements = JSON.parse(profile.stdout.toString());
|
|
27
|
+
const profileEntitlements = parseMacOSProfileEntitlements(decoded.stdout);
|
|
19
28
|
let entitlements = {};
|
|
20
29
|
if (options.entitlements) {
|
|
21
30
|
const requested = Bun.spawnSync(["/usr/bin/plutil", "-convert", "json", "-o", "-", options.entitlements]);
|
package/dist/process.js
CHANGED
|
@@ -419,6 +419,8 @@ ${tag}`).join("");
|
|
|
419
419
|
const msg = error instanceof Error ? error.message : String(error), enhancedError = new StxRuntimeError(`Template processing failed: ${msg}`, filePath, void 0, void 0, template.substring(0, 200) + (template.length > 200 ? "..." : ""));
|
|
420
420
|
errorLogger.log(enhancedError, { filePath, context });
|
|
421
421
|
devHelpers.logDetailedError(enhancedError, { filePath, template: template.substring(0, 500) });
|
|
422
|
+
if (isProduction() && !options.debug)
|
|
423
|
+
console.error(`[stx] ${path.relative(process.cwd(), filePath) || filePath}: ${enhancedError.message}`);
|
|
422
424
|
if (options.debug)
|
|
423
425
|
throw enhancedError;
|
|
424
426
|
return errorRecovery.createFallbackContent("Template Processing", enhancedError);
|
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Es,jt,bc,gu}from"./chunk-
|
|
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{Es,jt,bc,gu}from"./chunk-mgj34bbg.js";import{_s,Xo,du,pu,fu}from"./chunk-nttspz8c.js";import{mc,hc,yc,lu,uu}from"./chunk-wpmrz872.js";import{Fe,wn,Jo}from"./chunk-wpm58d6p.js";import{mu,hu,yu,bu,Ts,qp}from"./chunk-qv6axke4.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-fsnby15p.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=Fe(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Es(n,t);if(a){let s=jt(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 Xo(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,hc as auditBuildOutput,mc as auditConfig,re as buildPwaAssets,yc as calculateAuditResult,uu as formatAuditResult,Jo as formatSize,j as generateManifest,_ as generateManifestJson,pu as generateManifestLink,F as generateOfflinePage,Fe as generatePrecacheManifest,wn as generatePrecacheManifestJs,M as generatePwaIcons,
|
|
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=Fe(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Es(n,t);if(a){let s=jt(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 Xo(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,hc as auditBuildOutput,mc as auditConfig,re as buildPwaAssets,yc as calculateAuditResult,uu as formatAuditResult,Jo as formatSize,j as generateManifest,_ as generateManifestJson,pu as generateManifestLink,F as generateOfflinePage,Fe as generatePrecacheManifest,wn as generatePrecacheManifestJs,M as generatePwaIcons,_s as generatePwaTags,Es as generateServiceWorker,gu as generateServiceWorkerAuto,du as generateSwRegistrationScript,fu as generateThemeColorMeta,N as getExpectedIconPaths,jt as getServiceWorkerFileName,Xo as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,bc as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Ts as pwaDirectives,mu as pwaInstallDirective,yu as pwaOfflineDirective,bu as pwaPushDirective,hu as pwaUpdateDirective,qp as registerPwaDirectives,lu as runPwaAudit,D as validateManifest};
|
|
@@ -14,13 +14,15 @@ function hasStoreRefs(expression) {
|
|
|
14
14
|
return /\$\w+\./.test(expression);
|
|
15
15
|
}
|
|
16
16
|
export function processReactiveBindings(html) {
|
|
17
|
-
if (
|
|
17
|
+
if (!/\{\{[^}]*\$\w/.test(html) || !/\$\w+\./.test(html))
|
|
18
18
|
return { html, bindings: [], stores: new Set };
|
|
19
19
|
const bindings = [], stores = new Set, tagPattern = /<(\w+)([^>]*?)(\s*\/?>)/g;
|
|
20
20
|
let result = html;
|
|
21
21
|
result = result.replace(tagPattern, (match, tagName, attributes, closing) => {
|
|
22
22
|
if (["script", "style", "template"].includes(tagName.toLowerCase()))
|
|
23
23
|
return match;
|
|
24
|
+
if (!attributes.includes("{{"))
|
|
25
|
+
return match;
|
|
24
26
|
const elementBindings = [];
|
|
25
27
|
let hasBindings = !1, processedAttrs = attributes;
|
|
26
28
|
const attrPattern = /(\w+(?:-\w+)*)\s*=\s*"([^"]*\{\{[^}]*\$\w+[^}]*\}\}[^"]*)"/g, attrMatches = [...attributes.matchAll(attrPattern)];
|
package/dist/ssg.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
3
|
-
`)}class ct{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[a,r]of Object.entries(n))this.cache.set(a,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),n={};for(let[a,r]of this.cache)n[a]=r;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let a=x.statSync(t),r=`${this.salt}|${t}:${a.mtimeMs}`;for(let e of n)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let o=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);o=(o<<5)-o+l,o=o&o}return Math.abs(o).toString(36)}get(t,n){let a=this.cache.get(t);if(!a)return null;let r=this.getHash(n,a.dependencies??[]);if(a.hash!==r)return this.cache.delete(t),null;return a.html}set(t,n,a,r){let o=this.getHash(n,a);this.cache.set(t,{hash:o,html:r,generatedAt:Date.now(),dependencies:a})}}class lt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let a=this.getFilePath(t);await x.promises.mkdir(g.dirname(a),{recursive:!0}),await Bun.write(a,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await x.promises.unlink(n)}async invalidatePattern(t){let n=g.join(this.cacheDir,"isr");if(!x.existsSync(n))return;let a=await x.promises.readdir(n);for(let r of a){let o=r.replace(/_/g,"/").replace(".json","");if(t.test(o))await x.promises.unlink(g.join(n,r))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function
|
|
2
|
+
import"./chunk-9y2ncrnq.js";import"./chunk-4e0z858k.js";import"./chunk-4qwvqbzf.js";import"./chunk-ce6zddpf.js";import"./chunk-2yg9y1na.js";import"./chunk-2h8ea0we.js";import"./chunk-35zjpdcb.js";import"./chunk-a3d0g4mr.js";import{vt,wt,xt,St,kt,Ct}from"./chunk-qrt8b179.js";import{i}from"./chunk-3v8yejzc.js";import{Yr}from"./chunk-h09a03ay.js";import"./chunk-04kg16qs.js";import"./chunk-5yxd4ryz.js";import{Ce,Gt,Kt}from"./chunk-cvw7gknw.js";import"./chunk-xhmpfq9d.js";import{h}from"./chunk-ff1cb7k4.js";import{ft,s}from"./chunk-g7j3mwzd.js";import"./chunk-929zbzh7.js";import"./chunk-ewng6v6g.js";import"./chunk-36649w15.js";import"./chunk-k7nan28e.js";import"./chunk-prf164ct.js";import{Ji,Yi,Zi}from"./chunk-6ajahb2x.js";import{qt,jn,Bn}from"./chunk-xaa36b0x.js";import"./chunk-8gewq710.js";import{V,me}from"./chunk-n7xbhzzt.js";import"./chunk-wh838rdh.js";import"./chunk-26whq1rg.js";import{c}from"./chunk-dxk5sqtv.js";import x from"fs";import g from"path";import{createHash as mt}from"crypto";function yt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var bt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Pt(t){return Bun.hash(t).toString(16)}function nt(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let a=new Map,r=t.replace(bt,(e,l,w,y)=>{let f=y.trim();if(!f)return e;if(/\bdata-stx-src=/.test(w))return e;if(n.minify)f=yt(f);let S=Pt(f);if(!a.has(S))a.set(S,f);let P=n.integrity?` data-stx-integrity="sha384-${mt("sha384").update(f).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),o=Array.from(a,([e,l])=>({hash:e,code:l}));return{html:r,chunks:o}}var $t=new Set(["visible","idle"]);function it(t){if(!t.includes("data-stx-src="))return t;let n=new Map,a=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=a.exec(t))!==null)n.set(r[1],r[2]);let o=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if($t.has(n.get(l[1])||""))o.add(l[2]);let w=t.lastIndexOf("</head>");if(o.size===0||w===-1)return t;let y=Array.from(o).filter((f)=>!t.includes(`rel="prefetch" href="${f}"`)).map((f)=>`<link rel="prefetch" href="${f}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var Dt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function W(t){let n=t.trim();if(!n)return null;let a=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(a).origin+new URL(a).pathname.replace(/\/$/,"")}catch{return null}}function Rt(t){for(let n of Dt){let a=t[n];if(!a)continue;let r=W(a);if(r)return{url:r,source:"env",via:n}}return null}function st(t){if(!t||typeof t!=="object")return null;let n=t,a=n.site?.url??n.url??n.app?.url;return typeof a==="string"?W(a):null}async function Et(t){let{existsSync:n}=await import("fs"),a=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let o=a.resolve(t,r);if(!n(o))continue;try{let e=await import(o),l=st(e.default??e);if(l)return l}catch{}}return null}async function at(t={}){let n=t.cwd??process.cwd(),a=t.env??process.env;if(t.explicit){let l=W(t.explicit);if(l)return{url:l,source:"option"}}let r=st(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let o=await Et(n);if(o)return{url:o,source:"site.config",via:"url"};let e=Rt(a);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ot(){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 ct{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[a,r]of Object.entries(n))this.cache.set(a,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),n={};for(let[a,r]of this.cache)n[a]=r;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let a=x.statSync(t),r=`${this.salt}|${t}:${a.mtimeMs}`;for(let e of n)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let o=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);o=(o<<5)-o+l,o=o&o}return Math.abs(o).toString(36)}get(t,n){let a=this.cache.get(t);if(!a)return null;let r=this.getHash(n,a.dependencies??[]);if(a.hash!==r)return this.cache.delete(t),null;return a.html}set(t,n,a,r){let o=this.getHash(n,a);this.cache.set(t,{hash:o,html:r,generatedAt:Date.now(),dependencies:a})}}class lt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let a=this.getFilePath(t);await x.promises.mkdir(g.dirname(a),{recursive:!0}),await Bun.write(a,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await x.promises.unlink(n)}async invalidatePattern(t){let n=g.join(this.cacheDir,"isr");if(!x.existsSync(n))return;let a=await x.promises.readdir(n);for(let r of a){let o=r.replace(/_/g,"/").replace(".json","");if(t.test(o))await x.promises.unlink(g.join(n,r))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function It(t){try{let a=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!a)return null;let r=a[1];if(!r.includes("getStaticPaths"))return null;let o=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!o)return null;return await Function(`
|
|
4
4
|
return (async function getStaticPaths() {
|
|
5
5
|
${o[1]}
|
|
6
6
|
})()
|
|
7
|
-
`)()}catch(n){return console.error(`Error extracting static paths from ${t}:`,n),null}}async function
|
|
7
|
+
`)()}catch(n){return console.error(`Error extracting static paths from ${t}:`,n),null}}async function Bt(t){let n=[];if(!t.isDynamic)n.push({url:t.pattern,params:{}});else{let a=await It(t.filePath);if(!a||a.paths.length===0)return console.warn(`Warning: Dynamic route ${t.pattern} has no getStaticPaths or returned empty paths`),n;for(let r of a.paths){let o=t.pattern;for(let[e,l]of Object.entries(r.params))o=o.replace(`:${e}`,l).replace(`:${e}*`,l);n.push({url:o,params:r.params,props:r.props,revalidate:r.revalidate})}}return n}async function jt(t){let n=[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"];for(let a of n)if(await Bun.file(a).exists())try{let r=await import(a);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:o,...e}=r;return e}}catch(r){console.error(`Error loading data file ${a}:`,r)}return null}async function Ft(t,n,a){let r=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!r)return null;let o=r[1];if(!o.includes("getStaticProps"))return null;try{let e=o.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
|
-
`)(n)}catch(e){return console.error(`Error executing getStaticProps in ${a}:`,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
|
+
`)(n)}catch(e){return console.error(`Error executing getStaticProps in ${a}:`,e),null}}function Ot(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 ut(t,n,a={},r,o){let e=await Bun.file(t.filePath).text(),l=await jt(t.filePath),w=await Ft(e,n,t.filePath),y={...l||{},...w||{},...a,params:n,$route:{path:t.pattern,params:n}},f=new Set,S=[],P=[],D={...o,...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(Ot(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 s(e,y,t.filePath,D,f);for(let b of[t.filePath,...f])for(let B of Ce(b))f.add(B);if(Object.keys(n).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
|
|
13
13
|
</head>`);else p=`${b}
|
|
14
|
-
${p}`}if(p=await me(p,{router:r.router}),p=await h(p),r.minify!==!1)return{html:
|
|
14
|
+
${p}`}if(p=await me(p,{router:r.router}),p=await h(p),r.minify!==!1)return{html:Tt(p),dependencies:Array.from(f),includeFailures:S,serverScriptFailures:P};return{html:p,dependencies:Array.from(f),includeFailures:S,serverScriptFailures:P}}function Tt(t){let n=[],a=0,r=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,o;while((o=r.exec(t))!==null){let l=t.slice(a,o.index);n.push(l.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=o[1],y=o[2],f=o[3];y=y.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),n.push(w+y+f),a=o.index+o[0].length}let e=t.slice(a);return n.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function At(t){let n=0;for(let a=0;a<t.length;a++){let r=t.charCodeAt(a);n=(n<<5)-n+r,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Lt(t,n,a,r){if(a?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return r.some((o)=>{if(o instanceof RegExp)return o.test(t);return o.endsWith("/")?t===o.slice(0,-1)||t.startsWith(o):t===o})}function Mt(t,n){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
15
15
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
16
16
|
${t.map((r)=>{let o=new URL(r.loc,n).href,e=` <url>
|
|
17
17
|
<loc>${I(o)}</loc>`;if(r.lastmod)e+=`
|
|
@@ -20,7 +20,7 @@ ${t.map((r)=>{let o=new URL(r.loc,n).href,e=` <url>
|
|
|
20
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
|
|
23
|
+
</urlset>`}function I(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ut(t,n){let a=n.map((r)=>{let o=" <item>";if(o+=`
|
|
24
24
|
<title>${I(r.title)}</title>`,o+=`
|
|
25
25
|
<link>${I(r.link)}</link>`,r.description)o+=`
|
|
26
26
|
<description>${I(r.description)}</description>`;if(r.pubDate)o+=`
|
|
@@ -41,7 +41,7 @@ ${t.map((r)=>{let o=new URL(r.loc,n).href,e=` <url>
|
|
|
41
41
|
${a.join(`
|
|
42
42
|
`)}
|
|
43
43
|
</channel>
|
|
44
|
-
</rss>`}async function
|
|
44
|
+
</rss>`}async function _t(t={}){let n=Date.now();Kt();let a=await i(process.cwd()),r=a.build||{},o=await at({explicit:t.domain||r.domain,stxConfig:a});if(o.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ot());let e={router:t.router??a?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:o.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||c(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||a?.partialsDir||"",componentsDir:t.componentsDir||a?.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,f={},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-rmdw6s65.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-gmrc24cb.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 ct(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-rmdw6s65.js");await u('<div class="bg-black"></div>')}catch{}vt();let dt=a?.routeMiddleware?.dir||"middleware";await xt(process.cwd(),dt);let z=wt();if(z.length>0)console.log(`Loaded ${z.length} middleware: ${z.join(", ")}`);let gt=a?.routeMiddleware?.global||[];Zi(a?.layoutsDir,c(process.cwd()));let J=V(".",{pagesDir:e.pagesDir,pagesDirs:a?._layerPageDirs});console.log(`Found ${J.length} routes`);let _=[];for(let u of J){let m=await Bt(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],K=[];for(let u=0;u<_.length;u+=e.concurrency)K.push(_.slice(u,u+e.concurrency));for(let u of K)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:pt,revalidate:Z}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Wt(j),ht=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],Q=[...gt,...ht];if(Q.length>0){let C=St(d,L,F||{}),O=kt(C,null,void 0,{isServer:!0}),E=await Ct(Q,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Jt(String(R),d),T=Vt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),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 tt=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(tt)try{if(!await Function("route",`
|
|
45
45
|
const validate = ${tt[1]};
|
|
46
46
|
return validate(route);
|
|
47
47
|
`)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,et=!1;if(e.cache){if(k=B.get(d,v.filePath),k)et=!0,l.cachedCount++}if(!k){let C=await ut(v,L,pt,e,a);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:
|
|
@@ -50,7 +50,7 @@ ${a.join(`
|
|
|
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 M;if(e.trailingSlash)M=g.join(e.outputDir,d,"index.html");else M=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=nt(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 U=g.join(E,`${R.hash}.js`);if(!await Bun.file(U).exists())await Bun.write(U,R.code);if(!w.has(R.hash)){w.add(R.hash);let T=Buffer.byteLength(R.code,"utf8");y+=T,f[R.hash]={bytes:T,file:`/_stx/islands/${R.hash}.js`}}}if(S[d]=O.map((R)=>R.hash),k=C,e.prefetchIslands)k=it(k)}}if(await x.promises.mkdir(g.dirname(M),{recursive:!0}),await Bun.write(M,k),!
|
|
53
|
+
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)B.set(d,v.filePath,C.dependencies,k)}let M;if(e.trailingSlash)M=g.join(e.outputDir,d,"index.html");else M=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=nt(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 U=g.join(E,`${R.hash}.js`);if(!await Bun.file(U).exists())await Bun.write(U,R.code);if(!w.has(R.hash)){w.add(R.hash);let T=Buffer.byteLength(R.code,"utf8");y+=T,f[R.hash]={bytes:T,file:`/_stx/islands/${R.hash}.js`}}}if(S[d]=O.map((R)=>R.hash),k=C,e.prefetchIslands)k=it(k)}}if(await x.promises.mkdir(g.dirname(M),{recursive:!0}),await Bun.write(M,k),!Lt(d,k,F,e.sitemapExclude))A.push({loc:d,lastmod:new Date().toISOString().split("T")[0],priority:d==="/"?1:0.8});let rt={route:d,outputPath:M,size:Buffer.byteLength(k,"utf8"),cached:et};if(Z!==!1)rt.revalidateAt=Date.now()+Z*1000;l.pages.push(rt),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 X=Gt();if(X.length>0){let u=X.map((m)=>`${m.filePath}: ${m.message}`).join(`
|
|
54
54
|
`);throw Error(`Client script bundling failed:
|
|
55
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={...a,debug:!1,cache:!1},d=await s(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">
|
|
@@ -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={...a,debug:!1,cache:!1},L=await s(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let H=g.join(e.pagesDir,"error.stx");if(await Bun.file(H).exists()){let u=new Set,m={...a,debug:!1,cache:!1},v=await s(await Bun.file(H).text(),{},H,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=
|
|
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={...a,debug:!1,cache:!1},L=await s(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let H=g.join(e.pagesDir,"error.stx");if(await Bun.file(H).exists()){let u=new Set,m={...a,debug:!1,cache:!1},v=await s(await Bun.file(H).text(),{},H,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=Mt(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=Yr({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=Ut(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 G=Ji(e.outputDir);if(G.assets>0)console.log(`Externalized ${G.assets} asset(s) from ${G.pages} page(s) (${(G.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let N=Yi(e.outputDir);if(N.assets>0)console.log(`Externalized ${N.assets} repeated asset(s) from ${N.pages} page(s) (${(N.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&x.existsSync(e.publicDir))await q(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let Y=Bn();if(Y)await q(Y,g.join(e.outputDir,jn)),console.log(`Copied assets from ${qt}`)}catch(D){throw await e.hooks.onError?.(D),D}if(l.buildTime=Date.now()-n,w.size>0){l.islandChunks={count:w.size,totalBytes:y};let D={generatedChunks:w.size,totalBytes:y,chunks:f,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,7 +81,7 @@ Build complete!
|
|
|
81
81
|
Cached: ${l.cachedCount}
|
|
82
82
|
Failed: ${l.failedCount}
|
|
83
83
|
Time: ${l.buildTime}ms${P}
|
|
84
|
-
`),l}async function q(t,n){await x.promises.mkdir(n,{recursive:!0});let a=await x.promises.readdir(t,{withFileTypes:!0});for(let r of a){let o=g.join(t,r.name),e=g.join(n,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await q(o,e);else await x.promises.copyFile(o,e)}}function Nt(t={}){let n=t.cacheDir||c(process.cwd(),"ssg-cache"),a=new lt(n),r=t.revalidate||3600;return{async get(o){let e=await a.get(o);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(o).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(o){let l=V(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>o.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${o}`);return}let w=o.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let f=await i(),{html:S}=await ut(l,y,{},t,f);await a.set(o,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:
|
|
84
|
+
`),l}async function q(t,n){await x.promises.mkdir(n,{recursive:!0});let a=await x.promises.readdir(t,{withFileTypes:!0});for(let r of a){let o=g.join(t,r.name),e=g.join(n,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await q(o,e);else await x.promises.copyFile(o,e)}}function Nt(t={}){let n=t.cacheDir||c(process.cwd(),"ssg-cache"),a=new lt(n),r=t.revalidate||3600;return{async get(o){let e=await a.get(o);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(o).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(o){let l=V(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>o.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${o}`);return}let w=o.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let f=await i(),{html:S}=await ut(l,y,{},t,f);await a.set(o,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:At(S)}),console.log(`Revalidated: ${o}`)},async invalidate(o){if(typeof o==="string")await a.invalidate(o);else await a.invalidatePattern(o)}}}function zt(t){return async()=>({paths:await t(),fallback:!1})}function Ht(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let n=await Bun.file(t).text(),a=n.match(/^---\n([\s\S]*?)\n---/),r={},o=n;if(a){let f=a[1];o=n.slice(a[0].length).trim();for(let S of f.split(`
|
|
85
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=o.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 f=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:f})}return{content:e,data:r,toc:l}}}}function Wt(t){return ft(t)}function Jt(t,n){return`<!DOCTYPE html>
|
|
86
86
|
<html>
|
|
87
87
|
<head>
|
|
@@ -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 Vt(t,n){if(t==="/"||t==="")return g.join(n.outputDir,"index.html");let a=t.replace(/^\/|\/$/g,"");if(n.trailingSlash)return g.join(n.outputDir,a,"index.html");return g.join(n.outputDir,`${a}.html`)}var ye={generateStaticSite:
|
|
97
|
+
</html>`}function Vt(t,n){if(t==="/"||t==="")return g.join(n.outputDir,"index.html");let a=t.replace(/^\/|\/$/g,"");if(n.trailingSlash)return g.join(n.outputDir,a,"index.html");return g.join(n.outputDir,`${a}.html`)}var ye={generateStaticSite:_t,createISRHandler:Nt,defineStaticPaths:zt,createMarkdownLoader:Ht};export{Nt as createISRHandler,Ht as createMarkdownLoader,Ot as declaresPageAction,ye as default,zt as defineStaticPaths,_t as generateStaticSite,Lt as isExcludedFromSitemap};
|
package/dist/utils.js
CHANGED
|
@@ -946,7 +946,7 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
|
|
|
946
946
|
}
|
|
947
947
|
if (slotContent && templateContent.includes("{{ text || slot }}"))
|
|
948
948
|
templateContent = templateContent.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g, () => slotContent);
|
|
949
|
-
const { applySlots } = await importOnce("stx/slots", () => import("./slots.js")), { defaultSlot, namedSlots } = parsedSlotContent, hasSignalScripts = clientScripts.some((s) => /\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(s)), projectRefs = (content) => hasSignalScripts ? markProjectedRefs(content, componentUid) : content, projectedSlots = new Map([...namedSlots].map(([name, slot]) => [name, {
|
|
949
|
+
const { applySlots } = await importOnce("stx/slots", () => import("./slots.js")), { defaultSlot, namedSlots } = parsedSlotContent, hasSignalScripts = options._nativeHostAttrs === !0 && clientScripts.length > 0 || clientScripts.some((s) => /\b(?:state|derived|effect|ref|useRef|reactive|computed|watch|watchEffect|useModel|useReactiveProp|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(s)), projectRefs = (content) => hasSignalScripts ? markProjectedRefs(content, componentUid) : content, projectedSlots = new Map([...namedSlots].map(([name, slot]) => [name, {
|
|
950
950
|
...slot,
|
|
951
951
|
content: projectRefs(slot.content)
|
|
952
952
|
}]));
|
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.654",
|
|
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.654",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.654",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.654",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.654",
|
|
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-0en5jwjy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Bd,Fd}from"./chunk-9121nkpj.js";import"./chunk-f46ht5kq.js";import"./chunk-88z4wkrj.js";import"./chunk-v2x9vzgw.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Fd as clearStoreCache,Bd as getStoreScript};
|
package/dist/chunk-2n3pa5gm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ku}from"./chunk-9txn4rvb.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Ku as buildApp};
|
package/dist/chunk-354jmw2k.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function E(){let{NODE_ENV:n}=process.env;return n==="production"}function H(){let{STX_DEBUG:n}=process.env;return!E()||n==="true"}function bn(){let{NODE_ENV:n}=process.env;return n==="test"}function qo(n){return n==="compile"||E()}function yr(n){if(!n)return n;try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(n).trim()}catch{return n}}
|
|
3
|
-
export{E,H,bn,qo,yr};
|
package/dist/chunk-3b5bphcn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Nr,qn,xl}from"./chunk-nj1t4g3a.js";import"./chunk-ymymwzt5.js";import"./chunk-ye8tgmd3.js";import{Et}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{xl as declareBareLoopHead,Et as parseLoopBinding,qn as processLoops,Nr as reportDeferredLoopWarnings};
|
package/dist/chunk-57md41g9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hi,Vi,Ui,Wi,tp}from"./chunk-t1k9160w.js";import"./chunk-qm4672dj.js";import"./chunk-c1dkh0es.js";import"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-pxs7sgnp.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hi as buildNative,tp as default,Vi as findCraftBinary,Wi as getAvailableFormats,Ui as getAvailableTargets};
|
package/dist/chunk-6vh8s0pg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{N,Rl,po,i,R,xp,Sp}from"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{R as config,N as defaultConfig,xp as defineStxConfig,po as discoverConfig,i as loadStxConfig,Rl as resolveStxDirectories,Sp as validateConfig};
|
package/dist/chunk-8fsq2ynj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rd,Li,il,sd,od,id,ad,cd,al,cl,ld,ud,dd,pd}from"./chunk-481d4kr9.js";import"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-pxs7sgnp.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{il as SUSPENSE_RESOLVER_RUNTIME,Li as buildSuspenseResolveScript,cd as createStreamRenderer,id as extractStreamBoundaries,pd as generateHydrationRuntime,cl as islandDirective,ud as processSectionDirectives,od as processStreamDirectives,ld as registerStreamingDirectives,sd as renderStreamingPage,rd as streamTemplate,ad as streamTemplateSimple,dd as streamToResponse,al as streamingSuspenseDirective};
|
package/dist/chunk-8tpmz4as.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kl,Br}from"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-ye8tgmd3.js";import{ar}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import{et}from"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{et as freeIdentifiers,Br as processComponents,kl as processESImports,ar as rendersAsElement};
|
package/dist/chunk-9x0zt65f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Tu}from"./chunk-0h8tg21j.js";import"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-pxs7sgnp.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Tu as startInteractive};
|
package/dist/chunk-a2bw46t9.js
DELETED
package/dist/chunk-a4sggwcz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$u}from"./chunk-wjt0kej9.js";import"./chunk-06w0z1cm.js";import"./chunk-88z4wkrj.js";import"./chunk-r1r6311d.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{$u as startProductionServer};
|
package/dist/chunk-b4fd2dtk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ei,ti,ni,_u,ri,si,Cu,oi,ii,wc,Eu}from"./chunk-t2pzy3x1.js";export{ei as VideoProcessorCache,wc as analyzeVideo,_u as clearVideoCache,ii as generateDASHManifest,oi as generateHLSManifest,ri as generatePoster,Cu as generateSpriteSheet,si as generateThumbnails,ti as getCachedVideoResult,Eu as processVideo,ni as setCachedVideoResult};
|
package/dist/chunk-c1479y92.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mu}from"./chunk-8p9kpfk8.js";import"./chunk-06w0z1cm.js";import"./chunk-fg3jw17w.js";import"./chunk-88z4wkrj.js";import"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-pxs7sgnp.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Mu as buildForProduction};
|
package/dist/chunk-embejqx4.js
DELETED
package/dist/chunk-eyfxw7ds.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{zs,zd,Hd}from"./chunk-wq6j2h32.js";import"./chunk-f46ht5kq.js";import"./chunk-88z4wkrj.js";import"./chunk-v2x9vzgw.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hd as clearComposableCache,zd as getComposableScript,zs as listComposableModules};
|
package/dist/chunk-f3y4fnaa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lc,Ju,jc,Bc,Yu,Zu}from"./chunk-sgptbhrc.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Zu as applySlots,Yu as extractSlotContent,Ju as parseSlotElement,Lc as parseSlots,Bc as processSlots,jc as renderSlot};
|
package/dist/chunk-f7930sce.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lp,Sl,We,sa,up,Dr,Mr,Lr}from"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-ye8tgmd3.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{up as clearOnceStore,sa as onceStore,We as partialsCache,Dr as processIncludes,Mr as processStackPushDirectives,Lr as processStackReplacements,lp as resetUnscopedSignalWarnings,Sl as topLevelElements};
|
package/dist/chunk-fsbjat59.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{op,na,ip,ra,yl,bl,en,Wn,ap,vl,wl,cp,h}from"./chunk-qfe7ps3v.js";import"./chunk-pxs7sgnp.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{en as buildCss,vl as extractClassNames,bl as fingerprintConfig,wl as generateCss,ap as getCachedCSS,op as getCssServeAsset,h as injectCss,na as loadCssEngine,ra as loadCssEngineConfig,Wn as rebuildCss,ip as resetCssCache,yl as resolveUserCssConfig,cp as withLinkedModuleBundles};
|
package/dist/chunk-h15xb2vd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ll,ul,_e,dl,Qi,Gt,Kt,rp,ea,Xt,Fn,pl,fl,gl,qs,Jt,ml,Yt,hl}from"./chunk-f46ht5kq.js";import"./chunk-88z4wkrj.js";import"./chunk-v2x9vzgw.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Fn as MODULE_SPECIFIER_PREFIX,ll as bundleCacheDir,ul as bundleCacheEntryLimit,Yt as bundleClientScript,Kt as clearBundleFailures,_e as clientBundleDependencies,Gt as getBundleFailures,Xt as hasUserImports,Jt as moduleSubstitutionKey,fl as normalizeRegistrySpecifiers,ml as queueClientBundleBuild,Qi as recordBundleFailure,pl as registryIdForPath,ea as resolveBundlerFallback,gl as rewriteRegistryImports,rp as setBundlerFallbackMode,dl as shouldLogBundlerDiagnostics,hl as tempBuildName,qs as withModuleSubstitutes};
|
package/dist/chunk-m6qfqkbh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mi,tl,Pn,td,nl,rl,sl,nd}from"./chunk-6ea6az61.js";import"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Pn as Validator,tl as defineForm,nl as processErrorDirective,rl as processErrorsDirective,nd as processFormValidationDirectives,sl as processHasErrorsDirective,Mi as useForm,td as v};
|
package/dist/chunk-ncqh5qe5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{xc,Sc}from"./chunk-xm2mee4a.js";import"./chunk-0h8tg21j.js";import"./chunk-wjt0kej9.js";import"./chunk-rjh2jwxx.js";import"./chunk-yq021b3r.js";import"./chunk-j393gsfd.js";import"./chunk-zqtbtqbq.js";import"./chunk-8p9kpfk8.js";import{_i}from"./chunk-06w0z1cm.js";import"./chunk-jxda11cg.js";import"./chunk-2jh21f1n.js";import"./chunk-9txn4rvb.js";import"./chunk-rcadtv3x.js";import"./chunk-sgptbhrc.js";import"./chunk-0jhdrgpr.js";import"./chunk-ym41ybz2.js";import"./chunk-n38yb274.js";import"./chunk-6ea6az61.js";import"./chunk-tre98h62.js";import"./chunk-481d4kr9.js";import"./chunk-dgb4z4kw.js";import"./chunk-r3e6x87d.js";import"./chunk-mmwedr93.js";import"./chunk-aprhqxky.js";import"./chunk-kgfgb971.js";import"./chunk-nrvwejdw.js";import"./chunk-9121nkpj.js";import"./chunk-wq6j2h32.js";import"./chunk-fg3jw17w.js";import"./chunk-qm4672dj.js";import"./chunk-c1dkh0es.js";import"./chunk-6ajahb2x.js";import"./chunk-f46ht5kq.js";import"./chunk-88z4wkrj.js";import"./chunk-v2x9vzgw.js";import{Ee,s}from"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import{me}from"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import{Xn,Jn}from"./chunk-pxs7sgnp.js";import{qr,N,i}from"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import{f,Oe}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";import"./chunk-9p6efb17.js";import"./chunk-t2pzy3x1.js";export{qr as buildWebComponents,Jn as cacheTemplate,Xn as checkCache,_i as classifyAllScripts,xc as createMiddleware,Sc as createRoute,N as defaultConfig,f as extractVariables,me as injectRouterScript,i as loadStxConfig,Oe as processClientScript,s as processDirectives,Ee as readMarkdownFile};
|