@xosen/site-sdk 0.0.4 → 0.0.5
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/index.js +249 -237
- package/package.json +1 -1
- package/src/composables/useLivePreview.ts +26 -8
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { onMounted as C, computed as f, defineComponent as y, openBlock as n, createElementBlock as a, Fragment as h, renderList as v, normalizeClass as k, toDisplayString as _, ref as w, onUnmounted as
|
|
1
|
+
import { onMounted as C, computed as f, defineComponent as y, openBlock as n, createElementBlock as a, Fragment as h, renderList as v, normalizeClass as k, toDisplayString as _, ref as w, onUnmounted as E, resolveComponent as A, createElementVNode as d, createVNode as P, withCtx as B, createBlock as T, createTextVNode as L, createCommentVNode as u, renderSlot as z, normalizeStyle as U, resolveDynamicComponent as R, watch as I, mergeProps as G } from "vue";
|
|
2
2
|
import { useI18n as M } from "vue-i18n";
|
|
3
|
-
function
|
|
3
|
+
function J(r) {
|
|
4
4
|
function o(e) {
|
|
5
5
|
const t = document.documentElement;
|
|
6
6
|
if (e.colors)
|
|
7
7
|
for (const [c, i] of Object.entries(e.colors))
|
|
8
|
-
i && t.style.setProperty(`--x-color-${
|
|
8
|
+
i && t.style.setProperty(`--x-color-${V(c)}`, i);
|
|
9
9
|
e.typography?.fontFamily && t.style.setProperty("--x-font-family", e.typography.fontFamily), e.typography?.headingFont && t.style.setProperty("--x-font-heading", e.typography.headingFont), e.typography?.baseFontSize && t.style.setProperty("--x-font-size", e.typography.baseFontSize), e.shape?.borderRadius && t.style.setProperty("--x-border-radius", e.shape.borderRadius), e.shape?.maxWidth && t.style.setProperty("--x-max-width", e.shape.maxWidth);
|
|
10
10
|
}
|
|
11
11
|
C(() => {
|
|
@@ -21,7 +21,7 @@ function G(r) {
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function V(r) {
|
|
25
25
|
return r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
26
26
|
}
|
|
27
27
|
function F() {
|
|
@@ -41,7 +41,7 @@ function F() {
|
|
|
41
41
|
hasFeature: p
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const W = /* @__PURE__ */ y({
|
|
45
45
|
__name: "XLocaleSwitcher",
|
|
46
46
|
props: {
|
|
47
47
|
locales: { type: Array, required: !0 }
|
|
@@ -60,9 +60,9 @@ const V = /* @__PURE__ */ y({
|
|
|
60
60
|
for (const [t, c] of o)
|
|
61
61
|
e[t] = c;
|
|
62
62
|
return e;
|
|
63
|
-
},
|
|
64
|
-
function
|
|
65
|
-
return n(), a("div",
|
|
63
|
+
}, K = { class: "x-locale-switcher" }, Y = ["onClick"];
|
|
64
|
+
function Z(r, o, e, t, c, i) {
|
|
65
|
+
return n(), a("div", K, [
|
|
66
66
|
(n(!0), a(
|
|
67
67
|
h,
|
|
68
68
|
null,
|
|
@@ -70,13 +70,13 @@ function Y(r, o, e, t, c, i) {
|
|
|
70
70
|
key: s,
|
|
71
71
|
class: k(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
|
|
72
72
|
onClick: (l) => t.switchLocale(s)
|
|
73
|
-
}, _(s.toUpperCase()), 11,
|
|
73
|
+
}, _(s.toUpperCase()), 11, Y))),
|
|
74
74
|
128
|
|
75
75
|
/* KEYED_FRAGMENT */
|
|
76
76
|
))
|
|
77
77
|
]);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Q = /* @__PURE__ */ x(W, [["render", Z], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), ee = /* @__PURE__ */ y({
|
|
80
80
|
__name: "XSiteNav",
|
|
81
81
|
setup(r, { expose: o }) {
|
|
82
82
|
o();
|
|
@@ -84,23 +84,23 @@ const Z = /* @__PURE__ */ x(V, [["render", Y], ["__scopeId", "data-v-675f0bbd"],
|
|
|
84
84
|
function l() {
|
|
85
85
|
i.value = window.scrollY > 20;
|
|
86
86
|
}
|
|
87
|
-
C(() => window.addEventListener("scroll", l)),
|
|
88
|
-
const p = { navigation: e, branding: t, locales: c, scrolled: i, menuOpen: s, onScroll: l, XLocaleSwitcher:
|
|
87
|
+
C(() => window.addEventListener("scroll", l)), E(() => window.removeEventListener("scroll", l));
|
|
88
|
+
const p = { navigation: e, branding: t, locales: c, scrolled: i, menuOpen: s, onScroll: l, XLocaleSwitcher: Q };
|
|
89
89
|
return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
91
|
+
}), te = { class: "x-nav__container" }, se = ["src", "alt"], oe = {
|
|
92
92
|
key: 1,
|
|
93
93
|
class: "x-nav__logo-text"
|
|
94
|
-
},
|
|
95
|
-
function
|
|
96
|
-
const s =
|
|
94
|
+
}, ne = ["href"];
|
|
95
|
+
function ae(r, o, e, t, c, i) {
|
|
96
|
+
const s = A("router-link");
|
|
97
97
|
return n(), a(
|
|
98
98
|
"nav",
|
|
99
99
|
{
|
|
100
100
|
class: k(["x-nav", { "x-nav--scrolled": t.scrolled }])
|
|
101
101
|
},
|
|
102
102
|
[
|
|
103
|
-
|
|
103
|
+
d("div", te, [
|
|
104
104
|
P(s, {
|
|
105
105
|
to: "/",
|
|
106
106
|
class: "x-nav__logo"
|
|
@@ -111,9 +111,9 @@ function ne(r, o, e, t, c, i) {
|
|
|
111
111
|
src: t.branding.logo,
|
|
112
112
|
alt: t.branding.siteName || "",
|
|
113
113
|
class: "x-nav__logo-img"
|
|
114
|
-
}, null, 8,
|
|
114
|
+
}, null, 8, se)) : (n(), a(
|
|
115
115
|
"span",
|
|
116
|
-
|
|
116
|
+
oe,
|
|
117
117
|
_(t.branding.siteName || ""),
|
|
118
118
|
1
|
|
119
119
|
/* TEXT */
|
|
@@ -122,7 +122,7 @@ function ne(r, o, e, t, c, i) {
|
|
|
122
122
|
_: 1
|
|
123
123
|
/* STABLE */
|
|
124
124
|
}),
|
|
125
|
-
|
|
125
|
+
d(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
class: k(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
|
|
@@ -143,7 +143,7 @@ function ne(r, o, e, t, c, i) {
|
|
|
143
143
|
class: "x-nav__link",
|
|
144
144
|
target: "_blank",
|
|
145
145
|
onClick: o[0] || (o[0] = (p) => t.menuOpen = !1)
|
|
146
|
-
}, _(l.text), 9,
|
|
146
|
+
}, _(l.text), 9, ne)) : (n(), T(s, {
|
|
147
147
|
key: 1,
|
|
148
148
|
to: l.url,
|
|
149
149
|
class: "x-nav__link",
|
|
@@ -169,30 +169,30 @@ function ne(r, o, e, t, c, i) {
|
|
|
169
169
|
t.locales.length > 1 ? (n(), T(t.XLocaleSwitcher, {
|
|
170
170
|
key: 0,
|
|
171
171
|
locales: t.locales
|
|
172
|
-
}, null, 8, ["locales"])) :
|
|
172
|
+
}, null, 8, ["locales"])) : u("v-if", !0)
|
|
173
173
|
],
|
|
174
174
|
2
|
|
175
175
|
/* CLASS */
|
|
176
176
|
),
|
|
177
|
-
|
|
177
|
+
d("button", {
|
|
178
178
|
class: "x-nav__hamburger",
|
|
179
179
|
onClick: o[2] || (o[2] = (l) => t.menuOpen = !t.menuOpen)
|
|
180
180
|
}, [...o[3] || (o[3] = [
|
|
181
|
-
|
|
181
|
+
d(
|
|
182
182
|
"span",
|
|
183
183
|
null,
|
|
184
184
|
null,
|
|
185
185
|
-1
|
|
186
186
|
/* CACHED */
|
|
187
187
|
),
|
|
188
|
-
|
|
188
|
+
d(
|
|
189
189
|
"span",
|
|
190
190
|
null,
|
|
191
191
|
null,
|
|
192
192
|
-1
|
|
193
193
|
/* CACHED */
|
|
194
194
|
),
|
|
195
|
-
|
|
195
|
+
d(
|
|
196
196
|
"span",
|
|
197
197
|
null,
|
|
198
198
|
null,
|
|
@@ -206,25 +206,25 @@ function ne(r, o, e, t, c, i) {
|
|
|
206
206
|
/* CLASS */
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const re = /* @__PURE__ */ x(ee, [["render", ae], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ce = /* @__PURE__ */ y({
|
|
210
210
|
__name: "XSiteFooter",
|
|
211
211
|
setup(r, { expose: o }) {
|
|
212
212
|
o();
|
|
213
213
|
const { footer: e, branding: t } = F(), c = f(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), i = { footerConfig: e, branding: t, copyright: c };
|
|
214
214
|
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
216
|
+
}), ie = { class: "x-footer" }, le = { class: "x-footer__container" }, _e = {
|
|
217
217
|
key: 0,
|
|
218
218
|
class: "x-footer__links"
|
|
219
|
-
},
|
|
219
|
+
}, ue = {
|
|
220
220
|
key: 1,
|
|
221
221
|
class: "x-footer__copyright"
|
|
222
222
|
};
|
|
223
223
|
function de(r, o, e, t, c, i) {
|
|
224
|
-
const s =
|
|
225
|
-
return n(), a("footer",
|
|
226
|
-
|
|
227
|
-
t.footerConfig.links?.length ? (n(), a("div",
|
|
224
|
+
const s = A("router-link");
|
|
225
|
+
return n(), a("footer", ie, [
|
|
226
|
+
d("div", le, [
|
|
227
|
+
t.footerConfig.links?.length ? (n(), a("div", _e, [
|
|
228
228
|
(n(!0), a(
|
|
229
229
|
h,
|
|
230
230
|
null,
|
|
@@ -246,35 +246,35 @@ function de(r, o, e, t, c, i) {
|
|
|
246
246
|
128
|
|
247
247
|
/* KEYED_FRAGMENT */
|
|
248
248
|
))
|
|
249
|
-
])) :
|
|
249
|
+
])) : u("v-if", !0),
|
|
250
250
|
t.copyright ? (n(), a(
|
|
251
251
|
"p",
|
|
252
|
-
|
|
252
|
+
ue,
|
|
253
253
|
_(t.copyright),
|
|
254
254
|
1
|
|
255
255
|
/* TEXT */
|
|
256
|
-
)) :
|
|
256
|
+
)) : u("v-if", !0)
|
|
257
257
|
])
|
|
258
258
|
]);
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const pe = /* @__PURE__ */ x(ce, [["render", de], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), fe = /* @__PURE__ */ y({
|
|
261
261
|
__name: "XSiteLayout",
|
|
262
262
|
setup(r, { expose: o }) {
|
|
263
|
-
o(),
|
|
264
|
-
const e = { XSiteNav:
|
|
263
|
+
o(), J();
|
|
264
|
+
const e = { XSiteNav: re, XSiteFooter: pe };
|
|
265
265
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
268
|
-
function
|
|
269
|
-
return n(), a("div",
|
|
267
|
+
}), me = { class: "x-site-layout" }, he = { class: "x-site-layout__main" };
|
|
268
|
+
function ve(r, o, e, t, c, i) {
|
|
269
|
+
return n(), a("div", me, [
|
|
270
270
|
P(t.XSiteNav),
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
d("main", he, [
|
|
272
|
+
z(r.$slots, "default", {}, void 0, !0)
|
|
273
273
|
]),
|
|
274
274
|
P(t.XSiteFooter)
|
|
275
275
|
]);
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const ss = /* @__PURE__ */ x(fe, [["render", ve], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ye = /* @__PURE__ */ y({
|
|
278
278
|
__name: "XHeroBlock",
|
|
279
279
|
props: {
|
|
280
280
|
data: { type: Object, required: !0 },
|
|
@@ -285,23 +285,23 @@ const ts = /* @__PURE__ */ x(pe, [["render", he], ["__scopeId", "data-v-41b0f2a9
|
|
|
285
285
|
const e = r, t = f(() => e.data.image ? { backgroundImage: `url(${e.data.image})` } : {}), c = { props: e, bgStyle: t };
|
|
286
286
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
287
287
|
}
|
|
288
|
-
}),
|
|
288
|
+
}), xe = {
|
|
289
289
|
key: 0,
|
|
290
290
|
class: "x-hero__overlay"
|
|
291
|
-
},
|
|
291
|
+
}, ge = { class: "x-hero__content" }, ke = {
|
|
292
292
|
key: 0,
|
|
293
293
|
class: "x-hero__title"
|
|
294
|
-
},
|
|
294
|
+
}, be = {
|
|
295
295
|
key: 1,
|
|
296
296
|
class: "x-hero__subtitle"
|
|
297
|
-
},
|
|
297
|
+
}, $e = {
|
|
298
298
|
key: 2,
|
|
299
299
|
class: "x-hero__buttons"
|
|
300
|
-
},
|
|
300
|
+
}, Se = ["href"], we = {
|
|
301
301
|
key: 3,
|
|
302
302
|
class: "x-hero__stats"
|
|
303
|
-
},
|
|
304
|
-
function
|
|
303
|
+
}, je = { class: "x-hero__stat-value" }, Te = { class: "x-hero__stat-label" };
|
|
304
|
+
function Ce(r, o, e, t, c, i) {
|
|
305
305
|
return n(), a(
|
|
306
306
|
"section",
|
|
307
307
|
{
|
|
@@ -309,23 +309,23 @@ function Te(r, o, e, t, c, i) {
|
|
|
309
309
|
style: U(t.bgStyle)
|
|
310
310
|
},
|
|
311
311
|
[
|
|
312
|
-
e.data.image && e.data.overlay !== !1 ? (n(), a("div",
|
|
313
|
-
|
|
312
|
+
e.data.image && e.data.overlay !== !1 ? (n(), a("div", xe)) : u("v-if", !0),
|
|
313
|
+
d("div", ge, [
|
|
314
314
|
e.data.title ? (n(), a(
|
|
315
315
|
"h1",
|
|
316
|
-
|
|
316
|
+
ke,
|
|
317
317
|
_(e.data.title),
|
|
318
318
|
1
|
|
319
319
|
/* TEXT */
|
|
320
|
-
)) :
|
|
320
|
+
)) : u("v-if", !0),
|
|
321
321
|
e.data.subtitle ? (n(), a(
|
|
322
322
|
"p",
|
|
323
|
-
|
|
323
|
+
be,
|
|
324
324
|
_(e.data.subtitle),
|
|
325
325
|
1
|
|
326
326
|
/* TEXT */
|
|
327
|
-
)) :
|
|
328
|
-
e.data.buttons?.length ? (n(), a("div",
|
|
327
|
+
)) : u("v-if", !0),
|
|
328
|
+
e.data.buttons?.length ? (n(), a("div", $e, [
|
|
329
329
|
(n(!0), a(
|
|
330
330
|
h,
|
|
331
331
|
null,
|
|
@@ -333,12 +333,12 @@ function Te(r, o, e, t, c, i) {
|
|
|
333
333
|
key: l,
|
|
334
334
|
href: s.url,
|
|
335
335
|
class: k(["x-btn", `x-btn--${s.variant || "primary"}`])
|
|
336
|
-
}, _(s.text), 11,
|
|
336
|
+
}, _(s.text), 11, Se))),
|
|
337
337
|
128
|
|
338
338
|
/* KEYED_FRAGMENT */
|
|
339
339
|
))
|
|
340
|
-
])) :
|
|
341
|
-
e.data.stats?.length ? (n(), a("div",
|
|
340
|
+
])) : u("v-if", !0),
|
|
341
|
+
e.data.stats?.length ? (n(), a("div", we, [
|
|
342
342
|
(n(!0), a(
|
|
343
343
|
h,
|
|
344
344
|
null,
|
|
@@ -346,16 +346,16 @@ function Te(r, o, e, t, c, i) {
|
|
|
346
346
|
key: l,
|
|
347
347
|
class: "x-hero__stat"
|
|
348
348
|
}, [
|
|
349
|
-
|
|
349
|
+
d(
|
|
350
350
|
"span",
|
|
351
|
-
|
|
351
|
+
je,
|
|
352
352
|
_(s.value),
|
|
353
353
|
1
|
|
354
354
|
/* TEXT */
|
|
355
355
|
),
|
|
356
|
-
|
|
356
|
+
d(
|
|
357
357
|
"span",
|
|
358
|
-
|
|
358
|
+
Te,
|
|
359
359
|
_(s.label),
|
|
360
360
|
1
|
|
361
361
|
/* TEXT */
|
|
@@ -364,14 +364,14 @@ function Te(r, o, e, t, c, i) {
|
|
|
364
364
|
128
|
|
365
365
|
/* KEYED_FRAGMENT */
|
|
366
366
|
))
|
|
367
|
-
])) :
|
|
367
|
+
])) : u("v-if", !0)
|
|
368
368
|
])
|
|
369
369
|
],
|
|
370
370
|
6
|
|
371
371
|
/* CLASS, STYLE */
|
|
372
372
|
);
|
|
373
373
|
}
|
|
374
|
-
const
|
|
374
|
+
const Xe = /* @__PURE__ */ x(ye, [["render", Ce], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), Be = /* @__PURE__ */ y({
|
|
375
375
|
__name: "XHtmlBlock",
|
|
376
376
|
props: {
|
|
377
377
|
data: { type: Object, required: !0 }
|
|
@@ -381,16 +381,16 @@ const Ce = /* @__PURE__ */ x(ve, [["render", Te], ["__scopeId", "data-v-d8cfe56f
|
|
|
381
381
|
const e = {};
|
|
382
382
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
383
383
|
}
|
|
384
|
-
}),
|
|
385
|
-
function
|
|
386
|
-
return n(), a("section",
|
|
387
|
-
|
|
384
|
+
}), Oe = { class: "x-html-block" }, Pe = ["innerHTML"];
|
|
385
|
+
function Ie(r, o, e, t, c, i) {
|
|
386
|
+
return n(), a("section", Oe, [
|
|
387
|
+
d("div", {
|
|
388
388
|
class: "x-html-block__content",
|
|
389
389
|
innerHTML: e.data.content
|
|
390
|
-
}, null, 8,
|
|
390
|
+
}, null, 8, Pe)
|
|
391
391
|
]);
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const Le = /* @__PURE__ */ x(Be, [["render", Ie], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Ne = /* @__PURE__ */ y({
|
|
394
394
|
__name: "XCardsBlock",
|
|
395
395
|
props: {
|
|
396
396
|
data: { type: Object, required: !0 },
|
|
@@ -423,36 +423,36 @@ const Ie = /* @__PURE__ */ x(Xe, [["render", Pe], ["__scopeId", "data-v-abfd69e8
|
|
|
423
423
|
const l = { props: e, gridStyle: t, iconStyle: c, iconMap: i, iconDisplay: s };
|
|
424
424
|
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
425
425
|
}
|
|
426
|
-
}),
|
|
426
|
+
}), Ee = { class: "x-cards-block__container" }, Ae = {
|
|
427
427
|
key: 0,
|
|
428
428
|
class: "x-cards-block__title"
|
|
429
|
-
},
|
|
429
|
+
}, Ue = {
|
|
430
430
|
key: 1,
|
|
431
431
|
class: "x-cards-block__subtitle"
|
|
432
|
-
},
|
|
433
|
-
function
|
|
432
|
+
}, Re = ["src", "alt"], Me = { class: "x-card__title" }, Fe = { class: "x-card__desc" };
|
|
433
|
+
function qe(r, o, e, t, c, i) {
|
|
434
434
|
return n(), a(
|
|
435
435
|
"section",
|
|
436
436
|
{
|
|
437
437
|
class: k(["x-cards-block", `x-cards-block--${e.variant}`])
|
|
438
438
|
},
|
|
439
439
|
[
|
|
440
|
-
|
|
440
|
+
d("div", Ee, [
|
|
441
441
|
e.data.title ? (n(), a(
|
|
442
442
|
"h2",
|
|
443
443
|
Ae,
|
|
444
444
|
_(e.data.title),
|
|
445
445
|
1
|
|
446
446
|
/* TEXT */
|
|
447
|
-
)) :
|
|
447
|
+
)) : u("v-if", !0),
|
|
448
448
|
e.data.subtitle ? (n(), a(
|
|
449
449
|
"p",
|
|
450
|
-
|
|
450
|
+
Ue,
|
|
451
451
|
_(e.data.subtitle),
|
|
452
452
|
1
|
|
453
453
|
/* TEXT */
|
|
454
|
-
)) :
|
|
455
|
-
|
|
454
|
+
)) : u("v-if", !0),
|
|
455
|
+
d(
|
|
456
456
|
"div",
|
|
457
457
|
{
|
|
458
458
|
class: "x-cards-block__grid",
|
|
@@ -473,7 +473,7 @@ function Fe(r, o, e, t, c, i) {
|
|
|
473
473
|
src: s.image,
|
|
474
474
|
alt: s.title,
|
|
475
475
|
class: "x-card__image"
|
|
476
|
-
}, null, 8,
|
|
476
|
+
}, null, 8, Re)) : u("v-if", !0),
|
|
477
477
|
s.icon && e.variant !== "image-cards" ? (n(), a(
|
|
478
478
|
"div",
|
|
479
479
|
{
|
|
@@ -484,17 +484,17 @@ function Fe(r, o, e, t, c, i) {
|
|
|
484
484
|
_(t.iconDisplay(s.icon)),
|
|
485
485
|
1
|
|
486
486
|
/* TEXT */
|
|
487
|
-
)) :
|
|
488
|
-
|
|
487
|
+
)) : u("v-if", !0),
|
|
488
|
+
d(
|
|
489
489
|
"h3",
|
|
490
|
-
|
|
490
|
+
Me,
|
|
491
491
|
_(s.title),
|
|
492
492
|
1
|
|
493
493
|
/* TEXT */
|
|
494
494
|
),
|
|
495
|
-
|
|
495
|
+
d(
|
|
496
496
|
"p",
|
|
497
|
-
|
|
497
|
+
Fe,
|
|
498
498
|
_(s.desc),
|
|
499
499
|
1
|
|
500
500
|
/* TEXT */
|
|
@@ -516,7 +516,7 @@ function Fe(r, o, e, t, c, i) {
|
|
|
516
516
|
/* CLASS */
|
|
517
517
|
);
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const De = /* @__PURE__ */ x(Ne, [["render", qe], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), He = /* @__PURE__ */ y({
|
|
520
520
|
__name: "XImageTextBlock",
|
|
521
521
|
props: {
|
|
522
522
|
data: { type: Object, required: !0 },
|
|
@@ -527,45 +527,45 @@ const qe = /* @__PURE__ */ x(Le, [["render", Fe], ["__scopeId", "data-v-a1505674
|
|
|
527
527
|
const e = {};
|
|
528
528
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
529
529
|
}
|
|
530
|
-
}),
|
|
530
|
+
}), ze = { class: "x-image-text__container" }, Ge = { class: "x-image-text__text" }, Je = {
|
|
531
531
|
key: 0,
|
|
532
532
|
class: "x-image-text__title"
|
|
533
|
-
},
|
|
533
|
+
}, Ve = ["innerHTML"], We = {
|
|
534
534
|
key: 2,
|
|
535
535
|
class: "x-image-text__checklist"
|
|
536
|
-
},
|
|
536
|
+
}, Ke = { class: "x-image-text__check-icon" }, Ye = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "x-image-text__image-wrap"
|
|
539
|
-
},
|
|
540
|
-
function
|
|
539
|
+
}, Ze = ["src", "alt"];
|
|
540
|
+
function Qe(r, o, e, t, c, i) {
|
|
541
541
|
return n(), a(
|
|
542
542
|
"section",
|
|
543
543
|
{
|
|
544
544
|
class: k(["x-image-text", { "x-image-text--reverse": e.reverse }])
|
|
545
545
|
},
|
|
546
546
|
[
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
d("div", ze, [
|
|
548
|
+
d("div", Ge, [
|
|
549
549
|
e.data.title ? (n(), a(
|
|
550
550
|
"h2",
|
|
551
|
-
|
|
551
|
+
Je,
|
|
552
552
|
_(e.data.title),
|
|
553
553
|
1
|
|
554
554
|
/* TEXT */
|
|
555
|
-
)) :
|
|
555
|
+
)) : u("v-if", !0),
|
|
556
556
|
e.data.content ? (n(), a("div", {
|
|
557
557
|
key: 1,
|
|
558
558
|
class: "x-image-text__content",
|
|
559
559
|
innerHTML: e.data.content
|
|
560
|
-
}, null, 8,
|
|
561
|
-
e.data.items?.length ? (n(), a("ul",
|
|
560
|
+
}, null, 8, Ve)) : u("v-if", !0),
|
|
561
|
+
e.data.items?.length ? (n(), a("ul", We, [
|
|
562
562
|
(n(!0), a(
|
|
563
563
|
h,
|
|
564
564
|
null,
|
|
565
565
|
v(e.data.items, (s, l) => (n(), a("li", { key: l }, [
|
|
566
|
-
|
|
566
|
+
d(
|
|
567
567
|
"span",
|
|
568
|
-
|
|
568
|
+
Ke,
|
|
569
569
|
_(s.icon || "✓"),
|
|
570
570
|
1
|
|
571
571
|
/* TEXT */
|
|
@@ -579,22 +579,22 @@ function Ze(r, o, e, t, c, i) {
|
|
|
579
579
|
128
|
|
580
580
|
/* KEYED_FRAGMENT */
|
|
581
581
|
))
|
|
582
|
-
])) :
|
|
582
|
+
])) : u("v-if", !0)
|
|
583
583
|
]),
|
|
584
|
-
e.data.image ? (n(), a("div",
|
|
585
|
-
|
|
584
|
+
e.data.image ? (n(), a("div", Ye, [
|
|
585
|
+
d("img", {
|
|
586
586
|
src: e.data.image,
|
|
587
587
|
alt: e.data.title || "",
|
|
588
588
|
class: "x-image-text__image"
|
|
589
|
-
}, null, 8,
|
|
590
|
-
])) :
|
|
589
|
+
}, null, 8, Ze)
|
|
590
|
+
])) : u("v-if", !0)
|
|
591
591
|
])
|
|
592
592
|
],
|
|
593
593
|
2
|
|
594
594
|
/* CLASS */
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
|
-
const
|
|
597
|
+
const et = /* @__PURE__ */ x(He, [["render", Qe], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
|
|
598
598
|
function q(r, o) {
|
|
599
599
|
const e = w(null), { locale: t } = M(), c = window.__SITE_DATA__, i = c?.locale;
|
|
600
600
|
function s() {
|
|
@@ -613,7 +613,7 @@ function q(r, o) {
|
|
|
613
613
|
l();
|
|
614
614
|
}), e;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function tt() {
|
|
617
617
|
const o = window.__SITE_DATA__?.apiBase || "";
|
|
618
618
|
async function e(i) {
|
|
619
619
|
const s = await fetch(`${o}${i}`);
|
|
@@ -633,7 +633,7 @@ function et() {
|
|
|
633
633
|
getProducts: c
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const st = /* @__PURE__ */ y({
|
|
637
637
|
__name: "XPricingBlock",
|
|
638
638
|
props: {
|
|
639
639
|
data: { type: Object, required: !1 },
|
|
@@ -642,7 +642,7 @@ const tt = /* @__PURE__ */ y({
|
|
|
642
642
|
},
|
|
643
643
|
setup(r, { expose: o }) {
|
|
644
644
|
o();
|
|
645
|
-
const e = r, t = f(() => e.data?.title), c = f(() => e.data?.subtitle), i = w([]), s = w(""), l = q("tariffs", "tariffs"), p =
|
|
645
|
+
const e = r, t = f(() => e.data?.title), c = f(() => e.data?.subtitle), i = w([]), s = w(""), l = q("tariffs", "tariffs"), p = tt();
|
|
646
646
|
C(async () => {
|
|
647
647
|
if (e.source === "api")
|
|
648
648
|
try {
|
|
@@ -670,44 +670,44 @@ const tt = /* @__PURE__ */ y({
|
|
|
670
670
|
const b = f(() => !s.value || g.value.length <= 1 ? i.value : i.value.filter((m) => m.tariffGroupName === s.value)), X = { props: e, title: t, subtitle: c, plans: i, activeGroup: s, kvTariffs: l, api: p, groups: g, activePlans: b };
|
|
671
671
|
return Object.defineProperty(X, "__isScriptSetup", { enumerable: !1, value: !0 }), X;
|
|
672
672
|
}
|
|
673
|
-
}),
|
|
673
|
+
}), ot = { class: "x-pricing" }, nt = { class: "x-pricing__container" }, at = {
|
|
674
674
|
key: 0,
|
|
675
675
|
class: "x-pricing__title"
|
|
676
|
-
},
|
|
676
|
+
}, rt = {
|
|
677
677
|
key: 1,
|
|
678
678
|
class: "x-pricing__subtitle"
|
|
679
|
-
},
|
|
679
|
+
}, ct = {
|
|
680
680
|
key: 2,
|
|
681
681
|
class: "x-pricing__tabs"
|
|
682
|
-
},
|
|
682
|
+
}, it = ["onClick"], lt = { class: "x-pricing__grid" }, _t = { class: "x-pricing-card__name" }, ut = {
|
|
683
683
|
key: 0,
|
|
684
684
|
class: "x-pricing-card__desc"
|
|
685
|
-
}, dt = { class: "x-pricing-card__price" },
|
|
685
|
+
}, dt = { class: "x-pricing-card__price" }, pt = { class: "x-pricing-card__amount" }, ft = {
|
|
686
686
|
key: 0,
|
|
687
687
|
class: "x-pricing-card__period"
|
|
688
|
-
},
|
|
688
|
+
}, mt = {
|
|
689
689
|
key: 1,
|
|
690
690
|
class: "x-pricing-card__features"
|
|
691
|
-
},
|
|
692
|
-
function
|
|
693
|
-
return n(), a("section",
|
|
694
|
-
|
|
691
|
+
}, ht = ["href"];
|
|
692
|
+
function vt(r, o, e, t, c, i) {
|
|
693
|
+
return n(), a("section", ot, [
|
|
694
|
+
d("div", nt, [
|
|
695
695
|
t.title ? (n(), a(
|
|
696
696
|
"h2",
|
|
697
|
-
|
|
697
|
+
at,
|
|
698
698
|
_(t.title),
|
|
699
699
|
1
|
|
700
700
|
/* TEXT */
|
|
701
|
-
)) :
|
|
701
|
+
)) : u("v-if", !0),
|
|
702
702
|
t.subtitle ? (n(), a(
|
|
703
703
|
"p",
|
|
704
|
-
|
|
704
|
+
rt,
|
|
705
705
|
_(t.subtitle),
|
|
706
706
|
1
|
|
707
707
|
/* TEXT */
|
|
708
|
-
)) :
|
|
709
|
-
|
|
710
|
-
t.groups.length > 1 ? (n(), a("div",
|
|
708
|
+
)) : u("v-if", !0),
|
|
709
|
+
u(" Tabs for tariff groups "),
|
|
710
|
+
t.groups.length > 1 ? (n(), a("div", ct, [
|
|
711
711
|
(n(!0), a(
|
|
712
712
|
h,
|
|
713
713
|
null,
|
|
@@ -715,12 +715,12 @@ function ht(r, o, e, t, c, i) {
|
|
|
715
715
|
key: s,
|
|
716
716
|
class: k(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
|
|
717
717
|
onClick: (l) => t.activeGroup = s
|
|
718
|
-
}, _(s), 11,
|
|
718
|
+
}, _(s), 11, it))),
|
|
719
719
|
128
|
|
720
720
|
/* KEYED_FRAGMENT */
|
|
721
721
|
))
|
|
722
|
-
])) :
|
|
723
|
-
|
|
722
|
+
])) : u("v-if", !0),
|
|
723
|
+
d("div", lt, [
|
|
724
724
|
(n(!0), a(
|
|
725
725
|
h,
|
|
726
726
|
null,
|
|
@@ -731,37 +731,37 @@ function ht(r, o, e, t, c, i) {
|
|
|
731
731
|
class: k(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
|
|
732
732
|
},
|
|
733
733
|
[
|
|
734
|
-
|
|
734
|
+
d(
|
|
735
735
|
"h3",
|
|
736
|
-
|
|
736
|
+
_t,
|
|
737
737
|
_(s.name),
|
|
738
738
|
1
|
|
739
739
|
/* TEXT */
|
|
740
740
|
),
|
|
741
741
|
s.description ? (n(), a(
|
|
742
742
|
"p",
|
|
743
|
-
|
|
743
|
+
ut,
|
|
744
744
|
_(s.description),
|
|
745
745
|
1
|
|
746
746
|
/* TEXT */
|
|
747
|
-
)) :
|
|
748
|
-
|
|
749
|
-
|
|
747
|
+
)) : u("v-if", !0),
|
|
748
|
+
d("div", dt, [
|
|
749
|
+
d(
|
|
750
750
|
"span",
|
|
751
|
-
|
|
751
|
+
pt,
|
|
752
752
|
_(s.price),
|
|
753
753
|
1
|
|
754
754
|
/* TEXT */
|
|
755
755
|
),
|
|
756
756
|
s.period ? (n(), a(
|
|
757
757
|
"span",
|
|
758
|
-
|
|
758
|
+
ft,
|
|
759
759
|
"/" + _(s.period),
|
|
760
760
|
1
|
|
761
761
|
/* TEXT */
|
|
762
|
-
)) :
|
|
762
|
+
)) : u("v-if", !0)
|
|
763
763
|
]),
|
|
764
|
-
s.features?.length ? (n(), a("ul",
|
|
764
|
+
s.features?.length ? (n(), a("ul", mt, [
|
|
765
765
|
(n(!0), a(
|
|
766
766
|
h,
|
|
767
767
|
null,
|
|
@@ -775,12 +775,12 @@ function ht(r, o, e, t, c, i) {
|
|
|
775
775
|
128
|
|
776
776
|
/* KEYED_FRAGMENT */
|
|
777
777
|
))
|
|
778
|
-
])) :
|
|
778
|
+
])) : u("v-if", !0),
|
|
779
779
|
s.actionUrl ? (n(), a("a", {
|
|
780
780
|
key: 2,
|
|
781
781
|
href: s.actionUrl,
|
|
782
782
|
class: "x-btn x-btn--primary x-pricing-card__action"
|
|
783
|
-
}, _(s.actionText || "Choose"), 9,
|
|
783
|
+
}, _(s.actionText || "Choose"), 9, ht)) : u("v-if", !0)
|
|
784
784
|
],
|
|
785
785
|
2
|
|
786
786
|
/* CLASS */
|
|
@@ -792,7 +792,7 @@ function ht(r, o, e, t, c, i) {
|
|
|
792
792
|
])
|
|
793
793
|
]);
|
|
794
794
|
}
|
|
795
|
-
const
|
|
795
|
+
const yt = /* @__PURE__ */ x(st, [["render", vt], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), xt = /* @__PURE__ */ y({
|
|
796
796
|
__name: "XContactsBlock",
|
|
797
797
|
props: {
|
|
798
798
|
data: { type: Object, required: !1 }
|
|
@@ -802,36 +802,36 @@ const vt = /* @__PURE__ */ x(tt, [["render", ht], ["__scopeId", "data-v-bd1e5d79
|
|
|
802
802
|
const e = q("contacts:offices", "contacts:offices"), t = f(() => e.value || []), c = { kvOffices: e, offices: t };
|
|
803
803
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
804
804
|
}
|
|
805
|
-
}),
|
|
805
|
+
}), gt = { class: "x-contacts" }, kt = { class: "x-contacts__container" }, bt = {
|
|
806
806
|
key: 0,
|
|
807
807
|
class: "x-contacts__title"
|
|
808
|
-
},
|
|
808
|
+
}, $t = {
|
|
809
809
|
key: 1,
|
|
810
810
|
class: "x-contacts__grid"
|
|
811
|
-
},
|
|
811
|
+
}, St = { class: "x-contacts__name" }, wt = {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "x-contacts__info"
|
|
814
|
-
},
|
|
814
|
+
}, jt = {
|
|
815
815
|
key: 1,
|
|
816
816
|
class: "x-contacts__info"
|
|
817
|
-
},
|
|
817
|
+
}, Tt = ["href"], Ct = {
|
|
818
818
|
key: 2,
|
|
819
819
|
class: "x-contacts__info"
|
|
820
|
-
},
|
|
820
|
+
}, Xt = ["href"], Bt = {
|
|
821
821
|
key: 3,
|
|
822
822
|
class: "x-contacts__hours"
|
|
823
823
|
};
|
|
824
|
-
function
|
|
825
|
-
return n(), a("section",
|
|
826
|
-
|
|
824
|
+
function Ot(r, o, e, t, c, i) {
|
|
825
|
+
return n(), a("section", gt, [
|
|
826
|
+
d("div", kt, [
|
|
827
827
|
e.data?.title ? (n(), a(
|
|
828
828
|
"h2",
|
|
829
|
-
|
|
829
|
+
bt,
|
|
830
830
|
_(e.data.title),
|
|
831
831
|
1
|
|
832
832
|
/* TEXT */
|
|
833
|
-
)) :
|
|
834
|
-
t.offices ? (n(), a("div",
|
|
833
|
+
)) : u("v-if", !0),
|
|
834
|
+
t.offices ? (n(), a("div", $t, [
|
|
835
835
|
(n(!0), a(
|
|
836
836
|
h,
|
|
837
837
|
null,
|
|
@@ -842,37 +842,37 @@ function Bt(r, o, e, t, c, i) {
|
|
|
842
842
|
class: k(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
|
|
843
843
|
},
|
|
844
844
|
[
|
|
845
|
-
|
|
845
|
+
d(
|
|
846
846
|
"h3",
|
|
847
|
-
|
|
847
|
+
St,
|
|
848
848
|
_(s.name),
|
|
849
849
|
1
|
|
850
850
|
/* TEXT */
|
|
851
851
|
),
|
|
852
852
|
s.address ? (n(), a(
|
|
853
853
|
"p",
|
|
854
|
-
|
|
854
|
+
wt,
|
|
855
855
|
_(s.address),
|
|
856
856
|
1
|
|
857
857
|
/* TEXT */
|
|
858
|
-
)) :
|
|
859
|
-
s.phone ? (n(), a("p",
|
|
860
|
-
|
|
858
|
+
)) : u("v-if", !0),
|
|
859
|
+
s.phone ? (n(), a("p", jt, [
|
|
860
|
+
d("a", {
|
|
861
861
|
href: `tel:${s.phone}`
|
|
862
|
-
}, _(s.phone), 9,
|
|
863
|
-
])) :
|
|
864
|
-
s.email ? (n(), a("p",
|
|
865
|
-
|
|
862
|
+
}, _(s.phone), 9, Tt)
|
|
863
|
+
])) : u("v-if", !0),
|
|
864
|
+
s.email ? (n(), a("p", Ct, [
|
|
865
|
+
d("a", {
|
|
866
866
|
href: `mailto:${s.email}`
|
|
867
|
-
}, _(s.email), 9,
|
|
868
|
-
])) :
|
|
867
|
+
}, _(s.email), 9, Xt)
|
|
868
|
+
])) : u("v-if", !0),
|
|
869
869
|
s.hours ? (n(), a(
|
|
870
870
|
"p",
|
|
871
|
-
|
|
871
|
+
Bt,
|
|
872
872
|
_(s.hours),
|
|
873
873
|
1
|
|
874
874
|
/* TEXT */
|
|
875
|
-
)) :
|
|
875
|
+
)) : u("v-if", !0)
|
|
876
876
|
],
|
|
877
877
|
2
|
|
878
878
|
/* CLASS */
|
|
@@ -880,11 +880,11 @@ function Bt(r, o, e, t, c, i) {
|
|
|
880
880
|
128
|
|
881
881
|
/* KEYED_FRAGMENT */
|
|
882
882
|
))
|
|
883
|
-
])) :
|
|
883
|
+
])) : u("v-if", !0)
|
|
884
884
|
])
|
|
885
885
|
]);
|
|
886
886
|
}
|
|
887
|
-
const
|
|
887
|
+
const Pt = /* @__PURE__ */ x(xt, [["render", Ot], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), It = /* @__PURE__ */ y({
|
|
888
888
|
__name: "XGalleryBlock",
|
|
889
889
|
props: {
|
|
890
890
|
data: { type: Object, required: !0 }
|
|
@@ -894,20 +894,20 @@ const Ot = /* @__PURE__ */ x(yt, [["render", Bt], ["__scopeId", "data-v-e873ba26
|
|
|
894
894
|
const e = {};
|
|
895
895
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
896
896
|
}
|
|
897
|
-
}),
|
|
897
|
+
}), Lt = { class: "x-gallery-block" }, Nt = {
|
|
898
898
|
key: 0,
|
|
899
899
|
class: "x-gallery-block__title"
|
|
900
|
-
},
|
|
901
|
-
function
|
|
902
|
-
return n(), a("section",
|
|
900
|
+
}, Et = { class: "x-gallery-block__grid" }, At = ["src", "alt"], Ut = { key: 0 };
|
|
901
|
+
function Rt(r, o, e, t, c, i) {
|
|
902
|
+
return n(), a("section", Lt, [
|
|
903
903
|
e.data.title ? (n(), a(
|
|
904
904
|
"h2",
|
|
905
|
-
|
|
905
|
+
Nt,
|
|
906
906
|
_(e.data.title),
|
|
907
907
|
1
|
|
908
908
|
/* TEXT */
|
|
909
|
-
)) :
|
|
910
|
-
|
|
909
|
+
)) : u("v-if", !0),
|
|
910
|
+
d("div", Et, [
|
|
911
911
|
(n(!0), a(
|
|
912
912
|
h,
|
|
913
913
|
null,
|
|
@@ -915,18 +915,18 @@ function Ut(r, o, e, t, c, i) {
|
|
|
915
915
|
key: l,
|
|
916
916
|
class: "x-gallery-block__item"
|
|
917
917
|
}, [
|
|
918
|
-
|
|
918
|
+
d("img", {
|
|
919
919
|
src: s.src,
|
|
920
920
|
alt: s.alt || "",
|
|
921
921
|
loading: "lazy"
|
|
922
922
|
}, null, 8, At),
|
|
923
923
|
s.caption ? (n(), a(
|
|
924
924
|
"figcaption",
|
|
925
|
-
|
|
925
|
+
Ut,
|
|
926
926
|
_(s.caption),
|
|
927
927
|
1
|
|
928
928
|
/* TEXT */
|
|
929
|
-
)) :
|
|
929
|
+
)) : u("v-if", !0)
|
|
930
930
|
]))),
|
|
931
931
|
128
|
|
932
932
|
/* KEYED_FRAGMENT */
|
|
@@ -934,7 +934,7 @@ function Ut(r, o, e, t, c, i) {
|
|
|
934
934
|
])
|
|
935
935
|
]);
|
|
936
936
|
}
|
|
937
|
-
const
|
|
937
|
+
const Mt = /* @__PURE__ */ x(It, [["render", Rt], ["__scopeId", "data-v-b99bb987"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XGalleryBlock.vue"]]), Ft = /* @__PURE__ */ y({
|
|
938
938
|
__name: "XMapBlock",
|
|
939
939
|
props: {
|
|
940
940
|
data: { type: Object, required: !0 }
|
|
@@ -947,21 +947,21 @@ const Rt = /* @__PURE__ */ x(Pt, [["render", Ut], ["__scopeId", "data-v-b99bb987
|
|
|
947
947
|
}), c = { props: e, mapUrl: t };
|
|
948
948
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
949
949
|
}
|
|
950
|
-
}),
|
|
950
|
+
}), qt = { class: "x-map-block" }, Dt = {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "x-map-block__title"
|
|
953
|
-
},
|
|
954
|
-
function
|
|
955
|
-
return n(), a("section",
|
|
953
|
+
}, Ht = { class: "x-map-block__container" }, zt = ["src"];
|
|
954
|
+
function Gt(r, o, e, t, c, i) {
|
|
955
|
+
return n(), a("section", qt, [
|
|
956
956
|
e.data.title ? (n(), a(
|
|
957
957
|
"h2",
|
|
958
|
-
|
|
958
|
+
Dt,
|
|
959
959
|
_(e.data.title),
|
|
960
960
|
1
|
|
961
961
|
/* TEXT */
|
|
962
|
-
)) :
|
|
963
|
-
|
|
964
|
-
|
|
962
|
+
)) : u("v-if", !0),
|
|
963
|
+
d("div", Ht, [
|
|
964
|
+
d("iframe", {
|
|
965
965
|
src: t.mapUrl,
|
|
966
966
|
width: "100%",
|
|
967
967
|
height: "400",
|
|
@@ -969,11 +969,11 @@ function zt(r, o, e, t, c, i) {
|
|
|
969
969
|
allowfullscreen: "",
|
|
970
970
|
loading: "lazy",
|
|
971
971
|
referrerpolicy: "no-referrer-when-downgrade"
|
|
972
|
-
}, null, 8,
|
|
972
|
+
}, null, 8, zt)
|
|
973
973
|
])
|
|
974
974
|
]);
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const Jt = /* @__PURE__ */ x(Ft, [["render", Gt], ["__scopeId", "data-v-583f4762"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XMapBlock.vue"]]), Vt = /* @__PURE__ */ y({
|
|
977
977
|
__name: "XBlockRenderer",
|
|
978
978
|
props: {
|
|
979
979
|
blocks: { type: Array, required: !0 }
|
|
@@ -981,14 +981,14 @@ const Gt = /* @__PURE__ */ x(Mt, [["render", zt], ["__scopeId", "data-v-583f4762
|
|
|
981
981
|
setup(r, { expose: o }) {
|
|
982
982
|
o();
|
|
983
983
|
const e = r, t = {
|
|
984
|
-
hero:
|
|
985
|
-
html:
|
|
986
|
-
cards:
|
|
987
|
-
"image-text":
|
|
988
|
-
pricing:
|
|
989
|
-
contacts:
|
|
990
|
-
gallery:
|
|
991
|
-
map:
|
|
984
|
+
hero: Xe,
|
|
985
|
+
html: Le,
|
|
986
|
+
cards: De,
|
|
987
|
+
"image-text": et,
|
|
988
|
+
pricing: yt,
|
|
989
|
+
contacts: Pt,
|
|
990
|
+
gallery: Mt,
|
|
991
|
+
map: Jt
|
|
992
992
|
};
|
|
993
993
|
function c(l) {
|
|
994
994
|
return t[l];
|
|
@@ -996,9 +996,9 @@ const Gt = /* @__PURE__ */ x(Mt, [["render", zt], ["__scopeId", "data-v-583f4762
|
|
|
996
996
|
const i = f(() => e.blocks.filter((l) => l.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: c, visibleBlocks: i };
|
|
997
997
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
998
998
|
}
|
|
999
|
-
}),
|
|
1000
|
-
function
|
|
1001
|
-
return n(), a("div",
|
|
999
|
+
}), Wt = { class: "x-block-renderer" };
|
|
1000
|
+
function Kt(r, o, e, t, c, i) {
|
|
1001
|
+
return n(), a("div", Wt, [
|
|
1002
1002
|
(n(!0), a(
|
|
1003
1003
|
h,
|
|
1004
1004
|
null,
|
|
@@ -1006,12 +1006,12 @@ function Wt(r, o, e, t, c, i) {
|
|
|
1006
1006
|
h,
|
|
1007
1007
|
{ key: l },
|
|
1008
1008
|
[
|
|
1009
|
-
t.getBlockComponent(s.type) ? (n(), T(R(t.getBlockComponent(s.type)),
|
|
1009
|
+
t.getBlockComponent(s.type) ? (n(), T(R(t.getBlockComponent(s.type)), G({
|
|
1010
1010
|
key: 0,
|
|
1011
1011
|
data: s.data || s.props
|
|
1012
1012
|
}, { ref_for: !0 }, s.settings, {
|
|
1013
1013
|
class: s.settings?.className
|
|
1014
|
-
}), null, 16, ["data", "class"])) :
|
|
1014
|
+
}), null, 16, ["data", "class"])) : u("v-if", !0)
|
|
1015
1015
|
],
|
|
1016
1016
|
64
|
|
1017
1017
|
/* STABLE_FRAGMENT */
|
|
@@ -1021,24 +1021,34 @@ function Wt(r, o, e, t, c, i) {
|
|
|
1021
1021
|
))
|
|
1022
1022
|
]);
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1026
|
-
|
|
1024
|
+
const os = /* @__PURE__ */ x(Vt, [["render", Kt], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]);
|
|
1025
|
+
function D() {
|
|
1026
|
+
try {
|
|
1027
|
+
return window.self !== window.top;
|
|
1028
|
+
} catch {
|
|
1029
|
+
return !0;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
function ns(r) {
|
|
1033
|
+
D() && r.beforeEach((o, e) => !e.name);
|
|
1034
|
+
}
|
|
1035
|
+
function as() {
|
|
1036
|
+
const r = w(null), o = w(D());
|
|
1027
1037
|
function e(t) {
|
|
1028
1038
|
const c = t.data;
|
|
1029
1039
|
c?.type === "xosen-preview-update" && c.page && (r.value = c.page, o.value = !0);
|
|
1030
1040
|
}
|
|
1031
1041
|
return C(() => {
|
|
1032
|
-
window.addEventListener("message", e),
|
|
1033
|
-
}),
|
|
1042
|
+
window.addEventListener("message", e), o.value && window.parent.postMessage({ type: "xosen-preview-ready" }, "*");
|
|
1043
|
+
}), E(() => {
|
|
1034
1044
|
window.removeEventListener("message", e);
|
|
1035
1045
|
}), {
|
|
1036
1046
|
previewPage: r,
|
|
1037
1047
|
isPreviewMode: o
|
|
1038
1048
|
};
|
|
1039
1049
|
}
|
|
1040
|
-
const
|
|
1041
|
-
function
|
|
1050
|
+
const Yt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
|
|
1051
|
+
function Zt(r, o) {
|
|
1042
1052
|
const t = new URL(r.url).searchParams.get("lang");
|
|
1043
1053
|
if (t && o.supportedLocales?.includes(t)) return t;
|
|
1044
1054
|
if (o.supportedLocales?.length) {
|
|
@@ -1048,7 +1058,7 @@ function Yt(r, o) {
|
|
|
1048
1058
|
}
|
|
1049
1059
|
return o.defaultLocale;
|
|
1050
1060
|
}
|
|
1051
|
-
function
|
|
1061
|
+
function Qt(r, o) {
|
|
1052
1062
|
if (!r.pathname.startsWith("/api/content/")) return null;
|
|
1053
1063
|
const e = decodeURIComponent(r.pathname.replace("/api/content/", ""));
|
|
1054
1064
|
return e ? (async () => {
|
|
@@ -1070,14 +1080,14 @@ function N(r, o, e) {
|
|
|
1070
1080
|
}
|
|
1071
1081
|
return o.meta?.description && (t = t.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${o.meta.description}$2`)), o.meta?.ogTitle && (t = t.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${o.meta.ogTitle}$2`)), o.html && (t = t.replace('<div id="app"></div>', `<div id="app">${o.html}</div>`)), t;
|
|
1072
1082
|
}
|
|
1073
|
-
function
|
|
1083
|
+
function rs(r) {
|
|
1074
1084
|
return {
|
|
1075
1085
|
async fetch(o, e) {
|
|
1076
|
-
const t = new URL(o.url), c =
|
|
1086
|
+
const t = new URL(o.url), c = Qt(t, e);
|
|
1077
1087
|
if (c) return c;
|
|
1078
|
-
if (
|
|
1088
|
+
if (Yt.test(t.pathname))
|
|
1079
1089
|
return e.ASSETS.fetch(o);
|
|
1080
|
-
const i =
|
|
1090
|
+
const i = Zt(o, r), s = new URL("/index.html", o.url);
|
|
1081
1091
|
let p = await (await e.ASSETS.fetch(new Request(s))).text();
|
|
1082
1092
|
const [g, b] = await Promise.all([
|
|
1083
1093
|
e.SITE_CONTENT.get("config"),
|
|
@@ -1101,8 +1111,8 @@ function ns(r) {
|
|
|
1101
1111
|
S && (p = N(p, S, r.siteName));
|
|
1102
1112
|
}
|
|
1103
1113
|
t.pathname === "/" && m.home && (p = N(p, m.home, r.siteName));
|
|
1104
|
-
const
|
|
1105
|
-
return p = p.replace("</head>", `${
|
|
1114
|
+
const H = `<script>window.__SITE_DATA__ = ${JSON.stringify(O)};<\/script>`;
|
|
1115
|
+
return p = p.replace("</head>", `${H}
|
|
1106
1116
|
</head>`), new Response(p, {
|
|
1107
1117
|
headers: {
|
|
1108
1118
|
"Content-Type": "text/html;charset=utf-8",
|
|
@@ -1113,23 +1123,25 @@ function ns(r) {
|
|
|
1113
1123
|
};
|
|
1114
1124
|
}
|
|
1115
1125
|
export {
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1126
|
+
os as XBlockRenderer,
|
|
1127
|
+
De as XCardsBlock,
|
|
1128
|
+
Pt as XContactsBlock,
|
|
1129
|
+
Mt as XGalleryBlock,
|
|
1130
|
+
Xe as XHeroBlock,
|
|
1131
|
+
Le as XHtmlBlock,
|
|
1132
|
+
et as XImageTextBlock,
|
|
1133
|
+
Q as XLocaleSwitcher,
|
|
1134
|
+
Jt as XMapBlock,
|
|
1135
|
+
yt as XPricingBlock,
|
|
1136
|
+
pe as XSiteFooter,
|
|
1137
|
+
ss as XSiteLayout,
|
|
1138
|
+
re as XSiteNav,
|
|
1139
|
+
rs as createSiteWorker,
|
|
1140
|
+
D as isInPreview,
|
|
1141
|
+
ns as setupPreviewRouter,
|
|
1142
|
+
as as useLivePreview,
|
|
1143
|
+
tt as useSiteApi,
|
|
1132
1144
|
F as useSiteConfig,
|
|
1133
1145
|
q as useSiteData,
|
|
1134
|
-
|
|
1146
|
+
J as useSkin
|
|
1135
1147
|
};
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import type { Router } from 'vue-router';
|
|
2
3
|
|
|
3
4
|
export interface PreviewMessage {
|
|
4
5
|
type: 'xosen-preview-update';
|
|
@@ -11,20 +12,37 @@ export interface PreviewMessage {
|
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
/** Check if running inside an iframe (preview mode) */
|
|
16
|
+
export function isInPreview(): boolean {
|
|
17
|
+
try {
|
|
18
|
+
return window.self !== window.top;
|
|
19
|
+
} catch {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Install a router guard that blocks all navigation in preview mode.
|
|
26
|
+
* Call this once during app setup (e.g. in App.vue or router config).
|
|
27
|
+
*/
|
|
28
|
+
export function setupPreviewRouter(router: Router) {
|
|
29
|
+
if (!isInPreview()) return;
|
|
30
|
+
|
|
31
|
+
router.beforeEach((_to, from) => {
|
|
32
|
+
// Allow initial navigation, block subsequent ones
|
|
33
|
+
if (!from.name) return true;
|
|
34
|
+
return false;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
14
38
|
/**
|
|
15
39
|
* Listen for live preview messages from the admin UI.
|
|
16
40
|
* When the admin sends page data via postMessage, this composable
|
|
17
41
|
* provides reactive access to the preview data.
|
|
18
|
-
*
|
|
19
|
-
* Usage in template ContentPage:
|
|
20
|
-
* ```ts
|
|
21
|
-
* const { previewPage } = useLivePreview();
|
|
22
|
-
* // If previewPage matches current slug+locale, use it instead of KV/API data
|
|
23
|
-
* ```
|
|
24
42
|
*/
|
|
25
43
|
export function useLivePreview() {
|
|
26
44
|
const previewPage = ref<PreviewMessage['page'] | null>(null);
|
|
27
|
-
const isPreviewMode = ref(
|
|
45
|
+
const isPreviewMode = ref(isInPreview());
|
|
28
46
|
|
|
29
47
|
function handleMessage(event: MessageEvent) {
|
|
30
48
|
const data = event.data;
|
|
@@ -37,7 +55,7 @@ export function useLivePreview() {
|
|
|
37
55
|
onMounted(() => {
|
|
38
56
|
window.addEventListener('message', handleMessage);
|
|
39
57
|
// Notify parent that preview is ready
|
|
40
|
-
if (
|
|
58
|
+
if (isPreviewMode.value) {
|
|
41
59
|
window.parent.postMessage({ type: 'xosen-preview-ready' }, '*');
|
|
42
60
|
}
|
|
43
61
|
});
|
package/src/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { useSiteData } from './composables/useSiteData.js';
|
|
|
22
22
|
export { useSiteConfig } from './composables/useSiteConfig.js';
|
|
23
23
|
export { useSkin } from './composables/useSkin.js';
|
|
24
24
|
export { useSiteApi } from './composables/useSiteApi.js';
|
|
25
|
-
export { useLivePreview } from './composables/useLivePreview.js';
|
|
25
|
+
export { useLivePreview, setupPreviewRouter, isInPreview } from './composables/useLivePreview.js';
|
|
26
26
|
export type { PreviewMessage } from './composables/useLivePreview.js';
|
|
27
27
|
|
|
28
28
|
// Worker
|