@bagelink/blox 1.15.665 → 1.15.666
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-8TIZXoXH.cjs → PreviewApp-BNUe-6Nm.cjs} +1 -1
- package/dist/{PreviewApp-Djh38Iw-.js → PreviewApp-tGABBSYV.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-zAjDTnQg.js → PreviewApp.vue_vue_type_style_index_0_lang-DXGJTQpf.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BnPd6x9t.cjs → PreviewApp.vue_vue_type_style_index_0_lang-DyqW-xf-.cjs} +1 -1
- package/dist/{appRuntime-DriplkOx.cjs → appRuntime-BotwL3aS.cjs} +2 -1
- package/dist/{appRuntime-0WTFR_UL.js → appRuntime-CYiKSBIq.js} +27 -26
- package/dist/createBloxApp.d.ts +5 -0
- package/dist/createBloxApp.d.ts.map +1 -1
- package/dist/index.cjs +15 -6
- package/dist/index.mjs +41 -32
- 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-DyqW-xf-.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 { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-
|
|
2
|
+
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-CYiKSBIq.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -917,7 +917,7 @@ class BloxInstance {
|
|
|
917
917
|
router.addRoute({
|
|
918
918
|
path: "/_blox_preview",
|
|
919
919
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
920
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
920
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-BNUe-6Nm.cjs")),
|
|
921
921
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
922
922
|
});
|
|
923
923
|
}
|
|
@@ -1312,6 +1312,7 @@ exports.BLOX_CONFIG_KEY = BLOX_CONFIG_KEY;
|
|
|
1312
1312
|
exports.BLOX_DATA_KEY = BLOX_DATA_KEY;
|
|
1313
1313
|
exports.BLOX_LAYOUT_KEY = BLOX_LAYOUT_KEY;
|
|
1314
1314
|
exports.BLOX_LOCALE_STRATEGY_KEY = BLOX_LOCALE_STRATEGY_KEY;
|
|
1315
|
+
exports.BLOX_PREVIEW_ROUTE_NAME = BLOX_PREVIEW_ROUTE_NAME;
|
|
1315
1316
|
exports.BLOX_REGISTRY_KEY = BLOX_REGISTRY_KEY;
|
|
1316
1317
|
exports.BLOX_RUNTIME_KEY = BLOX_RUNTIME_KEY;
|
|
1317
1318
|
exports.BLOX_SSR_ROUTE_STATE_KEY = BLOX_SSR_ROUTE_STATE_KEY;
|
|
@@ -916,7 +916,7 @@ class BloxInstance {
|
|
|
916
916
|
router.addRoute({
|
|
917
917
|
path: "/_blox_preview",
|
|
918
918
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
919
|
-
component: () => import("./PreviewApp-
|
|
919
|
+
component: () => import("./PreviewApp-tGABBSYV.js"),
|
|
920
920
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
921
921
|
});
|
|
922
922
|
}
|
|
@@ -1306,26 +1306,27 @@ function installBloxRuntime(options) {
|
|
|
1306
1306
|
return blox;
|
|
1307
1307
|
}
|
|
1308
1308
|
export {
|
|
1309
|
-
_sfc_main as A,
|
|
1309
|
+
_sfc_main$1 as A,
|
|
1310
1310
|
BLOX_SSR_ROUTE_STATE_KEY as B,
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1311
|
+
_sfc_main as C,
|
|
1312
|
+
applyLayoutChrome as D,
|
|
1313
|
+
classifyLink as E,
|
|
1314
|
+
contentRoutes as F,
|
|
1315
|
+
createBlox as G,
|
|
1316
|
+
defineContent as H,
|
|
1317
|
+
generateContentRoutes as I,
|
|
1318
|
+
getContentRouteByCollection as J,
|
|
1319
|
+
installContentFallback as K,
|
|
1320
|
+
isAbsoluteExternal as L,
|
|
1321
|
+
isSoloContentPage as M,
|
|
1322
|
+
isSpecialScheme as N,
|
|
1323
|
+
normalizeTo as O,
|
|
1324
1324
|
PageRenderer as P,
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1325
|
+
provideContentItem as Q,
|
|
1326
|
+
toInternalPath as R,
|
|
1327
|
+
useBloxEdit as S,
|
|
1328
|
+
useContentItem as T,
|
|
1329
|
+
useData as U,
|
|
1329
1330
|
_sfc_main$3 as _,
|
|
1330
1331
|
collectBloxSeo as a,
|
|
1331
1332
|
provideBloxLocale as b,
|
|
@@ -1343,14 +1344,14 @@ export {
|
|
|
1343
1344
|
normalizeLink as n,
|
|
1344
1345
|
BLOX_CMS_ROUTE_NAME as o,
|
|
1345
1346
|
provideBloxData as p,
|
|
1346
|
-
|
|
1347
|
+
BLOX_PREVIEW_ROUTE_NAME as q,
|
|
1347
1348
|
resolveBlockProps as r,
|
|
1348
1349
|
setActiveLocale as s,
|
|
1349
|
-
|
|
1350
|
+
BLOX_ADMIN_CONFIG_KEY as t,
|
|
1350
1351
|
useLocale as u,
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
_sfc_main$
|
|
1352
|
+
BLOX_CONFIG_KEY as v,
|
|
1353
|
+
BLOX_DATA_KEY as w,
|
|
1354
|
+
BLOX_LAYOUT_KEY as x,
|
|
1355
|
+
BloxInstance as y,
|
|
1356
|
+
_sfc_main$2 as z
|
|
1356
1357
|
};
|
package/dist/createBloxApp.d.ts
CHANGED
|
@@ -96,6 +96,11 @@ export interface PlausibleOptions {
|
|
|
96
96
|
* True when `slug` matches a registered route other than the CMS catch-all —
|
|
97
97
|
* i.e. the URL belongs to a real section whose resource may simply be missing
|
|
98
98
|
* in this language. Paths that only match the catch-all do not exist at all.
|
|
99
|
+
*
|
|
100
|
+
* The editor preview route is excluded: the designer iframe deliberately loads
|
|
101
|
+
* `/_blox_preview`, which is never prerendered, so the host serves the 404
|
|
102
|
+
* document for it. Treating that as a "missing page" would navigate the iframe
|
|
103
|
+
* away and leave the designer with a non-editable preview.
|
|
99
104
|
*/
|
|
100
105
|
export declare function matchesRealRoute(router: Router, slug: string): boolean;
|
|
101
106
|
/**
|
|
@@ -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;AA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AA;IAChD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAA;IACrC;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,KAAK,CAAA;IAC/B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;IACpC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAChC,gGAAgG;IAChG,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAID;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAUtE;AAWD;;;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,CAyK1E"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./index-DUjEj7ts.cjs");
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
5
|
-
const appRuntime = require("./appRuntime-
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-DyqW-xf-.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-BotwL3aS.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
|
9
9
|
const FORM_CONTROL_SELECTOR = "button, input, select, textarea, label, option";
|
|
10
|
-
function isEditorPreview() {
|
|
10
|
+
function isEditorPreview$1() {
|
|
11
11
|
try {
|
|
12
12
|
return window.self !== window.top || window.location.pathname.startsWith("/_blox_preview");
|
|
13
13
|
} catch {
|
|
@@ -15,7 +15,7 @@ function isEditorPreview() {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
function installDocumentNavigation(router) {
|
|
18
|
-
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview()) {
|
|
18
|
+
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview$1()) {
|
|
19
19
|
return () => {
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -237,11 +237,20 @@ function matchesRealRoute(router, slug) {
|
|
|
237
237
|
try {
|
|
238
238
|
const resolved = router.resolve(slug || "/");
|
|
239
239
|
if (!((_a = resolved == null ? void 0 : resolved.matched) == null ? void 0 : _a.length)) return false;
|
|
240
|
-
|
|
240
|
+
if (resolved.name === appRuntime.BLOX_CMS_ROUTE_NAME) return false;
|
|
241
|
+
if (resolved.name === appRuntime.BLOX_PREVIEW_ROUTE_NAME) return false;
|
|
242
|
+
return true;
|
|
241
243
|
} catch {
|
|
242
244
|
return false;
|
|
243
245
|
}
|
|
244
246
|
}
|
|
247
|
+
function isEditorPreview() {
|
|
248
|
+
try {
|
|
249
|
+
return typeof window !== "undefined" && window.self !== window.top;
|
|
250
|
+
} catch {
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
245
254
|
function injectPlausible(config) {
|
|
246
255
|
var _a, _b;
|
|
247
256
|
if (typeof document === "undefined") return;
|
|
@@ -349,7 +358,7 @@ function createBloxApp(options) {
|
|
|
349
358
|
const initialPath = typeof window !== "undefined" && ((_a = window.location) == null ? void 0 : _a.pathname) ? window.location.pathname : router.currentRoute.value.path;
|
|
350
359
|
appRuntime.setActiveLocale(localeOf(initialPath), localeState);
|
|
351
360
|
appRuntime.setActiveLocale(localeOf(initialPath), localeState);
|
|
352
|
-
if (hasSsgState && strategy && typeof window !== "undefined") {
|
|
361
|
+
if (hasSsgState && strategy && typeof window !== "undefined" && !isEditorPreview()) {
|
|
353
362
|
const hostname = window.location.hostname;
|
|
354
363
|
const hydratedPath = (_c = (_b = ssg_client.readBloxHydration()) == null ? void 0 : _b.route) == null ? void 0 : _c.path;
|
|
355
364
|
const requestedSlug = strategy.detect(hostname, initialPath).slug;
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-I81QTzv-.js";
|
|
2
2
|
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-I81QTzv-.js";
|
|
3
|
-
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as isMissingPageDocument, l as installSmartLinks, m as consumePendingLocaleSwitch, o as BLOX_CMS_ROUTE_NAME } from "./appRuntime-
|
|
5
|
-
import { _ as _2,
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DXGJTQpf.js";
|
|
4
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as isMissingPageDocument, l as installSmartLinks, m as consumePendingLocaleSwitch, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-CYiKSBIq.js";
|
|
5
|
+
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, r, R, S, T, U } from "./appRuntime-CYiKSBIq.js";
|
|
6
6
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
|
|
7
7
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
9
9
|
const FORM_CONTROL_SELECTOR = "button, input, select, textarea, label, option";
|
|
10
|
-
function isEditorPreview() {
|
|
10
|
+
function isEditorPreview$1() {
|
|
11
11
|
try {
|
|
12
12
|
return window.self !== window.top || window.location.pathname.startsWith("/_blox_preview");
|
|
13
13
|
} catch {
|
|
@@ -15,7 +15,7 @@ function isEditorPreview() {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
function installDocumentNavigation(router) {
|
|
18
|
-
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview()) {
|
|
18
|
+
if (typeof window === "undefined" || typeof document === "undefined" || isEditorPreview$1()) {
|
|
19
19
|
return () => {
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -237,11 +237,20 @@ function matchesRealRoute(router, slug) {
|
|
|
237
237
|
try {
|
|
238
238
|
const resolved = router.resolve(slug || "/");
|
|
239
239
|
if (!((_a = resolved == null ? void 0 : resolved.matched) == null ? void 0 : _a.length)) return false;
|
|
240
|
-
|
|
240
|
+
if (resolved.name === BLOX_CMS_ROUTE_NAME) return false;
|
|
241
|
+
if (resolved.name === BLOX_PREVIEW_ROUTE_NAME) return false;
|
|
242
|
+
return true;
|
|
241
243
|
} catch {
|
|
242
244
|
return false;
|
|
243
245
|
}
|
|
244
246
|
}
|
|
247
|
+
function isEditorPreview() {
|
|
248
|
+
try {
|
|
249
|
+
return typeof window !== "undefined" && window.self !== window.top;
|
|
250
|
+
} catch {
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
245
254
|
function injectPlausible(config) {
|
|
246
255
|
var _a, _b;
|
|
247
256
|
if (typeof document === "undefined") return;
|
|
@@ -349,7 +358,7 @@ function createBloxApp(options) {
|
|
|
349
358
|
const initialPath = typeof window !== "undefined" && ((_a = window.location) == null ? void 0 : _a.pathname) ? window.location.pathname : router.currentRoute.value.path;
|
|
350
359
|
setActiveLocale(localeOf(initialPath), localeState);
|
|
351
360
|
setActiveLocale(localeOf(initialPath), localeState);
|
|
352
|
-
if (hasSsgState && strategy && typeof window !== "undefined") {
|
|
361
|
+
if (hasSsgState && strategy && typeof window !== "undefined" && !isEditorPreview()) {
|
|
353
362
|
const hostname = window.location.hostname;
|
|
354
363
|
const hydratedPath = (_c = (_b = readBloxHydration()) == null ? void 0 : _b.route) == null ? void 0 : _c.path;
|
|
355
364
|
const requestedSlug = strategy.detect(hostname, initialPath).slug;
|
|
@@ -437,53 +446,53 @@ function buildBloxManifest(blox) {
|
|
|
437
446
|
}
|
|
438
447
|
export {
|
|
439
448
|
_2 as AdminEditBar,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
449
|
+
t as BLOX_ADMIN_CONFIG_KEY,
|
|
450
|
+
v as BLOX_CONFIG_KEY,
|
|
451
|
+
w as BLOX_DATA_KEY,
|
|
452
|
+
x as BLOX_LAYOUT_KEY,
|
|
444
453
|
BLOX_LOCALE_STRATEGY_KEY,
|
|
445
454
|
BLOX_RUNTIME_KEY,
|
|
446
|
-
|
|
455
|
+
y as BloxInstance,
|
|
447
456
|
_sfc_main as BloxRouterView,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
457
|
+
z as CmsPageView,
|
|
458
|
+
A as ContentDetailView,
|
|
459
|
+
C as ContentHost,
|
|
451
460
|
P2 as PageRenderer,
|
|
452
461
|
_ as PreviewApp,
|
|
453
462
|
P as PreviewRenderer,
|
|
454
|
-
|
|
463
|
+
D as applyLayoutChrome,
|
|
455
464
|
buildBloxManifest,
|
|
456
|
-
|
|
465
|
+
E as classifyLink,
|
|
457
466
|
c as collectBloxData,
|
|
458
467
|
a2 as collectBloxSeo,
|
|
459
468
|
configureApi,
|
|
460
|
-
|
|
461
|
-
|
|
469
|
+
F as contentRoutes,
|
|
470
|
+
G as createBlox,
|
|
462
471
|
createBloxApi,
|
|
463
472
|
createBloxApp,
|
|
464
473
|
defineBlock,
|
|
465
474
|
defineBloxSite,
|
|
466
|
-
|
|
467
|
-
|
|
475
|
+
H as defineContent,
|
|
476
|
+
I as generateContentRoutes,
|
|
468
477
|
getCollectionResolver,
|
|
469
478
|
getContentRoute,
|
|
470
|
-
|
|
479
|
+
J as getContentRouteByCollection,
|
|
471
480
|
getItemById,
|
|
472
481
|
getItemBySlug,
|
|
473
482
|
getWebsiteId,
|
|
474
483
|
getWebsiteIdSync,
|
|
475
484
|
injectPlausible,
|
|
476
|
-
|
|
485
|
+
K as installContentFallback,
|
|
477
486
|
installDocumentNavigation,
|
|
478
487
|
installSmartLinks,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
488
|
+
L as isAbsoluteExternal,
|
|
489
|
+
M as isSoloContentPage,
|
|
490
|
+
N as isSpecialScheme,
|
|
482
491
|
listItems,
|
|
483
492
|
normalizeLink,
|
|
484
|
-
|
|
493
|
+
O as normalizeTo,
|
|
485
494
|
provideBloxData,
|
|
486
|
-
|
|
495
|
+
Q as provideContentItem,
|
|
487
496
|
readBloxHydration,
|
|
488
497
|
r as resolveBlockProps,
|
|
489
498
|
resolvePath,
|
|
@@ -492,13 +501,13 @@ export {
|
|
|
492
501
|
serializeRegistry,
|
|
493
502
|
setApiOrigin,
|
|
494
503
|
setCollectionResolver,
|
|
495
|
-
|
|
504
|
+
R as toInternalPath,
|
|
496
505
|
useBloxApi,
|
|
497
|
-
|
|
506
|
+
S as useBloxEdit,
|
|
498
507
|
useBloxRuntime,
|
|
499
|
-
|
|
508
|
+
T as useContentItem,
|
|
500
509
|
useContentSeo,
|
|
501
|
-
|
|
510
|
+
U as useData,
|
|
502
511
|
useGlobalBlock,
|
|
503
512
|
useLocale,
|
|
504
513
|
useLocaleNav,
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const llmArtifacts = require("../validate-output-BdzD7fIN.cjs");
|
|
|
26
26
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
27
27
|
const ssg_client = require("../client-AoDTJJXJ.cjs");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const appRuntime = require("../appRuntime-
|
|
29
|
+
const appRuntime = require("../appRuntime-BotwL3aS.cjs");
|
|
30
30
|
const index = require("../index-DUjEj7ts.cjs");
|
|
31
31
|
async function renderBloxSsgPage(options) {
|
|
32
32
|
var _a, _b, _c, _d;
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from ".
|
|
|
3
3
|
import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
4
4
|
import { a as BLOX_HYDRATION_WINDOW_KEY } from "../client-Ce9fRCGH.js";
|
|
5
5
|
import { createSSRApp, h, Suspense } from "vue";
|
|
6
|
-
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-CYiKSBIq.js";
|
|
7
7
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c, _d;
|
package/package.json
CHANGED