@bagelink/blox 1.15.613 → 1.15.621
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-vChcurYp.js → PreviewApp-BMp-8qs3.js} +1 -1
- package/dist/{PreviewApp-iqvIddLt.cjs → PreviewApp-CjelUL54.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BP5U8DSp.cjs → PreviewApp.vue_vue_type_style_index_0_lang-DU4NixKc.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-y4CzCB8Y.js → PreviewApp.vue_vue_type_style_index_0_lang-DfqvSF62.js} +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/{appRuntime-B5XKqx70.cjs → appRuntime-CeEDneOA.cjs} +20 -28
- package/dist/{appRuntime-Gzs_4KuX.js → appRuntime-DURTwUXn.js} +64 -72
- package/dist/appRuntime.d.ts +1 -0
- package/dist/appRuntime.d.ts.map +1 -1
- package/dist/client-AoDTJJXJ.cjs +29 -0
- package/dist/client-XQnL-B6N.js +30 -0
- package/dist/core.d.ts +2 -0
- package/dist/core.d.ts.map +1 -1
- package/dist/createBloxApp.d.ts +2 -0
- package/dist/createBloxApp.d.ts.map +1 -1
- package/dist/data/useData.d.ts +1 -2
- package/dist/data/useData.d.ts.map +1 -1
- package/dist/hydration.d.ts +13 -0
- package/dist/hydration.d.ts.map +1 -0
- package/dist/index.cjs +13 -6
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +48 -41
- package/dist/{shard-runner-CzerD_rM.js → shard-runner-C7_xAkA1.js} +2 -2
- package/dist/{shard-runner-BloAN-jq.cjs → shard-runner-CinJMC5z.cjs} +2 -2
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/client.cjs +3 -6
- package/dist/ssg/client.d.ts +3 -1
- package/dist/ssg/client.d.ts.map +1 -1
- package/dist/ssg/client.mjs +3 -6
- package/dist/ssg/cms-routes.d.ts +0 -4
- package/dist/ssg/cms-routes.d.ts.map +1 -1
- package/dist/ssg/constants.d.ts +5 -2
- package/dist/ssg/constants.d.ts.map +1 -1
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +12 -12
- package/dist/ssg/index.d.ts +3 -3
- package/dist/ssg/index.d.ts.map +1 -1
- package/dist/ssg/index.mjs +25 -26
- package/dist/ssg/render-resolved-page.d.ts +2 -9
- package/dist/ssg/render-resolved-page.d.ts.map +1 -1
- package/dist/symbols.d.ts +1 -0
- package/dist/symbols.d.ts.map +1 -1
- package/dist/{validate-output-DK0uHrG6.cjs → validate-output-DQTw64Rc.cjs} +1 -6
- package/dist/{validate-output-BeslczYg.js → validate-output-e0E998g_.js} +14 -19
- 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":";AA2hBA,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-DU4NixKc.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 { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-DURTwUXn.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAoB,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAoB,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AAc5C,KAAK,kBAAkB,GAAG,CACzB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,gBAAgB,KACrB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;AAG5C,MAAM,WAAW,cAAc;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,aAAa;IAC7B,gBAAgB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;IACrC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IACnC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;IAC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@ -4,7 +4,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
const pinia = require("pinia");
|
|
6
6
|
const vue = require("vue");
|
|
7
|
-
const ssg_client = require("./
|
|
7
|
+
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
9
9
|
const vue$1 = require("@bagelink/vue");
|
|
10
10
|
const pageTitle = require("./pageTitle-nIl1cDfD.cjs");
|
|
@@ -56,10 +56,9 @@ function createBloxApi(options) {
|
|
|
56
56
|
return response.json();
|
|
57
57
|
}
|
|
58
58
|
function getWebsiteIdSync2() {
|
|
59
|
+
var _a;
|
|
59
60
|
if (websiteId) return websiteId;
|
|
60
|
-
|
|
61
|
-
const embedded = window[ssg_client.BLOX_WEBSITE_ID_WINDOW_KEY];
|
|
62
|
-
return typeof embedded === "string" && embedded !== "" ? embedded : null;
|
|
61
|
+
return ((_a = ssg_client.readBloxHydration()) == null ? void 0 : _a.websiteId) ?? null;
|
|
63
62
|
}
|
|
64
63
|
async function getWebsiteId2() {
|
|
65
64
|
const existing = getWebsiteIdSync2();
|
|
@@ -479,6 +478,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
479
478
|
const router = vueRouter.useRouter();
|
|
480
479
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
481
480
|
const strategy = vue.inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
481
|
+
const config = vue.inject(BLOX_CONFIG_KEY, null);
|
|
482
482
|
const ssrRouteState = vue.inject(BLOX_SSR_ROUTE_STATE_KEY, null);
|
|
483
483
|
const api = useBloxApi();
|
|
484
484
|
const blocks = vue.ref([]);
|
|
@@ -502,15 +502,13 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
502
502
|
return typeof (route == null ? void 0 : route.fullPath) === "string" && route.fullPath ? route.fullPath : currentRoutePath() || fallback;
|
|
503
503
|
}
|
|
504
504
|
function tryHydrateFromState(path) {
|
|
505
|
+
var _a;
|
|
505
506
|
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
506
507
|
applyResolvedState(ssrRouteState.resolved);
|
|
507
508
|
return true;
|
|
508
509
|
}
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
const state = win[ssg_client.BLOX_STATE_WINDOW_KEY];
|
|
512
|
-
if (!state || typeof state !== "object") return false;
|
|
513
|
-
const entry = state[path];
|
|
510
|
+
const routeState = (_a = ssg_client.readBloxHydration()) == null ? void 0 : _a.route;
|
|
511
|
+
const entry = (routeState == null ? void 0 : routeState.path) === path ? routeState.resolved : void 0;
|
|
514
512
|
if (!entry) return false;
|
|
515
513
|
applyResolvedState(entry);
|
|
516
514
|
return true;
|
|
@@ -523,11 +521,6 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
523
521
|
setAlternates(entry.alternates && Object.keys(entry.alternates).length ? entry.alternates : {});
|
|
524
522
|
updateDocumentTitle(entry);
|
|
525
523
|
}
|
|
526
|
-
function hasEmbeddedState() {
|
|
527
|
-
if (typeof window === "undefined") return false;
|
|
528
|
-
const state = window[ssg_client.BLOX_STATE_WINDOW_KEY];
|
|
529
|
-
return !!state && typeof state === "object" && !Array.isArray(state);
|
|
530
|
-
}
|
|
531
524
|
function updateDocumentTitle(resolved) {
|
|
532
525
|
if (typeof document === "undefined") return;
|
|
533
526
|
const title = pageTitle.resolvePageTitle(resolved, {
|
|
@@ -555,7 +548,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
555
548
|
initialLoading.value = false;
|
|
556
549
|
return;
|
|
557
550
|
}
|
|
558
|
-
if (
|
|
551
|
+
if ((config == null ? void 0 : config.navigation) === "document" && typeof window !== "undefined") {
|
|
559
552
|
window.location.assign(currentRouteTarget(slug));
|
|
560
553
|
return;
|
|
561
554
|
}
|
|
@@ -619,7 +612,6 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
619
612
|
};
|
|
620
613
|
}
|
|
621
614
|
});
|
|
622
|
-
const BLOX_DATA_WINDOW_KEY = "__BLOX_DATA__";
|
|
623
615
|
const BLOX_DATA_KEY = Symbol("blox-data");
|
|
624
616
|
function provideBloxData(app, opts = {}) {
|
|
625
617
|
const isServer = opts.server ?? false;
|
|
@@ -636,12 +628,8 @@ function provideBloxData(app, opts = {}) {
|
|
|
636
628
|
return registry2;
|
|
637
629
|
}
|
|
638
630
|
function readPayload() {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
if (raw && typeof raw === "object" && !Array.isArray(raw)) {
|
|
642
|
-
return raw;
|
|
643
|
-
}
|
|
644
|
-
return null;
|
|
631
|
+
var _a;
|
|
632
|
+
return ((_a = ssg_client.readBloxHydration()) == null ? void 0 : _a.data) ?? null;
|
|
645
633
|
}
|
|
646
634
|
function getRegistry() {
|
|
647
635
|
if (vue.getCurrentInstance()) {
|
|
@@ -975,7 +963,8 @@ class BloxInstance {
|
|
|
975
963
|
__publicField(this, "_adminEdit");
|
|
976
964
|
this._config = {
|
|
977
965
|
defaultLocale: (options == null ? void 0 : options.defaultLocale) ?? "en",
|
|
978
|
-
supportedLocales: (options == null ? void 0 : options.supportedLocales) ?? []
|
|
966
|
+
supportedLocales: (options == null ? void 0 : options.supportedLocales) ?? [],
|
|
967
|
+
navigation: (options == null ? void 0 : options.navigation) ?? "spa"
|
|
979
968
|
};
|
|
980
969
|
this._strategy = createLocaleStrategy(options ?? {});
|
|
981
970
|
this._adminEdit = options == null ? void 0 : options.adminEdit;
|
|
@@ -1064,7 +1053,7 @@ class BloxInstance {
|
|
|
1064
1053
|
router.addRoute({
|
|
1065
1054
|
path: "/_blox_preview",
|
|
1066
1055
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
1067
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
1056
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-CjelUL54.cjs")),
|
|
1068
1057
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
1069
1058
|
});
|
|
1070
1059
|
}
|
|
@@ -1083,7 +1072,8 @@ class BloxInstance {
|
|
|
1083
1072
|
if (options) {
|
|
1084
1073
|
this._config = {
|
|
1085
1074
|
defaultLocale: options.defaultLocale ?? this._config.defaultLocale,
|
|
1086
|
-
supportedLocales: options.supportedLocales ?? this._config.supportedLocales
|
|
1075
|
+
supportedLocales: options.supportedLocales ?? this._config.supportedLocales,
|
|
1076
|
+
navigation: options.navigation ?? this._config.navigation
|
|
1087
1077
|
};
|
|
1088
1078
|
this._strategy = createLocaleStrategy({
|
|
1089
1079
|
...options,
|
|
@@ -1389,8 +1379,9 @@ function installContentFallback(router, supportedLocales, defaultLocale, api) {
|
|
|
1389
1379
|
});
|
|
1390
1380
|
}
|
|
1391
1381
|
function hasEmbeddedContentItem(collection, slug, locale2) {
|
|
1382
|
+
var _a;
|
|
1392
1383
|
if (typeof window === "undefined") return false;
|
|
1393
|
-
const payload =
|
|
1384
|
+
const payload = (_a = ssg_client.readBloxHydration()) == null ? void 0 : _a.data;
|
|
1394
1385
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return false;
|
|
1395
1386
|
return `content:${collection}:${slug}:${locale2}` in payload;
|
|
1396
1387
|
}
|
|
@@ -1408,6 +1399,7 @@ function installBloxRuntime(options) {
|
|
|
1408
1399
|
setup,
|
|
1409
1400
|
adminEdit,
|
|
1410
1401
|
contentFallback = false,
|
|
1402
|
+
navigation = "spa",
|
|
1411
1403
|
api,
|
|
1412
1404
|
localeState: localeState2
|
|
1413
1405
|
} = options;
|
|
@@ -1418,7 +1410,8 @@ function installBloxRuntime(options) {
|
|
|
1418
1410
|
defaultLocale: locale2,
|
|
1419
1411
|
supportedLocales,
|
|
1420
1412
|
router,
|
|
1421
|
-
adminEdit
|
|
1413
|
+
adminEdit,
|
|
1414
|
+
navigation
|
|
1422
1415
|
});
|
|
1423
1416
|
const pinia$1 = pinia.createPinia();
|
|
1424
1417
|
pinia$1.use(({ store: piniaStore }) => {
|
|
@@ -1449,7 +1442,6 @@ function installBloxRuntime(options) {
|
|
|
1449
1442
|
exports.BLOX_ADMIN_CONFIG_KEY = BLOX_ADMIN_CONFIG_KEY;
|
|
1450
1443
|
exports.BLOX_CONFIG_KEY = BLOX_CONFIG_KEY;
|
|
1451
1444
|
exports.BLOX_DATA_KEY = BLOX_DATA_KEY;
|
|
1452
|
-
exports.BLOX_DATA_WINDOW_KEY = BLOX_DATA_WINDOW_KEY;
|
|
1453
1445
|
exports.BLOX_LAYOUT_KEY = BLOX_LAYOUT_KEY;
|
|
1454
1446
|
exports.BLOX_LOCALE_STRATEGY_KEY = BLOX_LOCALE_STRATEGY_KEY;
|
|
1455
1447
|
exports.BLOX_REGISTRY_KEY = BLOX_REGISTRY_KEY;
|
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { createPinia } from "pinia";
|
|
5
5
|
import { getCurrentInstance, inject, computed, ref, defineComponent, onMounted, unref, openBlock, createBlock, Teleport, createElementBlock, createElementVNode, createCommentVNode, h, provide, watch, resolveComponent, toDisplayString, createVNode, withCtx, createTextVNode, Fragment, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
|
|
6
|
-
import { BLOX_WEBSITE_ID_WINDOW_KEY,
|
|
6
|
+
import { a as BLOX_WEBSITE_ID_WINDOW_KEY, r as readBloxHydration } from "./client-XQnL-B6N.js";
|
|
7
7
|
import { useRoute, useRouter } from "vue-router";
|
|
8
8
|
import { getI18n } from "@bagelink/vue";
|
|
9
9
|
import { r as resolvePageTitle, s as siteNameFromContexts, a as preserveCurrentSiteSuffix } from "./pageTitle-BOTMH-D8.js";
|
|
@@ -55,10 +55,9 @@ function createBloxApi(options) {
|
|
|
55
55
|
return response.json();
|
|
56
56
|
}
|
|
57
57
|
function getWebsiteIdSync2() {
|
|
58
|
+
var _a;
|
|
58
59
|
if (websiteId) return websiteId;
|
|
59
|
-
|
|
60
|
-
const embedded = window[BLOX_WEBSITE_ID_WINDOW_KEY];
|
|
61
|
-
return typeof embedded === "string" && embedded !== "" ? embedded : null;
|
|
60
|
+
return ((_a = readBloxHydration()) == null ? void 0 : _a.websiteId) ?? null;
|
|
62
61
|
}
|
|
63
62
|
async function getWebsiteId2() {
|
|
64
63
|
const existing = getWebsiteIdSync2();
|
|
@@ -478,6 +477,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478
477
|
const router = useRouter();
|
|
479
478
|
const { locale: locale2, setLocale, setAlternates } = useLocale();
|
|
480
479
|
const strategy = inject(BLOX_LOCALE_STRATEGY_KEY, null);
|
|
480
|
+
const config = inject(BLOX_CONFIG_KEY, null);
|
|
481
481
|
const ssrRouteState = inject(BLOX_SSR_ROUTE_STATE_KEY, null);
|
|
482
482
|
const api = useBloxApi();
|
|
483
483
|
const blocks = ref([]);
|
|
@@ -501,15 +501,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
501
501
|
return typeof (route == null ? void 0 : route.fullPath) === "string" && route.fullPath ? route.fullPath : currentRoutePath() || fallback;
|
|
502
502
|
}
|
|
503
503
|
function tryHydrateFromState(path) {
|
|
504
|
+
var _a;
|
|
504
505
|
if ((ssrRouteState == null ? void 0 : ssrRouteState.path) === path && ssrRouteState.resolved) {
|
|
505
506
|
applyResolvedState(ssrRouteState.resolved);
|
|
506
507
|
return true;
|
|
507
508
|
}
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
const state = win[BLOX_STATE_WINDOW_KEY];
|
|
511
|
-
if (!state || typeof state !== "object") return false;
|
|
512
|
-
const entry = state[path];
|
|
509
|
+
const routeState = (_a = readBloxHydration()) == null ? void 0 : _a.route;
|
|
510
|
+
const entry = (routeState == null ? void 0 : routeState.path) === path ? routeState.resolved : void 0;
|
|
513
511
|
if (!entry) return false;
|
|
514
512
|
applyResolvedState(entry);
|
|
515
513
|
return true;
|
|
@@ -522,11 +520,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
522
520
|
setAlternates(entry.alternates && Object.keys(entry.alternates).length ? entry.alternates : {});
|
|
523
521
|
updateDocumentTitle(entry);
|
|
524
522
|
}
|
|
525
|
-
function hasEmbeddedState() {
|
|
526
|
-
if (typeof window === "undefined") return false;
|
|
527
|
-
const state = window[BLOX_STATE_WINDOW_KEY];
|
|
528
|
-
return !!state && typeof state === "object" && !Array.isArray(state);
|
|
529
|
-
}
|
|
530
523
|
function updateDocumentTitle(resolved) {
|
|
531
524
|
if (typeof document === "undefined") return;
|
|
532
525
|
const title = resolvePageTitle(resolved, {
|
|
@@ -554,7 +547,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
554
547
|
initialLoading.value = false;
|
|
555
548
|
return;
|
|
556
549
|
}
|
|
557
|
-
if (
|
|
550
|
+
if ((config == null ? void 0 : config.navigation) === "document" && typeof window !== "undefined") {
|
|
558
551
|
window.location.assign(currentRouteTarget(slug));
|
|
559
552
|
return;
|
|
560
553
|
}
|
|
@@ -618,7 +611,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
618
611
|
};
|
|
619
612
|
}
|
|
620
613
|
});
|
|
621
|
-
const BLOX_DATA_WINDOW_KEY = "__BLOX_DATA__";
|
|
622
614
|
const BLOX_DATA_KEY = Symbol("blox-data");
|
|
623
615
|
function provideBloxData(app, opts = {}) {
|
|
624
616
|
const isServer = opts.server ?? false;
|
|
@@ -635,12 +627,8 @@ function provideBloxData(app, opts = {}) {
|
|
|
635
627
|
return registry2;
|
|
636
628
|
}
|
|
637
629
|
function readPayload() {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
if (raw && typeof raw === "object" && !Array.isArray(raw)) {
|
|
641
|
-
return raw;
|
|
642
|
-
}
|
|
643
|
-
return null;
|
|
630
|
+
var _a;
|
|
631
|
+
return ((_a = readBloxHydration()) == null ? void 0 : _a.data) ?? null;
|
|
644
632
|
}
|
|
645
633
|
function getRegistry() {
|
|
646
634
|
if (getCurrentInstance()) {
|
|
@@ -974,7 +962,8 @@ class BloxInstance {
|
|
|
974
962
|
__publicField(this, "_adminEdit");
|
|
975
963
|
this._config = {
|
|
976
964
|
defaultLocale: (options == null ? void 0 : options.defaultLocale) ?? "en",
|
|
977
|
-
supportedLocales: (options == null ? void 0 : options.supportedLocales) ?? []
|
|
965
|
+
supportedLocales: (options == null ? void 0 : options.supportedLocales) ?? [],
|
|
966
|
+
navigation: (options == null ? void 0 : options.navigation) ?? "spa"
|
|
978
967
|
};
|
|
979
968
|
this._strategy = createLocaleStrategy(options ?? {});
|
|
980
969
|
this._adminEdit = options == null ? void 0 : options.adminEdit;
|
|
@@ -1063,7 +1052,7 @@ class BloxInstance {
|
|
|
1063
1052
|
router.addRoute({
|
|
1064
1053
|
path: "/_blox_preview",
|
|
1065
1054
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
1066
|
-
component: () => import("./PreviewApp-
|
|
1055
|
+
component: () => import("./PreviewApp-BMp-8qs3.js"),
|
|
1067
1056
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
1068
1057
|
});
|
|
1069
1058
|
}
|
|
@@ -1082,7 +1071,8 @@ class BloxInstance {
|
|
|
1082
1071
|
if (options) {
|
|
1083
1072
|
this._config = {
|
|
1084
1073
|
defaultLocale: options.defaultLocale ?? this._config.defaultLocale,
|
|
1085
|
-
supportedLocales: options.supportedLocales ?? this._config.supportedLocales
|
|
1074
|
+
supportedLocales: options.supportedLocales ?? this._config.supportedLocales,
|
|
1075
|
+
navigation: options.navigation ?? this._config.navigation
|
|
1086
1076
|
};
|
|
1087
1077
|
this._strategy = createLocaleStrategy({
|
|
1088
1078
|
...options,
|
|
@@ -1388,8 +1378,9 @@ function installContentFallback(router, supportedLocales, defaultLocale, api) {
|
|
|
1388
1378
|
});
|
|
1389
1379
|
}
|
|
1390
1380
|
function hasEmbeddedContentItem(collection, slug, locale2) {
|
|
1381
|
+
var _a;
|
|
1391
1382
|
if (typeof window === "undefined") return false;
|
|
1392
|
-
const payload =
|
|
1383
|
+
const payload = (_a = readBloxHydration()) == null ? void 0 : _a.data;
|
|
1393
1384
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return false;
|
|
1394
1385
|
return `content:${collection}:${slug}:${locale2}` in payload;
|
|
1395
1386
|
}
|
|
@@ -1407,6 +1398,7 @@ function installBloxRuntime(options) {
|
|
|
1407
1398
|
setup,
|
|
1408
1399
|
adminEdit,
|
|
1409
1400
|
contentFallback = false,
|
|
1401
|
+
navigation = "spa",
|
|
1410
1402
|
api,
|
|
1411
1403
|
localeState: localeState2
|
|
1412
1404
|
} = options;
|
|
@@ -1417,7 +1409,8 @@ function installBloxRuntime(options) {
|
|
|
1417
1409
|
defaultLocale: locale2,
|
|
1418
1410
|
supportedLocales,
|
|
1419
1411
|
router,
|
|
1420
|
-
adminEdit
|
|
1412
|
+
adminEdit,
|
|
1413
|
+
navigation
|
|
1421
1414
|
});
|
|
1422
1415
|
const pinia = createPinia();
|
|
1423
1416
|
pinia.use(({ store: piniaStore }) => {
|
|
@@ -1446,61 +1439,60 @@ function installBloxRuntime(options) {
|
|
|
1446
1439
|
return blox;
|
|
1447
1440
|
}
|
|
1448
1441
|
export {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
_sfc_main$
|
|
1453
|
-
_sfc_main
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1442
|
+
useBloxEdit as $,
|
|
1443
|
+
_sfc_main$2 as A,
|
|
1444
|
+
BLOX_SSR_ROUTE_STATE_KEY as B,
|
|
1445
|
+
_sfc_main$1 as C,
|
|
1446
|
+
_sfc_main as D,
|
|
1447
|
+
applyLayoutChrome as E,
|
|
1448
|
+
classifyLink as F,
|
|
1449
|
+
configureApi as G,
|
|
1450
|
+
contentRoutes as H,
|
|
1451
|
+
createBlox as I,
|
|
1452
|
+
createBloxApi as J,
|
|
1453
|
+
defineContent as K,
|
|
1454
|
+
generateContentRoutes as L,
|
|
1455
|
+
getContentRouteByCollection as M,
|
|
1456
|
+
getWebsiteId as N,
|
|
1457
|
+
getWebsiteIdSync as O,
|
|
1465
1458
|
PageRenderer as P,
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1459
|
+
installContentFallback as Q,
|
|
1460
|
+
isAbsoluteExternal as R,
|
|
1461
|
+
isSoloContentPage as S,
|
|
1462
|
+
isSpecialScheme as T,
|
|
1463
|
+
listItems as U,
|
|
1464
|
+
normalizeTo as V,
|
|
1465
|
+
provideContentItem as W,
|
|
1466
|
+
resolvePath as X,
|
|
1467
|
+
setApiOrigin as Y,
|
|
1468
|
+
toInternalPath as Z,
|
|
1476
1469
|
_sfc_main$3 as _,
|
|
1477
1470
|
collectBloxSeo as a,
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
useData as a2,
|
|
1471
|
+
useContentItem as a0,
|
|
1472
|
+
useData as a1,
|
|
1481
1473
|
provideBloxApi as b,
|
|
1482
1474
|
collectBloxData as c,
|
|
1483
1475
|
provideBloxLocale as d,
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1476
|
+
BLOX_REGISTRY_KEY as e,
|
|
1477
|
+
BLOX_RUNTIME_KEY as f,
|
|
1478
|
+
BLOX_LOCALE_STRATEGY_KEY as g,
|
|
1479
|
+
useBloxApi as h,
|
|
1488
1480
|
installBloxRuntime as i,
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1481
|
+
useSeo as j,
|
|
1482
|
+
getRegistryData as k,
|
|
1483
|
+
getItemBySlug as l,
|
|
1484
|
+
getItemById as m,
|
|
1493
1485
|
normalizeLink as n,
|
|
1494
|
-
|
|
1486
|
+
getContentRoute as o,
|
|
1495
1487
|
provideBloxData as p,
|
|
1496
|
-
|
|
1488
|
+
installSmartLinks as q,
|
|
1497
1489
|
resolveBlockProps as r,
|
|
1498
1490
|
setActiveLocale as s,
|
|
1499
|
-
|
|
1491
|
+
consumePendingLocaleSwitch as t,
|
|
1500
1492
|
useLocale as u,
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1493
|
+
BLOX_ADMIN_CONFIG_KEY as v,
|
|
1494
|
+
BLOX_CONFIG_KEY as w,
|
|
1495
|
+
BLOX_DATA_KEY as x,
|
|
1496
|
+
BLOX_LAYOUT_KEY as y,
|
|
1497
|
+
BloxInstance as z
|
|
1506
1498
|
};
|
package/dist/appRuntime.d.ts
CHANGED
package/dist/appRuntime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appRuntime.d.ts","sourceRoot":"","sources":["../src/appRuntime.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,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAG9D,OAAO,EA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AO,EAAc,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAA;AAGtD,MAAM,WAAW,yBAAyB;IACzC,GAAG,EAAE,GAAG,CAAA;IACR,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACpD,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC5C,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,UAAU,GAAG,KAAK,CAAA;IAC/B,GAAG,EAAE,aAAa,CAAA;IAClB,WAAW,EAAE,eAAe,CAAA;CAC5B;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CAwDnF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const BLOX_HYDRATION_WINDOW_KEY = "__BLOX_HYDRATION__";
|
|
3
|
+
const BLOX_STATE_WINDOW_KEY = "__BLOX_STATE__";
|
|
4
|
+
const BLOX_WEBSITE_ID_WINDOW_KEY = "__BLOX_WEBSITE_ID__";
|
|
5
|
+
const BLOX_DATA_WINDOW_KEY = "__BLOX_DATA__";
|
|
6
|
+
function browserGlobals() {
|
|
7
|
+
return typeof window === "undefined" ? null : window;
|
|
8
|
+
}
|
|
9
|
+
function readBloxHydration() {
|
|
10
|
+
const globals = browserGlobals();
|
|
11
|
+
if (!globals) return null;
|
|
12
|
+
const payload = globals[BLOX_HYDRATION_WINDOW_KEY];
|
|
13
|
+
if (payload && typeof payload === "object" && !Array.isArray(payload) && payload.version === 2) return payload;
|
|
14
|
+
const legacyState = globals[BLOX_STATE_WINDOW_KEY];
|
|
15
|
+
const entries = legacyState && typeof legacyState === "object" && !Array.isArray(legacyState) ? Object.entries(legacyState) : [];
|
|
16
|
+
const legacyData = globals[BLOX_DATA_WINDOW_KEY];
|
|
17
|
+
const websiteId = globals[BLOX_WEBSITE_ID_WINDOW_KEY];
|
|
18
|
+
if (!entries.length && !legacyData && !websiteId) return null;
|
|
19
|
+
const [path, resolved] = entries[0] ?? [];
|
|
20
|
+
return {
|
|
21
|
+
version: 2,
|
|
22
|
+
...path && resolved ? { route: { path, resolved } } : {},
|
|
23
|
+
...typeof websiteId === "string" ? { websiteId } : {},
|
|
24
|
+
data: legacyData && typeof legacyData === "object" && !Array.isArray(legacyData) ? legacyData : {}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.BLOX_HYDRATION_WINDOW_KEY = BLOX_HYDRATION_WINDOW_KEY;
|
|
28
|
+
exports.BLOX_WEBSITE_ID_WINDOW_KEY = BLOX_WEBSITE_ID_WINDOW_KEY;
|
|
29
|
+
exports.readBloxHydration = readBloxHydration;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const BLOX_HYDRATION_WINDOW_KEY = "__BLOX_HYDRATION__";
|
|
2
|
+
const BLOX_STATE_WINDOW_KEY = "__BLOX_STATE__";
|
|
3
|
+
const BLOX_WEBSITE_ID_WINDOW_KEY = "__BLOX_WEBSITE_ID__";
|
|
4
|
+
const BLOX_DATA_WINDOW_KEY = "__BLOX_DATA__";
|
|
5
|
+
function browserGlobals() {
|
|
6
|
+
return typeof window === "undefined" ? null : window;
|
|
7
|
+
}
|
|
8
|
+
function readBloxHydration() {
|
|
9
|
+
const globals = browserGlobals();
|
|
10
|
+
if (!globals) return null;
|
|
11
|
+
const payload = globals[BLOX_HYDRATION_WINDOW_KEY];
|
|
12
|
+
if (payload && typeof payload === "object" && !Array.isArray(payload) && payload.version === 2) return payload;
|
|
13
|
+
const legacyState = globals[BLOX_STATE_WINDOW_KEY];
|
|
14
|
+
const entries = legacyState && typeof legacyState === "object" && !Array.isArray(legacyState) ? Object.entries(legacyState) : [];
|
|
15
|
+
const legacyData = globals[BLOX_DATA_WINDOW_KEY];
|
|
16
|
+
const websiteId = globals[BLOX_WEBSITE_ID_WINDOW_KEY];
|
|
17
|
+
if (!entries.length && !legacyData && !websiteId) return null;
|
|
18
|
+
const [path, resolved] = entries[0] ?? [];
|
|
19
|
+
return {
|
|
20
|
+
version: 2,
|
|
21
|
+
...path && resolved ? { route: { path, resolved } } : {},
|
|
22
|
+
...typeof websiteId === "string" ? { websiteId } : {},
|
|
23
|
+
data: legacyData && typeof legacyData === "object" && !Array.isArray(legacyData) ? legacyData : {}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
BLOX_HYDRATION_WINDOW_KEY as B,
|
|
28
|
+
BLOX_WEBSITE_ID_WINDOW_KEY as a,
|
|
29
|
+
readBloxHydration as r
|
|
30
|
+
};
|
package/dist/core.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export interface BloxOptions extends StrategyOptions {
|
|
|
32
32
|
store?: string;
|
|
33
33
|
/** Opt-in admin "edit this page" button (deep-links to the studio designer). */
|
|
34
34
|
adminEdit?: BloxAdminConfig;
|
|
35
|
+
/** CMS navigation contract. @default 'spa' */
|
|
36
|
+
navigation?: 'document' | 'spa';
|
|
35
37
|
}
|
|
36
38
|
export declare class BloxInstance {
|
|
37
39
|
private readonly _registry;
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,KA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AAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAI9C,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IA0CpC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI;CAqC9C;AAMD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,YAAY,CAS9D"}
|
package/dist/createBloxApp.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export interface CreateBloxAppOptions {
|
|
|
68
68
|
navigation?: 'document' | 'spa';
|
|
69
69
|
/** Opt-in admin "edit this page" button configuration. */
|
|
70
70
|
adminEdit?: BloxOptions['adminEdit'];
|
|
71
|
+
/** Reload the target document when a lazy route chunk is stale. @default true */
|
|
72
|
+
chunkLoadRecovery?: boolean;
|
|
71
73
|
}
|
|
72
74
|
/** Plausible Analytics injection options. */
|
|
73
75
|
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,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAWhD,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,C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EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAoCvE;AAED,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,GAAG,CAAA;IACR,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,YAAY,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CA4I1E"}
|
package/dist/data/useData.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { App, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
-
export declare const BLOX_DATA_WINDOW_KEY: "__BLOX_DATA__";
|
|
3
2
|
export declare const BLOX_DATA_KEY: unique symbol;
|
|
4
3
|
/** Per-page SEO overrides a block can set during SSR (see `useSeo`). */
|
|
5
4
|
export interface BloxSeoHead {
|
|
@@ -26,7 +25,7 @@ export interface BloxSeoHead {
|
|
|
26
25
|
export interface BloxDataRegistry {
|
|
27
26
|
/** Resolved values collected during SSR, serialized into the payload. */
|
|
28
27
|
readonly ssr: Map<string, unknown>;
|
|
29
|
-
/**
|
|
28
|
+
/** Keyed data read from the unified hydration payload on the client. */
|
|
30
29
|
readonly payload: Record<string, unknown> | null;
|
|
31
30
|
/** True while rendering on the server (collect phase). */
|
|
32
31
|
readonly isServer: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useData.d.ts","sourceRoot":"","sources":["../../src/data/useData.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useData.d.ts","sourceRoot":"","sources":["../../src/data/useData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,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IACjE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAChC,qFAAqF;IACrF,OAAO,EAAE,CAAC,CAAA;IACV;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,gBAAgB,CAa3F;AAeD,8EAA8E;AAC9E,wBAAgB,eAAe,IAAI,gBAAgB,GAAG,IAAI,CAEzD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAiBzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW,CActE;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACxB,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GACxB,aAAa,CAAC,CAAC,CAAC,CAqFlB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageResolveRead } from './api/types';
|
|
2
|
+
export interface BloxHydrationPayload {
|
|
3
|
+
version: 2;
|
|
4
|
+
route?: {
|
|
5
|
+
path: string;
|
|
6
|
+
resolved: PageResolveRead;
|
|
7
|
+
};
|
|
8
|
+
websiteId?: string;
|
|
9
|
+
data: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/** Read the current V2 payload, with V1 globals isolated as temporary compatibility. */
|
|
12
|
+
export declare function readBloxHydration(): BloxHydrationPayload | null;
|
|
13
|
+
//# sourceMappingURL=hydration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../src/hydration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAQlD,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,CAAC,CAAA;IACV,KAAK,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,eAAe,CAAA;KACzB,CAAA;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7B;AAQD,wFAAwF;AACxF,wBAAgB,iBAAiB,IAAI,oBAAoB,GAAG,IAAI,CAyB/D"}
|