@bagelink/blox 1.15.249 → 1.15.253
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/{PreviewApp-C3gdSB2p.cjs → PreviewApp-9HSW0bCC.cjs} +1 -1
- package/dist/{PreviewApp-C5G4JV33.js → PreviewApp-efVmQL4w.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BrJNkQJ8.cjs → PreviewApp.vue_vue_type_style_index_0_lang-CnKU05t1.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-Dnfb3hS5.js → PreviewApp.vue_vue_type_style_index_0_lang-DuHZmbcn.js} +1 -1
- package/dist/composables/useGlobalBlock.d.ts +5 -0
- package/dist/composables/useGlobalBlock.d.ts.map +1 -1
- package/dist/createBloxApp.d.ts.map +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.mjs +42 -34
- package/dist/localeStrategy.d.ts +2 -0
- package/dist/localeStrategy.d.ts.map +1 -1
- package/dist/{routes-DGXcDDs6.cjs → routes-CfwE_uYV.cjs} +13 -1
- package/dist/{routes-tsYlfWQb.js → routes-D5aVOcFs.js} +40 -28
- package/dist/ssg/index.cjs +1 -1
- package/dist/ssg/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -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-CnKU05t1.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 { e as BLOX_REGISTRY_KEY, u as useLocale } from "./routes-
|
|
2
|
+
import { e as BLOX_REGISTRY_KEY, u as useLocale } from "./routes-D5aVOcFs.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -13,6 +13,11 @@ export interface UseGlobalBlockResult<T> {
|
|
|
13
13
|
* (`$website.global_blocks[type]`), embedded in the resolve response — so there
|
|
14
14
|
* is no loader and no extra request (§B.4).
|
|
15
15
|
*
|
|
16
|
+
* Content is locale-resolved on the server; when the page re-resolves after a
|
|
17
|
+
* language switch, `$website` is replaced. Nav/footer stay mounted across
|
|
18
|
+
* navigations, so we watch contexts and re-read — otherwise labels stay stuck
|
|
19
|
+
* on the previous locale.
|
|
20
|
+
*
|
|
16
21
|
* When rendered inside the page-designer preview iframe, it still listens for
|
|
17
22
|
* the `BLOX_REFRESH_GLOBAL` editor message and re-reads, so editing the block
|
|
18
23
|
* updates the live preview instantly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalBlock.d.ts","sourceRoot":"","sources":["../../src/composables/useGlobalBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAI9B,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACtC,8EAA8E;IAC9E,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IACnB,4FAA4F;IAC5F,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,iEAAiE;IACjE,OAAO,EAAE,MAAM,IAAI,CAAA;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"useGlobalBlock.d.ts","sourceRoot":"","sources":["../../src/composables/useGlobalBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAI9B,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACtC,8EAA8E;IAC9E,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IACnB,4FAA4F;IAC5F,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,iEAAiE;IACjE,OAAO,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,SAAS,EAAE,MAAM,GACf,oBAAoB,CAAC,CAAC,CAAC,CAwCzB"}
|
|
@@ -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;AAYhD,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,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E,CAAC,MAAM,EAAE,GAAG,KAAK,GAAG,KAAK,IAAI,CAAA;SACvC,CAAA;KACD,CAAA;CACD;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,CA8J1E"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-CfwE_uYV.cjs");
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-CnKU05t1.cjs");
|
|
5
5
|
const vue = require("vue");
|
|
6
6
|
const vueRouter = require("vue-router");
|
|
7
7
|
const pinia = require("pinia");
|
|
@@ -53,6 +53,9 @@ function useGlobalBlock(blockType) {
|
|
|
53
53
|
function refresh() {
|
|
54
54
|
data.value = read();
|
|
55
55
|
}
|
|
56
|
+
if (contexts) {
|
|
57
|
+
vue.watch(contexts, refresh);
|
|
58
|
+
}
|
|
56
59
|
function onEditorMessage(event) {
|
|
57
60
|
const msg = event.data;
|
|
58
61
|
if ((msg == null ? void 0 : msg.type) !== "BLOX_REFRESH_GLOBAL") return;
|
|
@@ -247,6 +250,11 @@ function createBloxApp(options) {
|
|
|
247
250
|
return first && supportedLocales.includes(first) ? first : locale;
|
|
248
251
|
};
|
|
249
252
|
router.beforeEach((to, from) => {
|
|
253
|
+
const switched = routes.consumePendingLocaleSwitch();
|
|
254
|
+
if (switched != null) {
|
|
255
|
+
routes.setActiveLocale(switched);
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
250
258
|
const intended = from && from.matched.length ? localeOf(from.path) : localeOf(to.path);
|
|
251
259
|
const normalized = strategy.normalize(to.fullPath, intended);
|
|
252
260
|
if (normalized && normalized !== to.fullPath) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as useSeo, j as getRegistryData, k as getItemBySlug, l as getItemById, m as getContentRoute, p as provideBloxData, d as createBlox, g as generateContentRoutes, o as installContentFallback, i as installLocaleAwareResolve, a as setActiveLocale, q as installSmartLinks } from "./routes-
|
|
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, onMounted, onUnmounted, computed, onServerPrefetch, toValue, createApp, h, Suspense, markRaw } from "vue";
|
|
1
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as useSeo, j as getRegistryData, k as getItemBySlug, l as getItemById, m as getContentRoute, p as provideBloxData, d as createBlox, g as generateContentRoutes, o as installContentFallback, i as installLocaleAwareResolve, a as setActiveLocale, q as installSmartLinks, r as consumePendingLocaleSwitch } from "./routes-D5aVOcFs.js";
|
|
2
|
+
import { _, t, v, w, B, x, y, z, A, C, P, D, E, c, b, F, G, H, I, J, K, L, M, N, O, Q, R, S, s, T, U, V, W } from "./routes-D5aVOcFs.js";
|
|
3
|
+
import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DuHZmbcn.js";
|
|
4
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, createApp, h, Suspense, markRaw } from "vue";
|
|
5
5
|
import { useRouter, useRoute } from "vue-router";
|
|
6
6
|
import { createPinia } from "pinia";
|
|
7
7
|
import { installBloxStateCache, installCollectionCache } from "./ssg/client.mjs";
|
|
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
return (_ctx, _cache) => {
|
|
19
19
|
const _component_RouterView = resolveComponent("RouterView");
|
|
20
20
|
return openBlock(), createBlock(_component_RouterView, null, {
|
|
21
|
-
default: withCtx(({ Component, route:
|
|
21
|
+
default: withCtx(({ Component, route: r }) => [
|
|
22
22
|
__props.transition ? (openBlock(), createBlock(Transition, {
|
|
23
23
|
key: 0,
|
|
24
24
|
name: __props.transition,
|
|
@@ -26,12 +26,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
}, {
|
|
27
27
|
default: withCtx(() => [
|
|
28
28
|
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
29
|
-
key: viewKey(
|
|
29
|
+
key: viewKey(r.matched, r.path)
|
|
30
30
|
}))
|
|
31
31
|
]),
|
|
32
32
|
_: 2
|
|
33
33
|
}, 1032, ["name"])) : (openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
34
|
-
key: viewKey(
|
|
34
|
+
key: viewKey(r.matched, r.path)
|
|
35
35
|
}))
|
|
36
36
|
]),
|
|
37
37
|
_: 1
|
|
@@ -52,6 +52,9 @@ function useGlobalBlock(blockType) {
|
|
|
52
52
|
function refresh() {
|
|
53
53
|
data.value = read();
|
|
54
54
|
}
|
|
55
|
+
if (contexts) {
|
|
56
|
+
watch(contexts, refresh);
|
|
57
|
+
}
|
|
55
58
|
function onEditorMessage(event) {
|
|
56
59
|
const msg = event.data;
|
|
57
60
|
if ((msg == null ? void 0 : msg.type) !== "BLOX_REFRESH_GLOBAL") return;
|
|
@@ -246,6 +249,11 @@ function createBloxApp(options) {
|
|
|
246
249
|
return first && supportedLocales.includes(first) ? first : locale;
|
|
247
250
|
};
|
|
248
251
|
router.beforeEach((to, from) => {
|
|
252
|
+
const switched = consumePendingLocaleSwitch();
|
|
253
|
+
if (switched != null) {
|
|
254
|
+
setActiveLocale(switched);
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
249
257
|
const intended = from && from.matched.length ? localeOf(from.path) : localeOf(to.path);
|
|
250
258
|
const normalized = strategy.normalize(to.fullPath, intended);
|
|
251
259
|
if (normalized && normalized !== to.fullPath) {
|
|
@@ -340,59 +348,59 @@ function buildBloxManifest(blox) {
|
|
|
340
348
|
}
|
|
341
349
|
export {
|
|
342
350
|
_ as AdminEditBar,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
351
|
+
t as BLOX_ADMIN_CONFIG_KEY,
|
|
352
|
+
v as BLOX_CONFIG_KEY,
|
|
353
|
+
w as BLOX_DATA_KEY,
|
|
346
354
|
B as BLOX_DATA_WINDOW_KEY,
|
|
347
|
-
|
|
355
|
+
x as BLOX_LAYOUT_KEY,
|
|
348
356
|
BLOX_LOCALE_STRATEGY_KEY,
|
|
349
|
-
|
|
357
|
+
y as BloxInstance,
|
|
350
358
|
_sfc_main as BloxRouterView,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
359
|
+
z as CmsPageView,
|
|
360
|
+
A as ContentDetailView,
|
|
361
|
+
C as ContentHost,
|
|
354
362
|
P as PageRenderer,
|
|
355
363
|
_2 as PreviewApp,
|
|
356
364
|
P2 as PreviewRenderer,
|
|
357
|
-
|
|
365
|
+
D as applyLayoutChrome,
|
|
358
366
|
buildBloxManifest,
|
|
359
|
-
|
|
367
|
+
E as classifyLink,
|
|
360
368
|
c as collectBloxData,
|
|
361
369
|
b as collectBloxSeo,
|
|
362
|
-
|
|
363
|
-
|
|
370
|
+
F as configureApi,
|
|
371
|
+
G as contentRoutes,
|
|
364
372
|
createBlox,
|
|
365
373
|
createBloxApp,
|
|
366
374
|
defineBlock,
|
|
367
|
-
|
|
375
|
+
H as defineContent,
|
|
368
376
|
generateContentRoutes,
|
|
369
377
|
getContentRoute,
|
|
370
|
-
|
|
378
|
+
I as getContentRouteByCollection,
|
|
371
379
|
getItemById,
|
|
372
380
|
getItemBySlug,
|
|
373
|
-
|
|
374
|
-
|
|
381
|
+
J as getWebsiteId,
|
|
382
|
+
K as getWebsiteIdSync,
|
|
375
383
|
injectPlausible,
|
|
376
384
|
installContentFallback,
|
|
377
385
|
installSmartLinks,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
386
|
+
L as isAbsoluteExternal,
|
|
387
|
+
M as isSoloContentPage,
|
|
388
|
+
N as isSpecialScheme,
|
|
389
|
+
O as listItems,
|
|
382
390
|
normalizeLink,
|
|
383
|
-
|
|
391
|
+
Q as normalizeTo,
|
|
384
392
|
provideBloxData,
|
|
385
|
-
|
|
386
|
-
|
|
393
|
+
R as provideContentItem,
|
|
394
|
+
S as resolvePath,
|
|
387
395
|
s2 as sendToEditor,
|
|
388
396
|
a as sendToPreview,
|
|
389
397
|
serializeRegistry,
|
|
390
398
|
s as setApiOrigin,
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
399
|
+
T as toInternalPath,
|
|
400
|
+
U as useBloxEdit,
|
|
401
|
+
V as useContentItem,
|
|
394
402
|
useContentSeo,
|
|
395
|
-
|
|
403
|
+
W as useData,
|
|
396
404
|
useGlobalBlock,
|
|
397
405
|
useLocale,
|
|
398
406
|
useLocaleNav,
|
package/dist/localeStrategy.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Router } from 'vue-router';
|
|
2
|
+
/** Read-and-clear the locale from the most recent `switchTo` (or `null`). */
|
|
3
|
+
export declare function consumePendingLocaleSwitch(): string | null;
|
|
2
4
|
export interface LocaleStrategy {
|
|
3
5
|
/** Extract locale and slug from the current hostname + path. */
|
|
4
6
|
detect: (hostname: string, path: string) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeStrategy.d.ts","sourceRoot":"","sources":["../src/localeStrategy.ts"],"names":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e;IAC/B,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAQ7E"}
|
|
@@ -608,6 +608,15 @@ function installSmartLinks(router) {
|
|
|
608
608
|
document.addEventListener("click", onClick);
|
|
609
609
|
return () => document.removeEventListener("click", onClick);
|
|
610
610
|
}
|
|
611
|
+
let _pendingLocaleSwitch = null;
|
|
612
|
+
function consumePendingLocaleSwitch() {
|
|
613
|
+
const next = _pendingLocaleSwitch;
|
|
614
|
+
_pendingLocaleSwitch = null;
|
|
615
|
+
return next;
|
|
616
|
+
}
|
|
617
|
+
function markLocaleSwitch(locale2) {
|
|
618
|
+
_pendingLocaleSwitch = locale2;
|
|
619
|
+
}
|
|
611
620
|
function createPathStrategy(options) {
|
|
612
621
|
const { defaultLocale, supportedLocales } = options;
|
|
613
622
|
let _currentLocale = defaultLocale;
|
|
@@ -658,6 +667,7 @@ function createPathStrategy(options) {
|
|
|
658
667
|
return s;
|
|
659
668
|
})();
|
|
660
669
|
const target = locale2 === defaultLocale ? bare : bare === "/" ? `/${locale2}` : `/${locale2}${bare}`;
|
|
670
|
+
markLocaleSwitch(locale2);
|
|
661
671
|
router.push(target);
|
|
662
672
|
},
|
|
663
673
|
normalize(path, intendedLocale) {
|
|
@@ -699,6 +709,7 @@ function createDomainStrategy(options) {
|
|
|
699
709
|
const domain = localeDomains[locale2];
|
|
700
710
|
if (!domain) return;
|
|
701
711
|
if (locale2 === _currentLocale) {
|
|
712
|
+
markLocaleSwitch(locale2);
|
|
702
713
|
_router.push(slug || "/");
|
|
703
714
|
return;
|
|
704
715
|
}
|
|
@@ -823,7 +834,7 @@ class BloxInstance {
|
|
|
823
834
|
}
|
|
824
835
|
router.addRoute({
|
|
825
836
|
path: "/_blox_preview",
|
|
826
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
837
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-9HSW0bCC.cjs")),
|
|
827
838
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
828
839
|
});
|
|
829
840
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1114,6 +1125,7 @@ exports.classifyLink = classifyLink;
|
|
|
1114
1125
|
exports.collectBloxData = collectBloxData;
|
|
1115
1126
|
exports.collectBloxSeo = collectBloxSeo;
|
|
1116
1127
|
exports.configureApi = configureApi;
|
|
1128
|
+
exports.consumePendingLocaleSwitch = consumePendingLocaleSwitch;
|
|
1117
1129
|
exports.contentRoutes = contentRoutes;
|
|
1118
1130
|
exports.createBlox = createBlox;
|
|
1119
1131
|
exports.defineContent = defineContent;
|
|
@@ -607,6 +607,15 @@ function installSmartLinks(router) {
|
|
|
607
607
|
document.addEventListener("click", onClick);
|
|
608
608
|
return () => document.removeEventListener("click", onClick);
|
|
609
609
|
}
|
|
610
|
+
let _pendingLocaleSwitch = null;
|
|
611
|
+
function consumePendingLocaleSwitch() {
|
|
612
|
+
const next = _pendingLocaleSwitch;
|
|
613
|
+
_pendingLocaleSwitch = null;
|
|
614
|
+
return next;
|
|
615
|
+
}
|
|
616
|
+
function markLocaleSwitch(locale2) {
|
|
617
|
+
_pendingLocaleSwitch = locale2;
|
|
618
|
+
}
|
|
610
619
|
function createPathStrategy(options) {
|
|
611
620
|
const { defaultLocale, supportedLocales } = options;
|
|
612
621
|
let _currentLocale = defaultLocale;
|
|
@@ -657,6 +666,7 @@ function createPathStrategy(options) {
|
|
|
657
666
|
return s;
|
|
658
667
|
})();
|
|
659
668
|
const target = locale2 === defaultLocale ? bare : bare === "/" ? `/${locale2}` : `/${locale2}${bare}`;
|
|
669
|
+
markLocaleSwitch(locale2);
|
|
660
670
|
router.push(target);
|
|
661
671
|
},
|
|
662
672
|
normalize(path, intendedLocale) {
|
|
@@ -698,6 +708,7 @@ function createDomainStrategy(options) {
|
|
|
698
708
|
const domain = localeDomains[locale2];
|
|
699
709
|
if (!domain) return;
|
|
700
710
|
if (locale2 === _currentLocale) {
|
|
711
|
+
markLocaleSwitch(locale2);
|
|
701
712
|
_router.push(slug || "/");
|
|
702
713
|
return;
|
|
703
714
|
}
|
|
@@ -822,7 +833,7 @@ class BloxInstance {
|
|
|
822
833
|
}
|
|
823
834
|
router.addRoute({
|
|
824
835
|
path: "/_blox_preview",
|
|
825
|
-
component: () => import("./PreviewApp-
|
|
836
|
+
component: () => import("./PreviewApp-efVmQL4w.js"),
|
|
826
837
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
827
838
|
});
|
|
828
839
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1096,28 +1107,29 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
|
|
|
1096
1107
|
});
|
|
1097
1108
|
}
|
|
1098
1109
|
export {
|
|
1099
|
-
_sfc_main as A,
|
|
1110
|
+
_sfc_main$1 as A,
|
|
1100
1111
|
BLOX_DATA_WINDOW_KEY as B,
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1112
|
+
_sfc_main as C,
|
|
1113
|
+
applyLayoutChrome as D,
|
|
1114
|
+
classifyLink as E,
|
|
1115
|
+
configureApi as F,
|
|
1116
|
+
contentRoutes as G,
|
|
1117
|
+
defineContent as H,
|
|
1118
|
+
getContentRouteByCollection as I,
|
|
1119
|
+
getWebsiteId as J,
|
|
1120
|
+
getWebsiteIdSync as K,
|
|
1121
|
+
isAbsoluteExternal as L,
|
|
1122
|
+
isSoloContentPage as M,
|
|
1123
|
+
isSpecialScheme as N,
|
|
1124
|
+
listItems as O,
|
|
1114
1125
|
PageRenderer as P,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1126
|
+
normalizeTo as Q,
|
|
1127
|
+
provideContentItem as R,
|
|
1128
|
+
resolvePath as S,
|
|
1129
|
+
toInternalPath as T,
|
|
1130
|
+
useBloxEdit as U,
|
|
1131
|
+
useContentItem as V,
|
|
1132
|
+
useData as W,
|
|
1121
1133
|
_sfc_main$3 as _,
|
|
1122
1134
|
setActiveLocale as a,
|
|
1123
1135
|
collectBloxSeo as b,
|
|
@@ -1136,13 +1148,13 @@ export {
|
|
|
1136
1148
|
installContentFallback as o,
|
|
1137
1149
|
provideBloxData as p,
|
|
1138
1150
|
installSmartLinks as q,
|
|
1139
|
-
|
|
1151
|
+
consumePendingLocaleSwitch as r,
|
|
1140
1152
|
setApiOrigin as s,
|
|
1141
|
-
|
|
1153
|
+
BLOX_ADMIN_CONFIG_KEY as t,
|
|
1142
1154
|
useLocale as u,
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
_sfc_main$
|
|
1155
|
+
BLOX_CONFIG_KEY as v,
|
|
1156
|
+
BLOX_DATA_KEY as w,
|
|
1157
|
+
BLOX_LAYOUT_KEY as x,
|
|
1158
|
+
BloxInstance as y,
|
|
1159
|
+
_sfc_main$2 as z
|
|
1148
1160
|
};
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const prerender = require("../prerender-jcemLPiq.cjs");
|
|
|
26
26
|
const ssg_client = require("./client.cjs");
|
|
27
27
|
const pinia = require("pinia");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const routes = require("../routes-
|
|
29
|
+
const routes = require("../routes-CfwE_uYV.cjs");
|
|
30
30
|
async function renderBloxSsgPage(options) {
|
|
31
31
|
var _a, _b, _c;
|
|
32
32
|
const {
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { BLOX_STATE_WINDOW_KEY, BLOX_COLLECTIONS_WINDOW_KEY, BLOX_WEBSITE_ID_WIN
|
|
|
4
4
|
import { BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
|
|
5
5
|
import { createPinia } from "pinia";
|
|
6
6
|
import { createSSRApp, h as h2, Suspense, markRaw } from "vue";
|
|
7
|
-
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setActiveLocale, c as collectBloxData, b as collectBloxSeo, p as provideBloxData, d as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-
|
|
7
|
+
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setActiveLocale, c as collectBloxData, b as collectBloxSeo, p as provideBloxData, d as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-D5aVOcFs.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c;
|
|
10
10
|
const {
|
package/package.json
CHANGED