@absolutejs/absolute 0.20.0-beta.56 → 0.20.0-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/browser.js +1 -45
- package/dist/angular/browser.js.map +2 -2
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +1 -17
- package/dist/angular/index.js.map +2 -2
- package/dist/build.js +8 -2
- package/dist/build.js.map +3 -3
- 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 +56 -947
- package/dist/client/index.js.map +7 -22
- package/dist/index.js +8 -2
- package/dist/index.js.map +3 -3
- package/dist/islands/browser.js +1 -17
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +1 -17
- package/dist/islands/index.js.map +2 -2
- package/dist/react/browser.js +1 -45
- package/dist/react/browser.js.map +2 -2
- package/dist/react/hooks/index.js +1 -17
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +1 -17
- package/dist/react/index.js.map +2 -2
- package/dist/svelte/browser.js +1 -17
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +1 -17
- package/dist/svelte/index.js.map +2 -2
- package/dist/vue/browser.js +84 -121
- package/dist/vue/browser.js.map +4 -4
- package/dist/vue/index.js +84 -121
- package/dist/vue/index.js.map +4 -4
- package/package.json +9 -7
package/dist/vue/browser.js
CHANGED
|
@@ -126,82 +126,6 @@ var init_islandMarkupAttributes = __esm(() => {
|
|
|
126
126
|
init_islands();
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
-
// src/client/browserTranslation.ts
|
|
130
|
-
var translationRestorer = (restore, hasTranslation) => Object.assign(restore, { hasTranslation }), emptyTranslationRestorer = () => translationRestorer(() => {
|
|
131
|
-
return;
|
|
132
|
-
}, false), textNodeAt = (parent, index) => {
|
|
133
|
-
const node = parent.childNodes[index];
|
|
134
|
-
return node instanceof Text ? node : undefined;
|
|
135
|
-
}, visitElements = (root, visit) => {
|
|
136
|
-
visit(root);
|
|
137
|
-
for (const element of root.querySelectorAll("*"))
|
|
138
|
-
visit(element);
|
|
139
|
-
}, elementPath = (root, element) => {
|
|
140
|
-
const path = [];
|
|
141
|
-
let current = element;
|
|
142
|
-
while (current !== root) {
|
|
143
|
-
const parent = current.parentElement;
|
|
144
|
-
if (parent === null)
|
|
145
|
-
return null;
|
|
146
|
-
path.unshift([...parent.children].indexOf(current));
|
|
147
|
-
current = parent;
|
|
148
|
-
}
|
|
149
|
-
return path;
|
|
150
|
-
}, elementAtPath = (root, path) => {
|
|
151
|
-
let current = root;
|
|
152
|
-
for (const index of path) {
|
|
153
|
-
const child = current.children[index];
|
|
154
|
-
if (!(child instanceof Element))
|
|
155
|
-
return null;
|
|
156
|
-
current = child;
|
|
157
|
-
}
|
|
158
|
-
return current;
|
|
159
|
-
}, captureSsrTextBaselines = (root) => {
|
|
160
|
-
if (root === null || typeof window === "undefined")
|
|
161
|
-
return;
|
|
162
|
-
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap;
|
|
163
|
-
visitElements(root, (element) => {
|
|
164
|
-
const text = new Map;
|
|
165
|
-
for (const [index, node] of [...element.childNodes].entries()) {
|
|
166
|
-
if (node.nodeType === Node.TEXT_NODE)
|
|
167
|
-
text.set(index, node.nodeValue ?? "");
|
|
168
|
-
}
|
|
169
|
-
if (text.size > 0)
|
|
170
|
-
baselines.set(element, text);
|
|
171
|
-
});
|
|
172
|
-
window.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;
|
|
173
|
-
}, prepareBrowserTranslationHydration = (root) => {
|
|
174
|
-
if (root === null || typeof window === "undefined")
|
|
175
|
-
return emptyTranslationRestorer();
|
|
176
|
-
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;
|
|
177
|
-
if (baselines === undefined)
|
|
178
|
-
return emptyTranslationRestorer();
|
|
179
|
-
const translated = [];
|
|
180
|
-
visitElements(root, (element) => {
|
|
181
|
-
const text = baselines.get(element);
|
|
182
|
-
const path = elementPath(root, element);
|
|
183
|
-
if (text === undefined || path === null)
|
|
184
|
-
return;
|
|
185
|
-
for (const [index, baseline] of text) {
|
|
186
|
-
const node = textNodeAt(element, index);
|
|
187
|
-
if (node === undefined || node.data === baseline)
|
|
188
|
-
continue;
|
|
189
|
-
translated.push({ baseline, index, path, translated: node.data });
|
|
190
|
-
node.data = baseline;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
return translationRestorer(() => {
|
|
194
|
-
for (const snapshot of translated) {
|
|
195
|
-
const parent = elementAtPath(root, snapshot.path);
|
|
196
|
-
if (parent === null)
|
|
197
|
-
continue;
|
|
198
|
-
const node = textNodeAt(parent, snapshot.index);
|
|
199
|
-
if (node !== undefined && node.data === snapshot.baseline)
|
|
200
|
-
node.data = snapshot.translated;
|
|
201
|
-
}
|
|
202
|
-
}, translated.length > 0);
|
|
203
|
-
};
|
|
204
|
-
|
|
205
129
|
// src/vue/Island.browser.ts
|
|
206
130
|
import { defineComponent, h } from "vue";
|
|
207
131
|
|
|
@@ -230,34 +154,6 @@ var isMatchingIslandElement = (element, props) => {
|
|
|
230
154
|
const attributes = getIslandMarkerAttributes(props);
|
|
231
155
|
return element.dataset.island === "true" && element.dataset.component === attributes["data-component"] && element.dataset.framework === attributes["data-framework"] && (element.dataset.hydrate ?? "load") === attributes["data-hydrate"] && (element.dataset.props ?? "{}") === attributes["data-props"];
|
|
232
156
|
};
|
|
233
|
-
var snapshotIslandElement = (element, snapshotMap) => {
|
|
234
|
-
const signature = [
|
|
235
|
-
element.dataset.component,
|
|
236
|
-
element.dataset.framework,
|
|
237
|
-
element.dataset.hydrate ?? "load",
|
|
238
|
-
element.dataset.props ?? "{}"
|
|
239
|
-
].join("::");
|
|
240
|
-
const existing = snapshotMap.get(signature) ?? [];
|
|
241
|
-
const attributes = Object.fromEntries(element.getAttributeNames().map((name) => [name, element.getAttribute(name) ?? ""]));
|
|
242
|
-
existing.push({
|
|
243
|
-
attributes,
|
|
244
|
-
innerHTML: element.innerHTML
|
|
245
|
-
});
|
|
246
|
-
snapshotMap.set(signature, existing);
|
|
247
|
-
};
|
|
248
|
-
var initializeIslandMarkupSnapshot = () => {
|
|
249
|
-
if (typeof document === "undefined") {
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
const snapshotMap = getSnapshotMap();
|
|
253
|
-
if (!snapshotMap || snapshotMap.size > 0) {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
const elements = Array.from(document.querySelectorAll('[data-island="true"]'));
|
|
257
|
-
for (const element of elements) {
|
|
258
|
-
snapshotIslandElement(element, snapshotMap);
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
157
|
var preserveIslandMarkup = (props) => {
|
|
262
158
|
if (typeof document === "undefined") {
|
|
263
159
|
return {
|
|
@@ -488,22 +384,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
488
384
|
return store;
|
|
489
385
|
};
|
|
490
386
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
491
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
492
|
-
for (const instance of instances) {
|
|
493
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
var initializeIslandStores = (state) => {
|
|
497
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
498
|
-
const nextSnapshot = {
|
|
499
|
-
...state,
|
|
500
|
-
...currentSnapshot
|
|
501
|
-
};
|
|
502
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
503
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
504
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
387
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
508
388
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
509
389
|
let currentSelection = selector(store.getState());
|
|
@@ -539,6 +419,89 @@ var useIslandStore = (store, selector) => {
|
|
|
539
419
|
});
|
|
540
420
|
return state;
|
|
541
421
|
};
|
|
422
|
+
// src/client/browserTranslation.ts
|
|
423
|
+
var translationRestorer = (restore, hasTranslation) => Object.assign(restore, { hasTranslation });
|
|
424
|
+
var emptyTranslationRestorer = () => translationRestorer(() => {
|
|
425
|
+
return;
|
|
426
|
+
}, false);
|
|
427
|
+
var textNodeAt = (parent, index) => {
|
|
428
|
+
const node = parent.childNodes[index];
|
|
429
|
+
return node instanceof Text ? node : undefined;
|
|
430
|
+
};
|
|
431
|
+
var visitElements = (root, visit) => {
|
|
432
|
+
visit(root);
|
|
433
|
+
for (const element of root.querySelectorAll("*"))
|
|
434
|
+
visit(element);
|
|
435
|
+
};
|
|
436
|
+
var elementPath = (root, element) => {
|
|
437
|
+
const path = [];
|
|
438
|
+
let current = element;
|
|
439
|
+
while (current !== root) {
|
|
440
|
+
const parent = current.parentElement;
|
|
441
|
+
if (parent === null)
|
|
442
|
+
return null;
|
|
443
|
+
path.unshift([...parent.children].indexOf(current));
|
|
444
|
+
current = parent;
|
|
445
|
+
}
|
|
446
|
+
return path;
|
|
447
|
+
};
|
|
448
|
+
var elementAtPath = (root, path) => {
|
|
449
|
+
let current = root;
|
|
450
|
+
for (const index of path) {
|
|
451
|
+
const child = current.children[index];
|
|
452
|
+
if (!(child instanceof Element))
|
|
453
|
+
return null;
|
|
454
|
+
current = child;
|
|
455
|
+
}
|
|
456
|
+
return current;
|
|
457
|
+
};
|
|
458
|
+
var captureSsrTextBaselines = (root) => {
|
|
459
|
+
if (root === null || typeof window === "undefined")
|
|
460
|
+
return;
|
|
461
|
+
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap;
|
|
462
|
+
visitElements(root, (element) => {
|
|
463
|
+
const text = new Map;
|
|
464
|
+
for (const [index, node] of [...element.childNodes].entries()) {
|
|
465
|
+
if (node.nodeType === Node.TEXT_NODE)
|
|
466
|
+
text.set(index, node.nodeValue ?? "");
|
|
467
|
+
}
|
|
468
|
+
if (text.size > 0)
|
|
469
|
+
baselines.set(element, text);
|
|
470
|
+
});
|
|
471
|
+
window.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;
|
|
472
|
+
};
|
|
473
|
+
var prepareBrowserTranslationHydration = (root) => {
|
|
474
|
+
if (root === null || typeof window === "undefined")
|
|
475
|
+
return emptyTranslationRestorer();
|
|
476
|
+
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;
|
|
477
|
+
if (baselines === undefined)
|
|
478
|
+
return emptyTranslationRestorer();
|
|
479
|
+
const translated = [];
|
|
480
|
+
visitElements(root, (element) => {
|
|
481
|
+
const text = baselines.get(element);
|
|
482
|
+
const path = elementPath(root, element);
|
|
483
|
+
if (text === undefined || path === null)
|
|
484
|
+
return;
|
|
485
|
+
for (const [index, baseline] of text) {
|
|
486
|
+
const node = textNodeAt(element, index);
|
|
487
|
+
if (node === undefined || node.data === baseline)
|
|
488
|
+
continue;
|
|
489
|
+
translated.push({ baseline, index, path, translated: node.data });
|
|
490
|
+
node.data = baseline;
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
return translationRestorer(() => {
|
|
494
|
+
for (const snapshot of translated) {
|
|
495
|
+
const parent = elementAtPath(root, snapshot.path);
|
|
496
|
+
if (parent === null)
|
|
497
|
+
continue;
|
|
498
|
+
const node = textNodeAt(parent, snapshot.index);
|
|
499
|
+
if (node !== undefined && node.data === snapshot.baseline)
|
|
500
|
+
node.data = snapshot.translated;
|
|
501
|
+
}
|
|
502
|
+
}, translated.length > 0);
|
|
503
|
+
};
|
|
504
|
+
|
|
542
505
|
// src/vue/browserTranslation.ts
|
|
543
506
|
var preserveBrowserTranslation = (strategy) => {
|
|
544
507
|
const translatedStrategy = (hydrate, forEachElement) => strategy(() => {
|
|
@@ -587,5 +550,5 @@ export {
|
|
|
587
550
|
useIslandStore
|
|
588
551
|
};
|
|
589
552
|
|
|
590
|
-
//# debugId=
|
|
553
|
+
//# debugId=15575A0515962BEB64756E2164756E21
|
|
591
554
|
//# sourceMappingURL=browser.js.map
|
package/dist/vue/browser.js.map
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/core/islandManifest.ts", "../src/core/islands.ts", "../src/core/islandMarkupAttributes.ts", "../src/
|
|
3
|
+
"sources": ["../src/core/islandManifest.ts", "../src/core/islands.ts", "../src/core/islandMarkupAttributes.ts", "../src/vue/Island.browser.ts", "../src/client/preserveIslandMarkup.ts", "../src/core/normalizeIslandProps.ts", "../src/vue/createIsland.browser.ts", "../src/vue/useIslandStore.ts", "../node_modules/zustand/esm/vanilla.mjs", "../node_modules/zustand/esm/middleware.mjs", "../src/client/islandStore.ts", "../src/client/browserTranslation.ts", "../src/vue/browserTranslation.ts", "../src/vue/defineVuePage.ts", "../src/vue/routerRedirectProviders.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { IslandFramework } from '../../types/island';\n\nconst toIslandFrameworkSegment = (framework: IslandFramework) =>\n\tframework[0]?.toUpperCase() + framework.slice(1);\n\nconst collectFrameworkIslands = (\n\tmanifest: Record<string, string>,\n\tprefix: string\n) => {\n\tconst entries: Record<string, string> = {};\n\tlet found = false;\n\n\tfor (const [key, value] of Object.entries(manifest)) {\n\t\tif (!key.startsWith(prefix)) continue;\n\n\t\tconst component = key.slice(prefix.length);\n\t\tif (!component) continue;\n\n\t\tentries[component] = value;\n\t\tfound = true;\n\t}\n\n\treturn found ? entries : undefined;\n};\n\nexport const getIslandManifestEntries = (manifest: Record<string, string>) => {\n\tconst islands: Partial<Record<IslandFramework, Record<string, string>>> =\n\t\t{};\n\tconst frameworks: IslandFramework[] = ['react', 'svelte', 'vue', 'angular'];\n\n\tfor (const framework of frameworks) {\n\t\tconst prefix = `Island${toIslandFrameworkSegment(framework)}`;\n\t\tconst entries = collectFrameworkIslands(manifest, prefix);\n\t\tif (entries) islands[framework] = entries;\n\t}\n\n\treturn islands;\n};\nexport const getIslandManifestKey = (\n\tframework: IslandFramework,\n\tcomponent: string\n) => `Island${toIslandFrameworkSegment(framework)}${component}`;\n",
|
|
6
6
|
"import type {\n\tIslandComponentDefinition,\n\tIslandRegistry,\n\tIslandRegistryInput\n} from '../../types/island';\n\nexport const defineIslandComponent = <Component>(\n\tcomponent: Component,\n\toptions: {\n\t\texport?: string;\n\t\tsource: string;\n\t}\n): IslandComponentDefinition<Component> => ({\n\tcomponent,\n\texport: options.export,\n\tsource: options.source\n});\nexport const defineIslandRegistry = <T extends IslandRegistryInput>(\n\tregistry: IslandRegistry<T>\n) => registry;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nexport const getIslandBuildReference = <Component>(\n\tcomponent: Component | IslandComponentDefinition<Component>\n) => {\n\tif (!isIslandComponentDefinition(component)) return null;\n\n\treturn {\n\t\texport: component.export,\n\t\tsource: component.source\n\t};\n};\nexport const isIslandComponentDefinition = <Component>(\n\tvalue: Component | IslandComponentDefinition<Component>\n): value is IslandComponentDefinition<Component> =>\n\tisRecord(value) &&\n\t'component' in value &&\n\t'source' in value &&\n\ttypeof value.source === 'string';\n\nexport function getIslandComponent<Component>(component: Component): Component;\nexport function getIslandComponent<Component>(\n\tcomponent: IslandComponentDefinition<Component>\n): Component;\nexport function getIslandComponent<Component>(\n\tcomponent: Component | IslandComponentDefinition<Component>\n) {\n\tif (isIslandComponentDefinition(component)) {\n\t\treturn component.component;\n\t}\n\n\treturn component;\n}\nexport const parseIslandProps = (rawProps: string | null) => {\n\tif (!rawProps) return {};\n\n\treturn JSON.parse(rawProps);\n};\nexport const serializeIslandProps = (props: unknown) =>\n\tJSON.stringify(props ?? {});\n\nexport {\n\tgetIslandManifestEntries,\n\tgetIslandManifestKey\n} from './islandManifest';\n",
|
|
7
7
|
"import type { RuntimeIslandRenderProps } from '../../types/island';\nimport { serializeIslandProps } from './islands';\n\ntype IslandMarkerAttributes = {\n\t'data-component': string;\n\t'data-framework': string;\n\t'data-hydrate': string;\n\t'data-island': 'true';\n\t'data-island-id'?: string;\n\t'data-props': string;\n};\n\nexport const getIslandMarkerAttributes = (\n\tprops: RuntimeIslandRenderProps,\n\tislandId?: string\n): IslandMarkerAttributes => ({\n\t'data-component': props.component,\n\t'data-framework': props.framework,\n\t'data-hydrate': props.hydrate ?? 'load',\n\t'data-island': 'true',\n\t...(islandId ? { 'data-island-id': islandId } : {}),\n\t'data-props': serializeIslandProps(props.props)\n});\n\nconst escapeHtmlAttribute = (value: string) =>\n\tvalue\n\t\t.replaceAll('&', '&')\n\t\t.replaceAll('\"', '"')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>');\n\nexport const serializeIslandAttributes = (attributes: Record<string, string>) =>\n\tObject.entries(attributes)\n\t\t.map(([key, value]) => `${key}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join(' ');\n",
|
|
8
|
-
"type TextBaseline = ReadonlyMap<number, string>;\ntype SsrTextBaselines = WeakMap<Element, TextBaseline>;\n\ndeclare global {\n\t// Window augmentation requires interface declaration merging.\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n\tinterface Window {\n\t\t__ABSOLUTE_SSR_TEXT_BASELINES__?: SsrTextBaselines;\n\t}\n}\n\ntype TranslatedText = {\n\tbaseline: string;\n\tindex: number;\n\tpath: number[];\n\ttranslated: string;\n};\n\nconst translationRestorer = (restore: () => void, hasTranslation: boolean) =>\n\tObject.assign(restore, { hasTranslation });\n\nconst emptyTranslationRestorer = () =>\n\ttranslationRestorer(() => undefined, false);\n\nconst textNodeAt = (parent: Element, index: number) => {\n\tconst node = parent.childNodes[index];\n\n\treturn node instanceof Text ? node : undefined;\n};\n\nconst visitElements = (root: Element, visit: (element: Element) => void) => {\n\tvisit(root);\n\tfor (const element of root.querySelectorAll('*')) visit(element);\n};\n\nconst elementPath = (root: Element, element: Element) => {\n\tconst path: number[] = [];\n\tlet current = element;\n\twhile (current !== root) {\n\t\tconst parent = current.parentElement;\n\t\tif (parent === null) return null;\n\t\tpath.unshift([...parent.children].indexOf(current));\n\t\tcurrent = parent;\n\t}\n\n\treturn path;\n};\n\nconst elementAtPath = (root: Element, path: number[]) => {\n\tlet current = root;\n\tfor (const index of path) {\n\t\tconst child = current.children[index];\n\t\tif (!(child instanceof Element)) return null;\n\t\tcurrent = child;\n\t}\n\n\treturn current;\n};\n\n/** Capture server-authored text before client modules load. Absolute page\n * handlers install the same snapshot inline; this export supports custom\n * documents and non-standard bootstraps. */\nexport const captureSsrTextBaselines = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined') return;\n\tconst baselines: SsrTextBaselines =\n\t\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap();\n\tvisitElements(root, (element) => {\n\t\tconst text = new Map<number, string>();\n\t\tfor (const [index, node] of [...element.childNodes].entries()) {\n\t\t\tif (node.nodeType === Node.TEXT_NODE)\n\t\t\t\ttext.set(index, node.nodeValue ?? '');\n\t\t}\n\t\tif (text.size > 0) baselines.set(element, text);\n\t});\n\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;\n};\n\n/** Temporarily restore server text while a framework attaches to SSR DOM,\n * then reapply translated text. Paths preserve translations even when a\n * framework replaces nodes while mounting. Genuine server/client mismatches\n * are left unchanged. */\nexport const prepareBrowserTranslationHydration = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined')\n\t\treturn emptyTranslationRestorer();\n\tconst baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;\n\tif (baselines === undefined) return emptyTranslationRestorer();\n\tconst translated: TranslatedText[] = [];\n\tvisitElements(root, (element) => {\n\t\tconst text = baselines.get(element);\n\t\tconst path = elementPath(root, element);\n\t\tif (text === undefined || path === null) return;\n\t\tfor (const [index, baseline] of text) {\n\t\t\tconst node = textNodeAt(element, index);\n\t\t\tif (node === undefined || node.data === baseline) continue;\n\t\t\ttranslated.push({ baseline, index, path, translated: node.data });\n\t\t\tnode.data = baseline;\n\t\t}\n\t});\n\n\treturn translationRestorer(() => {\n\t\tfor (const snapshot of translated) {\n\t\t\tconst parent = elementAtPath(root, snapshot.path);\n\t\t\tif (parent === null) continue;\n\t\t\tconst node = textNodeAt(parent, snapshot.index);\n\t\t\tif (node !== undefined && node.data === snapshot.baseline)\n\t\t\t\tnode.data = snapshot.translated;\n\t\t}\n\t}, translated.length > 0);\n};\n",
|
|
9
8
|
"import { defineComponent, h } from 'vue';\nimport { preserveIslandMarkup } from '../client/preserveIslandMarkup';\nimport { normalizeRuntimeIslandRenderProps } from '../core/normalizeIslandProps';\n\nexport const Island = defineComponent({\n\tname: 'AbsoluteIsland',\n\tprops: {\n\t\tcomponent: {\n\t\t\trequired: true,\n\t\t\ttype: String\n\t\t},\n\t\tframework: {\n\t\t\trequired: true,\n\t\t\ttype: String\n\t\t},\n\t\thydrate: {\n\t\t\trequired: false,\n\t\t\ttype: String\n\t\t},\n\t\t/* Accept either an object or a JSON-serialized string — see\n\t\t the SSR `Island.ts` for the rationale. */\n\t\tprops: {\n\t\t\trequired: false,\n\t\t\ttype: [Object, String]\n\t\t}\n\t},\n\tsetup(rawProps) {\n\t\tconst props = normalizeRuntimeIslandRenderProps(rawProps);\n\n\t\treturn () => {\n\t\t\tconst { attributes, innerHTML } = preserveIslandMarkup(props);\n\n\t\t\treturn h('div', {\n\t\t\t\t...attributes,\n\t\t\t\t'data-allow-mismatch': '',\n\t\t\t\tinnerHTML\n\t\t\t});\n\t\t};\n\t}\n});\n",
|
|
10
9
|
"import type { RuntimeIslandRenderProps } from '../../types/island';\nimport { getIslandMarkerAttributes } from '../core/islandMarkupAttributes';\n\ntype PreservedIslandMarkup = {\n\tattributes: Record<string, string>;\n\tinnerHTML: string;\n};\n\ntype IslandMarkerElement = HTMLElement & {\n\tdataset: DOMStringMap & {\n\t\tcomponent?: string;\n\t\tframework?: string;\n\t\thydrate?: string;\n\t\tisland?: string;\n\t\tislandId?: string;\n\t\tprops?: string;\n\t};\n};\n\nconst getSnapshotMap = () => {\n\tif (typeof window === 'undefined') {\n\t\treturn null;\n\t}\n\n\twindow.__ABS_SERVER_ISLAND_HTML__ ??= new Map<\n\t\tstring,\n\t\tPreservedIslandMarkup[]\n\t>();\n\n\treturn window.__ABS_SERVER_ISLAND_HTML__;\n};\n\nconst getIslandSignature = (props: RuntimeIslandRenderProps) => {\n\tconst attributes = getIslandMarkerAttributes(props);\n\n\treturn [\n\t\tattributes['data-component'],\n\t\tattributes['data-framework'],\n\t\tattributes['data-hydrate'],\n\t\tattributes['data-props']\n\t].join('::');\n};\n\nconst isMatchingIslandElement = (\n\telement: Element,\n\tprops: RuntimeIslandRenderProps\n): element is IslandMarkerElement => {\n\tif (!(element instanceof HTMLElement)) {\n\t\treturn false;\n\t}\n\n\tconst attributes = getIslandMarkerAttributes(props);\n\n\treturn (\n\t\telement.dataset.island === 'true' &&\n\t\telement.dataset.component === attributes['data-component'] &&\n\t\telement.dataset.framework === attributes['data-framework'] &&\n\t\t(element.dataset.hydrate ?? 'load') === attributes['data-hydrate'] &&\n\t\t(element.dataset.props ?? '{}') === attributes['data-props']\n\t);\n};\n\nconst snapshotIslandElement = (\n\telement: HTMLElement,\n\tsnapshotMap: Map<string, PreservedIslandMarkup[]>\n) => {\n\tconst signature = [\n\t\telement.dataset.component,\n\t\telement.dataset.framework,\n\t\telement.dataset.hydrate ?? 'load',\n\t\telement.dataset.props ?? '{}'\n\t].join('::');\n\tconst existing = snapshotMap.get(signature) ?? [];\n\tconst attributes = Object.fromEntries(\n\t\telement\n\t\t\t.getAttributeNames()\n\t\t\t.map((name) => [name, element.getAttribute(name) ?? ''])\n\t);\n\texisting.push({\n\t\tattributes,\n\t\tinnerHTML: element.innerHTML\n\t});\n\tsnapshotMap.set(signature, existing);\n};\n\nexport const initializeIslandMarkupSnapshot = () => {\n\tif (typeof document === 'undefined') {\n\t\treturn;\n\t}\n\n\tconst snapshotMap = getSnapshotMap();\n\tif (!snapshotMap || snapshotMap.size > 0) {\n\t\treturn;\n\t}\n\n\tconst elements = Array.from(\n\t\tdocument.querySelectorAll<HTMLElement>('[data-island=\"true\"]')\n\t);\n\tfor (const element of elements) {\n\t\tsnapshotIslandElement(element, snapshotMap);\n\t}\n};\n\nexport const preserveIslandMarkup = (props: RuntimeIslandRenderProps) => {\n\tif (typeof document === 'undefined') {\n\t\treturn {\n\t\t\tattributes: getIslandMarkerAttributes(props),\n\t\t\tinnerHTML: ''\n\t\t};\n\t}\n\n\tconst snapshotMap = getSnapshotMap();\n\tconst signature = getIslandSignature(props);\n\t// Islands that share a signature (same component, framework, hydrate mode\n\t// and serialized props) produce byte-identical SSR markup, so the first\n\t// captured snapshot is correct for every instance. Returning it\n\t// unconditionally keeps this stateless: React may call the component many\n\t// times during a single hydration (StrictMode double-render, hydration\n\t// retries, mismatch regeneration), and a per-call claim counter would run\n\t// past the snapshot list and yield empty markup — making the host render\n\t// `dangerouslySetInnerHTML={{ __html: '' }}` and wipe the island's\n\t// server-rendered DOM before the island runtime can hydrate it.\n\tconst snapshotCandidate = snapshotMap?.get(signature)?.[0];\n\tif (snapshotCandidate) {\n\t\treturn snapshotCandidate;\n\t}\n\n\t// Snapshot not captured yet (the island runtime module hasn't evaluated):\n\t// fall back to reading the live SSR DOM directly.\n\tconst liveCandidate = Array.from(\n\t\tdocument.querySelectorAll('[data-island=\"true\"]')\n\t).find((element) => isMatchingIslandElement(element, props));\n\tif (!liveCandidate) {\n\t\treturn {\n\t\t\tattributes: getIslandMarkerAttributes(props),\n\t\t\tinnerHTML: ''\n\t\t};\n\t}\n\n\treturn {\n\t\tattributes: Object.fromEntries(\n\t\t\tliveCandidate\n\t\t\t\t.getAttributeNames()\n\t\t\t\t.map((name) => [name, liveCandidate.getAttribute(name) ?? ''])\n\t\t),\n\t\tinnerHTML: liveCandidate.innerHTML\n\t};\n};\n",
|
|
11
10
|
"import type { IslandFramework, IslandHydrate } from '../../types/island';\n\n/* `<Island>` (Vue/Svelte/React/Angular component form) historically took\n `props` as an object, while `<absolute-island>` (custom-element form\n used in HTML/HTMX hosts) takes `props` as a JSON-serialized string.\n The two surfaces have the same mental model — \"render an island\" —\n but a value that's valid in one shape would silently break in the\n other. This helper normalizes whichever shape arrives at runtime. */\nconst EMPTY_PROPS: Record<string, unknown> = {};\n\nconst ISLAND_FRAMEWORKS: readonly IslandFramework[] = [\n\t'react',\n\t'svelte',\n\t'vue',\n\t'angular',\n\t'ember'\n];\n\nconst ISLAND_HYDRATE_MODES: readonly IslandHydrate[] = [\n\t'load',\n\t'idle',\n\t'visible',\n\t'none'\n];\n\nconst isIslandFramework = (value: string): value is IslandFramework =>\n\tISLAND_FRAMEWORKS.some((framework) => framework === value);\n\nconst isIslandHydrate = (value: string): value is IslandHydrate =>\n\tISLAND_HYDRATE_MODES.some((mode) => mode === value);\n\ntype RawIslandProps = {\n\tcomponent: string;\n\tframework: string;\n\thydrate?: string | undefined;\n\tprops: unknown;\n};\n\nexport const normalizeRuntimeIslandRenderProps = (raw: RawIslandProps) => {\n\tconst { component, framework, hydrate, props } = raw;\n\tif (!isIslandFramework(framework)) {\n\t\tthrow new Error(`Unknown island framework: \"${framework}\".`);\n\t}\n\n\tif (hydrate !== undefined && !isIslandHydrate(hydrate)) {\n\t\tthrow new Error(`Unknown island hydrate mode: \"${hydrate}\".`);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tframework,\n\t\thydrate,\n\t\tprops: normalizeIslandProps(props)\n\t};\n};\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst safeJsonParseObject = (raw: string) => {\n\tconst trimmed = raw.trim();\n\tif (!trimmed) return EMPTY_PROPS;\n\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(trimmed);\n\n\t\treturn isPlainObject(parsed) ? parsed : EMPTY_PROPS;\n\t} catch {\n\t\treturn EMPTY_PROPS;\n\t}\n};\n\nexport const normalizeIslandProps = (value: unknown) => {\n\tif (typeof value === 'string') return safeJsonParseObject(value);\n\tif (isPlainObject(value)) return value;\n\n\treturn EMPTY_PROPS;\n};\n",
|
|
@@ -14,11 +13,12 @@
|
|
|
14
13
|
"const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n",
|
|
15
14
|
"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",
|
|
16
15
|
"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",
|
|
16
|
+
"type TextBaseline = ReadonlyMap<number, string>;\ntype SsrTextBaselines = WeakMap<Element, TextBaseline>;\n\ndeclare global {\n\t// Window augmentation requires interface declaration merging.\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n\tinterface Window {\n\t\t__ABSOLUTE_SSR_TEXT_BASELINES__?: SsrTextBaselines;\n\t}\n}\n\ntype TranslatedText = {\n\tbaseline: string;\n\tindex: number;\n\tpath: number[];\n\ttranslated: string;\n};\n\nconst translationRestorer = (restore: () => void, hasTranslation: boolean) =>\n\tObject.assign(restore, { hasTranslation });\n\nconst emptyTranslationRestorer = () =>\n\ttranslationRestorer(() => undefined, false);\n\nconst textNodeAt = (parent: Element, index: number) => {\n\tconst node = parent.childNodes[index];\n\n\treturn node instanceof Text ? node : undefined;\n};\n\nconst visitElements = (root: Element, visit: (element: Element) => void) => {\n\tvisit(root);\n\tfor (const element of root.querySelectorAll('*')) visit(element);\n};\n\nconst elementPath = (root: Element, element: Element) => {\n\tconst path: number[] = [];\n\tlet current = element;\n\twhile (current !== root) {\n\t\tconst parent = current.parentElement;\n\t\tif (parent === null) return null;\n\t\tpath.unshift([...parent.children].indexOf(current));\n\t\tcurrent = parent;\n\t}\n\n\treturn path;\n};\n\nconst elementAtPath = (root: Element, path: number[]) => {\n\tlet current = root;\n\tfor (const index of path) {\n\t\tconst child = current.children[index];\n\t\tif (!(child instanceof Element)) return null;\n\t\tcurrent = child;\n\t}\n\n\treturn current;\n};\n\n/** Capture server-authored text before client modules load. Absolute page\n * handlers install the same snapshot inline; this export supports custom\n * documents and non-standard bootstraps. */\nexport const captureSsrTextBaselines = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined') return;\n\tconst baselines: SsrTextBaselines =\n\t\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap();\n\tvisitElements(root, (element) => {\n\t\tconst text = new Map<number, string>();\n\t\tfor (const [index, node] of [...element.childNodes].entries()) {\n\t\t\tif (node.nodeType === Node.TEXT_NODE)\n\t\t\t\ttext.set(index, node.nodeValue ?? '');\n\t\t}\n\t\tif (text.size > 0) baselines.set(element, text);\n\t});\n\twindow.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;\n};\n\n/** Temporarily restore server text while a framework attaches to SSR DOM,\n * then reapply translated text. Paths preserve translations even when a\n * framework replaces nodes while mounting. Genuine server/client mismatches\n * are left unchanged. */\nexport const prepareBrowserTranslationHydration = (root: Element | null) => {\n\tif (root === null || typeof window === 'undefined')\n\t\treturn emptyTranslationRestorer();\n\tconst baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;\n\tif (baselines === undefined) return emptyTranslationRestorer();\n\tconst translated: TranslatedText[] = [];\n\tvisitElements(root, (element) => {\n\t\tconst text = baselines.get(element);\n\t\tconst path = elementPath(root, element);\n\t\tif (text === undefined || path === null) return;\n\t\tfor (const [index, baseline] of text) {\n\t\t\tconst node = textNodeAt(element, index);\n\t\t\tif (node === undefined || node.data === baseline) continue;\n\t\t\ttranslated.push({ baseline, index, path, translated: node.data });\n\t\t\tnode.data = baseline;\n\t\t}\n\t});\n\n\treturn translationRestorer(() => {\n\t\tfor (const snapshot of translated) {\n\t\t\tconst parent = elementAtPath(root, snapshot.path);\n\t\t\tif (parent === null) continue;\n\t\t\tconst node = textNodeAt(parent, snapshot.index);\n\t\t\tif (node !== undefined && node.data === snapshot.baseline)\n\t\t\t\tnode.data = snapshot.translated;\n\t\t}\n\t}, translated.length > 0);\n};\n",
|
|
17
17
|
"import type { HydrationStrategy } from 'vue';\nimport { prepareBrowserTranslationHydration } from '../client/browserTranslation';\n\nexport {\n\tcaptureSsrTextBaselines,\n\tprepareBrowserTranslationHydration\n} from '../client/browserTranslation';\n\n/** Wrap a Vue lazy-hydration strategy so text changed by browser translation\n * after the SSR snapshot neither triggers a mismatch nor gets reset. */\nexport const preserveBrowserTranslation = (strategy: HydrationStrategy) => {\n\tconst translatedStrategy: HydrationStrategy = (hydrate, forEachElement) =>\n\t\tstrategy(() => {\n\t\t\tconst restore: Array<() => void> = [];\n\t\t\tforEachElement((element) => {\n\t\t\t\trestore.push(prepareBrowserTranslationHydration(element));\n\t\t\t});\n\t\t\ttry {\n\t\t\t\thydrate();\n\t\t\t} finally {\n\t\t\t\tfor (const apply of restore) apply();\n\t\t\t}\n\t\t}, forEachElement);\n\n\treturn translatedStrategy;\n};\n",
|
|
18
18
|
"import type { VueRoutes, VueSetupApp } from '../../types/vue';\n\n/** Identity helper that types a Vue page's `setupApp` export without\n * forcing the user to `import type { VueSetupApp }` every time. Use as\n * `export const setupApp = defineVueSetupApp(async (app, ctx) => { ... });` */\nexport const defineRoutes = <T extends VueRoutes>(routes: T) => routes;\nexport const defineVueSetupApp = (hook: VueSetupApp) => hook;\n",
|
|
19
19
|
"/**\n * vue-router redirect bridge for SSR.\n *\n * vue-router doesn't expose Angular-style providers, but it doesn't need\n * them — after `await router.push(url); await router.isReady()`, the\n * router's `currentRoute.value.fullPath` reflects the final destination\n * after every guard, redirect rule, and `next('/foo')` call has run.\n *\n * If that final path differs from the URL the server received, a redirect\n * happened. The Vue page handler exposes a `setRedirect` callback in the\n * `setupApp` context so the user's setup hook can short-circuit the\n * render and emit a 302 instead of producing HTML for a route the user\n * never asked for.\n *\n * Usage:\n *\n * import { applyVueRouterRedirect } from '@absolutejs/absolute/vue';\n *\n * export const setupApp = async (app, { url, isServer, setRedirect }) => {\n * const router = createRouter({ ... });\n * app.use(router);\n * if (isServer) await router.push(url);\n * await router.isReady();\n * if (isServer) applyVueRouterRedirect(router, url, setRedirect);\n * };\n */\n\n// Structural shape of the only fields we read from a vue-router instance.\n// Avoids depending on `vue-router` types — the user installs vue-router\n// themselves; the absolutejs package shouldn't pull it into every consumer's\n// type-check just for one helper.\ntype VueRouterLike = {\n\tcurrentRoute: { value: { fullPath: string } };\n};\n\nconst DEFAULT_REDIRECT_STATUS = 302;\n\nconst normalisePathname = (raw: string) => {\n\ttry {\n\t\tconst parsed = new URL(raw, 'http://placeholder.local/');\n\n\t\treturn `${parsed.pathname}${parsed.search}`;\n\t} catch {\n\t\treturn raw;\n\t}\n};\n\n/**\n * Compare the requested URL against vue-router's current resolved path\n * after `router.push(url); await router.isReady()`. If different — a\n * guard redirected, a redirect rule fired, or the user manually\n * navigated inside `setupApp` — invoke `setRedirect` so the Vue page\n * handler emits an HTTP redirect instead of rendering.\n *\n * Status defaults to `302`. Pass a different status (e.g. `301` or `308`)\n * for permanent redirects.\n */\nexport const applyVueRouterRedirect = (\n\trouter: VueRouterLike,\n\trequestedUrl: string,\n\tsetRedirect: (location: string, status?: number) => void,\n\tstatus: number = DEFAULT_REDIRECT_STATUS\n) => {\n\tconst finalPath = router.currentRoute.value.fullPath;\n\tconst requestedPath = normalisePathname(requestedUrl);\n\tif (finalPath === requestedPath) return;\n\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,OAAO,WAAW,QAAQ,SAAS,KAAK;AAAA,MAC9C,IAAI,SAAS,aAAa,KAAK,SAAS,SAAS;AAAA,QAChD,KAAK,OAAO,SAAS;AAAA,IACvB;AAAA,KACE,WAAW,SAAS,CAAC;AAAA;;;ACjGlB,IAAM,6BAA6B,CAAC,aAAgC;AAAA,EAC1E,MAAM,qBAAwC,CAAC,SAAS,mBACvD,SAAS,MAAM;AAAA,IACd,MAAM,UAA6B,CAAC;AAAA,IACpC,eAAe,CAAC,YAAY;AAAA,MAC3B,QAAQ,KAAK,mCAAmC,OAAO,CAAC;AAAA,KACxD;AAAA,IACD,IAAI;AAAA,MACH,QAAQ;AAAA,cACP;AAAA,MACD,WAAW,SAAS;AAAA,QAAS,MAAM;AAAA;AAAA,KAElC,cAAc;AAAA,EAElB,OAAO;AAAA;;ACnBD,IAAM,eAAe,CAAsB,WAAc;AACzD,IAAM,oBAAoB,CAAC,SAAsB;;AC6BxD,IAAM,0BAA0B;AAEhC,IAAM,oBAAoB,CAAC,QAAgB;AAAA,EAC1C,IAAI;AAAA,IACH,MAAM,SAAS,IAAI,IAAI,KAAK,2BAA2B;AAAA,IAEvD,OAAO,GAAG,OAAO,WAAW,OAAO;AAAA,IAClC,MAAM;AAAA,IACP,OAAO;AAAA;AAAA;AAcF,IAAM,yBAAyB,CACrC,QACA,cACA,aACA,SAAiB,4BACb;AAAA,EACJ,MAAM,YAAY,OAAO,aAAa,MAAM;AAAA,EAC5C,MAAM,gBAAgB,kBAAkB,YAAY;AAAA,EACpD,IAAI,cAAc;AAAA,IAAe;AAAA,EACjC,YAAY,WAAW,MAAM;AAAA;",
|
|
22
|
+
"debugId": "15575A0515962BEB64756E2164756E21",
|
|
23
23
|
"names": []
|
|
24
24
|
}
|
package/dist/vue/index.js
CHANGED
|
@@ -4209,82 +4209,6 @@ var init_renderIslandMarkup = __esm(() => {
|
|
|
4209
4209
|
resolvedServerBuildComponentCache = new Map;
|
|
4210
4210
|
});
|
|
4211
4211
|
|
|
4212
|
-
// src/client/browserTranslation.ts
|
|
4213
|
-
var translationRestorer = (restore, hasTranslation) => Object.assign(restore, { hasTranslation }), emptyTranslationRestorer = () => translationRestorer(() => {
|
|
4214
|
-
return;
|
|
4215
|
-
}, false), textNodeAt = (parent, index) => {
|
|
4216
|
-
const node = parent.childNodes[index];
|
|
4217
|
-
return node instanceof Text ? node : undefined;
|
|
4218
|
-
}, visitElements = (root, visit) => {
|
|
4219
|
-
visit(root);
|
|
4220
|
-
for (const element of root.querySelectorAll("*"))
|
|
4221
|
-
visit(element);
|
|
4222
|
-
}, elementPath = (root, element) => {
|
|
4223
|
-
const path = [];
|
|
4224
|
-
let current = element;
|
|
4225
|
-
while (current !== root) {
|
|
4226
|
-
const parent = current.parentElement;
|
|
4227
|
-
if (parent === null)
|
|
4228
|
-
return null;
|
|
4229
|
-
path.unshift([...parent.children].indexOf(current));
|
|
4230
|
-
current = parent;
|
|
4231
|
-
}
|
|
4232
|
-
return path;
|
|
4233
|
-
}, elementAtPath = (root, path) => {
|
|
4234
|
-
let current = root;
|
|
4235
|
-
for (const index of path) {
|
|
4236
|
-
const child = current.children[index];
|
|
4237
|
-
if (!(child instanceof Element))
|
|
4238
|
-
return null;
|
|
4239
|
-
current = child;
|
|
4240
|
-
}
|
|
4241
|
-
return current;
|
|
4242
|
-
}, captureSsrTextBaselines = (root) => {
|
|
4243
|
-
if (root === null || typeof window === "undefined")
|
|
4244
|
-
return;
|
|
4245
|
-
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap;
|
|
4246
|
-
visitElements(root, (element) => {
|
|
4247
|
-
const text = new Map;
|
|
4248
|
-
for (const [index, node] of [...element.childNodes].entries()) {
|
|
4249
|
-
if (node.nodeType === Node.TEXT_NODE)
|
|
4250
|
-
text.set(index, node.nodeValue ?? "");
|
|
4251
|
-
}
|
|
4252
|
-
if (text.size > 0)
|
|
4253
|
-
baselines.set(element, text);
|
|
4254
|
-
});
|
|
4255
|
-
window.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;
|
|
4256
|
-
}, prepareBrowserTranslationHydration = (root) => {
|
|
4257
|
-
if (root === null || typeof window === "undefined")
|
|
4258
|
-
return emptyTranslationRestorer();
|
|
4259
|
-
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;
|
|
4260
|
-
if (baselines === undefined)
|
|
4261
|
-
return emptyTranslationRestorer();
|
|
4262
|
-
const translated = [];
|
|
4263
|
-
visitElements(root, (element) => {
|
|
4264
|
-
const text = baselines.get(element);
|
|
4265
|
-
const path = elementPath(root, element);
|
|
4266
|
-
if (text === undefined || path === null)
|
|
4267
|
-
return;
|
|
4268
|
-
for (const [index, baseline] of text) {
|
|
4269
|
-
const node = textNodeAt(element, index);
|
|
4270
|
-
if (node === undefined || node.data === baseline)
|
|
4271
|
-
continue;
|
|
4272
|
-
translated.push({ baseline, index, path, translated: node.data });
|
|
4273
|
-
node.data = baseline;
|
|
4274
|
-
}
|
|
4275
|
-
});
|
|
4276
|
-
return translationRestorer(() => {
|
|
4277
|
-
for (const snapshot of translated) {
|
|
4278
|
-
const parent = elementAtPath(root, snapshot.path);
|
|
4279
|
-
if (parent === null)
|
|
4280
|
-
continue;
|
|
4281
|
-
const node = textNodeAt(parent, snapshot.index);
|
|
4282
|
-
if (node !== undefined && node.data === snapshot.baseline)
|
|
4283
|
-
node.data = snapshot.translated;
|
|
4284
|
-
}
|
|
4285
|
-
}, translated.length > 0);
|
|
4286
|
-
};
|
|
4287
|
-
|
|
4288
4212
|
// src/core/streamingSlotRegistrar.ts
|
|
4289
4213
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
4290
4214
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
@@ -5759,34 +5683,6 @@ var isMatchingIslandElement = (element, props) => {
|
|
|
5759
5683
|
const attributes = getIslandMarkerAttributes(props);
|
|
5760
5684
|
return element.dataset.island === "true" && element.dataset.component === attributes["data-component"] && element.dataset.framework === attributes["data-framework"] && (element.dataset.hydrate ?? "load") === attributes["data-hydrate"] && (element.dataset.props ?? "{}") === attributes["data-props"];
|
|
5761
5685
|
};
|
|
5762
|
-
var snapshotIslandElement = (element, snapshotMap) => {
|
|
5763
|
-
const signature = [
|
|
5764
|
-
element.dataset.component,
|
|
5765
|
-
element.dataset.framework,
|
|
5766
|
-
element.dataset.hydrate ?? "load",
|
|
5767
|
-
element.dataset.props ?? "{}"
|
|
5768
|
-
].join("::");
|
|
5769
|
-
const existing = snapshotMap.get(signature) ?? [];
|
|
5770
|
-
const attributes = Object.fromEntries(element.getAttributeNames().map((name) => [name, element.getAttribute(name) ?? ""]));
|
|
5771
|
-
existing.push({
|
|
5772
|
-
attributes,
|
|
5773
|
-
innerHTML: element.innerHTML
|
|
5774
|
-
});
|
|
5775
|
-
snapshotMap.set(signature, existing);
|
|
5776
|
-
};
|
|
5777
|
-
var initializeIslandMarkupSnapshot = () => {
|
|
5778
|
-
if (typeof document === "undefined") {
|
|
5779
|
-
return;
|
|
5780
|
-
}
|
|
5781
|
-
const snapshotMap = getSnapshotMap();
|
|
5782
|
-
if (!snapshotMap || snapshotMap.size > 0) {
|
|
5783
|
-
return;
|
|
5784
|
-
}
|
|
5785
|
-
const elements = Array.from(document.querySelectorAll('[data-island="true"]'));
|
|
5786
|
-
for (const element of elements) {
|
|
5787
|
-
snapshotIslandElement(element, snapshotMap);
|
|
5788
|
-
}
|
|
5789
|
-
};
|
|
5790
5686
|
var preserveIslandMarkup = (props) => {
|
|
5791
5687
|
if (typeof document === "undefined") {
|
|
5792
5688
|
return {
|
|
@@ -6036,22 +5932,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
6036
5932
|
return store;
|
|
6037
5933
|
};
|
|
6038
5934
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
6039
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
6040
|
-
for (const instance of instances) {
|
|
6041
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
6042
|
-
}
|
|
6043
|
-
};
|
|
6044
|
-
var initializeIslandStores = (state) => {
|
|
6045
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
6046
|
-
const nextSnapshot = {
|
|
6047
|
-
...state,
|
|
6048
|
-
...currentSnapshot
|
|
6049
|
-
};
|
|
6050
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
6051
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
6052
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
6053
|
-
}
|
|
6054
|
-
};
|
|
6055
5935
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
6056
5936
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
6057
5937
|
let currentSelection = selector(store.getState());
|
|
@@ -6087,6 +5967,89 @@ var useIslandStore = (store, selector) => {
|
|
|
6087
5967
|
});
|
|
6088
5968
|
return state;
|
|
6089
5969
|
};
|
|
5970
|
+
// src/client/browserTranslation.ts
|
|
5971
|
+
var translationRestorer = (restore, hasTranslation) => Object.assign(restore, { hasTranslation });
|
|
5972
|
+
var emptyTranslationRestorer = () => translationRestorer(() => {
|
|
5973
|
+
return;
|
|
5974
|
+
}, false);
|
|
5975
|
+
var textNodeAt = (parent, index) => {
|
|
5976
|
+
const node = parent.childNodes[index];
|
|
5977
|
+
return node instanceof Text ? node : undefined;
|
|
5978
|
+
};
|
|
5979
|
+
var visitElements = (root, visit) => {
|
|
5980
|
+
visit(root);
|
|
5981
|
+
for (const element of root.querySelectorAll("*"))
|
|
5982
|
+
visit(element);
|
|
5983
|
+
};
|
|
5984
|
+
var elementPath = (root, element) => {
|
|
5985
|
+
const path = [];
|
|
5986
|
+
let current = element;
|
|
5987
|
+
while (current !== root) {
|
|
5988
|
+
const parent = current.parentElement;
|
|
5989
|
+
if (parent === null)
|
|
5990
|
+
return null;
|
|
5991
|
+
path.unshift([...parent.children].indexOf(current));
|
|
5992
|
+
current = parent;
|
|
5993
|
+
}
|
|
5994
|
+
return path;
|
|
5995
|
+
};
|
|
5996
|
+
var elementAtPath = (root, path) => {
|
|
5997
|
+
let current = root;
|
|
5998
|
+
for (const index of path) {
|
|
5999
|
+
const child = current.children[index];
|
|
6000
|
+
if (!(child instanceof Element))
|
|
6001
|
+
return null;
|
|
6002
|
+
current = child;
|
|
6003
|
+
}
|
|
6004
|
+
return current;
|
|
6005
|
+
};
|
|
6006
|
+
var captureSsrTextBaselines = (root) => {
|
|
6007
|
+
if (root === null || typeof window === "undefined")
|
|
6008
|
+
return;
|
|
6009
|
+
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__ ?? new WeakMap;
|
|
6010
|
+
visitElements(root, (element) => {
|
|
6011
|
+
const text = new Map;
|
|
6012
|
+
for (const [index, node] of [...element.childNodes].entries()) {
|
|
6013
|
+
if (node.nodeType === Node.TEXT_NODE)
|
|
6014
|
+
text.set(index, node.nodeValue ?? "");
|
|
6015
|
+
}
|
|
6016
|
+
if (text.size > 0)
|
|
6017
|
+
baselines.set(element, text);
|
|
6018
|
+
});
|
|
6019
|
+
window.__ABSOLUTE_SSR_TEXT_BASELINES__ = baselines;
|
|
6020
|
+
};
|
|
6021
|
+
var prepareBrowserTranslationHydration = (root) => {
|
|
6022
|
+
if (root === null || typeof window === "undefined")
|
|
6023
|
+
return emptyTranslationRestorer();
|
|
6024
|
+
const baselines = window.__ABSOLUTE_SSR_TEXT_BASELINES__;
|
|
6025
|
+
if (baselines === undefined)
|
|
6026
|
+
return emptyTranslationRestorer();
|
|
6027
|
+
const translated = [];
|
|
6028
|
+
visitElements(root, (element) => {
|
|
6029
|
+
const text = baselines.get(element);
|
|
6030
|
+
const path = elementPath(root, element);
|
|
6031
|
+
if (text === undefined || path === null)
|
|
6032
|
+
return;
|
|
6033
|
+
for (const [index, baseline] of text) {
|
|
6034
|
+
const node = textNodeAt(element, index);
|
|
6035
|
+
if (node === undefined || node.data === baseline)
|
|
6036
|
+
continue;
|
|
6037
|
+
translated.push({ baseline, index, path, translated: node.data });
|
|
6038
|
+
node.data = baseline;
|
|
6039
|
+
}
|
|
6040
|
+
});
|
|
6041
|
+
return translationRestorer(() => {
|
|
6042
|
+
for (const snapshot of translated) {
|
|
6043
|
+
const parent = elementAtPath(root, snapshot.path);
|
|
6044
|
+
if (parent === null)
|
|
6045
|
+
continue;
|
|
6046
|
+
const node = textNodeAt(parent, snapshot.index);
|
|
6047
|
+
if (node !== undefined && node.data === snapshot.baseline)
|
|
6048
|
+
node.data = snapshot.translated;
|
|
6049
|
+
}
|
|
6050
|
+
}, translated.length > 0);
|
|
6051
|
+
};
|
|
6052
|
+
|
|
6090
6053
|
// src/vue/browserTranslation.ts
|
|
6091
6054
|
var preserveBrowserTranslation = (strategy) => {
|
|
6092
6055
|
const translatedStrategy = (hydrate, forEachElement) => strategy(() => {
|
|
@@ -6190,5 +6153,5 @@ export {
|
|
|
6190
6153
|
useResource
|
|
6191
6154
|
};
|
|
6192
6155
|
|
|
6193
|
-
//# debugId=
|
|
6156
|
+
//# debugId=9ABDAD7B4291F16B64756E2164756E21
|
|
6194
6157
|
//# sourceMappingURL=index.js.map
|