@absolutejs/absolute 0.19.0-beta.808 → 0.19.0-beta.809
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 +9801 -57
- package/dist/angular/browser.js.map +246 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +14877 -60
- package/dist/angular/index.js.map +281 -4
- package/dist/angular/server.js +5610 -45
- package/dist/angular/server.js.map +51 -3
- package/dist/build.js +18092 -45
- package/dist/build.js.map +99 -3
- package/dist/cli/index.js +317 -86
- package/dist/client/index.js +1100 -40
- package/dist/client/index.js.map +24 -4
- package/dist/core/streamingSlotRegistrar.js +108 -11
- package/dist/core/streamingSlotRegistrar.js.map +4 -3
- package/dist/core/streamingSlotRegistry.js +169 -7
- package/dist/core/streamingSlotRegistry.js.map +5 -3
- package/dist/index.js +19957 -547
- package/dist/index.js.map +116 -3
- package/dist/islands/browser.js +228 -9
- package/dist/islands/browser.js.map +9 -4
- package/dist/islands/index.js +1908 -17
- package/dist/islands/index.js.map +27 -3
- package/dist/react/browser.js +328 -12
- package/dist/react/browser.js.map +12 -4
- package/dist/react/components/index.js +167 -16
- package/dist/react/components/index.js.map +6 -3
- package/dist/react/hooks/index.js +183 -8
- package/dist/react/hooks/index.js.map +7 -3
- package/dist/react/index.js +3627 -36
- package/dist/react/index.js.map +45 -4
- package/dist/react/jsxDevRuntimeCompat.js +61 -2
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +1789 -18
- package/dist/react/server.js.map +21 -3
- package/dist/src/angular/injectorPatch.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/browser.js +247 -12
- package/dist/svelte/browser.js.map +10 -3
- package/dist/svelte/index.js +3732 -37
- package/dist/svelte/index.js.map +47 -4
- package/dist/svelte/server.js +2794 -21
- package/dist/svelte/server.js.map +27 -3
- package/dist/vue/browser.js +348 -12
- package/dist/vue/browser.js.map +12 -4
- package/dist/vue/components/Image.js +240 -7
- package/dist/vue/components/Image.js.map +6 -3
- package/dist/vue/components/index.js +544 -11
- package/dist/vue/components/index.js.map +9 -3
- package/dist/vue/index.js +4212 -52
- package/dist/vue/index.js.map +50 -4
- package/dist/vue/server.js +1849 -18
- package/dist/vue/server.js.map +21 -3
- package/package.json +1 -1
- package/dist/chunk-0867j0r0.js +0 -136
- package/dist/chunk-0867j0r0.js.map +0 -10
- package/dist/chunk-0kdc6r16.js +0 -20
- package/dist/chunk-0kdc6r16.js.map +0 -10
- package/dist/chunk-102fp7xe.js +0 -63
- package/dist/chunk-102fp7xe.js.map +0 -10
- package/dist/chunk-11zpfqz6.js +0 -19
- package/dist/chunk-11zpfqz6.js.map +0 -10
- package/dist/chunk-1rfh7hw9.js +0 -319
- package/dist/chunk-1rfh7hw9.js.map +0 -11
- package/dist/chunk-25v9t56f.js +0 -29
- package/dist/chunk-25v9t56f.js.map +0 -11
- package/dist/chunk-2f21eenc.js +0 -21
- package/dist/chunk-2f21eenc.js.map +0 -10
- package/dist/chunk-2ga2znex.js +0 -13
- package/dist/chunk-2ga2znex.js.map +0 -9
- package/dist/chunk-30yrw0f6.js +0 -33
- package/dist/chunk-30yrw0f6.js.map +0 -10
- package/dist/chunk-38jwhqcw.js +0 -4410
- package/dist/chunk-38jwhqcw.js.map +0 -28
- package/dist/chunk-3g91wb4f.js +0 -358
- package/dist/chunk-3g91wb4f.js.map +0 -10
- package/dist/chunk-3yjzpcne.js +0 -34
- package/dist/chunk-3yjzpcne.js.map +0 -10
- package/dist/chunk-41bf6aqt.js +0 -17
- package/dist/chunk-41bf6aqt.js.map +0 -9
- package/dist/chunk-4d39r92n.js +0 -81
- package/dist/chunk-4d39r92n.js.map +0 -10
- package/dist/chunk-5003emhv.js +0 -17
- package/dist/chunk-5003emhv.js.map +0 -10
- package/dist/chunk-5f67rsed.js +0 -466
- package/dist/chunk-5f67rsed.js.map +0 -10
- package/dist/chunk-5fhp1jap.js +0 -9169
- package/dist/chunk-5fhp1jap.js.map +0 -236
- package/dist/chunk-6pdj08z3.js +0 -73
- package/dist/chunk-6pdj08z3.js.map +0 -12
- package/dist/chunk-6qjbrt0k.js +0 -13
- package/dist/chunk-6qjbrt0k.js.map +0 -9
- package/dist/chunk-6sccb4jr.js +0 -14
- package/dist/chunk-6sccb4jr.js.map +0 -9
- package/dist/chunk-798spvzv.js +0 -50
- package/dist/chunk-798spvzv.js.map +0 -10
- package/dist/chunk-7fw6x3js.js +0 -131
- package/dist/chunk-7fw6x3js.js.map +0 -11
- package/dist/chunk-7kjj42xm.js +0 -11
- package/dist/chunk-7kjj42xm.js.map +0 -10
- package/dist/chunk-7mtstdqn.js +0 -90
- package/dist/chunk-7mtstdqn.js.map +0 -10
- package/dist/chunk-851whwc7.js +0 -17
- package/dist/chunk-851whwc7.js.map +0 -10
- package/dist/chunk-85n68sy6.js +0 -103
- package/dist/chunk-85n68sy6.js.map +0 -10
- package/dist/chunk-8kcfffry.js +0 -35
- package/dist/chunk-8kcfffry.js.map +0 -10
- package/dist/chunk-8qqxc1h2.js +0 -426
- package/dist/chunk-8qqxc1h2.js.map +0 -14
- package/dist/chunk-92fsjfpp.js +0 -1731
- package/dist/chunk-92fsjfpp.js.map +0 -11
- package/dist/chunk-93sqk7be.js +0 -139
- package/dist/chunk-93sqk7be.js.map +0 -12
- package/dist/chunk-94gvx0hg.js +0 -28
- package/dist/chunk-94gvx0hg.js.map +0 -10
- package/dist/chunk-9c5tj4k3.js +0 -130
- package/dist/chunk-9c5tj4k3.js.map +0 -10
- package/dist/chunk-9ve9jq72.js +0 -203
- package/dist/chunk-9ve9jq72.js.map +0 -10
- package/dist/chunk-9xrsjeem.js +0 -12
- package/dist/chunk-9xrsjeem.js.map +0 -9
- package/dist/chunk-a9mvyp04.js +0 -87
- package/dist/chunk-a9mvyp04.js.map +0 -10
- package/dist/chunk-b3gbnrwe.js +0 -21
- package/dist/chunk-b3gbnrwe.js.map +0 -10
- package/dist/chunk-bmgqm774.js +0 -65
- package/dist/chunk-bmgqm774.js.map +0 -9
- package/dist/chunk-bxfghpma.js +0 -69
- package/dist/chunk-bxfghpma.js.map +0 -10
- package/dist/chunk-c1jfjnka.js +0 -74
- package/dist/chunk-c1jfjnka.js.map +0 -10
- package/dist/chunk-cbkrwmvh.js +0 -80
- package/dist/chunk-cbkrwmvh.js.map +0 -10
- package/dist/chunk-cdxd7sy2.js +0 -71
- package/dist/chunk-cdxd7sy2.js.map +0 -10
- package/dist/chunk-cg95827x.js +0 -21
- package/dist/chunk-cg95827x.js.map +0 -10
- package/dist/chunk-cm0g4q6w.js +0 -149
- package/dist/chunk-cm0g4q6w.js.map +0 -10
- package/dist/chunk-cwfy538a.js +0 -51
- package/dist/chunk-cwfy538a.js.map +0 -9
- package/dist/chunk-d7mwkzry.js +0 -261
- package/dist/chunk-d7mwkzry.js.map +0 -10
- package/dist/chunk-d8w0qm28.js +0 -184
- package/dist/chunk-d8w0qm28.js.map +0 -11
- package/dist/chunk-d9c0am65.js +0 -12
- package/dist/chunk-d9c0am65.js.map +0 -10
- package/dist/chunk-daqghmg8.js +0 -12
- package/dist/chunk-daqghmg8.js.map +0 -9
- package/dist/chunk-e3r9fxaa.js +0 -149
- package/dist/chunk-e3r9fxaa.js.map +0 -10
- package/dist/chunk-e8eecyrq.js +0 -244
- package/dist/chunk-e8eecyrq.js.map +0 -10
- package/dist/chunk-ex2hxe0v.js +0 -160
- package/dist/chunk-ex2hxe0v.js.map +0 -11
- package/dist/chunk-fak944et.js +0 -91
- package/dist/chunk-fak944et.js.map +0 -10
- package/dist/chunk-ff70rnhd.js +0 -672
- package/dist/chunk-ff70rnhd.js.map +0 -15
- package/dist/chunk-fygx2ymm.js +0 -118
- package/dist/chunk-fygx2ymm.js.map +0 -12
- package/dist/chunk-g15qj669.js +0 -271
- package/dist/chunk-g15qj669.js.map +0 -11
- package/dist/chunk-gd6wmknh.js +0 -121
- package/dist/chunk-gd6wmknh.js.map +0 -11
- package/dist/chunk-gf0ygptk.js +0 -85
- package/dist/chunk-gf0ygptk.js.map +0 -11
- package/dist/chunk-gytkmthr.js +0 -220
- package/dist/chunk-gytkmthr.js.map +0 -10
- package/dist/chunk-h5bbfn3n.js +0 -28
- package/dist/chunk-h5bbfn3n.js.map +0 -11
- package/dist/chunk-h6mye9r3.js +0 -93
- package/dist/chunk-h6mye9r3.js.map +0 -10
- package/dist/chunk-hcsmxw1v.js +0 -85
- package/dist/chunk-hcsmxw1v.js.map +0 -10
- package/dist/chunk-hyjs4bqs.js +0 -8
- package/dist/chunk-hyjs4bqs.js.map +0 -10
- package/dist/chunk-j88z31ep.js +0 -25
- package/dist/chunk-j88z31ep.js.map +0 -10
- package/dist/chunk-jn91vzkh.js +0 -66
- package/dist/chunk-jn91vzkh.js.map +0 -10
- package/dist/chunk-jpkjdgsk.js +0 -167
- package/dist/chunk-jpkjdgsk.js.map +0 -11
- package/dist/chunk-jwxt8gnp.js +0 -13
- package/dist/chunk-jwxt8gnp.js.map +0 -9
- package/dist/chunk-kk8w9rh5.js +0 -195
- package/dist/chunk-kk8w9rh5.js.map +0 -10
- package/dist/chunk-m97ze5hz.js +0 -46
- package/dist/chunk-m97ze5hz.js.map +0 -10
- package/dist/chunk-mbazhahf.js +0 -60
- package/dist/chunk-mbazhahf.js.map +0 -10
- package/dist/chunk-mgfwq18r.js +0 -15
- package/dist/chunk-mgfwq18r.js.map +0 -9
- package/dist/chunk-mtgf69xn.js +0 -88
- package/dist/chunk-mtgf69xn.js.map +0 -10
- package/dist/chunk-mtxzyxpg.js +0 -102
- package/dist/chunk-mtxzyxpg.js.map +0 -10
- package/dist/chunk-nehhtthw.js +0 -225
- package/dist/chunk-nehhtthw.js.map +0 -10
- package/dist/chunk-p5504p14.js +0 -16
- package/dist/chunk-p5504p14.js.map +0 -10
- package/dist/chunk-pnscgw95.js +0 -90
- package/dist/chunk-pnscgw95.js.map +0 -10
- package/dist/chunk-pvpp4pvs.js +0 -17
- package/dist/chunk-pvpp4pvs.js.map +0 -10
- package/dist/chunk-qh75agse.js +0 -95
- package/dist/chunk-qh75agse.js.map +0 -10
- package/dist/chunk-qxq2zcty.js +0 -52
- package/dist/chunk-qxq2zcty.js.map +0 -10
- package/dist/chunk-r6e8pytx.js +0 -22
- package/dist/chunk-r6e8pytx.js.map +0 -9
- package/dist/chunk-r7jmgqnw.js +0 -114
- package/dist/chunk-r7jmgqnw.js.map +0 -10
- package/dist/chunk-s6defjk2.js +0 -116
- package/dist/chunk-s6defjk2.js.map +0 -10
- package/dist/chunk-sd39p726.js +0 -619
- package/dist/chunk-sd39p726.js.map +0 -10
- package/dist/chunk-swrnzs4c.js +0 -63
- package/dist/chunk-swrnzs4c.js.map +0 -10
- package/dist/chunk-tfe3sb44.js +0 -33
- package/dist/chunk-tfe3sb44.js.map +0 -10
- package/dist/chunk-tjr0kcev.js +0 -41
- package/dist/chunk-tjr0kcev.js.map +0 -9
- package/dist/chunk-tx9edm1x.js +0 -34
- package/dist/chunk-tx9edm1x.js.map +0 -10
- package/dist/chunk-txhm2vb5.js +0 -18
- package/dist/chunk-txhm2vb5.js.map +0 -9
- package/dist/chunk-v5vmsxmy.js +0 -526
- package/dist/chunk-v5vmsxmy.js.map +0 -12
- package/dist/chunk-vjhxm8n2.js +0 -29
- package/dist/chunk-vjhxm8n2.js.map +0 -9
- package/dist/chunk-vkrpm7kc.js +0 -247
- package/dist/chunk-vkrpm7kc.js.map +0 -12
- package/dist/chunk-w3m4m5we.js +0 -4925
- package/dist/chunk-w3m4m5we.js.map +0 -12
- package/dist/chunk-wrxtn9ve.js +0 -18
- package/dist/chunk-wrxtn9ve.js.map +0 -10
- package/dist/chunk-wwzvp0zn.js +0 -192
- package/dist/chunk-wwzvp0zn.js.map +0 -10
- package/dist/chunk-x09cskqd.js +0 -377
- package/dist/chunk-x09cskqd.js.map +0 -10
- package/dist/chunk-xnt8c6h2.js +0 -576
- package/dist/chunk-xnt8c6h2.js.map +0 -10
- package/dist/chunk-xw0tx842.js +0 -13
- package/dist/chunk-xw0tx842.js.map +0 -9
- package/dist/chunk-xx5b6b9m.js +0 -69
- package/dist/chunk-xx5b6b9m.js.map +0 -10
- package/dist/chunk-xz1kdswj.js +0 -21
- package/dist/chunk-xz1kdswj.js.map +0 -9
- package/dist/chunk-y84qnsd3.js +0 -32
- package/dist/chunk-y84qnsd3.js.map +0 -10
- package/dist/chunk-ywjn0rad.js +0 -14
- package/dist/chunk-ywjn0rad.js.map +0 -9
- package/dist/chunk-z9nvhm6r.js +0 -13
- package/dist/chunk-z9nvhm6r.js.map +0 -9
- package/dist/chunk-zhmvdpk6.js +0 -15
- package/dist/chunk-zhmvdpk6.js.map +0 -9
- package/dist/chunk-zrg9d4zw.js +0 -784
- package/dist/chunk-zrg9d4zw.js.map +0 -10
package/dist/chunk-bxfghpma.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-bmgqm774.js";
|
|
5
|
-
|
|
6
|
-
// src/build/buildVueVendor.ts
|
|
7
|
-
import { mkdirSync } from "fs";
|
|
8
|
-
import { join } from "path";
|
|
9
|
-
import { rm } from "fs/promises";
|
|
10
|
-
var {build: bunBuild } = globalThis.Bun;
|
|
11
|
-
var vueSpecifiers = ["vue"];
|
|
12
|
-
var toSafeFileName = (specifier) => specifier.replace(/\//g, "_");
|
|
13
|
-
var buildVueVendor = async (buildDir) => {
|
|
14
|
-
const vendorDir = join(buildDir, "vue", "vendor");
|
|
15
|
-
mkdirSync(vendorDir, { recursive: true });
|
|
16
|
-
const tmpDir = join(buildDir, "_vue_vendor_tmp");
|
|
17
|
-
mkdirSync(tmpDir, { recursive: true });
|
|
18
|
-
const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
|
|
19
|
-
const safeName = toSafeFileName(specifier);
|
|
20
|
-
const entryPath = join(tmpDir, `${safeName}.ts`);
|
|
21
|
-
await Bun.write(entryPath, `export * from '${specifier}';
|
|
22
|
-
`);
|
|
23
|
-
return entryPath;
|
|
24
|
-
}));
|
|
25
|
-
const result = await bunBuild({
|
|
26
|
-
define: {
|
|
27
|
-
__VUE_OPTIONS_API__: "true",
|
|
28
|
-
__VUE_PROD_DEVTOOLS__: "true",
|
|
29
|
-
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "true"
|
|
30
|
-
},
|
|
31
|
-
entrypoints,
|
|
32
|
-
format: "esm",
|
|
33
|
-
minify: false,
|
|
34
|
-
naming: "[name].[ext]",
|
|
35
|
-
outdir: vendorDir,
|
|
36
|
-
splitting: true,
|
|
37
|
-
target: "browser",
|
|
38
|
-
throw: false
|
|
39
|
-
});
|
|
40
|
-
await rm(tmpDir, { force: true, recursive: true });
|
|
41
|
-
if (!result.success) {
|
|
42
|
-
console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const { readFileSync, writeFileSync, readdirSync } = await import("fs");
|
|
46
|
-
const files = readdirSync(vendorDir).filter((f) => f.endsWith(".js"));
|
|
47
|
-
for (const file of files) {
|
|
48
|
-
const filePath = join(vendorDir, file);
|
|
49
|
-
const content = readFileSync(filePath, "utf-8");
|
|
50
|
-
if (!content.includes("__VUE_HMR_RUNTIME__"))
|
|
51
|
-
continue;
|
|
52
|
-
const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
|
|
53
|
-
if (patched === content)
|
|
54
|
-
continue;
|
|
55
|
-
writeFileSync(filePath, patched);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var computeVueVendorPaths = () => {
|
|
59
|
-
const paths = {};
|
|
60
|
-
for (const specifier of vueSpecifiers) {
|
|
61
|
-
paths[specifier] = `/vue/vendor/${toSafeFileName(specifier)}.js`;
|
|
62
|
-
}
|
|
63
|
-
return paths;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export { buildVueVendor, computeVueVendorPaths };
|
|
67
|
-
|
|
68
|
-
//# debugId=A45F35047E7DD64064756E2164756E21
|
|
69
|
-
//# sourceMappingURL=chunk-bxfghpma.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/build/buildVueVendor.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { mkdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\nimport { build as bunBuild } from 'bun';\n\n/** Bare specifiers that need stable vendor builds for Vue.\n * Vue compiled SFC output imports from vue for the runtime. */\nconst vueSpecifiers = ['vue'];\n\n/** Convert a bare specifier to a safe filename */\nconst toSafeFileName = (specifier: string) =>\n\tspecifier.replace(/\\//g, '_');\n\n/** Build Vue packages into stable vendor files (no content hash).\n * Output goes to {buildDir}/vue/vendor/ with predictable names. */\nexport const buildVueVendor = async (buildDir: string) => {\n\tconst vendorDir = join(buildDir, 'vue', 'vendor');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_vue_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\t// Vue is proper ESM — use export * from directly\n\tconst entrypoints = await Promise.all(\n\t\tvueSpecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, `export * from '${specifier}';\\n`);\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\t// Define Vue feature flags to prevent warnings in browser\n\tconst result = await bunBuild({\n\t\tdefine: {\n\t\t\t__VUE_OPTIONS_API__: 'true',\n\t\t\t__VUE_PROD_DEVTOOLS__: 'true',\n\t\t\t__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'true'\n\t\t},\n\t\tentrypoints,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tsplitting: true,\n\t\ttarget: 'browser',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn('⚠️ Vue vendor build had errors:', result.logs);\n\n\t\treturn;\n\t}\n\n\t// Patch the vendor bundle: guard __VUE_HMR_RUNTIME__ so the vendor\n\t// Vue doesn't overwrite the HMR runtime set by the initial bundle.\n\t// Without this, importing the vendor Vue during HMR nukes all\n\t// component records and reload() can't find existing instances.\n\tconst { readFileSync, writeFileSync, readdirSync } = await import(\n\t\t'node:fs'\n\t);\n\tconst files = readdirSync(vendorDir).filter((f) => f.endsWith('.js'));\n\tfor (const file of files) {\n\t\tconst filePath = join(vendorDir, file);\n\t\tconst content = readFileSync(filePath, 'utf-8');\n\t\tif (!content.includes('__VUE_HMR_RUNTIME__')) continue;\n\n\t\tconst patched = content.replace(\n\t\t\t/getGlobalThis\\(\\)\\.__VUE_HMR_RUNTIME__\\s*=\\s*\\{/,\n\t\t\t'getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {'\n\t\t);\n\t\tif (patched === content) continue;\n\n\t\twriteFileSync(filePath, patched);\n\t}\n};\n\n/** Compute the deterministic vendor paths mapping (no build needed).\n * This can be called before vendor files exist on disk. */\nexport const computeVueVendorPaths = () => {\n\tconst paths: Record<string, string> = {};\n\tfor (const specifier of vueSpecifiers) {\n\t\tpaths[specifier] = `/vue/vendor/${toSafeFileName(specifier)}.js`;\n\t}\n\n\treturn paths;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;AAAA;AACA;AACA;AACA;AAIA,IAAM,gBAAgB,CAAC,KAAK;AAG5B,IAAM,iBAAiB,CAAC,cACvB,UAAU,QAAQ,OAAO,GAAG;AAItB,IAAM,iBAAiB,OAAO,aAAqB;AA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B,mDACA,gFACD;AAAA,IACA,IAAI,YAAY;AAAA,MAAS;AAAA,IAEzB,cAAc,UAAU,OAAO;AAAA,EAChC;AAAA;AAKM,IAAM,wBAAwB,MAAM;AAAA,EAC1C,MAAM,QAAgC,CAAC;AAAA,EACvC,WAAW,aAAa,eAAe;AAAA,IACtC,MAAM,aAAa,eAAe,eAAe,SAAS;AAAA,EAC3D;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
-
"debugId": "A45F35047E7DD64064756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-c1jfjnka.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
setStreamingSlotCollectionController,
|
|
4
|
-
setStreamingSlotRegistrar
|
|
5
|
-
} from "./chunk-qxq2zcty.js";
|
|
6
|
-
import {
|
|
7
|
-
__require
|
|
8
|
-
} from "./chunk-bmgqm774.js";
|
|
9
|
-
|
|
10
|
-
// src/core/streamingSlotRegistry.ts
|
|
11
|
-
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
12
|
-
var isObjectRecord = (value) => Boolean(value) && typeof value === "object";
|
|
13
|
-
var isAsyncLocalStorage = (value) => isObjectRecord(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
14
|
-
var getStorageGlobal = () => {
|
|
15
|
-
const value = Reflect.get(globalThis, STREAMING_SLOT_STORAGE_KEY);
|
|
16
|
-
if (value === null || typeof value === "undefined") {
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
return isAsyncLocalStorage(value) ? value : undefined;
|
|
20
|
-
};
|
|
21
|
-
var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
|
|
22
|
-
var ensureAsyncLocalStorage = async () => {
|
|
23
|
-
const storage = getStorageGlobal();
|
|
24
|
-
if (typeof storage !== "undefined") {
|
|
25
|
-
return storage;
|
|
26
|
-
}
|
|
27
|
-
if (!isServerRuntime()) {
|
|
28
|
-
Reflect.set(globalThis, STREAMING_SLOT_STORAGE_KEY, null);
|
|
29
|
-
return getStorageGlobal();
|
|
30
|
-
}
|
|
31
|
-
const mod = await import("async_hooks");
|
|
32
|
-
Reflect.set(globalThis, STREAMING_SLOT_STORAGE_KEY, new mod.AsyncLocalStorage);
|
|
33
|
-
return getStorageGlobal();
|
|
34
|
-
};
|
|
35
|
-
var getActiveSlotStore = () => {
|
|
36
|
-
const storage = getStorageGlobal();
|
|
37
|
-
if (!storage)
|
|
38
|
-
return;
|
|
39
|
-
return storage.getStore();
|
|
40
|
-
};
|
|
41
|
-
var registerStreamingSlot = (slot) => {
|
|
42
|
-
const store = getActiveSlotStore();
|
|
43
|
-
if (!store)
|
|
44
|
-
return;
|
|
45
|
-
store.set(slot.id, slot);
|
|
46
|
-
};
|
|
47
|
-
setStreamingSlotRegistrar(registerStreamingSlot);
|
|
48
|
-
setStreamingSlotCollectionController({
|
|
49
|
-
isCollecting: () => getActiveSlotStore() !== undefined
|
|
50
|
-
});
|
|
51
|
-
var hasActiveStreamingSlotRegistry = () => getActiveSlotStore() !== undefined;
|
|
52
|
-
var runWithStreamingSlotRegistry = async (task) => {
|
|
53
|
-
const storage = await ensureAsyncLocalStorage();
|
|
54
|
-
if (!storage) {
|
|
55
|
-
const slots = [];
|
|
56
|
-
return {
|
|
57
|
-
result: await task(),
|
|
58
|
-
slots
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
return storage.run(new Map, async () => {
|
|
62
|
-
const result = await task();
|
|
63
|
-
const store = storage.getStore();
|
|
64
|
-
return {
|
|
65
|
-
result,
|
|
66
|
-
slots: store ? [...store.values()] : []
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { hasActiveStreamingSlotRegistry, runWithStreamingSlotRegistry };
|
|
72
|
-
|
|
73
|
-
//# debugId=78C72EA694A5F2CE64756E2164756E21
|
|
74
|
-
//# sourceMappingURL=chunk-c1jfjnka.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/core/streamingSlotRegistry.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StreamingSlot } from '../utils/streamingSlots';\nimport {\n\tsetStreamingSlotCollectionController,\n\tsetStreamingSlotRegistrar\n} from './streamingSlotRegistrar';\n\ntype SlotStore = Map<string, StreamingSlot>;\ntype AsyncLocalStorageType =\n\timport('node:async_hooks').AsyncLocalStorage<SlotStore>;\n\nconst STREAMING_SLOT_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotAsyncLocalStorage'\n);\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isAsyncLocalStorage = (value: unknown): value is AsyncLocalStorageType =>\n\tisObjectRecord(value) &&\n\t'getStore' in value &&\n\ttypeof value.getStore === 'function' &&\n\t'run' in value &&\n\ttypeof value.run === 'function';\n\nconst getStorageGlobal = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') {\n\t\treturn value;\n\t}\n\n\treturn isAsyncLocalStorage(value) ? value : undefined;\n};\n\nconst isServerRuntime = () =>\n\ttypeof process !== 'undefined' &&\n\ttypeof process.versions?.node === 'string';\n\nconst ensureAsyncLocalStorage = async () => {\n\tconst storage = getStorageGlobal();\n\tif (typeof storage !== 'undefined') {\n\t\treturn storage;\n\t}\n\tif (!isServerRuntime()) {\n\t\tReflect.set(globalThis, STREAMING_SLOT_STORAGE_KEY, null);\n\n\t\treturn getStorageGlobal();\n\t}\n\n\tconst mod = await import('node:async_hooks');\n\tReflect.set(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_STORAGE_KEY,\n\t\tnew mod.AsyncLocalStorage<SlotStore>()\n\t);\n\n\treturn getStorageGlobal();\n};\n\nconst getActiveSlotStore = () => {\n\tconst storage = getStorageGlobal();\n\tif (!storage) return undefined;\n\n\treturn storage.getStore();\n};\n\nconst registerStreamingSlot = (slot: StreamingSlot) => {\n\tconst store = getActiveSlotStore();\n\tif (!store) return;\n\tstore.set(slot.id, slot);\n};\n\nsetStreamingSlotRegistrar(registerStreamingSlot);\nsetStreamingSlotCollectionController({\n\tisCollecting: () => getActiveSlotStore() !== undefined\n});\n\nexport const hasActiveStreamingSlotRegistry = () =>\n\tgetActiveSlotStore() !== undefined;\n\nexport const runWithStreamingSlotRegistry = async <T>(\n\ttask: () => Promise<T> | T\n) => {\n\tconst storage = await ensureAsyncLocalStorage();\n\tif (!storage) {\n\t\tconst slots: StreamingSlot[] = [];\n\n\t\treturn {\n\t\t\tresult: await task(),\n\t\t\tslots\n\t\t};\n\t}\n\n\treturn storage.run(new Map<string, StreamingSlot>(), async () => {\n\t\tconst result = await task();\n\t\tconst store = storage.getStore();\n\n\t\treturn {\n\t\t\tresult,\n\t\t\tslots: store ? [...store.values()] : []\n\t\t};\n\t});\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;AAUA,IAAM,6BAA6B,OAAO,IACzC,2CACD;AAEA,IAAM,iBAAiB,CAAC,UACvB,QAAQ,KAAK,KAAK,OAAO,UAAU;AAEpC,IAAM,sBAAsB,CAAC,UAC5B,eAAe,KAAK,MACpB,cAAc,UACd,OAAO,MAAM,aAAa,eAC1B,SAAS,UACT,OAAO,MAAM,QAAQ;AAEtB,IAAM,mBAAmB,MAAM;AAAA,EAC9B,MAAM,QAAQ,QAAQ,IAAI,YAAY,0BAA0B;AAAA,EAChE,IAAI,UAAU,QAAQ,OAAO,UAAU,aAAa;AAAA,IACnD,OAAO;AAAA,EACR;AAAA,EAEA,OAAO,oBAAoB,KAAK,IAAI,QAAQ;AAAA;AAG7C,IAAM,kBAAkB,MACvB,OAAO,YAAY,eACnB,OAAO,QAAQ,UAAU,SAAS;AAEnC,IA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ACA;AAAA;",
|
|
8
|
-
"debugId": "78C72EA694A5F2CE64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-cbkrwmvh.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
formatTimestamp
|
|
4
|
-
} from "./chunk-gf0ygptk.js";
|
|
5
|
-
|
|
6
|
-
// src/utils/logger.ts
|
|
7
|
-
var colors = {
|
|
8
|
-
blue: "\x1B[34m",
|
|
9
|
-
bold: "\x1B[1m",
|
|
10
|
-
cyan: "\x1B[36m",
|
|
11
|
-
dim: "\x1B[2m",
|
|
12
|
-
green: "\x1B[32m",
|
|
13
|
-
magenta: "\x1B[35m",
|
|
14
|
-
red: "\x1B[31m",
|
|
15
|
-
reset: "\x1B[0m",
|
|
16
|
-
white: "\x1B[37m",
|
|
17
|
-
yellow: "\x1B[33m"
|
|
18
|
-
};
|
|
19
|
-
var frameworkColors = {
|
|
20
|
-
angular: colors.magenta,
|
|
21
|
-
assets: colors.dim,
|
|
22
|
-
css: colors.cyan,
|
|
23
|
-
html: colors.white,
|
|
24
|
-
htmx: colors.white,
|
|
25
|
-
react: colors.blue,
|
|
26
|
-
svelte: colors.yellow,
|
|
27
|
-
vue: colors.green
|
|
28
|
-
};
|
|
29
|
-
var formatPath = (filePath) => {
|
|
30
|
-
const cwd = process.cwd();
|
|
31
|
-
let relative = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
|
|
32
|
-
relative = relative.replace(/\\/g, "/");
|
|
33
|
-
if (!relative.startsWith("/")) {
|
|
34
|
-
relative = `/${relative}`;
|
|
35
|
-
}
|
|
36
|
-
return relative;
|
|
37
|
-
};
|
|
38
|
-
var getFrameworkColor = (framework) => frameworkColors[framework] || colors.white;
|
|
39
|
-
var log = (action, options) => {
|
|
40
|
-
const timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;
|
|
41
|
-
const tag = `${colors.cyan}[hmr]${colors.reset}`;
|
|
42
|
-
let message = action;
|
|
43
|
-
if (options?.path) {
|
|
44
|
-
const pathColor = options.framework ? getFrameworkColor(options.framework) : colors.white;
|
|
45
|
-
message += ` ${pathColor}${formatPath(options.path)}${colors.reset}`;
|
|
46
|
-
}
|
|
47
|
-
if (options?.duration !== undefined) {
|
|
48
|
-
message += ` ${colors.dim}(${options.duration}ms)${colors.reset}`;
|
|
49
|
-
}
|
|
50
|
-
console.log(`${timestamp} ${tag} ${message}`);
|
|
51
|
-
};
|
|
52
|
-
var logCssUpdate = (path, framework, duration) => {
|
|
53
|
-
log("css update", { duration, framework: framework ?? "css", path });
|
|
54
|
-
};
|
|
55
|
-
var logError = (message, error) => {
|
|
56
|
-
const timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;
|
|
57
|
-
const tag = `${colors.red}[hmr]${colors.reset}`;
|
|
58
|
-
const errorMsg = error instanceof Error ? error.message : error;
|
|
59
|
-
const fullMessage = `${colors.red}error${colors.reset} ${message}${errorMsg ? `: ${errorMsg}` : ""}`;
|
|
60
|
-
console.error(`${timestamp} ${tag} ${fullMessage}`);
|
|
61
|
-
};
|
|
62
|
-
var logHmrUpdate = (path, framework, duration) => {
|
|
63
|
-
log("hmr update", { duration, framework, path });
|
|
64
|
-
};
|
|
65
|
-
var logScriptUpdate = (path, framework, duration) => {
|
|
66
|
-
log("script update", { duration, framework, path });
|
|
67
|
-
};
|
|
68
|
-
var logServerReload = () => {
|
|
69
|
-
log(`${colors.cyan}server module reloaded${colors.reset}`);
|
|
70
|
-
};
|
|
71
|
-
var logWarn = (message) => {
|
|
72
|
-
const timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;
|
|
73
|
-
const tag = `${colors.yellow}[hmr]${colors.reset}`;
|
|
74
|
-
console.log(`${timestamp} ${tag} ${colors.yellow}warning ${message}${colors.reset}`);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { logCssUpdate, logError, logHmrUpdate, logScriptUpdate, logServerReload, logWarn };
|
|
78
|
-
|
|
79
|
-
//# debugId=B519580838AE15A464756E2164756E21
|
|
80
|
-
//# sourceMappingURL=chunk-cbkrwmvh.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/utils/logger.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * Centralized logger utility for AbsoluteJS\n * Provides formatted output with ANSI colors and timestamps\n */\n\nimport { formatTimestamp, startupBanner } from './startupBanner';\n\nexport { formatTimestamp };\n\n// ANSI color codes\nconst colors = {\n\tblue: '\\x1b[34m',\n\tbold: '\\x1b[1m',\n\t// Core colors\n\tcyan: '\\x1b[36m',\n\tdim: '\\x1b[2m',\n\tgreen: '\\x1b[32m',\n\tmagenta: '\\x1b[35m',\n\tred: '\\x1b[31m',\n\treset: '\\x1b[0m',\n\twhite: '\\x1b[37m',\n\tyellow: '\\x1b[33m'\n} as const;\n\n// Framework color mapping\nconst frameworkColors: Record<string, string> = {\n\tangular: colors.magenta,\n\tassets: colors.dim,\n\tcss: colors.cyan,\n\thtml: colors.white,\n\thtmx: colors.white,\n\treact: colors.blue,\n\tsvelte: colors.yellow,\n\tvue: colors.green\n};\n\n/**\n * Format a file path for display (relative, clean)\n */\nconst formatPath = (filePath: string) => {\n\tconst cwd = process.cwd();\n\tlet relative = filePath.startsWith(cwd)\n\t\t? filePath.slice(cwd.length + 1)\n\t\t: filePath;\n\t// Normalize slashes\n\trelative = relative.replace(/\\\\/g, '/');\n\t// Ensure it starts with /\n\tif (!relative.startsWith('/')) {\n\t\trelative = `/${relative}`;\n\t}\n\n\treturn relative;\n};\n\n/**\n * Get color for a framework\n */\nconst getFrameworkColor = (framework: string) =>\n\tframeworkColors[framework] || colors.white;\n\n/**\n * Core logging function\n */\nconst log = (\n\taction: string,\n\toptions?: {\n\t\tframework?: string;\n\t\tduration?: number;\n\t\tpath?: string;\n\t\tcolor?: string;\n\t}\n) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.cyan}[hmr]${colors.reset}`;\n\n\tlet message = action;\n\n\t// Apply framework color to path if present\n\tif (options?.path) {\n\t\tconst pathColor = options.framework\n\t\t\t? getFrameworkColor(options.framework)\n\t\t\t: colors.white;\n\t\tmessage += ` ${pathColor}${formatPath(options.path)}${colors.reset}`;\n\t}\n\n\t// Add duration if present\n\tif (options?.duration !== undefined) {\n\t\tmessage += ` ${colors.dim}(${options.duration}ms)${colors.reset}`;\n\t}\n\n\tconsole.log(`${timestamp} ${tag} ${message}`);\n};\n\n/**\n * Startup banner\n */\nexport const logReady = startupBanner;\n\n/**\n * CSS update message\n * Format: \"10:30:45 AM [hmr] css update /styles/main.css (125ms)\"\n */\nexport const logCssUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('css update', { duration, framework: framework ?? 'css', path });\n};\n\n/**\n * Build error\n * Format: \"10:30:45 AM [hmr] error Build failed: ...\"\n */\nexport const logError = (message: string, error?: Error | string) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.red}[hmr]${colors.reset}`;\n\tconst errorMsg = error instanceof Error ? error.message : error;\n\tconst fullMessage = `${colors.red}error${colors.reset} ${message}${errorMsg ? `: ${errorMsg}` : ''}`;\n\tconsole.error(`${timestamp} ${tag} ${fullMessage}`);\n};\n\n/**\n * HMR update message\n * Format: \"10:30:45 AM [hmr] hmr update /pages/App.tsx\"\n */\nexport const logHmrUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('hmr update', { duration, framework, path });\n};\n\n/**\n * Generic info message\n */\nexport const logInfo = (message: string) => {\n\tlog(message);\n};\n\n/**\n * Page reload message\n * Format: \"10:30:45 AM [hmr] page reload /src/App.tsx (125ms)\"\n */\nexport const logPageReload = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('page reload', { duration, framework, path });\n};\n\n/**\n * Script update message\n * Format: \"10:30:45 AM [hmr] script update /scripts/counter.ts (125ms)\"\n */\nexport const logScriptUpdate = (\n\tpath: string,\n\tframework?: string,\n\tduration?: number\n) => {\n\tlog('script update', { duration, framework, path });\n};\n\n/**\n * Server module reloaded (Bun --hot triggered a server-side change)\n */\nexport const logServerReload = () => {\n\tlog(`${colors.cyan}server module reloaded${colors.reset}`);\n};\n\n/**\n * Warning message\n * Format: \"10:30:45 AM [hmr] warning ...\"\n */\nexport const logWarn = (message: string) => {\n\tconst timestamp = `${colors.dim}${formatTimestamp()}${colors.reset}`;\n\tconst tag = `${colors.yellow}[hmr]${colors.reset}`;\n\tconsole.log(\n\t\t`${timestamp} ${tag} ${colors.yellow}warning ${message}${colors.reset}`\n\t);\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;AAUA,IAAM,SAAS;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EAEN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AACT;AAGA,IAAM,kBAA0C;AAAA,EAC/C,SAAS,OAAO;AAAA,EAChB,QAAQ,OAAO;AAAA,EACf,KAAK,OAAO;AAAA,EACZ,MAAM,OAAO;AAAA,EACb,MAAM,OAAO;AAAA,EACb,OAAO,OAAO;AAAA,EACd,QAAQ,OAAO;AAAA,EACf,KAAK,OAAO;AACb;AAKA,IAAM,aAAa,CAAC,aAAqB;AAAA,EACxC,MAAM,MAAM,QAAQ,IAAI;AAAA,EACxB,IAAI,WAAW,SAAS,WAAW,GAAG,IACnC,SAAS,MAAM,IAAI,SAAS,CAAC,IAC7B;AAAA,EAEH,WAAW,SAAS,QAAQ,OAAO,GAAG;AAAA,EAEtC,IAAI,CAAC,SAAS,WAAW,GAAG,GAAG;AAAA,IAC9B,WAAW,IAAI;AAAA,EAChB;AAAA,EAEA,O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AM5C,IAAM,kBAAkB,MAAM;AAAA,EACpC,IAAI,GAAG,OAAO,6BAA6B,OAAO,OAAO;AAAA;AAOnD,IAAM,UAAU,CAAC,YAAoB;AAAA,EAC3C,MAAM,YAAY,GAAG,OAAO,MAAM,gBAAgB,IAAI,OAAO;AAAA,EAC7D,MAAM,MAAM,GAAG,OAAO,cAAc,OAAO;AAAA,EAC3C,QAAQ,IACP,GAAG,aAAa,OAAO,OAAO,iBAAiB,UAAU,OAAO,OACjE;AAAA;",
|
|
8
|
-
"debugId": "B519580838AE15A464756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-cdxd7sy2.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-bmgqm774.js";
|
|
5
|
-
|
|
6
|
-
// src/build/buildSvelteVendor.ts
|
|
7
|
-
import { mkdirSync } from "fs";
|
|
8
|
-
import { join } from "path";
|
|
9
|
-
import { rm } from "fs/promises";
|
|
10
|
-
var {build: bunBuild } = globalThis.Bun;
|
|
11
|
-
var svelteSpecifiers = [
|
|
12
|
-
"svelte",
|
|
13
|
-
"svelte/internal",
|
|
14
|
-
"svelte/internal/flags/async",
|
|
15
|
-
"svelte/internal/flags/legacy",
|
|
16
|
-
"svelte/internal/client",
|
|
17
|
-
"svelte/internal/disclose-version",
|
|
18
|
-
"svelte/store"
|
|
19
|
-
];
|
|
20
|
-
var isResolvable = (specifier) => {
|
|
21
|
-
try {
|
|
22
|
-
__require.resolve(specifier);
|
|
23
|
-
return true;
|
|
24
|
-
} catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var resolveVendorSpecifiers = () => svelteSpecifiers.filter(isResolvable);
|
|
29
|
-
var toSafeFileName = (specifier) => specifier.replace(/\//g, "_");
|
|
30
|
-
var buildSvelteVendor = async (buildDir) => {
|
|
31
|
-
const specifiers = resolveVendorSpecifiers();
|
|
32
|
-
if (specifiers.length === 0)
|
|
33
|
-
return;
|
|
34
|
-
const vendorDir = join(buildDir, "svelte", "vendor");
|
|
35
|
-
mkdirSync(vendorDir, { recursive: true });
|
|
36
|
-
const tmpDir = join(buildDir, "_svelte_vendor_tmp");
|
|
37
|
-
mkdirSync(tmpDir, { recursive: true });
|
|
38
|
-
const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
|
|
39
|
-
const safeName = toSafeFileName(specifier);
|
|
40
|
-
const entryPath = join(tmpDir, `${safeName}.ts`);
|
|
41
|
-
await Bun.write(entryPath, `export * from '${specifier}';
|
|
42
|
-
`);
|
|
43
|
-
return entryPath;
|
|
44
|
-
}));
|
|
45
|
-
const result = await bunBuild({
|
|
46
|
-
entrypoints,
|
|
47
|
-
format: "esm",
|
|
48
|
-
minify: false,
|
|
49
|
-
naming: "[name].[ext]",
|
|
50
|
-
outdir: vendorDir,
|
|
51
|
-
splitting: true,
|
|
52
|
-
target: "browser",
|
|
53
|
-
throw: false
|
|
54
|
-
});
|
|
55
|
-
await rm(tmpDir, { force: true, recursive: true });
|
|
56
|
-
if (!result.success) {
|
|
57
|
-
console.warn("\u26A0\uFE0F Svelte vendor build had errors:", result.logs);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var computeSvelteVendorPaths = () => {
|
|
61
|
-
const paths = {};
|
|
62
|
-
for (const specifier of resolveVendorSpecifiers()) {
|
|
63
|
-
paths[specifier] = `/svelte/vendor/${toSafeFileName(specifier)}.js`;
|
|
64
|
-
}
|
|
65
|
-
return paths;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export { buildSvelteVendor, computeSvelteVendorPaths };
|
|
69
|
-
|
|
70
|
-
//# debugId=B465899347FB214664756E2164756E21
|
|
71
|
-
//# sourceMappingURL=chunk-cdxd7sy2.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/build/buildSvelteVendor.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { mkdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\nimport { build as bunBuild } from 'bun';\n\n/** Bare specifiers that need stable vendor builds for Svelte.\n * Svelte 5 compiled output imports from svelte/internal/client\n * for the client-side runtime. */\nconst svelteSpecifiers = [\n\t'svelte',\n\t'svelte/internal',\n\t'svelte/internal/flags/async',\n\t'svelte/internal/flags/legacy',\n\t'svelte/internal/client',\n\t'svelte/internal/disclose-version',\n\t'svelte/store'\n];\n\nconst isResolvable = (specifier: string) => {\n\ttry {\n\t\trequire.resolve(specifier);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n/** Resolve which Svelte specifiers are actually installed */\nconst resolveVendorSpecifiers = () =>\n\tsvelteSpecifiers.filter(isResolvable);\n\n/** Convert a bare specifier to a safe filename: svelte/internal/client → svelte_internal_client */\nconst toSafeFileName = (specifier: string) =>\n\tspecifier.replace(/\\//g, '_');\n\n/** Build Svelte packages into stable vendor files (no content hash).\n * Output goes to {buildDir}/svelte/vendor/ with predictable names. */\nexport const buildSvelteVendor = async (buildDir: string) => {\n\tconst specifiers = resolveVendorSpecifiers();\n\tif (specifiers.length === 0) return;\n\n\tconst vendorDir = join(buildDir, 'svelte', 'vendor');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_svelte_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\tconst entrypoints = await Promise.all(\n\t\tspecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, `export * from '${specifier}';\\n`);\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\tconst result = await bunBuild({\n\t\tentrypoints,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tsplitting: true,\n\t\ttarget: 'browser',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn('⚠️ Svelte vendor build had errors:', result.logs);\n\t}\n};\n\n/** Compute the deterministic vendor paths mapping (no build needed).\n * This can be called before vendor files exist on disk. */\nexport const computeSvelteVendorPaths = () => {\n\tconst paths: Record<string, string> = {};\n\tfor (const specifier of resolveVendorSpecifiers()) {\n\t\tpaths[specifier] = `/svelte/vendor/${toSafeFileName(specifier)}.js`;\n\t}\n\n\treturn paths;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;AAAA;AACA;AACA;AACA;AAKA,IAAM,mBAAmB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,IAAM,eAAe,CAAC,cAAsB;AAAA,EAC3C,IAAI;AAAA,IACH,kBAAgB,SAAS;AAAA,IAEzB,OAAO;AAAA,IACN,MAAM;AAAA,IACP,OAAO;AAAA;AAAA;AAKT,IAAM,0BAA0B,MAC/B,iBAAiB,OAAO,YAAY;AAGrC,IAAM,iBAAiB,CAAC,cACvB,UAAU,QAAQ,OAAO,GAAG;AAItB,IAAM,oBAAoB,OAAO,aAAqB;AAAA,EAC5D,MAAM,aAAa,wBAAwB;AAAA,EAC3C,IAAI,WAAW,WAAW;AAAA,IAAG;AAAA,EAE7B,MAAM,YAAY,KAAK,UAAU,UAAU,QAAQ;AAAA,EACnD,UAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AAAA,EAExC,MAAM,SAAS,KAAK,UAAU,oBAAoB;AAAA,EAClD,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;AAAA,EAErC,MAAM,cAAc,MAAM,QAAQ,IACjC,WAAW,IAAI,OAAO,cAAc;AAAA,IACnC,MAAM,WAAW,eAAe,SAAS;AAAA,IACzC,MAAM,YAAY,KAAK,QAAQ,GAAG,aAAa;AAAA,IAC/C,MAAM,IAAI,MAAM,WAAW,kBAAkB;AAAA,CAAe;AAAA,IAE5D,OAAO;AAAA,GACP,CACF;AAAA,EAEA,MAAM,SAAS,MAAM,SAAS;AAAA,IAC7B;AAAA,IACA,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,EACR,CAAC;AAAA,EAED,MAAM,GAAG,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAAA,EAEjD,IAAI,CAAC,OAAO,SAAS;AAAA,IACpB,QAAQ,KAAK,gDAAqC,OAAO,IAAI;AAAA,EAC9D;AAAA;AAKM,IAAM,2BAA2B,MAAM;AAAA,EAC7C,MAAM,QAAgC,CAAC;AAAA,EACvC,WAAW,aAAa,wBAAwB,GAAG;AAAA,IAClD,MAAM,aAAa,kBAAkB,eAAe,SAAS;AAAA,EAC9D;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
-
"debugId": "B465899347FB214664756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-cg95827x.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
normalizePath
|
|
4
|
-
} from "./chunk-hyjs4bqs.js";
|
|
5
|
-
|
|
6
|
-
// src/utils/validateSafePath.ts
|
|
7
|
-
import { resolve, relative } from "path";
|
|
8
|
-
var validateSafePath = (targetPath, baseDirectory) => {
|
|
9
|
-
const absoluteBase = resolve(baseDirectory);
|
|
10
|
-
const absoluteTarget = resolve(baseDirectory, targetPath);
|
|
11
|
-
const relativePath = normalizePath(relative(absoluteBase, absoluteTarget));
|
|
12
|
-
if (relativePath.startsWith("../") || relativePath === "..") {
|
|
13
|
-
throw new Error(`Unsafe path: ${targetPath}`);
|
|
14
|
-
}
|
|
15
|
-
return absoluteTarget;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { validateSafePath };
|
|
19
|
-
|
|
20
|
-
//# debugId=ACF897EC8658AF9664756E2164756E21
|
|
21
|
-
//# sourceMappingURL=chunk-cg95827x.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/utils/validateSafePath.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { resolve, relative } from 'node:path';\nimport { normalizePath } from './normalizePath';\n\nexport const validateSafePath = (targetPath: string, baseDirectory: string) => {\n\tconst absoluteBase = resolve(baseDirectory);\n\tconst absoluteTarget = resolve(baseDirectory, targetPath);\n\t// Normalize relative path for consistent cross-platform traversal check\n\tconst relativePath = normalizePath(relative(absoluteBase, absoluteTarget));\n\n\tif (relativePath.startsWith('../') || relativePath === '..') {\n\t\tthrow new Error(`Unsafe path: ${targetPath}`);\n\t}\n\n\treturn absoluteTarget;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;AAAA;AAGO,IAAM,mBAAmB,CAAC,YAAoB,kBAA0B;AAAA,EAC9E,MAAM,eAAe,QAAQ,aAAa;AAAA,EAC1C,MAAM,iBAAiB,QAAQ,eAAe,UAAU;AAAA,EAExD,MAAM,eAAe,cAAc,SAAS,cAAc,cAAc,CAAC;AAAA,EAEzE,IAAI,aAAa,WAAW,KAAK,KAAK,iBAAiB,MAAM;AAAA,IAC5D,MAAM,IAAI,MAAM,gBAAgB,YAAY;AAAA,EAC7C;AAAA,EAEA,OAAO;AAAA;",
|
|
8
|
-
"debugId": "ACF897EC8658AF9664756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-cm0g4q6w.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
resolveAngularRuntimePath
|
|
4
|
-
} from "./chunk-m97ze5hz.js";
|
|
5
|
-
import"./chunk-bmgqm774.js";
|
|
6
|
-
|
|
7
|
-
// src/angular/angularPatch.ts
|
|
8
|
-
var ensureHead = (doc) => {
|
|
9
|
-
if (!doc || doc.head || !doc.documentElement) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const head = doc.createElement("head");
|
|
13
|
-
doc.documentElement.insertBefore(head, doc.documentElement.firstChild);
|
|
14
|
-
};
|
|
15
|
-
var SSR_LAYOUT_RECT = Object.freeze({
|
|
16
|
-
bottom: 0,
|
|
17
|
-
height: 0,
|
|
18
|
-
left: 0,
|
|
19
|
-
right: 0,
|
|
20
|
-
top: 0,
|
|
21
|
-
width: 0,
|
|
22
|
-
x: 0,
|
|
23
|
-
y: 0,
|
|
24
|
-
toJSON() {
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
var layoutPatchApplied = false;
|
|
29
|
-
var collectPrototypeChain = (instance) => {
|
|
30
|
-
const protos = [];
|
|
31
|
-
let current = instance ? Object.getPrototypeOf(instance) : null;
|
|
32
|
-
while (current && current !== Object.prototype) {
|
|
33
|
-
protos.push(current);
|
|
34
|
-
current = Object.getPrototypeOf(current);
|
|
35
|
-
}
|
|
36
|
-
return protos;
|
|
37
|
-
};
|
|
38
|
-
var patchElementLayout = (doc) => {
|
|
39
|
-
if (layoutPatchApplied || !doc) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
let element;
|
|
43
|
-
try {
|
|
44
|
-
element = doc.createElement("div");
|
|
45
|
-
} catch {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const protos = collectPrototypeChain(element);
|
|
49
|
-
if (protos.length === 0)
|
|
50
|
-
return;
|
|
51
|
-
const copyLayoutRect = (rect) => ({ ...rect });
|
|
52
|
-
const createLayoutRect = () => copyLayoutRect(SSR_LAYOUT_RECT);
|
|
53
|
-
const getClientRects = () => [];
|
|
54
|
-
const noop = () => {
|
|
55
|
-
return;
|
|
56
|
-
};
|
|
57
|
-
const numericProps = [
|
|
58
|
-
"clientWidth",
|
|
59
|
-
"clientHeight",
|
|
60
|
-
"clientLeft",
|
|
61
|
-
"clientTop",
|
|
62
|
-
"offsetWidth",
|
|
63
|
-
"offsetHeight",
|
|
64
|
-
"offsetLeft",
|
|
65
|
-
"offsetTop",
|
|
66
|
-
"scrollWidth",
|
|
67
|
-
"scrollHeight",
|
|
68
|
-
"scrollLeft",
|
|
69
|
-
"scrollTop"
|
|
70
|
-
];
|
|
71
|
-
for (const proto of protos) {
|
|
72
|
-
const define = (name, value) => {
|
|
73
|
-
const descriptor = Object.getOwnPropertyDescriptor(proto, name);
|
|
74
|
-
if (typeof descriptor?.value === "function")
|
|
75
|
-
return;
|
|
76
|
-
Object.defineProperty(proto, name, {
|
|
77
|
-
configurable: true,
|
|
78
|
-
value,
|
|
79
|
-
writable: true
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
define("getBoundingClientRect", createLayoutRect);
|
|
83
|
-
define("getClientRects", getClientRects);
|
|
84
|
-
define("scrollTo", noop);
|
|
85
|
-
define("scrollBy", noop);
|
|
86
|
-
define("scrollIntoView", noop);
|
|
87
|
-
define("focus", noop);
|
|
88
|
-
define("blur", noop);
|
|
89
|
-
for (const prop of numericProps) {
|
|
90
|
-
const desc = Object.getOwnPropertyDescriptor(proto, prop);
|
|
91
|
-
if (desc)
|
|
92
|
-
continue;
|
|
93
|
-
Object.defineProperty(proto, prop, {
|
|
94
|
-
configurable: true,
|
|
95
|
-
get: () => 0
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
layoutPatchApplied = true;
|
|
100
|
-
};
|
|
101
|
-
var applyPatches = async () => {
|
|
102
|
-
const { \u{275}DominoAdapter } = await import(resolveAngularRuntimePath("@angular/platform-server"));
|
|
103
|
-
if (!\u{275}DominoAdapter?.prototype) {
|
|
104
|
-
console.warn("[Angular Patch] \u0275DominoAdapter not found, skipping patches");
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
try {
|
|
108
|
-
const adapter = new \u{275}DominoAdapter;
|
|
109
|
-
const seedDoc = typeof adapter.createHtmlDocument === "function" ? adapter.createHtmlDocument() : typeof adapter.getDefaultDocument === "function" ? adapter.getDefaultDocument() : null;
|
|
110
|
-
if (seedDoc) {
|
|
111
|
-
patchElementLayout(seedDoc);
|
|
112
|
-
const probe = seedDoc.createElement("div");
|
|
113
|
-
if (typeof probe.getBoundingClientRect !== "function") {
|
|
114
|
-
console.warn("[Angular Patch] Layout shim did not stick on probe element prototype chain");
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
} catch (error) {
|
|
118
|
-
console.warn("[Angular Patch] Could not eagerly patch Element prototypes:", error);
|
|
119
|
-
}
|
|
120
|
-
const proto = \u{275}DominoAdapter.prototype;
|
|
121
|
-
const origGetBaseHref = proto.getBaseHref;
|
|
122
|
-
proto.getBaseHref = function(doc) {
|
|
123
|
-
if (!doc || !doc.head || typeof doc.head.children === "undefined") {
|
|
124
|
-
return "";
|
|
125
|
-
}
|
|
126
|
-
return origGetBaseHref.call(this, doc);
|
|
127
|
-
};
|
|
128
|
-
const origCreateHtmlDocument = proto.createHtmlDocument;
|
|
129
|
-
proto.createHtmlDocument = function() {
|
|
130
|
-
const doc = origCreateHtmlDocument.call(this);
|
|
131
|
-
ensureHead(doc);
|
|
132
|
-
patchElementLayout(doc);
|
|
133
|
-
return doc;
|
|
134
|
-
};
|
|
135
|
-
const origGetDefaultDocument = proto.getDefaultDocument;
|
|
136
|
-
proto.getDefaultDocument = function() {
|
|
137
|
-
const doc = origGetDefaultDocument.call(this);
|
|
138
|
-
ensureHead(doc);
|
|
139
|
-
patchElementLayout(doc);
|
|
140
|
-
return doc;
|
|
141
|
-
};
|
|
142
|
-
return true;
|
|
143
|
-
};
|
|
144
|
-
export {
|
|
145
|
-
applyPatches
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
//# debugId=D59B1B9EA72E3DAF64756E2164756E21
|
|
149
|
-
//# sourceMappingURL=chunk-cm0g4q6w.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/angularPatch.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { resolveAngularRuntimePath } from './resolveAngularPackage';\n\n// Patches Angular SSR's DominoAdapter to guard against null doc.head\n\nconst ensureHead = (doc: Document) => {\n\tif (!doc || doc.head || !doc.documentElement) {\n\t\treturn;\n\t}\n\n\tconst head = doc.createElement('head');\n\tdoc.documentElement.insertBefore(head, doc.documentElement.firstChild);\n};\n\n// Domino's Element does not implement layout APIs that browser components\n// (e.g. ngx-datatable, swiper, drag-drop) call eagerly during change detection.\n// Returning a zeroed DOMRect lets those components render in SSR without\n// crashing — the real values get computed once the page hydrates client-side.\nconst SSR_LAYOUT_RECT = Object.freeze({\n\tbottom: 0,\n\theight: 0,\n\tleft: 0,\n\tright: 0,\n\ttop: 0,\n\twidth: 0,\n\tx: 0,\n\ty: 0,\n\ttoJSON() {\n\t\treturn this;\n\t}\n});\nlet layoutPatchApplied = false;\nconst collectPrototypeChain = (instance: object | null) => {\n\tconst protos: object[] = [];\n\tlet current: object | null = instance\n\t\t? Object.getPrototypeOf(instance)\n\t\t: null;\n\twhile (current && current !== Object.prototype) {\n\t\tprotos.push(current);\n\t\tcurrent = Object.getPrototypeOf(current);\n\t}\n\n\treturn protos;\n};\n\nconst patchElementLayout = (doc: Document) => {\n\tif (layoutPatchApplied || !doc) {\n\t\treturn;\n\t}\n\tlet element: Element;\n\ttry {\n\t\telement = doc.createElement('div');\n\t} catch {\n\t\treturn;\n\t}\n\t// Walk the entire prototype chain so HTMLElement → Element → Node all get\n\t// the layout shims. Domino's base Element.prototype is several hops above\n\t// HTMLDivElement.prototype, and 3rd-party libs call methods anywhere along\n\t// the chain.\n\tconst protos = collectPrototypeChain(element);\n\tif (protos.length === 0) return;\n\n\tconst copyLayoutRect = (rect: typeof SSR_LAYOUT_RECT) => ({ ...rect });\n\tconst createLayoutRect = () => copyLayoutRect(SSR_LAYOUT_RECT);\n\tconst getClientRects = () => [];\n\tconst noop = () => undefined;\n\tconst numericProps = [\n\t\t'clientWidth',\n\t\t'clientHeight',\n\t\t'clientLeft',\n\t\t'clientTop',\n\t\t'offsetWidth',\n\t\t'offsetHeight',\n\t\t'offsetLeft',\n\t\t'offsetTop',\n\t\t'scrollWidth',\n\t\t'scrollHeight',\n\t\t'scrollLeft',\n\t\t'scrollTop'\n\t];\n\n\tfor (const proto of protos) {\n\t\tconst define = (name: string, value: unknown) => {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(proto, name);\n\t\t\tif (typeof descriptor?.value === 'function') return;\n\n\t\t\tObject.defineProperty(proto, name, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t};\n\n\t\tdefine('getBoundingClientRect', createLayoutRect);\n\t\tdefine('getClientRects', getClientRects);\n\t\tdefine('scrollTo', noop);\n\t\tdefine('scrollBy', noop);\n\t\tdefine('scrollIntoView', noop);\n\t\tdefine('focus', noop);\n\t\tdefine('blur', noop);\n\n\t\tfor (const prop of numericProps) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(proto, prop);\n\t\t\tif (desc) continue;\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tget: () => 0\n\t\t\t});\n\t\t}\n\t}\n\n\tlayoutPatchApplied = true;\n};\n\nexport const applyPatches = async () => {\n\tconst { ɵDominoAdapter } = await import(\n\t\tresolveAngularRuntimePath('@angular/platform-server')\n\t);\n\tif (!ɵDominoAdapter?.prototype) {\n\t\tconsole.warn(\n\t\t\t'[Angular Patch] ɵDominoAdapter not found, skipping patches'\n\t\t);\n\n\t\treturn false;\n\t}\n\n\t// Patch the layout shims onto Domino's Element prototypes immediately\n\t// (don't wait for the first createHtmlDocument call). Components that\n\t// hold an ElementRef from the very first change-detection pass call\n\t// these methods before the lazy patch path would have run.\n\ttry {\n\t\tconst adapter = new ɵDominoAdapter();\n\t\tconst seedDoc =\n\t\t\ttypeof adapter.createHtmlDocument === 'function'\n\t\t\t\t? adapter.createHtmlDocument()\n\t\t\t\t: typeof adapter.getDefaultDocument === 'function'\n\t\t\t\t\t? adapter.getDefaultDocument()\n\t\t\t\t\t: null;\n\t\tif (seedDoc) {\n\t\t\tpatchElementLayout(seedDoc);\n\t\t\tconst probe = seedDoc.createElement('div') as Element & {\n\t\t\t\tgetBoundingClientRect?: () => DOMRect;\n\t\t\t};\n\t\t\tif (typeof probe.getBoundingClientRect !== 'function') {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'[Angular Patch] Layout shim did not stick on probe element prototype chain'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tconsole.warn(\n\t\t\t'[Angular Patch] Could not eagerly patch Element prototypes:',\n\t\t\terror\n\t\t);\n\t}\n\n\tconst proto = ɵDominoAdapter.prototype;\n\n\tconst origGetBaseHref = proto.getBaseHref;\n\tproto.getBaseHref = function (doc: Document) {\n\t\tif (!doc || !doc.head || typeof doc.head.children === 'undefined') {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn origGetBaseHref.call(this, doc);\n\t};\n\n\tconst origCreateHtmlDocument = proto.createHtmlDocument;\n\tproto.createHtmlDocument = function () {\n\t\tconst doc = origCreateHtmlDocument.call(this);\n\t\tensureHead(doc);\n\t\tpatchElementLayout(doc);\n\n\t\treturn doc;\n\t};\n\n\tconst origGetDefaultDocument = proto.getDefaultDocument;\n\tproto.getDefaultDocument = function () {\n\t\tconst doc = origGetDefaultDocument.call(this);\n\t\tensureHead(doc);\n\t\tpatchElementLayout(doc);\n\n\t\treturn doc;\n\t};\n\n\treturn true;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;AAIA,IAAM,aAAa,CAAC,QAAkB;AAAA,EACrC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,iBAAiB;AAAA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,cAAc,KAAK;AAAA,MAGzC,IAAI,OAAO,MAAM,0BAA0B,YAAY;AAAA,QACtD,QAAQ,KACP,4EACD;AAAA,MACD;AAAA,IACD;AAAA,IACC,OAAO,OAAO;AAAA,IACf,QAAQ,KACP,+DACA,KACD;AAAA;AAAA,EAGD,MAAM,QAAQ,qBAAc;AAAA,EAE5B,MAAM,kBAAkB,MAAM;AAAA,EAC9B,MAAM,cAAc,QAAS,CAAC,KAAe;AAAA,IAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,QAAQ,OAAO,IAAI,KAAK,aAAa,aAAa;AAAA,MAClE,OAAO;AAAA,IACR;AAAA,IAEA,OAAO,gBAAgB,KAAK,MAAM,GAAG;AAAA;AAAA,EAGtC,MAAM,yBAAyB,MAAM;AAAA,EACrC,MAAM,qBAAqB,QAAS,GAAG;AAAA,IACtC,MAAM,MAAM,uBAAuB,KAAK,IAAI;AAAA,IAC5C,WAAW,GAAG;AAAA,IACd,mBAAmB,GAAG;AAAA,IAEtB,OAAO;AAAA;AAAA,EAGR,MAAM,yBAAyB,MAAM;AAAA,EACrC,MAAM,qBAAqB,QAAS,GAAG;AAAA,IACtC,MAAM,MAAM,uBAAuB,KAAK,IAAI;AAAA,IAC5C,WAAW,GAAG;AAAA,IACd,mBAAmB,GAAG;AAAA,IAEtB,OAAO;AAAA;AAAA,EAGR,OAAO;AAAA;",
|
|
8
|
-
"debugId": "D59B1B9EA72E3DAF64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-cwfy538a.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
devBuild
|
|
4
|
-
} from "./chunk-38jwhqcw.js";
|
|
5
|
-
import"./chunk-vkrpm7kc.js";
|
|
6
|
-
import"./chunk-cg95827x.js";
|
|
7
|
-
import"./chunk-hcsmxw1v.js";
|
|
8
|
-
import"./chunk-3g91wb4f.js";
|
|
9
|
-
import"./chunk-4d39r92n.js";
|
|
10
|
-
import"./chunk-93sqk7be.js";
|
|
11
|
-
import"./chunk-1rfh7hw9.js";
|
|
12
|
-
import"./chunk-7kjj42xm.js";
|
|
13
|
-
import"./chunk-bxfghpma.js";
|
|
14
|
-
import"./chunk-cdxd7sy2.js";
|
|
15
|
-
import"./chunk-jn91vzkh.js";
|
|
16
|
-
import"./chunk-swrnzs4c.js";
|
|
17
|
-
import"./chunk-b3gbnrwe.js";
|
|
18
|
-
import"./chunk-mtxzyxpg.js";
|
|
19
|
-
import"./chunk-hyjs4bqs.js";
|
|
20
|
-
import"./chunk-y84qnsd3.js";
|
|
21
|
-
import"./chunk-85n68sy6.js";
|
|
22
|
-
import"./chunk-ff70rnhd.js";
|
|
23
|
-
import"./chunk-d7mwkzry.js";
|
|
24
|
-
import"./chunk-h5bbfn3n.js";
|
|
25
|
-
import"./chunk-11zpfqz6.js";
|
|
26
|
-
import"./chunk-a9mvyp04.js";
|
|
27
|
-
import"./chunk-kk8w9rh5.js";
|
|
28
|
-
import"./chunk-d9c0am65.js";
|
|
29
|
-
import"./chunk-cbkrwmvh.js";
|
|
30
|
-
import"./chunk-5003emhv.js";
|
|
31
|
-
import"./chunk-sd39p726.js";
|
|
32
|
-
import"./chunk-gf0ygptk.js";
|
|
33
|
-
import"./chunk-851whwc7.js";
|
|
34
|
-
import"./chunk-p5504p14.js";
|
|
35
|
-
import"./chunk-s6defjk2.js";
|
|
36
|
-
import"./chunk-d8w0qm28.js";
|
|
37
|
-
import"./chunk-9ve9jq72.js";
|
|
38
|
-
import"./chunk-7fw6x3js.js";
|
|
39
|
-
import"./chunk-mbazhahf.js";
|
|
40
|
-
import"./chunk-xnt8c6h2.js";
|
|
41
|
-
import"./chunk-qh75agse.js";
|
|
42
|
-
import"./chunk-2f21eenc.js";
|
|
43
|
-
import"./chunk-8kcfffry.js";
|
|
44
|
-
import"./chunk-3yjzpcne.js";
|
|
45
|
-
import"./chunk-bmgqm774.js";
|
|
46
|
-
export {
|
|
47
|
-
devBuild
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
//# debugId=168CA101CFD7E28A64756E2164756E21
|
|
51
|
-
//# sourceMappingURL=chunk-cwfy538a.js.map
|