@bagelink/blox 1.15.211 → 1.15.215
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/PageRenderer.d.ts.map +1 -1
- package/dist/{PreviewApp-APyemzqx.cjs → PreviewApp-C2Cn1yH2.cjs} +1 -1
- package/dist/{PreviewApp-BKTydm92.js → PreviewApp-CNIVF6Xq.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-C0ZVst7R.cjs → PreviewApp.vue_vue_type_style_index_0_lang-kv9T9yLc.cjs} +20 -12
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DHb-NJ4C.js → PreviewApp.vue_vue_type_style_index_0_lang-lotrZDHC.js} +20 -12
- package/dist/PreviewRenderer.d.ts.map +1 -1
- package/dist/api/types.d.ts +33 -2
- package/dist/api/types.d.ts.map +1 -1
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.d.ts.map +1 -1
- package/dist/composables/useGlobalBlock.d.ts +14 -21
- package/dist/composables/useGlobalBlock.d.ts.map +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/defineBlock.d.ts +8 -0
- package/dist/defineBlock.d.ts.map +1 -1
- package/dist/index.cjs +16 -20
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +45 -49
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/{prerender-BNFeuap-.cjs → prerender-BkTA1QZ6.cjs} +97 -64
- package/dist/{prerender-Bth9K3uz.js → prerender-wIuYNW6N.js} +97 -64
- package/dist/{routes-C97aL4cQ.cjs → routes-0bOKkut4.cjs} +5 -91
- package/dist/{routes-bhjTTXfU.js → routes-CHfoa2Mk.js} +38 -124
- package/dist/schema.d.ts +2 -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/index.cjs +2 -2
- package/dist/ssg/index.d.ts +1 -1
- package/dist/ssg/index.d.ts.map +1 -1
- package/dist/ssg/index.mjs +3 -3
- package/dist/ssg/prerender.d.ts +5 -1
- package/dist/ssg/prerender.d.ts.map +1 -1
- package/dist/ssg/seo.d.ts +13 -27
- package/dist/ssg/seo.d.ts.map +1 -1
- package/dist/symbols.d.ts +0 -11
- package/dist/symbols.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/GlobalBlockHost.d.ts +0 -75
- package/dist/GlobalBlockHost.d.ts.map +0 -1
- package/dist/globalRef.d.ts +0 -9
- package/dist/globalRef.d.ts.map +0 -1
|
@@ -86,7 +86,6 @@ async function getItemById(collection, id, locale2) {
|
|
|
86
86
|
const BLOX_REGISTRY_KEY = Symbol("blox:registry");
|
|
87
87
|
const BLOX_CONFIG_KEY = Symbol("blox:config");
|
|
88
88
|
const BLOX_LOCALE_STRATEGY_KEY = Symbol("blox:locale-strategy");
|
|
89
|
-
const BLOX_GLOBAL_RESOLVER_KEY = Symbol("blox:global-resolver");
|
|
90
89
|
const BLOX_ADMIN_CONFIG_KEY = Symbol("blox:admin-config");
|
|
91
90
|
const STORAGE_KEY = "blox:edit";
|
|
92
91
|
const active = vue.ref(readStored());
|
|
@@ -212,78 +211,6 @@ function useLocale() {
|
|
|
212
211
|
}
|
|
213
212
|
return { locale, dir, setLocale, currentAlternates, setAlternates };
|
|
214
213
|
}
|
|
215
|
-
const GlobalBlockHost = vue.defineComponent({
|
|
216
|
-
name: "GlobalBlockHost",
|
|
217
|
-
props: {
|
|
218
|
-
/** The resolved block component to render. */
|
|
219
|
-
component: {
|
|
220
|
-
type: [Object, Function],
|
|
221
|
-
required: true
|
|
222
|
-
},
|
|
223
|
-
/** Block-level defaults (from the block's schema). */
|
|
224
|
-
defaults: {
|
|
225
|
-
type: Object,
|
|
226
|
-
default: () => ({})
|
|
227
|
-
},
|
|
228
|
-
/** The reference block's props (includes `_globalRef`, no real content). */
|
|
229
|
-
blockProps: {
|
|
230
|
-
type: Object,
|
|
231
|
-
default: () => ({})
|
|
232
|
-
},
|
|
233
|
-
/** The dynamic global reference id. */
|
|
234
|
-
globalRef: {
|
|
235
|
-
type: String,
|
|
236
|
-
required: true
|
|
237
|
-
},
|
|
238
|
-
/** The block type, used to match targeted refresh messages. */
|
|
239
|
-
blockType: {
|
|
240
|
-
type: String,
|
|
241
|
-
default: ""
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
setup(props) {
|
|
245
|
-
const resolver = vue.inject(BLOX_GLOBAL_RESOLVER_KEY, null);
|
|
246
|
-
const remote = vue.ref(null);
|
|
247
|
-
async function load() {
|
|
248
|
-
if (!resolver) return;
|
|
249
|
-
try {
|
|
250
|
-
remote.value = await resolver(props.globalRef);
|
|
251
|
-
} catch (e) {
|
|
252
|
-
console.warn(`[GlobalBlockHost] failed to resolve "${props.globalRef}"`, e);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
function onEditorMessage(event) {
|
|
256
|
-
const msg = event.data;
|
|
257
|
-
if ((msg == null ? void 0 : msg.type) !== "BLOX_REFRESH_GLOBAL") return;
|
|
258
|
-
if (!msg.block || msg.block === props.blockType) void load();
|
|
259
|
-
}
|
|
260
|
-
vue.onMounted(() => {
|
|
261
|
-
void load();
|
|
262
|
-
if (typeof window !== "undefined") {
|
|
263
|
-
window.addEventListener("message", onEditorMessage);
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
vue.onUnmounted(() => {
|
|
267
|
-
if (typeof window !== "undefined") {
|
|
268
|
-
window.removeEventListener("message", onEditorMessage);
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
vue.watch(() => props.globalRef, () => {
|
|
272
|
-
void load();
|
|
273
|
-
});
|
|
274
|
-
return () => {
|
|
275
|
-
const { _globalRef, ...inlineProps } = props.blockProps;
|
|
276
|
-
const merged = { ...props.defaults, ...inlineProps, ...remote.value ?? {} };
|
|
277
|
-
return vue.h(props.component, merged);
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
const GLOBAL_REF_KEY = "_globalRef";
|
|
282
|
-
function globalRefOf(block) {
|
|
283
|
-
var _a;
|
|
284
|
-
const ref = (_a = block == null ? void 0 : block.props) == null ? void 0 : _a[GLOBAL_REF_KEY];
|
|
285
|
-
return typeof ref === "string" && ref ? ref : null;
|
|
286
|
-
}
|
|
287
214
|
const PageRenderer = vue.defineComponent({
|
|
288
215
|
name: "PageRenderer",
|
|
289
216
|
props: {
|
|
@@ -299,17 +226,6 @@ const PageRenderer = vue.defineComponent({
|
|
|
299
226
|
props.blocks.flatMap((block, i) => {
|
|
300
227
|
const definition = registry2[block.type];
|
|
301
228
|
if (!definition) return [];
|
|
302
|
-
const ref = globalRefOf(block);
|
|
303
|
-
if (ref) {
|
|
304
|
-
return [vue.h(GlobalBlockHost, {
|
|
305
|
-
key: `${block.type}-${i}`,
|
|
306
|
-
component: definition.component,
|
|
307
|
-
defaults: definition.schema.defaults,
|
|
308
|
-
blockProps: block.props,
|
|
309
|
-
globalRef: ref,
|
|
310
|
-
blockType: block.type
|
|
311
|
-
})];
|
|
312
|
-
}
|
|
313
229
|
const merged = { ...definition.schema.defaults, ...block.props };
|
|
314
230
|
return [vue.h(definition.component, { key: `${block.type}-${i}`, ...merged })];
|
|
315
231
|
})
|
|
@@ -807,7 +723,8 @@ class BloxInstance {
|
|
|
807
723
|
dataSource: meta.dataSource,
|
|
808
724
|
category: meta.category,
|
|
809
725
|
thumbnail: meta.thumbnail,
|
|
810
|
-
order: meta.order
|
|
726
|
+
order: meta.order,
|
|
727
|
+
global: meta.global
|
|
811
728
|
}
|
|
812
729
|
};
|
|
813
730
|
break;
|
|
@@ -835,7 +752,8 @@ class BloxInstance {
|
|
|
835
752
|
dataSource: meta.dataSource,
|
|
836
753
|
category: meta.category,
|
|
837
754
|
thumbnail: meta.thumbnail,
|
|
838
|
-
order: meta.order
|
|
755
|
+
order: meta.order,
|
|
756
|
+
global: meta.global
|
|
839
757
|
}
|
|
840
758
|
};
|
|
841
759
|
}
|
|
@@ -860,7 +778,7 @@ class BloxInstance {
|
|
|
860
778
|
}
|
|
861
779
|
router.addRoute({
|
|
862
780
|
path: "/_blox_preview",
|
|
863
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
781
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-C2Cn1yH2.cjs")),
|
|
864
782
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
865
783
|
});
|
|
866
784
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1137,12 +1055,9 @@ exports.BLOX_ADMIN_CONFIG_KEY = BLOX_ADMIN_CONFIG_KEY;
|
|
|
1137
1055
|
exports.BLOX_CONFIG_KEY = BLOX_CONFIG_KEY;
|
|
1138
1056
|
exports.BLOX_DATA_KEY = BLOX_DATA_KEY;
|
|
1139
1057
|
exports.BLOX_DATA_WINDOW_KEY = BLOX_DATA_WINDOW_KEY;
|
|
1140
|
-
exports.BLOX_GLOBAL_RESOLVER_KEY = BLOX_GLOBAL_RESOLVER_KEY;
|
|
1141
1058
|
exports.BLOX_LOCALE_STRATEGY_KEY = BLOX_LOCALE_STRATEGY_KEY;
|
|
1142
1059
|
exports.BLOX_REGISTRY_KEY = BLOX_REGISTRY_KEY;
|
|
1143
1060
|
exports.BloxInstance = BloxInstance;
|
|
1144
|
-
exports.GLOBAL_REF_KEY = GLOBAL_REF_KEY;
|
|
1145
|
-
exports.GlobalBlockHost = GlobalBlockHost;
|
|
1146
1061
|
exports.PageRenderer = PageRenderer;
|
|
1147
1062
|
exports._sfc_main = _sfc_main$3;
|
|
1148
1063
|
exports._sfc_main$1 = _sfc_main$2;
|
|
@@ -1163,7 +1078,6 @@ exports.getItemBySlug = getItemBySlug;
|
|
|
1163
1078
|
exports.getRegistryData = getRegistryData;
|
|
1164
1079
|
exports.getWebsiteId = getWebsiteId;
|
|
1165
1080
|
exports.getWebsiteIdSync = getWebsiteIdSync;
|
|
1166
|
-
exports.globalRefOf = globalRefOf;
|
|
1167
1081
|
exports.installContentFallback = installContentFallback;
|
|
1168
1082
|
exports.installLocaleAwareResolve = installLocaleAwareResolve;
|
|
1169
1083
|
exports.installSmartLinks = installSmartLinks;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createBlock, Teleport, createElementBlock, createElementVNode, createCommentVNode,
|
|
4
|
+
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createBlock, Teleport, createElementBlock, createElementVNode, createCommentVNode, h, provide, watch, resolveComponent, createVNode, toDisplayString, withCtx, createTextVNode, Fragment, getCurrentInstance, shallowRef, onServerPrefetch, toValue, markRaw, resolveDynamicComponent } from "vue";
|
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
|
6
6
|
import { BLOX_WEBSITE_ID_WINDOW_KEY, BLOX_STATE_WINDOW_KEY } from "./ssg/client.mjs";
|
|
7
7
|
import { getI18n, Loading } from "@bagelink/vue";
|
|
@@ -85,7 +85,6 @@ async function getItemById(collection, id, locale2) {
|
|
|
85
85
|
const BLOX_REGISTRY_KEY = Symbol("blox:registry");
|
|
86
86
|
const BLOX_CONFIG_KEY = Symbol("blox:config");
|
|
87
87
|
const BLOX_LOCALE_STRATEGY_KEY = Symbol("blox:locale-strategy");
|
|
88
|
-
const BLOX_GLOBAL_RESOLVER_KEY = Symbol("blox:global-resolver");
|
|
89
88
|
const BLOX_ADMIN_CONFIG_KEY = Symbol("blox:admin-config");
|
|
90
89
|
const STORAGE_KEY = "blox:edit";
|
|
91
90
|
const active = ref(readStored());
|
|
@@ -211,78 +210,6 @@ function useLocale() {
|
|
|
211
210
|
}
|
|
212
211
|
return { locale, dir, setLocale, currentAlternates, setAlternates };
|
|
213
212
|
}
|
|
214
|
-
const GlobalBlockHost = defineComponent({
|
|
215
|
-
name: "GlobalBlockHost",
|
|
216
|
-
props: {
|
|
217
|
-
/** The resolved block component to render. */
|
|
218
|
-
component: {
|
|
219
|
-
type: [Object, Function],
|
|
220
|
-
required: true
|
|
221
|
-
},
|
|
222
|
-
/** Block-level defaults (from the block's schema). */
|
|
223
|
-
defaults: {
|
|
224
|
-
type: Object,
|
|
225
|
-
default: () => ({})
|
|
226
|
-
},
|
|
227
|
-
/** The reference block's props (includes `_globalRef`, no real content). */
|
|
228
|
-
blockProps: {
|
|
229
|
-
type: Object,
|
|
230
|
-
default: () => ({})
|
|
231
|
-
},
|
|
232
|
-
/** The dynamic global reference id. */
|
|
233
|
-
globalRef: {
|
|
234
|
-
type: String,
|
|
235
|
-
required: true
|
|
236
|
-
},
|
|
237
|
-
/** The block type, used to match targeted refresh messages. */
|
|
238
|
-
blockType: {
|
|
239
|
-
type: String,
|
|
240
|
-
default: ""
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
setup(props) {
|
|
244
|
-
const resolver = inject(BLOX_GLOBAL_RESOLVER_KEY, null);
|
|
245
|
-
const remote = ref(null);
|
|
246
|
-
async function load() {
|
|
247
|
-
if (!resolver) return;
|
|
248
|
-
try {
|
|
249
|
-
remote.value = await resolver(props.globalRef);
|
|
250
|
-
} catch (e) {
|
|
251
|
-
console.warn(`[GlobalBlockHost] failed to resolve "${props.globalRef}"`, e);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
function onEditorMessage(event) {
|
|
255
|
-
const msg = event.data;
|
|
256
|
-
if ((msg == null ? void 0 : msg.type) !== "BLOX_REFRESH_GLOBAL") return;
|
|
257
|
-
if (!msg.block || msg.block === props.blockType) void load();
|
|
258
|
-
}
|
|
259
|
-
onMounted(() => {
|
|
260
|
-
void load();
|
|
261
|
-
if (typeof window !== "undefined") {
|
|
262
|
-
window.addEventListener("message", onEditorMessage);
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
onUnmounted(() => {
|
|
266
|
-
if (typeof window !== "undefined") {
|
|
267
|
-
window.removeEventListener("message", onEditorMessage);
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
watch(() => props.globalRef, () => {
|
|
271
|
-
void load();
|
|
272
|
-
});
|
|
273
|
-
return () => {
|
|
274
|
-
const { _globalRef, ...inlineProps } = props.blockProps;
|
|
275
|
-
const merged = { ...props.defaults, ...inlineProps, ...remote.value ?? {} };
|
|
276
|
-
return h(props.component, merged);
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
const GLOBAL_REF_KEY = "_globalRef";
|
|
281
|
-
function globalRefOf(block) {
|
|
282
|
-
var _a;
|
|
283
|
-
const ref2 = (_a = block == null ? void 0 : block.props) == null ? void 0 : _a[GLOBAL_REF_KEY];
|
|
284
|
-
return typeof ref2 === "string" && ref2 ? ref2 : null;
|
|
285
|
-
}
|
|
286
213
|
const PageRenderer = defineComponent({
|
|
287
214
|
name: "PageRenderer",
|
|
288
215
|
props: {
|
|
@@ -298,17 +225,6 @@ const PageRenderer = defineComponent({
|
|
|
298
225
|
props.blocks.flatMap((block, i) => {
|
|
299
226
|
const definition = registry2[block.type];
|
|
300
227
|
if (!definition) return [];
|
|
301
|
-
const ref2 = globalRefOf(block);
|
|
302
|
-
if (ref2) {
|
|
303
|
-
return [h(GlobalBlockHost, {
|
|
304
|
-
key: `${block.type}-${i}`,
|
|
305
|
-
component: definition.component,
|
|
306
|
-
defaults: definition.schema.defaults,
|
|
307
|
-
blockProps: block.props,
|
|
308
|
-
globalRef: ref2,
|
|
309
|
-
blockType: block.type
|
|
310
|
-
})];
|
|
311
|
-
}
|
|
312
228
|
const merged = { ...definition.schema.defaults, ...block.props };
|
|
313
229
|
return [h(definition.component, { key: `${block.type}-${i}`, ...merged })];
|
|
314
230
|
})
|
|
@@ -806,7 +722,8 @@ class BloxInstance {
|
|
|
806
722
|
dataSource: meta.dataSource,
|
|
807
723
|
category: meta.category,
|
|
808
724
|
thumbnail: meta.thumbnail,
|
|
809
|
-
order: meta.order
|
|
725
|
+
order: meta.order,
|
|
726
|
+
global: meta.global
|
|
810
727
|
}
|
|
811
728
|
};
|
|
812
729
|
break;
|
|
@@ -834,7 +751,8 @@ class BloxInstance {
|
|
|
834
751
|
dataSource: meta.dataSource,
|
|
835
752
|
category: meta.category,
|
|
836
753
|
thumbnail: meta.thumbnail,
|
|
837
|
-
order: meta.order
|
|
754
|
+
order: meta.order,
|
|
755
|
+
global: meta.global
|
|
838
756
|
}
|
|
839
757
|
};
|
|
840
758
|
}
|
|
@@ -859,7 +777,7 @@ class BloxInstance {
|
|
|
859
777
|
}
|
|
860
778
|
router.addRoute({
|
|
861
779
|
path: "/_blox_preview",
|
|
862
|
-
component: () => import("./PreviewApp-
|
|
780
|
+
component: () => import("./PreviewApp-CNIVF6Xq.js"),
|
|
863
781
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
864
782
|
});
|
|
865
783
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1133,54 +1051,50 @@ function installContentFallback(router, supportedLocales, defaultLocale) {
|
|
|
1133
1051
|
});
|
|
1134
1052
|
}
|
|
1135
1053
|
export {
|
|
1136
|
-
|
|
1054
|
+
classifyLink as A,
|
|
1137
1055
|
BLOX_DATA_WINDOW_KEY as B,
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1056
|
+
configureApi as C,
|
|
1057
|
+
contentRoutes as D,
|
|
1058
|
+
defineContent as E,
|
|
1059
|
+
getContentRouteByCollection as F,
|
|
1060
|
+
getWebsiteId as G,
|
|
1061
|
+
getWebsiteIdSync as H,
|
|
1062
|
+
isAbsoluteExternal as I,
|
|
1063
|
+
isSpecialScheme as J,
|
|
1064
|
+
listItems as K,
|
|
1065
|
+
normalizeTo as L,
|
|
1066
|
+
provideContentItem as M,
|
|
1067
|
+
resolvePath as N,
|
|
1068
|
+
toInternalPath as O,
|
|
1151
1069
|
PageRenderer as P,
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
toInternalPath as T,
|
|
1156
|
-
useBloxEdit as U,
|
|
1157
|
-
useContentItem as V,
|
|
1158
|
-
useData as W,
|
|
1070
|
+
useBloxEdit as Q,
|
|
1071
|
+
useContentItem as R,
|
|
1072
|
+
useData as S,
|
|
1159
1073
|
_sfc_main$3 as _,
|
|
1160
1074
|
setActiveLocale as a,
|
|
1161
1075
|
collectBloxSeo as b,
|
|
1162
1076
|
collectBloxData as c,
|
|
1163
1077
|
createBlox as d,
|
|
1164
1078
|
BLOX_REGISTRY_KEY as e,
|
|
1165
|
-
|
|
1079
|
+
BLOX_LOCALE_STRATEGY_KEY as f,
|
|
1166
1080
|
generateContentRoutes as g,
|
|
1167
|
-
|
|
1081
|
+
useSeo as h,
|
|
1168
1082
|
installLocaleAwareResolve as i,
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1083
|
+
getRegistryData as j,
|
|
1084
|
+
getItemBySlug as k,
|
|
1085
|
+
getItemById as l,
|
|
1086
|
+
getContentRoute as m,
|
|
1173
1087
|
normalizeLink as n,
|
|
1174
|
-
|
|
1088
|
+
installContentFallback as o,
|
|
1175
1089
|
provideBloxData as p,
|
|
1176
|
-
|
|
1177
|
-
|
|
1090
|
+
installSmartLinks as q,
|
|
1091
|
+
BLOX_ADMIN_CONFIG_KEY as r,
|
|
1178
1092
|
setApiOrigin as s,
|
|
1179
|
-
|
|
1093
|
+
BLOX_CONFIG_KEY as t,
|
|
1180
1094
|
useLocale as u,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
_sfc_main
|
|
1095
|
+
BLOX_DATA_KEY as v,
|
|
1096
|
+
BloxInstance as w,
|
|
1097
|
+
_sfc_main$2 as x,
|
|
1098
|
+
_sfc_main$1 as y,
|
|
1099
|
+
_sfc_main as z
|
|
1186
1100
|
};
|
package/dist/schema.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export interface BlockSchema {
|
|
|
22
22
|
thumbnail?: string;
|
|
23
23
|
/** Sort order in the editor block picker. Lower values appear first. Defaults to 100. */
|
|
24
24
|
order?: number;
|
|
25
|
+
/** True for site-level global blocks (nav/footer). See {@link BlockMeta.global}. */
|
|
26
|
+
global?: boolean;
|
|
25
27
|
}
|
|
26
28
|
export interface BlockDefinition {
|
|
27
29
|
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,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAErE,MAAM,WAAW,WAAW;IAC3B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAA;IACzB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAErE,MAAM,WAAW,WAAW;IAC3B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAA;IACzB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oFAAoF;IACpF,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,WAAW,CAAA;CACnB;AAED,+EAA+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-BkTA1QZ6.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-wIuYNW6N.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,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-BkTA1QZ6.cjs");
|
|
26
26
|
const ssg_client = require("./client.cjs");
|
|
27
27
|
const pinia = require("pinia");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const routes = require("../routes-
|
|
29
|
+
const routes = require("../routes-0bOKkut4.cjs");
|
|
30
30
|
async function renderBloxSsgPage(options) {
|
|
31
31
|
const {
|
|
32
32
|
url,
|
package/dist/ssg/index.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ export type { PrerenderOptions, PrerenderResult, RenderContext, RenderResult } f
|
|
|
21
21
|
export { renderBloxSsgPage } from './render-resolved-page';
|
|
22
22
|
export type { BloxSsgRouterLike } from './render-resolved-page';
|
|
23
23
|
export { buildPageHead, buildSiteHead, generateNetlifyRedirects, generateRobotsTxt, generateSitemapXml, getSiteIconFlags } from './seo';
|
|
24
|
-
export type { RedirectEntry, SeoPageData
|
|
24
|
+
export type { RedirectEntry, SeoPageData } from './seo';
|
|
25
25
|
export { installBloxStateCache } from './state-cache';
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ssg/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACvE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACrG;;;;;;;;;;GAUG;AACH,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC5J,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACvI,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACvE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACrG;;;;;;;;;;GAUG;AACH,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC5J,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACvI,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as buildPageHead } from "../prerender-
|
|
2
|
-
import { c, d, f, g, e, h, i, p, a } from "../prerender-
|
|
1
|
+
import { b as buildPageHead } from "../prerender-wIuYNW6N.js";
|
|
2
|
+
import { c, d, f, g, e, h, i, p, a } from "../prerender-wIuYNW6N.js";
|
|
3
3
|
import { BLOX_STATE_WINDOW_KEY, BLOX_COLLECTIONS_WINDOW_KEY, BLOX_WEBSITE_ID_WINDOW_KEY } from "./client.mjs";
|
|
4
4
|
import { BLOX_DATA_WINDOW_KEY, BLOX_PAGE_SEO_WINDOW_KEY, getCollectionCache, getEmbeddedWebsiteId, installBloxStateCache, installCollectionCache } from "./client.mjs";
|
|
5
5
|
import { createPinia } from "pinia";
|
|
6
6
|
import { createSSRApp, h as h2, Suspense, markRaw } from "vue";
|
|
7
|
-
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setActiveLocale, c as collectBloxData, b as collectBloxSeo, p as provideBloxData, d as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-
|
|
7
|
+
import { B as BLOX_DATA_WINDOW_KEY2, s as setApiOrigin, a as setActiveLocale, c as collectBloxData, b as collectBloxSeo, p as provideBloxData, d as createBlox, g as generateContentRoutes, i as installLocaleAwareResolve } from "../routes-CHfoa2Mk.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
const {
|
|
10
10
|
url,
|
package/dist/ssg/prerender.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface PrerenderOptions {
|
|
|
10
10
|
excludePaths?: ExcludeRule | ExcludeRule[];
|
|
11
11
|
failFast?: boolean;
|
|
12
12
|
maxPages?: number;
|
|
13
|
+
/** How many pages to render concurrently (default 6). */
|
|
14
|
+
concurrency?: number;
|
|
13
15
|
mode?: 'dir' | 'file';
|
|
14
16
|
/** Website settings for SEO injection. */
|
|
15
17
|
website?: WebsiteRead | null;
|
|
@@ -35,6 +37,8 @@ export interface RenderResult {
|
|
|
35
37
|
head?: string;
|
|
36
38
|
htmlAttrs?: string;
|
|
37
39
|
state?: unknown;
|
|
40
|
+
/** Optional ISO last-modified for this page → sitemap <lastmod>. */
|
|
41
|
+
lastmod?: string;
|
|
38
42
|
}
|
|
39
43
|
export interface PrerenderResult {
|
|
40
44
|
rendered: string[];
|
|
@@ -57,6 +61,6 @@ export interface PrerenderResult {
|
|
|
57
61
|
* - Generates sitemap.xml, robots.txt, and _redirects post-render.
|
|
58
62
|
* - Strips hardcoded SEO tags from template and injects per-page equivalents.
|
|
59
63
|
*/
|
|
60
|
-
export declare function prerender({ root, clientOutDir, serverEntry, paths, crawl, excludePaths, failFast, maxPages, mode, website, websiteId, redirects, collections, }?: PrerenderOptions): Promise<PrerenderResult>;
|
|
64
|
+
export declare function prerender({ root, clientOutDir, serverEntry, paths, crawl, excludePaths, failFast, maxPages, concurrency, mode, website, websiteId, redirects, collections, }?: PrerenderOptions): Promise<PrerenderResult>;
|
|
61
65
|
export {};
|
|
62
66
|
//# sourceMappingURL=prerender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../src/ssg/prerender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAe1C,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAA;AAEhE,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,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AE,CAAC,CAAA;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,EAC/B,IAAoB,EACpB,YAA4B,EAC5B,WAA0C,EAC1C,KAAU,EACV,KAAY,EACZ,YAAiB,EACjB,QAAgB,EAChB,QAAe,EACf,WAAe,EACf,IAAY,EACZ,OAAc,EACd,SAAc,EACd,SAAc,EACd,WAAgB,GAChB,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAiKlD"}
|
package/dist/ssg/seo.d.ts
CHANGED
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
import { PageRead, WebsiteRead } from '../api/types';
|
|
1
|
+
import { PageRead, StructuredData, WebsiteRead } from '../api/types';
|
|
2
2
|
/** Resolved page data shape (subset of PageResolveRead). */
|
|
3
3
|
export interface SeoPageData {
|
|
4
4
|
page: PageRead;
|
|
5
5
|
alternates?: Record<string, string>;
|
|
6
6
|
contexts?: Record<string, Record<string, unknown> | null>;
|
|
7
7
|
}
|
|
8
|
-
/** Website meta bag (freeform JSON stored on WebsiteRead.meta). */
|
|
9
|
-
export interface WebsiteMeta {
|
|
10
|
-
default_meta_title?: string;
|
|
11
|
-
default_meta_description?: string;
|
|
12
|
-
default_og_image?: string;
|
|
13
|
-
webclip?: string;
|
|
14
|
-
og_site_name?: string;
|
|
15
|
-
og_description?: string;
|
|
16
|
-
og_type?: string;
|
|
17
|
-
twitter_card?: string;
|
|
18
|
-
twitter_site?: string;
|
|
19
|
-
canonical_base_url?: string;
|
|
20
|
-
noindex?: boolean;
|
|
21
|
-
verification_google?: string;
|
|
22
|
-
verification_bing?: string;
|
|
23
|
-
/**
|
|
24
|
-
* JSON-LD Organization/structured data. Site-wide default.
|
|
25
|
-
* Per-locale overrides can be provided as `structured_data_org_<locale>`
|
|
26
|
-
* (e.g. `structured_data_org_es`) and take precedence for that locale.
|
|
27
|
-
*/
|
|
28
|
-
structured_data_org?: unknown;
|
|
29
|
-
[key: string]: unknown;
|
|
30
|
-
}
|
|
31
8
|
/**
|
|
32
9
|
* Resolve the JSON-LD structured data for a given locale.
|
|
33
|
-
* Prefers `
|
|
34
|
-
* `
|
|
10
|
+
* Prefers `structured_data.org_by_locale[locale]` then falls back to the
|
|
11
|
+
* site-wide `structured_data.org`. Returns a serialized `<script>` tag or ''.
|
|
35
12
|
*/
|
|
36
|
-
export declare function buildStructuredData(
|
|
13
|
+
export declare function buildStructuredData(sd: StructuredData | null | undefined, locale?: string): string;
|
|
37
14
|
export interface RedirectEntry {
|
|
38
15
|
from_path: string;
|
|
39
16
|
to_path: string;
|
|
@@ -65,6 +42,13 @@ export declare function buildPageHead(options: {
|
|
|
65
42
|
image?: string;
|
|
66
43
|
alternates?: Record<string, string>;
|
|
67
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Absolute origin resolved at build time (deploy URL / configured origin),
|
|
47
|
+
* used as a fallback base for canonical/og:url/hreflang when the site has no
|
|
48
|
+
* `seo.canonical_base_url` and no `domain`. Hreflang requires absolute URLs,
|
|
49
|
+
* so without *some* origin multi-locale sites emit no hreflang (§G.2).
|
|
50
|
+
*/
|
|
51
|
+
buildOrigin?: string;
|
|
68
52
|
}): string;
|
|
69
53
|
/**
|
|
70
54
|
* Build site-wide `<head>` tags: verification, structured data, analytics, favicon.
|
|
@@ -76,6 +60,8 @@ export declare function generateSitemapXml(options: {
|
|
|
76
60
|
canonicalBase: string;
|
|
77
61
|
defaultChangefreq?: string;
|
|
78
62
|
defaultPriority?: string;
|
|
63
|
+
/** Per-path last-modified ISO timestamps (path → ISO). Emits <lastmod>. */
|
|
64
|
+
lastmod?: Record<string, string>;
|
|
79
65
|
}): string;
|
|
80
66
|
export declare function generateRobotsTxt(options: {
|
|
81
67
|
robotsTxt?: string | null;
|
package/dist/ssg/seo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.d.ts","sourceRo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ionKey<BloxConfig>;
|
|
10
10
|
export declare const BLOX_LOCALE_STRATEGY_KEY: InjectionKey<LocaleStrategy>;
|
|
11
|
-
/**
|
|
12
|
-
* Resolves the shared content of a *dynamic* global block by its reference id
|
|
13
|
-
* (the `props._globalRef` written by the page designer's "Duplicate as global").
|
|
14
|
-
*
|
|
15
|
-
* Returns the saved props object, or `null` when nothing is stored. Typically
|
|
16
|
-
* backed by the project's datastore-based global-block registry. Injected by the
|
|
17
|
-
* host app so `@bagelink/blox` stays storage-agnostic; when not provided,
|
|
18
|
-
* reference blocks fall back to their inline `props`.
|
|
19
|
-
*/
|
|
20
|
-
export type GlobalBlockResolver = (ref: string) => Promise<Record<string, unknown> | null>;
|
|
21
|
-
export declare const BLOX_GLOBAL_RESOLVER_KEY: InjectionKey<GlobalBlockResolver>;
|
|
22
11
|
/**
|
|
23
12
|
* Opt-in "edit this page" feature for marketing sites.
|
|
24
13
|
*
|
package/dist/symbols.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../src/symbols.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAClD,CAAA;AAE1B,MAAM,WAAW,UAAU;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAAyB,CAAA;AAE9E,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,cAAc,CAAkC,CAAA;AAEpG
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","source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