@bagelink/blox 1.15.271 → 1.15.273
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/CmsPageView.vue.d.ts.map +1 -1
- package/dist/{PreviewApp-9HSW0bCC.cjs → PreviewApp-1tOhVrq-.cjs} +1 -1
- package/dist/{PreviewApp-efVmQL4w.js → PreviewApp-DadFCvv9.js} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-CnKU05t1.cjs → PreviewApp.vue_vue_type_style_index_0_lang-CpZt3b1X.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DuHZmbcn.js → PreviewApp.vue_vue_type_style_index_0_lang-DIKjhzD_.js} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{prerender-DnqZAE4x.js → prerender-1fZ-6d-3.js} +3 -3
- package/dist/{prerender-jcemLPiq.cjs → prerender-52IAxpqw.cjs} +3 -3
- package/dist/{routes-CfwE_uYV.cjs → routes-B4RYeiGa.cjs} +137 -13
- package/dist/{routes-D5aVOcFs.js → routes-DE0OIzJr.js} +139 -15
- 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.mjs +3 -3
- package/dist/ssg/seo.d.ts.map +1 -1
- package/dist/vite-plugin.cjs +2 -2
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.mjs +2 -2
- package/package.json +1 -1
|
@@ -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":";AAgxBA,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-CpZt3b1X.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import { e as BLOX_REGISTRY_KEY, u as useLocale } from "./routes-
|
|
2
|
+
import { e as BLOX_REGISTRY_KEY, u as useLocale } from "./routes-DE0OIzJr.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const routes = require("./routes-
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const routes = require("./routes-B4RYeiGa.cjs");
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-CpZt3b1X.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 { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as useSeo, j as getRegistryData, k as getItemBySlug, l as getItemById, m as getContentRoute, p as provideBloxData, d as createBlox, g as generateContentRoutes, o as installContentFallback, i as installLocaleAwareResolve, a as setActiveLocale, q as installSmartLinks, r as consumePendingLocaleSwitch } from "./routes-
|
|
2
|
-
import { _, t, v, w, B, x, y, z, A, C, P, D, E, c, b, F, G, H, I, J, K, L, M, N, O, Q, R, S, s, T, U, V, W } from "./routes-
|
|
3
|
-
import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, h as useSeo, j as getRegistryData, k as getItemBySlug, l as getItemById, m as getContentRoute, p as provideBloxData, d as createBlox, g as generateContentRoutes, o as installContentFallback, i as installLocaleAwareResolve, a as setActiveLocale, q as installSmartLinks, r as consumePendingLocaleSwitch } from "./routes-DE0OIzJr.js";
|
|
2
|
+
import { _, t, v, w, B, x, y, z, A, C, P, D, E, c, b, F, G, H, I, J, K, L, M, N, O, Q, R, S, s, T, U, V, W } from "./routes-DE0OIzJr.js";
|
|
3
|
+
import { _ as _2, P as P2, s as s2, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-DIKjhzD_.js";
|
|
4
4
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, createApp, h, Suspense, markRaw } from "vue";
|
|
5
5
|
import { useRouter, useRoute } from "vue-router";
|
|
6
6
|
import { createPinia } from "pinia";
|
|
@@ -176,7 +176,7 @@ function buildPageHead(options) {
|
|
|
176
176
|
const page = resolvedData == null ? void 0 : resolvedData.page;
|
|
177
177
|
const ctx = extractPrimaryContext(resolvedData == null ? void 0 : resolvedData.contexts);
|
|
178
178
|
const siteName = seo.site_name || void 0;
|
|
179
|
-
const title = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) ||
|
|
179
|
+
const title = (override == null ? void 0 : override.title) || ctx.title || (page == null ? void 0 : page.meta_title) || ((page == null ? void 0 : page.title) && siteName ? `${page.title} · ${siteName}` : null) || (page == null ? void 0 : page.title) || seo.default_meta_title;
|
|
180
180
|
if (title) {
|
|
181
181
|
const bare = (override == null ? void 0 : override.title) || ctx.title;
|
|
182
182
|
const fullTitle = bare && siteName && !bare.includes(siteName) ? `${esc(bare)} · ${esc(siteName)}` : esc(title);
|
|
@@ -193,7 +193,7 @@ function buildPageHead(options) {
|
|
|
193
193
|
} else if (canonicalBase) {
|
|
194
194
|
parts.push(`<link rel="canonical" href="${esc(canonicalBase + url)}">`);
|
|
195
195
|
}
|
|
196
|
-
const ogTitle = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) ||
|
|
196
|
+
const ogTitle = (override == null ? void 0 : override.title) || ctx.title || (page == null ? void 0 : page.meta_title) || (page == null ? void 0 : page.title) || siteName || seo.default_meta_title;
|
|
197
197
|
const ogDesc = (override == null ? void 0 : override.description) || (page == null ? void 0 : page.meta_description) || ctx.description || seo.default_meta_description;
|
|
198
198
|
const ogImage = absUrl((override == null ? void 0 : override.image) || (page == null ? void 0 : page.og_image) || ctx.image || seo.default_og_image);
|
|
199
199
|
const isDetailPage = !!((resolvedData == null ? void 0 : resolvedData.contexts) && Object.values(resolvedData.contexts).some((c) => c != null));
|
|
@@ -334,7 +334,7 @@ function extractPrimaryContext(contexts) {
|
|
|
334
334
|
return typeof v === "string" && v.trim() ? v.trim() : null;
|
|
335
335
|
};
|
|
336
336
|
return {
|
|
337
|
-
title: str2("meta_title") || str2("title"),
|
|
337
|
+
title: str2("meta_title") || str2("metaTitle") || str2("title") || str2("name") || str2("productName") || str2("displayName"),
|
|
338
338
|
description: str2("meta_description") || str2("excerpt") || str2("description") || str2("blurb") || str2("summary"),
|
|
339
339
|
image: str2("og_image") || str2("cover_image_url") || str2("image_url") || str2("image")
|
|
340
340
|
};
|
|
@@ -199,7 +199,7 @@ function buildPageHead(options) {
|
|
|
199
199
|
const page = resolvedData == null ? void 0 : resolvedData.page;
|
|
200
200
|
const ctx = extractPrimaryContext(resolvedData == null ? void 0 : resolvedData.contexts);
|
|
201
201
|
const siteName = seo.site_name || void 0;
|
|
202
|
-
const title = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) ||
|
|
202
|
+
const title = (override == null ? void 0 : override.title) || ctx.title || (page == null ? void 0 : page.meta_title) || ((page == null ? void 0 : page.title) && siteName ? `${page.title} · ${siteName}` : null) || (page == null ? void 0 : page.title) || seo.default_meta_title;
|
|
203
203
|
if (title) {
|
|
204
204
|
const bare = (override == null ? void 0 : override.title) || ctx.title;
|
|
205
205
|
const fullTitle = bare && siteName && !bare.includes(siteName) ? `${esc(bare)} · ${esc(siteName)}` : esc(title);
|
|
@@ -216,7 +216,7 @@ function buildPageHead(options) {
|
|
|
216
216
|
} else if (canonicalBase) {
|
|
217
217
|
parts.push(`<link rel="canonical" href="${esc(canonicalBase + url)}">`);
|
|
218
218
|
}
|
|
219
|
-
const ogTitle = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) ||
|
|
219
|
+
const ogTitle = (override == null ? void 0 : override.title) || ctx.title || (page == null ? void 0 : page.meta_title) || (page == null ? void 0 : page.title) || siteName || seo.default_meta_title;
|
|
220
220
|
const ogDesc = (override == null ? void 0 : override.description) || (page == null ? void 0 : page.meta_description) || ctx.description || seo.default_meta_description;
|
|
221
221
|
const ogImage = absUrl((override == null ? void 0 : override.image) || (page == null ? void 0 : page.og_image) || ctx.image || seo.default_og_image);
|
|
222
222
|
const isDetailPage = !!((resolvedData == null ? void 0 : resolvedData.contexts) && Object.values(resolvedData.contexts).some((c) => c != null));
|
|
@@ -357,7 +357,7 @@ function extractPrimaryContext(contexts) {
|
|
|
357
357
|
return typeof v === "string" && v.trim() ? v.trim() : null;
|
|
358
358
|
};
|
|
359
359
|
return {
|
|
360
|
-
title: str2("meta_title") || str2("title"),
|
|
360
|
+
title: str2("meta_title") || str2("metaTitle") || str2("title") || str2("name") || str2("productName") || str2("displayName"),
|
|
361
361
|
description: str2("meta_description") || str2("excerpt") || str2("description") || str2("blurb") || str2("summary"),
|
|
362
362
|
image: str2("og_image") || str2("cover_image_url") || str2("image_url") || str2("image")
|
|
363
363
|
};
|
|
@@ -278,17 +278,26 @@ const PageRenderer = vue.defineComponent({
|
|
|
278
278
|
});
|
|
279
279
|
const _hoisted_1$1 = {
|
|
280
280
|
key: 0,
|
|
281
|
-
class: "blox-loading
|
|
281
|
+
class: "blox-loading"
|
|
282
282
|
};
|
|
283
|
-
const _hoisted_2$1 = {
|
|
283
|
+
const _hoisted_2$1 = { class: "w1100px px-1 py-1" };
|
|
284
|
+
const _hoisted_3$1 = { class: "flex space-between pb-1" };
|
|
285
|
+
const _hoisted_4$1 = { class: "flex gap-1" };
|
|
286
|
+
const _hoisted_5 = { class: "grid grid-wrap-2 gap-2 py-2" };
|
|
287
|
+
const _hoisted_6 = { class: "py-1" };
|
|
288
|
+
const _hoisted_7 = { class: "grid grid-wrap-4 gap-col-1 py-2" };
|
|
289
|
+
const _hoisted_8 = { class: "grid grid-wrap-2 grid-span-3 m_grid-span-4 gap-2" };
|
|
290
|
+
const _hoisted_9 = { class: "grid grid-wrap-4 gap-2 py-2" };
|
|
291
|
+
const _hoisted_10 = { class: "grid-span-3" };
|
|
292
|
+
const _hoisted_11 = {
|
|
284
293
|
key: 1,
|
|
285
294
|
class: "blox-not-found"
|
|
286
295
|
};
|
|
287
|
-
const
|
|
296
|
+
const _hoisted_12 = {
|
|
288
297
|
key: 2,
|
|
289
298
|
class: "blox-error color-red"
|
|
290
299
|
};
|
|
291
|
-
const
|
|
300
|
+
const _hoisted_13 = {
|
|
292
301
|
key: 0,
|
|
293
302
|
class: "blox-nav-progress"
|
|
294
303
|
};
|
|
@@ -326,14 +335,30 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
326
335
|
contexts.value = entry.contexts ?? {};
|
|
327
336
|
currentPageId.value = ((_c = entry.page) == null ? void 0 : _c.id) ?? null;
|
|
328
337
|
setAlternates(navigableAlternates(entry.alternates, path));
|
|
338
|
+
updateDocumentTitle(entry);
|
|
329
339
|
return true;
|
|
330
340
|
}
|
|
341
|
+
function contextTitle(contexts2) {
|
|
342
|
+
if (!contexts2) return null;
|
|
343
|
+
const preferredKeys = ["$page", "$post", "$item", "$article", "$product", "$author"];
|
|
344
|
+
const orderedContexts = [
|
|
345
|
+
...preferredKeys.map((key) => contexts2[key]),
|
|
346
|
+
...Object.entries(contexts2).filter(([key]) => !preferredKeys.includes(key)).map(([, context]) => context)
|
|
347
|
+
];
|
|
348
|
+
const titleFields = ["meta_title", "metaTitle", "title", "name", "productName", "displayName"];
|
|
349
|
+
for (const context of orderedContexts) {
|
|
350
|
+
if (!context) continue;
|
|
351
|
+
for (const field of titleFields) {
|
|
352
|
+
const value = context[field];
|
|
353
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
331
358
|
function updateDocumentTitle(resolved) {
|
|
359
|
+
var _a, _b;
|
|
332
360
|
if (typeof document === "undefined") return;
|
|
333
|
-
const
|
|
334
|
-
const ctx = resolved.contexts ? Object.values(resolved.contexts).find((c) => c != null) : null;
|
|
335
|
-
const ctxTitle = ctx && typeof ctx.title === "string" ? ctx.title : null;
|
|
336
|
-
const title = page.meta_title || ctxTitle || page.title;
|
|
361
|
+
const title = contextTitle(resolved.contexts) || ((_a = resolved.page) == null ? void 0 : _a.meta_title) || ((_b = resolved.page) == null ? void 0 : _b.title);
|
|
337
362
|
if (title) document.title = title;
|
|
338
363
|
}
|
|
339
364
|
const initialSlug = (() => {
|
|
@@ -393,8 +418,107 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
393
418
|
const _component_RouterLink = vue.resolveComponent("RouterLink");
|
|
394
419
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
395
420
|
initialLoading.value && blocks.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
396
|
-
vue.
|
|
397
|
-
|
|
421
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
422
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
423
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
424
|
+
width: "180px",
|
|
425
|
+
height: "42px"
|
|
426
|
+
}),
|
|
427
|
+
vue.createElementVNode("div", _hoisted_4$1, [
|
|
428
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(5, (item) => {
|
|
429
|
+
return vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
430
|
+
key: item,
|
|
431
|
+
width: "90px",
|
|
432
|
+
height: "20px"
|
|
433
|
+
});
|
|
434
|
+
}), 64))
|
|
435
|
+
])
|
|
436
|
+
]),
|
|
437
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
438
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
439
|
+
width: "100%",
|
|
440
|
+
height: "260px"
|
|
441
|
+
}),
|
|
442
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
443
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
444
|
+
width: "120px",
|
|
445
|
+
height: "16px",
|
|
446
|
+
class: "mb-1"
|
|
447
|
+
}),
|
|
448
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
449
|
+
width: "92%",
|
|
450
|
+
height: "34px"
|
|
451
|
+
}),
|
|
452
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
453
|
+
width: "72%",
|
|
454
|
+
height: "34px",
|
|
455
|
+
class: "mb-1"
|
|
456
|
+
}),
|
|
457
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
458
|
+
width: "190px",
|
|
459
|
+
height: "16px"
|
|
460
|
+
})
|
|
461
|
+
])
|
|
462
|
+
]),
|
|
463
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
464
|
+
vue.createElementVNode("div", null, [
|
|
465
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
466
|
+
width: "150px",
|
|
467
|
+
height: "28px",
|
|
468
|
+
class: "mb-1"
|
|
469
|
+
}),
|
|
470
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(3, (tab) => {
|
|
471
|
+
return vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
472
|
+
key: tab,
|
|
473
|
+
width: "90px",
|
|
474
|
+
height: "20px",
|
|
475
|
+
class: "mb-1"
|
|
476
|
+
});
|
|
477
|
+
}), 64))
|
|
478
|
+
]),
|
|
479
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
480
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(2, (card) => {
|
|
481
|
+
return vue.createElementVNode("div", { key: card }, [
|
|
482
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
483
|
+
width: "100%",
|
|
484
|
+
height: "210px"
|
|
485
|
+
}),
|
|
486
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
487
|
+
width: "88%",
|
|
488
|
+
height: "24px",
|
|
489
|
+
class: "mt-05"
|
|
490
|
+
}),
|
|
491
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
492
|
+
width: "52%",
|
|
493
|
+
height: "15px"
|
|
494
|
+
})
|
|
495
|
+
]);
|
|
496
|
+
}), 64))
|
|
497
|
+
])
|
|
498
|
+
]),
|
|
499
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
500
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
501
|
+
width: "100%",
|
|
502
|
+
height: "320px"
|
|
503
|
+
}),
|
|
504
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
505
|
+
vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
506
|
+
width: "220px",
|
|
507
|
+
height: "30px",
|
|
508
|
+
class: "mb-1"
|
|
509
|
+
}),
|
|
510
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(5, (row) => {
|
|
511
|
+
return vue.createVNode(vue.unref(vue$1.Skeleton), {
|
|
512
|
+
key: row,
|
|
513
|
+
width: "100%",
|
|
514
|
+
height: "58px",
|
|
515
|
+
class: "mb-05"
|
|
516
|
+
});
|
|
517
|
+
}), 64))
|
|
518
|
+
])
|
|
519
|
+
])
|
|
520
|
+
])
|
|
521
|
+
])) : notFound.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
398
522
|
_cache[0] || (_cache[0] = vue.createElementVNode("h2", null, "404", -1)),
|
|
399
523
|
vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(locale2) === "he" ? "הדף לא נמצא" : "Page not found"), 1),
|
|
400
524
|
vue.createVNode(_component_RouterLink, { to: "/" }, {
|
|
@@ -403,8 +527,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
403
527
|
]),
|
|
404
528
|
_: 1
|
|
405
529
|
})
|
|
406
|
-
])) : error.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
407
|
-
navigating.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
530
|
+
])) : error.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, vue.toDisplayString(error.value), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
531
|
+
navigating.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13)) : vue.createCommentVNode("", true),
|
|
408
532
|
vue.createVNode(vue.unref(PageRenderer), { blocks: blocks.value }, null, 8, ["blocks"])
|
|
409
533
|
], 64)),
|
|
410
534
|
vue.unref(adminConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$3, {
|
|
@@ -834,7 +958,7 @@ class BloxInstance {
|
|
|
834
958
|
}
|
|
835
959
|
router.addRoute({
|
|
836
960
|
path: "/_blox_preview",
|
|
837
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
961
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-1tOhVrq-.cjs")),
|
|
838
962
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
839
963
|
});
|
|
840
964
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
|
@@ -1,10 +1,10 @@
|
|
|
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, h, provide, watch, resolveComponent, createVNode, toDisplayString, withCtx, createTextVNode,
|
|
4
|
+
import { inject, computed, ref, defineComponent, onMounted, unref, openBlock, createBlock, Teleport, createElementBlock, createElementVNode, createCommentVNode, h, provide, watch, resolveComponent, createVNode, Fragment, renderList, toDisplayString, withCtx, createTextVNode, 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
|
-
import { getI18n,
|
|
7
|
+
import { getI18n, Skeleton } from "@bagelink/vue";
|
|
8
8
|
let BASE = "/api";
|
|
9
9
|
let _websiteName = "";
|
|
10
10
|
let _store = "";
|
|
@@ -277,17 +277,26 @@ const PageRenderer = defineComponent({
|
|
|
277
277
|
});
|
|
278
278
|
const _hoisted_1$1 = {
|
|
279
279
|
key: 0,
|
|
280
|
-
class: "blox-loading
|
|
280
|
+
class: "blox-loading"
|
|
281
281
|
};
|
|
282
|
-
const _hoisted_2$1 = {
|
|
282
|
+
const _hoisted_2$1 = { class: "w1100px px-1 py-1" };
|
|
283
|
+
const _hoisted_3$1 = { class: "flex space-between pb-1" };
|
|
284
|
+
const _hoisted_4$1 = { class: "flex gap-1" };
|
|
285
|
+
const _hoisted_5 = { class: "grid grid-wrap-2 gap-2 py-2" };
|
|
286
|
+
const _hoisted_6 = { class: "py-1" };
|
|
287
|
+
const _hoisted_7 = { class: "grid grid-wrap-4 gap-col-1 py-2" };
|
|
288
|
+
const _hoisted_8 = { class: "grid grid-wrap-2 grid-span-3 m_grid-span-4 gap-2" };
|
|
289
|
+
const _hoisted_9 = { class: "grid grid-wrap-4 gap-2 py-2" };
|
|
290
|
+
const _hoisted_10 = { class: "grid-span-3" };
|
|
291
|
+
const _hoisted_11 = {
|
|
283
292
|
key: 1,
|
|
284
293
|
class: "blox-not-found"
|
|
285
294
|
};
|
|
286
|
-
const
|
|
295
|
+
const _hoisted_12 = {
|
|
287
296
|
key: 2,
|
|
288
297
|
class: "blox-error color-red"
|
|
289
298
|
};
|
|
290
|
-
const
|
|
299
|
+
const _hoisted_13 = {
|
|
291
300
|
key: 0,
|
|
292
301
|
class: "blox-nav-progress"
|
|
293
302
|
};
|
|
@@ -325,14 +334,30 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
325
334
|
contexts.value = entry.contexts ?? {};
|
|
326
335
|
currentPageId.value = ((_c = entry.page) == null ? void 0 : _c.id) ?? null;
|
|
327
336
|
setAlternates(navigableAlternates(entry.alternates, path));
|
|
337
|
+
updateDocumentTitle(entry);
|
|
328
338
|
return true;
|
|
329
339
|
}
|
|
340
|
+
function contextTitle(contexts2) {
|
|
341
|
+
if (!contexts2) return null;
|
|
342
|
+
const preferredKeys = ["$page", "$post", "$item", "$article", "$product", "$author"];
|
|
343
|
+
const orderedContexts = [
|
|
344
|
+
...preferredKeys.map((key) => contexts2[key]),
|
|
345
|
+
...Object.entries(contexts2).filter(([key]) => !preferredKeys.includes(key)).map(([, context]) => context)
|
|
346
|
+
];
|
|
347
|
+
const titleFields = ["meta_title", "metaTitle", "title", "name", "productName", "displayName"];
|
|
348
|
+
for (const context of orderedContexts) {
|
|
349
|
+
if (!context) continue;
|
|
350
|
+
for (const field of titleFields) {
|
|
351
|
+
const value = context[field];
|
|
352
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
330
357
|
function updateDocumentTitle(resolved) {
|
|
358
|
+
var _a, _b;
|
|
331
359
|
if (typeof document === "undefined") return;
|
|
332
|
-
const
|
|
333
|
-
const ctx = resolved.contexts ? Object.values(resolved.contexts).find((c) => c != null) : null;
|
|
334
|
-
const ctxTitle = ctx && typeof ctx.title === "string" ? ctx.title : null;
|
|
335
|
-
const title = page.meta_title || ctxTitle || page.title;
|
|
360
|
+
const title = contextTitle(resolved.contexts) || ((_a = resolved.page) == null ? void 0 : _a.meta_title) || ((_b = resolved.page) == null ? void 0 : _b.title);
|
|
336
361
|
if (title) document.title = title;
|
|
337
362
|
}
|
|
338
363
|
const initialSlug = (() => {
|
|
@@ -392,8 +417,107 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
392
417
|
const _component_RouterLink = resolveComponent("RouterLink");
|
|
393
418
|
return openBlock(), createElementBlock("div", null, [
|
|
394
419
|
initialLoading.value && blocks.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
395
|
-
|
|
396
|
-
|
|
420
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
421
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
422
|
+
createVNode(unref(Skeleton), {
|
|
423
|
+
width: "180px",
|
|
424
|
+
height: "42px"
|
|
425
|
+
}),
|
|
426
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
427
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(5, (item) => {
|
|
428
|
+
return createVNode(unref(Skeleton), {
|
|
429
|
+
key: item,
|
|
430
|
+
width: "90px",
|
|
431
|
+
height: "20px"
|
|
432
|
+
});
|
|
433
|
+
}), 64))
|
|
434
|
+
])
|
|
435
|
+
]),
|
|
436
|
+
createElementVNode("div", _hoisted_5, [
|
|
437
|
+
createVNode(unref(Skeleton), {
|
|
438
|
+
width: "100%",
|
|
439
|
+
height: "260px"
|
|
440
|
+
}),
|
|
441
|
+
createElementVNode("div", _hoisted_6, [
|
|
442
|
+
createVNode(unref(Skeleton), {
|
|
443
|
+
width: "120px",
|
|
444
|
+
height: "16px",
|
|
445
|
+
class: "mb-1"
|
|
446
|
+
}),
|
|
447
|
+
createVNode(unref(Skeleton), {
|
|
448
|
+
width: "92%",
|
|
449
|
+
height: "34px"
|
|
450
|
+
}),
|
|
451
|
+
createVNode(unref(Skeleton), {
|
|
452
|
+
width: "72%",
|
|
453
|
+
height: "34px",
|
|
454
|
+
class: "mb-1"
|
|
455
|
+
}),
|
|
456
|
+
createVNode(unref(Skeleton), {
|
|
457
|
+
width: "190px",
|
|
458
|
+
height: "16px"
|
|
459
|
+
})
|
|
460
|
+
])
|
|
461
|
+
]),
|
|
462
|
+
createElementVNode("div", _hoisted_7, [
|
|
463
|
+
createElementVNode("div", null, [
|
|
464
|
+
createVNode(unref(Skeleton), {
|
|
465
|
+
width: "150px",
|
|
466
|
+
height: "28px",
|
|
467
|
+
class: "mb-1"
|
|
468
|
+
}),
|
|
469
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(3, (tab) => {
|
|
470
|
+
return createVNode(unref(Skeleton), {
|
|
471
|
+
key: tab,
|
|
472
|
+
width: "90px",
|
|
473
|
+
height: "20px",
|
|
474
|
+
class: "mb-1"
|
|
475
|
+
});
|
|
476
|
+
}), 64))
|
|
477
|
+
]),
|
|
478
|
+
createElementVNode("div", _hoisted_8, [
|
|
479
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(2, (card) => {
|
|
480
|
+
return createElementVNode("div", { key: card }, [
|
|
481
|
+
createVNode(unref(Skeleton), {
|
|
482
|
+
width: "100%",
|
|
483
|
+
height: "210px"
|
|
484
|
+
}),
|
|
485
|
+
createVNode(unref(Skeleton), {
|
|
486
|
+
width: "88%",
|
|
487
|
+
height: "24px",
|
|
488
|
+
class: "mt-05"
|
|
489
|
+
}),
|
|
490
|
+
createVNode(unref(Skeleton), {
|
|
491
|
+
width: "52%",
|
|
492
|
+
height: "15px"
|
|
493
|
+
})
|
|
494
|
+
]);
|
|
495
|
+
}), 64))
|
|
496
|
+
])
|
|
497
|
+
]),
|
|
498
|
+
createElementVNode("div", _hoisted_9, [
|
|
499
|
+
createVNode(unref(Skeleton), {
|
|
500
|
+
width: "100%",
|
|
501
|
+
height: "320px"
|
|
502
|
+
}),
|
|
503
|
+
createElementVNode("div", _hoisted_10, [
|
|
504
|
+
createVNode(unref(Skeleton), {
|
|
505
|
+
width: "220px",
|
|
506
|
+
height: "30px",
|
|
507
|
+
class: "mb-1"
|
|
508
|
+
}),
|
|
509
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(5, (row) => {
|
|
510
|
+
return createVNode(unref(Skeleton), {
|
|
511
|
+
key: row,
|
|
512
|
+
width: "100%",
|
|
513
|
+
height: "58px",
|
|
514
|
+
class: "mb-05"
|
|
515
|
+
});
|
|
516
|
+
}), 64))
|
|
517
|
+
])
|
|
518
|
+
])
|
|
519
|
+
])
|
|
520
|
+
])) : notFound.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
397
521
|
_cache[0] || (_cache[0] = createElementVNode("h2", null, "404", -1)),
|
|
398
522
|
createElementVNode("p", null, toDisplayString(unref(locale2) === "he" ? "הדף לא נמצא" : "Page not found"), 1),
|
|
399
523
|
createVNode(_component_RouterLink, { to: "/" }, {
|
|
@@ -402,8 +526,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
402
526
|
]),
|
|
403
527
|
_: 1
|
|
404
528
|
})
|
|
405
|
-
])) : error.value ? (openBlock(), createElementBlock("div",
|
|
406
|
-
navigating.value ? (openBlock(), createElementBlock("div",
|
|
529
|
+
])) : error.value ? (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(error.value), 1)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
530
|
+
navigating.value ? (openBlock(), createElementBlock("div", _hoisted_13)) : createCommentVNode("", true),
|
|
407
531
|
createVNode(unref(PageRenderer), { blocks: blocks.value }, null, 8, ["blocks"])
|
|
408
532
|
], 64)),
|
|
409
533
|
unref(adminConfig) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
@@ -833,7 +957,7 @@ class BloxInstance {
|
|
|
833
957
|
}
|
|
834
958
|
router.addRoute({
|
|
835
959
|
path: "/_blox_preview",
|
|
836
|
-
component: () => import("./PreviewApp-
|
|
960
|
+
component: () => import("./PreviewApp-DadFCvv9.js"),
|
|
837
961
|
beforeEnter: () => window.parent !== window ? true : "/"
|
|
838
962
|
});
|
|
839
963
|
router.addRoute({ path: "/:pathMatch(.*)*", component: _sfc_main$2 });
|
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-52IAxpqw.cjs");
|
|
5
5
|
function installFetchTimeout() {
|
|
6
6
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
7
7
|
const original = globalThis.fetch;
|
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-1fZ-6d-3.js";
|
|
4
4
|
function installFetchTimeout() {
|
|
5
5
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
6
6
|
const original = globalThis.fetch;
|
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-52IAxpqw.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-B4RYeiGa.cjs");
|
|
30
30
|
async function renderBloxSsgPage(options) {
|
|
31
31
|
var _a, _b, _c;
|
|
32
32
|
const {
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText } from "../prerender-
|
|
2
|
-
import { g, h, f, i, j, k, l, m, n, o, p, a } from "../prerender-
|
|
1
|
+
import { b as buildPageHead, c as primaryContextEntry, d as buildJsonLd, e as extractPageText } from "../prerender-1fZ-6d-3.js";
|
|
2
|
+
import { g, h, f, i, j, k, l, m, n, o, p, a } from "../prerender-1fZ-6d-3.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-DE0OIzJr.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c;
|
|
10
10
|
const {
|
package/dist/ssg/seo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/ssg/seo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAMzE,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAWlG;AAED,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACnB;AAMD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,WAAW,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MA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AAA;CACnB,CAMA;AAMD,UAAU,gBAAgB;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,GAClE,gBAAgB,CAoBlB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,GAClE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,IAAI,CAMtD"}
|
package/dist/vite-plugin.cjs
CHANGED
|
@@ -265,7 +265,7 @@ function bloxPlugin(options = {}) {
|
|
|
265
265
|
const blockName = nameMatch[1];
|
|
266
266
|
const exportName = blockName.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
267
267
|
remaining = remaining.slice(0, callStart) + remaining.slice(i);
|
|
268
|
-
const scannable = callExpr.replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
268
|
+
const scannable = callExpr.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "").replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
269
269
|
const identifiers = /* @__PURE__ */ new Set();
|
|
270
270
|
const identRe = /\b([a-z_$][\w$]*)\b/gi;
|
|
271
271
|
let identMatch;
|
|
@@ -283,7 +283,7 @@ function bloxPlugin(options = {}) {
|
|
|
283
283
|
const declaredIdents = /* @__PURE__ */ new Set();
|
|
284
284
|
const queue = [...identifiers].filter((id2) => id2 !== "defineBlock");
|
|
285
285
|
const refsIn = (src) => {
|
|
286
|
-
const scan = src.replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
286
|
+
const scan = src.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "").replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
287
287
|
const out = [];
|
|
288
288
|
let m;
|
|
289
289
|
const re = /\b([a-z_$][\w$]*)\b/gi;
|
|
@@ -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;IACzB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,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;IACzB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,EAAE,CAyepE"}
|
package/dist/vite-plugin.mjs
CHANGED
|
@@ -241,7 +241,7 @@ function bloxPlugin(options = {}) {
|
|
|
241
241
|
const blockName = nameMatch[1];
|
|
242
242
|
const exportName = blockName.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
243
243
|
remaining = remaining.slice(0, callStart) + remaining.slice(i);
|
|
244
|
-
const scannable = callExpr.replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
244
|
+
const scannable = callExpr.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "").replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
245
245
|
const identifiers = /* @__PURE__ */ new Set();
|
|
246
246
|
const identRe = /\b([a-z_$][\w$]*)\b/gi;
|
|
247
247
|
let identMatch;
|
|
@@ -259,7 +259,7 @@ function bloxPlugin(options = {}) {
|
|
|
259
259
|
const declaredIdents = /* @__PURE__ */ new Set();
|
|
260
260
|
const queue = [...identifiers].filter((id2) => id2 !== "defineBlock");
|
|
261
261
|
const refsIn = (src) => {
|
|
262
|
-
const scan = src.replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
262
|
+
const scan = src.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "").replace(/'(?:\\.|[^'\\])*'/g, "''").replace(/"(?:\\.|[^"\\])*"/g, '""').replace(/`(?:\\.|[^`\\])*`/g, "``").replace(/\.\s*[a-z_$][\w$]*/gi, "").replace(/([a-z_$][\w$]*)\s*:/gi, ":");
|
|
263
263
|
const out = [];
|
|
264
264
|
let m;
|
|
265
265
|
const re = /\b([a-z_$][\w$]*)\b/gi;
|
package/package.json
CHANGED