@bagelink/blox 1.15.478 → 1.15.486

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.
@@ -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-CFqaQylr.cjs");
3
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-D8-GUEa1.cjs");
4
4
  exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./PreviewApp.vue_vue_type_style_index_0_lang-dv9ah2tW.js";
1
+ import { _ as _sfc_main } from "./PreviewApp.vue_vue_type_style_index_0_lang-DyLLS9Sb.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
- const routes = require("./routes-BybureCK.cjs");
3
+ const routes = require("./routes-BjJ-PTVC.cjs");
4
4
  function sendToEditor(msg) {
5
5
  window.parent.postMessage(cloneForPostMessage(msg), "*");
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
2
- import { f as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, h as BLOX_RUNTIME_KEY } from "./routes-DtTN43pK.js";
2
+ import { f as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, h as BLOX_RUNTIME_KEY } from "./routes-C2hW-M4-.js";
3
3
  function sendToEditor(msg) {
4
4
  window.parent.postMessage(cloneForPostMessage(msg), "*");
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAOvD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,cAAc,EAAE,CA4BlB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,GACtB,IAAI,CA4BN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,IAAI,CAoEN"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAQvD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,cAAc,EAAE,CA4BlB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,GACtB,IAAI,CA4BN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,IAAI,CAuEN"}
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-BybureCK.cjs");
4
- const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-CFqaQylr.cjs");
3
+ const routes = require("./routes-BjJ-PTVC.cjs");
4
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-D8-GUEa1.cjs");
5
5
  const vue = require("vue");
6
6
  const vueRouter = require("vue-router");
7
7
  const pinia = require("pinia");
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { j as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as BLOX_RUNTIME_KEY, k as useSeo, l as getRegistryData, m as getItemBySlug, o as getItemById, q as getContentRoute, p as provideBloxData, e as createBlox, g as generateContentRoutes, t as installContentFallback, i as installLocaleAwareResolve, b as setActiveLocale, v as installSmartLinks, w as consumePendingLocaleSwitch } from "./routes-DtTN43pK.js";
2
- import { _, x, y, z, B, A, C, D, E, F, P, G, H, c, d, I, J, K, L, M, N, O, Q, R, S, T, U, r, V, s, W, X, Y, Z } from "./routes-DtTN43pK.js";
3
- import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-dv9ah2tW.js";
1
+ import { j as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as BLOX_RUNTIME_KEY, k as useSeo, l as getRegistryData, m as getItemBySlug, o as getItemById, q as getContentRoute, p as provideBloxData, e as createBlox, g as generateContentRoutes, t as installContentFallback, i as installLocaleAwareResolve, b as setActiveLocale, v as installSmartLinks, w as consumePendingLocaleSwitch } from "./routes-C2hW-M4-.js";
2
+ import { _, x, y, z, B, A, C, D, E, F, P, G, H, c, d, I, J, K, L, M, N, O, Q, R, S, T, U, r, V, s, W, X, Y, Z } from "./routes-C2hW-M4-.js";
3
+ import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DyLLS9Sb.js";
4
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";
@@ -912,7 +912,7 @@ class BloxInstance {
912
912
  }
913
913
  router.addRoute({
914
914
  path: "/_blox_preview",
915
- component: () => Promise.resolve().then(() => require("./PreviewApp-B1V5yAQU.cjs")),
915
+ component: () => Promise.resolve().then(() => require("./PreviewApp-BeB8Pc__.cjs")),
916
916
  beforeEnter: () => window.parent !== window ? true : "/"
917
917
  });
918
918
  router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
@@ -1170,6 +1170,9 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
1170
1170
  const slug = String(to.params.slug ?? "");
1171
1171
  if (!slug) return true;
1172
1172
  const urlLocale = localeOf(to.path);
1173
+ if (hasEmbeddedContentItem(registration.collection, slug, urlLocale)) {
1174
+ return true;
1175
+ }
1173
1176
  let here;
1174
1177
  try {
1175
1178
  here = await getItemBySlug(
@@ -1213,6 +1216,12 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
1213
1216
  return urlLocale === defaultLocale ? "/" : `/${urlLocale}`;
1214
1217
  });
1215
1218
  }
1219
+ function hasEmbeddedContentItem(collection, slug, locale2) {
1220
+ if (typeof window === "undefined") return false;
1221
+ const payload = window[BLOX_DATA_WINDOW_KEY];
1222
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) return false;
1223
+ return `content:${collection}:${slug}:${locale2}` in payload;
1224
+ }
1216
1225
  exports.BLOX_ADMIN_CONFIG_KEY = BLOX_ADMIN_CONFIG_KEY;
1217
1226
  exports.BLOX_CONFIG_KEY = BLOX_CONFIG_KEY;
1218
1227
  exports.BLOX_DATA_KEY = BLOX_DATA_KEY;
@@ -911,7 +911,7 @@ class BloxInstance {
911
911
  }
912
912
  router.addRoute({
913
913
  path: "/_blox_preview",
914
- component: () => import("./PreviewApp-qYBj0fnd.js"),
914
+ component: () => import("./PreviewApp-CsV4ByJ6.js"),
915
915
  beforeEnter: () => window.parent !== window ? true : "/"
916
916
  });
917
917
  router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
@@ -1169,6 +1169,9 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
1169
1169
  const slug = String(to.params.slug ?? "");
1170
1170
  if (!slug) return true;
1171
1171
  const urlLocale = localeOf(to.path);
1172
+ if (hasEmbeddedContentItem(registration.collection, slug, urlLocale)) {
1173
+ return true;
1174
+ }
1172
1175
  let here;
1173
1176
  try {
1174
1177
  here = await getItemBySlug(
@@ -1212,6 +1215,12 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
1212
1215
  return urlLocale === defaultLocale ? "/" : `/${urlLocale}`;
1213
1216
  });
1214
1217
  }
1218
+ function hasEmbeddedContentItem(collection, slug, locale2) {
1219
+ if (typeof window === "undefined") return false;
1220
+ const payload = window[BLOX_DATA_WINDOW_KEY];
1221
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) return false;
1222
+ return `content:${collection}:${slug}:${locale2}` in payload;
1223
+ }
1215
1224
  export {
1216
1225
  BLOX_LAYOUT_KEY as A,
1217
1226
  BLOX_DATA_WINDOW_KEY as B,
@@ -26,7 +26,7 @@ const llmArtifacts = require("../prerender-JdRKimQ5.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-BybureCK.cjs");
29
+ const routes = require("../routes-BjJ-PTVC.cjs");
30
30
  async function renderBloxSsgPage(options) {
31
31
  var _a, _b, _c;
32
32
  const {
@@ -4,7 +4,7 @@ import { BLOX_STATE_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs"
4
4
  import { BLOX_COLLECTIONS_WINDOW_KEY, 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, Suspense, markRaw } from "vue";
7
- 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-DtTN43pK.js";
7
+ 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-C2hW-M4-.js";
8
8
  async function renderBloxSsgPage(options) {
9
9
  var _a, _b, _c;
10
10
  const {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.15.478",
4
+ "version": "1.15.486",
5
5
  "description": "Blox page builder library for drag-and-drop page building and static data management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",