@bagelink/blox 1.15.623 → 1.15.627

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-DU4NixKc.cjs");
3
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-OZtgkMXq.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-DfqvSF62.js";
1
+ import { _ as _sfc_main } from "./PreviewApp.vue_vue_type_style_index_0_lang-m2TIr6Wk.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 appRuntime = require("./appRuntime-CeEDneOA.cjs");
3
+ const appRuntime = require("./appRuntime-BqvP0NaP.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 { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-DURTwUXn.js";
2
+ import { e as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, f as BLOX_RUNTIME_KEY } from "./appRuntime-FphnGcV2.js";
3
3
  function sendToEditor(msg) {
4
4
  window.parent.postMessage(cloneForPostMessage(msg), "*");
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AdminEditBar.vue.d.ts","sourceRoot":"","sources":["../../src/admin/AdminEditBar.vue"],"names":[],"mappings":"AAwEA,KAAK,WAAW,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,CAAC;;AAsFF,wBAMG"}
1
+ {"version":3,"file":"AdminEditBar.vue.d.ts","sourceRoot":"","sources":["../../src/admin/AdminEditBar.vue"],"names":[],"mappings":"AAgGA,KAAK,WAAW,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,CAAC;;AAiGF,wBAMG"}
@@ -263,33 +263,32 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
263
263
  setup(__props) {
264
264
  const props = __props;
265
265
  const { enabled, showEdit, editUrl, dismiss, init } = useBloxEdit();
266
- vue.onMounted(init);
266
+ const mounted = vue.ref(false);
267
+ vue.onMounted(() => {
268
+ mounted.value = true;
269
+ init();
270
+ });
267
271
  function openEditor() {
268
272
  if (!props.websiteId || !props.pageId) return;
269
273
  window.location.href = editUrl(props.websiteId, props.pageId);
270
274
  }
271
275
  return (_ctx, _cache) => {
272
- return vue.unref(enabled) ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
273
- key: 0,
274
- to: "body"
275
- }, [
276
- vue.unref(showEdit) && __props.websiteId && __props.pageId ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
277
- vue.createElementVNode("button", {
278
- type: "button",
279
- class: "blox-admin-btn",
280
- onClick: openEditor
281
- }, [..._cache[1] || (_cache[1] = [
282
- vue.createElementVNode("span", { "aria-hidden": "true" }, "✏️", -1),
283
- vue.createElementVNode("span", null, "Edit this page", -1)
284
- ])]),
285
- vue.createElementVNode("button", {
286
- type: "button",
287
- class: "blox-admin-btn blox-admin-btn--ghost",
288
- title: "Hide",
289
- onClick: _cache[0] || (_cache[0] = //@ts-ignore
290
- (...args) => vue.unref(dismiss) && vue.unref(dismiss)(...args))
291
- }, " ✕ ")
292
- ])) : vue.createCommentVNode("", true)
276
+ return mounted.value && vue.unref(enabled) && vue.unref(showEdit) && __props.websiteId && __props.pageId ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
277
+ vue.createElementVNode("button", {
278
+ type: "button",
279
+ class: "blox-admin-btn",
280
+ onClick: openEditor
281
+ }, [..._cache[1] || (_cache[1] = [
282
+ vue.createElementVNode("span", { "aria-hidden": "true" }, "✏️", -1),
283
+ vue.createElementVNode("span", null, "Edit this page", -1)
284
+ ])]),
285
+ vue.createElementVNode("button", {
286
+ type: "button",
287
+ class: "blox-admin-btn blox-admin-btn--ghost",
288
+ title: "Hide",
289
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
290
+ (...args) => vue.unref(dismiss) && vue.unref(dismiss)(...args))
291
+ }, " ✕ ")
293
292
  ])) : vue.createCommentVNode("", true);
294
293
  };
295
294
  }
@@ -1053,7 +1052,7 @@ class BloxInstance {
1053
1052
  router.addRoute({
1054
1053
  path: "/_blox_preview",
1055
1054
  name: BLOX_PREVIEW_ROUTE_NAME,
1056
- component: () => Promise.resolve().then(() => require("./PreviewApp-CjelUL54.cjs")),
1055
+ component: () => Promise.resolve().then(() => require("./PreviewApp-5XGQVrnd.cjs")),
1057
1056
  beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
1058
1057
  });
1059
1058
  }
@@ -1295,6 +1294,9 @@ function installLocaleAwareResolve(router, strategy, activeLocaleRef) {
1295
1294
  if (classifyLink(href) === "internal") {
1296
1295
  to = strategy.toPath(href, activeLocale());
1297
1296
  }
1297
+ } else if (to && typeof to === "object" && typeof to.path === "string" && typeof to.locale === "string") {
1298
+ const href = normalizeLink(to.path) ?? to.path;
1299
+ to = classifyLink(href) === "internal" ? strategy.toPath(href, to.locale) : href;
1298
1300
  } else if (to && typeof to === "object" && typeof to.name === "string") {
1299
1301
  const base = to.name.split(":")[0];
1300
1302
  if (getContentRoute(base) && supported.length) {
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { createPinia } from "pinia";
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";
5
+ import { getCurrentInstance, inject, computed, ref, defineComponent, onMounted, unref, openBlock, createElementBlock, createElementVNode, createCommentVNode, h, provide, watch, resolveComponent, toDisplayString, createVNode, withCtx, createTextVNode, Fragment, createBlock, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
6
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";
@@ -262,33 +262,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
262
262
  setup(__props) {
263
263
  const props = __props;
264
264
  const { enabled, showEdit, editUrl, dismiss, init } = useBloxEdit();
265
- onMounted(init);
265
+ const mounted = ref(false);
266
+ onMounted(() => {
267
+ mounted.value = true;
268
+ init();
269
+ });
266
270
  function openEditor() {
267
271
  if (!props.websiteId || !props.pageId) return;
268
272
  window.location.href = editUrl(props.websiteId, props.pageId);
269
273
  }
270
274
  return (_ctx, _cache) => {
271
- return unref(enabled) ? (openBlock(), createBlock(Teleport, {
272
- key: 0,
273
- to: "body"
274
- }, [
275
- unref(showEdit) && __props.websiteId && __props.pageId ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
276
- createElementVNode("button", {
277
- type: "button",
278
- class: "blox-admin-btn",
279
- onClick: openEditor
280
- }, [..._cache[1] || (_cache[1] = [
281
- createElementVNode("span", { "aria-hidden": "true" }, "✏️", -1),
282
- createElementVNode("span", null, "Edit this page", -1)
283
- ])]),
284
- createElementVNode("button", {
285
- type: "button",
286
- class: "blox-admin-btn blox-admin-btn--ghost",
287
- title: "Hide",
288
- onClick: _cache[0] || (_cache[0] = //@ts-ignore
289
- (...args) => unref(dismiss) && unref(dismiss)(...args))
290
- }, " ✕ ")
291
- ])) : createCommentVNode("", true)
275
+ return mounted.value && unref(enabled) && unref(showEdit) && __props.websiteId && __props.pageId ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
276
+ createElementVNode("button", {
277
+ type: "button",
278
+ class: "blox-admin-btn",
279
+ onClick: openEditor
280
+ }, [..._cache[1] || (_cache[1] = [
281
+ createElementVNode("span", { "aria-hidden": "true" }, "✏️", -1),
282
+ createElementVNode("span", null, "Edit this page", -1)
283
+ ])]),
284
+ createElementVNode("button", {
285
+ type: "button",
286
+ class: "blox-admin-btn blox-admin-btn--ghost",
287
+ title: "Hide",
288
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
289
+ (...args) => unref(dismiss) && unref(dismiss)(...args))
290
+ }, " ✕ ")
292
291
  ])) : createCommentVNode("", true);
293
292
  };
294
293
  }
@@ -1052,7 +1051,7 @@ class BloxInstance {
1052
1051
  router.addRoute({
1053
1052
  path: "/_blox_preview",
1054
1053
  name: BLOX_PREVIEW_ROUTE_NAME,
1055
- component: () => import("./PreviewApp-BMp-8qs3.js"),
1054
+ component: () => import("./PreviewApp-DcD_Cjzn.js"),
1056
1055
  beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
1057
1056
  });
1058
1057
  }
@@ -1294,6 +1293,9 @@ function installLocaleAwareResolve(router, strategy, activeLocaleRef) {
1294
1293
  if (classifyLink(href) === "internal") {
1295
1294
  to = strategy.toPath(href, activeLocale());
1296
1295
  }
1296
+ } else if (to && typeof to === "object" && typeof to.path === "string" && typeof to.locale === "string") {
1297
+ const href = normalizeLink(to.path) ?? to.path;
1298
+ to = classifyLink(href) === "internal" ? strategy.toPath(href, to.locale) : href;
1297
1299
  } else if (to && typeof to === "object" && typeof to.name === "string") {
1298
1300
  const base = to.name.split(":")[0];
1299
1301
  if (getContentRoute(base) && supported.length) {
@@ -28,7 +28,8 @@ export declare function generateContentRoutes(supportedLocales: string[], defaul
28
28
  * Two cases, both keeping call sites 100% vanilla:
29
29
  * • STRING `to` (`"/blog"`, `"/get-the-best-offer"`): prefixed with the active
30
30
  * locale via the strategy (`/it/blog`). Idempotent — an already-prefixed or
31
- * external/special value is left alone.
31
+ * external/special value is left alone. An object `{ path, locale }` targets
32
+ * an explicit locale instead (language switcher links).
32
33
  * • NAMED content route (`{ name:'event', params:{ slug } }`): the bare name is
33
34
  * swapped for the active locale's variant (`event` → `event:it`) so it
34
35
  * resolves to `/it/event/<slug>`.
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAQ3C;;;;;;;;;;;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,EACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,IAAI,CA4BN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,EACrB,GAAG,CAAC,EAAE,aAAa,GACjB,IAAI,CAmFN"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/content/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAQ3C;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,GACnB,cAAc,EAAE,CA4BlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,IAAI,CAoCN;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,EAAE,MAAM,EACrB,GAAG,CAAC,EAAE,aAAa,GACjB,IAAI,CAmFN"}
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const appRuntime = require("./appRuntime-CeEDneOA.cjs");
4
- const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-DU4NixKc.cjs");
3
+ const appRuntime = require("./appRuntime-BqvP0NaP.cjs");
4
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-OZtgkMXq.cjs");
5
5
  const vue = require("vue");
6
6
  const ssg_client = require("./client-AoDTJJXJ.cjs");
7
7
  const vueRouter = require("vue-router");
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { g as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, f as BLOX_RUNTIME_KEY, h as useBloxApi, j as useSeo, k as getRegistryData, l as getItemBySlug, m as getItemById, o as getContentRoute, p as provideBloxData, b as provideBloxApi, d as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, q as installSmartLinks, t as consumePendingLocaleSwitch } from "./appRuntime-DURTwUXn.js";
2
- import { _, v, w, x, y, z, A, C, D, P, E, F, c, a, G, H, I, J, K, L, M, N, O, Q, R, S, T, U, V, W, r, X, Y, Z, $, a0, a1 } from "./appRuntime-DURTwUXn.js";
3
- import { _ as _2, P as P2, s, a as a2 } from "./PreviewApp.vue_vue_type_style_index_0_lang-DfqvSF62.js";
1
+ import { g as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, f as BLOX_RUNTIME_KEY, h as useBloxApi, j as useSeo, k as getRegistryData, l as getItemBySlug, m as getItemById, o as getContentRoute, p as provideBloxData, b as provideBloxApi, d as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, q as installSmartLinks, t as consumePendingLocaleSwitch } from "./appRuntime-FphnGcV2.js";
2
+ import { _, v, w, x, y, z, A, C, D, P, E, F, c, a, G, H, I, J, K, L, M, N, O, Q, R, S, T, U, V, W, r, X, Y, Z, $, a0, a1 } from "./appRuntime-FphnGcV2.js";
3
+ import { _ as _2, P as P2, s, a as a2 } from "./PreviewApp.vue_vue_type_style_index_0_lang-m2TIr6Wk.js";
4
4
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
5
5
  import { r as readBloxHydration } from "./client-XQnL-B6N.js";
6
6
  import { useRouter, useRoute } from "vue-router";
@@ -26,7 +26,7 @@ const llmArtifacts = require("../validate-output-DQTw64Rc.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-CeEDneOA.cjs");
29
+ const appRuntime = require("../appRuntime-BqvP0NaP.cjs");
30
30
  async function renderBloxSsgPage(options) {
31
31
  var _a, _b, _c, _d;
32
32
  const {
@@ -3,7 +3,7 @@ import { i, j, f, k, l, m, n, g, o, q, r, s, t, w, p, a, x, y, u, v } from "../v
3
3
  import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
4
4
  import { B as BLOX_HYDRATION_WINDOW_KEY } from "../client-XQnL-B6N.js";
5
5
  import { createSSRApp, h, Suspense } from "vue";
6
- import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxApi, d as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-DURTwUXn.js";
6
+ import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxApi, d as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-FphnGcV2.js";
7
7
  async function renderBloxSsgPage(options) {
8
8
  var _a, _b, _c, _d;
9
9
  const {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.15.623",
4
+ "version": "1.15.627",
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",