@bagelink/blox 1.14.10 → 1.14.13
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-DIAL1c7e.js → PreviewApp-MdZQEVkN.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-i3XlO5iQ.js → PreviewApp.vue_vue_type_style_index_0_lang-Bc4Ac4WN.js} +2 -2
- package/dist/{core-CDeCe4VJ.js → core-CgtYpQbn.js} +4 -4
- package/dist/index.mjs +5 -5
- package/dist/{prerender-BZzd5T7y.js → prerender-CJ22vZ1T.js} +46 -46
- package/dist/ssg/cli.cjs +1 -1
- package/dist/ssg/cli.mjs +1 -1
- package/dist/ssg/index.cjs +1 -1
- package/dist/ssg/index.mjs +5 -5
- package/package.json +1 -1
- package/dist/{prerender-ZBDFjWPT.cjs → prerender-LqPEzho3.cjs} +44 -44
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted,
|
|
2
|
-
import { e as BLOX_REGISTRY_KEY, u as useLocale } from "./core-
|
|
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";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(msg, "*");
|
|
5
5
|
}
|
|
@@ -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 { BLOX_WEBSITE_ID_WINDOW_KEY, BLOX_STATE_WINDOW_KEY } from "./ssg/client.mjs";
|
|
5
|
-
import { computed, ref, defineComponent, inject, h, provide, watch, resolveComponent,
|
|
5
|
+
import { computed, ref, defineComponent, inject, h, provide, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, createElementVNode, toDisplayString, withCtx, createTextVNode, Fragment, createCommentVNode, createBlock, normalizeProps, guardReactiveProps, renderSlot } from "vue";
|
|
6
6
|
import { useRoute, useRouter, RouterLink } from "vue-router";
|
|
7
7
|
import { getI18n, Loading } from "@bagelink/vue";
|
|
8
8
|
const BASE = "/api";
|
|
@@ -403,7 +403,7 @@ class BloxInstance {
|
|
|
403
403
|
}
|
|
404
404
|
router.addRoute({
|
|
405
405
|
path: "/_blox_preview",
|
|
406
|
-
component: () => import("./PreviewApp-
|
|
406
|
+
component: () => import("./PreviewApp-MdZQEVkN.js"),
|
|
407
407
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
408
408
|
});
|
|
409
409
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$1 });
|
|
@@ -455,10 +455,10 @@ export {
|
|
|
455
455
|
BLOX_LOCALE_STRATEGY_KEY as B,
|
|
456
456
|
PageRenderer as P,
|
|
457
457
|
_sfc_main$1 as _,
|
|
458
|
-
|
|
458
|
+
BLOX_CONFIG_KEY as a,
|
|
459
459
|
BloxInstance as b,
|
|
460
460
|
createBlox as c,
|
|
461
|
-
|
|
461
|
+
configureApi as d,
|
|
462
462
|
BLOX_REGISTRY_KEY as e,
|
|
463
463
|
listItems as l,
|
|
464
464
|
resolvePath as r,
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _2, P as P2, s, a as a2 } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
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";
|
|
4
4
|
import { inject, computed, createApp, markRaw } from "vue";
|
|
5
5
|
import { useRouter } from "vue-router";
|
|
6
6
|
import { createPinia } from "pinia";
|
|
@@ -101,14 +101,14 @@ function defineBlock(meta) {
|
|
|
101
101
|
return meta;
|
|
102
102
|
}
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
a as BLOX_CONFIG_KEY,
|
|
105
105
|
BLOX_LOCALE_STRATEGY_KEY,
|
|
106
106
|
b as BloxInstance,
|
|
107
107
|
_ as CmsPageView,
|
|
108
108
|
P as PageRenderer,
|
|
109
109
|
_2 as PreviewApp,
|
|
110
110
|
P2 as PreviewRenderer,
|
|
111
|
-
|
|
111
|
+
d as configureApi,
|
|
112
112
|
createBlox,
|
|
113
113
|
createBloxApp,
|
|
114
114
|
defineBlock,
|
|
@@ -89,6 +89,50 @@ function extractCollectionRefs(pages) {
|
|
|
89
89
|
}
|
|
90
90
|
return refs;
|
|
91
91
|
}
|
|
92
|
+
async function polyfillBloxSsgGlobals(options) {
|
|
93
|
+
const { env } = await import("node:process");
|
|
94
|
+
const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
|
|
95
|
+
const { Window: HappyWindow } = await import("happy-dom");
|
|
96
|
+
const _win = new HappyWindow({ url: pageUrl });
|
|
97
|
+
const g = globalThis;
|
|
98
|
+
if (g.window == null) g.window = g;
|
|
99
|
+
for (const key of Object.getOwnPropertyNames(_win)) {
|
|
100
|
+
if (key === "window" || key === "global" || key === "globalThis") continue;
|
|
101
|
+
try {
|
|
102
|
+
if (!(key in g)) g[key] = _win[key];
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
for (const key of [
|
|
107
|
+
"document",
|
|
108
|
+
"location",
|
|
109
|
+
"localStorage",
|
|
110
|
+
"sessionStorage",
|
|
111
|
+
"navigator",
|
|
112
|
+
"Element",
|
|
113
|
+
"Document",
|
|
114
|
+
"HTMLElement",
|
|
115
|
+
"Event",
|
|
116
|
+
"CustomEvent",
|
|
117
|
+
"MouseEvent",
|
|
118
|
+
"KeyboardEvent",
|
|
119
|
+
"MutationObserver",
|
|
120
|
+
"IntersectionObserver",
|
|
121
|
+
"ResizeObserver",
|
|
122
|
+
"getComputedStyle",
|
|
123
|
+
"matchMedia",
|
|
124
|
+
"requestAnimationFrame",
|
|
125
|
+
"cancelAnimationFrame"
|
|
126
|
+
]) {
|
|
127
|
+
try {
|
|
128
|
+
g[key] = _win[key];
|
|
129
|
+
} catch {
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
g.window = g;
|
|
133
|
+
g.window.location = _win.location;
|
|
134
|
+
g.window.document = _win.document;
|
|
135
|
+
}
|
|
92
136
|
function buildPageHead(options) {
|
|
93
137
|
const { url, resolvedData, website, stateScript } = options;
|
|
94
138
|
const parts = [];
|
|
@@ -235,50 +279,6 @@ function extractPrimaryContext(contexts) {
|
|
|
235
279
|
function esc(s) {
|
|
236
280
|
return s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
237
281
|
}
|
|
238
|
-
async function polyfillBloxSsgGlobals(options) {
|
|
239
|
-
const { env } = await import("node:process");
|
|
240
|
-
const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
|
|
241
|
-
const { Window: HappyWindow } = await import("happy-dom");
|
|
242
|
-
const _win = new HappyWindow({ url: pageUrl });
|
|
243
|
-
const g = globalThis;
|
|
244
|
-
if (g.window == null) g.window = g;
|
|
245
|
-
for (const key of Object.getOwnPropertyNames(_win)) {
|
|
246
|
-
if (key === "window" || key === "global" || key === "globalThis") continue;
|
|
247
|
-
try {
|
|
248
|
-
if (!(key in g)) g[key] = _win[key];
|
|
249
|
-
} catch {
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
for (const key of [
|
|
253
|
-
"document",
|
|
254
|
-
"location",
|
|
255
|
-
"localStorage",
|
|
256
|
-
"sessionStorage",
|
|
257
|
-
"navigator",
|
|
258
|
-
"Element",
|
|
259
|
-
"Document",
|
|
260
|
-
"HTMLElement",
|
|
261
|
-
"Event",
|
|
262
|
-
"CustomEvent",
|
|
263
|
-
"MouseEvent",
|
|
264
|
-
"KeyboardEvent",
|
|
265
|
-
"MutationObserver",
|
|
266
|
-
"IntersectionObserver",
|
|
267
|
-
"ResizeObserver",
|
|
268
|
-
"getComputedStyle",
|
|
269
|
-
"matchMedia",
|
|
270
|
-
"requestAnimationFrame",
|
|
271
|
-
"cancelAnimationFrame"
|
|
272
|
-
]) {
|
|
273
|
-
try {
|
|
274
|
-
g[key] = _win[key];
|
|
275
|
-
} catch {
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
g.window = g;
|
|
279
|
-
g.window.location = _win.location;
|
|
280
|
-
g.window.document = _win.document;
|
|
281
|
-
}
|
|
282
282
|
async function prerender({
|
|
283
283
|
root = process.cwd(),
|
|
284
284
|
clientOutDir = "dist/client",
|
|
@@ -512,8 +512,8 @@ function discoverInternalLinks(html) {
|
|
|
512
512
|
export {
|
|
513
513
|
prerender as a,
|
|
514
514
|
buildPageHead as b,
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
buildSiteHead as c,
|
|
516
|
+
fetchCmsPrerenderPaths as d,
|
|
517
517
|
generateRobotsTxt as e,
|
|
518
518
|
fetchCmsSiteData as f,
|
|
519
519
|
generateNetlifyRedirects as g,
|
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-
|
|
4
|
+
const prerender = require("../prerender-LqPEzho3.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-
|
|
3
|
+
import { p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, a as prerender } from "../prerender-CJ22vZ1T.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 };
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,7 +22,7 @@ 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-
|
|
25
|
+
const prerender = require("../prerender-LqPEzho3.cjs");
|
|
26
26
|
const ssg_client = require("./client.cjs");
|
|
27
27
|
const pinia = require("pinia");
|
|
28
28
|
const vue = require("vue");
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as buildPageHead } from "../prerender-
|
|
2
|
-
import {
|
|
1
|
+
import { b as buildPageHead } from "../prerender-CJ22vZ1T.js";
|
|
2
|
+
import { c, d, f, g, e, h, p, a } from "../prerender-CJ22vZ1T.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-
|
|
7
|
+
import { c as createBlox } from "../core-CgtYpQbn.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
const {
|
|
10
10
|
url,
|
|
@@ -134,9 +134,9 @@ export {
|
|
|
134
134
|
BLOX_STATE_WINDOW_KEY,
|
|
135
135
|
BLOX_WEBSITE_ID_WINDOW_KEY,
|
|
136
136
|
buildPageHead,
|
|
137
|
-
|
|
137
|
+
c as buildSiteHead,
|
|
138
138
|
createBloxSSREntry,
|
|
139
|
-
|
|
139
|
+
d as fetchCmsPrerenderPaths,
|
|
140
140
|
f as fetchCmsSiteData,
|
|
141
141
|
g as generateNetlifyRedirects,
|
|
142
142
|
e as generateRobotsTxt,
|
package/package.json
CHANGED
|
@@ -112,6 +112,50 @@ function extractCollectionRefs(pages) {
|
|
|
112
112
|
}
|
|
113
113
|
return refs;
|
|
114
114
|
}
|
|
115
|
+
async function polyfillBloxSsgGlobals(options) {
|
|
116
|
+
const { env } = await import("node:process");
|
|
117
|
+
const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
|
|
118
|
+
const { Window: HappyWindow } = await import("happy-dom");
|
|
119
|
+
const _win = new HappyWindow({ url: pageUrl });
|
|
120
|
+
const g = globalThis;
|
|
121
|
+
if (g.window == null) g.window = g;
|
|
122
|
+
for (const key of Object.getOwnPropertyNames(_win)) {
|
|
123
|
+
if (key === "window" || key === "global" || key === "globalThis") continue;
|
|
124
|
+
try {
|
|
125
|
+
if (!(key in g)) g[key] = _win[key];
|
|
126
|
+
} catch {
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
for (const key of [
|
|
130
|
+
"document",
|
|
131
|
+
"location",
|
|
132
|
+
"localStorage",
|
|
133
|
+
"sessionStorage",
|
|
134
|
+
"navigator",
|
|
135
|
+
"Element",
|
|
136
|
+
"Document",
|
|
137
|
+
"HTMLElement",
|
|
138
|
+
"Event",
|
|
139
|
+
"CustomEvent",
|
|
140
|
+
"MouseEvent",
|
|
141
|
+
"KeyboardEvent",
|
|
142
|
+
"MutationObserver",
|
|
143
|
+
"IntersectionObserver",
|
|
144
|
+
"ResizeObserver",
|
|
145
|
+
"getComputedStyle",
|
|
146
|
+
"matchMedia",
|
|
147
|
+
"requestAnimationFrame",
|
|
148
|
+
"cancelAnimationFrame"
|
|
149
|
+
]) {
|
|
150
|
+
try {
|
|
151
|
+
g[key] = _win[key];
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
g.window = g;
|
|
156
|
+
g.window.location = _win.location;
|
|
157
|
+
g.window.document = _win.document;
|
|
158
|
+
}
|
|
115
159
|
function buildPageHead(options) {
|
|
116
160
|
const { url, resolvedData, website, stateScript } = options;
|
|
117
161
|
const parts = [];
|
|
@@ -258,50 +302,6 @@ function extractPrimaryContext(contexts) {
|
|
|
258
302
|
function esc(s) {
|
|
259
303
|
return s.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
260
304
|
}
|
|
261
|
-
async function polyfillBloxSsgGlobals(options) {
|
|
262
|
-
const { env } = await import("node:process");
|
|
263
|
-
const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
|
|
264
|
-
const { Window: HappyWindow } = await import("happy-dom");
|
|
265
|
-
const _win = new HappyWindow({ url: pageUrl });
|
|
266
|
-
const g = globalThis;
|
|
267
|
-
if (g.window == null) g.window = g;
|
|
268
|
-
for (const key of Object.getOwnPropertyNames(_win)) {
|
|
269
|
-
if (key === "window" || key === "global" || key === "globalThis") continue;
|
|
270
|
-
try {
|
|
271
|
-
if (!(key in g)) g[key] = _win[key];
|
|
272
|
-
} catch {
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
for (const key of [
|
|
276
|
-
"document",
|
|
277
|
-
"location",
|
|
278
|
-
"localStorage",
|
|
279
|
-
"sessionStorage",
|
|
280
|
-
"navigator",
|
|
281
|
-
"Element",
|
|
282
|
-
"Document",
|
|
283
|
-
"HTMLElement",
|
|
284
|
-
"Event",
|
|
285
|
-
"CustomEvent",
|
|
286
|
-
"MouseEvent",
|
|
287
|
-
"KeyboardEvent",
|
|
288
|
-
"MutationObserver",
|
|
289
|
-
"IntersectionObserver",
|
|
290
|
-
"ResizeObserver",
|
|
291
|
-
"getComputedStyle",
|
|
292
|
-
"matchMedia",
|
|
293
|
-
"requestAnimationFrame",
|
|
294
|
-
"cancelAnimationFrame"
|
|
295
|
-
]) {
|
|
296
|
-
try {
|
|
297
|
-
g[key] = _win[key];
|
|
298
|
-
} catch {
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
g.window = g;
|
|
302
|
-
g.window.location = _win.location;
|
|
303
|
-
g.window.document = _win.document;
|
|
304
|
-
}
|
|
305
305
|
async function prerender({
|
|
306
306
|
root = process.cwd(),
|
|
307
307
|
clientOutDir = "dist/client",
|