@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-wrxtn9ve.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
readIslandStore,
|
|
4
|
-
subscribeIslandStore
|
|
5
|
-
} from "./chunk-fygx2ymm.js";
|
|
6
|
-
|
|
7
|
-
// src/svelte/islandStore.ts
|
|
8
|
-
var useIslandStore = (store, selector) => ({
|
|
9
|
-
subscribe(listener) {
|
|
10
|
-
listener(readIslandStore(store, selector));
|
|
11
|
-
return subscribeIslandStore(store, selector, listener);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { useIslandStore };
|
|
16
|
-
|
|
17
|
-
//# debugId=1ADDDA0C6B41FE1E64756E2164756E21
|
|
18
|
-
//# sourceMappingURL=chunk-wrxtn9ve.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/svelte/islandStore.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StoreApi } from 'zustand/vanilla';\nimport {\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => ({\n\tsubscribe(listener: (value: TSelected) => void) {\n\t\tlistener(readIslandStore(store, selector));\n\n\t\treturn subscribeIslandStore(store, selector, listener);\n\t}\n});\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;AAOO,IAAM,iBAAiB,CAC7B,OACA,cACK;AAAA,EACL,SAAS,CAAC,UAAsC;AAAA,IAC/C,SAAS,gBAAgB,OAAO,QAAQ,CAAC;AAAA,IAEzC,OAAO,qBAAqB,OAAO,UAAU,QAAQ;AAAA;AAEvD;",
|
|
8
|
-
"debugId": "1ADDDA0C6B41FE1E64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-wwzvp0zn.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
getAngularDeps,
|
|
4
|
-
withSuppressedAngularDevLogs
|
|
5
|
-
} from "./chunk-jpkjdgsk.js";
|
|
6
|
-
import"./chunk-m97ze5hz.js";
|
|
7
|
-
import {
|
|
8
|
-
getSsrContextId
|
|
9
|
-
} from "./chunk-pnscgw95.js";
|
|
10
|
-
import"./chunk-p5504p14.js";
|
|
11
|
-
import"./chunk-25v9t56f.js";
|
|
12
|
-
import {
|
|
13
|
-
__require
|
|
14
|
-
} from "./chunk-bmgqm774.js";
|
|
15
|
-
|
|
16
|
-
// src/angular/islands.ts
|
|
17
|
-
var angularIslandSelector = "abs-angular-island";
|
|
18
|
-
var isAngularComponent = (value) => typeof value === "function";
|
|
19
|
-
var getAngularIslandSelector = (_islandId) => angularIslandSelector;
|
|
20
|
-
var getSelectorFromRenderedIsland = (rootElement) => {
|
|
21
|
-
const firstChild = rootElement.firstElementChild;
|
|
22
|
-
if (!(firstChild instanceof HTMLElement)) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
const selector = firstChild.tagName.toLowerCase();
|
|
26
|
-
return selector.length > 0 ? selector : null;
|
|
27
|
-
};
|
|
28
|
-
var getClientAngularComponentSelector = (component) => {
|
|
29
|
-
const maybeDef = Reflect.get(component, "\u0275cmp");
|
|
30
|
-
if (typeof maybeDef !== "object" || maybeDef === null) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const maybeSelectors = Reflect.get(maybeDef, "selectors");
|
|
34
|
-
if (!Array.isArray(maybeSelectors)) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
const [firstSelectorGroup] = maybeSelectors;
|
|
38
|
-
if (!Array.isArray(firstSelectorGroup)) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const [selector] = firstSelectorGroup;
|
|
42
|
-
return typeof selector === "string" && selector.length > 0 ? selector : null;
|
|
43
|
-
};
|
|
44
|
-
var createAngularIslandApp = async () => {
|
|
45
|
-
const { EnvironmentInjector, provideZonelessChangeDetection } = await import("@angular/core");
|
|
46
|
-
const { createApplication } = await import("@angular/platform-browser");
|
|
47
|
-
const app = await createApplication({
|
|
48
|
-
providers: [provideZonelessChangeDetection()]
|
|
49
|
-
});
|
|
50
|
-
const environmentInjector = app.injector.get(EnvironmentInjector);
|
|
51
|
-
return { app, environmentInjector };
|
|
52
|
-
};
|
|
53
|
-
var angularIslandAppPromise = null;
|
|
54
|
-
var getAngularIslandApp = async () => {
|
|
55
|
-
if (!angularIslandAppPromise) {
|
|
56
|
-
angularIslandAppPromise = createAngularIslandApp();
|
|
57
|
-
}
|
|
58
|
-
return angularIslandAppPromise;
|
|
59
|
-
};
|
|
60
|
-
var wrapperMetadataCache = new Map;
|
|
61
|
-
var requestRenderCache = new Map;
|
|
62
|
-
var getRequestRenderCache = () => {
|
|
63
|
-
const requestId = getSsrContextId();
|
|
64
|
-
if (!requestId) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const cached = requestRenderCache.get(requestId);
|
|
68
|
-
if (cached) {
|
|
69
|
-
return cached;
|
|
70
|
-
}
|
|
71
|
-
const renderCache = new Map;
|
|
72
|
-
requestRenderCache.set(requestId, renderCache);
|
|
73
|
-
return renderCache;
|
|
74
|
-
};
|
|
75
|
-
var getAngularIslandWrapperKey = (component, _islandId) => {
|
|
76
|
-
const componentName = typeof component.name === "string" && component.name.length > 0 ? component.name : "AngularIsland";
|
|
77
|
-
return `${componentName}:${angularIslandSelector}`;
|
|
78
|
-
};
|
|
79
|
-
var getIslandRenderCacheKey = (component, props) => {
|
|
80
|
-
const componentName = typeof component.name === "string" && component.name.length > 0 ? component.name : "AngularIsland";
|
|
81
|
-
return `${componentName}:${JSON.stringify(props)}`;
|
|
82
|
-
};
|
|
83
|
-
var buildAngularIslandWrapperMetadata = async (component, islandId, wrapperKey) => {
|
|
84
|
-
const { Component, InjectionToken, inject } = await import("@angular/core");
|
|
85
|
-
const { NgComponentOutlet } = await import("@angular/common");
|
|
86
|
-
const deps = await getAngularDeps();
|
|
87
|
-
const selector = getAngularIslandSelector(islandId);
|
|
88
|
-
const propsToken = new InjectionToken(`${wrapperKey}:props`);
|
|
89
|
-
|
|
90
|
-
class AngularIslandWrapperComponent {
|
|
91
|
-
component = component;
|
|
92
|
-
props = inject(propsToken);
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
deps,
|
|
96
|
-
propsToken,
|
|
97
|
-
selector,
|
|
98
|
-
WrapperComponent: Component({
|
|
99
|
-
imports: [NgComponentOutlet, component],
|
|
100
|
-
selector,
|
|
101
|
-
standalone: true,
|
|
102
|
-
template: '<ng-container *ngComponentOutlet="component; inputs: props"></ng-container>'
|
|
103
|
-
})(AngularIslandWrapperComponent)
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
var createAngularIslandWrapper = async (component, islandId) => {
|
|
107
|
-
const wrapperKey = getAngularIslandWrapperKey(component, islandId);
|
|
108
|
-
const cached = wrapperMetadataCache.get(wrapperKey);
|
|
109
|
-
if (cached) {
|
|
110
|
-
return cached;
|
|
111
|
-
}
|
|
112
|
-
const metadataPromise = buildAngularIslandWrapperMetadata(component, islandId, wrapperKey);
|
|
113
|
-
wrapperMetadataCache.set(wrapperKey, metadataPromise);
|
|
114
|
-
return metadataPromise;
|
|
115
|
-
};
|
|
116
|
-
var extractAngularIslandRoot = (html, selector) => {
|
|
117
|
-
const openTag = `<${selector}`;
|
|
118
|
-
const start = html.indexOf(openTag);
|
|
119
|
-
if (start < 0) {
|
|
120
|
-
throw new Error(`Could not find Angular island root "${selector}".`);
|
|
121
|
-
}
|
|
122
|
-
const endTag = `</${selector}>`;
|
|
123
|
-
const end = html.indexOf(endTag, start);
|
|
124
|
-
if (end < 0) {
|
|
125
|
-
throw new Error(`Could not close Angular island root "${selector}".`);
|
|
126
|
-
}
|
|
127
|
-
return html.slice(start, end + endTag.length);
|
|
128
|
-
};
|
|
129
|
-
var mountAngularIsland = async (component, element, props, islandId) => {
|
|
130
|
-
await import("@angular/compiler");
|
|
131
|
-
const { createComponent, inputBinding } = await import("@angular/core");
|
|
132
|
-
const selector = getAngularIslandSelector(islandId);
|
|
133
|
-
const { app, environmentInjector } = await getAngularIslandApp();
|
|
134
|
-
let rootElement = element.querySelector(selector);
|
|
135
|
-
if (!(rootElement instanceof HTMLElement)) {
|
|
136
|
-
element.innerHTML = `<${selector}></${selector}>`;
|
|
137
|
-
rootElement = element.querySelector(selector);
|
|
138
|
-
}
|
|
139
|
-
if (!(rootElement instanceof HTMLElement))
|
|
140
|
-
return app;
|
|
141
|
-
const componentSelector = getClientAngularComponentSelector(component) ?? getSelectorFromRenderedIsland(rootElement);
|
|
142
|
-
if (!componentSelector)
|
|
143
|
-
return app;
|
|
144
|
-
rootElement.innerHTML = `<${componentSelector}></${componentSelector}>`;
|
|
145
|
-
const hostElement = rootElement.querySelector(componentSelector);
|
|
146
|
-
if (!(hostElement instanceof HTMLElement))
|
|
147
|
-
return app;
|
|
148
|
-
const bindings = Object.entries(props).map(([key, value]) => inputBinding(key, () => value));
|
|
149
|
-
const componentRef = createComponent(component, {
|
|
150
|
-
bindings,
|
|
151
|
-
environmentInjector,
|
|
152
|
-
hostElement
|
|
153
|
-
});
|
|
154
|
-
app.attachView(componentRef.hostView);
|
|
155
|
-
componentRef.changeDetectorRef.detectChanges();
|
|
156
|
-
window.__ABS_ANGULAR_ISLAND_APPS__ ??= [];
|
|
157
|
-
window.__ABS_ANGULAR_ISLAND_APPS__.push(app);
|
|
158
|
-
return app;
|
|
159
|
-
};
|
|
160
|
-
var renderAngularIslandToHtml = async (component, props, islandId) => {
|
|
161
|
-
const requestCache = getRequestRenderCache();
|
|
162
|
-
const renderCacheKey = getIslandRenderCacheKey(component, props);
|
|
163
|
-
const cachedHtml = requestCache?.get(renderCacheKey);
|
|
164
|
-
if (cachedHtml) {
|
|
165
|
-
return cachedHtml;
|
|
166
|
-
}
|
|
167
|
-
const { deps, propsToken, selector, WrapperComponent } = await createAngularIslandWrapper(component, islandId);
|
|
168
|
-
const providers = [
|
|
169
|
-
deps.provideServerRendering(),
|
|
170
|
-
deps.provideZonelessChangeDetection(),
|
|
171
|
-
{ provide: deps.APP_BASE_HREF, useValue: "/" },
|
|
172
|
-
{ provide: propsToken, useValue: props }
|
|
173
|
-
];
|
|
174
|
-
const document = `<!DOCTYPE html><html><body><${selector}></${selector}></body></html>`;
|
|
175
|
-
const html = await withSuppressedAngularDevLogs(() => deps.renderApplication((context) => deps.bootstrapApplication(WrapperComponent, { providers }, context), {
|
|
176
|
-
document,
|
|
177
|
-
platformProviders: [],
|
|
178
|
-
url: "/"
|
|
179
|
-
}));
|
|
180
|
-
const islandHtml = extractAngularIslandRoot(html, selector);
|
|
181
|
-
requestCache?.set(renderCacheKey, islandHtml);
|
|
182
|
-
return islandHtml;
|
|
183
|
-
};
|
|
184
|
-
export {
|
|
185
|
-
renderAngularIslandToHtml,
|
|
186
|
-
mountAngularIsland,
|
|
187
|
-
isAngularComponent,
|
|
188
|
-
getAngularIslandSelector
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
//# debugId=093967A67CC7B0D764756E2164756E21
|
|
192
|
-
//# sourceMappingURL=chunk-wwzvp0zn.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/angular/islands.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { getAngularDeps } from './angularDeps';\nimport { withSuppressedAngularDevLogs } from './ssrRender';\nimport { getSsrContextId } from '../utils/registerClientScript';\n\nconst angularIslandSelector = 'abs-angular-island';\n\nexport const isAngularComponent = (\n\tvalue: unknown\n): value is import('@angular/core').Type<object> => typeof value === 'function';\n\nexport const getAngularIslandSelector = (_islandId: string) =>\n\tangularIslandSelector;\n\nconst getSelectorFromRenderedIsland = (rootElement: HTMLElement) => {\n\tconst firstChild = rootElement.firstElementChild;\n\tif (!(firstChild instanceof HTMLElement)) {\n\t\treturn null;\n\t}\n\n\tconst selector = firstChild.tagName.toLowerCase();\n\n\treturn selector.length > 0 ? selector : null;\n};\n\nconst getClientAngularComponentSelector = (\n\tcomponent: import('@angular/core').Type<object>\n) => {\n\tconst maybeDef = Reflect.get(component, 'ɵcmp');\n\tif (typeof maybeDef !== 'object' || maybeDef === null) {\n\t\treturn null;\n\t}\n\n\tconst maybeSelectors = Reflect.get(maybeDef, 'selectors');\n\tif (!Array.isArray(maybeSelectors)) {\n\t\treturn null;\n\t}\n\n\tconst [firstSelectorGroup] = maybeSelectors;\n\tif (!Array.isArray(firstSelectorGroup)) {\n\t\treturn null;\n\t}\n\n\tconst [selector] = firstSelectorGroup;\n\n\treturn typeof selector === 'string' && selector.length > 0\n\t\t? selector\n\t\t: null;\n};\n\nconst createAngularIslandApp = async () => {\n\tconst { EnvironmentInjector, provideZonelessChangeDetection } =\n\t\tawait import('@angular/core');\n\tconst { createApplication } = await import('@angular/platform-browser');\n\tconst app = await createApplication({\n\t\tproviders: [provideZonelessChangeDetection()]\n\t});\n\tconst environmentInjector = app.injector.get(EnvironmentInjector);\n\n\treturn { app, environmentInjector };\n};\n\nlet angularIslandAppPromise: Promise<{\n\tapp: import('@angular/core').ApplicationRef;\n\tenvironmentInjector: import('@angular/core').EnvironmentInjector;\n}> | null = null;\n\nconst getAngularIslandApp = async () => {\n\tif (!angularIslandAppPromise) {\n\t\tangularIslandAppPromise = createAngularIslandApp();\n\t}\n\n\treturn angularIslandAppPromise;\n};\n\ntype AngularIslandWrapperMetadata = {\n\tdeps: Awaited<ReturnType<typeof getAngularDeps>>;\n\tpropsToken: import('@angular/core').InjectionToken<Record<string, unknown>>;\n\tselector: string;\n\tWrapperComponent: import('@angular/core').Type<object>;\n};\n\nconst wrapperMetadataCache = new Map<\n\tstring,\n\tPromise<AngularIslandWrapperMetadata>\n>();\nconst requestRenderCache = new Map<string, Map<string, string>>();\n\nconst getRequestRenderCache = () => {\n\tconst requestId = getSsrContextId();\n\tif (!requestId) {\n\t\treturn null;\n\t}\n\n\tconst cached = requestRenderCache.get(requestId);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst renderCache = new Map<string, string>();\n\trequestRenderCache.set(requestId, renderCache);\n\n\treturn renderCache;\n};\n\nconst getAngularIslandWrapperKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\t_islandId: string\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${angularIslandSelector}`;\n};\n\nconst getIslandRenderCacheKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Record<string, unknown>\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${JSON.stringify(props)}`;\n};\n\nconst buildAngularIslandWrapperMetadata = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string,\n\twrapperKey: string\n) => {\n\tconst { Component, InjectionToken, inject } = await import('@angular/core');\n\tconst { NgComponentOutlet } = await import('@angular/common');\n\tconst deps = await getAngularDeps();\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst propsToken = new InjectionToken<Record<string, unknown>>(\n\t\t`${wrapperKey}:props`\n\t);\n\n\tclass AngularIslandWrapperComponent {\n\t\tcomponent = component;\n\t\tprops = inject(propsToken);\n\t}\n\n\treturn {\n\t\tdeps,\n\t\tpropsToken,\n\t\tselector,\n\t\tWrapperComponent: Component({\n\t\t\timports: [NgComponentOutlet, component],\n\t\t\tselector,\n\t\t\tstandalone: true,\n\t\t\ttemplate:\n\t\t\t\t'<ng-container *ngComponentOutlet=\"component; inputs: props\"></ng-container>'\n\t\t})(AngularIslandWrapperComponent)\n\t};\n};\n\nconst createAngularIslandWrapper = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string\n) => {\n\tconst wrapperKey = getAngularIslandWrapperKey(component, islandId);\n\tconst cached = wrapperMetadataCache.get(wrapperKey);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst metadataPromise = buildAngularIslandWrapperMetadata(\n\t\tcomponent,\n\t\tislandId,\n\t\twrapperKey\n\t);\n\n\twrapperMetadataCache.set(wrapperKey, metadataPromise);\n\n\treturn metadataPromise;\n};\n\nconst extractAngularIslandRoot = (html: string, selector: string) => {\n\tconst openTag = `<${selector}`;\n\tconst start = html.indexOf(openTag);\n\tif (start < 0) {\n\t\tthrow new Error(`Could not find Angular island root \"${selector}\".`);\n\t}\n\n\tconst endTag = `</${selector}>`;\n\tconst end = html.indexOf(endTag, start);\n\tif (end < 0) {\n\t\tthrow new Error(`Could not close Angular island root \"${selector}\".`);\n\t}\n\n\treturn html.slice(start, end + endTag.length);\n};\n\nexport const mountAngularIsland = async <Props extends Record<string, unknown>>(\n\tcomponent: import('@angular/core').Type<object>,\n\telement: HTMLElement,\n\tprops: Props,\n\tislandId: string\n) => {\n\tawait import('@angular/compiler');\n\tconst { createComponent, inputBinding } = await import('@angular/core');\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst { app, environmentInjector } = await getAngularIslandApp();\n\n\tlet rootElement = element.querySelector(selector);\n\tif (!(rootElement instanceof HTMLElement)) {\n\t\telement.innerHTML = `<${selector}></${selector}>`;\n\t\trootElement = element.querySelector(selector);\n\t}\n\tif (!(rootElement instanceof HTMLElement)) return app;\n\n\tconst componentSelector =\n\t\tgetClientAngularComponentSelector(component) ??\n\t\tgetSelectorFromRenderedIsland(rootElement);\n\tif (!componentSelector) return app;\n\n\trootElement.innerHTML = `<${componentSelector}></${componentSelector}>`;\n\tconst hostElement = rootElement.querySelector(componentSelector);\n\tif (!(hostElement instanceof HTMLElement)) return app;\n\n\tconst bindings = Object.entries(props).map(([key, value]) =>\n\t\tinputBinding(key, () => value)\n\t);\n\tconst componentRef = createComponent(component, {\n\t\tbindings,\n\t\tenvironmentInjector,\n\t\thostElement\n\t});\n\tapp.attachView(componentRef.hostView);\n\tcomponentRef.changeDetectorRef.detectChanges();\n\twindow.__ABS_ANGULAR_ISLAND_APPS__ ??= [];\n\twindow.__ABS_ANGULAR_ISLAND_APPS__.push(app);\n\n\treturn app;\n};\nexport const renderAngularIslandToHtml = async <\n\tProps extends Record<string, unknown>\n>(\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Props,\n\tislandId: string\n) => {\n\tconst requestCache = getRequestRenderCache();\n\tconst renderCacheKey = getIslandRenderCacheKey(component, props);\n\tconst cachedHtml = requestCache?.get(renderCacheKey);\n\tif (cachedHtml) {\n\t\treturn cachedHtml;\n\t}\n\n\tconst { deps, propsToken, selector, WrapperComponent } =\n\t\tawait createAngularIslandWrapper(component, islandId);\n\n\tconst providers: (\n\t\t| import('@angular/core').Provider\n\t\t| import('@angular/core').EnvironmentProviders\n\t)[] = [\n\t\tdeps.provideServerRendering(),\n\t\tdeps.provideZonelessChangeDetection(),\n\t\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t\t{ provide: propsToken, useValue: props }\n\t];\n\tconst document = `<!DOCTYPE html><html><body><${selector}></${selector}></body></html>`;\n\tconst html = await withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(\n\t\t\t(context) =>\n\t\t\t\tdeps.bootstrapApplication(\n\t\t\t\t\tWrapperComponent,\n\t\t\t\t\t{ providers },\n\t\t\t\t\tcontext\n\t\t\t\t),\n\t\t\t{\n\t\t\t\tdocument,\n\t\t\t\tplatformProviders: [],\n\t\t\t\turl: '/'\n\t\t\t}\n\t\t)\n\t);\n\tconst islandHtml = extractAngularIslandRoot(html, selector);\n\trequestCache?.set(renderCacheKey, islandHtml);\n\n\treturn islandHtml;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "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",
|
|
8
|
-
"debugId": "093967A67CC7B0D764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-x09cskqd.js
DELETED
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
SVELTE_PAGE_ROOT_ID
|
|
4
|
-
} from "./chunk-102fp7xe.js";
|
|
5
|
-
import {
|
|
6
|
-
buildIslandMetadataExports
|
|
7
|
-
} from "./chunk-a9mvyp04.js";
|
|
8
|
-
import"./chunk-851whwc7.js";
|
|
9
|
-
import {
|
|
10
|
-
lowerSvelteAwaitSlotSyntax,
|
|
11
|
-
lowerSvelteIslandSyntax
|
|
12
|
-
} from "./chunk-7fw6x3js.js";
|
|
13
|
-
import {
|
|
14
|
-
resolvePackageImport
|
|
15
|
-
} from "./chunk-mbazhahf.js";
|
|
16
|
-
import {
|
|
17
|
-
createSvelteStylePreprocessor
|
|
18
|
-
} from "./chunk-xnt8c6h2.js";
|
|
19
|
-
import {
|
|
20
|
-
BASE_36_RADIX
|
|
21
|
-
} from "./chunk-qh75agse.js";
|
|
22
|
-
import {
|
|
23
|
-
__require
|
|
24
|
-
} from "./chunk-bmgqm774.js";
|
|
25
|
-
|
|
26
|
-
// src/build/compileSvelte.ts
|
|
27
|
-
import { existsSync } from "fs";
|
|
28
|
-
import { mkdir, stat } from "fs/promises";
|
|
29
|
-
import {
|
|
30
|
-
dirname,
|
|
31
|
-
join,
|
|
32
|
-
basename,
|
|
33
|
-
extname,
|
|
34
|
-
resolve,
|
|
35
|
-
relative,
|
|
36
|
-
sep
|
|
37
|
-
} from "path";
|
|
38
|
-
import { env } from "process";
|
|
39
|
-
var {write, file, Transpiler } = globalThis.Bun;
|
|
40
|
-
var resolveDevClientDir = () => {
|
|
41
|
-
const projectRoot = process.cwd();
|
|
42
|
-
const fromSource = resolve(import.meta.dir, "../dev/client");
|
|
43
|
-
if (existsSync(fromSource) && fromSource.startsWith(projectRoot)) {
|
|
44
|
-
return fromSource;
|
|
45
|
-
}
|
|
46
|
-
const fromNodeModules = resolve(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
|
|
47
|
-
if (existsSync(fromNodeModules))
|
|
48
|
-
return fromNodeModules;
|
|
49
|
-
return resolve(import.meta.dir, "./dev/client");
|
|
50
|
-
};
|
|
51
|
-
var devClientDir = resolveDevClientDir();
|
|
52
|
-
var hmrClientPath = join(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
|
|
53
|
-
var persistentCache = new Map;
|
|
54
|
-
var sourceHashCache = new Map;
|
|
55
|
-
var clearSvelteCompilerCache = () => {
|
|
56
|
-
persistentCache.clear();
|
|
57
|
-
sourceHashCache.clear();
|
|
58
|
-
};
|
|
59
|
-
var transpiler = new Transpiler({ loader: "ts", target: "browser" });
|
|
60
|
-
var removeUnusedRequireHelper = (code) => {
|
|
61
|
-
const helperStart = code.indexOf("var __require = /* @__PURE__ */");
|
|
62
|
-
if (helperStart === -1) {
|
|
63
|
-
return code;
|
|
64
|
-
}
|
|
65
|
-
const helperEndMarker = `throw Error('Dynamic require of "' + x + '" is not supported');`;
|
|
66
|
-
const helperEnd = code.indexOf(helperEndMarker, helperStart);
|
|
67
|
-
if (helperEnd === -1) {
|
|
68
|
-
return code;
|
|
69
|
-
}
|
|
70
|
-
const statementEnd = code.indexOf("});", helperEnd);
|
|
71
|
-
if (statementEnd === -1) {
|
|
72
|
-
return code;
|
|
73
|
-
}
|
|
74
|
-
const stripped = `${code.slice(0, helperStart)}${code.slice(statementEnd + 3)}`;
|
|
75
|
-
return /\b__require\b/.test(stripped) ? code : stripped;
|
|
76
|
-
};
|
|
77
|
-
var exists = async (path) => {
|
|
78
|
-
try {
|
|
79
|
-
await stat(path);
|
|
80
|
-
return true;
|
|
81
|
-
} catch {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
var resolveRelativeModule = async (spec, from) => {
|
|
86
|
-
if (!spec.startsWith("."))
|
|
87
|
-
return null;
|
|
88
|
-
const basePath = resolve(dirname(from), spec);
|
|
89
|
-
const candidates = [
|
|
90
|
-
basePath,
|
|
91
|
-
`${basePath}.ts`,
|
|
92
|
-
`${basePath}.js`,
|
|
93
|
-
`${basePath}.mjs`,
|
|
94
|
-
`${basePath}.cjs`,
|
|
95
|
-
`${basePath}.json`,
|
|
96
|
-
`${basePath}.svelte`,
|
|
97
|
-
`${basePath}.svelte.ts`,
|
|
98
|
-
`${basePath}.svelte.js`,
|
|
99
|
-
join(basePath, "index.ts"),
|
|
100
|
-
join(basePath, "index.js"),
|
|
101
|
-
join(basePath, "index.mjs"),
|
|
102
|
-
join(basePath, "index.cjs"),
|
|
103
|
-
join(basePath, "index.json"),
|
|
104
|
-
join(basePath, "index.svelte"),
|
|
105
|
-
join(basePath, "index.svelte.ts"),
|
|
106
|
-
join(basePath, "index.svelte.js")
|
|
107
|
-
];
|
|
108
|
-
const checks = await Promise.all(candidates.map(exists));
|
|
109
|
-
return candidates.find((_, index) => checks[index]) ?? null;
|
|
110
|
-
};
|
|
111
|
-
var resolveSvelte = async (spec, from) => {
|
|
112
|
-
if (!spec.startsWith(".") && !spec.startsWith("/")) {
|
|
113
|
-
const resolved = resolvePackageImport(spec);
|
|
114
|
-
return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
|
|
115
|
-
}
|
|
116
|
-
const basePath = resolve(dirname(from), spec);
|
|
117
|
-
const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
|
|
118
|
-
if (!explicit) {
|
|
119
|
-
const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
|
|
120
|
-
const paths = extensions.map((ext) => `${basePath}${ext}`);
|
|
121
|
-
const checks = await Promise.all(paths.map(exists));
|
|
122
|
-
const match = paths.find((_, index) => checks[index]);
|
|
123
|
-
return match ?? null;
|
|
124
|
-
}
|
|
125
|
-
if (await exists(basePath))
|
|
126
|
-
return basePath;
|
|
127
|
-
if (!basePath.endsWith(".svelte"))
|
|
128
|
-
return null;
|
|
129
|
-
const tsPath = `${basePath}.ts`;
|
|
130
|
-
if (await exists(tsPath))
|
|
131
|
-
return tsPath;
|
|
132
|
-
const jsPath = `${basePath}.js`;
|
|
133
|
-
if (await exists(jsPath))
|
|
134
|
-
return jsPath;
|
|
135
|
-
return null;
|
|
136
|
-
};
|
|
137
|
-
var addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
|
|
138
|
-
const toServer = relative(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
|
|
139
|
-
const toClient = relative(clientOutputDir, resolvedModule).replace(/\\/g, "/");
|
|
140
|
-
rewrites.set(rawSpec, {
|
|
141
|
-
client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
|
|
142
|
-
server: toServer.startsWith(".") ? toServer : `./${toServer}`
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
var compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors) => {
|
|
146
|
-
const { compile, compileModule, preprocess } = await import("svelte/compiler");
|
|
147
|
-
const generatedDir = join(svelteRoot, "generated");
|
|
148
|
-
const clientDir = join(generatedDir, "client");
|
|
149
|
-
const indexDir = join(generatedDir, "indexes");
|
|
150
|
-
const serverDir = join(generatedDir, "server");
|
|
151
|
-
await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir(dir, { recursive: true })));
|
|
152
|
-
const dev = env.NODE_ENV !== "production";
|
|
153
|
-
const build = async (src) => {
|
|
154
|
-
const memoized = cache.get(src);
|
|
155
|
-
if (memoized)
|
|
156
|
-
return memoized;
|
|
157
|
-
const raw = await file(src).text();
|
|
158
|
-
const islandMetadataExports = buildIslandMetadataExports(raw);
|
|
159
|
-
const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
|
|
160
|
-
const prevHash = sourceHashCache.get(src);
|
|
161
|
-
const persistent = persistentCache.get(src);
|
|
162
|
-
if (prevHash === contentHash && persistent) {
|
|
163
|
-
cache.set(src, persistent);
|
|
164
|
-
return persistent;
|
|
165
|
-
}
|
|
166
|
-
sourceHashCache.set(src, contentHash);
|
|
167
|
-
const isModule = src.endsWith(".svelte.ts") || src.endsWith(".svelte.js");
|
|
168
|
-
const loweredAwaitServerSource = isModule ? { code: raw, transformed: false } : lowerSvelteAwaitSlotSyntax(raw);
|
|
169
|
-
const loweredAwaitClientSource = isModule ? loweredAwaitServerSource : lowerSvelteAwaitSlotSyntax(raw);
|
|
170
|
-
const loweredServerSource = isModule ? loweredAwaitServerSource : lowerSvelteIslandSyntax(loweredAwaitServerSource.code, "server");
|
|
171
|
-
const loweredClientSource = isModule ? loweredAwaitClientSource : lowerSvelteIslandSyntax(loweredAwaitClientSource.code, "client");
|
|
172
|
-
const transformedByLowering = loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed;
|
|
173
|
-
const svelteStylePreprocessor = createSvelteStylePreprocessor(stylePreprocessors);
|
|
174
|
-
const preprocessedServer = isModule ? loweredServerSource.code : (await preprocess(loweredServerSource.code, svelteStylePreprocessor)).code;
|
|
175
|
-
const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
|
|
176
|
-
const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler.transformSync(preprocessedServer) : preprocessedServer;
|
|
177
|
-
const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler.transformSync(preprocessedClient) : preprocessedClient;
|
|
178
|
-
const rawRel = dirname(relative(svelteRoot, src)).replace(/\\/g, "/");
|
|
179
|
-
const relDir = rawRel.startsWith("..") ? `_ext/${relative(process.cwd(), dirname(src)).replace(/\\/g, "/")}` : rawRel;
|
|
180
|
-
const baseName = basename(src).replace(/\.svelte(\.(ts|js))?$/, "");
|
|
181
|
-
const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
|
|
182
|
-
const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule(importPath, src)));
|
|
183
|
-
const resolvedImports = await Promise.all(importPaths.map((importPath) => resolveSvelte(importPath, src)));
|
|
184
|
-
const childSources = resolvedImports.filter((path) => path !== null);
|
|
185
|
-
const childBuilt = await Promise.all(childSources.map((child) => build(child)));
|
|
186
|
-
const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
|
|
187
|
-
const externalRewrites = new Map;
|
|
188
|
-
const ssrOutputDir = dirname(join(serverDir, relDir, `${baseName}.js`));
|
|
189
|
-
const clientOutputDir = dirname(join(clientDir, relDir, `${baseName}.js`));
|
|
190
|
-
for (let idx = 0;idx < importPaths.length; idx++) {
|
|
191
|
-
const rawSpec = importPaths[idx];
|
|
192
|
-
if (!rawSpec)
|
|
193
|
-
continue;
|
|
194
|
-
const resolved = resolvedImports[idx];
|
|
195
|
-
const resolvedModule = resolvedModuleImports[idx];
|
|
196
|
-
if (!resolved && resolvedModule)
|
|
197
|
-
addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
|
|
198
|
-
if (!resolved)
|
|
199
|
-
continue;
|
|
200
|
-
const childRel = relative(svelteRoot, resolved).replace(/\\/g, "/");
|
|
201
|
-
if (!childRel.startsWith(".."))
|
|
202
|
-
continue;
|
|
203
|
-
const childBuilt2 = cache.get(resolved);
|
|
204
|
-
if (!childBuilt2)
|
|
205
|
-
continue;
|
|
206
|
-
const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
|
|
207
|
-
const toServer = relative(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
|
|
208
|
-
const toClient = relative(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
|
|
209
|
-
externalRewrites.set(origSpec, {
|
|
210
|
-
client: toClient.startsWith(".") ? toClient : `./${toClient}`,
|
|
211
|
-
server: toServer.startsWith(".") ? toServer : `./${toServer}`
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
const rewriteExternalImports = (code, mode) => {
|
|
215
|
-
let result = code;
|
|
216
|
-
for (const [origSpec, paths] of externalRewrites) {
|
|
217
|
-
const target = mode === "server" ? paths.server : paths.client;
|
|
218
|
-
result = result.replace(origSpec, target);
|
|
219
|
-
}
|
|
220
|
-
return result;
|
|
221
|
-
};
|
|
222
|
-
const generate = (mode) => {
|
|
223
|
-
const transpiled = mode === "server" ? transpiledServer : transpiledClient;
|
|
224
|
-
const compiled = isModule ? compileModule(transpiled, {
|
|
225
|
-
dev: mode === "client" && dev,
|
|
226
|
-
experimental: {
|
|
227
|
-
async: transformedByLowering
|
|
228
|
-
},
|
|
229
|
-
filename: src
|
|
230
|
-
}).js.code : compile(transpiled, {
|
|
231
|
-
css: "injected",
|
|
232
|
-
dev: mode === "client" && dev,
|
|
233
|
-
experimental: {
|
|
234
|
-
async: transformedByLowering
|
|
235
|
-
},
|
|
236
|
-
filename: src,
|
|
237
|
-
generate: mode,
|
|
238
|
-
hmr: mode === "client" && isDev
|
|
239
|
-
}).js.code;
|
|
240
|
-
let code = compiled.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
|
|
241
|
-
if (mode === "client" && isDev) {
|
|
242
|
-
const moduleKey = `/@src/${relative(process.cwd(), src).replace(/\\/g, "/")}`;
|
|
243
|
-
code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
|
|
244
|
-
if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
|
|
245
|
-
var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
|
|
246
|
-
code = code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
|
|
247
|
-
}
|
|
248
|
-
if (mode === "client") {
|
|
249
|
-
code = removeUnusedRequireHelper(code);
|
|
250
|
-
}
|
|
251
|
-
code += islandMetadataExports;
|
|
252
|
-
return code;
|
|
253
|
-
};
|
|
254
|
-
const ssrPath = join(serverDir, relDir, `${baseName}.js`);
|
|
255
|
-
const clientPath = join(clientDir, relDir, `${baseName}.js`);
|
|
256
|
-
await Promise.all([
|
|
257
|
-
mkdir(dirname(ssrPath), { recursive: true }),
|
|
258
|
-
mkdir(dirname(clientPath), { recursive: true })
|
|
259
|
-
]);
|
|
260
|
-
if (isModule) {
|
|
261
|
-
const bundle = rewriteExternalImports(generate("client"), "client");
|
|
262
|
-
await Promise.all([
|
|
263
|
-
write(ssrPath, bundle),
|
|
264
|
-
write(clientPath, bundle)
|
|
265
|
-
]);
|
|
266
|
-
} else {
|
|
267
|
-
const serverBundle = rewriteExternalImports(generate("server"), "server");
|
|
268
|
-
const clientBundle = rewriteExternalImports(generate("client"), "client");
|
|
269
|
-
await Promise.all([
|
|
270
|
-
write(ssrPath, serverBundle),
|
|
271
|
-
write(clientPath, clientBundle)
|
|
272
|
-
]);
|
|
273
|
-
}
|
|
274
|
-
const built = {
|
|
275
|
-
client: clientPath,
|
|
276
|
-
hasAwaitSlot: loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed || hasAwaitSlotFromChildren,
|
|
277
|
-
ssr: ssrPath
|
|
278
|
-
};
|
|
279
|
-
cache.set(src, built);
|
|
280
|
-
persistentCache.set(src, built);
|
|
281
|
-
return built;
|
|
282
|
-
};
|
|
283
|
-
const roots = await Promise.all(entryPoints.map(build));
|
|
284
|
-
await Promise.all(roots.map(async ({ client, hasAwaitSlot }) => {
|
|
285
|
-
const relClientDir = dirname(relative(clientDir, client));
|
|
286
|
-
const name = basename(client, extname(client));
|
|
287
|
-
const indexPath = join(indexDir, relClientDir, `${name}.js`);
|
|
288
|
-
const importRaw = relative(dirname(indexPath), client).split(sep).join("/");
|
|
289
|
-
const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
|
|
290
|
-
const hmrImports = isDev ? `window.__HMR_FRAMEWORK__ = "svelte";
|
|
291
|
-
import "${hmrClientPath}";
|
|
292
|
-
` : "";
|
|
293
|
-
const bootstrap = `${hmrImports}import Component from "${importPath}";
|
|
294
|
-
import { hydrate, mount, unmount } from "svelte";
|
|
295
|
-
|
|
296
|
-
var initialProps = (typeof window !== "undefined" && window.__INITIAL_PROPS__) ? window.__INITIAL_PROPS__ : {};
|
|
297
|
-
var isHMR = typeof window !== "undefined" && window.__SVELTE_COMPONENT__ !== undefined;
|
|
298
|
-
var isSsrDirty = typeof window !== "undefined" && window.__SSR_DIRTY__;
|
|
299
|
-
var hasIslandHtml = false;
|
|
300
|
-
var shouldHydrate = typeof window === "undefined" ? false : ${hasAwaitSlot ? "false" : "true"};
|
|
301
|
-
var component;
|
|
302
|
-
var target = document.getElementById(${JSON.stringify(SVELTE_PAGE_ROOT_ID)}) || document.body;
|
|
303
|
-
|
|
304
|
-
if (typeof window !== "undefined") {
|
|
305
|
-
var islandSlots = document.querySelectorAll("[data-absolute-island-slot]");
|
|
306
|
-
var islandHtml = {};
|
|
307
|
-
for (var index = 0; index < islandSlots.length; index += 1) {
|
|
308
|
-
var slot = islandSlots[index];
|
|
309
|
-
var slotId = slot.getAttribute("data-absolute-island-slot");
|
|
310
|
-
if (!slotId) continue;
|
|
311
|
-
islandHtml[slotId] = slot.innerHTML;
|
|
312
|
-
}
|
|
313
|
-
window.__ABS_SVELTE_ISLAND_HTML__ = islandHtml;
|
|
314
|
-
hasIslandHtml = Object.keys(islandHtml).length > 0;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
if (isHMR) {
|
|
318
|
-
var preservedState = window.__HMR_PRESERVED_STATE__;
|
|
319
|
-
if (!preservedState) {
|
|
320
|
-
try {
|
|
321
|
-
var stored = sessionStorage.getItem("__SVELTE_HMR_STATE__");
|
|
322
|
-
if (stored) preservedState = JSON.parse(stored);
|
|
323
|
-
} catch (err) { /* ignore */ }
|
|
324
|
-
}
|
|
325
|
-
var mergedProps = (preservedState && Object.keys(preservedState).length > 0) ? Object.assign({}, initialProps, preservedState) : initialProps;
|
|
326
|
-
if (typeof window.__SVELTE_UNMOUNT__ === "function") {
|
|
327
|
-
try { window.__SVELTE_UNMOUNT__(); } catch (err) { /* ignore */ }
|
|
328
|
-
}
|
|
329
|
-
component = mount(Component, { target, props: mergedProps });
|
|
330
|
-
window.__HMR_PRESERVED_STATE__ = undefined;
|
|
331
|
-
} else if (!shouldHydrate) {
|
|
332
|
-
component = undefined;
|
|
333
|
-
} else if (isSsrDirty || hasIslandHtml) {
|
|
334
|
-
component = mount(Component, { target, props: initialProps });
|
|
335
|
-
} else {
|
|
336
|
-
component = hydrate(Component, { target, props: initialProps });
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (typeof window !== "undefined") {
|
|
340
|
-
window.__SVELTE_COMPONENT__ = component;
|
|
341
|
-
window.__SVELTE_UNMOUNT__ = function() { if (component) { unmount(component); } };
|
|
342
|
-
window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;
|
|
343
|
-
var releaseStreamingSlots = function() {
|
|
344
|
-
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
345
|
-
if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
|
|
346
|
-
window.__ABS_SLOT_FLUSH__();
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
if (shouldHydrate && typeof requestAnimationFrame === "function") {
|
|
350
|
-
requestAnimationFrame(function() {
|
|
351
|
-
requestAnimationFrame(releaseStreamingSlots);
|
|
352
|
-
});
|
|
353
|
-
} else if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
|
|
354
|
-
window.__ABS_SLOT_FLUSH__();
|
|
355
|
-
} else if (typeof setTimeout === "function") {
|
|
356
|
-
setTimeout(releaseStreamingSlots, 0);
|
|
357
|
-
}
|
|
358
|
-
}`;
|
|
359
|
-
await mkdir(dirname(indexPath), { recursive: true });
|
|
360
|
-
return write(indexPath, bootstrap);
|
|
361
|
-
}));
|
|
362
|
-
return {
|
|
363
|
-
svelteClientPaths: roots.map(({ client }) => client),
|
|
364
|
-
svelteIndexPaths: roots.map(({ client }) => {
|
|
365
|
-
const rel = dirname(relative(clientDir, client));
|
|
366
|
-
return join(indexDir, rel, basename(client));
|
|
367
|
-
}),
|
|
368
|
-
svelteServerPaths: roots.map(({ ssr }) => ssr)
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
export {
|
|
372
|
-
compileSvelte,
|
|
373
|
-
clearSvelteCompilerCache
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
//# debugId=52767A2109196BB664756E2164756E21
|
|
377
|
-
//# sourceMappingURL=chunk-x09cskqd.js.map
|