@absolutejs/absolute 0.20.0-beta.130 → 0.20.0-beta.131
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/CHANGELOG.md +21 -0
- package/changelog.json +41 -0
- package/dist/angular/browser.js +406 -396
- package/dist/angular/browser.js.map +4 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -3
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -4
- package/dist/angular/index.js +560 -701
- package/dist/angular/index.js.map +5 -5
- package/dist/angular/server.js +197 -338
- package/dist/angular/server.js.map +5 -5
- package/dist/build/buildWorker.js +27 -35
- package/dist/build.js +3833 -5876
- package/dist/build.js.map +4 -4
- package/dist/cli/{add-9sa7e3vd.js → add-hvqeg5sz.js} +23 -25
- package/dist/cli/{analyze-c1sep5y9.js → analyze-c2x2aym5.js} +6 -7
- package/dist/cli/androidEmulatorController-j73a1br6.js +22 -0
- package/dist/cli/{androidNativeWatcher-dnp95nk2.js → androidNativeWatcher-ctbnsr1v.js} +11 -14
- package/dist/cli/{api-2hd8cahp.js → api-rk13rfd9.js} +11 -13
- package/dist/cli/{build-857rc1ds.js → build-20y4b6rj.js} +8 -9
- package/dist/cli/{buildDepVendor-8akhr8n8.js → buildDepVendor-axqvbbm6.js} +5 -170
- package/dist/cli/{compile-9by2vxy5.js → compile-qygwqezx.js} +43 -48
- package/dist/cli/config/client.js +8 -8
- package/dist/cli/config/server.js +5615 -5595
- package/dist/cli/config-3te1fbry.js +7 -0
- package/dist/cli/{db-8wweexdp.js → db-p8pc325y.js} +5 -13
- package/dist/cli/{dev-qg7fr16s.js → dev-6f0gry3y.js} +75 -77
- package/dist/cli/{devCert-avr89zf3.js → devCert-n33ep8pg.js} +0 -3
- package/dist/cli/{doctor-mbh9bk05.js → doctor-8rm8p4dm.js} +13 -14
- package/dist/cli/emulatorDoctor-cwa70kgt.js +17 -0
- package/dist/cli/emulatorInstaller-dx3fmm2m.js +14 -0
- package/dist/cli/env-2107nff1.js +11 -0
- package/dist/cli/eslint-zz0t0kfp.js +17 -0
- package/dist/cli/eslintChunked-wg10jj9m.js +12 -0
- package/dist/cli/expoDevController-s70fj7vf.js +16 -0
- package/dist/cli/{expoNativeWatcher-rmc95bak.js → expoNativeWatcher-aakp7xvj.js} +1 -5
- package/dist/cli/expoProject-zy02tbfg.js +10 -0
- package/dist/cli/{generate-069p0dk3.js → generate-nz4w03yz.js} +19 -21
- package/dist/cli/{heapDiff-87v24x7p.js → heapDiff-2etr2r26.js} +5 -6
- package/dist/cli/{htmx-5wh1jh75.js → htmx-0xcaqrny.js} +12 -14
- package/dist/cli/{index-sjvydg2r.js → index-1ff9q1vx.js} +7 -7
- package/dist/cli/{index-rqbk0b30.js → index-1qewxkgy.js} +26 -26
- package/dist/cli/{index-prwyfnn3.js → index-1x1vah31.js} +2 -2
- package/dist/cli/{index-ddakkws4.js → index-31j3beht.js} +13 -13
- package/dist/cli/{index-j2nw3edf.js → index-3gtnqd57.js} +5 -5
- package/dist/cli/{index-54q7pxcx.js → index-434b7j4a.js} +2 -32
- package/dist/cli/{index-w5vswatm.js → index-43a1vvb7.js} +6 -10
- package/dist/cli/{index-nxcwg9ma.js → index-5sjk7daj.js} +31 -31
- package/dist/cli/{index-6j1xaheg.js → index-73sk1ney.js} +5 -5
- package/dist/cli/{index-3x5wpx5d.js → index-8kdmmgvc.js} +2 -2
- package/dist/cli/{index-1ys3dnrs.js → index-8w2wazrk.js} +34 -34
- package/dist/cli/{index-wtfnv3n2.js → index-92hmw204.js} +3 -3
- package/dist/cli/{index-vdbn8brx.js → index-9ehbfmeq.js} +38 -41
- package/dist/cli/{index-mywsk201.js → index-fde3c297.js} +1 -1
- package/dist/cli/{index-255xs63d.js → index-j57pgg5m.js} +10 -10
- package/dist/cli/{index-5cgsrv62.js → index-jcjwsdqt.js} +13 -182
- package/dist/cli/{index-00wfffav.js → index-k4t9k1xk.js} +5 -5
- package/dist/cli/{index-yxgaf8j0.js → index-m1vntzf1.js} +7 -5
- package/dist/cli/{index-9r7n9dqp.js → index-ma1dw7x2.js} +1 -1
- package/dist/cli/index-pch0v1z6.js +60 -0
- package/dist/cli/{index-8nym68py.js → index-ppxed116.js} +1 -1
- package/dist/cli/{index-9kwmb3c0.js → index-qyxd5n9a.js} +3 -3
- package/dist/cli/{index-tn4crd40.js → index-r62705dc.js} +12 -12
- package/dist/cli/{index-wctgx65x.js → index-r6k4xmdb.js} +21 -21
- package/dist/cli/{index-hty8111z.js → index-r915cvqp.js} +17 -17
- package/dist/cli/{index-exdd5k1g.js → index-rrxeqrbn.js} +2 -2
- package/dist/cli/{index-keg69zm1.js → index-snbzdwb9.js} +5 -5
- package/dist/cli/{index-v26ze17p.js → index-thqwfzy8.js} +3 -3
- package/dist/cli/{index-0hr7c4qe.js → index-vdnmqkt8.js} +14 -18
- package/dist/cli/{index-vkkqe08e.js → index-vj2v38sq.js} +29 -29
- package/dist/cli/{index-erngp7a9.js → index-wy0yh4jj.js} +16 -16
- package/dist/cli/{index-1cypb2zn.js → index-xcr3r6a1.js} +8 -8
- package/dist/cli/index.js +44 -48
- package/dist/cli/{info-d74dr585.js → info-kx5510rq.js} +7 -7
- package/dist/cli/{inspect-23chj4nc.js → inspect-5dj06x0m.js} +18 -20
- package/dist/cli/{iosNativeWatcher-kggp7j9a.js → iosNativeWatcher-zx49pzej.js} +12 -16
- package/dist/cli/iosSimulatorController-haa1cc3p.js +23 -0
- package/dist/cli/{islands-wpqgmwh0.js → islands-z4adh55n.js} +8 -9
- package/dist/cli/{lintProof-wx3b6dzy.js → lintProof-qcwdvzcz.js} +12 -17
- package/dist/cli/{logs-bx2n5ey6.js → logs-3p2vrq5h.js} +8 -10
- package/dist/cli/{ls-kvmcmd2j.js → ls-nkspq73y.js} +13 -14
- package/dist/cli/{mem-apbk7bx4.js → mem-h3f497cr.js} +10 -14
- package/dist/cli/{migrate-p4rp5r6b.js → migrate-52bqqp08.js} +7 -8
- package/dist/cli/{mobile-43q3zmjf.js → mobile-w295dx0t.js} +572 -575
- package/dist/cli/nativeAuth-ysv0x5dy.js +27 -0
- package/dist/cli/patchedBun-m7vj5sks.js +9 -0
- package/dist/cli/prerender-mfnwsvyt.js +7 -0
- package/dist/cli/{prettier-vtk5yaw4.js → prettier-c1624g36.js} +2 -6
- package/dist/cli/{ps-8y28kzmb.js → ps-0jedm91n.js} +12 -16
- package/dist/cli/{psTui-8e96mwgz.js → psTui-tpr5nbmc.js} +28 -30
- package/dist/cli/remoteMacProtocol-v3ax0y0f.js +41 -0
- package/dist/cli/{remove-3fd1z2hx.js → remove-z0brj5nd.js} +16 -18
- package/dist/cli/{rewriteImports-d1gmaa68.js → rewriteImports-k6rjjmg1.js} +2 -100
- package/dist/cli/{routes-0xpanj8z.js → routes-ey0sw1eq.js} +7 -9
- package/dist/cli/start-36w63t6h.js +20 -0
- package/dist/cli/telemetry-3wnc06wa.js +9 -0
- package/dist/cli/{tunnelRelay-5at2v8w6.js → tunnelRelay-19ay0fxn.js} +3 -4
- package/dist/cli/{typecheck-yj9s13eb.js → typecheck-nmf6e7k7.js} +147 -149
- package/dist/cli/{workspace-m56sgfkc.js → workspace-yetzedke.js} +32 -36
- package/dist/client/chunks/{index-dk743xs6.js → index-8m2qq61n.js} +12 -8
- package/dist/client/chunks/{index-dk743xs6.js.map → index-8m2qq61n.js.map} +4 -3
- package/dist/client/chunks/{index-m35nbkdp.js → islands-rc28k5sx.js} +104 -42
- package/dist/client/chunks/islands-rc28k5sx.js.map +15 -0
- package/dist/client/chunks/{react-yq4ss9y4.js → react-dcvkaba2.js} +5 -7
- package/dist/client/chunks/{react-yq4ss9y4.js.map → react-dcvkaba2.js.map} +2 -2
- package/dist/client/chunks/{svelte-s0c964kb.js → svelte-4yfa5bxa.js} +2 -4
- package/dist/client/chunks/{svelte-s0c964kb.js.map → svelte-4yfa5bxa.js.map} +2 -2
- package/dist/client/chunks/{vue-rdskrnyg.js → vue-a84fzp3v.js} +2 -4
- package/dist/client/chunks/{vue-rdskrnyg.js.map → vue-a84fzp3v.js.map} +2 -2
- package/dist/client/index.js +42 -15
- package/dist/client/index.js.map +2 -2
- package/dist/client/prefetch.js +1 -3
- package/dist/client/prefetch.js.map +2 -2
- package/dist/core/streamingSlotRegistrar.js +1 -64
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +1 -64
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/serverBootstrap.js +1802 -2018
- package/dist/index.js +5247 -8794
- package/dist/index.js.map +9 -20
- package/dist/islands/browser.js +13 -3
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +26 -142
- package/dist/islands/index.js.map +2 -2
- package/dist/mobile/browser.js +13 -3
- package/dist/mobile/browser.js.map +2 -2
- package/dist/mobile/index.js +1067 -2182
- package/dist/mobile/index.js.map +2 -2
- package/dist/mobile/remoteMacAgentEntry.js +156 -156
- package/dist/mobile/shellAuth.js +0 -16
- package/dist/mobile/shellBootstrap.js +734 -724
- package/dist/mobile/shellExpoAuth.js +4 -18
- package/dist/mobile/shellExpoDevices.js +0 -16
- package/dist/mobile/shellExpoSync.js +0 -16
- package/dist/mobile/shellSync.js +3 -19
- package/dist/mobile/shellUpdate.js +5 -21
- package/dist/mobile/uiPrimitives.js +0 -16
- package/dist/react/browser.js +15 -5
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/index.js +68 -58
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/hooks/index.js +1 -63
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +56 -195
- package/dist/react/index.js.map +5 -5
- package/dist/react/jsxDevRuntimeCompat.js +1 -64
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +1 -64
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +1 -64
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +1 -64
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +38 -51
- package/dist/react/server.js.map +5 -5
- package/dist/src/cli/config/server.d.ts +7 -129
- package/dist/src/cli/patchedBun.d.ts +14 -14
- package/dist/src/core/prepare.d.ts +149 -1805
- package/dist/src/core/requestContext.d.ts +1 -1
- package/dist/src/dev/requestInspector.d.ts +1 -1
- package/dist/src/mobile/associationFiles.d.ts +2 -2
- package/dist/src/mobile/compatibilityDispatcher.d.ts +1 -1
- package/dist/src/mobile/mobilePreview.d.ts +8 -130
- package/dist/src/mobile/updateServer.d.ts +2 -2
- package/dist/src/plugins/devtoolsJson.d.ts +2 -2
- package/dist/src/plugins/hmr.d.ts +2 -2
- package/dist/src/plugins/imageOptimizer.d.ts +2 -151
- package/dist/src/plugins/telemetryPlugin.d.ts +1 -19
- package/dist/svelte/browser.js +13 -3
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +66 -210
- package/dist/svelte/index.js.map +5 -5
- package/dist/svelte/server.js +51 -99
- package/dist/svelte/server.js.map +5 -5
- package/dist/types/globals.d.ts +0 -6
- package/dist/vue/browser.js +13 -3
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +13 -3
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +62 -50
- package/dist/vue/components/index.js.map +4 -4
- package/dist/vue/index.js +1115 -1258
- package/dist/vue/index.js.map +10 -10
- package/dist/vue/server.js +42 -59
- package/dist/vue/server.js.map +5 -5
- package/package.json +9 -9
- package/dist/cli/androidEmulatorController-sj141e1c.js +0 -30
- package/dist/cli/config-rjeexvza.js +0 -8
- package/dist/cli/emulatorDoctor-gzarrsex.js +0 -18
- package/dist/cli/emulatorInstaller-pjw4ex6q.js +0 -15
- package/dist/cli/env-4f6f6z69.js +0 -14
- package/dist/cli/eslint-qfkxe89p.js +0 -20
- package/dist/cli/eslintChunked-7ef700pn.js +0 -21
- package/dist/cli/expoDevController-weywa74d.js +0 -26
- package/dist/cli/expoProject-w2pzjwnx.js +0 -11
- package/dist/cli/index-1rabqyq0.js +0 -7
- package/dist/cli/index-ar4gz15x.js +0 -60
- package/dist/cli/iosSimulatorController-xcxxfkzx.js +0 -34
- package/dist/cli/nativeAuth-zx4tsb1f.js +0 -38
- package/dist/cli/patchedBun-zjtrn2s4.js +0 -38
- package/dist/cli/prerender-yex2zwj3.js +0 -18
- package/dist/cli/remoteMacProtocol-r38jhg44.js +0 -69
- package/dist/cli/start-gzhrkhxe.js +0 -23
- package/dist/cli/telemetry-94rka1w2.js +0 -14
- package/dist/client/chunks/angularPatch-arh4sr68.js +0 -157
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +0 -10
- package/dist/client/chunks/index-jrcwp722.js +0 -12
- package/dist/client/chunks/index-jrcwp722.js.map +0 -10
- package/dist/client/chunks/index-m35nbkdp.js.map +0 -12
- package/dist/client/chunks/index-qxjc7kc5.js +0 -12
- package/dist/client/chunks/index-qxjc7kc5.js.map +0 -9
- package/dist/client/chunks/islands-50dg63j9.js +0 -284
- package/dist/client/chunks/islands-50dg63j9.js.map +0 -14
- /package/dist/cli/{index-me8nczrw.js → index-039rh39e.js} +0 -0
- /package/dist/cli/{index-bw4ktfnz.js → index-1y5mmnwg.js} +0 -0
- /package/dist/cli/{index-5xfxd7xa.js → index-3wm8p7rg.js} +0 -0
- /package/dist/cli/{index-4rme31py.js → index-420h9hq7.js} +0 -0
- /package/dist/cli/{index-4rhxthsy.js → index-65kqn88a.js} +0 -0
- /package/dist/cli/{index-r8x3839e.js → index-71gchbzt.js} +0 -0
- /package/dist/cli/{index-s2tazax7.js → index-92g14j47.js} +0 -0
- /package/dist/cli/{index-j66p8hn5.js → index-bwsa6ax4.js} +0 -0
- /package/dist/cli/{index-bzs19w3r.js → index-e6ysp900.js} +0 -0
- /package/dist/cli/{index-06cmrcdq.js → index-h7qhz02e.js} +0 -0
- /package/dist/cli/{index-6h54jqdq.js → index-hg54jyts.js} +0 -0
- /package/dist/cli/{index-czwrxgdj.js → index-hxqprc80.js} +0 -0
- /package/dist/cli/{index-zh6hhrwy.js → index-jjfbjv1z.js} +0 -0
- /package/dist/cli/{index-fc9vxw56.js → index-prs14ys9.js} +0 -0
- /package/dist/cli/{index-v1k46q3x.js → index-tx0kx9zx.js} +0 -0
- /package/dist/cli/{index-fhaf3tdk.js → index-x8x0f3ha.js} +0 -0
- /package/dist/cli/{index-18q9qc7f.js → index-ypcqx24p.js} +0 -0
package/dist/islands/browser.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -59,7 +59,17 @@ var __legacyMetadataTS = (k, v) => {
|
|
|
59
59
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
60
60
|
return Reflect.metadata(k, v);
|
|
61
61
|
};
|
|
62
|
-
var __esm = (fn, res) => () =>
|
|
62
|
+
var __esm = (fn, res, err) => () => {
|
|
63
|
+
if (fn)
|
|
64
|
+
try {
|
|
65
|
+
res = fn(fn = 0);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
err = [e];
|
|
68
|
+
}
|
|
69
|
+
if (err)
|
|
70
|
+
throw err[0];
|
|
71
|
+
return res;
|
|
72
|
+
};
|
|
63
73
|
var __require = import.meta.require;
|
|
64
74
|
|
|
65
75
|
// src/core/islandManifest.ts
|
|
@@ -223,5 +233,5 @@ export {
|
|
|
223
233
|
renderIslandMarkup
|
|
224
234
|
};
|
|
225
235
|
|
|
226
|
-
//# debugId=
|
|
236
|
+
//# debugId=033BF8ECE85289F364756E2164756E21
|
|
227
237
|
//# sourceMappingURL=browser.js.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
|
|
10
10
|
"import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n"
|
|
11
11
|
],
|
|
12
|
-
"mappings": "
|
|
13
|
-
"debugId": "
|
|
12
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEM,2BAA2B,CAAC,cACjC,UAAU,IAAI,YAAY,IAAI,UAAU,MAAM,CAAC,GAE1C,0BAA0B,CAC/B,UACA,WACI;AAAA,EACJ,MAAM,UAAk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AI;AAAA,IAClB;AAAA,IACA;AAAA,EACD,CAAC;AAAA,EACD,OAAO,IAAI,SAAS,cAAc;AAAA,EAElC,mBAAmB,SAAS,MAAM,SAAS,GAAG,gBAAgB,KAAK;AAAA,EACnE,MAAM,UAAU,CAAC,UAAU;AAAA,IAC1B,IAAI,4BAA4B;AAAA,MAC/B,6BAA6B;AAAA,MAE7B;AAAA,IACD;AAAA,IAEA,mBAAmB,SAAS,OAAO,gBAAgB,KAAK;AAAA,GACxD;AAAA,EAED,OAAO;AAAA;AAED,IAAM,+BAA+B,CAI3C,OACA,aACI,SAAS,MAAM,gBAAgB,CAAC;AAwB9B,IAAM,kBAAkB,CAC9B,OACA,aACI,SAAS,MAAM,SAAS,CAAC;AAKvB,IAAM,uBAAuB,CAInC,OACA,UACA,aACI;AAAA,EACJ,IAAI,mBAAmB,SAAS,MAAM,SAAS,CAAC;AAAA,EAEhD,OAAO,MAAM,UAAU,CAAC,UAAU;AAAA,IACjC,MAAM,gBAAgB,SAAS,KAAK;AAAA,IACpC,IAAI,OAAO,GAAG,eAAe,gBAAgB,GAAG;AAAA,MAC/C;AAAA,IACD;AAAA,IAEA,mBAAmB;AAAA,IACnB,SAAS,aAAa;AAAA,GACtB;AAAA;;;AH/KK,IAAM,qBAAqB,YAAY;AAAA,EAC7C,MAAM,IAAI,MACT,8FACD;AAAA;",
|
|
13
|
+
"debugId": "033BF8ECE85289F364756E2164756E21",
|
|
14
14
|
"names": []
|
|
15
15
|
}
|
package/dist/islands/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -59,7 +59,17 @@ var __legacyMetadataTS = (k, v) => {
|
|
|
59
59
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
60
60
|
return Reflect.metadata(k, v);
|
|
61
61
|
};
|
|
62
|
-
var __esm = (fn, res) => () =>
|
|
62
|
+
var __esm = (fn, res, err) => () => {
|
|
63
|
+
if (fn)
|
|
64
|
+
try {
|
|
65
|
+
res = fn(fn = 0);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
err = [e];
|
|
68
|
+
}
|
|
69
|
+
if (err)
|
|
70
|
+
throw err[0];
|
|
71
|
+
return res;
|
|
72
|
+
};
|
|
63
73
|
var __require = import.meta.require;
|
|
64
74
|
|
|
65
75
|
// src/core/islandManifest.ts
|
|
@@ -158,10 +168,6 @@ var init_resolveAngularPackage = () => {};
|
|
|
158
168
|
var ENV_VAR = "NODE_ENV", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
159
169
|
|
|
160
170
|
// src/angular/angularPatch.ts
|
|
161
|
-
var exports_angularPatch = {};
|
|
162
|
-
__export(exports_angularPatch, {
|
|
163
|
-
applyPatches: () => applyPatches
|
|
164
|
-
});
|
|
165
171
|
var ensureHead = (doc) => {
|
|
166
172
|
if (!doc || doc.head || !doc.documentElement) {
|
|
167
173
|
return;
|
|
@@ -317,8 +323,8 @@ var initDominoAdapter = (platformServer) => {
|
|
|
317
323
|
if (!isProductionRuntime()) {
|
|
318
324
|
await import("@angular/compiler");
|
|
319
325
|
}
|
|
320
|
-
|
|
321
|
-
await
|
|
326
|
+
await Promise.resolve().then(() => init_angularPatch());
|
|
327
|
+
await applyPatches();
|
|
322
328
|
const useBareSpecifiers = !isProductionRuntime();
|
|
323
329
|
const [platformBrowser, platformServer, common, core] = await Promise.all([
|
|
324
330
|
useBareSpecifiers ? import("@angular/platform-browser") : import(resolveAngularRuntimePath("@angular/platform-browser")),
|
|
@@ -560,49 +566,7 @@ var init_ssrRender = __esm(() => {
|
|
|
560
566
|
});
|
|
561
567
|
|
|
562
568
|
// src/angular/islands.ts
|
|
563
|
-
var
|
|
564
|
-
__export(exports_islands, {
|
|
565
|
-
getAngularIslandSelector: () => getAngularIslandSelector,
|
|
566
|
-
isAngularComponent: () => isAngularComponent,
|
|
567
|
-
mountAngularIsland: () => mountAngularIsland,
|
|
568
|
-
renderAngularIslandToHtml: () => renderAngularIslandToHtml
|
|
569
|
-
});
|
|
570
|
-
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
571
|
-
const firstChild = rootElement.firstElementChild;
|
|
572
|
-
if (!(firstChild instanceof HTMLElement)) {
|
|
573
|
-
return null;
|
|
574
|
-
}
|
|
575
|
-
const selector = firstChild.tagName.toLowerCase();
|
|
576
|
-
return selector.length > 0 ? selector : null;
|
|
577
|
-
}, getClientAngularComponentSelector = (component) => {
|
|
578
|
-
const maybeDef = Reflect.get(component, "\u0275cmp");
|
|
579
|
-
if (typeof maybeDef !== "object" || maybeDef === null) {
|
|
580
|
-
return null;
|
|
581
|
-
}
|
|
582
|
-
const maybeSelectors = Reflect.get(maybeDef, "selectors");
|
|
583
|
-
if (!Array.isArray(maybeSelectors)) {
|
|
584
|
-
return null;
|
|
585
|
-
}
|
|
586
|
-
const [firstSelectorGroup] = maybeSelectors;
|
|
587
|
-
if (!Array.isArray(firstSelectorGroup)) {
|
|
588
|
-
return null;
|
|
589
|
-
}
|
|
590
|
-
const [selector] = firstSelectorGroup;
|
|
591
|
-
return typeof selector === "string" && selector.length > 0 ? selector : null;
|
|
592
|
-
}, createAngularIslandApp = async () => {
|
|
593
|
-
const { EnvironmentInjector, provideZonelessChangeDetection } = await import("@angular/core");
|
|
594
|
-
const { createApplication } = await import("@angular/platform-browser");
|
|
595
|
-
const app = await createApplication({
|
|
596
|
-
providers: [provideZonelessChangeDetection()]
|
|
597
|
-
});
|
|
598
|
-
const environmentInjector = app.injector.get(EnvironmentInjector);
|
|
599
|
-
return { app, environmentInjector };
|
|
600
|
-
}, angularIslandAppPromise = null, getAngularIslandApp = async () => {
|
|
601
|
-
if (!angularIslandAppPromise) {
|
|
602
|
-
angularIslandAppPromise = createAngularIslandApp();
|
|
603
|
-
}
|
|
604
|
-
return angularIslandAppPromise;
|
|
605
|
-
}, wrapperMetadataCache, requestRenderCache, getRequestRenderCache = () => {
|
|
569
|
+
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, wrapperMetadataCache, requestRenderCache, getRequestRenderCache = () => {
|
|
606
570
|
const requestId = getSsrContextId();
|
|
607
571
|
if (!requestId) {
|
|
608
572
|
return null;
|
|
@@ -664,36 +628,6 @@ var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_i
|
|
|
664
628
|
throw new Error(`Could not close Angular island root "${selector}".`);
|
|
665
629
|
}
|
|
666
630
|
return html.slice(start, end + endTag.length);
|
|
667
|
-
}, mountAngularIsland = async (component, element, props, islandId) => {
|
|
668
|
-
await import("@angular/compiler");
|
|
669
|
-
const { createComponent, inputBinding } = await import("@angular/core");
|
|
670
|
-
const selector = getAngularIslandSelector(islandId);
|
|
671
|
-
const { app, environmentInjector } = await getAngularIslandApp();
|
|
672
|
-
let rootElement = element.querySelector(selector);
|
|
673
|
-
if (!(rootElement instanceof HTMLElement)) {
|
|
674
|
-
element.innerHTML = `<${selector}></${selector}>`;
|
|
675
|
-
rootElement = element.querySelector(selector);
|
|
676
|
-
}
|
|
677
|
-
if (!(rootElement instanceof HTMLElement))
|
|
678
|
-
return app;
|
|
679
|
-
const componentSelector = getClientAngularComponentSelector(component) ?? getSelectorFromRenderedIsland(rootElement);
|
|
680
|
-
if (!componentSelector)
|
|
681
|
-
return app;
|
|
682
|
-
rootElement.innerHTML = `<${componentSelector}></${componentSelector}>`;
|
|
683
|
-
const hostElement = rootElement.querySelector(componentSelector);
|
|
684
|
-
if (!(hostElement instanceof HTMLElement))
|
|
685
|
-
return app;
|
|
686
|
-
const bindings = Object.entries(props).map(([key, value]) => inputBinding(key, () => value));
|
|
687
|
-
const componentRef = createComponent(component, {
|
|
688
|
-
bindings,
|
|
689
|
-
environmentInjector,
|
|
690
|
-
hostElement
|
|
691
|
-
});
|
|
692
|
-
app.attachView(componentRef.hostView);
|
|
693
|
-
componentRef.changeDetectorRef.detectChanges();
|
|
694
|
-
window.__ABS_ANGULAR_ISLAND_APPS__ ??= [];
|
|
695
|
-
window.__ABS_ANGULAR_ISLAND_APPS__.push(app);
|
|
696
|
-
return app;
|
|
697
631
|
}, renderAngularIslandToHtml = async (component, props, islandId) => {
|
|
698
632
|
const requestCache = getRequestRenderCache();
|
|
699
633
|
const renderCacheKey = getIslandRenderCacheKey(component, props);
|
|
@@ -728,8 +662,8 @@ var init_islands2 = __esm(() => {
|
|
|
728
662
|
|
|
729
663
|
// src/core/islandSsr.ts
|
|
730
664
|
var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
|
|
731
|
-
|
|
732
|
-
return
|
|
665
|
+
await Promise.resolve().then(() => init_islands2());
|
|
666
|
+
return renderAngularIslandToHtml(component, props, islandId);
|
|
733
667
|
}, renderAngularIslandToHtml2, LEADING_HOISTED_RESOURCE_RE, stripLeadingHoistedResources = (html) => {
|
|
734
668
|
let result = html;
|
|
735
669
|
let match = LEADING_HOISTED_RESOURCE_RE.exec(result);
|
|
@@ -1068,25 +1002,9 @@ var init_specifierRewriter = __esm(() => {
|
|
|
1068
1002
|
});
|
|
1069
1003
|
|
|
1070
1004
|
// src/build/rewriteImportsPlugin.ts
|
|
1071
|
-
var exports_rewriteImportsPlugin = {};
|
|
1072
|
-
__export(exports_rewriteImportsPlugin, {
|
|
1073
|
-
buildWithImportRewrite: () => buildWithImportRewrite,
|
|
1074
|
-
fixMissingReExportNamespacesInContent: () => fixMissingReExportNamespacesInContent,
|
|
1075
|
-
jsRewriteImports: () => jsRewriteImports,
|
|
1076
|
-
rewriteBuildOutputs: () => rewriteBuildOutputs,
|
|
1077
|
-
rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
|
|
1078
|
-
rewriteImportsInContent: () => rewriteImportsInContent,
|
|
1079
|
-
rewriteVendorDirectories: () => rewriteVendorDirectories
|
|
1080
|
-
});
|
|
1081
1005
|
import { readdir } from "fs/promises";
|
|
1082
1006
|
import { join as join2 } from "path";
|
|
1083
|
-
var REEXPORT_PATTERN, IMPORT_PATH_PATTERN, isMissingFile = (error) => error instanceof Error && ("code" in error) && error.code === "ENOENT",
|
|
1084
|
-
const result = await pendingBuild;
|
|
1085
|
-
if (result.outputs.length > 0) {
|
|
1086
|
-
await rewriteBuildOutputs(result.outputs, vendorPaths);
|
|
1087
|
-
}
|
|
1088
|
-
return result;
|
|
1089
|
-
}, fixMissingReExportNamespacesInContent = (content) => {
|
|
1007
|
+
var REEXPORT_PATTERN, IMPORT_PATH_PATTERN, isMissingFile = (error) => error instanceof Error && ("code" in error) && error.code === "ENOENT", fixMissingReExportNamespacesInContent = (content) => {
|
|
1090
1008
|
const missing = collectMissingNamespaceImports(content);
|
|
1091
1009
|
if (missing.length === 0)
|
|
1092
1010
|
return content;
|
|
@@ -1129,10 +1047,6 @@ ${content}`;
|
|
|
1129
1047
|
missing.push({ ident, path: sourcePath });
|
|
1130
1048
|
}
|
|
1131
1049
|
return missing;
|
|
1132
|
-
}, jsRewriteImports = (content, replacements) => rewriteSpecifiers(content, compileSpecifierRewriter(Object.fromEntries(replacements)), { sweep: false }), rewriteBuildOutputs = async (outputs, vendorPaths) => {
|
|
1133
|
-
if (Object.keys(vendorPaths).length === 0)
|
|
1134
|
-
return;
|
|
1135
|
-
await Promise.all(outputs.filter(isReadableArtifact).map((artifact) => rewriteArtifact(artifact, vendorPaths)));
|
|
1136
1050
|
}, isReadableArtifact = (artifact) => artifact.path.endsWith(".js"), readArtifactText = async (artifact) => {
|
|
1137
1051
|
try {
|
|
1138
1052
|
return await artifact.text();
|
|
@@ -1207,12 +1121,12 @@ var serverCacheRoot, compiledModuleCache, ANGULAR_SPECIFIER_RE, getCachedModuleP
|
|
|
1207
1121
|
const relativeSourcePath = relative(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
1208
1122
|
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
1209
1123
|
return join3(serverCacheRoot, `${normalizedSourcePath}.server.js`);
|
|
1210
|
-
}, collectVendorPaths = (
|
|
1124
|
+
}, collectVendorPaths = (code) => {
|
|
1211
1125
|
const vendorPaths = {};
|
|
1212
1126
|
if (!isProductionRuntime()) {
|
|
1213
1127
|
return vendorPaths;
|
|
1214
1128
|
}
|
|
1215
|
-
const specifiers = new Set([...
|
|
1129
|
+
const specifiers = new Set([...code.matchAll(ANGULAR_SPECIFIER_RE)].map((match) => match[1]));
|
|
1216
1130
|
specifiers.forEach((specifier) => {
|
|
1217
1131
|
if (!specifier)
|
|
1218
1132
|
return;
|
|
@@ -1237,8 +1151,8 @@ var serverCacheRoot, compiledModuleCache, ANGULAR_SPECIFIER_RE, getCachedModuleP
|
|
|
1237
1151
|
throw new Error(`Failed to compile Angular island server module for "${sourcePath}":
|
|
1238
1152
|
${message}`);
|
|
1239
1153
|
}
|
|
1240
|
-
const
|
|
1241
|
-
const rewritten = rewriteImportsInContent(
|
|
1154
|
+
const code = await entry.text();
|
|
1155
|
+
const rewritten = rewriteImportsInContent(code, collectVendorPaths(code));
|
|
1242
1156
|
const modulePath = getCachedModulePath(sourcePath);
|
|
1243
1157
|
await mkdir(dirname(modulePath), { recursive: true });
|
|
1244
1158
|
await Bun.write(modulePath, rewritten);
|
|
@@ -1460,26 +1374,6 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
|
|
|
1460
1374
|
});
|
|
1461
1375
|
|
|
1462
1376
|
// src/build/stylePreprocessor.ts
|
|
1463
|
-
var exports_stylePreprocessor = {};
|
|
1464
|
-
__export(exports_stylePreprocessor, {
|
|
1465
|
-
addStyleImporter: () => addStyleImporter,
|
|
1466
|
-
compileStyleFileIfNeeded: () => compileStyleFileIfNeeded,
|
|
1467
|
-
compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
|
|
1468
|
-
compileStyleSource: () => compileStyleSource,
|
|
1469
|
-
createStylePreprocessorPlugin: () => createStylePreprocessorPlugin,
|
|
1470
|
-
createStyleTransformConfig: () => createStyleTransformConfig,
|
|
1471
|
-
createSvelteStylePreprocessor: () => createSvelteStylePreprocessor,
|
|
1472
|
-
findStyleEntriesImporting: () => findStyleEntriesImporting,
|
|
1473
|
-
forgetStyleEntry: () => forgetStyleEntry,
|
|
1474
|
-
getCssOutputExtension: () => getCssOutputExtension,
|
|
1475
|
-
getStyleBaseName: () => getStyleBaseName,
|
|
1476
|
-
isPreprocessableStylePath: () => isPreprocessableStylePath,
|
|
1477
|
-
isStyleModulePath: () => isStyleModulePath,
|
|
1478
|
-
isStylePath: () => isStylePath,
|
|
1479
|
-
recordStyleOutput: () => recordStyleOutput,
|
|
1480
|
-
stylePreprocessorPlugin: () => stylePreprocessorPlugin
|
|
1481
|
-
});
|
|
1482
|
-
import { createHash } from "crypto";
|
|
1483
1377
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
1484
1378
|
import { readFile } from "fs/promises";
|
|
1485
1379
|
import { createRequire } from "module";
|
|
@@ -1810,16 +1704,6 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
1810
1704
|
importers.push(entry);
|
|
1811
1705
|
}
|
|
1812
1706
|
return importers;
|
|
1813
|
-
}, recordStyleOutput = (entry, css) => {
|
|
1814
|
-
const key = resolve3(entry);
|
|
1815
|
-
const hash = createHash("sha1").update(css).digest("hex");
|
|
1816
|
-
const previous = styleOutputHashes.get(key);
|
|
1817
|
-
styleOutputHashes.set(key, hash);
|
|
1818
|
-
return previous !== hash;
|
|
1819
|
-
}, forgetStyleEntry = (entry) => {
|
|
1820
|
-
const key = resolve3(entry);
|
|
1821
|
-
styleDependencyGraph.delete(key);
|
|
1822
|
-
styleOutputHashes.delete(key);
|
|
1823
1707
|
}, compileStyleSource = async (filePath, source, languageHint, config) => {
|
|
1824
1708
|
const language = getStyleLanguage(languageHint ?? filePath);
|
|
1825
1709
|
const rawContents = source ?? await readFile(filePath, "utf-8");
|
|
@@ -2050,7 +1934,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
|
|
|
2050
1934
|
throw new Error(`Unable to compile ${filePath}: Stylus styleUrl preprocessing is async-only. Import the Stylus file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
|
|
2051
1935
|
}
|
|
2052
1936
|
return resolveCssImportsSync(rawContents, dirname2(filePath), new Set([filePath]));
|
|
2053
|
-
}
|
|
1937
|
+
};
|
|
2054
1938
|
var init_stylePreprocessor = __esm(() => {
|
|
2055
1939
|
CSS_EXTENSION_PATTERN = /\.css$/i;
|
|
2056
1940
|
STYLE_EXTENSION_PATTERN = /\.(s[ac]ss|less|styl(?:us)?)$/i;
|
|
@@ -2287,8 +2171,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
|
|
|
2287
2171
|
return;
|
|
2288
2172
|
}
|
|
2289
2173
|
await Bun.write(path, content);
|
|
2290
|
-
}, stripExports = (
|
|
2291
|
-
const lines =
|
|
2174
|
+
}, stripExports = (code) => code.replace(/export\s+default/, "const script ="), mergeVueImports = (code) => {
|
|
2175
|
+
const lines = code.split(`
|
|
2292
2176
|
`);
|
|
2293
2177
|
const specifierSet = new Set;
|
|
2294
2178
|
const vueImportRegex = /^import\s+{([^}]+)}\s+from\s+['"]vue['"];?$/;
|
|
@@ -2640,5 +2524,5 @@ export {
|
|
|
2640
2524
|
renderIslandMarkup
|
|
2641
2525
|
};
|
|
2642
2526
|
|
|
2643
|
-
//# debugId=
|
|
2527
|
+
//# debugId=C93C10C40BC59F0864756E2164756E21
|
|
2644
2528
|
//# sourceMappingURL=index.js.map
|