@bagelink/blox 1.14.0 → 1.14.7
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/LICENSE +21 -0
- package/dist/CmsPageView.vue.d.ts.map +1 -1
- package/dist/{PreviewApp-CV_Uh9-d.cjs → PreviewApp-BDMfuAiu.cjs} +1 -1
- package/dist/{PreviewApp-BrthGx2F.js → PreviewApp-MdZQEVkN.js} +1 -1
- package/dist/PreviewApp.vue.d.ts.map +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-CFS05Itn.cjs → PreviewApp.vue_vue_type_style_index_0_lang-BG9Fvfdw.cjs} +4 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-BkGWMbsE.js → PreviewApp.vue_vue_type_style_index_0_lang-Bc4Ac4WN.js} +5 -2
- package/dist/bridge.d.ts +4 -0
- package/dist/bridge.d.ts.map +1 -1
- package/dist/{core-CPXNfJ-Z.js → core-CgtYpQbn.js} +16 -10
- package/dist/{core-D1FiZJtz.cjs → core-DhrL5TMI.cjs} +12 -6
- package/dist/core.d.ts.map +1 -1
- package/dist/defineBlock.d.ts +4 -0
- package/dist/defineBlock.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +5 -5
- package/dist/{prerender-D3Q4jKXm.js → prerender-CJ22vZ1T.js} +50 -50
- package/dist/{prerender-Bi7YtzSp.cjs → prerender-LqPEzho3.cjs} +48 -48
- package/dist/schema.d.ts +4 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/ssg/cli.cjs +1 -1
- package/dist/ssg/cli.mjs +1 -1
- package/dist/ssg/collection-cache.d.ts +1 -1
- package/dist/ssg/constants.d.ts +1 -1
- package/dist/ssg/constants.d.ts.map +1 -1
- package/dist/ssg/createSSREntry.d.ts.map +1 -1
- package/dist/ssg/index.cjs +4 -4
- package/dist/ssg/index.mjs +7 -7
- package/dist/ssg/render-resolved-page.d.ts +1 -1
- package/dist/ssg/render-resolved-page.d.ts.map +1 -1
- package/dist/vite-plugin.cjs +8 -7
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.mjs +8 -7
- package/package.json +128 -129
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Bagel Studio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";AAoYA,wBAMG"}
|
|
@@ -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-BG9Fvfdw.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewApp.vue.d.ts","sourceRoot":"","sources":["../src/PreviewApp.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PreviewApp.vue.d.ts","sourceRoot":"","sources":["../src/PreviewApp.vue"],"names":[],"mappings":";AA+NA,wBAMG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
const core = require("./core-
|
|
3
|
+
const core = require("./core-DhrL5TMI.cjs");
|
|
4
4
|
function sendToEditor(msg) {
|
|
5
5
|
window.parent.postMessage(msg, "*");
|
|
6
6
|
}
|
|
@@ -150,6 +150,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
150
|
case "BLOX_HOVER_BLOCK":
|
|
151
151
|
hoveredIndex.value = msg.index;
|
|
152
152
|
break;
|
|
153
|
+
case "BLOX_SCROLL_TOP":
|
|
154
|
+
window.scrollTo(0, 0);
|
|
155
|
+
break;
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
vue.onMounted(() => {
|
|
@@ -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
|
}
|
|
@@ -149,6 +149,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
149
149
|
case "BLOX_HOVER_BLOCK":
|
|
150
150
|
hoveredIndex.value = msg.index;
|
|
151
151
|
break;
|
|
152
|
+
case "BLOX_SCROLL_TOP":
|
|
153
|
+
window.scrollTo(0, 0);
|
|
154
|
+
break;
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
onMounted(() => {
|
package/dist/bridge.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface BlockSchemaInfo {
|
|
|
7
7
|
fields: SchemaDefinition;
|
|
8
8
|
defaults?: Record<string, unknown>;
|
|
9
9
|
dataSource?: boolean;
|
|
10
|
+
thumbnail?: string;
|
|
11
|
+
order?: number;
|
|
10
12
|
}
|
|
11
13
|
export type EditorMessage = {
|
|
12
14
|
type: 'BLOX_INIT';
|
|
@@ -24,6 +26,8 @@ export type EditorMessage = {
|
|
|
24
26
|
} | {
|
|
25
27
|
type: 'BLOX_HOVER_BLOCK';
|
|
26
28
|
index: number | null;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'BLOX_SCROLL_TOP';
|
|
27
31
|
};
|
|
28
32
|
export type PreviewMessage = {
|
|
29
33
|
type: 'BLOX_READY';
|
package/dist/bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEzD,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,C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IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAA;AAM/B,MAAM,MAAM,cAAc,GACrB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAM3C,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAEtD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAEjF"}
|
|
@@ -2,9 +2,9 @@ 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, createElementBlock,
|
|
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
|
-
import { getI18n } from "@bagelink/vue";
|
|
7
|
+
import { getI18n, Loading } from "@bagelink/vue";
|
|
8
8
|
const BASE = "/api";
|
|
9
9
|
let _websiteName = "";
|
|
10
10
|
let _store = "";
|
|
@@ -34,7 +34,7 @@ async function getWebsiteId() {
|
|
|
34
34
|
return _websiteId;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
const websites = await request("/
|
|
37
|
+
const websites = await request("/blox/websites");
|
|
38
38
|
const website = websites.find((w) => w.name === _websiteName);
|
|
39
39
|
if (!website) throw new Error(`Website "${_websiteName}" not found. Run: npm run seed`);
|
|
40
40
|
_websiteId = website.id;
|
|
@@ -42,7 +42,7 @@ async function getWebsiteId() {
|
|
|
42
42
|
}
|
|
43
43
|
async function resolvePath(path, locale2) {
|
|
44
44
|
const websiteId = await getWebsiteId();
|
|
45
|
-
return request(`/
|
|
45
|
+
return request(`/blox/websites/${websiteId}/resolve-path`, {
|
|
46
46
|
locale: locale2,
|
|
47
47
|
params: { path }
|
|
48
48
|
});
|
|
@@ -195,7 +195,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
195
195
|
return (_ctx, _cache) => {
|
|
196
196
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
197
197
|
return openBlock(), createElementBlock("div", null, [
|
|
198
|
-
initialLoading.value && blocks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1,
|
|
198
|
+
initialLoading.value && blocks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
199
|
+
createVNode(unref(Loading))
|
|
200
|
+
])) : notFound.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
199
201
|
_cache[0] || (_cache[0] = createElementVNode("h2", null, "404", -1)),
|
|
200
202
|
createElementVNode("p", null, toDisplayString(unref(locale2) === "he" ? "הדף לא נמצא" : "Page not found"), 1),
|
|
201
203
|
createVNode(_component_RouterLink, { to: "/" }, {
|
|
@@ -351,7 +353,9 @@ class BloxInstance {
|
|
|
351
353
|
icon: meta.icon,
|
|
352
354
|
fields: meta.schema,
|
|
353
355
|
defaults: meta.defaults,
|
|
354
|
-
dataSource: meta.dataSource
|
|
356
|
+
dataSource: meta.dataSource,
|
|
357
|
+
thumbnail: meta.thumbnail,
|
|
358
|
+
order: meta.order
|
|
355
359
|
}
|
|
356
360
|
};
|
|
357
361
|
break;
|
|
@@ -376,7 +380,9 @@ class BloxInstance {
|
|
|
376
380
|
icon: meta.icon,
|
|
377
381
|
fields: meta.schema,
|
|
378
382
|
defaults: meta.defaults,
|
|
379
|
-
dataSource: meta.dataSource
|
|
383
|
+
dataSource: meta.dataSource,
|
|
384
|
+
thumbnail: meta.thumbnail,
|
|
385
|
+
order: meta.order
|
|
380
386
|
}
|
|
381
387
|
};
|
|
382
388
|
}
|
|
@@ -397,7 +403,7 @@ class BloxInstance {
|
|
|
397
403
|
}
|
|
398
404
|
router.addRoute({
|
|
399
405
|
path: "/_blox_preview",
|
|
400
|
-
component: () => import("./PreviewApp-
|
|
406
|
+
component: () => import("./PreviewApp-MdZQEVkN.js"),
|
|
401
407
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
402
408
|
});
|
|
403
409
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$1 });
|
|
@@ -449,10 +455,10 @@ export {
|
|
|
449
455
|
BLOX_LOCALE_STRATEGY_KEY as B,
|
|
450
456
|
PageRenderer as P,
|
|
451
457
|
_sfc_main$1 as _,
|
|
452
|
-
|
|
458
|
+
BLOX_CONFIG_KEY as a,
|
|
453
459
|
BloxInstance as b,
|
|
454
460
|
createBlox as c,
|
|
455
|
-
|
|
461
|
+
configureApi as d,
|
|
456
462
|
BLOX_REGISTRY_KEY as e,
|
|
457
463
|
listItems as l,
|
|
458
464
|
resolvePath as r,
|
|
@@ -35,7 +35,7 @@ async function getWebsiteId() {
|
|
|
35
35
|
return _websiteId;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const websites = await request("/
|
|
38
|
+
const websites = await request("/blox/websites");
|
|
39
39
|
const website = websites.find((w) => w.name === _websiteName);
|
|
40
40
|
if (!website) throw new Error(`Website "${_websiteName}" not found. Run: npm run seed`);
|
|
41
41
|
_websiteId = website.id;
|
|
@@ -43,7 +43,7 @@ async function getWebsiteId() {
|
|
|
43
43
|
}
|
|
44
44
|
async function resolvePath(path, locale2) {
|
|
45
45
|
const websiteId = await getWebsiteId();
|
|
46
|
-
return request(`/
|
|
46
|
+
return request(`/blox/websites/${websiteId}/resolve-path`, {
|
|
47
47
|
locale: locale2,
|
|
48
48
|
params: { path }
|
|
49
49
|
});
|
|
@@ -196,7 +196,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
196
196
|
return (_ctx, _cache) => {
|
|
197
197
|
const _component_RouterLink = vue.resolveComponent("RouterLink");
|
|
198
198
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
199
|
-
initialLoading.value && blocks.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1,
|
|
199
|
+
initialLoading.value && blocks.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
200
|
+
vue.createVNode(vue.unref(vue$1.Loading))
|
|
201
|
+
])) : notFound.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
200
202
|
_cache[0] || (_cache[0] = vue.createElementVNode("h2", null, "404", -1)),
|
|
201
203
|
vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(locale2) === "he" ? "הדף לא נמצא" : "Page not found"), 1),
|
|
202
204
|
vue.createVNode(_component_RouterLink, { to: "/" }, {
|
|
@@ -352,7 +354,9 @@ class BloxInstance {
|
|
|
352
354
|
icon: meta.icon,
|
|
353
355
|
fields: meta.schema,
|
|
354
356
|
defaults: meta.defaults,
|
|
355
|
-
dataSource: meta.dataSource
|
|
357
|
+
dataSource: meta.dataSource,
|
|
358
|
+
thumbnail: meta.thumbnail,
|
|
359
|
+
order: meta.order
|
|
356
360
|
}
|
|
357
361
|
};
|
|
358
362
|
break;
|
|
@@ -377,7 +381,9 @@ class BloxInstance {
|
|
|
377
381
|
icon: meta.icon,
|
|
378
382
|
fields: meta.schema,
|
|
379
383
|
defaults: meta.defaults,
|
|
380
|
-
dataSource: meta.dataSource
|
|
384
|
+
dataSource: meta.dataSource,
|
|
385
|
+
thumbnail: meta.thumbnail,
|
|
386
|
+
order: meta.order
|
|
381
387
|
}
|
|
382
388
|
};
|
|
383
389
|
}
|
|
@@ -398,7 +404,7 @@ class BloxInstance {
|
|
|
398
404
|
}
|
|
399
405
|
router.addRoute({
|
|
400
406
|
path: "/_blox_preview",
|
|
401
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
407
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-BDMfuAiu.cjs")),
|
|
402
408
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
403
409
|
});
|
|
404
410
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$1 });
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAoB/D,4GAA4G;AAC5G,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,cAAc,CAAA;AAE5D,MAAM,WAAW,WAAY,SAAQ,eAAe;IACnD,qIAAqI;IACrI,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC1C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAA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AC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsC;IAChE,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,SAAS,CAAgB;gBAErB,OAAO,CAAC,EAAE,WAAW;IAQjC,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI;IA8B3E,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI;IA2BnE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAyBpC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI;CAgC9C;AAMD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,YAAY,CAS9D"}
|
package/dist/defineBlock.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export interface BlockMeta {
|
|
|
25
25
|
description?: string;
|
|
26
26
|
/** Set to true when this block fetches its own data from a datastore collection. Used by the editor to show a hint when both schema fields and data source are present. */
|
|
27
27
|
dataSource?: boolean;
|
|
28
|
+
/** Static thumbnail image URL for the editor block picker. Overrides the default icon. */
|
|
29
|
+
thumbnail?: string;
|
|
30
|
+
/** Sort order in the editor block picker. Lower values appear first. Defaults to 100. */
|
|
31
|
+
order?: number;
|
|
28
32
|
}
|
|
29
33
|
/** A Vue SFC module that has `export const <name> = defineBlock(...)` in its `<script setup>`. */
|
|
30
34
|
export interface BlockModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineBlock.d.ts","sourceRoot":"","sources":["../src/defineBlock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM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,MAAM,CAAA;IACpB,2KAA2K;IAC3K,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,kGAAkG;AAClG,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAatD"}
|
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-
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
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");
|
|
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-
|
|
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,
|
|
@@ -3,24 +3,24 @@ import path from "node:path";
|
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
async function fetchCmsSiteData(apiBase, websiteName) {
|
|
6
|
-
const sitesRes = await fetch(`${apiBase}/
|
|
6
|
+
const sitesRes = await fetch(`${apiBase}/blox/websites`);
|
|
7
7
|
const sitesData = await sitesRes.json();
|
|
8
8
|
const sites = Array.isArray(sitesData) ? sitesData : sitesData.data ?? [];
|
|
9
9
|
const site = sites.find((s) => s.name === websiteName);
|
|
10
10
|
if ((site == null ? void 0 : site.id) == null || site.id === "") throw new Error(`Website "${websiteName}" not found at ${apiBase}`);
|
|
11
11
|
let website = site;
|
|
12
12
|
try {
|
|
13
|
-
const wRes = await fetch(`${apiBase}/
|
|
13
|
+
const wRes = await fetch(`${apiBase}/blox/websites/${site.id}`);
|
|
14
14
|
if (wRes.ok) website = await wRes.json();
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
-
const pagesRes = await fetch(`${apiBase}/
|
|
17
|
+
const pagesRes = await fetch(`${apiBase}/blox/websites/${site.id}/pages?locale=${website.default_locale || "en"}`);
|
|
18
18
|
const pagesData = await pagesRes.json();
|
|
19
19
|
const pages = Array.isArray(pagesData) ? pagesData : pagesData.data ?? [];
|
|
20
20
|
const paths = await expandRoutes(apiBase, pages);
|
|
21
21
|
let redirects = [];
|
|
22
22
|
try {
|
|
23
|
-
const rRes = await fetch(`${apiBase}/
|
|
23
|
+
const rRes = await fetch(`${apiBase}/blox/websites/${site.id}/redirects`);
|
|
24
24
|
if (rRes.ok) {
|
|
25
25
|
const rData = await rRes.json();
|
|
26
26
|
const items = Array.isArray(rData) ? rData : rData.data ?? [];
|
|
@@ -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,
|
|
@@ -26,24 +26,24 @@ const path = require("node:path");
|
|
|
26
26
|
const process = require("node:process");
|
|
27
27
|
const node_url = require("node:url");
|
|
28
28
|
async function fetchCmsSiteData(apiBase, websiteName) {
|
|
29
|
-
const sitesRes = await fetch(`${apiBase}/
|
|
29
|
+
const sitesRes = await fetch(`${apiBase}/blox/websites`);
|
|
30
30
|
const sitesData = await sitesRes.json();
|
|
31
31
|
const sites = Array.isArray(sitesData) ? sitesData : sitesData.data ?? [];
|
|
32
32
|
const site = sites.find((s) => s.name === websiteName);
|
|
33
33
|
if ((site == null ? void 0 : site.id) == null || site.id === "") throw new Error(`Website "${websiteName}" not found at ${apiBase}`);
|
|
34
34
|
let website = site;
|
|
35
35
|
try {
|
|
36
|
-
const wRes = await fetch(`${apiBase}/
|
|
36
|
+
const wRes = await fetch(`${apiBase}/blox/websites/${site.id}`);
|
|
37
37
|
if (wRes.ok) website = await wRes.json();
|
|
38
38
|
} catch {
|
|
39
39
|
}
|
|
40
|
-
const pagesRes = await fetch(`${apiBase}/
|
|
40
|
+
const pagesRes = await fetch(`${apiBase}/blox/websites/${site.id}/pages?locale=${website.default_locale || "en"}`);
|
|
41
41
|
const pagesData = await pagesRes.json();
|
|
42
42
|
const pages = Array.isArray(pagesData) ? pagesData : pagesData.data ?? [];
|
|
43
43
|
const paths = await expandRoutes(apiBase, pages);
|
|
44
44
|
let redirects = [];
|
|
45
45
|
try {
|
|
46
|
-
const rRes = await fetch(`${apiBase}/
|
|
46
|
+
const rRes = await fetch(`${apiBase}/blox/websites/${site.id}/redirects`);
|
|
47
47
|
if (rRes.ok) {
|
|
48
48
|
const rData = await rRes.json();
|
|
49
49
|
const items = Array.isArray(rData) ? rData : rData.data ?? [];
|
|
@@ -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",
|
package/dist/schema.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export interface BlockSchema {
|
|
|
16
16
|
defaults?: Record<string, unknown>;
|
|
17
17
|
/** True when this block fetches its own data from a datastore collection. */
|
|
18
18
|
dataSource?: boolean;
|
|
19
|
+
/** Static thumbnail image URL for the editor block picker. Overrides the default icon. */
|
|
20
|
+
thumbnail?: string;
|
|
21
|
+
/** Sort order in the editor block picker. Lower values appear first. Defaults to 100. */
|
|
22
|
+
order?: number;
|
|
19
23
|
}
|
|
20
24
|
export interface BlockDefinition {
|
|
21
25
|
component: Component;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OA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E;AAC/E,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAA"}
|
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 };
|
|
@@ -26,7 +26,7 @@ type CollectionCacheMap = Record<string, unknown[]>;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function getCollectionCache(): CollectionCacheMap | null;
|
|
28
28
|
/**
|
|
29
|
-
* Get the pre-embedded website ID (avoids GET /
|
|
29
|
+
* Get the pre-embedded website ID (avoids GET /blox/websites on client).
|
|
30
30
|
* Returns empty string if not available.
|
|
31
31
|
*/
|
|
32
32
|
export declare function getEmbeddedWebsiteId(): string;
|
package/dist/ssg/constants.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
export declare const BLOX_STATE_WINDOW_KEY: "__BLOX_STATE__";
|
|
3
3
|
/** Global key for pre-fetched datastore collections (keyed by "store/collection"). */
|
|
4
4
|
export declare const BLOX_COLLECTIONS_WINDOW_KEY: "__BLOX_COLLECTIONS__";
|
|
5
|
-
/** Global key for the pre-resolved website ID (avoids GET /
|
|
5
|
+
/** Global key for the pre-resolved website ID (avoids GET /blox/websites on client). */
|
|
6
6
|
export declare const BLOX_WEBSITE_ID_WINDOW_KEY: "__BLOX_WEBSITE_ID__";
|
|
7
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/ssg/constants.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,EAAG,gBAAyB,CAAA;AAE9D,sFAAsF;AACtF,eAAO,MAAM,2BAA2B,EAAG,sBAA+B,CAAA;AAE1E,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/ssg/constants.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,EAAG,gBAAyB,CAAA;AAE9D,sFAAsF;AACtF,eAAO,MAAM,2BAA2B,EAAG,sBAA+B,CAAA;AAE1E,wFAAwF;AACxF,eAAO,MAAM,0BAA0B,EAAG,qBAA8B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSREntry.d.ts","sourceRoot":"","sources":["../../src/ssg/createSSREntry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAO9D,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB;;;;OAIG;IACH,YA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,CAAA;AAO9D,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,aAAa,EAAE,SAAS,CAAA;IACxB;;;;OAIG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9D;;;OAGG;IACH,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACpD,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,oGAAoG;IACpG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;IAC5E;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;CAClE;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,YAAY,CAoGnF"}
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -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-
|
|
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");
|
|
29
|
-
const core = require("../core-
|
|
29
|
+
const core = require("../core-DhrL5TMI.cjs");
|
|
30
30
|
async function renderBloxSsgPage(options) {
|
|
31
31
|
const {
|
|
32
32
|
url,
|
|
@@ -85,7 +85,7 @@ function createBloxSSREntry(options) {
|
|
|
85
85
|
const apiBase = options.apiBase ?? (typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BAGELINK_API_URL : void 0) ?? "https://api.bagel.to";
|
|
86
86
|
async function getWebsiteId() {
|
|
87
87
|
if (_websiteId) return _websiteId;
|
|
88
|
-
const res = await fetch(`${apiBase}/
|
|
88
|
+
const res = await fetch(`${apiBase}/blox/websites`);
|
|
89
89
|
const data = await res.json();
|
|
90
90
|
const sites = Array.isArray(data) ? data : (data == null ? void 0 : data.data) ?? [];
|
|
91
91
|
const site = sites.find((s) => s.name === websiteName);
|
|
@@ -95,7 +95,7 @@ function createBloxSSREntry(options) {
|
|
|
95
95
|
}
|
|
96
96
|
async function fetchResolvedPage(urlPath) {
|
|
97
97
|
const websiteId = await getWebsiteId();
|
|
98
|
-
const url = `${apiBase}/
|
|
98
|
+
const url = `${apiBase}/blox/websites/${websiteId}/resolve-path?path=${encodeURIComponent(urlPath)}&locale=${locale}`;
|
|
99
99
|
const res = await fetch(url);
|
|
100
100
|
if (!res.ok) throw new Error(`resolve-path ${res.status}: ${urlPath}`);
|
|
101
101
|
return res.json();
|
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,
|
|
@@ -63,7 +63,7 @@ function createBloxSSREntry(options) {
|
|
|
63
63
|
const apiBase = options.apiBase ?? (typeof process !== "undefined" ? (_a = process.env) == null ? void 0 : _a.BAGELINK_API_URL : void 0) ?? "https://api.bagel.to";
|
|
64
64
|
async function getWebsiteId() {
|
|
65
65
|
if (_websiteId) return _websiteId;
|
|
66
|
-
const res = await fetch(`${apiBase}/
|
|
66
|
+
const res = await fetch(`${apiBase}/blox/websites`);
|
|
67
67
|
const data = await res.json();
|
|
68
68
|
const sites = Array.isArray(data) ? data : (data == null ? void 0 : data.data) ?? [];
|
|
69
69
|
const site = sites.find((s) => s.name === websiteName);
|
|
@@ -73,7 +73,7 @@ function createBloxSSREntry(options) {
|
|
|
73
73
|
}
|
|
74
74
|
async function fetchResolvedPage(urlPath) {
|
|
75
75
|
const websiteId = await getWebsiteId();
|
|
76
|
-
const url = `${apiBase}/
|
|
76
|
+
const url = `${apiBase}/blox/websites/${websiteId}/resolve-path?path=${encodeURIComponent(urlPath)}&locale=${locale}`;
|
|
77
77
|
const res = await fetch(url);
|
|
78
78
|
if (!res.ok) throw new Error(`resolve-path ${res.status}: ${urlPath}`);
|
|
79
79
|
return res.json();
|
|
@@ -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,
|
|
@@ -26,7 +26,7 @@ export declare function renderBloxSsgPage<TApp>(options: {
|
|
|
26
26
|
stateWindowKey?: string;
|
|
27
27
|
/** Website settings for SEO tags. If omitted, only state script is emitted. */
|
|
28
28
|
website?: WebsiteRead | null;
|
|
29
|
-
/** Resolved website ID — embedded so client skips GET /
|
|
29
|
+
/** Resolved website ID — embedded so client skips GET /blox/websites. */
|
|
30
30
|
websiteId?: string;
|
|
31
31
|
/** Pre-fetched datastore collections — embedded for zero-fetch hydration. */
|
|
32
32
|
collections?: Record<string, unknown[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-resolved-page.d.ts","sourceRoot":"","sources":["../../src/ssg/render-resolved-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAK/C,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9C,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAA;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,
|
|
1
|
+
{"version":3,"file":"render-resolved-page.d.ts","sourceRoot":"","sources":["../../src/ssg/render-resolved-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAK/C,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE;IACtD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9C,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAA;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;CACvC,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA2D/D"}
|
package/dist/vite-plugin.cjs
CHANGED
|
@@ -1087,17 +1087,18 @@ function bloxPlugin(options = {}) {
|
|
|
1087
1087
|
try {
|
|
1088
1088
|
const req = node_module.createRequire(base);
|
|
1089
1089
|
const vueEntry = req.resolve("vue");
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"vue/server-renderer": path.join(vueDir, "server-renderer", "index.mjs"),
|
|
1094
|
-
"@vue/server-renderer": req.resolve("@vue/server-renderer")
|
|
1095
|
-
|
|
1090
|
+
const vuePkgJson = req.resolve("vue/package.json");
|
|
1091
|
+
const vueDir = path.dirname(vuePkgJson);
|
|
1092
|
+
return [
|
|
1093
|
+
{ find: "vue/server-renderer", replacement: path.join(vueDir, "server-renderer", "index.mjs") },
|
|
1094
|
+
{ find: "@vue/server-renderer", replacement: req.resolve("@vue/server-renderer") },
|
|
1095
|
+
{ find: "vue", replacement: vueEntry }
|
|
1096
|
+
];
|
|
1096
1097
|
} catch {
|
|
1097
1098
|
continue;
|
|
1098
1099
|
}
|
|
1099
1100
|
}
|
|
1100
|
-
return
|
|
1101
|
+
return [];
|
|
1101
1102
|
}
|
|
1102
1103
|
const dedupe = [
|
|
1103
1104
|
"vue",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAA;AAM9C,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAA;AAM9C,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,EAAE,CAgTpE"}
|
package/dist/vite-plugin.mjs
CHANGED
|
@@ -1085,17 +1085,18 @@ function bloxPlugin(options = {}) {
|
|
|
1085
1085
|
try {
|
|
1086
1086
|
const req = createRequire(base);
|
|
1087
1087
|
const vueEntry = req.resolve("vue");
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
"vue/server-renderer": join(vueDir, "server-renderer", "index.mjs"),
|
|
1092
|
-
"@vue/server-renderer": req.resolve("@vue/server-renderer")
|
|
1093
|
-
|
|
1088
|
+
const vuePkgJson = req.resolve("vue/package.json");
|
|
1089
|
+
const vueDir = dirname(vuePkgJson);
|
|
1090
|
+
return [
|
|
1091
|
+
{ find: "vue/server-renderer", replacement: join(vueDir, "server-renderer", "index.mjs") },
|
|
1092
|
+
{ find: "@vue/server-renderer", replacement: req.resolve("@vue/server-renderer") },
|
|
1093
|
+
{ find: "vue", replacement: vueEntry }
|
|
1094
|
+
];
|
|
1094
1095
|
} catch {
|
|
1095
1096
|
continue;
|
|
1096
1097
|
}
|
|
1097
1098
|
}
|
|
1098
|
-
return
|
|
1099
|
+
return [];
|
|
1099
1100
|
}
|
|
1100
1101
|
const dedupe = [
|
|
1101
1102
|
"vue",
|
package/package.json
CHANGED
|
@@ -1,130 +1,129 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
2
|
+
"name": "@bagelink/blox",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.14.7",
|
|
5
|
+
"description": "Blox page builder library for drag-and-drop page building and static data management",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Bagel Studio",
|
|
8
|
+
"email": "info@bagelstudio.co.il",
|
|
9
|
+
"url": "https://bagelstudio.co.il"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/bageldb/bagelink.git",
|
|
16
|
+
"directory": "packages/blox"
|
|
17
|
+
},
|
|
18
|
+
"bugs": "https://github.com/bageldb/bagelink/issues",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"blox",
|
|
21
|
+
"page-builder",
|
|
22
|
+
"preview",
|
|
23
|
+
"external-preview",
|
|
24
|
+
"cms",
|
|
25
|
+
"vue",
|
|
26
|
+
"component-library",
|
|
27
|
+
"drag-and-drop",
|
|
28
|
+
"static-pages"
|
|
29
|
+
],
|
|
30
|
+
"bin": {
|
|
31
|
+
"blox-ssg": "./dist/ssg/cli.mjs"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": "./package.json",
|
|
36
|
+
"./vite": {
|
|
37
|
+
"types": "./dist/vite-plugin.d.ts",
|
|
38
|
+
"import": "./dist/vite-plugin.mjs"
|
|
39
|
+
},
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"require": "./dist/index.cjs",
|
|
43
|
+
"import": "./dist/index.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./ssg": {
|
|
46
|
+
"types": "./dist/ssg/index.d.ts",
|
|
47
|
+
"import": "./dist/ssg/index.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./ssg/client": {
|
|
50
|
+
"types": "./dist/ssg/client.d.ts",
|
|
51
|
+
"import": "./dist/ssg/client.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./components": {
|
|
54
|
+
"types": "./dist/components/index.d.ts",
|
|
55
|
+
"import": "./dist/components/index.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./core": {
|
|
58
|
+
"types": "./dist/core/types.d.ts",
|
|
59
|
+
"import": "./dist/core/types.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./utils": {
|
|
62
|
+
"types": "./dist/utils/styles.d.ts",
|
|
63
|
+
"import": "./dist/utils/styles.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./dist/style.css": "./dist/style.css"
|
|
66
|
+
},
|
|
67
|
+
"main": "./dist/index.cjs",
|
|
68
|
+
"module": "./dist/index.mjs",
|
|
69
|
+
"types": "./dist/index.d.ts",
|
|
70
|
+
"typesVersions": {
|
|
71
|
+
"*": {
|
|
72
|
+
"*": [
|
|
73
|
+
"./dist/*",
|
|
74
|
+
"./dist/index.d.ts"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist",
|
|
80
|
+
"core",
|
|
81
|
+
"components",
|
|
82
|
+
"config",
|
|
83
|
+
"ssg",
|
|
84
|
+
"utils",
|
|
85
|
+
"views",
|
|
86
|
+
"setup.ts",
|
|
87
|
+
"index.ts",
|
|
88
|
+
"README.md"
|
|
89
|
+
],
|
|
90
|
+
"publishConfig": {
|
|
91
|
+
"access": "public"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@bagelink/vue": "*",
|
|
95
|
+
"happy-dom": ">=14.0.0",
|
|
96
|
+
"vite": ">=5.0.0",
|
|
97
|
+
"vue": "^3.3.0",
|
|
98
|
+
"vue-router": "^4.0.0"
|
|
99
|
+
},
|
|
100
|
+
"peerDependenciesMeta": {
|
|
101
|
+
"happy-dom": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"vite": {
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
110
|
+
"@vue/tsconfig": "^0.7.0",
|
|
111
|
+
"magic-string": "^0.30.21",
|
|
112
|
+
"typescript": "^5.8.3",
|
|
113
|
+
"vite": "^5.0.0",
|
|
114
|
+
"vite-plugin-dts": "^4.0.0",
|
|
115
|
+
"vite-tsconfig-paths": "^5.0.0",
|
|
116
|
+
"vitest": "^3.2.4",
|
|
117
|
+
"vue": "^3.5.32",
|
|
118
|
+
"vue-router": "^4.6.3",
|
|
119
|
+
"vue-tsc": "^2.0.0"
|
|
120
|
+
},
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"pinia": "^3.0.4"
|
|
123
|
+
},
|
|
124
|
+
"scripts": {
|
|
125
|
+
"dev": "vite build --watch",
|
|
126
|
+
"build": "vite build",
|
|
127
|
+
"typecheck": "vue-tsc --noEmit"
|
|
128
|
+
}
|
|
129
|
+
}
|