@absolutejs/absolute 0.19.0-beta.782 → 0.19.0-beta.784
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/angular/browser.js +57 -9801
- package/dist/angular/browser.js.map +4 -246
- package/dist/angular/index.js +61 -14880
- package/dist/angular/index.js.map +4 -282
- package/dist/angular/server.js +46 -5613
- package/dist/angular/server.js.map +3 -52
- package/dist/build.js +45 -17902
- package/dist/build.js.map +3 -100
- package/dist/chunk-102fp7xe.js +63 -0
- package/dist/chunk-102fp7xe.js.map +10 -0
- package/dist/chunk-11zpfqz6.js +19 -0
- package/dist/chunk-11zpfqz6.js.map +10 -0
- package/dist/chunk-1e9vsfyh.js +100 -0
- package/dist/chunk-1e9vsfyh.js.map +10 -0
- package/dist/chunk-25v9t56f.js +29 -0
- package/dist/chunk-25v9t56f.js.map +11 -0
- package/dist/chunk-2f21eenc.js +21 -0
- package/dist/chunk-2f21eenc.js.map +10 -0
- package/dist/chunk-2ga2znex.js +13 -0
- package/dist/chunk-2ga2znex.js.map +9 -0
- package/dist/chunk-30yrw0f6.js +33 -0
- package/dist/chunk-30yrw0f6.js.map +10 -0
- package/dist/chunk-3c7mpj3m.js +784 -0
- package/dist/chunk-3c7mpj3m.js.map +10 -0
- package/dist/chunk-3g91wb4f.js +358 -0
- package/dist/chunk-3g91wb4f.js.map +10 -0
- package/dist/chunk-3yjzpcne.js +34 -0
- package/dist/chunk-3yjzpcne.js.map +10 -0
- package/dist/chunk-4bq79t8v.js +136 -0
- package/dist/chunk-4bq79t8v.js.map +10 -0
- package/dist/chunk-4d39r92n.js +81 -0
- package/dist/chunk-4d39r92n.js.map +10 -0
- package/dist/chunk-4m75s5xf.js +184 -0
- package/dist/chunk-4m75s5xf.js.map +11 -0
- package/dist/chunk-5003emhv.js +17 -0
- package/dist/chunk-5003emhv.js.map +10 -0
- package/dist/chunk-5fhp1jap.js +9169 -0
- package/dist/chunk-5fhp1jap.js.map +236 -0
- package/dist/chunk-6fkgm9s5.js +569 -0
- package/dist/chunk-6fkgm9s5.js.map +10 -0
- package/dist/chunk-6pdj08z3.js +73 -0
- package/dist/chunk-6pdj08z3.js.map +12 -0
- package/dist/chunk-6qjbrt0k.js +13 -0
- package/dist/chunk-6qjbrt0k.js.map +9 -0
- package/dist/chunk-6sccb4jr.js +14 -0
- package/dist/chunk-6sccb4jr.js.map +9 -0
- package/dist/chunk-73brtyw5.js +16 -0
- package/dist/chunk-73brtyw5.js.map +9 -0
- package/dist/chunk-77cqkarb.js +25 -0
- package/dist/chunk-77cqkarb.js.map +9 -0
- package/dist/chunk-798spvzv.js +50 -0
- package/dist/chunk-798spvzv.js.map +10 -0
- package/dist/chunk-7fw6x3js.js +131 -0
- package/dist/chunk-7fw6x3js.js.map +11 -0
- package/dist/chunk-7kjj42xm.js +11 -0
- package/dist/chunk-7kjj42xm.js.map +10 -0
- package/dist/chunk-851whwc7.js +17 -0
- package/dist/chunk-851whwc7.js.map +10 -0
- package/dist/chunk-85n68sy6.js +103 -0
- package/dist/chunk-85n68sy6.js.map +10 -0
- package/dist/chunk-8feq2qek.js +17 -0
- package/dist/chunk-8feq2qek.js.map +9 -0
- package/dist/chunk-8kcfffry.js +35 -0
- package/dist/chunk-8kcfffry.js.map +10 -0
- package/dist/chunk-93sqk7be.js +139 -0
- package/dist/chunk-93sqk7be.js.map +12 -0
- package/dist/chunk-97572s32.js +262 -0
- package/dist/chunk-97572s32.js.map +12 -0
- package/dist/chunk-9a307ca6.js +1742 -0
- package/dist/chunk-9a307ca6.js.map +11 -0
- package/dist/chunk-9c5tj4k3.js +130 -0
- package/dist/chunk-9c5tj4k3.js.map +10 -0
- package/dist/chunk-9xrsjeem.js +12 -0
- package/dist/chunk-9xrsjeem.js.map +9 -0
- package/dist/chunk-a9mvyp04.js +87 -0
- package/dist/chunk-a9mvyp04.js.map +10 -0
- package/dist/chunk-b3gbnrwe.js +21 -0
- package/dist/chunk-b3gbnrwe.js.map +10 -0
- package/dist/chunk-bmgqm774.js +65 -0
- package/dist/chunk-bmgqm774.js.map +9 -0
- package/dist/chunk-bxfghpma.js +69 -0
- package/dist/chunk-bxfghpma.js.map +10 -0
- package/dist/chunk-c1jfjnka.js +74 -0
- package/dist/chunk-c1jfjnka.js.map +10 -0
- package/dist/chunk-cbkrwmvh.js +80 -0
- package/dist/chunk-cbkrwmvh.js.map +10 -0
- package/dist/chunk-cdxd7sy2.js +71 -0
- package/dist/chunk-cdxd7sy2.js.map +10 -0
- package/dist/chunk-cg95827x.js +21 -0
- package/dist/chunk-cg95827x.js.map +10 -0
- package/dist/chunk-d9c0am65.js +12 -0
- package/dist/chunk-d9c0am65.js.map +10 -0
- package/dist/chunk-daqghmg8.js +12 -0
- package/dist/chunk-daqghmg8.js.map +9 -0
- package/dist/chunk-dr9yqsdb.js +203 -0
- package/dist/chunk-dr9yqsdb.js.map +10 -0
- package/dist/chunk-e8eecyrq.js +244 -0
- package/dist/chunk-e8eecyrq.js.map +10 -0
- package/dist/chunk-ex2hxe0v.js +160 -0
- package/dist/chunk-ex2hxe0v.js.map +11 -0
- package/dist/chunk-ey5hs6x6.js +253 -0
- package/dist/chunk-ey5hs6x6.js.map +11 -0
- package/dist/chunk-fak944et.js +91 -0
- package/dist/chunk-fak944et.js.map +10 -0
- package/dist/chunk-fygx2ymm.js +118 -0
- package/dist/chunk-fygx2ymm.js.map +12 -0
- package/dist/chunk-g15qj669.js +271 -0
- package/dist/chunk-g15qj669.js.map +11 -0
- package/dist/chunk-g3j22qf6.js +51 -0
- package/dist/chunk-g3j22qf6.js.map +9 -0
- package/dist/chunk-gd6wmknh.js +121 -0
- package/dist/chunk-gd6wmknh.js.map +11 -0
- package/dist/chunk-gf0ygptk.js +85 -0
- package/dist/chunk-gf0ygptk.js.map +11 -0
- package/dist/chunk-gq0zxpm0.js +90 -0
- package/dist/chunk-gq0zxpm0.js.map +10 -0
- package/dist/chunk-gytkmthr.js +220 -0
- package/dist/chunk-gytkmthr.js.map +10 -0
- package/dist/chunk-h5bbfn3n.js +28 -0
- package/dist/chunk-h5bbfn3n.js.map +11 -0
- package/dist/chunk-h6mye9r3.js +93 -0
- package/dist/chunk-h6mye9r3.js.map +10 -0
- package/dist/chunk-hcsmxw1v.js +85 -0
- package/dist/chunk-hcsmxw1v.js.map +10 -0
- package/dist/chunk-hep68ja7.js +4444 -0
- package/dist/chunk-hep68ja7.js.map +29 -0
- package/dist/chunk-hhqh49fz.js +149 -0
- package/dist/chunk-hhqh49fz.js.map +10 -0
- package/dist/chunk-hyjs4bqs.js +8 -0
- package/dist/chunk-hyjs4bqs.js.map +10 -0
- package/dist/chunk-hza0n8qm.js +20 -0
- package/dist/chunk-hza0n8qm.js.map +9 -0
- package/dist/chunk-jn91vzkh.js +66 -0
- package/dist/chunk-jn91vzkh.js.map +10 -0
- package/dist/chunk-jwxt8gnp.js +13 -0
- package/dist/chunk-jwxt8gnp.js.map +9 -0
- package/dist/chunk-kk8w9rh5.js +195 -0
- package/dist/chunk-kk8w9rh5.js.map +10 -0
- package/dist/chunk-kndkjsya.js +261 -0
- package/dist/chunk-kndkjsya.js.map +10 -0
- package/dist/chunk-kvq01j35.js +36 -0
- package/dist/chunk-kvq01j35.js.map +10 -0
- package/dist/chunk-mbazhahf.js +60 -0
- package/dist/chunk-mbazhahf.js.map +10 -0
- package/dist/chunk-mgfwq18r.js +15 -0
- package/dist/chunk-mgfwq18r.js.map +9 -0
- package/dist/chunk-mtgf69xn.js +88 -0
- package/dist/chunk-mtgf69xn.js.map +10 -0
- package/dist/chunk-nehhtthw.js +225 -0
- package/dist/chunk-nehhtthw.js.map +10 -0
- package/dist/chunk-nhzf4az4.js +149 -0
- package/dist/chunk-nhzf4az4.js.map +10 -0
- package/dist/chunk-p5504p14.js +16 -0
- package/dist/chunk-p5504p14.js.map +10 -0
- package/dist/chunk-pnscgw95.js +90 -0
- package/dist/chunk-pnscgw95.js.map +10 -0
- package/dist/chunk-pvpp4pvs.js +17 -0
- package/dist/chunk-pvpp4pvs.js.map +10 -0
- package/dist/chunk-qh75agse.js +95 -0
- package/dist/chunk-qh75agse.js.map +10 -0
- package/dist/chunk-qk8kd3hr.js +526 -0
- package/dist/chunk-qk8kd3hr.js.map +12 -0
- package/dist/chunk-qxq2zcty.js +52 -0
- package/dist/chunk-qxq2zcty.js.map +10 -0
- package/dist/chunk-r7jmgqnw.js +114 -0
- package/dist/chunk-r7jmgqnw.js.map +10 -0
- package/dist/chunk-s6defjk2.js +116 -0
- package/dist/chunk-s6defjk2.js.map +10 -0
- package/dist/chunk-sd39p726.js +619 -0
- package/dist/chunk-sd39p726.js.map +10 -0
- package/dist/chunk-smgj0epn.js +18 -0
- package/dist/chunk-smgj0epn.js.map +9 -0
- package/dist/chunk-swrnzs4c.js +63 -0
- package/dist/chunk-swrnzs4c.js.map +10 -0
- package/dist/chunk-t81a331y.js +27 -0
- package/dist/chunk-t81a331y.js.map +10 -0
- package/dist/chunk-tfe3sb44.js +33 -0
- package/dist/chunk-tfe3sb44.js.map +10 -0
- package/dist/chunk-tx9edm1x.js +34 -0
- package/dist/chunk-tx9edm1x.js.map +10 -0
- package/dist/chunk-vkrpm7kc.js +247 -0
- package/dist/chunk-vkrpm7kc.js.map +12 -0
- package/dist/chunk-vvz7dcvq.js +434 -0
- package/dist/chunk-vvz7dcvq.js.map +13 -0
- package/dist/chunk-w3m4m5we.js +4925 -0
- package/dist/chunk-w3m4m5we.js.map +12 -0
- package/dist/chunk-wrxtn9ve.js +18 -0
- package/dist/chunk-wrxtn9ve.js.map +10 -0
- package/dist/chunk-xpkjbmd3.js +428 -0
- package/dist/chunk-xpkjbmd3.js.map +14 -0
- package/dist/chunk-xrmjy8kk.js +454 -0
- package/dist/chunk-xrmjy8kk.js.map +10 -0
- package/dist/chunk-xw0tx842.js +13 -0
- package/dist/chunk-xw0tx842.js.map +9 -0
- package/dist/chunk-xx5b6b9m.js +69 -0
- package/dist/chunk-xx5b6b9m.js.map +10 -0
- package/dist/chunk-xz1kdswj.js +21 -0
- package/dist/chunk-xz1kdswj.js.map +9 -0
- package/dist/chunk-xzvy9hr4.js +377 -0
- package/dist/chunk-xzvy9hr4.js.map +10 -0
- package/dist/chunk-yfqhr31t.js +39 -0
- package/dist/chunk-yfqhr31t.js.map +9 -0
- package/dist/chunk-ygzd5s4z.js +184 -0
- package/dist/chunk-ygzd5s4z.js.map +10 -0
- package/dist/chunk-ywjn0rad.js +14 -0
- package/dist/chunk-ywjn0rad.js.map +9 -0
- package/dist/chunk-z9nvhm6r.js +13 -0
- package/dist/chunk-z9nvhm6r.js.map +9 -0
- package/dist/chunk-zhmvdpk6.js +15 -0
- package/dist/chunk-zhmvdpk6.js.map +9 -0
- package/dist/cli/index.js +6 -3
- package/dist/client/index.js +32 -1112
- package/dist/client/index.js.map +4 -22
- package/dist/core/streamingSlotRegistrar.js +11 -108
- package/dist/core/streamingSlotRegistrar.js.map +3 -4
- package/dist/core/streamingSlotRegistry.js +7 -169
- package/dist/core/streamingSlotRegistry.js.map +3 -5
- package/dist/index.js +537 -19714
- package/dist/index.js.map +3 -117
- package/dist/islands/browser.js +9 -228
- package/dist/islands/browser.js.map +4 -9
- package/dist/islands/index.js +18 -1900
- package/dist/islands/index.js.map +3 -28
- package/dist/react/browser.js +12 -328
- package/dist/react/browser.js.map +4 -12
- package/dist/react/components/index.js +16 -167
- package/dist/react/components/index.js.map +3 -6
- package/dist/react/hooks/index.js +8 -183
- package/dist/react/hooks/index.js.map +3 -7
- package/dist/react/index.js +37 -3619
- package/dist/react/index.js.map +4 -46
- package/dist/react/jsxDevRuntimeCompat.js +2 -61
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +18 -1789
- package/dist/react/server.js.map +3 -21
- package/dist/src/build/stylePreprocessor.d.ts +3 -0
- package/dist/src/core/index.d.ts +0 -2
- package/dist/svelte/browser.js +12 -247
- package/dist/svelte/browser.js.map +3 -10
- package/dist/svelte/index.js +38 -3724
- package/dist/svelte/index.js.map +4 -48
- package/dist/svelte/server.js +22 -2701
- package/dist/svelte/server.js.map +3 -27
- package/dist/vue/browser.js +12 -348
- package/dist/vue/browser.js.map +4 -12
- package/dist/vue/components/Image.js +7 -240
- package/dist/vue/components/Image.js.map +3 -6
- package/dist/vue/components/index.js +11 -544
- package/dist/vue/components/index.js.map +3 -9
- package/dist/vue/index.js +53 -4204
- package/dist/vue/index.js.map +4 -51
- package/dist/vue/server.js +18 -1849
- package/dist/vue/server.js.map +3 -21
- package/package.json +7 -7
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
escapeScriptContent
|
|
4
|
+
} from "./chunk-851whwc7.js";
|
|
5
|
+
import {
|
|
6
|
+
DEFAULT_CHUNK_SIZE
|
|
7
|
+
} from "./chunk-qh75agse.js";
|
|
8
|
+
import {
|
|
9
|
+
__require
|
|
10
|
+
} from "./chunk-bmgqm774.js";
|
|
11
|
+
|
|
12
|
+
// src/svelte/renderToReadableStream.ts
|
|
13
|
+
var SVELTE_PAGE_ROOT_ID = "__absolute_svelte_root__";
|
|
14
|
+
var renderToReadableStream = async (component, props, {
|
|
15
|
+
bootstrapScriptContent,
|
|
16
|
+
bootstrapScripts = [],
|
|
17
|
+
bootstrapModules = [],
|
|
18
|
+
nonce,
|
|
19
|
+
onError = console.error,
|
|
20
|
+
progressiveChunkSize = DEFAULT_CHUNK_SIZE,
|
|
21
|
+
signal,
|
|
22
|
+
headContent,
|
|
23
|
+
bodyContent
|
|
24
|
+
} = {}) => {
|
|
25
|
+
try {
|
|
26
|
+
const { render } = await import("svelte/server");
|
|
27
|
+
const renderComponent = render;
|
|
28
|
+
const rendered = typeof props === "undefined" ? await renderComponent(component) : await renderComponent(component, { props });
|
|
29
|
+
const { head, body } = rendered;
|
|
30
|
+
const nonceAttr = nonce ? ` nonce="${nonce}"` : "";
|
|
31
|
+
const scripts = (bootstrapScriptContent ? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>` : "") + bootstrapScripts.map((src) => `<script${nonceAttr} src="${src}"></script>`).join("") + bootstrapModules.map((src) => `<script${nonceAttr} type="module" src="${src}"></script>`).join("");
|
|
32
|
+
const encoder = new TextEncoder;
|
|
33
|
+
const full = encoder.encode(`<!DOCTYPE html><html lang="en"><head>${head}${headContent ?? ""}</head><body><div id="${SVELTE_PAGE_ROOT_ID}">${body}</div>${scripts}${bodyContent ?? ""}</body></html>`);
|
|
34
|
+
let offset = 0;
|
|
35
|
+
return new ReadableStream({
|
|
36
|
+
type: "bytes",
|
|
37
|
+
cancel(reason) {
|
|
38
|
+
onError?.(reason);
|
|
39
|
+
},
|
|
40
|
+
pull(controller) {
|
|
41
|
+
if (signal?.aborted) {
|
|
42
|
+
controller.close();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (offset >= full.length) {
|
|
46
|
+
controller.close();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const end = Math.min(offset + progressiveChunkSize, full.length);
|
|
50
|
+
controller.enqueue(full.subarray(offset, end));
|
|
51
|
+
offset = end;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
} catch (error) {
|
|
55
|
+
onError?.(error);
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { SVELTE_PAGE_ROOT_ID, renderToReadableStream };
|
|
61
|
+
|
|
62
|
+
//# debugId=57DCADAA808E849F64756E2164756E21
|
|
63
|
+
//# sourceMappingURL=chunk-102fp7xe.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/svelte/renderToReadableStream.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { Component, ComponentProps } from 'svelte';\nimport { DEFAULT_CHUNK_SIZE } from '../constants';\nimport { escapeScriptContent } from '../utils/escapeScriptContent';\n\nexport const SVELTE_PAGE_ROOT_ID = '__absolute_svelte_root__';\n\ntype SvelteRenderOutput = {\n\tbody: string;\n\thead: string;\n};\n\ntype SvelteServerRender = (\n\tcomponent: Component<Record<string, unknown>>,\n\toptions?: { props?: Record<string, unknown> }\n) => SvelteRenderOutput | PromiseLike<SvelteRenderOutput>;\n\nexport type RenderStreamOptions = {\n\tbootstrapScriptContent?: string;\n\tbootstrapScripts?: string[];\n\tbootstrapModules?: string[];\n\tnonce?: string;\n\tonError?: (error: unknown) => void;\n\tprogressiveChunkSize?: number;\n\tsignal?: AbortSignal;\n\theadContent?: string;\n\tbodyContent?: string;\n};\n\nexport const renderToReadableStream = async <\n\tComp extends Component<Record<string, unknown>>\n>(\n\tcomponent: Comp,\n\tprops?: ComponentProps<Comp>,\n\t{\n\t\tbootstrapScriptContent,\n\t\tbootstrapScripts = [],\n\t\tbootstrapModules = [],\n\t\tnonce,\n\t\tonError = console.error,\n\t\tprogressiveChunkSize = DEFAULT_CHUNK_SIZE,\n\t\tsignal,\n\t\theadContent,\n\t\tbodyContent\n\t}: RenderStreamOptions = {}\n) => {\n\ttry {\n\t\tconst { render } = await import('svelte/server');\n\t\tconst renderComponent: SvelteServerRender = render;\n\t\tconst rendered =\n\t\t\ttypeof props === 'undefined'\n\t\t\t\t? await renderComponent(component)\n\t\t\t\t: await renderComponent(component, { props });\n\t\tconst { head, body } = rendered;\n\t\tconst nonceAttr = nonce ? ` nonce=\"${nonce}\"` : '';\n\t\tconst scripts =\n\t\t\t(bootstrapScriptContent\n\t\t\t\t? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>`\n\t\t\t\t: '') +\n\t\t\tbootstrapScripts\n\t\t\t\t.map((src) => `<script${nonceAttr} src=\"${src}\"></script>`)\n\t\t\t\t.join('') +\n\t\t\tbootstrapModules\n\t\t\t\t.map(\n\t\t\t\t\t(src) =>\n\t\t\t\t\t\t`<script${nonceAttr} type=\"module\" src=\"${src}\"></script>`\n\t\t\t\t)\n\t\t\t\t.join('');\n\t\tconst encoder = new TextEncoder();\n\t\t// Warning: this encodes the entire document into memory in one buffer\n\t\tconst full = encoder.encode(\n\t\t\t`<!DOCTYPE html><html lang=\"en\"><head>${head}${headContent ?? ''}</head><body><div id=\"${SVELTE_PAGE_ROOT_ID}\">${body}</div>${scripts}${bodyContent ?? ''}</body></html>`\n\t\t);\n\n\t\tlet offset = 0;\n\n\t\treturn new ReadableStream<Uint8Array>({\n\t\t\ttype: 'bytes',\n\t\t\tcancel(reason) {\n\t\t\t\tonError?.(reason);\n\t\t\t},\n\t\t\tpull(controller) {\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (offset >= full.length) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst end = Math.min(\n\t\t\t\t\toffset + progressiveChunkSize,\n\t\t\t\t\tfull.length\n\t\t\t\t);\n\t\t\t\tcontroller.enqueue(full.subarray(offset, end));\n\t\t\t\toffset = end;\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tonError?.(error);\n\t\tthrow error;\n\t}\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;AAIO,IAAM,sBAAsB;AAwB5B,IAAM,yBAAyB,OAGrC,WACA;AAAA,EAEC;AAAA,EACA,mBAAmB,CAAC;AAAA,EACpB,mBAAmB,CAAC;AAAA,EACpB;AAAA,EACA,UAAU,QAAQ;AAAA,EAClB,uBAAuB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,IACwB,CAAC,MACtB;AAAA,EACJ,IAAI;AAAA,IACH,QAAQ,WAAW,MAAa;AAAA,IAChC,MAAM,kBAAsC;AAAA,IAC5C,MAAM,WACL,OAAO,UAAU,cACd,MAAM,gBAAgB,SAAS,IAC/B,MAAM,gBAAgB,WAAW,EAAE,MAAM,CAAC;AAAA,IAC9C,QAAQ,MAAM,SAAS;AAAA,IACvB,MAAM,YAAY,QAAQ,WAAW,WAAW;AAAA,IAChD,MAAM,WACJ,yBACE,UAAU,aAAa,oBAAoB,sBAAsB,eACjE,MACH,iBACE,IAAI,CAAC,QAAQ,UAAU,kBAAkB,gBAAgB,EACzD,KAAK,EAAE,IACT,iBACE,IACA,CAAC,QACA,UAAU,gCAAgC,gBAC5C,EACC,KAAK,EAAE;AAAA,IACV,MAAM,UAAU,IAAI;AAAA,IAEpB,MAAM,OAAO,QAAQ,OACpB,wCAAwC,OAAO,eAAe,2BAA2B,wBAAwB,aAAa,UAAU,eAAe,kBACxJ;AAAA,IAEA,IAAI,SAAS;AAAA,IAEb,OAAO,IAAI,eAA2B;AAAA,MACrC,MAAM;AAAA,MACN,MAAM,CAAC,QAAQ;AAAA,QACd,UAAU,MAAM;AAAA;AAAA,MAEjB,IAAI,CAAC,YAAY;AAAA,QAChB,IAAI,QAAQ,SAAS;AAAA,UACpB,WAAW,MAAM;AAAA,UAEjB;AAAA,QACD;AAAA,QACA,IAAI,UAAU,KAAK,QAAQ;AAAA,UAC1B,WAAW,MAAM;AAAA,UAEjB;AAAA,QACD;AAAA,QACA,MAAM,MAAM,KAAK,IAChB,SAAS,sBACT,KAAK,MACN;AAAA,QACA,WAAW,QAAQ,KAAK,SAAS,QAAQ,GAAG,CAAC;AAAA,QAC7C,SAAS;AAAA;AAAA,IAEX,CAAC;AAAA,IACA,OAAO,OAAO;AAAA,IACf,UAAU,KAAK;AAAA,IACf,MAAM;AAAA;AAAA;",
|
|
8
|
+
"debugId": "57DCADAA808E849F64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/build/scanEntryPoints.ts
|
|
3
|
+
import { existsSync } from "fs";
|
|
4
|
+
var {Glob } = globalThis.Bun;
|
|
5
|
+
var scanEntryPoints = async (dir, pattern) => {
|
|
6
|
+
if (!existsSync(dir))
|
|
7
|
+
return [];
|
|
8
|
+
const entryPaths = [];
|
|
9
|
+
const glob = new Glob(pattern);
|
|
10
|
+
for await (const file of glob.scan({ absolute: true, cwd: dir })) {
|
|
11
|
+
entryPaths.push(file);
|
|
12
|
+
}
|
|
13
|
+
return entryPaths;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { scanEntryPoints };
|
|
17
|
+
|
|
18
|
+
//# debugId=5F3598D716FE886864756E2164756E21
|
|
19
|
+
//# sourceMappingURL=chunk-11zpfqz6.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/build/scanEntryPoints.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { existsSync } from 'node:fs';\nimport { Glob } from 'bun';\n\nexport const scanEntryPoints = async (dir: string, pattern: string) => {\n\t// Gracefully handle missing directories — this happens during framework\n\t// scaffolding when the config references a directory being created.\n\tif (!existsSync(dir)) return [];\n\n\tconst entryPaths: string[] = [];\n\tconst glob = new Glob(pattern);\n\tfor await (const file of glob.scan({ absolute: true, cwd: dir })) {\n\t\tentryPaths.push(file);\n\t}\n\n\treturn entryPaths;\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;AAAA;AACA;AAEO,IAAM,kBAAkB,OAAO,KAAa,YAAoB;AAAA,EAGtE,IAAI,CAAC,WAAW,GAAG;AAAA,IAAG,OAAO,CAAC;AAAA,EAE9B,MAAM,aAAuB,CAAC;AAAA,EAC9B,MAAM,OAAO,IAAI,KAAK,OAAO;AAAA,EAC7B,iBAAiB,QAAQ,KAAK,KAAK,EAAE,UAAU,MAAM,KAAK,IAAI,CAAC,GAAG;AAAA,IACjE,WAAW,KAAK,IAAI;AAAA,EACrB;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
+
"debugId": "5F3598D716FE886864756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
normalizePath
|
|
4
|
+
} from "./chunk-hyjs4bqs.js";
|
|
5
|
+
import {
|
|
6
|
+
logWarn
|
|
7
|
+
} from "./chunk-cbkrwmvh.js";
|
|
8
|
+
import {
|
|
9
|
+
toPascal
|
|
10
|
+
} from "./chunk-p5504p14.js";
|
|
11
|
+
import {
|
|
12
|
+
UNFOUND_INDEX
|
|
13
|
+
} from "./chunk-qh75agse.js";
|
|
14
|
+
import {
|
|
15
|
+
getIslandManifestKey
|
|
16
|
+
} from "./chunk-3yjzpcne.js";
|
|
17
|
+
|
|
18
|
+
// src/build/generateManifest.ts
|
|
19
|
+
import { extname } from "path";
|
|
20
|
+
var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular) => {
|
|
21
|
+
if (folder === "indexes")
|
|
22
|
+
return `${pascalName}Index`;
|
|
23
|
+
if (isClientComponent)
|
|
24
|
+
return `${pascalName}Client`;
|
|
25
|
+
if (folder !== "pages")
|
|
26
|
+
return pascalName;
|
|
27
|
+
if (isReact)
|
|
28
|
+
return `${pascalName}Page`;
|
|
29
|
+
if (isVue || isSvelte || isAngular)
|
|
30
|
+
return pascalName;
|
|
31
|
+
return `${pascalName}Page`;
|
|
32
|
+
};
|
|
33
|
+
var getCssKey = (pascalName, segments) => {
|
|
34
|
+
const isFromVue = segments.some((seg) => seg === "vue");
|
|
35
|
+
if (isFromVue && segments.includes("css"))
|
|
36
|
+
return `${pascalName}CompiledCSS`;
|
|
37
|
+
const isFromReact = segments.some((seg) => seg === "react");
|
|
38
|
+
const isFromSvelte = segments.some((seg) => seg === "svelte");
|
|
39
|
+
const isFromAngular = segments.some((seg) => seg === "angular");
|
|
40
|
+
if (isFromReact || isFromVue || isFromSvelte || isFromAngular)
|
|
41
|
+
return `${pascalName}BundledCSS`;
|
|
42
|
+
return `${pascalName}CSS`;
|
|
43
|
+
};
|
|
44
|
+
var getArtifactBaseName = (fileName, hash) => {
|
|
45
|
+
const ext = extname(fileName);
|
|
46
|
+
const stem = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
47
|
+
if (!hash)
|
|
48
|
+
return stem;
|
|
49
|
+
const hashSuffix = `.${hash}`;
|
|
50
|
+
if (stem.endsWith(hashSuffix))
|
|
51
|
+
return stem.slice(0, -hashSuffix.length);
|
|
52
|
+
return stem;
|
|
53
|
+
};
|
|
54
|
+
var generateManifest = (outputs, buildPath) => outputs.reduce((manifest, artifact) => {
|
|
55
|
+
const normalizedArtifactPath = normalizePath(artifact.path);
|
|
56
|
+
const normalizedBuildPath = normalizePath(buildPath);
|
|
57
|
+
let relative = normalizedArtifactPath.startsWith(normalizedBuildPath) ? normalizedArtifactPath.slice(normalizedBuildPath.length) : normalizedArtifactPath;
|
|
58
|
+
relative = relative.replace(/^\/+/, "");
|
|
59
|
+
const segments = relative.split("/");
|
|
60
|
+
const fileWithHash = segments.pop();
|
|
61
|
+
if (!fileWithHash)
|
|
62
|
+
return manifest;
|
|
63
|
+
const baseName = getArtifactBaseName(fileWithHash, artifact.hash);
|
|
64
|
+
if (!baseName)
|
|
65
|
+
return manifest;
|
|
66
|
+
const pascalName = toPascal(baseName);
|
|
67
|
+
const ext = extname(fileWithHash);
|
|
68
|
+
const islandIndex = segments.findIndex((seg) => seg === "islands");
|
|
69
|
+
if (ext === ".css") {
|
|
70
|
+
const cssKey = getCssKey(pascalName, segments);
|
|
71
|
+
if (manifest[cssKey] && manifest[cssKey] !== `/${relative}`)
|
|
72
|
+
logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative}". Use unique page names across frameworks.`);
|
|
73
|
+
manifest[cssKey] = `/${relative}`;
|
|
74
|
+
return manifest;
|
|
75
|
+
}
|
|
76
|
+
const frameworkSegment = islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;
|
|
77
|
+
if (frameworkSegment === "react" || frameworkSegment === "svelte" || frameworkSegment === "vue" || frameworkSegment === "angular") {
|
|
78
|
+
const manifestKey2 = getIslandManifestKey(frameworkSegment, pascalName);
|
|
79
|
+
manifest[manifestKey2] = `/${relative}`;
|
|
80
|
+
return manifest;
|
|
81
|
+
}
|
|
82
|
+
const idx = segments.findIndex((seg) => seg === "indexes" || seg === "pages" || seg === "client");
|
|
83
|
+
const folder = idx > UNFOUND_INDEX ? segments[idx] : segments[0];
|
|
84
|
+
const isReact = segments.some((seg) => seg === "react");
|
|
85
|
+
const isVue = segments.some((seg) => seg === "vue");
|
|
86
|
+
const isSvelte = segments.some((seg) => seg === "svelte");
|
|
87
|
+
const isAngular = segments.some((seg) => seg === "angular");
|
|
88
|
+
const isClientComponent = segments.includes("client");
|
|
89
|
+
const manifestKey = getManifestKey(folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular);
|
|
90
|
+
if (manifest[manifestKey] && manifest[manifestKey] !== `/${relative}`) {
|
|
91
|
+
logWarn(`Duplicate manifest key "${manifestKey}" \u2014 "${manifest[manifestKey]}" will be overwritten by "/${relative}". Use unique page names across frameworks.`);
|
|
92
|
+
}
|
|
93
|
+
manifest[manifestKey] = `/${relative}`;
|
|
94
|
+
return manifest;
|
|
95
|
+
}, {});
|
|
96
|
+
|
|
97
|
+
export { generateManifest };
|
|
98
|
+
|
|
99
|
+
//# debugId=CD6D21C2F87146D264756E2164756E21
|
|
100
|
+
//# sourceMappingURL=chunk-1e9vsfyh.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/build/generateManifest.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { extname } from 'node:path';\nimport type { BuildArtifact } from 'bun';\nimport { UNFOUND_INDEX } from '../constants';\nimport { getIslandManifestKey } from '../core/islandManifest';\nimport { logWarn } from '../utils/logger';\nimport { normalizePath } from '../utils/normalizePath';\nimport { toPascal } from '../utils/stringModifiers';\n\nconst getManifestKey = (\n\tfolder: string | undefined,\n\tpascalName: string,\n\tisClientComponent: boolean,\n\tisReact: boolean,\n\tisVue: boolean,\n\tisSvelte: boolean,\n\tisAngular: boolean\n) => {\n\tif (folder === 'indexes') return `${pascalName}Index`;\n\tif (isClientComponent) return `${pascalName}Client`;\n\tif (folder !== 'pages') return pascalName;\n\n\t// Only add \"Page\" suffix for React pages\n\t// Vue and Svelte pages use their base PascalCase name\n\tif (isReact) return `${pascalName}Page`;\n\tif (isVue || isSvelte || isAngular) return pascalName;\n\n\t// Default behavior for other frameworks\n\treturn `${pascalName}Page`;\n};\n\nconst getCssKey = (pascalName: string, segments: string[]) => {\n\tconst isFromVue = segments.some((seg) => seg === 'vue');\n\tif (isFromVue && segments.includes('css'))\n\t\treturn `${pascalName}CompiledCSS`;\n\n\tconst isFromReact = segments.some((seg) => seg === 'react');\n\tconst isFromSvelte = segments.some((seg) => seg === 'svelte');\n\tconst isFromAngular = segments.some((seg) => seg === 'angular');\n\tif (isFromReact || isFromVue || isFromSvelte || isFromAngular)\n\t\treturn `${pascalName}BundledCSS`;\n\n\treturn `${pascalName}CSS`;\n};\n\nconst getArtifactBaseName = (fileName: string, hash: string | null) => {\n\tconst ext = extname(fileName);\n\tconst stem = ext ? fileName.slice(0, -ext.length) : fileName;\n\tif (!hash) return stem;\n\n\tconst hashSuffix = `.${hash}`;\n\tif (stem.endsWith(hashSuffix)) return stem.slice(0, -hashSuffix.length);\n\n\treturn stem;\n};\n\nexport const generateManifest = (outputs: BuildArtifact[], buildPath: string) =>\n\toutputs.reduce<Record<string, string>>((manifest, artifact) => {\n\t\t// Normalize both paths for consistent comparison across platforms\n\t\tconst normalizedArtifactPath = normalizePath(artifact.path);\n\t\tconst normalizedBuildPath = normalizePath(buildPath);\n\n\t\tlet relative = normalizedArtifactPath.startsWith(normalizedBuildPath)\n\t\t\t? normalizedArtifactPath.slice(normalizedBuildPath.length)\n\t\t\t: normalizedArtifactPath;\n\t\trelative = relative.replace(/^\\/+/, '');\n\n\t\tconst segments = relative.split('/');\n\t\tconst fileWithHash = segments.pop();\n\t\tif (!fileWithHash) return manifest;\n\n\t\tconst baseName = getArtifactBaseName(fileWithHash, artifact.hash);\n\t\tif (!baseName) return manifest;\n\n\t\tconst pascalName = toPascal(baseName);\n\t\tconst ext = extname(fileWithHash);\n\t\tconst islandIndex = segments.findIndex((seg) => seg === 'islands');\n\n\t\tif (ext === '.css') {\n\t\t\t// Distinguish CSS from different sources to avoid key collisions.\n\t\t\t// CSS co-emitted from a JS bundle (e.g. CSS Modules) lives under a\n\t\t\t// framework path like react/generated/indexes/, while global\n\t\t\t// stylesheets from the styles directory land directly in indexes/.\n\t\t\t// Vue compiled SFC styles live in assets/css/.\n\t\t\tconst cssKey = getCssKey(pascalName, segments);\n\n\t\t\tif (manifest[cssKey] && manifest[cssKey] !== `/${relative}`)\n\t\t\t\tlogWarn(\n\t\t\t\t\t`Duplicate manifest key \"${cssKey}\" — \"${manifest[cssKey]}\" will be overwritten by \"/${relative}\". Use unique page names across frameworks.`\n\t\t\t\t);\n\n\t\t\tmanifest[cssKey] = `/${relative}`;\n\n\t\t\treturn manifest;\n\t\t}\n\n\t\tconst frameworkSegment =\n\t\t\tislandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;\n\t\tif (\n\t\t\tframeworkSegment === 'react' ||\n\t\t\tframeworkSegment === 'svelte' ||\n\t\t\tframeworkSegment === 'vue' ||\n\t\t\tframeworkSegment === 'angular'\n\t\t) {\n\t\t\tconst manifestKey = getIslandManifestKey(\n\t\t\t\tframeworkSegment,\n\t\t\t\tpascalName\n\t\t\t);\n\t\t\tmanifest[manifestKey] = `/${relative}`;\n\n\t\t\treturn manifest;\n\t\t}\n\n\t\tconst idx = segments.findIndex(\n\t\t\t(seg) => seg === 'indexes' || seg === 'pages' || seg === 'client'\n\t\t);\n\t\tconst folder = idx > UNFOUND_INDEX ? segments[idx] : segments[0];\n\n\t\t// Detect framework from path segments\n\t\tconst isReact = segments.some((seg) => seg === 'react');\n\t\tconst isVue = segments.some((seg) => seg === 'vue');\n\t\tconst isSvelte = segments.some((seg) => seg === 'svelte');\n\t\tconst isAngular = segments.some((seg) => seg === 'angular');\n\n\t\t// Check if this is a client component (for official HMR)\n\t\tconst isClientComponent = segments.includes('client');\n\n\t\tconst manifestKey = getManifestKey(\n\t\t\tfolder,\n\t\t\tpascalName,\n\t\t\tisClientComponent,\n\t\t\tisReact,\n\t\t\tisVue,\n\t\t\tisSvelte,\n\t\t\tisAngular\n\t\t);\n\t\tif (manifest[manifestKey] && manifest[manifestKey] !== `/${relative}`) {\n\t\t\tlogWarn(\n\t\t\t\t`Duplicate manifest key \"${manifestKey}\" — \"${manifest[manifestKey]}\" will be overwritten by \"/${relative}\". Use unique page names across frameworks.`\n\t\t\t);\n\t\t}\n\t\tmanifest[manifestKey] = `/${relative}`;\n\n\t\treturn manifest;\n\t}, {});\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": "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",
|
|
8
|
+
"debugId": "CD6D21C2F87146D264756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/angular/httpTransferCache.ts
|
|
3
|
+
var ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER = "x-skip-transfer-cache";
|
|
4
|
+
var buildAbsoluteHttpTransferCacheOptions = (options = {}) => {
|
|
5
|
+
const {
|
|
6
|
+
filter: userFilter,
|
|
7
|
+
skipHeader = ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER,
|
|
8
|
+
...angularOptions
|
|
9
|
+
} = options;
|
|
10
|
+
return {
|
|
11
|
+
includePostRequests: false,
|
|
12
|
+
includeRequestsWithAuthHeaders: false,
|
|
13
|
+
...angularOptions,
|
|
14
|
+
filter: (request) => !request.headers.has(skipHeader) && (userFilter?.(request) ?? true)
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/angular/requestProviders.ts
|
|
19
|
+
import { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from "@angular/core";
|
|
20
|
+
var buildRequestProviders = (deps, request, requestContext, responseInit) => [
|
|
21
|
+
{ provide: deps.REQUEST, useValue: request ?? null },
|
|
22
|
+
{ provide: deps.REQUEST_CONTEXT, useValue: requestContext ?? null },
|
|
23
|
+
{ provide: deps.RESPONSE_INIT, useValue: responseInit ?? null }
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export { ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER, buildAbsoluteHttpTransferCacheOptions, buildRequestProviders, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT };
|
|
27
|
+
|
|
28
|
+
//# debugId=AB15CB915C6B300664756E2164756E21
|
|
29
|
+
//# sourceMappingURL=chunk-25v9t56f.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/angular/httpTransferCache.ts", "../src/angular/requestProviders.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { HttpTransferCacheOptions } from '@angular/common/http';\n\nexport const ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER = 'x-skip-transfer-cache';\n\nexport type AbsoluteHttpTransferCacheOptions = Omit<\n\tHttpTransferCacheOptions,\n\t'filter'\n> & {\n\tfilter?: NonNullable<HttpTransferCacheOptions['filter']>;\n\tskipHeader?: string;\n};\n\nexport const buildAbsoluteHttpTransferCacheOptions = (\n\toptions: AbsoluteHttpTransferCacheOptions = {}\n) => {\n\tconst {\n\t\tfilter: userFilter,\n\t\tskipHeader = ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER,\n\t\t...angularOptions\n\t} = options;\n\n\treturn {\n\t\tincludePostRequests: false,\n\t\tincludeRequestsWithAuthHeaders: false,\n\t\t...angularOptions,\n\t\tfilter: (request) =>\n\t\t\t!request.headers.has(skipHeader) && (userFilter?.(request) ?? true)\n\t} satisfies HttpTransferCacheOptions;\n};\n",
|
|
6
|
+
"import type { AngularDeps } from '../../types/angular';\n\nexport { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from '@angular/core';\n\nexport const buildRequestProviders = (\n\tdeps: AngularDeps,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined\n) => [\n\t{ provide: deps.REQUEST, useValue: request ?? null },\n\t{ provide: deps.REQUEST_CONTEXT, useValue: requestContext ?? null },\n\t{ provide: deps.RESPONSE_INIT, useValue: responseInit ?? null }\n];\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";;AAEO,IAAM,2CAA2C;AAUjD,IAAM,wCAAwC,CACpD,UAA4C,CAAC,MACzC;AAAA,EACJ;AAAA,IACC,QAAQ;AAAA,IACR,aAAa;AAAA,OACV;AAAA,MACA;AAAA,EAEJ,OAAO;AAAA,IACN,qBAAqB;AAAA,IACrB,gCAAgC;AAAA,OAC7B;AAAA,IACH,QAAQ,CAAC,YACR,CAAC,QAAQ,QAAQ,IAAI,UAAU,MAAM,aAAa,OAAO,KAAK;AAAA,EAChE;AAAA;;;ACzBD;AAEO,IAAM,wBAAwB,CACpC,MACA,SACA,gBACA,iBACI;AAAA,EACJ,EAAE,SAAS,KAAK,SAAS,UAAU,WAAW,KAAK;AAAA,EACnD,EAAE,SAAS,KAAK,iBAAiB,UAAU,kBAAkB,KAAK;AAAA,EAClE,EAAE,SAAS,KAAK,eAAe,UAAU,gBAAgB,KAAK;AAC/D;",
|
|
9
|
+
"debugId": "AB15CB915C6B300664756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
serializeIslandProps
|
|
4
|
+
} from "./chunk-8kcfffry.js";
|
|
5
|
+
|
|
6
|
+
// src/core/islandMarkupAttributes.ts
|
|
7
|
+
var getIslandMarkerAttributes = (props, islandId) => ({
|
|
8
|
+
"data-component": props.component,
|
|
9
|
+
"data-framework": props.framework,
|
|
10
|
+
"data-hydrate": props.hydrate ?? "load",
|
|
11
|
+
"data-island": "true",
|
|
12
|
+
...islandId ? { "data-island-id": islandId } : {},
|
|
13
|
+
"data-props": serializeIslandProps(props.props)
|
|
14
|
+
});
|
|
15
|
+
var escapeHtmlAttribute = (value) => value.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
16
|
+
var serializeIslandAttributes = (attributes) => Object.entries(attributes).map(([key, value]) => `${key}="${escapeHtmlAttribute(value)}"`).join(" ");
|
|
17
|
+
|
|
18
|
+
export { getIslandMarkerAttributes, serializeIslandAttributes };
|
|
19
|
+
|
|
20
|
+
//# debugId=591C30F27F03C2BC64756E2164756E21
|
|
21
|
+
//# sourceMappingURL=chunk-2f21eenc.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/core/islandMarkupAttributes.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { RuntimeIslandRenderProps } from '../../types/island';\nimport { serializeIslandProps } from './islands';\n\ntype IslandMarkerAttributes = {\n\t'data-component': string;\n\t'data-framework': string;\n\t'data-hydrate': string;\n\t'data-island': 'true';\n\t'data-island-id'?: string;\n\t'data-props': string;\n};\n\nexport const getIslandMarkerAttributes = (\n\tprops: RuntimeIslandRenderProps,\n\tislandId?: string\n): IslandMarkerAttributes => ({\n\t'data-component': props.component,\n\t'data-framework': props.framework,\n\t'data-hydrate': props.hydrate ?? 'load',\n\t'data-island': 'true',\n\t...(islandId ? { 'data-island-id': islandId } : {}),\n\t'data-props': serializeIslandProps(props.props)\n});\n\nconst escapeHtmlAttribute = (value: string) =>\n\tvalue\n\t\t.replaceAll('&', '&')\n\t\t.replaceAll('\"', '"')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>');\n\nexport const serializeIslandAttributes = (attributes: Record<string, string>) =>\n\tObject.entries(attributes)\n\t\t.map(([key, value]) => `${key}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join(' ');\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;AAYO,IAAM,4BAA4B,CACxC,OACA,cAC6B;AAAA,EAC7B,kBAAkB,MAAM;AAAA,EACxB,kBAAkB,MAAM;AAAA,EACxB,gBAAgB,MAAM,WAAW;AAAA,EACjC,eAAe;AAAA,KACX,WAAW,EAAE,kBAAkB,SAAS,IAAI,CAAC;AAAA,EACjD,cAAc,qBAAqB,MAAM,KAAK;AAC/C;AAEA,IAAM,sBAAsB,CAAC,UAC5B,MACE,WAAW,KAAK,OAAO,EACvB,WAAW,KAAK,QAAQ,EACxB,WAAW,KAAK,MAAM,EACtB,WAAW,KAAK,MAAM;AAElB,IAAM,4BAA4B,CAAC,eACzC,OAAO,QAAQ,UAAU,EACvB,IAAI,EAAE,KAAK,WAAW,GAAG,QAAQ,oBAAoB,KAAK,IAAI,EAC9D,KAAK,GAAG;",
|
|
8
|
+
"debugId": "591C30F27F03C2BC64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
buildSvelteVendor,
|
|
4
|
+
computeSvelteVendorPaths
|
|
5
|
+
} from "./chunk-cdxd7sy2.js";
|
|
6
|
+
import"./chunk-bmgqm774.js";
|
|
7
|
+
export {
|
|
8
|
+
computeSvelteVendorPaths,
|
|
9
|
+
buildSvelteVendor
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//# debugId=D58DF931EFDC61C964756E2164756E21
|
|
13
|
+
//# sourceMappingURL=chunk-2ga2znex.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-bmgqm774.js";
|
|
3
|
+
|
|
4
|
+
// src/dev/simpleHTMLHMR.ts
|
|
5
|
+
import { resolve } from "path";
|
|
6
|
+
var handleHTMLUpdate = async (htmlFilePath) => {
|
|
7
|
+
let htmlContent;
|
|
8
|
+
try {
|
|
9
|
+
const resolvedPath = resolve(htmlFilePath);
|
|
10
|
+
const file = Bun.file(resolvedPath);
|
|
11
|
+
if (!await file.exists()) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
htmlContent = await file.text();
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const headMatch = htmlContent.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
19
|
+
const bodyMatch = htmlContent.match(/<body[^>]*>([\s\S]*)<\/body>/i);
|
|
20
|
+
if (bodyMatch && bodyMatch[1]) {
|
|
21
|
+
return {
|
|
22
|
+
body: bodyMatch[1].trim(),
|
|
23
|
+
head: headMatch && headMatch[1] ? headMatch[1].trim() : null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return htmlContent;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
handleHTMLUpdate
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# debugId=7F537141C136B47F64756E2164756E21
|
|
33
|
+
//# sourceMappingURL=chunk-30yrw0f6.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/dev/simpleHTMLHMR.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/* Simple HTML HMR Implementation\n Lightweight approach: read HTML file → send HTML patch */\n\nimport { resolve } from 'node:path';\n\n/* Simple HTML HMR handler for server-side\n When an HTML file changes:\n 1. Read the HTML file\n 2. Extract body content (or return full HTML)\n 3. Return the HTML for patching */\nexport const handleHTMLUpdate = async (htmlFilePath: string) => {\n\tlet htmlContent: string;\n\ttry {\n\t\tconst resolvedPath = resolve(htmlFilePath);\n\t\tconst file = Bun.file(resolvedPath);\n\t\tif (!(await file.exists())) {\n\t\t\treturn null;\n\t\t}\n\t\thtmlContent = await file.text();\n\t} catch {\n\t\treturn null;\n\t}\n\n\tconst headMatch = htmlContent.match(/<head[^>]*>([\\s\\S]*?)<\\/head>/i);\n\tconst bodyMatch = htmlContent.match(/<body[^>]*>([\\s\\S]*)<\\/body>/i);\n\n\tif (bodyMatch && bodyMatch[1]) {\n\t\treturn {\n\t\t\tbody: bodyMatch[1].trim(),\n\t\t\thead: headMatch && headMatch[1] ? headMatch[1].trim() : null\n\t\t};\n\t}\n\n\treturn htmlContent;\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;AAGA;AAOO,IAAM,mBAAmB,OAAO,iBAAyB;AAAA,EAC/D,IAAI;AAAA,EACJ,IAAI;AAAA,IACH,MAAM,eAAe,QAAQ,YAAY;AAAA,IACzC,MAAM,OAAO,IAAI,KAAK,YAAY;AAAA,IAClC,IAAI,CAAE,MAAM,KAAK,OAAO,GAAI;AAAA,MAC3B,OAAO;AAAA,IACR;AAAA,IACA,cAAc,MAAM,KAAK,KAAK;AAAA,IAC7B,MAAM;AAAA,IACP,OAAO;AAAA;AAAA,EAGR,MAAM,YAAY,YAAY,MAAM,gCAAgC;AAAA,EACpE,MAAM,YAAY,YAAY,MAAM,+BAA+B;AAAA,EAEnE,IAAI,aAAa,UAAU,IAAI;AAAA,IAC9B,OAAO;AAAA,MACN,MAAM,UAAU,GAAG,KAAK;AAAA,MACxB,MAAM,aAAa,UAAU,KAAK,UAAU,GAAG,KAAK,IAAI;AAAA,IACzD;AAAA,EACD;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
+
"debugId": "7F537141C136B47F64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|