@absolutejs/absolute 0.20.0-beta.6 → 0.20.0-beta.61
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/README.md +205 -0
- package/dist/angular/browser.js +392 -405
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +7 -7
- package/dist/angular/components/core/streamingSlotRegistry.js +4 -4
- package/dist/angular/index.js +379 -321
- package/dist/angular/index.js.map +8 -7
- package/dist/angular/server.js +133 -61
- package/dist/angular/server.js.map +8 -7
- package/dist/build.js +2336 -1347
- package/dist/build.js.map +22 -17
- package/dist/cli/config/client.js +12 -12
- package/dist/cli/config/server.js +1140 -1091
- package/dist/cli/index.js +10107 -2126
- package/dist/client/chunks/angularPatch-arh4sr68.js +157 -0
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +10 -0
- package/dist/client/chunks/index-5py90ctf.js +87 -0
- package/dist/client/chunks/index-5py90ctf.js.map +10 -0
- package/dist/client/chunks/index-m35nbkdp.js +374 -0
- package/dist/client/chunks/index-m35nbkdp.js.map +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js.map +9 -0
- package/dist/client/chunks/islands-xj2n8nwf.js +281 -0
- package/dist/client/chunks/islands-xj2n8nwf.js.map +14 -0
- package/dist/client/chunks/react-pdg4325x.js +65 -0
- package/dist/client/chunks/react-pdg4325x.js.map +10 -0
- package/dist/client/chunks/svelte-s0c964kb.js +19 -0
- package/dist/client/chunks/svelte-s0c964kb.js.map +10 -0
- package/dist/client/chunks/vue-rdskrnyg.js +24 -0
- package/dist/client/chunks/vue-rdskrnyg.js.map +10 -0
- package/dist/client/index.js +73 -841
- package/dist/client/index.js.map +7 -20
- package/dist/core/streamingSlotRegistrar.js +15 -13
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +11 -9
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/hmrClient.ts +35 -3
- package/dist/dev/client/hmrTiming.ts +6 -0
- package/dist/dev/client/syncDevtools.ts +237 -0
- package/dist/dev/serverBootstrap.js +28 -0
- package/dist/image-client/imageClient.js +7 -7
- package/dist/index.js +3756 -2361
- package/dist/index.js.map +38 -30
- package/dist/islands/browser.js +11 -25
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +55 -52
- package/dist/islands/index.js.map +5 -4
- package/dist/mobile/browser.js +429 -20
- package/dist/mobile/browser.js.map +8 -5
- package/dist/mobile/index.js +11287 -3348
- package/dist/mobile/index.js.map +47 -18
- package/dist/mobile/remoteMacAgentEntry.js +1374 -14
- package/dist/mobile/shellAuth.js +36 -0
- package/dist/mobile/shellBootstrap.js +1800 -0
- package/dist/mobile/shellExpoAuth.js +163 -0
- package/dist/mobile/shellExpoDevices.js +77 -0
- package/dist/mobile/shellExpoSync.js +104 -0
- package/dist/mobile/shellSync.js +184 -0
- package/dist/mobile/shellUpdate.js +532 -0
- package/dist/mobile/uiPrimitives.js +264 -0
- package/dist/react/browser.js +17 -59
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +107 -107
- package/dist/react/components/index.js +118 -116
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -25
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +110 -67
- package/dist/react/index.js.map +8 -7
- package/dist/react/jsxDevRuntimeCompat.js +11 -9
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +11 -9
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +9 -7
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +9 -7
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +67 -11
- package/dist/react/server.js.map +7 -6
- package/dist/src/build/pwa.d.ts +16 -0
- package/dist/src/cli/config/server.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/cli/scripts/dev.d.ts +2 -0
- package/dist/src/client/browserTranslation.d.ts +19 -0
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/core/browserTranslation.d.ts +6 -0
- package/dist/src/core/devBuild.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +376 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/devCert.d.ts +6 -4
- package/dist/src/dev/serverEntryCopies.d.ts +3 -0
- package/dist/src/ember/browser.d.ts +0 -16
- package/dist/src/mobile/adaptiveShell.d.ts +27 -0
- package/dist/src/mobile/androidEmulatorController.d.ts +8 -1
- package/dist/src/mobile/androidRelease.d.ts +9 -2
- package/dist/src/mobile/androidTestReport.d.ts +14 -0
- package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
- package/dist/src/mobile/androidWebView.d.ts +1 -0
- package/dist/src/mobile/browser.d.ts +2 -0
- package/dist/src/mobile/capacitorBundle.d.ts +19 -0
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +10 -1
- package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
- package/dist/src/mobile/deviceCapabilities.d.ts +49 -0
- package/dist/src/mobile/expoBridge.d.ts +91 -0
- package/dist/src/mobile/expoDevController.d.ts +56 -0
- package/dist/src/mobile/expoProject.d.ts +16 -0
- package/dist/src/mobile/index.d.ts +23 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosPhysicalDeviceTransport.d.ts +16 -0
- package/dist/src/mobile/iosRelease.d.ts +63 -3
- package/dist/src/mobile/iosSimulatorController.d.ts +20 -2
- package/dist/src/mobile/iosTestReport.d.ts +24 -0
- package/dist/src/mobile/mobileBundleInspection.d.ts +63 -0
- package/dist/src/mobile/mobileInspect.d.ts +142 -0
- package/dist/src/mobile/mobilePreview.d.ts +174 -0
- package/dist/src/mobile/mobilePreviewClient.d.ts +1 -0
- package/dist/src/mobile/nativeAuth.d.ts +6 -0
- package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
- package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
- package/dist/src/mobile/nativeRoute.d.ts +13 -0
- package/dist/src/mobile/nativeTestReport.d.ts +91 -0
- package/dist/src/mobile/nativeUpdates.d.ts +4 -0
- package/dist/src/mobile/navigationLifecycle.d.ts +36 -0
- package/dist/src/mobile/navigationState.d.ts +53 -0
- package/dist/src/mobile/pageProtocol.d.ts +2 -0
- package/dist/src/mobile/releaseDoctor.d.ts +23 -1
- package/dist/src/mobile/remoteMacProtocol.d.ts +134 -1
- package/dist/src/mobile/remoteMacWire.d.ts +1 -1
- package/dist/src/mobile/shellAuth.d.ts +8 -1
- package/dist/src/mobile/shellBootstrap.d.ts +15 -2
- package/dist/src/mobile/shellExpoAuth.d.ts +12 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +3 -0
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/dist/src/mobile/shellHttp.d.ts +2 -0
- package/dist/src/mobile/shellPush.d.ts +11 -0
- package/dist/src/mobile/shellSync.d.ts +46 -1
- package/dist/src/mobile/shellUpdate.d.ts +2 -0
- package/dist/src/mobile/syncRemediation.d.ts +10 -0
- package/dist/src/mobile/syncSchema.d.ts +9 -0
- package/dist/src/mobile/transport.d.ts +15 -0
- package/dist/src/mobile/uiPrimitives.d.ts +37 -0
- package/dist/src/mobile/updateClient.d.ts +44 -0
- package/dist/src/mobile/updateProtocol.d.ts +51 -0
- package/dist/src/mobile/updatePublisher.d.ts +66 -0
- package/dist/src/mobile/updateRollout.d.ts +16 -0
- package/dist/src/mobile/updateRuntime.d.ts +27 -0
- package/dist/src/mobile/updateSigning.d.ts +20 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/src/plugins/imageOptimizer.d.ts +1 -1
- package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
- package/dist/src/utils/imageProcessing.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +1 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -1
- package/dist/src/vue/browser.d.ts +1 -0
- package/dist/src/vue/browserTranslation.d.ts +5 -0
- package/dist/src/vue/index.d.ts +1 -0
- package/dist/svelte/browser.js +12 -26
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +104 -61
- package/dist/svelte/index.js.map +8 -7
- package/dist/svelte/server.js +84 -28
- package/dist/svelte/server.js.map +7 -6
- package/dist/types/build.d.ts +64 -3
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/vue/browser.js +116 -56
- package/dist/vue/browser.js.map +5 -3
- package/dist/vue/components/Image.js +9 -7
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +11 -9
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +211 -94
- package/dist/vue/index.js.map +10 -7
- package/dist/vue/server.js +69 -13
- package/dist/vue/server.js.map +7 -6
- package/package.json +40 -14
package/dist/islands/browser.js
CHANGED
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -198,22 +200,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
198
200
|
return store;
|
|
199
201
|
};
|
|
200
202
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
201
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
202
|
-
for (const instance of instances) {
|
|
203
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
var initializeIslandStores = (state) => {
|
|
207
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
208
|
-
const nextSnapshot = {
|
|
209
|
-
...state,
|
|
210
|
-
...currentSnapshot
|
|
211
|
-
};
|
|
212
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
213
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
214
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
203
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
218
204
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
219
205
|
let currentSelection = selector(store.getState());
|
|
@@ -232,10 +218,10 @@ var renderIslandMarkup = async () => {
|
|
|
232
218
|
throw new Error('renderIslandMarkup is server-only. Import from "@absolutejs/absolute/islands" on the server.');
|
|
233
219
|
};
|
|
234
220
|
export {
|
|
235
|
-
|
|
221
|
+
createIslandStore,
|
|
236
222
|
defineIslandRegistry,
|
|
237
|
-
|
|
223
|
+
renderIslandMarkup
|
|
238
224
|
};
|
|
239
225
|
|
|
240
|
-
//# debugId=
|
|
226
|
+
//# debugId=BBE74BFBE392DC2464756E2164756E21
|
|
241
227
|
//# 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,UAAkC,CAAC;AAAA,EACzC,IAAI,QAAQ;AAAA,EAEZ,YAAY,KAAK,UAAU,OAAO,QAAQ,QAAQ,GAAG;AAAA,IACpD,IAAI,CAAC,IAAI,WAAW,MAAM;AAAA,MAAG;AAAA,IAE7B,MAAM,YAAY,IAAI,MAAM,OAAO,MAAM;AAAA,IACzC,IAAI,CAAC;AAAA,MAAW;AAAA,IAEh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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": "BBE74BFBE392DC2464756E2164756E21",
|
|
14
14
|
"names": []
|
|
15
15
|
}
|
package/dist/islands/index.js
CHANGED
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -438,6 +440,20 @@ var init_registerClientScript = __esm(() => {
|
|
|
438
440
|
}
|
|
439
441
|
});
|
|
440
442
|
|
|
443
|
+
// src/core/browserTranslation.ts
|
|
444
|
+
var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BASELINE_SCRIPT, browserTranslationBaselineTag = () => `<script>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`, injectBrowserTranslationBaseline = (html) => {
|
|
445
|
+
if (html.includes(BASELINE_MARKER))
|
|
446
|
+
return html;
|
|
447
|
+
const script = browserTranslationBaselineTag();
|
|
448
|
+
const closingBodyIndex = html.lastIndexOf("</body>");
|
|
449
|
+
if (closingBodyIndex < 0)
|
|
450
|
+
return `${html}${script}`;
|
|
451
|
+
return `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;
|
|
452
|
+
};
|
|
453
|
+
var init_browserTranslation = __esm(() => {
|
|
454
|
+
BROWSER_TRANSLATION_BASELINE_SCRIPT = "window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();" + "{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__;" + 'if(r)for(const e of [r,...r.querySelectorAll("*")]){' + "const t=new Map();for(const [i,n]of[...e.childNodes].entries())" + 'if(n.nodeType===3)t.set(i,n.nodeValue??"");if(t.size)b.set(e,t);}}';
|
|
455
|
+
});
|
|
456
|
+
|
|
441
457
|
// src/angular/httpTransferCache.ts
|
|
442
458
|
var ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER = "x-skip-transfer-cache", buildAbsoluteHttpTransferCacheOptions = (options = {}) => {
|
|
443
459
|
const {
|
|
@@ -490,7 +506,7 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
490
506
|
}
|
|
491
507
|
return html + snippet;
|
|
492
508
|
}, injectSsrScripts = (html, requestId, indexPath, requestContext) => {
|
|
493
|
-
let result = html;
|
|
509
|
+
let result = injectBeforeClose(html, browserTranslationBaselineTag());
|
|
494
510
|
const registeredScripts = getAndClearClientScripts(requestId);
|
|
495
511
|
if (registeredScripts.length > 0) {
|
|
496
512
|
result = injectBeforeClose(result, generateClientScriptCode(registeredScripts));
|
|
@@ -526,6 +542,7 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
526
542
|
};
|
|
527
543
|
var init_ssrRender = __esm(() => {
|
|
528
544
|
init_registerClientScript();
|
|
545
|
+
init_browserTranslation();
|
|
529
546
|
routeContextCache = new Map;
|
|
530
547
|
selectorCache = new Map;
|
|
531
548
|
});
|
|
@@ -533,10 +550,10 @@ var init_ssrRender = __esm(() => {
|
|
|
533
550
|
// src/angular/islands.ts
|
|
534
551
|
var exports_islands = {};
|
|
535
552
|
__export(exports_islands, {
|
|
536
|
-
|
|
537
|
-
mountAngularIsland: () => mountAngularIsland,
|
|
553
|
+
getAngularIslandSelector: () => getAngularIslandSelector,
|
|
538
554
|
isAngularComponent: () => isAngularComponent,
|
|
539
|
-
|
|
555
|
+
mountAngularIsland: () => mountAngularIsland,
|
|
556
|
+
renderAngularIslandToHtml: () => renderAngularIslandToHtml
|
|
540
557
|
});
|
|
541
558
|
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
542
559
|
const firstChild = rootElement.firstElementChild;
|
|
@@ -598,8 +615,10 @@ var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_i
|
|
|
598
615
|
const propsToken = new InjectionToken(`${wrapperKey}:props`);
|
|
599
616
|
|
|
600
617
|
class AngularIslandWrapperComponent {
|
|
601
|
-
|
|
602
|
-
|
|
618
|
+
constructor() {
|
|
619
|
+
this.component = component;
|
|
620
|
+
this.props = inject(propsToken);
|
|
621
|
+
}
|
|
603
622
|
}
|
|
604
623
|
return {
|
|
605
624
|
deps,
|
|
@@ -1048,13 +1067,13 @@ var init_nativeRewrite = __esm(() => {
|
|
|
1048
1067
|
// src/build/rewriteImportsPlugin.ts
|
|
1049
1068
|
var exports_rewriteImportsPlugin = {};
|
|
1050
1069
|
__export(exports_rewriteImportsPlugin, {
|
|
1051
|
-
|
|
1052
|
-
rewriteImportsInContent: () => rewriteImportsInContent,
|
|
1053
|
-
rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
|
|
1054
|
-
rewriteBuildOutputs: () => rewriteBuildOutputs,
|
|
1055
|
-
jsRewriteImports: () => jsRewriteImports,
|
|
1070
|
+
buildWithImportRewrite: () => buildWithImportRewrite,
|
|
1056
1071
|
fixMissingReExportNamespacesInContent: () => fixMissingReExportNamespacesInContent,
|
|
1057
|
-
|
|
1072
|
+
jsRewriteImports: () => jsRewriteImports,
|
|
1073
|
+
rewriteBuildOutputs: () => rewriteBuildOutputs,
|
|
1074
|
+
rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
|
|
1075
|
+
rewriteImportsInContent: () => rewriteImportsInContent,
|
|
1076
|
+
rewriteVendorDirectories: () => rewriteVendorDirectories
|
|
1058
1077
|
});
|
|
1059
1078
|
import { readdir } from "fs/promises";
|
|
1060
1079
|
import { join as join2 } from "path";
|
|
@@ -1488,22 +1507,22 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
|
|
|
1488
1507
|
// src/build/stylePreprocessor.ts
|
|
1489
1508
|
var exports_stylePreprocessor = {};
|
|
1490
1509
|
__export(exports_stylePreprocessor, {
|
|
1491
|
-
|
|
1492
|
-
recordStyleOutput: () => recordStyleOutput,
|
|
1493
|
-
isStylePath: () => isStylePath,
|
|
1494
|
-
isStyleModulePath: () => isStyleModulePath,
|
|
1495
|
-
isPreprocessableStylePath: () => isPreprocessableStylePath,
|
|
1496
|
-
getStyleBaseName: () => getStyleBaseName,
|
|
1497
|
-
getCssOutputExtension: () => getCssOutputExtension,
|
|
1498
|
-
forgetStyleEntry: () => forgetStyleEntry,
|
|
1499
|
-
findStyleEntriesImporting: () => findStyleEntriesImporting,
|
|
1500
|
-
createSvelteStylePreprocessor: () => createSvelteStylePreprocessor,
|
|
1501
|
-
createStyleTransformConfig: () => createStyleTransformConfig,
|
|
1502
|
-
createStylePreprocessorPlugin: () => createStylePreprocessorPlugin,
|
|
1503
|
-
compileStyleSource: () => compileStyleSource,
|
|
1504
|
-
compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
|
|
1510
|
+
addStyleImporter: () => addStyleImporter,
|
|
1505
1511
|
compileStyleFileIfNeeded: () => compileStyleFileIfNeeded,
|
|
1506
|
-
|
|
1512
|
+
compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
|
|
1513
|
+
compileStyleSource: () => compileStyleSource,
|
|
1514
|
+
createStylePreprocessorPlugin: () => createStylePreprocessorPlugin,
|
|
1515
|
+
createStyleTransformConfig: () => createStyleTransformConfig,
|
|
1516
|
+
createSvelteStylePreprocessor: () => createSvelteStylePreprocessor,
|
|
1517
|
+
findStyleEntriesImporting: () => findStyleEntriesImporting,
|
|
1518
|
+
forgetStyleEntry: () => forgetStyleEntry,
|
|
1519
|
+
getCssOutputExtension: () => getCssOutputExtension,
|
|
1520
|
+
getStyleBaseName: () => getStyleBaseName,
|
|
1521
|
+
isPreprocessableStylePath: () => isPreprocessableStylePath,
|
|
1522
|
+
isStyleModulePath: () => isStyleModulePath,
|
|
1523
|
+
isStylePath: () => isStylePath,
|
|
1524
|
+
recordStyleOutput: () => recordStyleOutput,
|
|
1525
|
+
stylePreprocessorPlugin: () => stylePreprocessorPlugin
|
|
1507
1526
|
});
|
|
1508
1527
|
import { createHash } from "crypto";
|
|
1509
1528
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
@@ -2638,22 +2657,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
2638
2657
|
return store;
|
|
2639
2658
|
};
|
|
2640
2659
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
2641
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
2642
|
-
for (const instance of instances) {
|
|
2643
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
2644
|
-
}
|
|
2645
|
-
};
|
|
2646
|
-
var initializeIslandStores = (state) => {
|
|
2647
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
2648
|
-
const nextSnapshot = {
|
|
2649
|
-
...state,
|
|
2650
|
-
...currentSnapshot
|
|
2651
|
-
};
|
|
2652
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
2653
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
2654
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
2655
|
-
}
|
|
2656
|
-
};
|
|
2657
2660
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
2658
2661
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
2659
2662
|
let currentSelection = selector(store.getState());
|
|
@@ -2667,10 +2670,10 @@ var subscribeIslandStore = (store, selector, listener) => {
|
|
|
2667
2670
|
});
|
|
2668
2671
|
};
|
|
2669
2672
|
export {
|
|
2670
|
-
|
|
2673
|
+
createIslandStore,
|
|
2671
2674
|
defineIslandRegistry,
|
|
2672
|
-
|
|
2675
|
+
renderIslandMarkup
|
|
2673
2676
|
};
|
|
2674
2677
|
|
|
2675
|
-
//# debugId=
|
|
2678
|
+
//# debugId=8A5897069ABB4BED64756E2164756E21
|
|
2676
2679
|
//# sourceMappingURL=index.js.map
|