@bagelink/blox 1.15.556 → 1.15.558
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/CmsPageView.vue.d.ts.map +1 -1
- package/dist/{PreviewApp-f5pmxF9e.js → PreviewApp-RWLkugBk.js} +1 -1
- package/dist/{PreviewApp-CTrrFgIL.cjs → PreviewApp-eEGjkQot.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-0x3sOVR5.cjs → PreviewApp.vue_vue_type_style_index_0_lang-CMOb3zfF.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DhWhfWxA.js → PreviewApp.vue_vue_type_style_index_0_lang-DDcLQVr1.js} +1 -1
- package/dist/components/BloxRouterView.vue.d.ts.map +1 -1
- package/dist/createBloxApp.d.ts +2 -0
- package/dist/createBloxApp.d.ts.map +1 -1
- package/dist/documentNavigation.d.ts +3 -0
- package/dist/documentNavigation.d.ts.map +1 -0
- package/dist/index.cjs +58 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +89 -37
- package/dist/{routes-BYHlDu-i.cjs → routes-C82wA2VY.cjs} +22 -3
- package/dist/{routes-BngHUX7M.js → routes-CYYoiqvi.js} +61 -42
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +61 -71
- package/dist/ssg/index.mjs +61 -71
- package/dist/ssg/render-resolved-page.d.ts +3 -1
- package/dist/ssg/render-resolved-page.d.ts.map +1 -1
- package/dist/symbols.d.ts +5 -0
- package/dist/symbols.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";AAuiBA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-CMOb3zfF.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { h as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, j as BLOX_RUNTIME_KEY } from "./routes-CYYoiqvi.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BloxRouterView.vue.d.ts","sourceRoot":"","sources":["../../src/components/BloxRouterView.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BloxRouterView.vue.d.ts","sourceRoot":"","sources":["../../src/components/BloxRouterView.vue"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,KAAK,WAAW,GAAG;IAClB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;;gBADY,MAAM;;AAmGpB,wBAQG"}
|
package/dist/createBloxApp.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export interface CreateBloxAppOptions {
|
|
|
67
67
|
* plausible: 'auctentic2.netlify.app'
|
|
68
68
|
*/
|
|
69
69
|
plausible?: string | PlausibleOptions;
|
|
70
|
+
/** CMS navigation mode. Marketing sites should use `document`. @default 'spa' */
|
|
71
|
+
navigation?: 'document' | 'spa';
|
|
70
72
|
}
|
|
71
73
|
/** Plausible Analytics injection options. */
|
|
72
74
|
export interface PlausibleOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBloxApp.d.ts","sourceRoot":"","sources":["../src/createBloxApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"createBloxApp.d.ts","sourceRoot":"","sources":["../src/createBloxApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAchD,MAAM,WAAW,oBAAoB;IACpC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACpD,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAA;IACnB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB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;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAiL1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentNavigation.d.ts","sourceRoot":"","sources":["../src/documentNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAYxC,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,CAgDpE"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const routes = require("./routes-
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const routes = require("./routes-C82wA2VY.cjs");
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-CMOb3zfF.cjs");
|
|
5
5
|
const vue = require("vue");
|
|
6
6
|
const vueRouter = require("vue-router");
|
|
7
7
|
const pinia = require("pinia");
|
|
8
8
|
const ssg_client = require("./ssg/client.cjs");
|
|
9
|
+
const FORM_CONTROL_SELECTOR = "button, input, select, textarea, label, option";
|
|
10
|
+
function isEditorPreview() {
|
|
11
|
+
try {
|
|
12
|
+
return window.self !== window.top || window.location.pathname.startsWith("/_blox_preview");
|
|
13
|
+
} catch {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function installDocumentNavigation(router) {
|
|
18
|
+
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview()) {
|
|
19
|
+
return () => {
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const handleClick = (event) => {
|
|
23
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
24
|
+
const target = event.target;
|
|
25
|
+
if (!(target instanceof Element)) return;
|
|
26
|
+
if (target.closest(FORM_CONTROL_SELECTOR) || target.closest('[contenteditable]:not([contenteditable="false"])')) return;
|
|
27
|
+
const anchor = target.closest("a[href]");
|
|
28
|
+
if (!anchor || anchor.hasAttribute("download") || anchor.hasAttribute("target")) return;
|
|
29
|
+
const rawHref = anchor.getAttribute("href");
|
|
30
|
+
if (!rawHref || rawHref.startsWith("#")) return;
|
|
31
|
+
let destination;
|
|
32
|
+
try {
|
|
33
|
+
destination = new URL(anchor.href, window.location.href);
|
|
34
|
+
} catch {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!["http:", "https:"].includes(destination.protocol) || destination.origin !== window.location.origin) return;
|
|
38
|
+
const current = new URL(window.location.href);
|
|
39
|
+
const isHashOnly = destination.pathname === current.pathname && destination.search === current.search && destination.hash !== current.hash;
|
|
40
|
+
if (isHashOnly) return;
|
|
41
|
+
const resolved = router.resolve(`${destination.pathname}${destination.search}${destination.hash}`);
|
|
42
|
+
if (resolved.meta.navigation === "spa") return;
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
event.stopImmediatePropagation();
|
|
45
|
+
window.location.assign(destination.href);
|
|
46
|
+
};
|
|
47
|
+
document.addEventListener("click", handleClick, { capture: true });
|
|
48
|
+
return () => document.removeEventListener("click", handleClick, { capture: true });
|
|
49
|
+
}
|
|
9
50
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
51
|
__name: "BloxRouterView",
|
|
11
52
|
props: {
|
|
@@ -16,6 +57,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
16
57
|
const leaf = matched[matched.length - 1];
|
|
17
58
|
return (leaf == null ? void 0 : leaf.path) ?? fallback;
|
|
18
59
|
}
|
|
60
|
+
function routeKey(route) {
|
|
61
|
+
return viewKey(
|
|
62
|
+
(route == null ? void 0 : route.matched) ?? [],
|
|
63
|
+
(route == null ? void 0 : route.path) ?? (typeof window !== "undefined" ? window.location.pathname : "/")
|
|
64
|
+
);
|
|
65
|
+
}
|
|
19
66
|
return (_ctx, _cache) => {
|
|
20
67
|
const _component_RouterView = vue.resolveComponent("RouterView");
|
|
21
68
|
return vue.openBlock(), vue.createBlock(_component_RouterView, null, {
|
|
@@ -27,12 +74,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
74
|
}, {
|
|
28
75
|
default: vue.withCtx(() => [
|
|
29
76
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(Component), {
|
|
30
|
-
key:
|
|
77
|
+
key: routeKey(r)
|
|
31
78
|
}))
|
|
32
79
|
]),
|
|
33
80
|
_: 2
|
|
34
81
|
}, 1032, ["name"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(Component), {
|
|
35
|
-
key:
|
|
82
|
+
key: routeKey(r)
|
|
36
83
|
}))
|
|
37
84
|
]),
|
|
38
85
|
_: 1
|
|
@@ -223,7 +270,8 @@ function createBloxApp(options) {
|
|
|
223
270
|
plugins = [],
|
|
224
271
|
globalComponents = {},
|
|
225
272
|
setup: userSetup,
|
|
226
|
-
plausible
|
|
273
|
+
plausible,
|
|
274
|
+
navigation = "spa"
|
|
227
275
|
} = options;
|
|
228
276
|
if (plausible) injectPlausible(plausible);
|
|
229
277
|
ssg_client.installBloxStateCache();
|
|
@@ -236,7 +284,9 @@ function createBloxApp(options) {
|
|
|
236
284
|
if (collectionInterceptor && axiosInstance) {
|
|
237
285
|
axiosInstance.interceptors.request.use(collectionInterceptor);
|
|
238
286
|
}
|
|
239
|
-
const
|
|
287
|
+
const hasSsgState = typeof window !== "undefined" && (!!window[ssg_client.BLOX_STATE_WINDOW_KEY] || !!window[routes.BLOX_DATA_WINDOW_KEY]);
|
|
288
|
+
const createVueApp = hasSsgState ? vue.createSSRApp : vue.createApp;
|
|
289
|
+
const app = createVueApp({
|
|
240
290
|
name: "BloxRoot",
|
|
241
291
|
render: () => vue.h(vue.Suspense, null, { default: () => vue.h(rootComponent) })
|
|
242
292
|
});
|
|
@@ -304,6 +354,7 @@ function createBloxApp(options) {
|
|
|
304
354
|
if (userSetup) userSetup(app);
|
|
305
355
|
router.isReady().then(() => {
|
|
306
356
|
routes.installSmartLinks(router);
|
|
357
|
+
if (navigation === "document") installDocumentNavigation(router);
|
|
307
358
|
app.mount(mountTarget);
|
|
308
359
|
dataRegistry.hydrating = false;
|
|
309
360
|
});
|
|
@@ -428,6 +479,7 @@ exports.buildBloxManifest = buildBloxManifest;
|
|
|
428
479
|
exports.createBloxApp = createBloxApp;
|
|
429
480
|
exports.defineBlock = defineBlock;
|
|
430
481
|
exports.injectPlausible = injectPlausible;
|
|
482
|
+
exports.installDocumentNavigation = installDocumentNavigation;
|
|
431
483
|
exports.serializeRegistry = serializeRegistry;
|
|
432
484
|
exports.useBloxRuntime = useBloxRuntime;
|
|
433
485
|
exports.useContentSeo = useContentSeo;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { configureApi, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin } from './api/index';
|
|
2
|
+
export { installDocumentNavigation } from './documentNavigation';
|
|
2
3
|
export type { ListItemsOptions } from './api/index';
|
|
3
4
|
export type { BindingWarning, Block, BloxPageApiAdapter, CollectionItem, CollectionItemsPage, ContentStatus, PageContent, PageCreateData, PageRead, PageResolveRead, PageUpdateData, WebsiteRead, } from './api/types';
|
|
4
5
|
export { sendToEditor, sendToPreview } from './bridge';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAChH,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa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,aAAa,EACb,aAAa,EACb,eAAe,EACf,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,iBAAiB,GACjB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEhG,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAK1E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACjE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAKlE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI5E,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC/H,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAClG,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _,
|
|
3
|
-
import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue,
|
|
1
|
+
import { k as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, j as BLOX_RUNTIME_KEY, l as useSeo, m as getRegistryData, o as getItemBySlug, q as getItemById, t as getContentRoute, p as provideBloxData, f as createBlox, g as generateContentRoutes, v as installContentFallback, i as installLocaleAwareResolve, b as setActiveLocale, w as installSmartLinks, x as consumePendingLocaleSwitch, B as BLOX_DATA_WINDOW_KEY } from "./routes-CYYoiqvi.js";
|
|
2
|
+
import { _, y, z, A, C, D, E, F, G, P, H, I, c, d, J, K, L, M, N, O, Q, R, S, T, U, V, r, W, s, X, Y, Z, $ } from "./routes-CYYoiqvi.js";
|
|
3
|
+
import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DDcLQVr1.js";
|
|
4
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, markRaw, createSSRApp, createApp } from "vue";
|
|
5
5
|
import { useRouter, useRoute } from "vue-router";
|
|
6
6
|
import { createPinia } from "pinia";
|
|
7
|
-
import { installBloxStateCache, installCollectionCache } from "./ssg/client.mjs";
|
|
7
|
+
import { installBloxStateCache, installCollectionCache, BLOX_STATE_WINDOW_KEY } from "./ssg/client.mjs";
|
|
8
|
+
const FORM_CONTROL_SELECTOR = "button, input, select, textarea, label, option";
|
|
9
|
+
function isEditorPreview() {
|
|
10
|
+
try {
|
|
11
|
+
return window.self !== window.top || window.location.pathname.startsWith("/_blox_preview");
|
|
12
|
+
} catch {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function installDocumentNavigation(router) {
|
|
17
|
+
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview()) {
|
|
18
|
+
return () => {
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const handleClick = (event) => {
|
|
22
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
23
|
+
const target = event.target;
|
|
24
|
+
if (!(target instanceof Element)) return;
|
|
25
|
+
if (target.closest(FORM_CONTROL_SELECTOR) || target.closest('[contenteditable]:not([contenteditable="false"])')) return;
|
|
26
|
+
const anchor = target.closest("a[href]");
|
|
27
|
+
if (!anchor || anchor.hasAttribute("download") || anchor.hasAttribute("target")) return;
|
|
28
|
+
const rawHref = anchor.getAttribute("href");
|
|
29
|
+
if (!rawHref || rawHref.startsWith("#")) return;
|
|
30
|
+
let destination;
|
|
31
|
+
try {
|
|
32
|
+
destination = new URL(anchor.href, window.location.href);
|
|
33
|
+
} catch {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!["http:", "https:"].includes(destination.protocol) || destination.origin !== window.location.origin) return;
|
|
37
|
+
const current = new URL(window.location.href);
|
|
38
|
+
const isHashOnly = destination.pathname === current.pathname && destination.search === current.search && destination.hash !== current.hash;
|
|
39
|
+
if (isHashOnly) return;
|
|
40
|
+
const resolved = router.resolve(`${destination.pathname}${destination.search}${destination.hash}`);
|
|
41
|
+
if (resolved.meta.navigation === "spa") return;
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
event.stopImmediatePropagation();
|
|
44
|
+
window.location.assign(destination.href);
|
|
45
|
+
};
|
|
46
|
+
document.addEventListener("click", handleClick, { capture: true });
|
|
47
|
+
return () => document.removeEventListener("click", handleClick, { capture: true });
|
|
48
|
+
}
|
|
8
49
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
50
|
__name: "BloxRouterView",
|
|
10
51
|
props: {
|
|
@@ -15,6 +56,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
56
|
const leaf = matched[matched.length - 1];
|
|
16
57
|
return (leaf == null ? void 0 : leaf.path) ?? fallback;
|
|
17
58
|
}
|
|
59
|
+
function routeKey(route) {
|
|
60
|
+
return viewKey(
|
|
61
|
+
(route == null ? void 0 : route.matched) ?? [],
|
|
62
|
+
(route == null ? void 0 : route.path) ?? (typeof window !== "undefined" ? window.location.pathname : "/")
|
|
63
|
+
);
|
|
64
|
+
}
|
|
18
65
|
return (_ctx, _cache) => {
|
|
19
66
|
const _component_RouterView = resolveComponent("RouterView");
|
|
20
67
|
return openBlock(), createBlock(_component_RouterView, null, {
|
|
@@ -26,12 +73,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
73
|
}, {
|
|
27
74
|
default: withCtx(() => [
|
|
28
75
|
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
29
|
-
key:
|
|
76
|
+
key: routeKey(r2)
|
|
30
77
|
}))
|
|
31
78
|
]),
|
|
32
79
|
_: 2
|
|
33
80
|
}, 1032, ["name"])) : (openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
34
|
-
key:
|
|
81
|
+
key: routeKey(r2)
|
|
35
82
|
}))
|
|
36
83
|
]),
|
|
37
84
|
_: 1
|
|
@@ -222,7 +269,8 @@ function createBloxApp(options) {
|
|
|
222
269
|
plugins = [],
|
|
223
270
|
globalComponents = {},
|
|
224
271
|
setup: userSetup,
|
|
225
|
-
plausible
|
|
272
|
+
plausible,
|
|
273
|
+
navigation = "spa"
|
|
226
274
|
} = options;
|
|
227
275
|
if (plausible) injectPlausible(plausible);
|
|
228
276
|
installBloxStateCache();
|
|
@@ -235,7 +283,9 @@ function createBloxApp(options) {
|
|
|
235
283
|
if (collectionInterceptor && axiosInstance) {
|
|
236
284
|
axiosInstance.interceptors.request.use(collectionInterceptor);
|
|
237
285
|
}
|
|
238
|
-
const
|
|
286
|
+
const hasSsgState = typeof window !== "undefined" && (!!window[BLOX_STATE_WINDOW_KEY] || !!window[BLOX_DATA_WINDOW_KEY]);
|
|
287
|
+
const createVueApp = hasSsgState ? createSSRApp : createApp;
|
|
288
|
+
const app = createVueApp({
|
|
239
289
|
name: "BloxRoot",
|
|
240
290
|
render: () => h(Suspense, null, { default: () => h(rootComponent) })
|
|
241
291
|
});
|
|
@@ -303,6 +353,7 @@ function createBloxApp(options) {
|
|
|
303
353
|
if (userSetup) userSetup(app);
|
|
304
354
|
router.isReady().then(() => {
|
|
305
355
|
installSmartLinks(router);
|
|
356
|
+
if (navigation === "document") installDocumentNavigation(router);
|
|
306
357
|
app.mount(mountTarget);
|
|
307
358
|
dataRegistry.hydrating = false;
|
|
308
359
|
});
|
|
@@ -373,62 +424,63 @@ function buildBloxManifest(blox) {
|
|
|
373
424
|
}
|
|
374
425
|
export {
|
|
375
426
|
_ as AdminEditBar,
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
427
|
+
y as BLOX_ADMIN_CONFIG_KEY,
|
|
428
|
+
z as BLOX_CONFIG_KEY,
|
|
429
|
+
A as BLOX_DATA_KEY,
|
|
430
|
+
BLOX_DATA_WINDOW_KEY,
|
|
431
|
+
C as BLOX_LAYOUT_KEY,
|
|
381
432
|
BLOX_LOCALE_STRATEGY_KEY,
|
|
382
433
|
BLOX_RUNTIME_KEY,
|
|
383
|
-
|
|
434
|
+
D as BloxInstance,
|
|
384
435
|
_sfc_main as BloxRouterView,
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
436
|
+
E as CmsPageView,
|
|
437
|
+
F as ContentDetailView,
|
|
438
|
+
G as ContentHost,
|
|
388
439
|
P as PageRenderer,
|
|
389
440
|
_2 as PreviewApp,
|
|
390
441
|
P2 as PreviewRenderer,
|
|
391
|
-
|
|
442
|
+
H as applyLayoutChrome,
|
|
392
443
|
buildBloxManifest,
|
|
393
|
-
|
|
444
|
+
I as classifyLink,
|
|
394
445
|
c as collectBloxData,
|
|
395
446
|
d as collectBloxSeo,
|
|
396
|
-
|
|
397
|
-
|
|
447
|
+
J as configureApi,
|
|
448
|
+
K as contentRoutes,
|
|
398
449
|
createBlox,
|
|
399
450
|
createBloxApp,
|
|
400
451
|
defineBlock,
|
|
401
|
-
|
|
452
|
+
L as defineContent,
|
|
402
453
|
generateContentRoutes,
|
|
403
454
|
getContentRoute,
|
|
404
|
-
|
|
455
|
+
M as getContentRouteByCollection,
|
|
405
456
|
getItemById,
|
|
406
457
|
getItemBySlug,
|
|
407
|
-
|
|
408
|
-
|
|
458
|
+
N as getWebsiteId,
|
|
459
|
+
O as getWebsiteIdSync,
|
|
409
460
|
injectPlausible,
|
|
410
461
|
installContentFallback,
|
|
462
|
+
installDocumentNavigation,
|
|
411
463
|
installSmartLinks,
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
464
|
+
Q as isAbsoluteExternal,
|
|
465
|
+
R as isSoloContentPage,
|
|
466
|
+
S as isSpecialScheme,
|
|
467
|
+
T as listItems,
|
|
416
468
|
normalizeLink,
|
|
417
|
-
|
|
469
|
+
U as normalizeTo,
|
|
418
470
|
provideBloxData,
|
|
419
|
-
|
|
471
|
+
V as provideContentItem,
|
|
420
472
|
r as resolveBlockProps,
|
|
421
|
-
|
|
473
|
+
W as resolvePath,
|
|
422
474
|
s2 as sendToEditor,
|
|
423
475
|
a as sendToPreview,
|
|
424
476
|
serializeRegistry,
|
|
425
477
|
s as setApiOrigin,
|
|
426
|
-
|
|
427
|
-
|
|
478
|
+
X as toInternalPath,
|
|
479
|
+
Y as useBloxEdit,
|
|
428
480
|
useBloxRuntime,
|
|
429
|
-
|
|
481
|
+
Z as useContentItem,
|
|
430
482
|
useContentSeo,
|
|
431
|
-
|
|
483
|
+
$ as useData,
|
|
432
484
|
useGlobalBlock,
|
|
433
485
|
useLocale,
|
|
434
486
|
useLocaleNav,
|
|
@@ -103,6 +103,7 @@ const BLOX_REGISTRY_KEY = Symbol("blox:registry");
|
|
|
103
103
|
const BLOX_CONFIG_KEY = Symbol("blox:config");
|
|
104
104
|
const BLOX_LOCALE_STRATEGY_KEY = Symbol("blox:locale-strategy");
|
|
105
105
|
const BLOX_RUNTIME_KEY = Symbol("blox:runtime");
|
|
106
|
+
const BLOX_SSR_ROUTE_STATE_KEY = Symbol("blox:ssr-route-state");
|
|
106
107
|
const BLOX_ADMIN_CONFIG_KEY = Symbol("blox:admin-config");
|
|
107
108
|
const BLOX_LAYOUT_KEY = Symbol("blox:layout");
|
|
108
109
|
const STORAGE_KEY = "blox:edit";
|
|
@@ -359,6 +360,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
359
360
|
const router = vueRouter.useRouter();
|
|
360
361
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
361
362
|
const strategy = vue.inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
363
|
+
const ssrRouteState = vue.inject(BLOX_SSR_ROUTE_STATE_KEY, null);
|
|
362
364
|
const blocks = vue.ref([]);
|
|
363
365
|
const contexts = vue.ref({});
|
|
364
366
|
vue.provide("contexts", contexts);
|
|
@@ -379,19 +381,31 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
379
381
|
return Object.fromEntries(keys.map((l) => [l, resolvedSlug]));
|
|
380
382
|
}
|
|
381
383
|
function tryHydrateFromState(path) {
|
|
382
|
-
|
|
384
|
+
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
385
|
+
applyResolvedState(ssrRouteState.resolved, path);
|
|
386
|
+
return true;
|
|
387
|
+
}
|
|
383
388
|
const win = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : void 0;
|
|
384
389
|
if (!win) return false;
|
|
385
390
|
const state = win[ssg_client.BLOX_STATE_WINDOW_KEY];
|
|
386
391
|
if (!state || typeof state !== "object") return false;
|
|
387
392
|
const entry = state[path];
|
|
388
393
|
if (!entry) return false;
|
|
394
|
+
applyResolvedState(entry, path);
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
function applyResolvedState(entry, path) {
|
|
398
|
+
var _a, _b, _c;
|
|
389
399
|
blocks.value = ((_b = (_a = entry.page) == null ? void 0 : _a.content) == null ? void 0 : _b.blocks) ?? [];
|
|
390
400
|
contexts.value = entry.contexts ?? {};
|
|
391
401
|
currentPageId.value = ((_c = entry.page) == null ? void 0 : _c.id) ?? null;
|
|
392
402
|
setAlternates(entry.alternates && Object.keys(entry.alternates).length ? entry.alternates : { [locale2.value]: path });
|
|
393
403
|
updateDocumentTitle(entry);
|
|
394
|
-
|
|
404
|
+
}
|
|
405
|
+
function hasEmbeddedState() {
|
|
406
|
+
if (typeof window === "undefined") return false;
|
|
407
|
+
const state = window[ssg_client.BLOX_STATE_WINDOW_KEY];
|
|
408
|
+
return !!state && typeof state === "object" && !Array.isArray(state);
|
|
395
409
|
}
|
|
396
410
|
function updateDocumentTitle(resolved) {
|
|
397
411
|
if (typeof document === "undefined") return;
|
|
@@ -420,6 +434,10 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
420
434
|
initialLoading.value = false;
|
|
421
435
|
return;
|
|
422
436
|
}
|
|
437
|
+
if (hasEmbeddedState() && typeof window !== "undefined") {
|
|
438
|
+
window.location.assign(route.fullPath || route.path || slug);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
423
441
|
navigating.value = true;
|
|
424
442
|
try {
|
|
425
443
|
const resolved = await resolvePath(slug, urlLocale);
|
|
@@ -922,7 +940,7 @@ class BloxInstance {
|
|
|
922
940
|
}
|
|
923
941
|
router.addRoute({
|
|
924
942
|
path: "/_blox_preview",
|
|
925
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
943
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-eEGjkQot.cjs")),
|
|
926
944
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
927
945
|
});
|
|
928
946
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1240,6 +1258,7 @@ exports.BLOX_LAYOUT_KEY = BLOX_LAYOUT_KEY;
|
|
|
1240
1258
|
exports.BLOX_LOCALE_STRATEGY_KEY = BLOX_LOCALE_STRATEGY_KEY;
|
|
1241
1259
|
exports.BLOX_REGISTRY_KEY = BLOX_REGISTRY_KEY;
|
|
1242
1260
|
exports.BLOX_RUNTIME_KEY = BLOX_RUNTIME_KEY;
|
|
1261
|
+
exports.BLOX_SSR_ROUTE_STATE_KEY = BLOX_SSR_ROUTE_STATE_KEY;
|
|
1243
1262
|
exports.BloxInstance = BloxInstance;
|
|
1244
1263
|
exports.PageRenderer = PageRenderer;
|
|
1245
1264
|
exports._sfc_main = _sfc_main$3;
|
|
@@ -102,6 +102,7 @@ const BLOX_REGISTRY_KEY = Symbol("blox:registry");
|
|
|
102
102
|
const BLOX_CONFIG_KEY = Symbol("blox:config");
|
|
103
103
|
const BLOX_LOCALE_STRATEGY_KEY = Symbol("blox:locale-strategy");
|
|
104
104
|
const BLOX_RUNTIME_KEY = Symbol("blox:runtime");
|
|
105
|
+
const BLOX_SSR_ROUTE_STATE_KEY = Symbol("blox:ssr-route-state");
|
|
105
106
|
const BLOX_ADMIN_CONFIG_KEY = Symbol("blox:admin-config");
|
|
106
107
|
const BLOX_LAYOUT_KEY = Symbol("blox:layout");
|
|
107
108
|
const STORAGE_KEY = "blox:edit";
|
|
@@ -358,6 +359,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
358
359
|
const router = useRouter();
|
|
359
360
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
360
361
|
const strategy = inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
362
|
+
const ssrRouteState = inject(BLOX_SSR_ROUTE_STATE_KEY, null);
|
|
361
363
|
const blocks = ref([]);
|
|
362
364
|
const contexts = ref({});
|
|
363
365
|
provide("contexts", contexts);
|
|
@@ -378,19 +380,31 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
378
380
|
return Object.fromEntries(keys.map((l) => [l, resolvedSlug]));
|
|
379
381
|
}
|
|
380
382
|
function tryHydrateFromState(path) {
|
|
381
|
-
|
|
383
|
+
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
384
|
+
applyResolvedState(ssrRouteState.resolved, path);
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
382
387
|
const win = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : void 0;
|
|
383
388
|
if (!win) return false;
|
|
384
389
|
const state = win[BLOX_STATE_WINDOW_KEY];
|
|
385
390
|
if (!state || typeof state !== "object") return false;
|
|
386
391
|
const entry = state[path];
|
|
387
392
|
if (!entry) return false;
|
|
393
|
+
applyResolvedState(entry, path);
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
function applyResolvedState(entry, path) {
|
|
397
|
+
var _a, _b, _c;
|
|
388
398
|
blocks.value = ((_b = (_a = entry.page) == null ? void 0 : _a.content) == null ? void 0 : _b.blocks) ?? [];
|
|
389
399
|
contexts.value = entry.contexts ?? {};
|
|
390
400
|
currentPageId.value = ((_c = entry.page) == null ? void 0 : _c.id) ?? null;
|
|
391
401
|
setAlternates(entry.alternates && Object.keys(entry.alternates).length ? entry.alternates : { [locale2.value]: path });
|
|
392
402
|
updateDocumentTitle(entry);
|
|
393
|
-
|
|
403
|
+
}
|
|
404
|
+
function hasEmbeddedState() {
|
|
405
|
+
if (typeof window === "undefined") return false;
|
|
406
|
+
const state = window[BLOX_STATE_WINDOW_KEY];
|
|
407
|
+
return !!state && typeof state === "object" && !Array.isArray(state);
|
|
394
408
|
}
|
|
395
409
|
function updateDocumentTitle(resolved) {
|
|
396
410
|
if (typeof document === "undefined") return;
|
|
@@ -419,6 +433,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
419
433
|
initialLoading.value = false;
|
|
420
434
|
return;
|
|
421
435
|
}
|
|
436
|
+
if (hasEmbeddedState() && typeof window !== "undefined") {
|
|
437
|
+
window.location.assign(route.fullPath || route.path || slug);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
422
440
|
navigating.value = true;
|
|
423
441
|
try {
|
|
424
442
|
const resolved = await resolvePath(slug, urlLocale);
|
|
@@ -921,7 +939,7 @@ class BloxInstance {
|
|
|
921
939
|
}
|
|
922
940
|
router.addRoute({
|
|
923
941
|
path: "/_blox_preview",
|
|
924
|
-
component: () => import("./PreviewApp-
|
|
942
|
+
component: () => import("./PreviewApp-RWLkugBk.js"),
|
|
925
943
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
926
944
|
});
|
|
927
945
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1232,57 +1250,58 @@ function hasEmbeddedContentItem(collection, slug, locale2) {
|
|
|
1232
1250
|
return `content:${collection}:${slug}:${locale2}` in payload;
|
|
1233
1251
|
}
|
|
1234
1252
|
export {
|
|
1235
|
-
|
|
1253
|
+
useData as $,
|
|
1254
|
+
BLOX_DATA_KEY as A,
|
|
1236
1255
|
BLOX_DATA_WINDOW_KEY as B,
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
_sfc_main$
|
|
1240
|
-
_sfc_main as F,
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1256
|
+
BLOX_LAYOUT_KEY as C,
|
|
1257
|
+
BloxInstance as D,
|
|
1258
|
+
_sfc_main$2 as E,
|
|
1259
|
+
_sfc_main$1 as F,
|
|
1260
|
+
_sfc_main as G,
|
|
1261
|
+
applyLayoutChrome as H,
|
|
1262
|
+
classifyLink as I,
|
|
1263
|
+
configureApi as J,
|
|
1264
|
+
contentRoutes as K,
|
|
1265
|
+
defineContent as L,
|
|
1266
|
+
getContentRouteByCollection as M,
|
|
1267
|
+
getWebsiteId as N,
|
|
1268
|
+
getWebsiteIdSync as O,
|
|
1250
1269
|
PageRenderer as P,
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1270
|
+
isAbsoluteExternal as Q,
|
|
1271
|
+
isSoloContentPage as R,
|
|
1272
|
+
isSpecialScheme as S,
|
|
1273
|
+
listItems as T,
|
|
1274
|
+
normalizeTo as U,
|
|
1275
|
+
provideContentItem as V,
|
|
1276
|
+
resolvePath as W,
|
|
1277
|
+
toInternalPath as X,
|
|
1278
|
+
useBloxEdit as Y,
|
|
1279
|
+
useContentItem as Z,
|
|
1261
1280
|
_sfc_main$3 as _,
|
|
1262
1281
|
setCollectionResolver as a,
|
|
1263
1282
|
setActiveLocale as b,
|
|
1264
1283
|
collectBloxData as c,
|
|
1265
1284
|
collectBloxSeo as d,
|
|
1266
|
-
|
|
1267
|
-
|
|
1285
|
+
BLOX_SSR_ROUTE_STATE_KEY as e,
|
|
1286
|
+
createBlox as f,
|
|
1268
1287
|
generateContentRoutes as g,
|
|
1269
|
-
|
|
1288
|
+
BLOX_REGISTRY_KEY as h,
|
|
1270
1289
|
installLocaleAwareResolve as i,
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1290
|
+
BLOX_RUNTIME_KEY as j,
|
|
1291
|
+
BLOX_LOCALE_STRATEGY_KEY as k,
|
|
1292
|
+
useSeo as l,
|
|
1293
|
+
getRegistryData as m,
|
|
1275
1294
|
normalizeLink as n,
|
|
1276
|
-
|
|
1295
|
+
getItemBySlug as o,
|
|
1277
1296
|
provideBloxData as p,
|
|
1278
|
-
|
|
1297
|
+
getItemById as q,
|
|
1279
1298
|
resolveBlockProps as r,
|
|
1280
1299
|
setApiOrigin as s,
|
|
1281
|
-
|
|
1300
|
+
getContentRoute as t,
|
|
1282
1301
|
useLocale as u,
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1302
|
+
installContentFallback as v,
|
|
1303
|
+
installSmartLinks as w,
|
|
1304
|
+
consumePendingLocaleSwitch as x,
|
|
1305
|
+
BLOX_ADMIN_CONFIG_KEY as y,
|
|
1306
|
+
BLOX_CONFIG_KEY as z
|
|
1288
1307
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAO9D,OAAO,EAAuC,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAO9D,OAAO,EAAuC,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAMnF,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB;;;;OAIG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9D;;;OAGG;IACH,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAA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AC,EAAE,MAAM,CAAA;QAChB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;CACF;AAED,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,cAAc,UAAQ,GACpB,aAAa,GAAG,IAAI,CAUtB;AAaD,wBAAsB,oBAAoB,CACzC,KAAK,EAAE,aAAa,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,GACxD,OAAO,CAAC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAoBnG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CAmOnF"}
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -27,7 +27,7 @@ const ssg_buildGrant = require("./build-grant.cjs");
|
|
|
27
27
|
const ssg_client = require("./client.cjs");
|
|
28
28
|
const pinia = require("pinia");
|
|
29
29
|
const vue = require("vue");
|
|
30
|
-
const routes = require("../routes-
|
|
30
|
+
const routes = require("../routes-C82wA2VY.cjs");
|
|
31
31
|
async function renderBloxSsgPage(options) {
|
|
32
32
|
var _a, _b, _c, _d;
|
|
33
33
|
const {
|
|
@@ -47,81 +47,67 @@ async function renderBloxSsgPage(options) {
|
|
|
47
47
|
if (resolvedData != null && !websiteId) {
|
|
48
48
|
throw new Error(`CMS page "${url}" requires a websiteId for hydration`);
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
const { app, router, dataRegistry } = createAppForUrl(url, resolvedData, stateKey);
|
|
51
|
+
await router.push(url);
|
|
52
|
+
await router.isReady();
|
|
53
|
+
const html = await renderToString(app);
|
|
54
|
+
const stateScript = resolvedData != null ? `<script>window[${JSON.stringify(stateWindowKey)}]=${safeJson({ [stateKey]: resolvedData })};${"<"}/script>` : "";
|
|
55
|
+
const collectionsScript = "";
|
|
56
|
+
const websiteIdScript = websiteId ? `<script>window[${JSON.stringify(ssg_client.BLOX_WEBSITE_ID_WINDOW_KEY)}]=${JSON.stringify(websiteId)};${"<"}/script>` : "";
|
|
57
|
+
const seoHead = dataRegistry && collectSeo ? collectSeo(dataRegistry) : void 0;
|
|
58
|
+
const seoOverride = seoHead && Object.keys(seoHead).length > 0 ? seoHead : void 0;
|
|
59
|
+
const bloxData = dataRegistry && collectData ? collectData(dataRegistry) : {};
|
|
60
|
+
const serializedData = safeJson(bloxData);
|
|
61
|
+
const maxDataBytes = Number(
|
|
62
|
+
typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BLOX_SSG_MAX_DATA_BYTES : void 0
|
|
63
|
+
) || 1024 * 1024;
|
|
64
|
+
const dataBytes = new TextEncoder().encode(serializedData).byteLength;
|
|
65
|
+
if (dataBytes > maxDataBytes) {
|
|
66
|
+
const largest = Object.entries(bloxData).map(([key, value]) => ({
|
|
67
|
+
key,
|
|
68
|
+
bytes: new TextEncoder().encode(safeJson(value)).byteLength
|
|
69
|
+
})).sort((a, b) => b.bytes - a.bytes).slice(0, 5).map(({ key, bytes }) => `${key}=${bytes}`).join(", ");
|
|
70
|
+
throw new Error(
|
|
71
|
+
`Blox hydration payload for "${url}" is ${dataBytes} bytes (limit ${maxDataBytes}); largest keys: ${largest}`
|
|
72
|
+
);
|
|
54
73
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BLOX_SSG_MAX_DATA_BYTES : void 0
|
|
69
|
-
) || 1024 * 1024;
|
|
70
|
-
const dataBytes = new TextEncoder().encode(serializedData).byteLength;
|
|
71
|
-
if (dataBytes > maxDataBytes) {
|
|
72
|
-
const largest = Object.entries(bloxData).map(([key, value]) => ({
|
|
73
|
-
key,
|
|
74
|
-
bytes: new TextEncoder().encode(safeJson(value)).byteLength
|
|
75
|
-
})).sort((a, b) => b.bytes - a.bytes).slice(0, 5).map(({ key, bytes }) => `${key}=${bytes}`).join(", ");
|
|
76
|
-
throw new Error(
|
|
77
|
-
`Blox hydration payload for "${url}" is ${dataBytes} bytes (limit ${maxDataBytes}); largest keys: ${largest}`
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
const dataScript = Object.keys(bloxData).length > 0 ? `<script>window[${JSON.stringify(routes.BLOX_DATA_WINDOW_KEY)}]=${serializedData};${"<"}/script>` : "";
|
|
81
|
-
let head = llmArtifacts.buildPageHead({
|
|
74
|
+
const dataScript = Object.keys(bloxData).length > 0 ? `<script>window[${JSON.stringify(routes.BLOX_DATA_WINDOW_KEY)}]=${serializedData};${"<"}/script>` : "";
|
|
75
|
+
let head = llmArtifacts.buildPageHead({
|
|
76
|
+
url,
|
|
77
|
+
resolvedData,
|
|
78
|
+
website,
|
|
79
|
+
locale,
|
|
80
|
+
override: seoOverride,
|
|
81
|
+
stateScript: [stateScript, collectionsScript, websiteIdScript, dataScript].filter(Boolean).join("\n")
|
|
82
|
+
});
|
|
83
|
+
const seoData = resolvedData;
|
|
84
|
+
const primary = llmArtifacts.primaryContextEntry(seoData == null ? void 0 : seoData.contexts);
|
|
85
|
+
if ((llm == null ? void 0 : llm.jsonLd) !== false) {
|
|
86
|
+
const jsonLd = llmArtifacts.buildJsonLd({
|
|
82
87
|
url,
|
|
83
|
-
|
|
88
|
+
page: seoData == null ? void 0 : seoData.page,
|
|
84
89
|
website,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
contextKey: primary == null ? void 0 : primary.key,
|
|
91
|
+
context: primary == null ? void 0 : primary.ctx,
|
|
92
|
+
config: llm
|
|
88
93
|
});
|
|
89
|
-
|
|
90
|
-
const primary = llmArtifacts.primaryContextEntry(seoData == null ? void 0 : seoData.contexts);
|
|
91
|
-
if ((llm == null ? void 0 : llm.jsonLd) !== false) {
|
|
92
|
-
const jsonLd = llmArtifacts.buildJsonLd({
|
|
93
|
-
url,
|
|
94
|
-
page: seoData == null ? void 0 : seoData.page,
|
|
95
|
-
website,
|
|
96
|
-
contextKey: primary == null ? void 0 : primary.key,
|
|
97
|
-
context: primary == null ? void 0 : primary.ctx,
|
|
98
|
-
locale,
|
|
99
|
-
config: llm
|
|
100
|
-
});
|
|
101
|
-
if (jsonLd) head += `
|
|
94
|
+
if (jsonLd) head += `
|
|
102
95
|
${jsonLd}`;
|
|
103
|
-
}
|
|
104
|
-
let llmEntry;
|
|
105
|
-
if ((llm == null ? void 0 : llm.enabled) !== false) {
|
|
106
|
-
const title = (seoOverride == null ? void 0 : seoOverride.title) || ((_b = seoData == null ? void 0 : seoData.page) == null ? void 0 : _b.meta_title) || ((_c = seoData == null ? void 0 : seoData.page) == null ? void 0 : _c.title) || "";
|
|
107
|
-
const description = (seoOverride == null ? void 0 : seoOverride.description) || ((_d = seoData == null ? void 0 : seoData.page) == null ? void 0 : _d.meta_description) || void 0;
|
|
108
|
-
llmEntry = {
|
|
109
|
-
url,
|
|
110
|
-
title,
|
|
111
|
-
description,
|
|
112
|
-
text: (llm == null ? void 0 : llm.fullText) !== false ? llmArtifacts.extractPageText(html) : void 0
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
116
|
-
const htmlAttrs = `lang="${lang}"`;
|
|
117
|
-
return { html, head, htmlAttrs, llm: llmEntry };
|
|
118
|
-
} finally {
|
|
119
|
-
if (prevState !== void 0) {
|
|
120
|
-
g[stateWindowKey] = prevState;
|
|
121
|
-
} else {
|
|
122
|
-
delete g[stateWindowKey];
|
|
123
|
-
}
|
|
124
96
|
}
|
|
97
|
+
let llmEntry;
|
|
98
|
+
if ((llm == null ? void 0 : llm.enabled) !== false) {
|
|
99
|
+
const title = (seoOverride == null ? void 0 : seoOverride.title) || ((_b = seoData == null ? void 0 : seoData.page) == null ? void 0 : _b.meta_title) || ((_c = seoData == null ? void 0 : seoData.page) == null ? void 0 : _c.title) || "";
|
|
100
|
+
const description = (seoOverride == null ? void 0 : seoOverride.description) || ((_d = seoData == null ? void 0 : seoData.page) == null ? void 0 : _d.meta_description) || void 0;
|
|
101
|
+
llmEntry = {
|
|
102
|
+
url,
|
|
103
|
+
title,
|
|
104
|
+
description,
|
|
105
|
+
text: (llm == null ? void 0 : llm.fullText) !== false ? llmArtifacts.extractPageText(html) : void 0
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
109
|
+
const htmlAttrs = `lang="${lang}"`;
|
|
110
|
+
return { html, head, htmlAttrs, llm: llmEntry };
|
|
125
111
|
}
|
|
126
112
|
function safeJson(value) {
|
|
127
113
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
@@ -250,13 +236,17 @@ function createBloxSSREntry(options) {
|
|
|
250
236
|
throw error;
|
|
251
237
|
}
|
|
252
238
|
}
|
|
253
|
-
function buildApp(url) {
|
|
239
|
+
function buildApp(url, resolvedData, stateKey) {
|
|
254
240
|
const router = createRouter("memory", url);
|
|
255
241
|
const app = vue.createSSRApp({
|
|
256
242
|
name: "BloxSsgRoot",
|
|
257
243
|
render: () => vue.h(vue.Suspense, null, { default: () => vue.h(rootComponent) })
|
|
258
244
|
});
|
|
259
245
|
const dataRegistry = routes.provideBloxData(app, { server: true });
|
|
246
|
+
app.provide(routes.BLOX_SSR_ROUTE_STATE_KEY, {
|
|
247
|
+
path: stateKey,
|
|
248
|
+
resolved: resolvedData
|
|
249
|
+
});
|
|
260
250
|
const pinia$1 = pinia.createPinia();
|
|
261
251
|
pinia$1.use(({ store: s }) => {
|
|
262
252
|
s.router = vue.markRaw(router);
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { BLOX_STATE_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs"
|
|
|
5
5
|
import { BLOX_COLLECTIONS_WINDOW_KEY, BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
|
|
6
6
|
import { createPinia } from "pinia";
|
|
7
7
|
import { createSSRApp, h, Suspense, markRaw } from "vue";
|
|
8
|
-
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setCollectionResolver, b as setActiveLocale, c as collectBloxData, d as collectBloxSeo, p as provideBloxData, e as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-
|
|
8
|
+
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setCollectionResolver, b as setActiveLocale, c as collectBloxData, d as collectBloxSeo, p as provideBloxData, e as BLOX_SSR_ROUTE_STATE_KEY, f as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-CYYoiqvi.js";
|
|
9
9
|
async function renderBloxSsgPage(options) {
|
|
10
10
|
var _a, _b, _c, _d;
|
|
11
11
|
const {
|
|
@@ -25,81 +25,67 @@ async function renderBloxSsgPage(options) {
|
|
|
25
25
|
if (resolvedData != null && !websiteId) {
|
|
26
26
|
throw new Error(`CMS page "${url}" requires a websiteId for hydration`);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const { app, router, dataRegistry } = createAppForUrl(url, resolvedData, stateKey);
|
|
29
|
+
await router.push(url);
|
|
30
|
+
await router.isReady();
|
|
31
|
+
const html = await renderToString(app);
|
|
32
|
+
const stateScript = resolvedData != null ? `<script>window[${JSON.stringify(stateWindowKey)}]=${safeJson({ [stateKey]: resolvedData })};${"<"}/script>` : "";
|
|
33
|
+
const collectionsScript = "";
|
|
34
|
+
const websiteIdScript = websiteId ? `<script>window[${JSON.stringify(BLOX_WEBSITE_ID_WINDOW_KEY)}]=${JSON.stringify(websiteId)};${"<"}/script>` : "";
|
|
35
|
+
const seoHead = dataRegistry && collectSeo ? collectSeo(dataRegistry) : void 0;
|
|
36
|
+
const seoOverride = seoHead && Object.keys(seoHead).length > 0 ? seoHead : void 0;
|
|
37
|
+
const bloxData = dataRegistry && collectData ? collectData(dataRegistry) : {};
|
|
38
|
+
const serializedData = safeJson(bloxData);
|
|
39
|
+
const maxDataBytes = Number(
|
|
40
|
+
typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BLOX_SSG_MAX_DATA_BYTES : void 0
|
|
41
|
+
) || 1024 * 1024;
|
|
42
|
+
const dataBytes = new TextEncoder().encode(serializedData).byteLength;
|
|
43
|
+
if (dataBytes > maxDataBytes) {
|
|
44
|
+
const largest = Object.entries(bloxData).map(([key, value]) => ({
|
|
45
|
+
key,
|
|
46
|
+
bytes: new TextEncoder().encode(safeJson(value)).byteLength
|
|
47
|
+
})).sort((a2, b) => b.bytes - a2.bytes).slice(0, 5).map(({ key, bytes }) => `${key}=${bytes}`).join(", ");
|
|
48
|
+
throw new Error(
|
|
49
|
+
`Blox hydration payload for "${url}" is ${dataBytes} bytes (limit ${maxDataBytes}); largest keys: ${largest}`
|
|
50
|
+
);
|
|
32
51
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BLOX_SSG_MAX_DATA_BYTES : void 0
|
|
47
|
-
) || 1024 * 1024;
|
|
48
|
-
const dataBytes = new TextEncoder().encode(serializedData).byteLength;
|
|
49
|
-
if (dataBytes > maxDataBytes) {
|
|
50
|
-
const largest = Object.entries(bloxData).map(([key, value]) => ({
|
|
51
|
-
key,
|
|
52
|
-
bytes: new TextEncoder().encode(safeJson(value)).byteLength
|
|
53
|
-
})).sort((a2, b) => b.bytes - a2.bytes).slice(0, 5).map(({ key, bytes }) => `${key}=${bytes}`).join(", ");
|
|
54
|
-
throw new Error(
|
|
55
|
-
`Blox hydration payload for "${url}" is ${dataBytes} bytes (limit ${maxDataBytes}); largest keys: ${largest}`
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
const dataScript = Object.keys(bloxData).length > 0 ? `<script>window[${JSON.stringify(BLOX_DATA_WINDOW_KEY2)}]=${serializedData};${"<"}/script>` : "";
|
|
59
|
-
let head = buildPageHead({
|
|
52
|
+
const dataScript = Object.keys(bloxData).length > 0 ? `<script>window[${JSON.stringify(BLOX_DATA_WINDOW_KEY2)}]=${serializedData};${"<"}/script>` : "";
|
|
53
|
+
let head = buildPageHead({
|
|
54
|
+
url,
|
|
55
|
+
resolvedData,
|
|
56
|
+
website,
|
|
57
|
+
locale,
|
|
58
|
+
override: seoOverride,
|
|
59
|
+
stateScript: [stateScript, collectionsScript, websiteIdScript, dataScript].filter(Boolean).join("\n")
|
|
60
|
+
});
|
|
61
|
+
const seoData = resolvedData;
|
|
62
|
+
const primary = primaryContextEntry(seoData == null ? void 0 : seoData.contexts);
|
|
63
|
+
if ((llm == null ? void 0 : llm.jsonLd) !== false) {
|
|
64
|
+
const jsonLd = buildJsonLd({
|
|
60
65
|
url,
|
|
61
|
-
|
|
66
|
+
page: seoData == null ? void 0 : seoData.page,
|
|
62
67
|
website,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
contextKey: primary == null ? void 0 : primary.key,
|
|
69
|
+
context: primary == null ? void 0 : primary.ctx,
|
|
70
|
+
config: llm
|
|
66
71
|
});
|
|
67
|
-
|
|
68
|
-
const primary = primaryContextEntry(seoData == null ? void 0 : seoData.contexts);
|
|
69
|
-
if ((llm == null ? void 0 : llm.jsonLd) !== false) {
|
|
70
|
-
const jsonLd = buildJsonLd({
|
|
71
|
-
url,
|
|
72
|
-
page: seoData == null ? void 0 : seoData.page,
|
|
73
|
-
website,
|
|
74
|
-
contextKey: primary == null ? void 0 : primary.key,
|
|
75
|
-
context: primary == null ? void 0 : primary.ctx,
|
|
76
|
-
locale,
|
|
77
|
-
config: llm
|
|
78
|
-
});
|
|
79
|
-
if (jsonLd) head += `
|
|
72
|
+
if (jsonLd) head += `
|
|
80
73
|
${jsonLd}`;
|
|
81
|
-
}
|
|
82
|
-
let llmEntry;
|
|
83
|
-
if ((llm == null ? void 0 : llm.enabled) !== false) {
|
|
84
|
-
const title = (seoOverride == null ? void 0 : seoOverride.title) || ((_b = seoData == null ? void 0 : seoData.page) == null ? void 0 : _b.meta_title) || ((_c = seoData == null ? void 0 : seoData.page) == null ? void 0 : _c.title) || "";
|
|
85
|
-
const description = (seoOverride == null ? void 0 : seoOverride.description) || ((_d = seoData == null ? void 0 : seoData.page) == null ? void 0 : _d.meta_description) || void 0;
|
|
86
|
-
llmEntry = {
|
|
87
|
-
url,
|
|
88
|
-
title,
|
|
89
|
-
description,
|
|
90
|
-
text: (llm == null ? void 0 : llm.fullText) !== false ? extractPageText(html) : void 0
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
94
|
-
const htmlAttrs = `lang="${lang}"`;
|
|
95
|
-
return { html, head, htmlAttrs, llm: llmEntry };
|
|
96
|
-
} finally {
|
|
97
|
-
if (prevState !== void 0) {
|
|
98
|
-
g2[stateWindowKey] = prevState;
|
|
99
|
-
} else {
|
|
100
|
-
delete g2[stateWindowKey];
|
|
101
|
-
}
|
|
102
74
|
}
|
|
75
|
+
let llmEntry;
|
|
76
|
+
if ((llm == null ? void 0 : llm.enabled) !== false) {
|
|
77
|
+
const title = (seoOverride == null ? void 0 : seoOverride.title) || ((_b = seoData == null ? void 0 : seoData.page) == null ? void 0 : _b.meta_title) || ((_c = seoData == null ? void 0 : seoData.page) == null ? void 0 : _c.title) || "";
|
|
78
|
+
const description = (seoOverride == null ? void 0 : seoOverride.description) || ((_d = seoData == null ? void 0 : seoData.page) == null ? void 0 : _d.meta_description) || void 0;
|
|
79
|
+
llmEntry = {
|
|
80
|
+
url,
|
|
81
|
+
title,
|
|
82
|
+
description,
|
|
83
|
+
text: (llm == null ? void 0 : llm.fullText) !== false ? extractPageText(html) : void 0
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const lang = locale || (website == null ? void 0 : website.default_locale) || "en";
|
|
87
|
+
const htmlAttrs = `lang="${lang}"`;
|
|
88
|
+
return { html, head, htmlAttrs, llm: llmEntry };
|
|
103
89
|
}
|
|
104
90
|
function safeJson(value) {
|
|
105
91
|
return JSON.stringify(value).replace(/</g, "\\u003c");
|
|
@@ -228,13 +214,17 @@ function createBloxSSREntry(options) {
|
|
|
228
214
|
throw error;
|
|
229
215
|
}
|
|
230
216
|
}
|
|
231
|
-
function buildApp(url) {
|
|
217
|
+
function buildApp(url, resolvedData, stateKey) {
|
|
232
218
|
const router = createRouter("memory", url);
|
|
233
219
|
const app = createSSRApp({
|
|
234
220
|
name: "BloxSsgRoot",
|
|
235
221
|
render: () => h(Suspense, null, { default: () => h(rootComponent) })
|
|
236
222
|
});
|
|
237
223
|
const dataRegistry = provideBloxData(app, { server: true });
|
|
224
|
+
app.provide(BLOX_SSR_ROUTE_STATE_KEY, {
|
|
225
|
+
path: stateKey,
|
|
226
|
+
resolved: resolvedData
|
|
227
|
+
});
|
|
238
228
|
const pinia = createPinia();
|
|
239
229
|
pinia.use(({ store: s2 }) => {
|
|
240
230
|
s2.router = markRaw(router);
|
|
@@ -21,7 +21,7 @@ export declare function renderBloxSsgPage<TApp>(options: {
|
|
|
21
21
|
url: string;
|
|
22
22
|
resolvedData: unknown | null;
|
|
23
23
|
renderToString: (app: TApp) => Promise<string>;
|
|
24
|
-
createAppForUrl: (url: string) => {
|
|
24
|
+
createAppForUrl: (url: string, resolvedData: unknown | null, stateKey: string) => {
|
|
25
25
|
app: TApp;
|
|
26
26
|
router: BloxSsgRouterLike;
|
|
27
27
|
dataRegistry?: BloxDataRegistry;
|
|
@@ -53,4 +53,6 @@ export declare function renderBloxSsgPage<TApp>(options: {
|
|
|
53
53
|
htmlAttrs?: string;
|
|
54
54
|
llm?: LlmPageEntry;
|
|
55
55
|
}>;
|
|
56
|
+
/** JSON for embedding in a <script> tag — escapes `<` so `</script>` can't break out. */
|
|
57
|
+
export declare function safeJson(value: unknown): string;
|
|
56
58
|
//# sourceMappingURL=render-resolved-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-resolved-page.d.ts","sourceRoot":"","sources":["../../src/ssg/render-resolved-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGvE,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9C,eAAe,EAAE,
|
|
1
|
+
{"version":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ACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;IACvC,8EAA8E;IAC9E,GAAG,CAAC,EAAE,kBAAkB,CAAA;CACxB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,CAsHnF;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C"}
|
package/dist/symbols.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
import { LocaleStrategy } from './localeStrategy';
|
|
3
3
|
import { BlockDefinition } from './schema';
|
|
4
|
+
import { PageResolveRead } from './api/types';
|
|
4
5
|
export declare const BLOX_REGISTRY_KEY: InjectionKey<Record<string, BlockDefinition>>;
|
|
5
6
|
export interface BloxConfig {
|
|
6
7
|
defaultLocale: string;
|
|
@@ -15,6 +16,10 @@ export interface BloxRuntimeContext {
|
|
|
15
16
|
loading: Ref<boolean>;
|
|
16
17
|
}
|
|
17
18
|
export declare const BLOX_RUNTIME_KEY: InjectionKey<BloxRuntimeContext>;
|
|
19
|
+
export declare const BLOX_SSR_ROUTE_STATE_KEY: InjectionKey<{
|
|
20
|
+
path: string;
|
|
21
|
+
resolved: PageResolveRead | null;
|
|
22
|
+
} | null>;
|
|
18
23
|
/**
|
|
19
24
|
* Opt-in "edit this page" feature for marketing sites.
|
|
20
25
|
*
|
package/dist/symbols.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../src/symbols.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../src/symbols.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAClD,CAAA;AAE1B,MAAM,WAAW,UAAU;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAAyB,CAAA;AAE9E,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,cAAc,CAAkC,CAAA;AAEpG,MAAM,WAAW,kBAAkB;IAClC,yDAAyD;IACzD,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACvB,2EAA2E;IAC3E,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,kBAAkB,CAA0B,CAAA;AAExF,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CAChC,GAAG,IAAI,CAAkC,CAA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