@templatical/editor 0.9.0 → 0.9.1
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/{CloudEditor-CAtw_sFC.js → CloudEditor-DHB1FoQD.js} +1 -1
- package/dist/bundle-stats.json +4 -4
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js → CloudEditor-CrZk-OwQ.js} +2 -2
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js.map → CloudEditor-CrZk-OwQ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-7z2t_bYQ.js → renderer-CfHPFI5v.js} +2 -2
- package/dist/cdn/chunks/{renderer-7z2t_bYQ.js.map → renderer-CfHPFI5v.js.map} +1 -1
- package/dist/cdn/chunks/{styles-o0HIrw9F.js → styles-CVUvPdKD.js} +619 -617
- package/dist/cdn/chunks/{styles-o0HIrw9F.js.map → styles-CVUvPdKD.js.map} +1 -1
- package/dist/cdn/editor.js +3 -3
- package/dist/{styles-CJtcKmsx.js → styles-CxwIlb7Y.js} +652 -650
- package/dist/templatical-editor.js +2 -2
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { F as e, G as t, H as n, J as r, L as i, M as a, O as o, P as s, T as c, V as l, Y as u, Z as d, b as f, c as p, ct as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, t as D, u as O, v as k, x as A, y as j, z as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { B as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { i as q, n as J, r as Y, t as
|
|
1
|
+
import { F as e, G as t, H as n, J as r, L as i, M as a, O as o, P as s, T as c, V as l, Y as u, Z as d, b as f, c as p, ct as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, t as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-BwWMFq33.js";
|
|
2
|
+
import { $ as M, Bt as N, Cn as P, Ct as te, Dt as F, En as I, F as L, Ft as R, G as z, Gt as B, H as ne, I as re, J as ie, Jt as ae, K as oe, Kt as se, L as ce, Lt as le, M as ue, Mt as de, N as fe, O as V, P as pe, Pt as me, R as he, Sn as ge, St as _e, Tt as ve, U as ye, V as be, Vt as xe, W as Se, Wt as Ce, Xt as we, Yt as Te, Zt as Ee, _n as De, at as Oe, bn as ke, bt as Ae, ct as je, en as Me, et as Ne, gn as Pe, it as Fe, j as Ie, kt as Le, mn as Re, mt as ze, nn as Be, pn as Ve, q as He, qt as Ue, rn as We, rt as Ge, tn as Ke, un as qe, ut as Je, vn as Ye, wn as Xe, wt as Ze, xt as Qe, yt as $e, z as et, zt as tt } from "./features-D-2kVhHY.js";
|
|
3
|
+
import { B as nt, E as H, F as rt, H as it, I as at, K as ot, L as st, N as ct, P as lt, X as ut, b as dt, c as ft, d as pt, g as mt, h as ht, j as gt, k as _t, l as vt, o as yt, s as bt, v as xt, x as St, y as Ct } from "./icons-fZoyKV_s.js";
|
|
4
|
+
import { t as wt } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
+
import { t as Tt } from "./CountdownBlock-D6lCXhZA.js";
|
|
6
|
+
import { t as Et } from "./blockTypeIcons-YOEe5mDE.js";
|
|
7
|
+
import { _ as Dt, c as Ot, f as U, g as kt, h as W, l as At, m as G, p as K, t as jt } from "./styleConstants-lGobwiLH.js";
|
|
8
|
+
import { i as q, n as J, r as Y, t as Mt } from "./NumberWithSuffix-Bp-idLCc.js";
|
|
9
9
|
//#region src/utils/resolveLintOptions.ts
|
|
10
|
-
function
|
|
10
|
+
function Nt(e) {
|
|
11
11
|
return {
|
|
12
12
|
...e.lint,
|
|
13
13
|
locale: e.locale
|
|
@@ -15,19 +15,19 @@ function jt(e) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var
|
|
18
|
+
var Pt = ["aria-label"], Ft = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
21
|
-
},
|
|
21
|
+
}, It = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Lt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Rt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, zt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
24
|
-
},
|
|
24
|
+
}, Bt = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "tpl:m-0 tpl:mt-4 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
27
|
-
},
|
|
27
|
+
}, Vt = { class: "tpl:relative" }, Ht = {
|
|
28
28
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
29
29
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
30
|
-
},
|
|
30
|
+
}, Ut = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
31
31
|
__name: "Canvas",
|
|
32
32
|
props: {
|
|
33
33
|
viewport: {},
|
|
@@ -49,16 +49,16 @@ var Mt = ["aria-label"], Nt = {
|
|
|
49
49
|
paragraph: ne,
|
|
50
50
|
image: Se,
|
|
51
51
|
button: de,
|
|
52
|
-
divider:
|
|
52
|
+
divider: He,
|
|
53
53
|
spacer: fe,
|
|
54
54
|
html: oe,
|
|
55
55
|
social: pe,
|
|
56
56
|
menu: ye,
|
|
57
57
|
table: ue,
|
|
58
58
|
video: Ie,
|
|
59
|
-
countdown:
|
|
59
|
+
countdown: Tt,
|
|
60
60
|
custom: ie
|
|
61
|
-
}, o = e, u = t, { t: f } =
|
|
61
|
+
}, o = e, u = t, { t: f } = R(), { t: p } = Ne(), y = We(Ue, "Canvas"), x = c(Ce, null), S = c(N, null), A = c(xe, {}), ee = h(() => (A.plan?.hasFeature("ai_generation") ?? !1) && (A.ai?.isFeatureEnabled("chat") ?? !1)), M = h(() => (A.plan?.hasFeature("ai_generation") ?? !1) && (A.ai?.isFeatureEnabled("designToTemplate") ?? !1)), P = h({
|
|
62
62
|
get: () => o.content.blocks,
|
|
63
63
|
set: (e) => {
|
|
64
64
|
y.setContent({
|
|
@@ -66,21 +66,21 @@ var Mt = ["aria-label"], Nt = {
|
|
|
66
66
|
blocks: e
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
69
|
+
}), te = h(() => {
|
|
70
70
|
switch (o.viewport) {
|
|
71
71
|
case "mobile": return 375;
|
|
72
72
|
case "tablet": return 768;
|
|
73
73
|
default: return o.content.settings.width;
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
76
|
-
function
|
|
77
|
-
|
|
75
|
+
}), F = h(() => ({ fontFamily: o.content.settings.fontFamily })), I = h(() => P.value.length === 0 && !o.previewMode), L = d(0), z = h(() => I.value && L.value > 0);
|
|
76
|
+
function B() {
|
|
77
|
+
I.value && (L.value += 1);
|
|
78
78
|
}
|
|
79
79
|
function re() {
|
|
80
|
-
|
|
80
|
+
I.value && (L.value = Math.max(0, L.value - 1));
|
|
81
81
|
}
|
|
82
82
|
function ae() {
|
|
83
|
-
|
|
83
|
+
L.value = 0;
|
|
84
84
|
}
|
|
85
85
|
function se(e) {
|
|
86
86
|
o.previewMode || e.target === e.currentTarget && u("select-block", null);
|
|
@@ -103,7 +103,7 @@ var Mt = ["aria-label"], Nt = {
|
|
|
103
103
|
"aria-label": v(f).landmarks.canvas,
|
|
104
104
|
class: "tpl-canvas-wrapper tpl:relative tpl:rounded-lg",
|
|
105
105
|
style: E({
|
|
106
|
-
width: `${
|
|
106
|
+
width: `${te.value}px`,
|
|
107
107
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
108
108
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
109
109
|
})
|
|
@@ -119,7 +119,7 @@ var Mt = ["aria-label"], Nt = {
|
|
|
119
119
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
120
120
|
"tpl-preview-mode": e.previewMode
|
|
121
121
|
}]),
|
|
122
|
-
style: E(
|
|
122
|
+
style: E(F.value),
|
|
123
123
|
onClick: se
|
|
124
124
|
}, [j(v(D), {
|
|
125
125
|
modelValue: P.value,
|
|
@@ -136,38 +136,38 @@ var Mt = ["aria-label"], Nt = {
|
|
|
136
136
|
"force-fallback": !0,
|
|
137
137
|
class: C([
|
|
138
138
|
"tpl-canvas-blocks",
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
I.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
140
|
+
I.value && z.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
141
|
+
I.value && !z.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
142
142
|
]),
|
|
143
|
-
onDragenter:
|
|
143
|
+
onDragenter: B,
|
|
144
144
|
onDragleave: re,
|
|
145
145
|
onDrop: ae
|
|
146
146
|
}, {
|
|
147
|
-
default: l(() => [
|
|
148
|
-
w("div",
|
|
147
|
+
default: l(() => [I.value ? (a(), g("div", Ft, [
|
|
148
|
+
w("div", It, [j(v(mt), {
|
|
149
149
|
size: 48,
|
|
150
150
|
"stroke-width": 1
|
|
151
151
|
})]),
|
|
152
|
-
w("p",
|
|
153
|
-
w("p",
|
|
154
|
-
|
|
152
|
+
w("p", Lt, m(v(f).canvas.noBlocks), 1),
|
|
153
|
+
w("p", Rt, m(v(f).canvas.dragHint), 1),
|
|
154
|
+
ee.value && v(p) ? (a(), g("p", zt, [
|
|
155
155
|
k(m(v(f).canvas.aiHintChat) + " ", 1),
|
|
156
156
|
w("button", {
|
|
157
157
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
158
158
|
onClick: r[0] ||= (e) => u("open-ai-chat")
|
|
159
|
-
}, [j(v(
|
|
159
|
+
}, [j(v(Je), {
|
|
160
160
|
size: 14,
|
|
161
161
|
"stroke-width": 2
|
|
162
162
|
}), k(" " + m(v(p).aiMenu.aiAssistant), 1)]),
|
|
163
163
|
k(" " + m(v(f).canvas.aiHintChatSuffix), 1)
|
|
164
164
|
])) : _("", !0),
|
|
165
|
-
|
|
165
|
+
M.value && v(p) ? (a(), g("p", Bt, [
|
|
166
166
|
k(m(v(f).canvas.aiHintDesign) + " ", 1),
|
|
167
167
|
w("button", {
|
|
168
168
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
169
169
|
onClick: r[1] ||= (e) => u("open-design-reference")
|
|
170
|
-
}, [j(v(
|
|
170
|
+
}, [j(v(Qe), {
|
|
171
171
|
size: 14,
|
|
172
172
|
"stroke-width": 2
|
|
173
173
|
}), k(" " + m(v(p).aiMenu.designToTemplate), 1)]),
|
|
@@ -176,7 +176,7 @@ var Mt = ["aria-label"], Nt = {
|
|
|
176
176
|
])) : _("", !0), (a(!0), g(O, null, s(P.value, (t) => n((a(), g("div", {
|
|
177
177
|
key: t.id,
|
|
178
178
|
class: "tpl-block-item"
|
|
179
|
-
}, [w("div",
|
|
179
|
+
}, [w("div", Vt, [V(t.id) ? (a(), g("div", {
|
|
180
180
|
key: 0,
|
|
181
181
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
182
182
|
style: E({
|
|
@@ -187,9 +187,9 @@ var Mt = ["aria-label"], Nt = {
|
|
|
187
187
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:flex tpl:-translate-x-1/2 tpl:-translate-y-full tpl:items-center tpl:gap-1 tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
188
188
|
style: E({
|
|
189
189
|
backgroundColor: V(t.id).color,
|
|
190
|
-
color: v(
|
|
190
|
+
color: v(wt)(V(t.id).color)
|
|
191
191
|
})
|
|
192
|
-
}, [w("span",
|
|
192
|
+
}, [w("span", Ht, m(V(t.id).name.charAt(0)), 1), k(" " + m(V(t.id).name), 1)], 4)], 4)) : _("", !0), j(et, {
|
|
193
193
|
block: t,
|
|
194
194
|
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !V(t.id),
|
|
195
195
|
viewport: e.viewport,
|
|
@@ -220,29 +220,29 @@ var Mt = ["aria-label"], Nt = {
|
|
|
220
220
|
"modelValue",
|
|
221
221
|
"disabled",
|
|
222
222
|
"class"
|
|
223
|
-
])], 6)], 12,
|
|
223
|
+
])], 6)], 12, Pt));
|
|
224
224
|
}
|
|
225
|
-
}), [["__scopeId", "data-v-a4d3fa2d"]]),
|
|
225
|
+
}), [["__scopeId", "data-v-a4d3fa2d"]]), Wt = ["aria-label"], Gt = {
|
|
226
226
|
key: 0,
|
|
227
227
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
228
|
-
},
|
|
228
|
+
}, Kt = ["aria-label"], qt = {
|
|
229
229
|
key: 0,
|
|
230
230
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
231
|
-
},
|
|
231
|
+
}, Jt = {
|
|
232
232
|
key: 1,
|
|
233
233
|
class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]"
|
|
234
|
-
},
|
|
234
|
+
}, Yt = [
|
|
235
235
|
"data-palette-type",
|
|
236
236
|
"aria-label",
|
|
237
237
|
"onClick",
|
|
238
238
|
"onKeydown"
|
|
239
|
-
],
|
|
239
|
+
], Xt = { class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:scale-105" }, Zt = {
|
|
240
240
|
key: 0,
|
|
241
241
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
242
|
-
},
|
|
242
|
+
}, Qt = /* @__PURE__ */ A({
|
|
243
243
|
__name: "Sidebar",
|
|
244
244
|
setup(e) {
|
|
245
|
-
let { t, format: n } =
|
|
245
|
+
let { t, format: n } = R(), { t: r } = Ne(), o = c(B, []), u = c(tt, void 0), f = c(Ue, null), p = c(xe, {}), y = h(() => (p.savedModules?.moduleCount.value ?? 0) > 0), x = d(!1), S = d(!1);
|
|
246
246
|
function C() {
|
|
247
247
|
S.value || (x.value = !1);
|
|
248
248
|
}
|
|
@@ -265,7 +265,7 @@ var Mt = ["aria-label"], Nt = {
|
|
|
265
265
|
"table",
|
|
266
266
|
"spacer",
|
|
267
267
|
"html"
|
|
268
|
-
],
|
|
268
|
+
], ee = h(() => {
|
|
269
269
|
let e = A.map((e) => ({
|
|
270
270
|
type: e,
|
|
271
271
|
label: me(e, t)
|
|
@@ -274,26 +274,26 @@ var Mt = ["aria-label"], Nt = {
|
|
|
274
274
|
type: "countdown",
|
|
275
275
|
label: me("countdown", t)
|
|
276
276
|
}), e;
|
|
277
|
-
}),
|
|
277
|
+
}), M = h(() => o.map((e) => ({
|
|
278
278
|
type: `custom:${e.type}`,
|
|
279
279
|
label: e.name,
|
|
280
280
|
isCustom: !0,
|
|
281
281
|
icon: e.icon
|
|
282
|
-
}))),
|
|
283
|
-
function
|
|
282
|
+
}))), N = h(() => [...ee.value, ...M.value]);
|
|
283
|
+
function te(e) {
|
|
284
284
|
if (e.isCustom) {
|
|
285
285
|
let t = e.type.replace("custom:", ""), n = o.find((e) => e.type === t);
|
|
286
286
|
if (n) return P(n);
|
|
287
287
|
}
|
|
288
288
|
return ge(e.type, u);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function F(e) {
|
|
291
291
|
if (!f) return;
|
|
292
|
-
let t =
|
|
292
|
+
let t = te(e);
|
|
293
293
|
f.addBlock(t), f.selectBlock(t.id);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
295
|
+
function I(e, t) {
|
|
296
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), F(t));
|
|
297
297
|
}
|
|
298
298
|
return (e, o) => (a(), g("aside", {
|
|
299
299
|
"aria-label": v(t).sidebarNav.palette,
|
|
@@ -309,28 +309,28 @@ var Mt = ["aria-label"], Nt = {
|
|
|
309
309
|
onMouseleave: C,
|
|
310
310
|
onFocusin: o[2] ||= (e) => x.value = !0,
|
|
311
311
|
onFocusout: o[3] ||= (e) => x.value = !1
|
|
312
|
-
}, [y.value && v(r) ? (a(), g("div",
|
|
312
|
+
}, [y.value && v(r) ? (a(), g("div", Gt, [w("button", {
|
|
313
313
|
type: "button",
|
|
314
314
|
"aria-label": v(t).sidebarNav.browseModules,
|
|
315
315
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)]",
|
|
316
316
|
style: E({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
317
317
|
onClick: o[0] ||= (e) => v(p).savedModules?.openBrowser()
|
|
318
318
|
}, [
|
|
319
|
-
j(v(
|
|
319
|
+
j(v(gt), {
|
|
320
320
|
size: 20,
|
|
321
321
|
"stroke-width": 1.5,
|
|
322
322
|
class: "tpl:shrink-0"
|
|
323
323
|
}),
|
|
324
|
-
x.value ? (a(), g("span",
|
|
325
|
-
x.value ? (a(), g("span",
|
|
326
|
-
], 12,
|
|
327
|
-
"model-value":
|
|
324
|
+
x.value ? (a(), g("span", qt, m(v(r).modules.title), 1)) : _("", !0),
|
|
325
|
+
x.value ? (a(), g("span", Jt, m(v(p).savedModules?.moduleCount.value ?? 0), 1)) : _("", !0)
|
|
326
|
+
], 12, Kt)])) : _("", !0), j(v(D), {
|
|
327
|
+
"model-value": N.value,
|
|
328
328
|
group: {
|
|
329
329
|
name: "blocks",
|
|
330
330
|
pull: "clone",
|
|
331
331
|
put: !1
|
|
332
332
|
},
|
|
333
|
-
clone:
|
|
333
|
+
clone: te,
|
|
334
334
|
sort: !1,
|
|
335
335
|
animation: 150,
|
|
336
336
|
"ghost-class": "tpl-ghost",
|
|
@@ -339,16 +339,16 @@ var Mt = ["aria-label"], Nt = {
|
|
|
339
339
|
onChoose: T,
|
|
340
340
|
onEnd: k
|
|
341
341
|
}, {
|
|
342
|
-
default: l(() => [(a(!0), g(O, null, s(
|
|
342
|
+
default: l(() => [(a(!0), g(O, null, s(N.value, (e) => (a(), g("button", {
|
|
343
343
|
key: e.type,
|
|
344
344
|
type: "button",
|
|
345
345
|
"data-palette-type": e.type,
|
|
346
346
|
"aria-label": v(n)(v(t).sidebarNav.insertBlock, { block: e.label }),
|
|
347
347
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] active:tpl:cursor-grabbing",
|
|
348
348
|
style: E({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
349
|
-
onClick: (t) =>
|
|
350
|
-
onKeydown: (t) =>
|
|
351
|
-
}, [w("div",
|
|
349
|
+
onClick: (t) => F(e),
|
|
350
|
+
onKeydown: (t) => I(t, e)
|
|
351
|
+
}, [w("div", Xt, [v(Et)[e.type] ? (a(), b(i(v(Et)[e.type]), {
|
|
352
352
|
key: 0,
|
|
353
353
|
size: 20,
|
|
354
354
|
"stroke-width": 1.5
|
|
@@ -356,15 +356,15 @@ var Mt = ["aria-label"], Nt = {
|
|
|
356
356
|
key: 1,
|
|
357
357
|
icon: e.icon,
|
|
358
358
|
size: 20
|
|
359
|
-
}, null, 8, ["icon"])) : _("", !0)]), x.value ? (a(), g("span",
|
|
359
|
+
}, null, 8, ["icon"])) : _("", !0)]), x.value ? (a(), g("span", Zt, m(e.label), 1)) : _("", !0)], 44, Yt))), 128))]),
|
|
360
360
|
_: 1
|
|
361
|
-
}, 8, ["model-value"])], 44,
|
|
361
|
+
}, 8, ["model-value"])], 44, Wt));
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/composables/useMergeTagField.ts
|
|
366
|
-
function
|
|
367
|
-
let { modelValue: n, emit: i, elementRef: a } = e, { canRequestMergeTag: s, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: f, syntax: p } =
|
|
366
|
+
function $t(e) {
|
|
367
|
+
let { modelValue: n, emit: i, elementRef: a } = e, { canRequestMergeTag: s, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: f, syntax: p } = M(), m = d(!1), g = !1, _ = !1;
|
|
368
368
|
t() && r(() => {
|
|
369
369
|
_ = !0;
|
|
370
370
|
});
|
|
@@ -385,7 +385,7 @@ function Zt(e) {
|
|
|
385
385
|
}) : ke(n, p) ? t.push({
|
|
386
386
|
type: "logicMergeTag",
|
|
387
387
|
value: n,
|
|
388
|
-
keyword:
|
|
388
|
+
keyword: Ye(n, p)
|
|
389
389
|
}) : t.push({
|
|
390
390
|
type: "text",
|
|
391
391
|
value: n
|
|
@@ -445,10 +445,10 @@ function Zt(e) {
|
|
|
445
445
|
}
|
|
446
446
|
//#endregion
|
|
447
447
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
448
|
-
var
|
|
448
|
+
var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip"], rn = {
|
|
449
449
|
key: 2,
|
|
450
450
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
451
|
-
},
|
|
451
|
+
}, an = ["aria-label", "title"], on = /* @__PURE__ */ A({
|
|
452
452
|
__name: "MergeTagSegments",
|
|
453
453
|
props: {
|
|
454
454
|
segments: {},
|
|
@@ -457,7 +457,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
457
457
|
},
|
|
458
458
|
emits: ["edit", "clear"],
|
|
459
459
|
setup(e, { emit: t }) {
|
|
460
|
-
let n = t, { t: r } =
|
|
460
|
+
let n = t, { t: r } = R();
|
|
461
461
|
function i() {
|
|
462
462
|
n("edit");
|
|
463
463
|
}
|
|
@@ -476,7 +476,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
476
476
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
477
477
|
color: "var(--tpl-primary)"
|
|
478
478
|
}
|
|
479
|
-
}, m(e.label), 9,
|
|
479
|
+
}, m(e.label), 9, tn)) : e.type === "logicMergeTag" ? (a(), g("span", {
|
|
480
480
|
key: 1,
|
|
481
481
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
482
482
|
"data-tooltip": e.value,
|
|
@@ -485,7 +485,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
485
485
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
486
486
|
color: "var(--tpl-primary)"
|
|
487
487
|
}
|
|
488
|
-
}, m(e.keyword), 9,
|
|
488
|
+
}, m(e.keyword), 9, nn)) : (a(), g("span", rn, m(e.value), 1))], 64))), 128)), w("button", {
|
|
489
489
|
type: "button",
|
|
490
490
|
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all hover:tpl:text-[var(--tpl-danger)] hover:tpl:opacity-100",
|
|
491
491
|
"aria-label": v(r).mergeTag.remove,
|
|
@@ -494,35 +494,35 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
494
494
|
}, [j(v(Oe), {
|
|
495
495
|
size: 12,
|
|
496
496
|
"stroke-width": 2.5
|
|
497
|
-
})], 8,
|
|
497
|
+
})], 8, an)], 42, en));
|
|
498
498
|
}
|
|
499
|
-
}),
|
|
499
|
+
}), sn = [
|
|
500
500
|
"aria-label",
|
|
501
501
|
"title",
|
|
502
502
|
"disabled"
|
|
503
|
-
],
|
|
503
|
+
], cn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", ln = /* @__PURE__ */ A({
|
|
504
504
|
__name: "MergeTagInsertButton",
|
|
505
505
|
props: { disabled: { type: Boolean } },
|
|
506
506
|
emits: ["insert"],
|
|
507
507
|
setup(e) {
|
|
508
|
-
let { t } =
|
|
508
|
+
let { t } = R();
|
|
509
509
|
return (n, r) => (a(), g("button", {
|
|
510
510
|
type: "button",
|
|
511
|
-
class: C([
|
|
511
|
+
class: C([cn, "tpl:mt-1.5"]),
|
|
512
512
|
"aria-label": v(t).mergeTag.insert,
|
|
513
513
|
title: v(t).mergeTag.insert,
|
|
514
514
|
disabled: e.disabled,
|
|
515
515
|
onClick: r[0] ||= (e) => n.$emit("insert")
|
|
516
|
-
}, [j(v(
|
|
516
|
+
}, [j(v(St), {
|
|
517
517
|
size: 12,
|
|
518
518
|
"stroke-width": 2
|
|
519
|
-
}), k(" " + m(v(t).mergeTag.insert), 1)], 10,
|
|
519
|
+
}), k(" " + m(v(t).mergeTag.insert), 1)], 10, sn));
|
|
520
520
|
}
|
|
521
|
-
}),
|
|
521
|
+
}), un = { key: 0 }, dn = { key: 1 }, fn = [
|
|
522
522
|
"value",
|
|
523
523
|
"placeholder",
|
|
524
524
|
"rows"
|
|
525
|
-
],
|
|
525
|
+
], pn = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", mn = "tpl:flex tpl:w-full tpl:min-h-[5rem] tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", hn = /* @__PURE__ */ A({
|
|
526
526
|
__name: "MergeTagTextarea",
|
|
527
527
|
props: {
|
|
528
528
|
modelValue: {},
|
|
@@ -531,46 +531,46 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
531
531
|
},
|
|
532
532
|
emits: ["update:modelValue"],
|
|
533
533
|
setup(e, { emit: t }) {
|
|
534
|
-
let n = e, r = t, i = d(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: f, stopEditing: m, handleInput: h, clearValue: y, insertMergeTag: x } =
|
|
534
|
+
let n = e, r = t, i = d(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: f, stopEditing: m, handleInput: h, clearValue: y, insertMergeTag: x } = $t({
|
|
535
535
|
modelValue: () => n.modelValue,
|
|
536
536
|
emit: (e) => r("update:modelValue", e),
|
|
537
537
|
elementRef: i
|
|
538
538
|
});
|
|
539
|
-
return (t, n) => v(s) && !v(u) ? (a(), g("div",
|
|
539
|
+
return (t, n) => v(s) && !v(u) ? (a(), g("div", un, [j(on, {
|
|
540
540
|
segments: v(o),
|
|
541
|
-
"display-class":
|
|
541
|
+
"display-class": mn,
|
|
542
542
|
onEdit: v(f),
|
|
543
543
|
onClear: v(y)
|
|
544
544
|
}, null, 8, [
|
|
545
545
|
"segments",
|
|
546
546
|
"onEdit",
|
|
547
547
|
"onClear"
|
|
548
|
-
]), v(c) ? (a(), b(
|
|
548
|
+
]), v(c) ? (a(), b(ln, {
|
|
549
549
|
key: 0,
|
|
550
550
|
disabled: v(l),
|
|
551
551
|
onInsert: v(x)
|
|
552
|
-
}, null, 8, ["disabled", "onInsert"])) : _("", !0)])) : (a(), g("div",
|
|
552
|
+
}, null, 8, ["disabled", "onInsert"])) : _("", !0)])) : (a(), g("div", dn, [w("textarea", {
|
|
553
553
|
ref_key: "textareaRef",
|
|
554
554
|
ref: i,
|
|
555
|
-
class: C(
|
|
555
|
+
class: C(pn),
|
|
556
556
|
value: e.modelValue,
|
|
557
557
|
placeholder: e.placeholder,
|
|
558
558
|
rows: e.rows,
|
|
559
559
|
onInput: n[0] ||= (...e) => v(h) && v(h)(...e),
|
|
560
560
|
onBlur: n[1] ||= (...e) => v(m) && v(m)(...e),
|
|
561
561
|
onKeydown: n[2] ||= p((...e) => v(m) && v(m)(...e), ["escape"])
|
|
562
|
-
}, null, 40,
|
|
562
|
+
}, null, 40, fn), v(c) ? (a(), b(ln, {
|
|
563
563
|
key: 0,
|
|
564
564
|
disabled: v(l),
|
|
565
565
|
onInsert: v(x)
|
|
566
566
|
}, null, 8, ["disabled", "onInsert"])) : _("", !0)]));
|
|
567
567
|
}
|
|
568
|
-
}),
|
|
568
|
+
}), gn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, _n = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, vn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, yn = { class: "tpl:mb-3.5" }, bn = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, xn = ["onClick"], Sn = { class: "tpl:flex tpl:items-stretch" }, Cn = ["value"], wn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tn = { class: "tpl:mb-3.5" }, En = ["value"], Dn = ["value"], On = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, kn = ["value"], An = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, jn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Mn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Nn = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Pn = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Fn = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, In = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, Ln = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Rn = { class: "tpl:mb-1 tpl:last:mb-0" }, zn = { class: "tpl:mb-1 tpl:last:mb-0" }, Bn = { class: "tpl:mb-1 tpl:last:mb-0" }, Vn = 150, Hn = /* @__PURE__ */ A({
|
|
569
569
|
__name: "TemplateSettings",
|
|
570
570
|
props: { settings: {} },
|
|
571
571
|
emits: ["update"],
|
|
572
572
|
setup(e, { emit: t }) {
|
|
573
|
-
let n = e, r = t, { t: i } =
|
|
573
|
+
let n = e, r = t, { t: i } = R(), o = We(ae, "TemplateSettings"), c = h(() => o.fonts.value), l = h(() => c.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : o.defaultFont.value), u = [
|
|
574
574
|
{
|
|
575
575
|
value: 480,
|
|
576
576
|
label: "480px"
|
|
@@ -588,14 +588,14 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
588
588
|
label: "800px"
|
|
589
589
|
}
|
|
590
590
|
];
|
|
591
|
-
return (t, n) => (a(), g("aside",
|
|
592
|
-
w("div", { class: C(v(
|
|
593
|
-
w("div",
|
|
591
|
+
return (t, n) => (a(), g("aside", gn, [w("div", _n, [
|
|
592
|
+
w("div", { class: C(v(At)) }, [
|
|
593
|
+
w("div", vn, [j(v(ht), {
|
|
594
594
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
595
595
|
size: 14,
|
|
596
596
|
"stroke-width": 2
|
|
597
597
|
}), w("span", null, m(v(i).templateSettings.layout), 1)]),
|
|
598
|
-
w("div",
|
|
598
|
+
w("div", yn, [w("label", { class: C(v(W)) }, m(v(i).templateSettings.widthPreset), 3), w("div", bn, [(a(), g(O, null, s(u, (t) => w("button", {
|
|
599
599
|
key: t.value,
|
|
600
600
|
class: "tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
601
601
|
style: E({
|
|
@@ -604,25 +604,25 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
604
604
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
605
605
|
}),
|
|
606
606
|
onClick: (e) => r("update", { width: t.value })
|
|
607
|
-
}, m(t.label), 13,
|
|
608
|
-
w("div", null, [w("label", { class: C(v(W)) }, m(v(i).templateSettings.customWidth), 3), w("div",
|
|
607
|
+
}, m(t.label), 13, xn)), 64))])]),
|
|
608
|
+
w("div", null, [w("label", { class: C(v(W)) }, m(v(i).templateSettings.customWidth), 3), w("div", Sn, [w("input", {
|
|
609
609
|
type: "number",
|
|
610
610
|
class: C(v(K)),
|
|
611
611
|
value: e.settings.width,
|
|
612
612
|
min: "300",
|
|
613
613
|
max: "900",
|
|
614
614
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
615
|
-
}, null, 42,
|
|
615
|
+
}, null, 42, Cn), w("span", { class: C(v(G)) }, "px", 2)])])
|
|
616
616
|
], 2),
|
|
617
|
-
w("div", { class: C(v(
|
|
618
|
-
w("div",
|
|
617
|
+
w("div", { class: C(v(At)) }, [
|
|
618
|
+
w("div", wn, [j(v(ut), {
|
|
619
619
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
620
620
|
size: 14,
|
|
621
621
|
"stroke-width": 2
|
|
622
622
|
}), w("span", null, m(v(i).templateSettings.appearance), 1)]),
|
|
623
|
-
w("div",
|
|
623
|
+
w("div", Tn, [w("label", { class: C(v(W)) }, m(v(i).templateSettings.backgroundColor), 3), j(q, {
|
|
624
624
|
"model-value": e.settings.backgroundColor,
|
|
625
|
-
placeholder: v(
|
|
625
|
+
placeholder: v(jt),
|
|
626
626
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
627
627
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
628
628
|
w("div", null, [w("label", { class: C(v(W)) }, m(v(i).templateSettings.fontFamily), 3), w("select", {
|
|
@@ -632,9 +632,9 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
632
632
|
}, [(a(!0), g(O, null, s(c.value, (e) => (a(), g("option", {
|
|
633
633
|
key: e.value,
|
|
634
634
|
value: e.value
|
|
635
|
-
}, m(e.label), 9,
|
|
635
|
+
}, m(e.label), 9, Dn))), 128))], 42, En)])
|
|
636
636
|
], 2),
|
|
637
|
-
w("div", { class: C(v(
|
|
637
|
+
w("div", { class: C(v(At)) }, [w("div", On, [j(v(ot), {
|
|
638
638
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
639
639
|
size: 14,
|
|
640
640
|
"stroke-width": 2
|
|
@@ -649,34 +649,34 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
649
649
|
autocapitalize: "off",
|
|
650
650
|
autocomplete: "off",
|
|
651
651
|
onInput: n[3] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
652
|
-
}, null, 42,
|
|
653
|
-
w("p",
|
|
652
|
+
}, null, 42, kn),
|
|
653
|
+
w("p", An, m(v(i).templateSettings.contentLocaleHint), 1)
|
|
654
654
|
])], 2),
|
|
655
|
-
w("div", { class: C(v(
|
|
655
|
+
w("div", { class: C(v(At)) }, [w("div", jn, [j(v(_e), {
|
|
656
656
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
657
657
|
size: 14,
|
|
658
658
|
"stroke-width": 2
|
|
659
|
-
}), w("span", null, m(v(i).templateSettings.preheaderText), 1)]), w("div", null, [j(
|
|
659
|
+
}), w("span", null, m(v(i).templateSettings.preheaderText), 1)]), w("div", null, [j(hn, {
|
|
660
660
|
"model-value": e.settings.preheaderText ?? "",
|
|
661
661
|
placeholder: v(i).templateSettings.preheaderTextPlaceholder,
|
|
662
662
|
rows: 2,
|
|
663
663
|
"onUpdate:modelValue": n[4] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
664
|
-
}, null, 8, ["model-value", "placeholder"]), w("div",
|
|
665
|
-
w("div",
|
|
664
|
+
}, null, 8, ["model-value", "placeholder"]), w("div", Mn, [w("span", Nn, m(v(i).templateSettings.preheaderTextHint), 1), w("span", Pn, m((e.settings.preheaderText ?? "").length) + "/" + m(Vn), 1)])])], 2),
|
|
665
|
+
w("div", Fn, [w("div", In, [j(v($e), {
|
|
666
666
|
size: 14,
|
|
667
667
|
"stroke-width": 2
|
|
668
|
-
}), w("span", null, m(v(i).templateSettings.tips), 1)]), w("ul",
|
|
669
|
-
w("li",
|
|
670
|
-
w("li",
|
|
671
|
-
w("li",
|
|
668
|
+
}), w("span", null, m(v(i).templateSettings.tips), 1)]), w("ul", Ln, [
|
|
669
|
+
w("li", Rn, m(v(i).templateSettings.tip1), 1),
|
|
670
|
+
w("li", zn, m(v(i).templateSettings.tip2), 1),
|
|
671
|
+
w("li", Bn, m(v(i).templateSettings.tip3), 1)
|
|
672
672
|
])])
|
|
673
673
|
])]));
|
|
674
674
|
}
|
|
675
|
-
}),
|
|
675
|
+
}), Un = { key: 0 }, Wn = { key: 1 }, Gn = [
|
|
676
676
|
"type",
|
|
677
677
|
"value",
|
|
678
678
|
"placeholder"
|
|
679
|
-
],
|
|
679
|
+
], Kn = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", X = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
680
680
|
__name: "MergeTagInput",
|
|
681
681
|
props: {
|
|
682
682
|
modelValue: {},
|
|
@@ -689,14 +689,14 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
689
689
|
},
|
|
690
690
|
emits: ["update:modelValue"],
|
|
691
691
|
setup(e, { emit: t }) {
|
|
692
|
-
let n = e, r = t, i = d(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: f, stopEditing: m, handleInput: h, clearValue: y, insertMergeTag: x } =
|
|
692
|
+
let n = e, r = t, i = d(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: f, stopEditing: m, handleInput: h, clearValue: y, insertMergeTag: x } = $t({
|
|
693
693
|
modelValue: () => n.modelValue,
|
|
694
694
|
emit: (e) => r("update:modelValue", e),
|
|
695
695
|
elementRef: i
|
|
696
696
|
});
|
|
697
|
-
return (t, n) => v(s) && !v(u) ? (a(), g("div",
|
|
697
|
+
return (t, n) => v(s) && !v(u) ? (a(), g("div", Un, [j(on, {
|
|
698
698
|
segments: v(o),
|
|
699
|
-
"display-class":
|
|
699
|
+
"display-class": Kn,
|
|
700
700
|
pulse: e.pulse,
|
|
701
701
|
onEdit: v(f),
|
|
702
702
|
onClear: v(y)
|
|
@@ -705,11 +705,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
705
705
|
"pulse",
|
|
706
706
|
"onEdit",
|
|
707
707
|
"onClear"
|
|
708
|
-
]), v(c) ? (a(), b(
|
|
708
|
+
]), v(c) ? (a(), b(ln, {
|
|
709
709
|
key: 0,
|
|
710
710
|
disabled: v(l),
|
|
711
711
|
onInsert: v(x)
|
|
712
|
-
}, null, 8, ["disabled", "onInsert"])) : _("", !0)])) : (a(), g("div",
|
|
712
|
+
}, null, 8, ["disabled", "onInsert"])) : _("", !0)])) : (a(), g("div", Wn, [w("input", {
|
|
713
713
|
ref_key: "inputRef",
|
|
714
714
|
ref: i,
|
|
715
715
|
type: e.type,
|
|
@@ -719,16 +719,16 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
719
719
|
onInput: n[0] ||= (...e) => v(h) && v(h)(...e),
|
|
720
720
|
onBlur: n[1] ||= (...e) => v(m) && v(m)(...e),
|
|
721
721
|
onKeydown: n[2] ||= p((...e) => v(m) && v(m)(...e), ["escape"])
|
|
722
|
-
}, null, 42,
|
|
722
|
+
}, null, 42, Gn), v(c) ? (a(), b(ln, {
|
|
723
723
|
key: 0,
|
|
724
724
|
disabled: v(l),
|
|
725
725
|
onInsert: v(x)
|
|
726
726
|
}, null, 8, ["disabled", "onInsert"])) : _("", !0)]));
|
|
727
727
|
}
|
|
728
|
-
}), [["__scopeId", "data-v-358207dd"]]),
|
|
728
|
+
}), [["__scopeId", "data-v-358207dd"]]), qn = { class: "tpl:mb-3.5" }, Jn = ["value"], Yn = { value: "" }, Xn = ["value"], Zn = { class: "tpl:mb-3.5" }, Qn = { class: "tpl:mb-3.5" }, $n = {
|
|
729
729
|
key: 0,
|
|
730
730
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
731
|
-
},
|
|
731
|
+
}, er = ["checked"], tr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, nr = { class: "tpl:mb-3.5" }, rr = { class: "tpl:mb-3.5" }, ir = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, ar = { class: "tpl:mb-3.5" }, or = { class: "tpl:flex tpl:items-stretch" }, sr = ["value"], cr = { class: "tpl:mb-3.5" }, lr = { class: "tpl:flex tpl:items-stretch" }, ur = ["value"], dr = /* @__PURE__ */ A({
|
|
732
732
|
__name: "ButtonToolbar",
|
|
733
733
|
props: {
|
|
734
734
|
block: {},
|
|
@@ -736,25 +736,25 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
736
736
|
},
|
|
737
737
|
emits: ["update"],
|
|
738
738
|
setup(e, { emit: t }) {
|
|
739
|
-
let n = t, { t: r } =
|
|
739
|
+
let n = t, { t: r } = R();
|
|
740
740
|
function i(e, t) {
|
|
741
741
|
n("update", { [e]: t });
|
|
742
742
|
}
|
|
743
743
|
return (t, n) => (a(), g(O, null, [
|
|
744
|
-
w("div",
|
|
744
|
+
w("div", qn, [w("label", { class: C(v(W)) }, m(v(r).button.fontFamily), 3), w("select", {
|
|
745
745
|
class: C(v(U)),
|
|
746
746
|
value: e.block.fontFamily || "",
|
|
747
747
|
onChange: n[0] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
748
|
-
}, [w("option",
|
|
748
|
+
}, [w("option", Yn, m(v(r).button.inheritFont), 1), (a(!0), g(O, null, s(e.fontFamilies, (e) => (a(), g("option", {
|
|
749
749
|
key: e.value,
|
|
750
750
|
value: e.value
|
|
751
|
-
}, m(e.label), 9,
|
|
752
|
-
w("div",
|
|
751
|
+
}, m(e.label), 9, Xn))), 128))], 42, Jn)]),
|
|
752
|
+
w("div", Zn, [w("label", { class: C(v(W)) }, m(v(r).button.text), 3), j(X, {
|
|
753
753
|
"model-value": e.block.text,
|
|
754
754
|
type: "text",
|
|
755
755
|
"onUpdate:modelValue": n[1] ||= (e) => i("text", e)
|
|
756
756
|
}, null, 8, ["model-value"])]),
|
|
757
|
-
w("div",
|
|
757
|
+
w("div", Qn, [
|
|
758
758
|
w("label", { class: C(v(W)) }, m(v(r).button.url), 3),
|
|
759
759
|
j(X, {
|
|
760
760
|
"model-value": e.block.url,
|
|
@@ -762,38 +762,38 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
762
762
|
placeholder: v(r).button.urlPlaceholder,
|
|
763
763
|
"onUpdate:modelValue": n[2] ||= (e) => i("url", e)
|
|
764
764
|
}, null, 8, ["model-value", "placeholder"]),
|
|
765
|
-
e.block.url ? (a(), g("label",
|
|
765
|
+
e.block.url ? (a(), g("label", $n, [w("input", {
|
|
766
766
|
type: "checkbox",
|
|
767
767
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
768
768
|
checked: e.block.openInNewTab ?? !1,
|
|
769
769
|
onChange: n[3] ||= (e) => i("openInNewTab", e.target.checked)
|
|
770
|
-
}, null, 40,
|
|
770
|
+
}, null, 40, er), k(" " + m(v(r).button.openInNewTab), 1)])) : _("", !0)
|
|
771
771
|
]),
|
|
772
|
-
w("div",
|
|
772
|
+
w("div", tr, [w("div", nr, [w("label", { class: C(v(W)) }, m(v(r).button.background), 3), j(q, {
|
|
773
773
|
"model-value": e.block.backgroundColor,
|
|
774
774
|
"onUpdate:modelValue": n[4] ||= (e) => i("backgroundColor", e)
|
|
775
|
-
}, null, 8, ["model-value"])]), w("div",
|
|
775
|
+
}, null, 8, ["model-value"])]), w("div", rr, [w("label", { class: C(v(W)) }, m(v(r).button.textColor), 3), j(q, {
|
|
776
776
|
"model-value": e.block.textColor,
|
|
777
777
|
"onUpdate:modelValue": n[5] ||= (e) => i("textColor", e)
|
|
778
778
|
}, null, 8, ["model-value"])])]),
|
|
779
|
-
w("div",
|
|
779
|
+
w("div", ir, [w("div", ar, [w("label", { class: C(v(W)) }, m(v(r).button.borderRadius), 3), w("div", or, [w("input", {
|
|
780
780
|
type: "number",
|
|
781
781
|
class: C(v(K)),
|
|
782
782
|
value: e.block.borderRadius,
|
|
783
783
|
min: "0",
|
|
784
784
|
max: "50",
|
|
785
785
|
onInput: n[6] ||= (e) => i("borderRadius", Number(e.target.value))
|
|
786
|
-
}, null, 42,
|
|
786
|
+
}, null, 42, sr), w("span", { class: C(v(G)) }, "px", 2)])]), w("div", cr, [w("label", { class: C(v(W)) }, m(v(r).button.fontSize), 3), w("div", lr, [w("input", {
|
|
787
787
|
type: "number",
|
|
788
788
|
class: C(v(K)),
|
|
789
789
|
value: e.block.fontSize,
|
|
790
790
|
min: "10",
|
|
791
791
|
max: "36",
|
|
792
792
|
onInput: n[7] ||= (e) => i("fontSize", Number(e.target.value))
|
|
793
|
-
}, null, 42,
|
|
793
|
+
}, null, 42, ur), w("span", { class: C(v(G)) }, "px", 2)])])])
|
|
794
794
|
], 64));
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), fr = { class: "spacing-control" }, pr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, mr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, hr = { class: "tpl:flex tpl:items-center" }, gr = ["aria-label"], _r = ["value", "aria-label"], vr = ["aria-label"], yr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, br = { class: "tpl:flex tpl:items-center" }, xr = ["aria-label"], Sr = ["value", "aria-label"], Cr = ["aria-label"], wr = ["aria-label", "title"], Tr = { class: "tpl:flex tpl:items-center" }, Er = ["aria-label"], Dr = ["value", "aria-label"], Or = ["aria-label"], kr = { class: "tpl:flex tpl:items-center" }, Ar = ["aria-label"], jr = ["value", "aria-label"], Mr = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)] active:tpl:bg-[var(--tpl-bg-active)]", Nr = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", Pr = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
797
797
|
__name: "SpacingControl",
|
|
798
798
|
props: {
|
|
799
799
|
modelValue: {},
|
|
@@ -801,8 +801,8 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
801
801
|
},
|
|
802
802
|
emits: ["update:modelValue"],
|
|
803
803
|
setup(e, { emit: t }) {
|
|
804
|
-
let n = e, r = t, { t: i } =
|
|
805
|
-
|
|
804
|
+
let n = e, r = t, { t: i } = R(), o = h(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), s = d(o.value);
|
|
805
|
+
ee(o, (e) => {
|
|
806
806
|
!e && s.value && (s.value = !1);
|
|
807
807
|
});
|
|
808
808
|
function c(e, t) {
|
|
@@ -840,24 +840,24 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
return (t, n) => (a(), g("div",
|
|
844
|
-
w("div",
|
|
843
|
+
return (t, n) => (a(), g("div", fr, [w("label", pr, m(e.label), 1), w("div", mr, [
|
|
844
|
+
w("div", hr, [
|
|
845
845
|
w("button", {
|
|
846
846
|
"aria-label": v(i).spacingControl.decreaseTop,
|
|
847
847
|
class: C([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
848
848
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
849
|
-
}, [j(v(
|
|
849
|
+
}, [j(v(rt), {
|
|
850
850
|
size: 12,
|
|
851
851
|
"stroke-width": 2
|
|
852
|
-
})], 10,
|
|
852
|
+
})], 10, gr),
|
|
853
853
|
w("input", {
|
|
854
854
|
type: "number",
|
|
855
|
-
class: C(
|
|
855
|
+
class: C(Nr),
|
|
856
856
|
value: e.modelValue.top,
|
|
857
857
|
"aria-label": v(i).spacingControl.top,
|
|
858
858
|
min: "0",
|
|
859
859
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
860
|
-
}, null, 40,
|
|
860
|
+
}, null, 40, _r),
|
|
861
861
|
w("button", {
|
|
862
862
|
"aria-label": v(i).spacingControl.increaseTop,
|
|
863
863
|
class: C([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
@@ -865,26 +865,26 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
865
865
|
}, [j(v(H), {
|
|
866
866
|
size: 12,
|
|
867
867
|
"stroke-width": 2
|
|
868
|
-
})], 10,
|
|
868
|
+
})], 10, vr)
|
|
869
869
|
]),
|
|
870
|
-
w("div",
|
|
871
|
-
w("div",
|
|
870
|
+
w("div", yr, [
|
|
871
|
+
w("div", br, [
|
|
872
872
|
w("button", {
|
|
873
873
|
"aria-label": v(i).spacingControl.decreaseLeft,
|
|
874
874
|
class: C([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
875
875
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
876
|
-
}, [j(v(
|
|
876
|
+
}, [j(v(rt), {
|
|
877
877
|
size: 12,
|
|
878
878
|
"stroke-width": 2
|
|
879
|
-
})], 10,
|
|
879
|
+
})], 10, xr),
|
|
880
880
|
w("input", {
|
|
881
881
|
type: "number",
|
|
882
|
-
class: C(
|
|
882
|
+
class: C(Nr),
|
|
883
883
|
value: e.modelValue.left,
|
|
884
884
|
"aria-label": v(i).spacingControl.left,
|
|
885
885
|
min: "0",
|
|
886
886
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
887
|
-
}, null, 40,
|
|
887
|
+
}, null, 40, Sr),
|
|
888
888
|
w("button", {
|
|
889
889
|
"aria-label": v(i).spacingControl.increaseLeft,
|
|
890
890
|
class: C([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
@@ -892,39 +892,39 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
892
892
|
}, [j(v(H), {
|
|
893
893
|
size: 12,
|
|
894
894
|
"stroke-width": 2
|
|
895
|
-
})], 10,
|
|
895
|
+
})], 10, Cr)
|
|
896
896
|
]),
|
|
897
897
|
w("button", {
|
|
898
898
|
class: C(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", s.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
899
899
|
"aria-label": s.value ? v(i).spacingControl.unlock : v(i).spacingControl.lockAll,
|
|
900
900
|
title: s.value ? v(i).spacingControl.unlock : v(i).spacingControl.lockAll,
|
|
901
901
|
onClick: u
|
|
902
|
-
}, [s.value ? (a(), b(v(
|
|
902
|
+
}, [s.value ? (a(), b(v(at), {
|
|
903
903
|
key: 0,
|
|
904
904
|
size: 14,
|
|
905
905
|
"stroke-width": 2
|
|
906
|
-
})) : (a(), b(v(
|
|
906
|
+
})) : (a(), b(v(st), {
|
|
907
907
|
key: 1,
|
|
908
908
|
size: 14,
|
|
909
909
|
"stroke-width": 2
|
|
910
|
-
}))], 10,
|
|
911
|
-
w("div",
|
|
910
|
+
}))], 10, wr),
|
|
911
|
+
w("div", Tr, [
|
|
912
912
|
w("button", {
|
|
913
913
|
"aria-label": v(i).spacingControl.decreaseRight,
|
|
914
914
|
class: C([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
915
915
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
916
|
-
}, [j(v(
|
|
916
|
+
}, [j(v(rt), {
|
|
917
917
|
size: 12,
|
|
918
918
|
"stroke-width": 2
|
|
919
|
-
})], 10,
|
|
919
|
+
})], 10, Er),
|
|
920
920
|
w("input", {
|
|
921
921
|
type: "number",
|
|
922
|
-
class: C(
|
|
922
|
+
class: C(Nr),
|
|
923
923
|
value: e.modelValue.right,
|
|
924
924
|
"aria-label": v(i).spacingControl.right,
|
|
925
925
|
min: "0",
|
|
926
926
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
927
|
-
}, null, 40,
|
|
927
|
+
}, null, 40, Dr),
|
|
928
928
|
w("button", {
|
|
929
929
|
"aria-label": v(i).spacingControl.increaseRight,
|
|
930
930
|
class: C([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
@@ -932,26 +932,26 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
932
932
|
}, [j(v(H), {
|
|
933
933
|
size: 12,
|
|
934
934
|
"stroke-width": 2
|
|
935
|
-
})], 10,
|
|
935
|
+
})], 10, Or)
|
|
936
936
|
])
|
|
937
937
|
]),
|
|
938
|
-
w("div",
|
|
938
|
+
w("div", kr, [
|
|
939
939
|
w("button", {
|
|
940
940
|
"aria-label": v(i).spacingControl.decreaseBottom,
|
|
941
941
|
class: C([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
942
942
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
943
|
-
}, [j(v(
|
|
943
|
+
}, [j(v(rt), {
|
|
944
944
|
size: 12,
|
|
945
945
|
"stroke-width": 2
|
|
946
|
-
})], 10,
|
|
946
|
+
})], 10, Ar),
|
|
947
947
|
w("input", {
|
|
948
948
|
type: "number",
|
|
949
|
-
class: C(
|
|
949
|
+
class: C(Nr),
|
|
950
950
|
value: e.modelValue.bottom,
|
|
951
951
|
"aria-label": v(i).spacingControl.bottom,
|
|
952
952
|
min: "0",
|
|
953
953
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
954
|
-
}, null, 40,
|
|
954
|
+
}, null, 40, jr),
|
|
955
955
|
w("button", {
|
|
956
956
|
"aria-label": v(i).spacingControl.increaseBottom,
|
|
957
957
|
class: C([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
@@ -959,11 +959,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
959
959
|
}, [j(v(H), {
|
|
960
960
|
size: 12,
|
|
961
961
|
"stroke-width": 2
|
|
962
|
-
})], 10,
|
|
962
|
+
})], 10, Mr)
|
|
963
963
|
])
|
|
964
964
|
])]));
|
|
965
965
|
}
|
|
966
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
966
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Fr = { class: "tpl:mt-3" }, Ir = /* @__PURE__ */ A({
|
|
967
967
|
__name: "CollapsibleSection",
|
|
968
968
|
props: {
|
|
969
969
|
title: {},
|
|
@@ -980,21 +980,21 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
980
980
|
class: C(["tpl:transition-transform tpl:duration-200", t.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
981
981
|
size: 12,
|
|
982
982
|
"stroke-width": 2
|
|
983
|
-
}, null, 8, ["class"]), w("span", null, m(t.title), 1)]), n(w("div",
|
|
983
|
+
}, null, 8, ["class"]), w("span", null, m(t.title), 1)]), n(w("div", Fr, [e(r.$slots, "default")], 512), [[T, t.open]])], 2));
|
|
984
984
|
}
|
|
985
|
-
}),
|
|
985
|
+
}), Lr = { class: "tpl:mt-4" }, Rr = { class: "tpl:space-y-2" }, zr = ["checked", "onChange"], Br = ["value", "placeholder"], Vr = { class: "tpl:space-y-2" }, Hr = ["value"], Ur = { value: "" }, Wr = ["label"], Gr = ["value"], Kr = ["value"], qr = {
|
|
986
986
|
key: 0,
|
|
987
987
|
value: "__custom__"
|
|
988
|
-
},
|
|
988
|
+
}, Jr = {
|
|
989
989
|
key: 0,
|
|
990
990
|
class: "tpl:space-y-2"
|
|
991
|
-
},
|
|
991
|
+
}, Yr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Xr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Zr = { class: "tpl:flex tpl:justify-end" }, Qr = ["disabled"], $r = {
|
|
992
992
|
key: 0,
|
|
993
993
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
994
|
-
},
|
|
994
|
+
}, ei = { class: "tpl:space-y-1" }, ti = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, ni = {
|
|
995
995
|
key: 0,
|
|
996
996
|
class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
997
|
-
},
|
|
997
|
+
}, ri = /* @__PURE__ */ A({
|
|
998
998
|
__name: "CommonBlockSettings",
|
|
999
999
|
props: {
|
|
1000
1000
|
block: {},
|
|
@@ -1002,45 +1002,45 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1002
1002
|
},
|
|
1003
1003
|
emits: ["update"],
|
|
1004
1004
|
setup(e, { emit: t }) {
|
|
1005
|
-
let r = e, o = t, { t: f } =
|
|
1005
|
+
let r = e, o = t, { t: f } = R(), p = c(se, []), y = c(le, !1), x = u(/* @__PURE__ */ new Set()), T = d(!1), E = d(""), D = d(""), A = [
|
|
1006
1006
|
{
|
|
1007
1007
|
key: "desktop",
|
|
1008
|
-
icon:
|
|
1008
|
+
icon: lt,
|
|
1009
1009
|
labelKey: "showOnDesktop"
|
|
1010
1010
|
},
|
|
1011
1011
|
{
|
|
1012
1012
|
key: "tablet",
|
|
1013
|
-
icon:
|
|
1013
|
+
icon: vt,
|
|
1014
1014
|
labelKey: "showOnTablet"
|
|
1015
1015
|
},
|
|
1016
1016
|
{
|
|
1017
1017
|
key: "mobile",
|
|
1018
|
-
icon:
|
|
1018
|
+
icon: xt,
|
|
1019
1019
|
labelKey: "showOnMobile"
|
|
1020
1020
|
}
|
|
1021
1021
|
];
|
|
1022
|
-
function
|
|
1022
|
+
function M(e) {
|
|
1023
1023
|
x.has(e) ? x.delete(e) : x.add(e);
|
|
1024
1024
|
}
|
|
1025
|
-
let
|
|
1026
|
-
function
|
|
1025
|
+
let N = h(() => p.length > 0 || y), P = h(() => r.block.displayCondition ? !p.some((e) => e.label === r.block.displayCondition?.label) : !1);
|
|
1026
|
+
function te() {
|
|
1027
1027
|
T.value = !0, P.value && r.block.displayCondition ? (E.value = r.block.displayCondition.before, D.value = r.block.displayCondition.after ?? "") : (E.value = "", D.value = "");
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function F() {
|
|
1030
1030
|
E.value.trim() && (o("update", { displayCondition: {
|
|
1031
1031
|
label: f.blockSettings.customCondition,
|
|
1032
1032
|
before: E.value.trim(),
|
|
1033
1033
|
after: D.value.trim()
|
|
1034
1034
|
} }), T.value = !1, E.value = "", D.value = "");
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
ee(() => r.block.displayCondition, (e) => {
|
|
1037
1037
|
if (!e) {
|
|
1038
1038
|
T.value = !1, E.value = "", D.value = "";
|
|
1039
1039
|
return;
|
|
1040
1040
|
}
|
|
1041
1041
|
P.value && (E.value = e.before, D.value = e.after ?? "");
|
|
1042
1042
|
}, { immediate: !0 });
|
|
1043
|
-
let
|
|
1043
|
+
let I = h(() => {
|
|
1044
1044
|
let e = {};
|
|
1045
1045
|
for (let t of p) {
|
|
1046
1046
|
let n = t.group ?? "";
|
|
@@ -1048,38 +1048,38 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return e;
|
|
1050
1050
|
});
|
|
1051
|
-
function
|
|
1051
|
+
function L(e, t) {
|
|
1052
1052
|
o("update", { styles: {
|
|
1053
1053
|
...r.block.styles,
|
|
1054
1054
|
[e]: t
|
|
1055
1055
|
} });
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function z(e) {
|
|
1058
1058
|
return r.block.visibility?.[e] !== !1;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function B(e) {
|
|
1061
1061
|
let t = {
|
|
1062
|
-
desktop:
|
|
1063
|
-
tablet:
|
|
1064
|
-
mobile:
|
|
1062
|
+
desktop: z("desktop"),
|
|
1063
|
+
tablet: z("tablet"),
|
|
1064
|
+
mobile: z("mobile")
|
|
1065
1065
|
};
|
|
1066
1066
|
t[e] = !t[e], o("update", { visibility: t });
|
|
1067
1067
|
}
|
|
1068
1068
|
return (t, r) => (a(), g("div", { class: C(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1069
|
-
j(
|
|
1069
|
+
j(Ir, {
|
|
1070
1070
|
title: v(f).blockSettings.spacing,
|
|
1071
1071
|
open: x.has("spacing"),
|
|
1072
1072
|
"no-border": e.isFirstSection,
|
|
1073
|
-
onToggle: r[2] ||= (e) =>
|
|
1073
|
+
onToggle: r[2] ||= (e) => M("spacing")
|
|
1074
1074
|
}, {
|
|
1075
|
-
default: l(() => [j(
|
|
1075
|
+
default: l(() => [j(Pr, {
|
|
1076
1076
|
label: v(f).blockSettings.padding,
|
|
1077
1077
|
"model-value": e.block.styles.padding,
|
|
1078
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1079
|
-
}, null, 8, ["label", "model-value"]), w("div",
|
|
1078
|
+
"onUpdate:modelValue": r[0] ||= (e) => L("padding", e)
|
|
1079
|
+
}, null, 8, ["label", "model-value"]), w("div", Lr, [j(Pr, {
|
|
1080
1080
|
label: v(f).blockSettings.margin,
|
|
1081
1081
|
"model-value": e.block.styles.margin,
|
|
1082
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
1082
|
+
"onUpdate:modelValue": r[1] ||= (e) => L("margin", e)
|
|
1083
1083
|
}, null, 8, ["label", "model-value"])])]),
|
|
1084
1084
|
_: 1
|
|
1085
1085
|
}, 8, [
|
|
@@ -1087,33 +1087,33 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1087
1087
|
"open",
|
|
1088
1088
|
"no-border"
|
|
1089
1089
|
]),
|
|
1090
|
-
j(
|
|
1090
|
+
j(Ir, {
|
|
1091
1091
|
title: v(f).blockSettings.background,
|
|
1092
1092
|
open: x.has("bg"),
|
|
1093
|
-
onToggle: r[4] ||= (e) =>
|
|
1093
|
+
onToggle: r[4] ||= (e) => M("bg")
|
|
1094
1094
|
}, {
|
|
1095
1095
|
default: l(() => [w("label", { class: C(v(W)) }, m(v(f).blockSettings.color), 3), j(q, {
|
|
1096
1096
|
size: "large",
|
|
1097
1097
|
"model-value": e.block.styles.backgroundColor || v("#ffffff"),
|
|
1098
|
-
"onUpdate:modelValue": r[3] ||= (e) =>
|
|
1098
|
+
"onUpdate:modelValue": r[3] ||= (e) => L("backgroundColor", e)
|
|
1099
1099
|
}, null, 8, ["model-value"])]),
|
|
1100
1100
|
_: 1
|
|
1101
1101
|
}, 8, ["title", "open"]),
|
|
1102
|
-
j(
|
|
1102
|
+
j(Ir, {
|
|
1103
1103
|
title: v(f).blockSettings.display,
|
|
1104
1104
|
open: x.has("display"),
|
|
1105
|
-
onToggle: r[5] ||= (e) =>
|
|
1105
|
+
onToggle: r[5] ||= (e) => M("display")
|
|
1106
1106
|
}, {
|
|
1107
|
-
default: l(() => [w("div",
|
|
1107
|
+
default: l(() => [w("div", Rr, [(a(), g(O, null, s(A, (e) => w("label", {
|
|
1108
1108
|
key: e.key,
|
|
1109
1109
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1110
1110
|
}, [
|
|
1111
1111
|
w("input", {
|
|
1112
1112
|
type: "checkbox",
|
|
1113
1113
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1114
|
-
checked:
|
|
1115
|
-
onChange: (t) =>
|
|
1116
|
-
}, null, 40,
|
|
1114
|
+
checked: z(e.key),
|
|
1115
|
+
onChange: (t) => B(e.key)
|
|
1116
|
+
}, null, 40, zr),
|
|
1117
1117
|
(a(), b(i(e.icon), {
|
|
1118
1118
|
size: 14,
|
|
1119
1119
|
"stroke-width": 1.5
|
|
@@ -1122,33 +1122,33 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1122
1122
|
])), 64))])]),
|
|
1123
1123
|
_: 1
|
|
1124
1124
|
}, 8, ["title", "open"]),
|
|
1125
|
-
j(
|
|
1125
|
+
j(Ir, {
|
|
1126
1126
|
title: v(f).blockSettings.customCss,
|
|
1127
1127
|
open: x.has("css"),
|
|
1128
|
-
onToggle: r[7] ||= (e) =>
|
|
1128
|
+
onToggle: r[7] ||= (e) => M("css")
|
|
1129
1129
|
}, {
|
|
1130
1130
|
default: l(() => [w("label", { class: C(v(W)) }, m(v(f).blockSettings.css), 3), w("textarea", {
|
|
1131
1131
|
value: e.block.customCss || "",
|
|
1132
1132
|
placeholder: v(f).blockSettings.cssPlaceholder,
|
|
1133
1133
|
rows: "3",
|
|
1134
|
-
class: C(v(
|
|
1134
|
+
class: C(v(kt)),
|
|
1135
1135
|
onInput: r[6] ||= (e) => o("update", { customCss: e.target.value })
|
|
1136
|
-
}, null, 42,
|
|
1136
|
+
}, null, 42, Br)]),
|
|
1137
1137
|
_: 1
|
|
1138
1138
|
}, 8, ["title", "open"]),
|
|
1139
|
-
|
|
1139
|
+
N.value ? (a(), b(Ir, {
|
|
1140
1140
|
key: 0,
|
|
1141
1141
|
title: v(f).blockSettings.displayCondition,
|
|
1142
1142
|
open: x.has("condition"),
|
|
1143
|
-
onToggle: r[11] ||= (e) =>
|
|
1143
|
+
onToggle: r[11] ||= (e) => M("condition")
|
|
1144
1144
|
}, {
|
|
1145
|
-
default: l(() => [w("div",
|
|
1145
|
+
default: l(() => [w("div", Vr, [w("select", {
|
|
1146
1146
|
class: C(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:duration-150 tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
|
|
1147
1147
|
value: T.value || P.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1148
1148
|
onChange: r[8] ||= (e) => {
|
|
1149
1149
|
let t = e.target.value;
|
|
1150
1150
|
if (t === "__custom__") {
|
|
1151
|
-
|
|
1151
|
+
te();
|
|
1152
1152
|
return;
|
|
1153
1153
|
}
|
|
1154
1154
|
if (T.value = !1, !t) {
|
|
@@ -1159,48 +1159,48 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1159
1159
|
n && o("update", { displayCondition: n });
|
|
1160
1160
|
}
|
|
1161
1161
|
}, [
|
|
1162
|
-
w("option",
|
|
1163
|
-
(a(!0), g(O, null, s(
|
|
1162
|
+
w("option", Ur, m(v(f).blockSettings.noCondition), 1),
|
|
1163
|
+
(a(!0), g(O, null, s(I.value, (e, t) => (a(), g(O, { key: t }, [t ? (a(), g("optgroup", {
|
|
1164
1164
|
key: 0,
|
|
1165
1165
|
label: String(t)
|
|
1166
1166
|
}, [(a(!0), g(O, null, s(e, (e) => (a(), g("option", {
|
|
1167
1167
|
key: e.label,
|
|
1168
1168
|
value: e.label
|
|
1169
|
-
}, m(e.label), 9,
|
|
1169
|
+
}, m(e.label), 9, Gr))), 128))], 8, Wr)) : (a(!0), g(O, { key: 1 }, s(e, (e) => (a(), g("option", {
|
|
1170
1170
|
key: e.label,
|
|
1171
1171
|
value: e.label
|
|
1172
|
-
}, m(e.label), 9,
|
|
1173
|
-
v(y) ? (a(), g("option",
|
|
1174
|
-
], 42,
|
|
1175
|
-
w("div", null, [w("label",
|
|
1172
|
+
}, m(e.label), 9, Kr))), 128))], 64))), 128)),
|
|
1173
|
+
v(y) ? (a(), g("option", qr, m(v(f).blockSettings.customCondition), 1)) : _("", !0)
|
|
1174
|
+
], 42, Hr), T.value || P.value ? (a(), g("div", Jr, [
|
|
1175
|
+
w("div", null, [w("label", Yr, m(v(f).blockSettings.customConditionBefore), 1), n(w("textarea", {
|
|
1176
1176
|
"onUpdate:modelValue": r[9] ||= (e) => E.value = e,
|
|
1177
1177
|
rows: "2",
|
|
1178
|
-
class: C(v(
|
|
1178
|
+
class: C(v(kt))
|
|
1179
1179
|
}, null, 2), [[S, E.value]])]),
|
|
1180
|
-
w("div", null, [w("label",
|
|
1180
|
+
w("div", null, [w("label", Xr, m(v(f).blockSettings.customConditionAfter), 1), n(w("textarea", {
|
|
1181
1181
|
"onUpdate:modelValue": r[10] ||= (e) => D.value = e,
|
|
1182
1182
|
rows: "2",
|
|
1183
|
-
class: C(v(
|
|
1183
|
+
class: C(v(kt))
|
|
1184
1184
|
}, null, 2), [[S, D.value]])]),
|
|
1185
|
-
w("div",
|
|
1185
|
+
w("div", Zr, [w("button", {
|
|
1186
1186
|
type: "button",
|
|
1187
1187
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:opacity-50",
|
|
1188
1188
|
disabled: !E.value.trim(),
|
|
1189
|
-
onClick:
|
|
1190
|
-
}, m(v(f).blockSettings.applyCondition), 9,
|
|
1191
|
-
])) : e.block.displayCondition && !P.value ? (a(), g(O, { key: 1 }, [e.block.displayCondition.description ? (a(), g("p",
|
|
1189
|
+
onClick: F
|
|
1190
|
+
}, m(v(f).blockSettings.applyCondition), 9, Qr)])
|
|
1191
|
+
])) : e.block.displayCondition && !P.value ? (a(), g(O, { key: 1 }, [e.block.displayCondition.description ? (a(), g("p", $r, m(e.block.displayCondition.description), 1)) : _("", !0), w("div", ei, [w("pre", ti, m(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (a(), g("pre", ni, m(e.block.displayCondition.after), 1)) : _("", !0)])], 64)) : _("", !0)])]),
|
|
1192
1192
|
_: 1
|
|
1193
1193
|
}, 8, ["title", "open"])) : _("", !0)
|
|
1194
1194
|
], 2));
|
|
1195
1195
|
}
|
|
1196
|
-
}),
|
|
1196
|
+
}), ii = ["title"], ai = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, oi = {
|
|
1197
1197
|
key: 1,
|
|
1198
1198
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1199
|
-
},
|
|
1199
|
+
}, si = [
|
|
1200
1200
|
"aria-checked",
|
|
1201
1201
|
"aria-label",
|
|
1202
1202
|
"disabled"
|
|
1203
|
-
],
|
|
1203
|
+
], ci = /* @__PURE__ */ A({
|
|
1204
1204
|
__name: "BooleanField",
|
|
1205
1205
|
props: {
|
|
1206
1206
|
field: {},
|
|
@@ -1209,18 +1209,18 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1209
1209
|
},
|
|
1210
1210
|
emits: ["update:modelValue"],
|
|
1211
1211
|
setup(e, { emit: t }) {
|
|
1212
|
-
let n = t, { t: r } =
|
|
1212
|
+
let n = t, { t: r } = R();
|
|
1213
1213
|
return (t, i) => (a(), g("div", {
|
|
1214
1214
|
class: "tpl:mb-3.5",
|
|
1215
1215
|
title: e.readOnly ? v(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1216
|
-
}, [w("label", { class: C(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [w("span",
|
|
1216
|
+
}, [w("label", { class: C(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [w("span", ai, [
|
|
1217
1217
|
k(m(e.field.label) + " ", 1),
|
|
1218
|
-
e.readOnly ? (a(), b(v(
|
|
1218
|
+
e.readOnly ? (a(), b(v(at), {
|
|
1219
1219
|
key: 0,
|
|
1220
1220
|
size: 12,
|
|
1221
1221
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1222
1222
|
})) : _("", !0),
|
|
1223
|
-
e.field.required ? (a(), g("span",
|
|
1223
|
+
e.field.required ? (a(), g("span", oi, " * ")) : _("", !0)
|
|
1224
1224
|
]), w("button", {
|
|
1225
1225
|
type: "button",
|
|
1226
1226
|
role: "switch",
|
|
@@ -1233,9 +1233,9 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1233
1233
|
]),
|
|
1234
1234
|
disabled: e.readOnly,
|
|
1235
1235
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1236
|
-
}, [w("span", { class: C(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10,
|
|
1236
|
+
}, [w("span", { class: C(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, si)], 2)], 8, ii));
|
|
1237
1237
|
}
|
|
1238
|
-
}),
|
|
1238
|
+
}), li = { class: "tpl:mb-3.5" }, ui = {
|
|
1239
1239
|
key: 1,
|
|
1240
1240
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1241
1241
|
}, Q = /* @__PURE__ */ A({
|
|
@@ -1246,17 +1246,17 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1246
1246
|
readOnly: { type: Boolean }
|
|
1247
1247
|
},
|
|
1248
1248
|
setup(t) {
|
|
1249
|
-
return (n, r) => (a(), g("div",
|
|
1249
|
+
return (n, r) => (a(), g("div", li, [w("label", { class: C(v(W)) }, [
|
|
1250
1250
|
k(m(t.label) + " ", 1),
|
|
1251
|
-
t.readOnly ? (a(), b(v(
|
|
1251
|
+
t.readOnly ? (a(), b(v(at), {
|
|
1252
1252
|
key: 0,
|
|
1253
1253
|
size: 12,
|
|
1254
1254
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1255
1255
|
})) : _("", !0),
|
|
1256
|
-
t.required ? (a(), g("span",
|
|
1256
|
+
t.required ? (a(), g("span", ui, "*")) : _("", !0)
|
|
1257
1257
|
], 2), e(n.$slots, "default")]));
|
|
1258
1258
|
}
|
|
1259
|
-
}),
|
|
1259
|
+
}), di = /* @__PURE__ */ A({
|
|
1260
1260
|
__name: "ColorField",
|
|
1261
1261
|
props: {
|
|
1262
1262
|
field: {},
|
|
@@ -1265,7 +1265,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1265
1265
|
},
|
|
1266
1266
|
emits: ["update:modelValue"],
|
|
1267
1267
|
setup(e, { emit: t }) {
|
|
1268
|
-
let n = t, { t: r } =
|
|
1268
|
+
let n = t, { t: r } = R();
|
|
1269
1269
|
return (t, i) => (a(), b(Q, {
|
|
1270
1270
|
label: e.field.label,
|
|
1271
1271
|
required: e.field.required,
|
|
@@ -1290,11 +1290,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1290
1290
|
"read-only"
|
|
1291
1291
|
]));
|
|
1292
1292
|
}
|
|
1293
|
-
}),
|
|
1293
|
+
}), fi = [
|
|
1294
1294
|
"value",
|
|
1295
1295
|
"placeholder",
|
|
1296
1296
|
"title"
|
|
1297
|
-
],
|
|
1297
|
+
], pi = ["value", "placeholder"], mi = /* @__PURE__ */ A({
|
|
1298
1298
|
__name: "ImageField",
|
|
1299
1299
|
props: {
|
|
1300
1300
|
field: {},
|
|
@@ -1303,7 +1303,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1303
1303
|
},
|
|
1304
1304
|
emits: ["update:modelValue"],
|
|
1305
1305
|
setup(e, { emit: t }) {
|
|
1306
|
-
let n = t, { t: r } =
|
|
1306
|
+
let n = t, { t: r } = R(), i = c(Ee, null), o = z(), s = h(() => !!i);
|
|
1307
1307
|
async function u() {
|
|
1308
1308
|
let e = await i?.({ accept: ["images"] });
|
|
1309
1309
|
o.alive && e && n("update:modelValue", e.url);
|
|
@@ -1321,14 +1321,14 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1321
1321
|
placeholder: e.field.placeholder || "https://...",
|
|
1322
1322
|
disabled: "",
|
|
1323
1323
|
title: v(r).customBlocks.dataSource.readOnlyTooltip
|
|
1324
|
-
}, null, 10,
|
|
1324
|
+
}, null, 10, fi)) : (a(), g("input", {
|
|
1325
1325
|
key: 1,
|
|
1326
1326
|
type: "url",
|
|
1327
1327
|
class: C(v(U)),
|
|
1328
1328
|
value: e.modelValue,
|
|
1329
1329
|
placeholder: e.field.placeholder || "https://...",
|
|
1330
1330
|
onInput: i[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
1331
|
-
}, null, 42,
|
|
1331
|
+
}, null, 42, pi)), s.value && !e.readOnly ? (a(), g("button", {
|
|
1332
1332
|
key: 2,
|
|
1333
1333
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1334
1334
|
onClick: i[1] ||= (e) => u()
|
|
@@ -1343,7 +1343,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1343
1343
|
"read-only"
|
|
1344
1344
|
]));
|
|
1345
1345
|
}
|
|
1346
|
-
}),
|
|
1346
|
+
}), hi = [
|
|
1347
1347
|
"value",
|
|
1348
1348
|
"placeholder",
|
|
1349
1349
|
"min",
|
|
@@ -1351,7 +1351,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1351
1351
|
"step",
|
|
1352
1352
|
"disabled",
|
|
1353
1353
|
"title"
|
|
1354
|
-
],
|
|
1354
|
+
], gi = /* @__PURE__ */ A({
|
|
1355
1355
|
__name: "NumberField",
|
|
1356
1356
|
props: {
|
|
1357
1357
|
field: {},
|
|
@@ -1360,7 +1360,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1360
1360
|
},
|
|
1361
1361
|
emits: ["update:modelValue"],
|
|
1362
1362
|
setup(e, { emit: t }) {
|
|
1363
|
-
let n = t, { t: r } =
|
|
1363
|
+
let n = t, { t: r } = R();
|
|
1364
1364
|
return (t, i) => (a(), b(Q, {
|
|
1365
1365
|
label: e.field.label,
|
|
1366
1366
|
required: e.field.required,
|
|
@@ -1377,7 +1377,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1377
1377
|
disabled: e.readOnly,
|
|
1378
1378
|
title: e.readOnly ? v(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1379
1379
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1380
|
-
}, null, 42,
|
|
1380
|
+
}, null, 42, hi)]),
|
|
1381
1381
|
_: 1
|
|
1382
1382
|
}, 8, [
|
|
1383
1383
|
"label",
|
|
@@ -1385,10 +1385,10 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1385
1385
|
"read-only"
|
|
1386
1386
|
]));
|
|
1387
1387
|
}
|
|
1388
|
-
}),
|
|
1388
|
+
}), _i = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, vi = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, yi = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, bi = ["title", "onClick"], xi = {
|
|
1389
1389
|
key: 1,
|
|
1390
1390
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1391
|
-
},
|
|
1391
|
+
}, Si = /* @__PURE__ */ A({
|
|
1392
1392
|
__name: "RepeatableField",
|
|
1393
1393
|
props: {
|
|
1394
1394
|
field: {},
|
|
@@ -1397,7 +1397,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1397
1397
|
},
|
|
1398
1398
|
emits: ["update:modelValue"],
|
|
1399
1399
|
setup(e, { emit: t }) {
|
|
1400
|
-
let n = e, r = t, { t: o } =
|
|
1400
|
+
let n = e, r = t, { t: o } = R(), c = h(() => n.modelValue || []), u = h(() => !n.field.maxItems || c.value.length < n.field.maxItems), d = h(() => !n.field.minItems || c.value.length > n.field.minItems);
|
|
1401
1401
|
function f() {
|
|
1402
1402
|
if (!u.value || n.readOnly) return;
|
|
1403
1403
|
let e = {};
|
|
@@ -1420,11 +1420,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1420
1420
|
required: e.field.required,
|
|
1421
1421
|
"read-only": e.readOnly
|
|
1422
1422
|
}, {
|
|
1423
|
-
default: l(() => [w("div",
|
|
1423
|
+
default: l(() => [w("div", _i, [
|
|
1424
1424
|
(a(!0), g(O, null, s(c.value, (t, n) => (a(), g("div", {
|
|
1425
1425
|
key: `${e.field.key}-${n}`,
|
|
1426
1426
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1427
|
-
}, [w("div",
|
|
1427
|
+
}, [w("div", vi, [w("span", yi, " #" + m(n + 1), 1), d.value && !e.readOnly ? (a(), g("button", {
|
|
1428
1428
|
key: 0,
|
|
1429
1429
|
type: "button",
|
|
1430
1430
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
@@ -1433,7 +1433,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1433
1433
|
}, [j(v(je), {
|
|
1434
1434
|
size: 12,
|
|
1435
1435
|
"stroke-width": 2
|
|
1436
|
-
})], 8,
|
|
1436
|
+
})], 8, bi)) : _("", !0)]), (a(!0), g(O, null, s(e.field.fields, (r) => (a(), b(i(v(ji)(r.type)), {
|
|
1437
1437
|
key: r.key,
|
|
1438
1438
|
field: r,
|
|
1439
1439
|
"model-value": t[r.key],
|
|
@@ -1448,13 +1448,13 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1448
1448
|
u.value && !e.readOnly ? (a(), g("button", {
|
|
1449
1449
|
key: 0,
|
|
1450
1450
|
type: "button",
|
|
1451
|
-
class: C(v(
|
|
1451
|
+
class: C(v(Ot)),
|
|
1452
1452
|
onClick: f
|
|
1453
1453
|
}, [j(v(H), {
|
|
1454
1454
|
size: 14,
|
|
1455
1455
|
"stroke-width": 2
|
|
1456
1456
|
}), k(" " + m(v(o).customBlocks.fields.addItem), 1)], 2)) : _("", !0),
|
|
1457
|
-
!u.value && !e.readOnly ? (a(), g("p",
|
|
1457
|
+
!u.value && !e.readOnly ? (a(), g("p", xi, m(v(o).customBlocks.fields.maxItemsReached), 1)) : _("", !0)
|
|
1458
1458
|
])]),
|
|
1459
1459
|
_: 1
|
|
1460
1460
|
}, 8, [
|
|
@@ -1463,11 +1463,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1463
1463
|
"read-only"
|
|
1464
1464
|
]));
|
|
1465
1465
|
}
|
|
1466
|
-
}),
|
|
1466
|
+
}), Ci = [
|
|
1467
1467
|
"value",
|
|
1468
1468
|
"disabled",
|
|
1469
1469
|
"title"
|
|
1470
|
-
],
|
|
1470
|
+
], wi = ["value"], Ti = /* @__PURE__ */ A({
|
|
1471
1471
|
__name: "SelectField",
|
|
1472
1472
|
props: {
|
|
1473
1473
|
field: {},
|
|
@@ -1476,7 +1476,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1476
1476
|
},
|
|
1477
1477
|
emits: ["update:modelValue"],
|
|
1478
1478
|
setup(e, { emit: t }) {
|
|
1479
|
-
let n = t, { t: r } =
|
|
1479
|
+
let n = t, { t: r } = R();
|
|
1480
1480
|
return (t, i) => (a(), b(Q, {
|
|
1481
1481
|
label: e.field.label,
|
|
1482
1482
|
required: e.field.required,
|
|
@@ -1491,7 +1491,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1491
1491
|
}, [(a(!0), g(O, null, s(e.field.options, (e) => (a(), g("option", {
|
|
1492
1492
|
key: e.value,
|
|
1493
1493
|
value: e.value
|
|
1494
|
-
}, m(e.label), 9,
|
|
1494
|
+
}, m(e.label), 9, wi))), 128))], 42, Ci)]),
|
|
1495
1495
|
_: 1
|
|
1496
1496
|
}, 8, [
|
|
1497
1497
|
"label",
|
|
@@ -1499,11 +1499,11 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1499
1499
|
"read-only"
|
|
1500
1500
|
]));
|
|
1501
1501
|
}
|
|
1502
|
-
}),
|
|
1502
|
+
}), Ei = [
|
|
1503
1503
|
"value",
|
|
1504
1504
|
"placeholder",
|
|
1505
1505
|
"title"
|
|
1506
|
-
],
|
|
1506
|
+
], Di = /* @__PURE__ */ A({
|
|
1507
1507
|
__name: "TextField",
|
|
1508
1508
|
props: {
|
|
1509
1509
|
field: {},
|
|
@@ -1512,7 +1512,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1512
1512
|
},
|
|
1513
1513
|
emits: ["update:modelValue"],
|
|
1514
1514
|
setup(e, { emit: t }) {
|
|
1515
|
-
let n = t, { t: r } =
|
|
1515
|
+
let n = t, { t: r } = R();
|
|
1516
1516
|
return (t, i) => (a(), b(Q, {
|
|
1517
1517
|
label: e.field.label,
|
|
1518
1518
|
required: e.field.required,
|
|
@@ -1526,7 +1526,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1526
1526
|
placeholder: e.field.placeholder,
|
|
1527
1527
|
disabled: "",
|
|
1528
1528
|
title: v(r).customBlocks.dataSource.readOnlyTooltip
|
|
1529
|
-
}, null, 10,
|
|
1529
|
+
}, null, 10, Ei)) : (a(), b(X, {
|
|
1530
1530
|
key: 1,
|
|
1531
1531
|
"model-value": e.modelValue,
|
|
1532
1532
|
placeholder: e.field.placeholder,
|
|
@@ -1539,12 +1539,12 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1539
1539
|
"read-only"
|
|
1540
1540
|
]));
|
|
1541
1541
|
}
|
|
1542
|
-
}),
|
|
1542
|
+
}), Oi = [
|
|
1543
1543
|
"value",
|
|
1544
1544
|
"placeholder",
|
|
1545
1545
|
"title"
|
|
1546
|
-
],
|
|
1547
|
-
text:
|
|
1546
|
+
], ki = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:opacity-60 tpl:cursor-not-allowed", Ai = {
|
|
1547
|
+
text: Di,
|
|
1548
1548
|
textarea: /* @__PURE__ */ A({
|
|
1549
1549
|
__name: "TextareaField",
|
|
1550
1550
|
props: {
|
|
@@ -1554,7 +1554,7 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1554
1554
|
},
|
|
1555
1555
|
emits: ["update:modelValue"],
|
|
1556
1556
|
setup(e, { emit: t }) {
|
|
1557
|
-
let n = t, { t: r } =
|
|
1557
|
+
let n = t, { t: r } = R();
|
|
1558
1558
|
return (t, i) => (a(), b(Q, {
|
|
1559
1559
|
label: e.field.label,
|
|
1560
1560
|
required: e.field.required,
|
|
@@ -1567,8 +1567,8 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1567
1567
|
rows: "3",
|
|
1568
1568
|
disabled: "",
|
|
1569
1569
|
title: v(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1570
|
-
class: C(
|
|
1571
|
-
}, null, 8,
|
|
1570
|
+
class: C(ki)
|
|
1571
|
+
}, null, 8, Oi)) : (a(), b(hn, {
|
|
1572
1572
|
key: 1,
|
|
1573
1573
|
"model-value": e.modelValue,
|
|
1574
1574
|
placeholder: e.field.placeholder,
|
|
@@ -1582,42 +1582,42 @@ var Qt = ["aria-label", "onKeydown"], $t = ["data-tooltip"], en = ["data-tooltip
|
|
|
1582
1582
|
]));
|
|
1583
1583
|
}
|
|
1584
1584
|
}),
|
|
1585
|
-
image:
|
|
1586
|
-
color:
|
|
1587
|
-
number:
|
|
1588
|
-
select:
|
|
1589
|
-
boolean:
|
|
1590
|
-
repeatable:
|
|
1585
|
+
image: mi,
|
|
1586
|
+
color: di,
|
|
1587
|
+
number: gi,
|
|
1588
|
+
select: Ti,
|
|
1589
|
+
boolean: ci,
|
|
1590
|
+
repeatable: Si
|
|
1591
1591
|
};
|
|
1592
|
-
function
|
|
1593
|
-
return
|
|
1592
|
+
function ji(e) {
|
|
1593
|
+
return Ai[e] ?? Di;
|
|
1594
1594
|
}
|
|
1595
1595
|
//#endregion
|
|
1596
1596
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1597
|
-
var
|
|
1597
|
+
var Mi = {
|
|
1598
1598
|
key: 0,
|
|
1599
1599
|
class: "tpl:p-4"
|
|
1600
|
-
},
|
|
1600
|
+
}, Ni = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Pi = { key: 1 }, Fi = {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1603
|
-
},
|
|
1603
|
+
}, Ii = {
|
|
1604
1604
|
key: 1,
|
|
1605
1605
|
class: "tpl:mb-4"
|
|
1606
|
-
},
|
|
1606
|
+
}, Li = {
|
|
1607
1607
|
key: 1,
|
|
1608
1608
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1609
|
-
},
|
|
1609
|
+
}, Ri = {
|
|
1610
1610
|
key: 0,
|
|
1611
1611
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1612
|
-
},
|
|
1612
|
+
}, zi = {
|
|
1613
1613
|
key: 2,
|
|
1614
1614
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1615
|
-
},
|
|
1615
|
+
}, Bi = /* @__PURE__ */ A({
|
|
1616
1616
|
__name: "CustomBlockToolbar",
|
|
1617
1617
|
props: { block: {} },
|
|
1618
1618
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1619
1619
|
setup(e, { emit: t }) {
|
|
1620
|
-
let n = e, r = t, { t: o } =
|
|
1620
|
+
let n = e, r = t, { t: o } = R(), l = c(B, []), u = h(() => l.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: y, needsFetch: x } = Re({
|
|
1621
1621
|
definition: u,
|
|
1622
1622
|
block: h(() => n.block),
|
|
1623
1623
|
onUpdate: (e, t) => {
|
|
@@ -1633,23 +1633,23 @@ var Ai = {
|
|
|
1633
1633
|
[e]: t
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
|
-
return (t, n) => u.value ? (a(), g("div",
|
|
1637
|
-
u.value.description ? (a(), g("p",
|
|
1638
|
-
v(y) ? (a(), g("div",
|
|
1636
|
+
return (t, n) => u.value ? (a(), g("div", Pi, [
|
|
1637
|
+
u.value.description ? (a(), g("p", Fi, m(u.value.description), 1)) : _("", !0),
|
|
1638
|
+
v(y) ? (a(), g("div", Ii, [v(x) && !v(d) ? (a(), g("button", {
|
|
1639
1639
|
key: 0,
|
|
1640
1640
|
type: "button",
|
|
1641
1641
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:bg-[var(--tpl-primary)]",
|
|
1642
1642
|
onClick: n[0] ||= (...e) => v(p) && v(p)(...e)
|
|
1643
|
-
}, m(u.value?.dataSource?.label || v(o).customBlocks.dataSource.fetchButton), 1)) : (a(), g("div",
|
|
1643
|
+
}, m(u.value?.dataSource?.label || v(o).customBlocks.dataSource.fetchButton), 1)) : (a(), g("div", Li, [v(d) ? (a(), g("div", Ri, m(v(o).customBlocks.dataSource.fetching), 1)) : (a(), g("button", {
|
|
1644
1644
|
key: 1,
|
|
1645
1645
|
type: "button",
|
|
1646
1646
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
|
|
1647
1647
|
onClick: n[1] ||= (...e) => v(p) && v(p)(...e)
|
|
1648
|
-
}, [j(v(ze), { size: 12 }), k(" " + m(v(o).customBlocks.dataSource.changeButton), 1)]))])), v(f) ? (a(), g("p",
|
|
1648
|
+
}, [j(v(ze), { size: 12 }), k(" " + m(v(o).customBlocks.dataSource.changeButton), 1)]))])), v(f) ? (a(), g("p", zi, [j(v(F), {
|
|
1649
1649
|
size: 14,
|
|
1650
1650
|
class: "tpl:shrink-0"
|
|
1651
1651
|
}), k(" " + m(v(o).customBlocks.dataSource.fetchError), 1)])) : _("", !0)])) : _("", !0),
|
|
1652
|
-
(a(!0), g(O, null, s(u.value.fields, (t) => (a(), b(i(v(
|
|
1652
|
+
(a(!0), g(O, null, s(u.value.fields, (t) => (a(), b(i(v(ji)(t.type)), {
|
|
1653
1653
|
key: t.key,
|
|
1654
1654
|
field: t,
|
|
1655
1655
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1661,19 +1661,19 @@ var Ai = {
|
|
|
1661
1661
|
"read-only",
|
|
1662
1662
|
"onUpdate:modelValue"
|
|
1663
1663
|
]))), 128))
|
|
1664
|
-
])) : (a(), g("div",
|
|
1664
|
+
])) : (a(), g("div", Mi, [w("p", Ni, m(v(o).customBlocks.toolbar.noDefinition), 1)]));
|
|
1665
1665
|
}
|
|
1666
|
-
}),
|
|
1666
|
+
}), Vi = { class: "tpl:mb-3.5" }, Hi = { class: "tpl:mb-3.5" }, Ui = { class: "tpl:mb-3.5" }, Wi = { class: "tpl:flex tpl:items-stretch" }, Gi = ["value"], Ki = /* @__PURE__ */ A({
|
|
1667
1667
|
__name: "DividerToolbar",
|
|
1668
1668
|
props: { block: {} },
|
|
1669
1669
|
emits: ["update"],
|
|
1670
1670
|
setup(e, { emit: t }) {
|
|
1671
|
-
let n = t, { t: r } =
|
|
1671
|
+
let n = t, { t: r } = R();
|
|
1672
1672
|
function i(e, t) {
|
|
1673
1673
|
n("update", { [e]: t });
|
|
1674
1674
|
}
|
|
1675
1675
|
return (t, n) => (a(), g(O, null, [
|
|
1676
|
-
w("div",
|
|
1676
|
+
w("div", Vi, [w("label", { class: C(v(W)) }, m(v(r).divider.style), 3), j(Y, {
|
|
1677
1677
|
options: [
|
|
1678
1678
|
{
|
|
1679
1679
|
value: "solid",
|
|
@@ -1691,53 +1691,53 @@ var Ai = {
|
|
|
1691
1691
|
"model-value": e.block.lineStyle,
|
|
1692
1692
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
1693
1693
|
}, null, 8, ["options", "model-value"])]),
|
|
1694
|
-
w("div",
|
|
1694
|
+
w("div", Hi, [w("label", { class: C(v(W)) }, m(v(r).divider.color), 3), j(q, {
|
|
1695
1695
|
"model-value": e.block.color,
|
|
1696
1696
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
1697
1697
|
}, null, 8, ["model-value"])]),
|
|
1698
|
-
w("div",
|
|
1698
|
+
w("div", Ui, [w("label", { class: C(v(W)) }, m(v(r).divider.thickness), 3), w("div", Wi, [w("input", {
|
|
1699
1699
|
type: "number",
|
|
1700
1700
|
class: C(v(K)),
|
|
1701
1701
|
value: e.block.thickness,
|
|
1702
1702
|
min: "1",
|
|
1703
1703
|
max: "10",
|
|
1704
1704
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
1705
|
-
}, null, 42,
|
|
1705
|
+
}, null, 42, Gi), w("span", { class: C(v(G)) }, "px", 2)])])
|
|
1706
1706
|
], 64));
|
|
1707
1707
|
}
|
|
1708
|
-
}),
|
|
1708
|
+
}), qi = { class: "tpl:mb-3.5" }, Ji = ["value"], Yi = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Xi = /* @__PURE__ */ A({
|
|
1709
1709
|
__name: "HtmlToolbar",
|
|
1710
1710
|
props: { block: {} },
|
|
1711
1711
|
emits: ["update"],
|
|
1712
1712
|
setup(e, { emit: t }) {
|
|
1713
|
-
let n = t, { t: r } =
|
|
1714
|
-
return (t, i) => (a(), g("div",
|
|
1713
|
+
let n = t, { t: r } = R();
|
|
1714
|
+
return (t, i) => (a(), g("div", qi, [
|
|
1715
1715
|
w("label", { class: C(v(W)) }, m(v(r).html.content), 3),
|
|
1716
1716
|
w("textarea", {
|
|
1717
1717
|
value: e.block.content,
|
|
1718
1718
|
placeholder: "<div>...</div>",
|
|
1719
1719
|
rows: "10",
|
|
1720
|
-
class: C(v(
|
|
1720
|
+
class: C(v(kt)),
|
|
1721
1721
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
1722
|
-
}, null, 42,
|
|
1723
|
-
w("p",
|
|
1722
|
+
}, null, 42, Ji),
|
|
1723
|
+
w("p", Yi, [j(v($e), {
|
|
1724
1724
|
size: 12,
|
|
1725
1725
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1726
1726
|
}), k(" " + m(v(r).html.sanitizationHint), 1)])
|
|
1727
1727
|
]));
|
|
1728
1728
|
}
|
|
1729
|
-
}),
|
|
1729
|
+
}), Zi = { class: "tpl:mb-3.5" }, Qi = {
|
|
1730
1730
|
key: 0,
|
|
1731
1731
|
class: "tpl:mb-3.5"
|
|
1732
|
-
},
|
|
1732
|
+
}, $i = ["value", "placeholder"], ea = { class: "tpl:mb-3.5" }, ta = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, na = ["checked"], ra = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, ia = { class: "tpl:mb-3.5" }, aa = ["value"], oa = { value: "full" }, sa = { class: "tpl:mb-3.5" }, ca = { class: "tpl:mb-3.5" }, la = {
|
|
1733
1733
|
key: 0,
|
|
1734
1734
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1735
|
-
},
|
|
1735
|
+
}, ua = ["checked"], da = /* @__PURE__ */ A({
|
|
1736
1736
|
__name: "ImageToolbar",
|
|
1737
1737
|
props: { block: {} },
|
|
1738
1738
|
emits: ["update"],
|
|
1739
1739
|
setup(e, { emit: t }) {
|
|
1740
|
-
let n = t, { t: r } =
|
|
1740
|
+
let n = t, { t: r } = R(), i = c(Ee, null), o = c(we, Pe.liquid), s = z(), l = h(() => !!i), u = d(!1), f = d(!1), { start: p } = Ve(() => {
|
|
1741
1741
|
u.value = !1;
|
|
1742
1742
|
}, 1e3, { immediate: !1 });
|
|
1743
1743
|
function y(e, t) {
|
|
@@ -1748,7 +1748,7 @@ var Ai = {
|
|
|
1748
1748
|
s.alive && e && (y("src", e.url), e.alt && (y("alt", e.alt), f.value = !0), u.value = !0, p());
|
|
1749
1749
|
}
|
|
1750
1750
|
return (t, n) => (a(), g(O, null, [
|
|
1751
|
-
w("div",
|
|
1751
|
+
w("div", Zi, [
|
|
1752
1752
|
w("label", { class: C(v(W)) }, m(v(r).image.imageUrl), 3),
|
|
1753
1753
|
j(X, {
|
|
1754
1754
|
"model-value": e.block.src,
|
|
@@ -1775,14 +1775,14 @@ var Ai = {
|
|
|
1775
1775
|
"stroke-width": 1.5
|
|
1776
1776
|
}), k(" " + m(v(r).image.browseMedia), 1)])) : _("", !0)
|
|
1777
1777
|
]),
|
|
1778
|
-
v(De)(e.block.src, v(o)) ? (a(), g("div",
|
|
1778
|
+
v(De)(e.block.src, v(o)) ? (a(), g("div", Qi, [w("label", { class: C(v(W)) }, [k(m(v(r).image.placeholderUrl) + " ", 1), n[8] ||= w("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, m("(optional)"), -1)], 2), w("input", {
|
|
1779
1779
|
type: "url",
|
|
1780
1780
|
class: C(v(U)),
|
|
1781
1781
|
value: e.block.placeholderUrl || "",
|
|
1782
1782
|
placeholder: v(r).image.placeholderUrlPlaceholder,
|
|
1783
1783
|
onInput: n[1] ||= (e) => y("placeholderUrl", e.target.value)
|
|
1784
|
-
}, null, 42,
|
|
1785
|
-
w("div",
|
|
1784
|
+
}, null, 42, $i)])) : _("", !0),
|
|
1785
|
+
w("div", ea, [
|
|
1786
1786
|
w("label", { class: C(v(W)) }, m(v(r).image.altText), 3),
|
|
1787
1787
|
j(X, {
|
|
1788
1788
|
"model-value": e.block.alt,
|
|
@@ -1797,24 +1797,24 @@ var Ai = {
|
|
|
1797
1797
|
"pulse",
|
|
1798
1798
|
"disabled"
|
|
1799
1799
|
]),
|
|
1800
|
-
w("label",
|
|
1800
|
+
w("label", ta, [w("input", {
|
|
1801
1801
|
type: "checkbox",
|
|
1802
1802
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1803
1803
|
checked: e.block.decorative === !0,
|
|
1804
1804
|
onChange: n[3] ||= (e) => y("decorative", e.target.checked)
|
|
1805
|
-
}, null, 40,
|
|
1805
|
+
}, null, 40, na), w("span", null, [k(m(v(r).image.decorative) + " ", 1), w("span", ra, m(v(r).image.decorativeHint), 1)])])
|
|
1806
1806
|
]),
|
|
1807
|
-
w("div",
|
|
1807
|
+
w("div", ia, [w("label", { class: C(v(W)) }, m(v(r).image.width), 3), w("select", {
|
|
1808
1808
|
class: C(v(U)),
|
|
1809
1809
|
value: e.block.width,
|
|
1810
1810
|
onChange: n[4] ||= (e) => y("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
1811
1811
|
}, [
|
|
1812
|
-
w("option",
|
|
1812
|
+
w("option", oa, m(v(r).image.fullWidth), 1),
|
|
1813
1813
|
n[9] ||= w("option", { value: "300" }, "300px", -1),
|
|
1814
1814
|
n[10] ||= w("option", { value: "400" }, "400px", -1),
|
|
1815
1815
|
n[11] ||= w("option", { value: "500" }, "500px", -1)
|
|
1816
|
-
], 42,
|
|
1817
|
-
w("div",
|
|
1816
|
+
], 42, aa)]),
|
|
1817
|
+
w("div", sa, [w("label", { class: C(v(W)) }, m(v(r).title.align), 3), j(Y, {
|
|
1818
1818
|
options: [
|
|
1819
1819
|
{
|
|
1820
1820
|
value: "left",
|
|
@@ -1832,7 +1832,7 @@ var Ai = {
|
|
|
1832
1832
|
"model-value": e.block.align,
|
|
1833
1833
|
"onUpdate:modelValue": n[5] ||= (e) => y("align", e)
|
|
1834
1834
|
}, null, 8, ["options", "model-value"])]),
|
|
1835
|
-
w("div",
|
|
1835
|
+
w("div", ca, [
|
|
1836
1836
|
w("label", { class: C(v(W)) }, m(v(r).image.linkUrl), 3),
|
|
1837
1837
|
j(X, {
|
|
1838
1838
|
"model-value": e.block.linkUrl || "",
|
|
@@ -1840,20 +1840,20 @@ var Ai = {
|
|
|
1840
1840
|
placeholder: v(r).image.imageUrlPlaceholder,
|
|
1841
1841
|
"onUpdate:modelValue": n[6] ||= (e) => y("linkUrl", e)
|
|
1842
1842
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1843
|
-
e.block.linkUrl ? (a(), g("label",
|
|
1843
|
+
e.block.linkUrl ? (a(), g("label", la, [w("input", {
|
|
1844
1844
|
type: "checkbox",
|
|
1845
1845
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1846
1846
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
1847
1847
|
onChange: n[7] ||= (e) => y("linkOpenInNewTab", e.target.checked)
|
|
1848
|
-
}, null, 40,
|
|
1848
|
+
}, null, 40, ua), k(" " + m(v(r).image.openInNewTab), 1)])) : _("", !0)
|
|
1849
1849
|
])
|
|
1850
1850
|
], 64));
|
|
1851
1851
|
}
|
|
1852
|
-
}),
|
|
1852
|
+
}), fa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, pa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ma = [
|
|
1853
1853
|
"value",
|
|
1854
1854
|
"placeholder",
|
|
1855
1855
|
"onInput"
|
|
1856
|
-
],
|
|
1856
|
+
], ha = ["title", "onClick"], ga = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, _a = ["checked", "onChange"], va = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ya = ["value"], ba = { value: "" }, xa = ["value"], Sa = ["value"], Ca = /* @__PURE__ */ A({
|
|
1857
1857
|
__name: "MenuToolbar",
|
|
1858
1858
|
props: {
|
|
1859
1859
|
block: {},
|
|
@@ -1861,7 +1861,7 @@ var Ai = {
|
|
|
1861
1861
|
},
|
|
1862
1862
|
emits: ["update"],
|
|
1863
1863
|
setup(e, { emit: t }) {
|
|
1864
|
-
let n = e, r = t, { t: i } =
|
|
1864
|
+
let n = e, r = t, { t: i } = R(), o = h(() => [
|
|
1865
1865
|
{
|
|
1866
1866
|
key: "openInNewTab",
|
|
1867
1867
|
label: i.menu.openInNewTab
|
|
@@ -1878,17 +1878,17 @@ var Ai = {
|
|
|
1878
1878
|
{
|
|
1879
1879
|
value: "left",
|
|
1880
1880
|
label: i.title.alignLeft,
|
|
1881
|
-
icon:
|
|
1881
|
+
icon: bt
|
|
1882
1882
|
},
|
|
1883
1883
|
{
|
|
1884
1884
|
value: "center",
|
|
1885
1885
|
label: i.title.alignCenter,
|
|
1886
|
-
icon:
|
|
1886
|
+
icon: ft
|
|
1887
1887
|
},
|
|
1888
1888
|
{
|
|
1889
1889
|
value: "right",
|
|
1890
1890
|
label: i.title.alignRight,
|
|
1891
|
-
icon:
|
|
1891
|
+
icon: yt
|
|
1892
1892
|
}
|
|
1893
1893
|
]);
|
|
1894
1894
|
function u(e, t) {
|
|
@@ -1896,7 +1896,7 @@ var Ai = {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
function d() {
|
|
1898
1898
|
let e = {
|
|
1899
|
-
id:
|
|
1899
|
+
id: Xe(),
|
|
1900
1900
|
text: "",
|
|
1901
1901
|
url: "",
|
|
1902
1902
|
openInNewTab: !1,
|
|
@@ -1916,24 +1916,24 @@ var Ai = {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
return (t, n) => (a(), g(O, null, [
|
|
1918
1918
|
j(J, { label: v(i).menu.items }, {
|
|
1919
|
-
default: l(() => [w("div",
|
|
1919
|
+
default: l(() => [w("div", fa, [(a(!0), g(O, null, s(e.block.items, (t) => (a(), g("div", {
|
|
1920
1920
|
key: t.id,
|
|
1921
1921
|
class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
|
|
1922
1922
|
}, [
|
|
1923
|
-
w("div",
|
|
1923
|
+
w("div", pa, [w("input", {
|
|
1924
1924
|
type: "text",
|
|
1925
1925
|
class: C([v(U), "tpl:flex-1"]),
|
|
1926
1926
|
value: t.text,
|
|
1927
1927
|
placeholder: v(i).menu.text,
|
|
1928
1928
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
1929
|
-
}, null, 42,
|
|
1930
|
-
class: C(v(
|
|
1929
|
+
}, null, 42, ma), w("button", {
|
|
1930
|
+
class: C(v(Dt)),
|
|
1931
1931
|
title: v(i).menu.removeItem,
|
|
1932
1932
|
onClick: (e) => p(t.id)
|
|
1933
1933
|
}, [j(v(Oe), {
|
|
1934
1934
|
size: 14,
|
|
1935
1935
|
"stroke-width": 2
|
|
1936
|
-
})], 10,
|
|
1936
|
+
})], 10, ha)]),
|
|
1937
1937
|
j(X, {
|
|
1938
1938
|
"model-value": t.url,
|
|
1939
1939
|
type: "url",
|
|
@@ -1944,7 +1944,7 @@ var Ai = {
|
|
|
1944
1944
|
"placeholder",
|
|
1945
1945
|
"onUpdate:modelValue"
|
|
1946
1946
|
]),
|
|
1947
|
-
w("div",
|
|
1947
|
+
w("div", ga, [(a(!0), g(O, null, s(o.value, (e) => (a(), g("label", {
|
|
1948
1948
|
key: e.key,
|
|
1949
1949
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
1950
1950
|
}, [w("input", {
|
|
@@ -1952,14 +1952,14 @@ var Ai = {
|
|
|
1952
1952
|
checked: t[e.key],
|
|
1953
1953
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1954
1954
|
onChange: (n) => f(t.id, e.key, n.target.checked)
|
|
1955
|
-
}, null, 40,
|
|
1956
|
-
w("div",
|
|
1955
|
+
}, null, 40, _a), k(" " + m(e.label), 1)]))), 128))]),
|
|
1956
|
+
w("div", va, [w("label", { class: C([v(W), "tpl:!mb-0"]) }, m(v(i).menu.color), 3), j(q, {
|
|
1957
1957
|
"swatch-only": "",
|
|
1958
1958
|
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
1959
1959
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
1960
1960
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
1961
1961
|
]))), 128)), w("button", {
|
|
1962
|
-
class: C(v(
|
|
1962
|
+
class: C(v(Ot)),
|
|
1963
1963
|
onClick: d
|
|
1964
1964
|
}, [j(v(H), {
|
|
1965
1965
|
size: 14,
|
|
@@ -1972,14 +1972,14 @@ var Ai = {
|
|
|
1972
1972
|
class: C(v(U)),
|
|
1973
1973
|
value: e.block.fontFamily || "",
|
|
1974
1974
|
onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
|
|
1975
|
-
}, [w("option",
|
|
1975
|
+
}, [w("option", ba, m(v(i).title.inheritFont), 1), (a(!0), g(O, null, s(e.fontFamilies, (e) => (a(), g("option", {
|
|
1976
1976
|
key: e.value,
|
|
1977
1977
|
value: e.value
|
|
1978
|
-
}, m(e.label), 9,
|
|
1978
|
+
}, m(e.label), 9, xa))), 128))], 42, ya)]),
|
|
1979
1979
|
_: 1
|
|
1980
1980
|
}, 8, ["label"]),
|
|
1981
1981
|
j(J, { label: v(i).menu.fontSize }, {
|
|
1982
|
-
default: l(() => [j(
|
|
1982
|
+
default: l(() => [j(Mt, {
|
|
1983
1983
|
"model-value": e.block.fontSize,
|
|
1984
1984
|
min: 8,
|
|
1985
1985
|
max: 48,
|
|
@@ -2016,7 +2016,7 @@ var Ai = {
|
|
|
2016
2016
|
class: C(v(U)),
|
|
2017
2017
|
value: e.block.separator,
|
|
2018
2018
|
onInput: n[5] ||= (e) => u("separator", e.target.value)
|
|
2019
|
-
}, null, 42,
|
|
2019
|
+
}, null, 42, Sa)]),
|
|
2020
2020
|
_: 1
|
|
2021
2021
|
}, 8, ["label"]),
|
|
2022
2022
|
j(J, { label: v(i).menu.separatorColor }, {
|
|
@@ -2027,7 +2027,7 @@ var Ai = {
|
|
|
2027
2027
|
_: 1
|
|
2028
2028
|
}, 8, ["label"]),
|
|
2029
2029
|
j(J, { label: v(i).menu.spacing }, {
|
|
2030
|
-
default: l(() => [j(
|
|
2030
|
+
default: l(() => [j(Mt, {
|
|
2031
2031
|
"model-value": e.block.spacing,
|
|
2032
2032
|
min: 0,
|
|
2033
2033
|
max: 50,
|
|
@@ -2041,11 +2041,11 @@ var Ai = {
|
|
|
2041
2041
|
});
|
|
2042
2042
|
//#endregion
|
|
2043
2043
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2044
|
-
function
|
|
2044
|
+
function wa(e) {
|
|
2045
2045
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2048
|
-
let n =
|
|
2047
|
+
function Ta(e, t) {
|
|
2048
|
+
let n = wa(t);
|
|
2049
2049
|
if (e.length === n) return e;
|
|
2050
2050
|
if (e.length < n) {
|
|
2051
2051
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2056,12 +2056,12 @@ function Ca(e, t) {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
//#endregion
|
|
2058
2058
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2059
|
-
var
|
|
2059
|
+
var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PURE__ */ A({
|
|
2060
2060
|
__name: "SectionToolbar",
|
|
2061
2061
|
props: { block: {} },
|
|
2062
2062
|
emits: ["update"],
|
|
2063
2063
|
setup(e, { emit: t }) {
|
|
2064
|
-
let n = e, r = t, { t: i } =
|
|
2064
|
+
let n = e, r = t, { t: i } = R(), o = h(() => [
|
|
2065
2065
|
{
|
|
2066
2066
|
value: "1",
|
|
2067
2067
|
label: i.section.column1
|
|
@@ -2087,30 +2087,30 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2087
2087
|
let t = e.target.value;
|
|
2088
2088
|
r("update", {
|
|
2089
2089
|
columns: t,
|
|
2090
|
-
children:
|
|
2090
|
+
children: Ta(n.block.children, t)
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
2093
|
-
return (t, n) => (a(), g("div",
|
|
2093
|
+
return (t, n) => (a(), g("div", Ea, [w("label", { class: C(v(W)) }, m(v(i).section.columns), 3), w("select", {
|
|
2094
2094
|
class: C(v(U)),
|
|
2095
2095
|
value: e.block.columns,
|
|
2096
2096
|
onChange: c
|
|
2097
2097
|
}, [(a(!0), g(O, null, s(o.value, (e) => (a(), g("option", {
|
|
2098
2098
|
key: e.value,
|
|
2099
2099
|
value: e.value
|
|
2100
|
-
}, m(e.label), 9,
|
|
2100
|
+
}, m(e.label), 9, Oa))), 128))], 42, Da)]));
|
|
2101
2101
|
}
|
|
2102
|
-
}),
|
|
2102
|
+
}), Aa = { class: "tpl:mb-3.5" }, ja = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ma = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Na = ["value", "onChange"], Pa = ["value"], Fa = ["title", "onClick"], Ia = { class: "tpl:mb-3.5" }, La = ["value"], Ra = { value: "solid" }, za = { value: "outlined" }, Ba = { value: "rounded" }, Va = { value: "square" }, Ha = { value: "circle" }, Ua = { class: "tpl:mb-3.5" }, Wa = { class: "tpl:mb-3.5" }, Ga = { class: "tpl:flex tpl:items-stretch" }, Ka = ["value"], qa = { class: "tpl:mb-3.5" }, Ja = /* @__PURE__ */ A({
|
|
2103
2103
|
__name: "SocialToolbar",
|
|
2104
2104
|
props: { block: {} },
|
|
2105
2105
|
emits: ["update"],
|
|
2106
2106
|
setup(e, { emit: t }) {
|
|
2107
|
-
let n = e, r = t, { t: i } =
|
|
2107
|
+
let n = e, r = t, { t: i } = R();
|
|
2108
2108
|
function o(e, t) {
|
|
2109
2109
|
r("update", { [e]: t });
|
|
2110
2110
|
}
|
|
2111
2111
|
function c() {
|
|
2112
2112
|
let e = {
|
|
2113
|
-
id:
|
|
2113
|
+
id: Xe(),
|
|
2114
2114
|
platform: "facebook",
|
|
2115
2115
|
url: ""
|
|
2116
2116
|
};
|
|
@@ -2126,10 +2126,10 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2126
2126
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2127
2127
|
}
|
|
2128
2128
|
return (t, n) => (a(), g(O, null, [
|
|
2129
|
-
w("div",
|
|
2129
|
+
w("div", Aa, [w("label", { class: C(v(W)) }, m(v(i).social.icons), 3), w("div", ja, [(a(!0), g(O, null, s(e.block.icons, (e) => (a(), g("div", {
|
|
2130
2130
|
key: e.id,
|
|
2131
2131
|
class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
|
|
2132
|
-
}, [w("div",
|
|
2132
|
+
}, [w("div", Ma, [w("select", {
|
|
2133
2133
|
"data-testid": "social-platform-select",
|
|
2134
2134
|
class: C([v(U), "tpl:flex-1"]),
|
|
2135
2135
|
value: e.platform,
|
|
@@ -2137,14 +2137,14 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2137
2137
|
}, [(a(!0), g(O, null, s(v(re), (e) => (a(), g("option", {
|
|
2138
2138
|
key: e,
|
|
2139
2139
|
value: e
|
|
2140
|
-
}, m(v(
|
|
2141
|
-
class: C(v(
|
|
2140
|
+
}, m(v(L)[e].name), 9, Pa))), 128))], 42, Na), w("button", {
|
|
2141
|
+
class: C(v(Dt)),
|
|
2142
2142
|
title: v(i).social.removeIcon,
|
|
2143
2143
|
onClick: (t) => u(e.id)
|
|
2144
2144
|
}, [j(v(Oe), {
|
|
2145
2145
|
size: 14,
|
|
2146
2146
|
"stroke-width": 2
|
|
2147
|
-
})], 10,
|
|
2147
|
+
})], 10, Fa)]), j(X, {
|
|
2148
2148
|
"model-value": e.url,
|
|
2149
2149
|
type: "url",
|
|
2150
2150
|
placeholder: v(i).social.urlPlaceholder,
|
|
@@ -2154,24 +2154,24 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2154
2154
|
"placeholder",
|
|
2155
2155
|
"onUpdate:modelValue"
|
|
2156
2156
|
])]))), 128)), w("button", {
|
|
2157
|
-
class: C(v(
|
|
2157
|
+
class: C(v(Ot)),
|
|
2158
2158
|
onClick: c
|
|
2159
2159
|
}, [j(v(H), {
|
|
2160
2160
|
size: 14,
|
|
2161
2161
|
"stroke-width": 2
|
|
2162
2162
|
}), k(" " + m(v(i).social.addIcon), 1)], 2)])]),
|
|
2163
|
-
w("div",
|
|
2163
|
+
w("div", Ia, [w("label", { class: C(v(W)) }, m(v(i).social.style), 3), w("select", {
|
|
2164
2164
|
class: C(v(U)),
|
|
2165
2165
|
value: e.block.iconStyle,
|
|
2166
2166
|
onChange: n[0] ||= (e) => o("iconStyle", e.target.value)
|
|
2167
2167
|
}, [
|
|
2168
|
-
w("option",
|
|
2169
|
-
w("option",
|
|
2170
|
-
w("option",
|
|
2171
|
-
w("option",
|
|
2172
|
-
w("option",
|
|
2173
|
-
], 42,
|
|
2174
|
-
w("div",
|
|
2168
|
+
w("option", Ra, m(v(i).social.styleSolid), 1),
|
|
2169
|
+
w("option", za, m(v(i).social.styleOutlined), 1),
|
|
2170
|
+
w("option", Ba, m(v(i).social.styleRounded), 1),
|
|
2171
|
+
w("option", Va, m(v(i).social.styleSquare), 1),
|
|
2172
|
+
w("option", Ha, m(v(i).social.styleCircle), 1)
|
|
2173
|
+
], 42, La)]),
|
|
2174
|
+
w("div", Ua, [w("label", { class: C(v(W)) }, m(v(i).social.size), 3), j(Y, {
|
|
2175
2175
|
options: [
|
|
2176
2176
|
{
|
|
2177
2177
|
value: "small",
|
|
@@ -2189,30 +2189,30 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2189
2189
|
"model-value": e.block.iconSize,
|
|
2190
2190
|
"onUpdate:modelValue": n[1] ||= (e) => o("iconSize", e)
|
|
2191
2191
|
}, null, 8, ["options", "model-value"])]),
|
|
2192
|
-
w("div",
|
|
2192
|
+
w("div", Wa, [w("label", { class: C(v(W)) }, m(v(i).social.spacing), 3), w("div", Ga, [w("input", {
|
|
2193
2193
|
type: "number",
|
|
2194
2194
|
class: C(v(K)),
|
|
2195
2195
|
value: e.block.spacing,
|
|
2196
2196
|
min: "0",
|
|
2197
2197
|
max: "50",
|
|
2198
2198
|
onInput: n[2] ||= (e) => o("spacing", Number(e.target.value))
|
|
2199
|
-
}, null, 42,
|
|
2200
|
-
w("div",
|
|
2199
|
+
}, null, 42, Ka), w("span", { class: C(v(G)) }, "px", 2)])]),
|
|
2200
|
+
w("div", qa, [w("label", { class: C(v(W)) }, m(v(i).social.align), 3), j(Y, {
|
|
2201
2201
|
options: [
|
|
2202
2202
|
{
|
|
2203
2203
|
value: "left",
|
|
2204
2204
|
label: v(i).title.alignLeft,
|
|
2205
|
-
icon: v(
|
|
2205
|
+
icon: v(bt)
|
|
2206
2206
|
},
|
|
2207
2207
|
{
|
|
2208
2208
|
value: "center",
|
|
2209
2209
|
label: v(i).title.alignCenter,
|
|
2210
|
-
icon: v(
|
|
2210
|
+
icon: v(ft)
|
|
2211
2211
|
},
|
|
2212
2212
|
{
|
|
2213
2213
|
value: "right",
|
|
2214
2214
|
label: v(i).title.alignRight,
|
|
2215
|
-
icon: v(
|
|
2215
|
+
icon: v(yt)
|
|
2216
2216
|
}
|
|
2217
2217
|
],
|
|
2218
2218
|
"model-value": e.block.align,
|
|
@@ -2220,22 +2220,22 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2220
2220
|
}, null, 8, ["options", "model-value"])])
|
|
2221
2221
|
], 64));
|
|
2222
2222
|
}
|
|
2223
|
-
}),
|
|
2223
|
+
}), Ya = { class: "tpl:mb-3.5" }, Xa = { class: "tpl:flex tpl:items-stretch" }, Za = ["value"], Qa = ["value"], $a = /* @__PURE__ */ A({
|
|
2224
2224
|
__name: "SpacerToolbar",
|
|
2225
2225
|
props: { block: {} },
|
|
2226
2226
|
emits: ["update"],
|
|
2227
2227
|
setup(e, { emit: t }) {
|
|
2228
|
-
let n = t, { t: r } =
|
|
2229
|
-
return (t, i) => (a(), g("div",
|
|
2228
|
+
let n = t, { t: r } = R();
|
|
2229
|
+
return (t, i) => (a(), g("div", Ya, [
|
|
2230
2230
|
w("label", { class: C(v(W)) }, m(v(r).spacer.height), 3),
|
|
2231
|
-
w("div",
|
|
2231
|
+
w("div", Xa, [w("input", {
|
|
2232
2232
|
type: "number",
|
|
2233
2233
|
class: C(v(K)),
|
|
2234
2234
|
value: e.block.height,
|
|
2235
2235
|
min: "10",
|
|
2236
2236
|
max: "100",
|
|
2237
2237
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2238
|
-
}, null, 42,
|
|
2238
|
+
}, null, 42, Za), w("span", { class: C(v(G)) }, "px", 2)]),
|
|
2239
2239
|
w("input", {
|
|
2240
2240
|
type: "range",
|
|
2241
2241
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2243,13 +2243,13 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2243
2243
|
min: "10",
|
|
2244
2244
|
max: "100",
|
|
2245
2245
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2246
|
-
}, null, 40,
|
|
2246
|
+
}, null, 40, Qa)
|
|
2247
2247
|
]));
|
|
2248
2248
|
}
|
|
2249
|
-
}),
|
|
2249
|
+
}), eo = { class: "tpl:mb-3.5" }, to = { class: "tpl:flex tpl:items-center tpl:gap-3" }, no = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ro = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, io = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ao = ["disabled"], oo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, so = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, co = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, lo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, uo = ["disabled"], fo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, po = { class: "tpl:mb-3.5" }, mo = { class: "tpl:mb-1.5 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ho = ["checked"], go = {
|
|
2250
2250
|
key: 0,
|
|
2251
2251
|
class: "tpl:mb-3.5"
|
|
2252
|
-
},
|
|
2252
|
+
}, _o = { class: "tpl:mb-3.5" }, vo = { class: "tpl:mb-3.5" }, yo = { class: "tpl:flex tpl:items-stretch" }, bo = ["value"], xo = { class: "tpl:mb-3.5" }, So = { class: "tpl:flex tpl:items-stretch" }, Co = ["value"], wo = { class: "tpl:mb-3.5" }, To = ["value"], Eo = { value: "" }, Do = ["value"], Oo = { class: "tpl:mb-3.5" }, ko = { class: "tpl:flex tpl:items-stretch" }, Ao = ["value"], jo = { class: "tpl:mb-3.5" }, Mo = { class: "tpl:mb-3.5" }, No = /* @__PURE__ */ A({
|
|
2253
2253
|
__name: "TableToolbar",
|
|
2254
2254
|
props: {
|
|
2255
2255
|
block: {},
|
|
@@ -2257,15 +2257,15 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2257
2257
|
},
|
|
2258
2258
|
emits: ["update"],
|
|
2259
2259
|
setup(e, { emit: t }) {
|
|
2260
|
-
let n = e, r = t, { t: i } =
|
|
2260
|
+
let n = e, r = t, { t: i } = R(), o = h(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2261
2261
|
function c(e, t) {
|
|
2262
2262
|
r("update", { [e]: t });
|
|
2263
2263
|
}
|
|
2264
2264
|
function l() {
|
|
2265
2265
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2266
|
-
id:
|
|
2266
|
+
id: Xe(),
|
|
2267
2267
|
cells: Array.from({ length: e }, () => ({
|
|
2268
|
-
id:
|
|
2268
|
+
id: Xe(),
|
|
2269
2269
|
content: ""
|
|
2270
2270
|
}))
|
|
2271
2271
|
};
|
|
@@ -2278,7 +2278,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2278
2278
|
r("update", { rows: n.block.rows.map((e) => ({
|
|
2279
2279
|
...e,
|
|
2280
2280
|
cells: [...e.cells, {
|
|
2281
|
-
id:
|
|
2281
|
+
id: Xe(),
|
|
2282
2282
|
content: ""
|
|
2283
2283
|
}]
|
|
2284
2284
|
})) });
|
|
@@ -2290,16 +2290,16 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2290
2290
|
})) });
|
|
2291
2291
|
}
|
|
2292
2292
|
return (t, n) => (a(), g(O, null, [
|
|
2293
|
-
w("div",
|
|
2293
|
+
w("div", eo, [w("label", { class: C(v(W)) }, m(v(i).table.dimensions), 3), w("div", to, [w("div", no, [w("span", ro, m(v(i).table.rows), 1), w("div", io, [
|
|
2294
2294
|
w("button", {
|
|
2295
2295
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2296
2296
|
disabled: e.block.rows.length <= 1,
|
|
2297
2297
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2298
|
-
}, [j(v(
|
|
2298
|
+
}, [j(v(rt), {
|
|
2299
2299
|
size: 12,
|
|
2300
2300
|
"stroke-width": 2
|
|
2301
|
-
})], 8,
|
|
2302
|
-
w("span",
|
|
2301
|
+
})], 8, ao),
|
|
2302
|
+
w("span", oo, m(e.block.rows.length), 1),
|
|
2303
2303
|
w("button", {
|
|
2304
2304
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2305
2305
|
onClick: l
|
|
@@ -2307,16 +2307,16 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2307
2307
|
size: 12,
|
|
2308
2308
|
"stroke-width": 2
|
|
2309
2309
|
})])
|
|
2310
|
-
])]), w("div",
|
|
2310
|
+
])]), w("div", so, [w("span", co, m(v(i).table.columns), 1), w("div", lo, [
|
|
2311
2311
|
w("button", {
|
|
2312
2312
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2313
2313
|
disabled: o.value <= 1,
|
|
2314
2314
|
onClick: n[1] ||= (e) => f(o.value - 1)
|
|
2315
|
-
}, [j(v(
|
|
2315
|
+
}, [j(v(rt), {
|
|
2316
2316
|
size: 12,
|
|
2317
2317
|
"stroke-width": 2
|
|
2318
|
-
})], 8,
|
|
2319
|
-
w("span",
|
|
2318
|
+
})], 8, uo),
|
|
2319
|
+
w("span", fo, m(o.value), 1),
|
|
2320
2320
|
w("button", {
|
|
2321
2321
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2322
2322
|
onClick: d
|
|
@@ -2325,73 +2325,73 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2325
2325
|
"stroke-width": 2
|
|
2326
2326
|
})])
|
|
2327
2327
|
])])])]),
|
|
2328
|
-
w("div",
|
|
2328
|
+
w("div", po, [w("label", mo, [w("input", {
|
|
2329
2329
|
type: "checkbox",
|
|
2330
2330
|
checked: e.block.hasHeaderRow,
|
|
2331
2331
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2332
2332
|
onChange: n[2] ||= (e) => c("hasHeaderRow", e.target.checked)
|
|
2333
|
-
}, null, 40,
|
|
2334
|
-
e.block.hasHeaderRow ? (a(), g("div",
|
|
2333
|
+
}, null, 40, ho), k(" " + m(v(i).table.hasHeaderRow), 1)])]),
|
|
2334
|
+
e.block.hasHeaderRow ? (a(), g("div", go, [w("label", { class: C(v(W)) }, m(v(i).table.headerBackgroundColor), 3), j(q, {
|
|
2335
2335
|
"model-value": e.block.headerBackgroundColor || v("#f2f2f2"),
|
|
2336
2336
|
placeholder: v(i).table.noHeaderBg,
|
|
2337
2337
|
"onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2338
2338
|
}, null, 8, ["model-value", "placeholder"])])) : _("", !0),
|
|
2339
|
-
w("div",
|
|
2339
|
+
w("div", _o, [w("label", { class: C(v(W)) }, m(v(i).table.borderColor), 3), j(q, {
|
|
2340
2340
|
"model-value": e.block.borderColor,
|
|
2341
2341
|
"onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
|
|
2342
2342
|
}, null, 8, ["model-value"])]),
|
|
2343
|
-
w("div",
|
|
2343
|
+
w("div", vo, [w("label", { class: C(v(W)) }, m(v(i).table.borderWidth), 3), w("div", yo, [w("input", {
|
|
2344
2344
|
type: "number",
|
|
2345
2345
|
class: C(v(K)),
|
|
2346
2346
|
value: e.block.borderWidth,
|
|
2347
2347
|
min: "0",
|
|
2348
2348
|
max: "10",
|
|
2349
2349
|
onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2350
|
-
}, null, 42,
|
|
2351
|
-
w("div",
|
|
2350
|
+
}, null, 42, bo), w("span", { class: C(v(G)) }, "px", 2)])]),
|
|
2351
|
+
w("div", xo, [w("label", { class: C(v(W)) }, m(v(i).table.cellPadding), 3), w("div", So, [w("input", {
|
|
2352
2352
|
type: "number",
|
|
2353
2353
|
class: C(v(K)),
|
|
2354
2354
|
value: e.block.cellPadding,
|
|
2355
2355
|
min: "0",
|
|
2356
2356
|
max: "30",
|
|
2357
2357
|
onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2358
|
-
}, null, 42,
|
|
2359
|
-
w("div",
|
|
2358
|
+
}, null, 42, Co), w("span", { class: C(v(G)) }, "px", 2)])]),
|
|
2359
|
+
w("div", wo, [w("label", { class: C(v(W)) }, m(v(i).table.fontFamily), 3), w("select", {
|
|
2360
2360
|
class: C(v(U)),
|
|
2361
2361
|
value: e.block.fontFamily || "",
|
|
2362
2362
|
onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2363
|
-
}, [w("option",
|
|
2363
|
+
}, [w("option", Eo, m(v(i).title.inheritFont), 1), (a(!0), g(O, null, s(e.fontFamilies, (e) => (a(), g("option", {
|
|
2364
2364
|
key: e.value,
|
|
2365
2365
|
value: e.value
|
|
2366
|
-
}, m(e.label), 9,
|
|
2367
|
-
w("div",
|
|
2366
|
+
}, m(e.label), 9, Do))), 128))], 42, To)]),
|
|
2367
|
+
w("div", Oo, [w("label", { class: C(v(W)) }, m(v(i).table.fontSize), 3), w("div", ko, [w("input", {
|
|
2368
2368
|
type: "number",
|
|
2369
2369
|
class: C(v(K)),
|
|
2370
2370
|
value: e.block.fontSize,
|
|
2371
2371
|
min: "10",
|
|
2372
2372
|
max: "32",
|
|
2373
2373
|
onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2374
|
-
}, null, 42,
|
|
2375
|
-
w("div",
|
|
2374
|
+
}, null, 42, Ao), w("span", { class: C(v(G)) }, "px", 2)])]),
|
|
2375
|
+
w("div", jo, [w("label", { class: C(v(W)) }, m(v(i).table.color), 3), j(q, {
|
|
2376
2376
|
"model-value": e.block.color,
|
|
2377
2377
|
"onUpdate:modelValue": n[9] ||= (e) => c("color", e)
|
|
2378
2378
|
}, null, 8, ["model-value"])]),
|
|
2379
|
-
w("div",
|
|
2379
|
+
w("div", Mo, [w("label", { class: C(v(W)) }, m(v(i).table.textAlign), 3), j(Y, {
|
|
2380
2380
|
options: [
|
|
2381
2381
|
{
|
|
2382
2382
|
value: "left",
|
|
2383
2383
|
label: v(i).title.alignLeft,
|
|
2384
|
-
icon: v(
|
|
2384
|
+
icon: v(bt)
|
|
2385
2385
|
},
|
|
2386
2386
|
{
|
|
2387
2387
|
value: "center",
|
|
2388
2388
|
label: v(i).title.alignCenter,
|
|
2389
|
-
icon: v(
|
|
2389
|
+
icon: v(ft)
|
|
2390
2390
|
},
|
|
2391
2391
|
{
|
|
2392
2392
|
value: "right",
|
|
2393
2393
|
label: v(i).title.alignRight,
|
|
2394
|
-
icon: v(
|
|
2394
|
+
icon: v(yt)
|
|
2395
2395
|
}
|
|
2396
2396
|
],
|
|
2397
2397
|
"model-value": e.block.textAlign,
|
|
@@ -2399,7 +2399,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2399
2399
|
}, null, 8, ["options", "model-value"])])
|
|
2400
2400
|
], 64));
|
|
2401
2401
|
}
|
|
2402
|
-
}),
|
|
2402
|
+
}), Po = { class: "tpl:mb-3.5" }, Fo = ["value"], Io = { value: 1 }, Lo = { value: 2 }, Ro = { value: 3 }, zo = { value: 4 }, Bo = { class: "tpl:mb-3.5" }, Vo = ["value"], Ho = { value: "" }, Uo = ["value"], Wo = { class: "tpl:mb-3.5" }, Go = { class: "tpl:mb-3.5" }, Ko = /* @__PURE__ */ A({
|
|
2403
2403
|
__name: "TitleToolbar",
|
|
2404
2404
|
props: {
|
|
2405
2405
|
block: {},
|
|
@@ -2407,49 +2407,49 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2407
2407
|
},
|
|
2408
2408
|
emits: ["update"],
|
|
2409
2409
|
setup(e, { emit: t }) {
|
|
2410
|
-
let n = t, { t: r } =
|
|
2410
|
+
let n = t, { t: r } = R();
|
|
2411
2411
|
function i(e, t) {
|
|
2412
2412
|
n("update", { [e]: t });
|
|
2413
2413
|
}
|
|
2414
2414
|
return (t, n) => (a(), g(O, null, [
|
|
2415
|
-
w("div",
|
|
2415
|
+
w("div", Po, [w("label", { class: C(v(W)) }, m(v(r).title.level), 3), w("select", {
|
|
2416
2416
|
class: C(v(U)),
|
|
2417
2417
|
value: e.block.level,
|
|
2418
2418
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2419
2419
|
}, [
|
|
2420
|
-
w("option",
|
|
2421
|
-
w("option",
|
|
2422
|
-
w("option",
|
|
2423
|
-
w("option",
|
|
2424
|
-
], 42,
|
|
2425
|
-
w("div",
|
|
2420
|
+
w("option", Io, m(v(r).title.heading1), 1),
|
|
2421
|
+
w("option", Lo, m(v(r).title.heading2), 1),
|
|
2422
|
+
w("option", Ro, m(v(r).title.heading3), 1),
|
|
2423
|
+
w("option", zo, m(v(r).title.heading4), 1)
|
|
2424
|
+
], 42, Fo)]),
|
|
2425
|
+
w("div", Bo, [w("label", { class: C(v(W)) }, m(v(r).title.fontFamily), 3), w("select", {
|
|
2426
2426
|
class: C(v(U)),
|
|
2427
2427
|
value: e.block.fontFamily || "",
|
|
2428
2428
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2429
|
-
}, [w("option",
|
|
2429
|
+
}, [w("option", Ho, m(v(r).title.inheritFont), 1), (a(!0), g(O, null, s(e.fontFamilies, (e) => (a(), g("option", {
|
|
2430
2430
|
key: e.value,
|
|
2431
2431
|
value: e.value
|
|
2432
|
-
}, m(e.label), 9,
|
|
2433
|
-
w("div",
|
|
2432
|
+
}, m(e.label), 9, Uo))), 128))], 42, Vo)]),
|
|
2433
|
+
w("div", Wo, [w("label", { class: C(v(W)) }, m(v(r).title.color), 3), j(q, {
|
|
2434
2434
|
"model-value": e.block.color,
|
|
2435
2435
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e)
|
|
2436
2436
|
}, null, 8, ["model-value"])]),
|
|
2437
|
-
w("div",
|
|
2437
|
+
w("div", Go, [w("label", { class: C(v(W)) }, m(v(r).title.align), 3), j(Y, {
|
|
2438
2438
|
options: [
|
|
2439
2439
|
{
|
|
2440
2440
|
value: "left",
|
|
2441
2441
|
label: v(r).title.alignLeft,
|
|
2442
|
-
icon: v(
|
|
2442
|
+
icon: v(bt)
|
|
2443
2443
|
},
|
|
2444
2444
|
{
|
|
2445
2445
|
value: "center",
|
|
2446
2446
|
label: v(r).title.alignCenter,
|
|
2447
|
-
icon: v(
|
|
2447
|
+
icon: v(ft)
|
|
2448
2448
|
},
|
|
2449
2449
|
{
|
|
2450
2450
|
value: "right",
|
|
2451
2451
|
label: v(r).title.alignRight,
|
|
2452
|
-
icon: v(
|
|
2452
|
+
icon: v(yt)
|
|
2453
2453
|
}
|
|
2454
2454
|
],
|
|
2455
2455
|
"model-value": e.block.textAlign,
|
|
@@ -2457,22 +2457,22 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2457
2457
|
}, null, 8, ["options", "model-value"])])
|
|
2458
2458
|
], 64));
|
|
2459
2459
|
}
|
|
2460
|
-
}),
|
|
2460
|
+
}), qo = { class: "tpl:mb-3.5" }, Jo = {
|
|
2461
2461
|
key: 0,
|
|
2462
2462
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2463
|
-
},
|
|
2463
|
+
}, Yo = ["checked"], Xo = {
|
|
2464
2464
|
key: 0,
|
|
2465
2465
|
class: "tpl:mb-3.5"
|
|
2466
|
-
},
|
|
2466
|
+
}, Zo = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Qo = [
|
|
2467
2467
|
"value",
|
|
2468
2468
|
"placeholder",
|
|
2469
2469
|
"title"
|
|
2470
|
-
],
|
|
2470
|
+
], $o = { class: "tpl:mb-3.5" }, es = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ts = { class: "tpl:mb-3.5" }, ns = { class: "tpl:mb-3.5" }, rs = ["value"], is = { value: "full" }, as = { class: "tpl:mb-3.5" }, os = /* @__PURE__ */ A({
|
|
2471
2471
|
__name: "VideoToolbar",
|
|
2472
2472
|
props: { block: {} },
|
|
2473
2473
|
emits: ["update"],
|
|
2474
2474
|
setup(e, { emit: t }) {
|
|
2475
|
-
let n = e, r = t, { t: i } =
|
|
2475
|
+
let n = e, r = t, { t: i } = R(), o = c(Ee, null), s = c(we, Pe.liquid), l = z(), u = h(() => !!o), f = h(() => De(n.block.url, s)), p = d(!1), { start: y } = Ve(() => {
|
|
2476
2476
|
p.value = !1;
|
|
2477
2477
|
}, 1e3, { immediate: !1 });
|
|
2478
2478
|
function b(e, t) {
|
|
@@ -2483,7 +2483,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2483
2483
|
l.alive && e && (b("thumbnailUrl", e.url), p.value = !0, y());
|
|
2484
2484
|
}
|
|
2485
2485
|
return (t, n) => (a(), g(O, null, [
|
|
2486
|
-
w("div",
|
|
2486
|
+
w("div", qo, [
|
|
2487
2487
|
w("label", { class: C(v(W)) }, m(v(i).video.videoUrl), 3),
|
|
2488
2488
|
j(X, {
|
|
2489
2489
|
"model-value": e.block.url,
|
|
@@ -2491,23 +2491,23 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2491
2491
|
placeholder: v(i).video.videoUrlPlaceholder,
|
|
2492
2492
|
"onUpdate:modelValue": n[0] ||= (e) => b("url", e)
|
|
2493
2493
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2494
|
-
e.block.url ? (a(), g("label",
|
|
2494
|
+
e.block.url ? (a(), g("label", Jo, [w("input", {
|
|
2495
2495
|
type: "checkbox",
|
|
2496
2496
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2497
2497
|
checked: e.block.openInNewTab ?? !1,
|
|
2498
2498
|
onChange: n[1] ||= (e) => b("openInNewTab", e.target.checked)
|
|
2499
|
-
}, null, 40,
|
|
2499
|
+
}, null, 40, Yo), k(" " + m(v(i).video.openInNewTab), 1)])) : _("", !0)
|
|
2500
2500
|
]),
|
|
2501
|
-
f.value ? (a(), g("div",
|
|
2501
|
+
f.value ? (a(), g("div", Xo, [w("label", { class: C(v(W)) }, [k(m(v(i).video.placeholderUrl) + " ", 1), w("span", Zo, m(v(i).video.optional), 1)], 2), w("input", {
|
|
2502
2502
|
type: "url",
|
|
2503
2503
|
class: C(v(U)),
|
|
2504
2504
|
value: e.block.placeholderUrl || "",
|
|
2505
2505
|
placeholder: v(i).video.placeholderUrlPlaceholder,
|
|
2506
2506
|
title: v(i).video.placeholderUrlTooltip,
|
|
2507
2507
|
onInput: n[2] ||= (e) => b("placeholderUrl", e.target.value)
|
|
2508
|
-
}, null, 42,
|
|
2509
|
-
w("div",
|
|
2510
|
-
w("label", { class: C(v(W)) }, [k(m(v(i).video.customThumbnail) + " ", 1), w("span",
|
|
2508
|
+
}, null, 42, Qo)])) : _("", !0),
|
|
2509
|
+
w("div", $o, [
|
|
2510
|
+
w("label", { class: C(v(W)) }, [k(m(v(i).video.customThumbnail) + " ", 1), w("span", es, m(v(i).video.optional), 1)], 2),
|
|
2511
2511
|
j(X, {
|
|
2512
2512
|
"model-value": e.block.thumbnailUrl,
|
|
2513
2513
|
type: "url",
|
|
@@ -2533,23 +2533,23 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2533
2533
|
"stroke-width": 1.5
|
|
2534
2534
|
}), k(" " + m(v(i).image.browseMedia), 1)])) : _("", !0)
|
|
2535
2535
|
]),
|
|
2536
|
-
w("div",
|
|
2536
|
+
w("div", ts, [w("label", { class: C(v(W)) }, m(v(i).video.altText), 3), j(X, {
|
|
2537
2537
|
"model-value": e.block.alt,
|
|
2538
2538
|
type: "text",
|
|
2539
2539
|
placeholder: v(i).video.altTextPlaceholder,
|
|
2540
2540
|
"onUpdate:modelValue": n[4] ||= (e) => b("alt", e)
|
|
2541
2541
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2542
|
-
w("div",
|
|
2542
|
+
w("div", ns, [w("label", { class: C(v(W)) }, m(v(i).video.width), 3), w("select", {
|
|
2543
2543
|
class: C(v(U)),
|
|
2544
2544
|
value: e.block.width,
|
|
2545
2545
|
onChange: n[5] ||= (e) => b("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2546
2546
|
}, [
|
|
2547
|
-
w("option",
|
|
2547
|
+
w("option", is, m(v(i).video.fullWidth), 1),
|
|
2548
2548
|
n[7] ||= w("option", { value: "300" }, "300px", -1),
|
|
2549
2549
|
n[8] ||= w("option", { value: "400" }, "400px", -1),
|
|
2550
2550
|
n[9] ||= w("option", { value: "500" }, "500px", -1)
|
|
2551
|
-
], 42,
|
|
2552
|
-
w("div",
|
|
2551
|
+
], 42, rs)]),
|
|
2552
|
+
w("div", as, [w("label", { class: C(v(W)) }, m(v(i).title.align), 3), j(Y, {
|
|
2553
2553
|
options: [
|
|
2554
2554
|
{
|
|
2555
2555
|
value: "left",
|
|
@@ -2569,7 +2569,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2569
2569
|
}, null, 8, ["options", "model-value"])])
|
|
2570
2570
|
], 64));
|
|
2571
2571
|
}
|
|
2572
|
-
}),
|
|
2572
|
+
}), ss = ["aria-label"], cs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, ls = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, us = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ds = { class: "tpl:flex tpl:gap-1" }, fs = ["title"], ps = ["title"], ms = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, hs = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
2573
2573
|
__name: "Toolbar",
|
|
2574
2574
|
props: { block: {} },
|
|
2575
2575
|
emits: [
|
|
@@ -2578,7 +2578,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2578
2578
|
"duplicate"
|
|
2579
2579
|
],
|
|
2580
2580
|
setup(e, { emit: t }) {
|
|
2581
|
-
let n = f(() => import("./CountdownToolbar-BsGUxoRv.js")), r = e, o = t, { t: s } =
|
|
2581
|
+
let n = f(() => import("./CountdownToolbar-BsGUxoRv.js")), r = e, o = t, { t: s } = R(), l = We(ae, "Toolbar"), u = c(B, []), d = h(() => r.block.type), p = h(() => I(r.block)), y = h(() => {
|
|
2582
2582
|
if (p.value) return u.find((e) => e.type === r.block.customType);
|
|
2583
2583
|
}), x = h(() => p.value ? y.value?.name ?? r.block.customType : me(d.value, s)), S = l.fonts;
|
|
2584
2584
|
function C(e) {
|
|
@@ -2587,7 +2587,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2587
2587
|
return (t, r) => (a(), g("aside", {
|
|
2588
2588
|
"aria-label": v(s).landmarks.blockToolbar,
|
|
2589
2589
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2590
|
-
}, [w("div",
|
|
2590
|
+
}, [w("div", cs, [w("div", ls, [v(Et)[d.value] ? (a(), b(i(v(Et)[d.value]), {
|
|
2591
2591
|
key: 0,
|
|
2592
2592
|
size: 16,
|
|
2593
2593
|
"stroke-width": 1.5
|
|
@@ -2595,70 +2595,70 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2595
2595
|
key: 1,
|
|
2596
2596
|
size: 16,
|
|
2597
2597
|
"stroke-width": 1.5
|
|
2598
|
-
})) : _("", !0), w("h3",
|
|
2598
|
+
})) : _("", !0), w("h3", us, m(x.value), 1)]), w("div", ds, [w("button", {
|
|
2599
2599
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
|
|
2600
2600
|
title: v(s).toolbar.duplicate,
|
|
2601
2601
|
onClick: r[0] ||= (e) => o("duplicate")
|
|
2602
|
-
}, [j(v(
|
|
2602
|
+
}, [j(v(Ze), {
|
|
2603
2603
|
size: 14,
|
|
2604
2604
|
"stroke-width": 2
|
|
2605
|
-
})], 8,
|
|
2605
|
+
})], 8, fs), w("button", {
|
|
2606
2606
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
2607
2607
|
title: v(s).toolbar.delete,
|
|
2608
2608
|
onClick: r[1] ||= (e) => o("delete")
|
|
2609
2609
|
}, [j(v(je), {
|
|
2610
2610
|
size: 14,
|
|
2611
2611
|
"stroke-width": 2
|
|
2612
|
-
})], 8,
|
|
2612
|
+
})], 8, ps)])]), w("div", ms, [p.value ? (a(), b(Bi, {
|
|
2613
2613
|
key: 0,
|
|
2614
2614
|
block: e.block,
|
|
2615
2615
|
onUpdateFieldValues: r[2] ||= (e) => o("update", { fieldValues: e }),
|
|
2616
2616
|
onUpdateDataSourceFetched: r[3] ||= (e) => o("update", { dataSourceFetched: e })
|
|
2617
|
-
}, null, 8, ["block"])) : d.value === "section" ? (a(), b(
|
|
2617
|
+
}, null, 8, ["block"])) : d.value === "section" ? (a(), b(ka, {
|
|
2618
2618
|
key: 1,
|
|
2619
2619
|
block: e.block,
|
|
2620
2620
|
onUpdate: C
|
|
2621
|
-
}, null, 8, ["block"])) : d.value === "title" ? (a(), b(
|
|
2621
|
+
}, null, 8, ["block"])) : d.value === "title" ? (a(), b(Ko, {
|
|
2622
2622
|
key: 2,
|
|
2623
2623
|
block: e.block,
|
|
2624
2624
|
"font-families": v(S),
|
|
2625
2625
|
onUpdate: C
|
|
2626
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (a(), g(O, { key: 3 }, [], 64)) : d.value === "image" ? (a(), b(
|
|
2626
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (a(), g(O, { key: 3 }, [], 64)) : d.value === "image" ? (a(), b(da, {
|
|
2627
2627
|
key: 4,
|
|
2628
2628
|
block: e.block,
|
|
2629
2629
|
onUpdate: C
|
|
2630
|
-
}, null, 8, ["block"])) : d.value === "video" ? (a(), b(
|
|
2630
|
+
}, null, 8, ["block"])) : d.value === "video" ? (a(), b(os, {
|
|
2631
2631
|
key: 5,
|
|
2632
2632
|
block: e.block,
|
|
2633
2633
|
onUpdate: C
|
|
2634
|
-
}, null, 8, ["block"])) : d.value === "button" ? (a(), b(
|
|
2634
|
+
}, null, 8, ["block"])) : d.value === "button" ? (a(), b(dr, {
|
|
2635
2635
|
key: 6,
|
|
2636
2636
|
block: e.block,
|
|
2637
2637
|
"font-families": v(S),
|
|
2638
2638
|
onUpdate: C
|
|
2639
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (a(), b(
|
|
2639
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (a(), b(Ki, {
|
|
2640
2640
|
key: 7,
|
|
2641
2641
|
block: e.block,
|
|
2642
2642
|
onUpdate: C
|
|
2643
|
-
}, null, 8, ["block"])) : d.value === "social" ? (a(), b(
|
|
2643
|
+
}, null, 8, ["block"])) : d.value === "social" ? (a(), b(Ja, {
|
|
2644
2644
|
key: 8,
|
|
2645
2645
|
block: e.block,
|
|
2646
2646
|
onUpdate: C
|
|
2647
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (a(), b(
|
|
2647
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (a(), b(Ca, {
|
|
2648
2648
|
key: 9,
|
|
2649
2649
|
block: e.block,
|
|
2650
2650
|
"font-families": v(S),
|
|
2651
2651
|
onUpdate: C
|
|
2652
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (a(), b(
|
|
2652
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (a(), b(No, {
|
|
2653
2653
|
key: 10,
|
|
2654
2654
|
block: e.block,
|
|
2655
2655
|
"font-families": v(S),
|
|
2656
2656
|
onUpdate: C
|
|
2657
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (a(), b(
|
|
2657
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (a(), b($a, {
|
|
2658
2658
|
key: 11,
|
|
2659
2659
|
block: e.block,
|
|
2660
2660
|
onUpdate: C
|
|
2661
|
-
}, null, 8, ["block"])) : d.value === "html" ? (a(), b(
|
|
2661
|
+
}, null, 8, ["block"])) : d.value === "html" ? (a(), b(Xi, {
|
|
2662
2662
|
key: 12,
|
|
2663
2663
|
block: e.block,
|
|
2664
2664
|
onUpdate: C
|
|
@@ -2667,52 +2667,52 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2667
2667
|
block: e.block,
|
|
2668
2668
|
"font-families": v(S),
|
|
2669
2669
|
onUpdate: C
|
|
2670
|
-
}, null, 8, ["block", "font-families"])) : _("", !0), j(
|
|
2670
|
+
}, null, 8, ["block", "font-families"])) : _("", !0), j(ri, {
|
|
2671
2671
|
block: e.block,
|
|
2672
2672
|
"is-first-section": d.value === "paragraph",
|
|
2673
2673
|
onUpdate: C
|
|
2674
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2674
|
+
}, null, 8, ["block", "is-first-section"])])], 8, ss));
|
|
2675
2675
|
}
|
|
2676
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2676
|
+
}), [["__scopeId", "data-v-2ac88283"]]), gs = ["aria-label"], _s = {
|
|
2677
2677
|
role: "tablist",
|
|
2678
2678
|
class: "tpl:relative tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-active)] tpl:p-1.5"
|
|
2679
|
-
},
|
|
2679
|
+
}, vs = [
|
|
2680
2680
|
"aria-selected",
|
|
2681
2681
|
"aria-label",
|
|
2682
2682
|
"title"
|
|
2683
|
-
],
|
|
2683
|
+
], ys = { key: 0 }, bs = [
|
|
2684
2684
|
"aria-selected",
|
|
2685
2685
|
"aria-label",
|
|
2686
2686
|
"title"
|
|
2687
|
-
],
|
|
2687
|
+
], xs = { key: 0 }, Ss = [
|
|
2688
2688
|
"aria-selected",
|
|
2689
2689
|
"aria-label",
|
|
2690
2690
|
"title"
|
|
2691
|
-
],
|
|
2691
|
+
], Cs = { key: 0 }, ws = {
|
|
2692
2692
|
key: 1,
|
|
2693
2693
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2694
|
-
},
|
|
2694
|
+
}, Ts = {
|
|
2695
2695
|
key: 0,
|
|
2696
2696
|
id: "tpl-tabpanel-content",
|
|
2697
2697
|
role: "tabpanel",
|
|
2698
2698
|
"aria-labelledby": "tpl-tab-content",
|
|
2699
2699
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2700
|
-
},
|
|
2700
|
+
}, Es = {
|
|
2701
2701
|
key: 1,
|
|
2702
2702
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:px-6 tpl:py-10 tpl:text-center tpl:text-[var(--tpl-text-muted)]"
|
|
2703
|
-
},
|
|
2703
|
+
}, Ds = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Os = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ks = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, As = {
|
|
2704
2704
|
key: 1,
|
|
2705
2705
|
id: "tpl-tabpanel-settings",
|
|
2706
2706
|
role: "tabpanel",
|
|
2707
2707
|
"aria-labelledby": "tpl-tab-settings",
|
|
2708
2708
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2709
|
-
},
|
|
2709
|
+
}, js = {
|
|
2710
2710
|
key: 2,
|
|
2711
2711
|
id: "tpl-tabpanel-issues",
|
|
2712
2712
|
role: "tabpanel",
|
|
2713
2713
|
"aria-labelledby": "tpl-tab-issues",
|
|
2714
2714
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2715
|
-
},
|
|
2715
|
+
}, Ms = /* @__PURE__ */ A({
|
|
2716
2716
|
__name: "RightSidebar",
|
|
2717
2717
|
props: {
|
|
2718
2718
|
selectedBlock: {},
|
|
@@ -2726,7 +2726,7 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2726
2726
|
"update-settings"
|
|
2727
2727
|
],
|
|
2728
2728
|
setup(e, { emit: t }) {
|
|
2729
|
-
let n = f(() => import("./IssuesPanel-DeHTmRDz.js")), r = e, i = t, { t: o } =
|
|
2729
|
+
let n = f(() => import("./IssuesPanel-DeHTmRDz.js")), r = e, i = t, { t: o } = R(), s = d("content"), l = c(Me, null), u = h(() => l !== null), p = h(() => l?.issues.value.length ?? 0);
|
|
2730
2730
|
function y(e) {
|
|
2731
2731
|
return s.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
|
|
2732
2732
|
}
|
|
@@ -2736,13 +2736,13 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2736
2736
|
boxShadow: "var(--tpl-shadow-md)"
|
|
2737
2737
|
} : { backgroundColor: "transparent" };
|
|
2738
2738
|
}
|
|
2739
|
-
return
|
|
2739
|
+
return ee(() => r.selectedBlock, (e) => {
|
|
2740
2740
|
e && (s.value = "content");
|
|
2741
2741
|
}), (t, r) => (a(), g("aside", {
|
|
2742
2742
|
"aria-label": v(o).landmarks.rightSidebar,
|
|
2743
2743
|
class: C(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", e.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
2744
2744
|
}, [
|
|
2745
|
-
w("div",
|
|
2745
|
+
w("div", _s, [
|
|
2746
2746
|
w("button", {
|
|
2747
2747
|
id: "tpl-tab-content",
|
|
2748
2748
|
role: "tab",
|
|
@@ -2753,10 +2753,10 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2753
2753
|
class: C(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", y("content")]),
|
|
2754
2754
|
style: E(x("content")),
|
|
2755
2755
|
onClick: r[0] ||= (e) => s.value = "content"
|
|
2756
|
-
}, [j(v(
|
|
2756
|
+
}, [j(v(_t), {
|
|
2757
2757
|
size: 14,
|
|
2758
2758
|
"stroke-width": 2
|
|
2759
|
-
}), s.value === "content" ? (a(), g("span",
|
|
2759
|
+
}), s.value === "content" ? (a(), g("span", ys, m(v(o).sidebar.content), 1)) : _("", !0)], 14, vs),
|
|
2760
2760
|
w("button", {
|
|
2761
2761
|
id: "tpl-tab-settings",
|
|
2762
2762
|
role: "tab",
|
|
@@ -2767,10 +2767,10 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2767
2767
|
class: C(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", y("settings")]),
|
|
2768
2768
|
style: E(x("settings")),
|
|
2769
2769
|
onClick: r[1] ||= (e) => s.value = "settings"
|
|
2770
|
-
}, [j(v(
|
|
2770
|
+
}, [j(v(Ct), {
|
|
2771
2771
|
size: 14,
|
|
2772
2772
|
"stroke-width": 1.5
|
|
2773
|
-
}), s.value === "settings" ? (a(), g("span",
|
|
2773
|
+
}), s.value === "settings" ? (a(), g("span", xs, m(v(o).sidebar.settings), 1)) : _("", !0)], 14, bs),
|
|
2774
2774
|
u.value ? (a(), g("button", {
|
|
2775
2775
|
key: 0,
|
|
2776
2776
|
id: "tpl-tab-issues",
|
|
@@ -2783,46 +2783,46 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2783
2783
|
style: E(x("issues")),
|
|
2784
2784
|
onClick: r[2] ||= (e) => s.value = "issues"
|
|
2785
2785
|
}, [
|
|
2786
|
-
j(v(
|
|
2786
|
+
j(v(nt), {
|
|
2787
2787
|
size: 14,
|
|
2788
2788
|
"stroke-width": 1.5
|
|
2789
2789
|
}),
|
|
2790
|
-
s.value === "issues" ? (a(), g("span",
|
|
2791
|
-
p.value > 0 ? (a(), g("span",
|
|
2792
|
-
], 14,
|
|
2790
|
+
s.value === "issues" ? (a(), g("span", Cs, m(v(o).issues.panelTabLabel), 1)) : _("", !0),
|
|
2791
|
+
p.value > 0 ? (a(), g("span", ws, m(p.value), 1)) : _("", !0)
|
|
2792
|
+
], 14, Ss)) : _("", !0)
|
|
2793
2793
|
]),
|
|
2794
|
-
s.value === "content" ? (a(), g("div",
|
|
2794
|
+
s.value === "content" ? (a(), g("div", Ts, [e.selectedBlock ? (a(), b(hs, {
|
|
2795
2795
|
key: 0,
|
|
2796
2796
|
block: e.selectedBlock,
|
|
2797
2797
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
2798
2798
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
2799
2799
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
2800
|
-
}, null, 8, ["block"])) : (a(), g("div",
|
|
2801
|
-
w("div",
|
|
2800
|
+
}, null, 8, ["block"])) : (a(), g("div", Es, [
|
|
2801
|
+
w("div", Ds, [j(v(it), {
|
|
2802
2802
|
size: 40,
|
|
2803
2803
|
"stroke-width": 1.5
|
|
2804
2804
|
})]),
|
|
2805
|
-
w("h3",
|
|
2806
|
-
w("p",
|
|
2805
|
+
w("h3", Os, m(v(o).sidebar.noSelection), 1),
|
|
2806
|
+
w("p", ks, m(v(o).sidebar.noSelectionHint), 1)
|
|
2807
2807
|
]))])) : _("", !0),
|
|
2808
|
-
s.value === "settings" ? (a(), g("div",
|
|
2808
|
+
s.value === "settings" ? (a(), g("div", As, [j(Hn, {
|
|
2809
2809
|
settings: e.settings,
|
|
2810
2810
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
2811
2811
|
}, null, 8, ["settings"])])) : _("", !0),
|
|
2812
|
-
s.value === "issues" && u.value ? (a(), g("div",
|
|
2813
|
-
], 10,
|
|
2812
|
+
s.value === "issues" && u.value ? (a(), g("div", js, [j(v(n))])) : _("", !0)
|
|
2813
|
+
], 10, gs));
|
|
2814
2814
|
}
|
|
2815
|
-
}),
|
|
2815
|
+
}), Ns = ["aria-label"], Ps = [
|
|
2816
2816
|
"aria-checked",
|
|
2817
2817
|
"aria-label",
|
|
2818
2818
|
"title",
|
|
2819
2819
|
"onClick"
|
|
2820
|
-
],
|
|
2820
|
+
], Fs = /* @__PURE__ */ A({
|
|
2821
2821
|
__name: "ViewportToggle",
|
|
2822
2822
|
props: { viewport: {} },
|
|
2823
2823
|
emits: ["change"],
|
|
2824
2824
|
setup(e, { emit: t }) {
|
|
2825
|
-
let n = e, r = t, { t: i } =
|
|
2825
|
+
let n = e, r = t, { t: i } = R(), o = h(() => [
|
|
2826
2826
|
{
|
|
2827
2827
|
value: "desktop",
|
|
2828
2828
|
label: i.viewport.desktop
|
|
@@ -2866,30 +2866,30 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2866
2866
|
}),
|
|
2867
2867
|
title: t.label,
|
|
2868
2868
|
onClick: (e) => r("change", t.value)
|
|
2869
|
-
}, [t.value === "desktop" ? (a(), b(v(
|
|
2869
|
+
}, [t.value === "desktop" ? (a(), b(v(lt), {
|
|
2870
2870
|
key: 0,
|
|
2871
2871
|
size: 18,
|
|
2872
2872
|
"stroke-width": 1.5
|
|
2873
|
-
})) : t.value === "tablet" ? (a(), b(v(
|
|
2873
|
+
})) : t.value === "tablet" ? (a(), b(v(vt), {
|
|
2874
2874
|
key: 1,
|
|
2875
2875
|
size: 18,
|
|
2876
2876
|
"stroke-width": 1.5
|
|
2877
|
-
})) : (a(), b(v(
|
|
2877
|
+
})) : (a(), b(v(xt), {
|
|
2878
2878
|
key: 2,
|
|
2879
2879
|
size: 18,
|
|
2880
2880
|
"stroke-width": 1.5
|
|
2881
|
-
})), w("span", null, m(t.label), 1)], 12,
|
|
2881
|
+
})), w("span", null, m(t.label), 1)], 12, Ps))), 128))], 12, Ns));
|
|
2882
2882
|
}
|
|
2883
|
-
}),
|
|
2883
|
+
}), Is = [
|
|
2884
2884
|
"aria-label",
|
|
2885
2885
|
"title",
|
|
2886
2886
|
"aria-pressed"
|
|
2887
|
-
],
|
|
2887
|
+
], Ls = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
2888
2888
|
__name: "PreviewToggle",
|
|
2889
2889
|
props: { previewMode: { type: Boolean } },
|
|
2890
2890
|
emits: ["change"],
|
|
2891
2891
|
setup(e, { emit: t }) {
|
|
2892
|
-
let n = t, { t: r } =
|
|
2892
|
+
let n = t, { t: r } = R();
|
|
2893
2893
|
return (t, i) => (a(), g("button", {
|
|
2894
2894
|
class: "tpl-preview-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
2895
2895
|
style: E({
|
|
@@ -2911,24 +2911,24 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2911
2911
|
key: "eye",
|
|
2912
2912
|
size: 18,
|
|
2913
2913
|
"stroke-width": 1.5
|
|
2914
|
-
})) : (a(), b(v(
|
|
2914
|
+
})) : (a(), b(v(te), {
|
|
2915
2915
|
key: "eye-off",
|
|
2916
2916
|
size: 18,
|
|
2917
2917
|
"stroke-width": 1.5
|
|
2918
2918
|
}))]),
|
|
2919
2919
|
_: 1
|
|
2920
|
-
})], 12,
|
|
2920
|
+
})], 12, Is));
|
|
2921
2921
|
}
|
|
2922
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
2922
|
+
}), [["__scopeId", "data-v-af87d02a"]]), Rs = [
|
|
2923
2923
|
"aria-label",
|
|
2924
2924
|
"title",
|
|
2925
2925
|
"aria-pressed"
|
|
2926
|
-
],
|
|
2926
|
+
], zs = /* @__PURE__ */ Ge(/* @__PURE__ */ A({
|
|
2927
2927
|
__name: "DarkModeToggle",
|
|
2928
2928
|
props: { darkMode: { type: Boolean } },
|
|
2929
2929
|
emits: ["change"],
|
|
2930
2930
|
setup(e, { emit: t }) {
|
|
2931
|
-
let n = t, { t: r } =
|
|
2931
|
+
let n = t, { t: r } = R();
|
|
2932
2932
|
return (t, i) => (a(), g("button", {
|
|
2933
2933
|
class: "tpl-dark-mode-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
2934
2934
|
style: E({
|
|
@@ -2946,37 +2946,37 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2946
2946
|
"leave-to-class": "tpl-icon-leave-to",
|
|
2947
2947
|
mode: "out-in"
|
|
2948
2948
|
}, {
|
|
2949
|
-
default: l(() => [e.darkMode ? (a(), b(v(
|
|
2949
|
+
default: l(() => [e.darkMode ? (a(), b(v(ct), {
|
|
2950
2950
|
key: "moon",
|
|
2951
2951
|
size: 18,
|
|
2952
2952
|
"stroke-width": 1.5
|
|
2953
|
-
})) : (a(), b(v(
|
|
2953
|
+
})) : (a(), b(v(pt), {
|
|
2954
2954
|
key: "sun",
|
|
2955
2955
|
size: 18,
|
|
2956
2956
|
"stroke-width": 1.5
|
|
2957
2957
|
}))]),
|
|
2958
2958
|
_: 1
|
|
2959
|
-
})], 12,
|
|
2959
|
+
})], 12, Rs));
|
|
2960
2960
|
}
|
|
2961
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
2961
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Bs = {
|
|
2962
2962
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
2963
2963
|
style: {
|
|
2964
2964
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
2965
2965
|
"backdrop-filter": "blur(8px)",
|
|
2966
2966
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2967
2967
|
}
|
|
2968
|
-
},
|
|
2968
|
+
}, Vs = {
|
|
2969
2969
|
href: "https://github.com/templatical/sdk",
|
|
2970
2970
|
target: "_blank",
|
|
2971
2971
|
rel: "noopener noreferrer",
|
|
2972
2972
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
2973
2973
|
style: { "text-decoration": "none" }
|
|
2974
|
-
},
|
|
2974
|
+
}, Hs = /* @__PURE__ */ A({
|
|
2975
2975
|
__name: "EditorFooter",
|
|
2976
2976
|
props: { positionClass: {} },
|
|
2977
2977
|
setup(e) {
|
|
2978
|
-
let { t } =
|
|
2979
|
-
return (n, r) => (a(), g("footer", { class: C(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [w("div",
|
|
2978
|
+
let { t } = R();
|
|
2979
|
+
return (n, r) => (a(), g("footer", { class: C(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [w("div", Bs, [
|
|
2980
2980
|
w("span", null, m(v(t).footer.poweredBy), 1),
|
|
2981
2981
|
r[0] ||= w("a", {
|
|
2982
2982
|
href: "https://templatical.com",
|
|
@@ -2991,32 +2991,32 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
2991
2991
|
alt: ""
|
|
2992
2992
|
}), k(" Templatical ")], -1),
|
|
2993
2993
|
r[1] ||= w("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
2994
|
-
w("a",
|
|
2994
|
+
w("a", Vs, m(v(t).footer.openSource), 1)
|
|
2995
2995
|
])], 2));
|
|
2996
2996
|
}
|
|
2997
|
-
}),
|
|
2997
|
+
}), Us = ["aria-labelledby", "data-tpl-theme"], Ws = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Gs = ["id"], Ks = ["aria-label"], qs = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Js = [
|
|
2998
2998
|
"id",
|
|
2999
2999
|
"placeholder",
|
|
3000
3000
|
"aria-label",
|
|
3001
3001
|
"aria-activedescendant"
|
|
3002
|
-
],
|
|
3002
|
+
], Ys = {
|
|
3003
3003
|
key: 0,
|
|
3004
3004
|
class: "tpl:flex tpl:gap-1.5 tpl:overflow-x-auto tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2",
|
|
3005
3005
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3006
|
-
},
|
|
3006
|
+
}, Xs = ["data-group-name", "onClick"], Zs = ["aria-label"], Qs = {
|
|
3007
3007
|
key: 0,
|
|
3008
3008
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3009
3009
|
"data-testid": "merge-tag-picker-empty"
|
|
3010
|
-
},
|
|
3010
|
+
}, $s = {
|
|
3011
3011
|
key: 1,
|
|
3012
3012
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3013
3013
|
"data-testid": "merge-tag-picker-empty"
|
|
3014
|
-
},
|
|
3014
|
+
}, ec = [
|
|
3015
3015
|
"aria-expanded",
|
|
3016
3016
|
"data-group-name",
|
|
3017
3017
|
"data-group-collapsed",
|
|
3018
3018
|
"onClick"
|
|
3019
|
-
],
|
|
3019
|
+
], tc = { class: "tpl:ml-1 tpl:font-normal" }, nc = [
|
|
3020
3020
|
"id",
|
|
3021
3021
|
"aria-selected",
|
|
3022
3022
|
"data-selected",
|
|
@@ -3025,38 +3025,38 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
3025
3025
|
"title",
|
|
3026
3026
|
"onMousemove",
|
|
3027
3027
|
"onClick"
|
|
3028
|
-
],
|
|
3028
|
+
], rc = { class: "tpl:text-sm tpl:font-medium" }, ic = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, ac = {
|
|
3029
3029
|
key: 0,
|
|
3030
3030
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3031
|
-
}, $ = "tpl-merge-tag-picker-list",
|
|
3031
|
+
}, $ = "tpl-merge-tag-picker-list", oc = /* @__PURE__ */ A({
|
|
3032
3032
|
__name: "MergeTagPickerModal",
|
|
3033
3033
|
setup(e) {
|
|
3034
|
-
let t =
|
|
3035
|
-
function
|
|
3036
|
-
return
|
|
3034
|
+
let t = We(Te, "MergeTagPickerModal"), { t: r, format: i } = R(), u = c(Ke, null), f = c(Be, null), x = d(""), T = qe(x, 200), D = d(null), k = h(() => T.value.trim().length > 0), A = d(0), M = h(() => t.tags.value.some((e) => !!e.group)), N = d(/* @__PURE__ */ new Set());
|
|
3035
|
+
function P(e) {
|
|
3036
|
+
return N.value.has(e);
|
|
3037
3037
|
}
|
|
3038
|
-
function
|
|
3039
|
-
let t = new Set(
|
|
3040
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
3038
|
+
function te(e) {
|
|
3039
|
+
let t = new Set(N.value);
|
|
3040
|
+
t.has(e) ? t.delete(e) : t.add(e), N.value = t, A.value = 0;
|
|
3041
3041
|
}
|
|
3042
|
-
let
|
|
3043
|
-
let e =
|
|
3042
|
+
let F = h(() => {
|
|
3043
|
+
let e = T.value.trim().toLowerCase();
|
|
3044
3044
|
return e ? t.tags.value.filter((t) => [
|
|
3045
3045
|
t.label,
|
|
3046
3046
|
t.value,
|
|
3047
3047
|
t.description ?? ""
|
|
3048
3048
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3049
|
-
}),
|
|
3050
|
-
if (!
|
|
3049
|
+
}), I = h(() => {
|
|
3050
|
+
if (!M.value) return [];
|
|
3051
3051
|
let e = r.mergeTag.picker.otherGroup, n = /* @__PURE__ */ new Set(), i = [];
|
|
3052
3052
|
for (let r of t.tags.value) {
|
|
3053
3053
|
let t = r.group ?? e;
|
|
3054
3054
|
n.has(t) || (n.add(t), i.push(t));
|
|
3055
3055
|
}
|
|
3056
3056
|
return i;
|
|
3057
|
-
}),
|
|
3058
|
-
let e =
|
|
3059
|
-
if (!
|
|
3057
|
+
}), L = h(() => {
|
|
3058
|
+
let e = F.value;
|
|
3059
|
+
if (!M.value || k.value) return e.map((e, t) => ({
|
|
3060
3060
|
kind: "tag",
|
|
3061
3061
|
tag: e,
|
|
3062
3062
|
index: t
|
|
@@ -3073,49 +3073,49 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
3073
3073
|
kind: "header",
|
|
3074
3074
|
group: e,
|
|
3075
3075
|
count: t.length
|
|
3076
|
-
}), !
|
|
3076
|
+
}), !N.value.has(e)) for (let e of t) a.push({
|
|
3077
3077
|
kind: "tag",
|
|
3078
3078
|
tag: e,
|
|
3079
3079
|
index: o
|
|
3080
3080
|
}), o++;
|
|
3081
3081
|
}
|
|
3082
3082
|
return a;
|
|
3083
|
-
}),
|
|
3084
|
-
|
|
3085
|
-
e && (
|
|
3086
|
-
|
|
3083
|
+
}), z = h(() => L.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3084
|
+
ee(() => t.isOpen.value, (e) => {
|
|
3085
|
+
e && (x.value = "", A.value = 0, N.value = /* @__PURE__ */ new Set(), o(() => {
|
|
3086
|
+
D.value?.focus();
|
|
3087
3087
|
}));
|
|
3088
|
-
}),
|
|
3089
|
-
|
|
3088
|
+
}), ee(z, (e) => {
|
|
3089
|
+
A.value >= e.length && (A.value = Math.max(0, e.length - 1));
|
|
3090
3090
|
});
|
|
3091
|
-
function
|
|
3091
|
+
function B(e) {
|
|
3092
3092
|
t.resolve(e);
|
|
3093
3093
|
}
|
|
3094
|
-
function
|
|
3094
|
+
function ne() {
|
|
3095
3095
|
t.resolve(null);
|
|
3096
3096
|
}
|
|
3097
|
-
function
|
|
3098
|
-
if (
|
|
3099
|
-
let t =
|
|
3100
|
-
|
|
3097
|
+
function re(e) {
|
|
3098
|
+
if (z.value.length === 0) return;
|
|
3099
|
+
let t = A.value + e;
|
|
3100
|
+
A.value = Math.max(0, Math.min(z.value.length - 1, t)), se();
|
|
3101
3101
|
}
|
|
3102
|
-
let
|
|
3103
|
-
function
|
|
3104
|
-
|
|
3102
|
+
let ie = d(null), ae = d({});
|
|
3103
|
+
function oe(e, t) {
|
|
3104
|
+
ae.value[e] = t ?? null;
|
|
3105
3105
|
}
|
|
3106
|
-
function
|
|
3106
|
+
function se() {
|
|
3107
3107
|
o(() => {
|
|
3108
|
-
let e =
|
|
3109
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3108
|
+
let e = ie.value;
|
|
3109
|
+
e && e.querySelector(`[data-merge-tag-index="${A.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3110
3110
|
});
|
|
3111
3111
|
}
|
|
3112
|
-
function
|
|
3113
|
-
if (
|
|
3114
|
-
let t = new Set(
|
|
3115
|
-
t.delete(e),
|
|
3112
|
+
function ce(e) {
|
|
3113
|
+
if (N.value.has(e)) {
|
|
3114
|
+
let t = new Set(N.value);
|
|
3115
|
+
t.delete(e), N.value = t;
|
|
3116
3116
|
}
|
|
3117
3117
|
o(() => {
|
|
3118
|
-
let t =
|
|
3118
|
+
let t = ie.value;
|
|
3119
3119
|
if (!t) return;
|
|
3120
3120
|
let n = 0, r = !1;
|
|
3121
3121
|
for (let i of Array.from(t.children)) {
|
|
@@ -3131,126 +3131,128 @@ var wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = ["value"], Da = /* @__PUR
|
|
|
3131
3131
|
});
|
|
3132
3132
|
});
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3135
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3136
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3134
|
+
function le(e) {
|
|
3135
|
+
if (e.key === "ArrowDown") e.preventDefault(), re(1);
|
|
3136
|
+
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3137
3137
|
else if (e.key === "Enter") {
|
|
3138
3138
|
e.preventDefault();
|
|
3139
|
-
let t =
|
|
3140
|
-
t &&
|
|
3139
|
+
let t = z.value[A.value];
|
|
3140
|
+
t && B(t);
|
|
3141
3141
|
}
|
|
3142
3142
|
}
|
|
3143
|
-
function
|
|
3144
|
-
if (
|
|
3143
|
+
function ue() {
|
|
3144
|
+
if (z.value.length !== 0) return `${$}-opt-${A.value}`;
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function de(e) {
|
|
3147
3147
|
return `${$}-opt-${e}`;
|
|
3148
3148
|
}
|
|
3149
|
-
let
|
|
3149
|
+
let fe = h(() => t.tags.value.length === 0), pe = h(() => !fe.value && F.value.length === 0), me = h(() => M.value && I.value.length > 1 && !k.value);
|
|
3150
3150
|
return (e, o) => (a(), b(V, {
|
|
3151
3151
|
visible: v(t).isOpen.value,
|
|
3152
|
-
onClose:
|
|
3153
|
-
onKeydown:
|
|
3152
|
+
onClose: ne,
|
|
3153
|
+
onKeydown: le
|
|
3154
3154
|
}, {
|
|
3155
3155
|
default: l(() => [w("div", {
|
|
3156
3156
|
role: "dialog",
|
|
3157
3157
|
"aria-modal": "true",
|
|
3158
3158
|
"aria-labelledby": `${$}-title`,
|
|
3159
|
+
"data-tpl-theme": v(f),
|
|
3159
3160
|
"data-testid": "merge-tag-picker-modal",
|
|
3160
|
-
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
3161
|
+
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
3162
|
+
style: E(v(u))
|
|
3161
3163
|
}, [
|
|
3162
|
-
w("header",
|
|
3164
|
+
w("header", Ws, [w("h2", {
|
|
3163
3165
|
id: `${$}-title`,
|
|
3164
3166
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3165
|
-
}, m(v(r).mergeTag.picker.title), 9,
|
|
3167
|
+
}, m(v(r).mergeTag.picker.title), 9, Gs), w("button", {
|
|
3166
3168
|
type: "button",
|
|
3167
3169
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3168
3170
|
"aria-label": v(r).mergeTag.picker.close,
|
|
3169
3171
|
"data-testid": "merge-tag-picker-close",
|
|
3170
|
-
onClick:
|
|
3172
|
+
onClick: ne
|
|
3171
3173
|
}, [j(v(Oe), {
|
|
3172
3174
|
size: 16,
|
|
3173
3175
|
"stroke-width": 2
|
|
3174
|
-
})], 8,
|
|
3175
|
-
w("div",
|
|
3176
|
+
})], 8, Ks)]),
|
|
3177
|
+
w("div", qs, [j(v(dt), {
|
|
3176
3178
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3177
3179
|
size: 14,
|
|
3178
3180
|
"stroke-width": 2
|
|
3179
3181
|
}), n(w("input", {
|
|
3180
3182
|
id: `${$}-search`,
|
|
3181
3183
|
ref_key: "searchInputRef",
|
|
3182
|
-
ref:
|
|
3183
|
-
"onUpdate:modelValue": o[0] ||= (e) =>
|
|
3184
|
+
ref: D,
|
|
3185
|
+
"onUpdate:modelValue": o[0] ||= (e) => x.value = e,
|
|
3184
3186
|
type: "text",
|
|
3185
3187
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3186
3188
|
placeholder: v(r).mergeTag.picker.searchPlaceholder,
|
|
3187
3189
|
"aria-label": v(r).mergeTag.picker.searchAriaLabel,
|
|
3188
3190
|
"aria-controls": $,
|
|
3189
|
-
"aria-activedescendant":
|
|
3191
|
+
"aria-activedescendant": ue(),
|
|
3190
3192
|
"data-testid": "merge-tag-picker-search",
|
|
3191
3193
|
onKeydown: o[1] ||= p(y(() => {}, ["prevent"]), ["enter"])
|
|
3192
|
-
}, null, 40,
|
|
3193
|
-
|
|
3194
|
+
}, null, 40, Js), [[S, x.value]])]),
|
|
3195
|
+
me.value ? (a(), g("div", Ys, [(a(!0), g(O, null, s(I.value, (e) => (a(), g("button", {
|
|
3194
3196
|
key: e,
|
|
3195
3197
|
type: "button",
|
|
3196
3198
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3197
3199
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3198
3200
|
"data-group-name": e,
|
|
3199
|
-
onClick: (t) =>
|
|
3200
|
-
}, m(e), 9,
|
|
3201
|
+
onClick: (t) => ce(e)
|
|
3202
|
+
}, m(e), 9, Xs))), 128))])) : _("", !0),
|
|
3201
3203
|
w("div", {
|
|
3202
3204
|
id: $,
|
|
3203
3205
|
ref_key: "listRef",
|
|
3204
|
-
ref:
|
|
3206
|
+
ref: ie,
|
|
3205
3207
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3206
3208
|
role: "listbox",
|
|
3207
3209
|
"aria-label": v(r).mergeTag.picker.title,
|
|
3208
3210
|
"data-testid": "merge-tag-picker-list"
|
|
3209
|
-
}, [
|
|
3211
|
+
}, [fe.value ? (a(), g("div", Qs, m(v(r).mergeTag.picker.empty), 1)) : pe.value ? (a(), g("div", $s, m(v(r).mergeTag.picker.noResults), 1)) : (a(!0), g(O, { key: 2 }, s(L.value, (e, t) => (a(), g(O, { key: t }, [e.kind === "header" ? (a(), g("button", {
|
|
3210
3212
|
key: 0,
|
|
3211
3213
|
ref_for: !0,
|
|
3212
|
-
ref: (t) =>
|
|
3214
|
+
ref: (t) => oe(e.group, t),
|
|
3213
3215
|
type: "button",
|
|
3214
|
-
"aria-expanded": !
|
|
3216
|
+
"aria-expanded": !P(e.group),
|
|
3215
3217
|
"aria-controls": $,
|
|
3216
3218
|
class: "tpl:sticky tpl:top-0 tpl:z-10 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-[var(--tpl-bg-elevated)] tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-left tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)]",
|
|
3217
3219
|
"data-testid": "merge-tag-picker-group-header",
|
|
3218
3220
|
"data-group-name": e.group,
|
|
3219
|
-
"data-group-collapsed":
|
|
3220
|
-
onClick: (t) =>
|
|
3221
|
+
"data-group-collapsed": P(e.group) ? "true" : "false",
|
|
3222
|
+
onClick: (t) => te(e.group)
|
|
3221
3223
|
}, [
|
|
3222
3224
|
j(v(Le), {
|
|
3223
3225
|
size: 12,
|
|
3224
3226
|
"stroke-width": 2,
|
|
3225
|
-
class: C(["tpl:transition-transform",
|
|
3227
|
+
class: C(["tpl:transition-transform", P(e.group) ? "tpl:-rotate-90" : ""])
|
|
3226
3228
|
}, null, 8, ["class"]),
|
|
3227
3229
|
w("span", null, m(e.group), 1),
|
|
3228
|
-
w("span",
|
|
3229
|
-
], 8,
|
|
3230
|
+
w("span", tc, " (" + m(v(i)(v(r).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3231
|
+
], 8, ec)) : (a(), g("button", {
|
|
3230
3232
|
key: 1,
|
|
3231
|
-
id:
|
|
3233
|
+
id: de(e.index),
|
|
3232
3234
|
type: "button",
|
|
3233
3235
|
role: "option",
|
|
3234
|
-
"aria-selected": e.index ===
|
|
3235
|
-
"data-selected": e.index ===
|
|
3236
|
+
"aria-selected": e.index === A.value,
|
|
3237
|
+
"data-selected": e.index === A.value ? "true" : "false",
|
|
3236
3238
|
"data-merge-tag-index": e.index,
|
|
3237
3239
|
"data-merge-tag-value": e.tag.value,
|
|
3238
3240
|
title: e.tag.description ? `${e.tag.value} — ${e.tag.description}` : e.tag.value,
|
|
3239
|
-
class: C(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index ===
|
|
3241
|
+
class: C(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === A.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3240
3242
|
"data-testid": "merge-tag-picker-item",
|
|
3241
|
-
onMousemove: (t) =>
|
|
3242
|
-
onClick: (t) =>
|
|
3243
|
+
onMousemove: (t) => A.value = e.index,
|
|
3244
|
+
onClick: (t) => B(e.tag)
|
|
3243
3245
|
}, [
|
|
3244
|
-
w("span",
|
|
3245
|
-
w("span",
|
|
3246
|
-
e.tag.description ? (a(), g("span",
|
|
3247
|
-
], 42,
|
|
3248
|
-
],
|
|
3246
|
+
w("span", rc, m(e.tag.label), 1),
|
|
3247
|
+
w("span", ic, m(e.tag.value), 1),
|
|
3248
|
+
e.tag.description ? (a(), g("span", ac, m(e.tag.description), 1)) : _("", !0)
|
|
3249
|
+
], 42, nc))], 64))), 128))], 8, Zs)
|
|
3250
|
+
], 12, Us)]),
|
|
3249
3251
|
_: 1
|
|
3250
3252
|
}, 8, ["visible"]));
|
|
3251
3253
|
}
|
|
3252
3254
|
});
|
|
3253
3255
|
//#endregion
|
|
3254
|
-
export {
|
|
3256
|
+
export { Fs as a, Ut as c, Ls as i, Nt as l, Hs as n, Ms as o, zs as r, Qt as s, oc as t };
|
|
3255
3257
|
|
|
3256
|
-
//# sourceMappingURL=styles-
|
|
3258
|
+
//# sourceMappingURL=styles-CVUvPdKD.js.map
|