@bagelink/blox 1.15.29 → 1.15.34

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-BG9Fvfdw.cjs");
3
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-Da4Pi_Lc.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-Bc4Ac4WN.js";
1
+ import { _ as _sfc_main } from "./PreviewApp.vue_vue_type_style_index_0_lang-Bv4eRrVz.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -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 "./core-CgtYpQbn.js";
2
+ import { e as BLOX_REGISTRY_KEY, u as useLocale } from "./core-Do0ELzJT.js";
3
3
  function sendToEditor(msg) {
4
4
  window.parent.postMessage(msg, "*");
5
5
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
- const core = require("./core-DhrL5TMI.cjs");
3
+ const core = require("./core-CR2evIjK.cjs");
4
4
  function sendToEditor(msg) {
5
5
  window.parent.postMessage(msg, "*");
6
6
  }
@@ -100,7 +100,7 @@ const PageRenderer = vue.defineComponent({
100
100
  });
101
101
  const _hoisted_1 = {
102
102
  key: 0,
103
- class: "blox-loading"
103
+ class: "blox-loading flex column h-100vh justify-content-center"
104
104
  };
105
105
  const _hoisted_2 = {
106
106
  key: 1,
@@ -404,7 +404,7 @@ class BloxInstance {
404
404
  }
405
405
  router.addRoute({
406
406
  path: "/_blox_preview",
407
- component: () => Promise.resolve().then(() => require("./PreviewApp-BDMfuAiu.cjs")),
407
+ component: () => Promise.resolve().then(() => require("./PreviewApp-C5hzLdHt.cjs")),
408
408
  beforeEnter: () => window.parent !== window ? true : "/"
409
409
  });
410
410
  router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$1 });
@@ -99,7 +99,7 @@ const PageRenderer = defineComponent({
99
99
  });
100
100
  const _hoisted_1 = {
101
101
  key: 0,
102
- class: "blox-loading"
102
+ class: "blox-loading flex column h-100vh justify-content-center"
103
103
  };
104
104
  const _hoisted_2 = {
105
105
  key: 1,
@@ -403,7 +403,7 @@ class BloxInstance {
403
403
  }
404
404
  router.addRoute({
405
405
  path: "/_blox_preview",
406
- component: () => import("./PreviewApp-MdZQEVkN.js"),
406
+ component: () => import("./PreviewApp-CCxTa86_.js"),
407
407
  beforeEnter: () => window.parent !== window ? true : "/"
408
408
  });
409
409
  router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$1 });
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const core = require("./core-DhrL5TMI.cjs");
4
- const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-BG9Fvfdw.cjs");
3
+ const core = require("./core-CR2evIjK.cjs");
4
+ const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-Da4Pi_Lc.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 { B as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, c as createBlox } from "./core-CgtYpQbn.js";
2
- import { a, b, _, P, d, l, r } from "./core-CgtYpQbn.js";
3
- import { _ as _2, P as P2, s, a as a2 } from "./PreviewApp.vue_vue_type_style_index_0_lang-Bc4Ac4WN.js";
1
+ import { B as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, c as createBlox } from "./core-Do0ELzJT.js";
2
+ import { a, b, _, P, d, l, r } from "./core-Do0ELzJT.js";
3
+ import { _ as _2, P as P2, s, a as a2 } from "./PreviewApp.vue_vue_type_style_index_0_lang-Bv4eRrVz.js";
4
4
  import { inject, computed, createApp, markRaw } from "vue";
5
5
  import { useRouter } from "vue-router";
6
6
  import { createPinia } from "pinia";
@@ -177,7 +177,7 @@ function buildPageHead(options) {
177
177
  }
178
178
  const ogTitle = (page == null ? void 0 : page.meta_title) || ctx.title || (page == null ? void 0 : page.title) || meta.og_site_name || meta.default_meta_title;
179
179
  const ogDesc = (page == null ? void 0 : page.meta_description) || ctx.description || meta.og_description || meta.default_meta_description;
180
- const ogImage = (page == null ? void 0 : page.og_image) || ctx.image || meta.default_og_image;
180
+ const ogImage = absUrl((page == null ? void 0 : page.og_image) || ctx.image || meta.default_og_image, canonicalBase);
181
181
  const ogType = meta.og_type || "website";
182
182
  if (ogTitle) parts.push(`<meta property="og:title" content="${esc(ogTitle)}">`);
183
183
  if (ogDesc) parts.push(`<meta property="og:description" content="${esc(ogDesc)}">`);
@@ -211,11 +211,14 @@ function buildSiteHead(website) {
211
211
  if (!website) return "";
212
212
  const parts = [];
213
213
  const meta = website.meta ?? {};
214
- if (website.favicon_url) {
215
- parts.push(`<link rel="icon" href="${esc(website.favicon_url)}">`);
214
+ const base = (meta.canonical_base_url || website.domain || "").replace(/\/$/, "");
215
+ const favicon = absUrl(website.favicon_url, base);
216
+ if (favicon) {
217
+ parts.push(`<link rel="icon" href="${esc(favicon)}">`);
216
218
  }
217
- if (meta.webclip) {
218
- parts.push(`<link rel="apple-touch-icon" sizes="180x180" href="${esc(meta.webclip)}">`);
219
+ const webclip = absUrl(meta.webclip, base);
220
+ if (webclip) {
221
+ parts.push(`<link rel="apple-touch-icon" sizes="180x180" href="${esc(webclip)}">`);
219
222
  }
220
223
  if (meta.verification_google) {
221
224
  parts.push(`<meta name="google-site-verification" content="${esc(meta.verification_google)}">`);
@@ -302,6 +305,14 @@ function extractPrimaryContext(contexts) {
302
305
  function esc(s) {
303
306
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
304
307
  }
308
+ function absUrl(value, base) {
309
+ if (!value) return null;
310
+ const v = value.trim();
311
+ if (!v) return null;
312
+ if (/^(https?:)?\/\//i.test(v) || v.startsWith("/")) return v;
313
+ const cleanBase = (base ?? "").replace(/\/$/, "");
314
+ return cleanBase ? `${cleanBase}/${v}` : `/${v}`;
315
+ }
305
316
  async function prerender({
306
317
  root = process.cwd(),
307
318
  clientOutDir = "dist/client",
@@ -154,7 +154,7 @@ function buildPageHead(options) {
154
154
  }
155
155
  const ogTitle = (page == null ? void 0 : page.meta_title) || ctx.title || (page == null ? void 0 : page.title) || meta.og_site_name || meta.default_meta_title;
156
156
  const ogDesc = (page == null ? void 0 : page.meta_description) || ctx.description || meta.og_description || meta.default_meta_description;
157
- const ogImage = (page == null ? void 0 : page.og_image) || ctx.image || meta.default_og_image;
157
+ const ogImage = absUrl((page == null ? void 0 : page.og_image) || ctx.image || meta.default_og_image, canonicalBase);
158
158
  const ogType = meta.og_type || "website";
159
159
  if (ogTitle) parts.push(`<meta property="og:title" content="${esc(ogTitle)}">`);
160
160
  if (ogDesc) parts.push(`<meta property="og:description" content="${esc(ogDesc)}">`);
@@ -188,11 +188,14 @@ function buildSiteHead(website) {
188
188
  if (!website) return "";
189
189
  const parts = [];
190
190
  const meta = website.meta ?? {};
191
- if (website.favicon_url) {
192
- parts.push(`<link rel="icon" href="${esc(website.favicon_url)}">`);
191
+ const base = (meta.canonical_base_url || website.domain || "").replace(/\/$/, "");
192
+ const favicon = absUrl(website.favicon_url, base);
193
+ if (favicon) {
194
+ parts.push(`<link rel="icon" href="${esc(favicon)}">`);
193
195
  }
194
- if (meta.webclip) {
195
- parts.push(`<link rel="apple-touch-icon" sizes="180x180" href="${esc(meta.webclip)}">`);
196
+ const webclip = absUrl(meta.webclip, base);
197
+ if (webclip) {
198
+ parts.push(`<link rel="apple-touch-icon" sizes="180x180" href="${esc(webclip)}">`);
196
199
  }
197
200
  if (meta.verification_google) {
198
201
  parts.push(`<meta name="google-site-verification" content="${esc(meta.verification_google)}">`);
@@ -279,6 +282,14 @@ function extractPrimaryContext(contexts) {
279
282
  function esc(s) {
280
283
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
281
284
  }
285
+ function absUrl(value, base) {
286
+ if (!value) return null;
287
+ const v = value.trim();
288
+ if (!v) return null;
289
+ if (/^(https?:)?\/\//i.test(v) || v.startsWith("/")) return v;
290
+ const cleanBase = (base ?? "").replace(/\/$/, "");
291
+ return cleanBase ? `${cleanBase}/${v}` : `/${v}`;
292
+ }
282
293
  async function prerender({
283
294
  root = process.cwd(),
284
295
  clientOutDir = "dist/client",
package/dist/ssg/cli.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  "use strict";
3
3
  const process = require("node:process");
4
- const prerender = require("../prerender-LqPEzho3.cjs");
4
+ const prerender = require("../prerender-D_Hd055h.cjs");
5
5
  async function resolveApiBase(mode) {
6
6
  if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
7
7
  return { apiBase: process.env.BAGELINK_API_URL };
package/dist/ssg/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  import process from "node:process";
3
- import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-CJ22vZ1T.js";
3
+ import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-QNw4gq9W.js";
4
4
  async function resolveApiBase(mode) {
5
5
  if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
6
6
  return { apiBase: process.env.BAGELINK_API_URL };
@@ -22,11 +22,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
- const prerender = require("../prerender-LqPEzho3.cjs");
25
+ const prerender = require("../prerender-D_Hd055h.cjs");
26
26
  const ssg_client = require("./client.cjs");
27
27
  const pinia = require("pinia");
28
28
  const vue = require("vue");
29
- const core = require("../core-DhrL5TMI.cjs");
29
+ const core = require("../core-CR2evIjK.cjs");
30
30
  async function renderBloxSsgPage(options) {
31
31
  const {
32
32
  url,
@@ -1,10 +1,10 @@
1
- import { b as buildPageHead } from "../prerender-CJ22vZ1T.js";
2
- import { c, d, f, g, e, h, p, a } from "../prerender-CJ22vZ1T.js";
1
+ import { b as buildPageHead } from "../prerender-QNw4gq9W.js";
2
+ import { c, d, f, g, e, h, p, a } from "../prerender-QNw4gq9W.js";
3
3
  import { BLOX_STATE_WINDOW_KEY, BLOX_COLLECTIONS_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs";
4
4
  import { getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
5
5
  import { createPinia } from "pinia";
6
6
  import { createSSRApp, markRaw } from "vue";
7
- import { c as createBlox } from "../core-CgtYpQbn.js";
7
+ import { c as createBlox } from "../core-Do0ELzJT.js";
8
8
  async function renderBloxSsgPage(options) {
9
9
  const {
10
10
  url,
@@ -1 +1 @@
1
- {"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/ssg/seo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAMzD,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,C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;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgB7D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.15.29",
4
+ "version": "1.15.34",
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",