@templatical/editor 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CjfhTZwo.js → AiChatSidebar-DwME3f-a.js} +84 -70
- package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
- package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
- package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-DTT0EkZn.js} +1 -1
- package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-DrJhQRXK.js} +131 -131
- package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
- package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-CiV_jOEM.js} +58 -58
- package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-Bmy6Y1WE.js} +1 -1
- package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
- package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
- package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-DltsKvhP.js} +1 -1
- package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
- package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Dl633j9o.js} +2 -2
- package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-C7fds2Nc.js} +3 -3
- package/dist/{TplModal-CmTSvCY-.js → TplModal-C5_CF-qn.js} +1 -1
- package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-BrKZB10B.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
- package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-C5UQmEgV.js} +16 -16
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-DO1nxSrr.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-DO1nxSrr.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-ChBr3aXj.js} +52 -52
- package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DkSvri9H.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DkSvri9H.js.map} +1 -1
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-BrsW1p9s.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-BrsW1p9s.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-CjqKkTEc.js} +24 -24
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-C8FYbadT.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-C8FYbadT.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-5QwYklNq.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-5QwYklNq.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CJcMnY7o.js → dist-BF5c3Dr-.js} +1 -1
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
- package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
- package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
- package/dist/cdn/chunks/{dist-BkETaOfw.js → dist-DCikBY9K.js} +1 -1
- package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
- package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
- package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
- package/dist/cdn/chunks/{dist-B878xb_62.js → dist-KYv9v_1z2.js} +11 -11
- package/dist/cdn/chunks/{dist-B878xb_62.js.map → dist-KYv9v_1z2.js.map} +1 -1
- package/dist/cdn/chunks/{dist-DLWHlekl.js → dist-MjnKIc0W.js} +1 -1
- package/dist/cdn/chunks/{dist-CllLxIMQ.js → dist-odp0vGRv.js} +1 -1
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-Bj7USRLr.js} +20 -20
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-Bj7USRLr.js.map} +1 -1
- package/dist/cdn/chunks/{features-ofOGnSC0.js → features-Ds0XUfte.js} +1235 -1198
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
- package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-fWsuSvgd.js} +2 -2
- package/dist/cdn/chunks/{icons-bIb7PBOE.js.map → icons-fWsuSvgd.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-BGQm_OyC.js} +528 -528
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-BGQm_OyC.js.map} +1 -1
- package/dist/cdn/chunks/{src-BuW9oYtm.js → src-3i8rPuqd.js} +4 -4
- package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-3i8rPuqd.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-Dgijy53u.js} +1224 -1096
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-BhxaWR8R.js} +2 -2
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js.map → tiptap-BhxaWR8R.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +110 -139
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{dist-BkIys9zn.js → dist-Ci5lFuUy.js} +1 -1
- package/dist/{extensions-DEjfEFhD.js → extensions-DWx_jj8v.js} +1 -1
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
- package/dist/{styles-CgLaxDfu.js → styles-fdXNRqI3.js} +1341 -1213
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +99 -129
- package/dist/templatical-editor.umd.cjs +55 -64
- package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-DUGD6pq_.js} +1054 -1033
- package/package.json +4 -2
- package/dist/CloudEditor-DFyuRxUV.js +0 -926
- package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
- package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
- package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
- package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
- package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
- package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
- package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { A as e,
|
|
1
|
+
import { A as e, I as t, M as n, N as r, P as i, R as a, T as o, _ as s, a as c, c as l, d as u, g as d, h as f, i as p, j as m, k as h, l as g, m as ee, n as te, o as _, p as ne, r as re, s as ie, u as ae, v as oe, y as se } from "./useEditorCore-DUGD6pq_.js";
|
|
2
2
|
import { s as ce, t as le } from "./dist-CG-vEqSU.js";
|
|
3
3
|
import { T as ue, _ as de, a as fe, d as pe, f as me, l as he, n as ge, o as _e, p as ve, s as ye, u as v, v as be } from "./keys-C0MQRs8d.js";
|
|
4
4
|
import { t as y } from "./useI18n-D6m7ZUgY.js";
|
|
5
5
|
import { n as b, t as x } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
6
6
|
import { t as xe } from "./chevron-down-DJLW2Q9Z.js";
|
|
7
7
|
import { t as Se } from "./circle-alert-E2vYPs5r.js";
|
|
8
|
-
import { n as Ce, r as S, t as we } from "./blockTypeIcons-
|
|
8
|
+
import { n as Ce, r as S, t as we } from "./blockTypeIcons-BrKZB10B.js";
|
|
9
9
|
import { n as Te, r as Ee, t as De } from "./refresh-cw-Bb4PEeW1.js";
|
|
10
10
|
import { t as Oe } from "./image-up-X4xIq4ea.js";
|
|
11
11
|
import { t as ke } from "./scan-line-7lZPfOdm.js";
|
|
12
12
|
import { t as Ae } from "./sparkles-KhBCGlqB.js";
|
|
13
|
-
import { _ as je,
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { Fragment as D, Transition as
|
|
19
|
-
import { useDataSourceFetch as
|
|
20
|
-
import { SYNTAX_PRESETS as
|
|
21
|
-
var
|
|
13
|
+
import { _ as je, b as Me, c as Ne, f as C, g as Pe, h as w, i as Fe, l as Ie, m as T, p as E, t as Le, u as Re, v as ze, y as Be } from "./styleConstants-Cxw88naD.js";
|
|
14
|
+
import { t as Ve } from "./trash-2-OwjZ-guZ.js";
|
|
15
|
+
import { t as He } from "./x-CGlq2XQe.js";
|
|
16
|
+
import { t as Ue } from "./useMergeTag-BZ3X0bNr.js";
|
|
17
|
+
import { t as We } from "./readableTextColor-LDlmVEUv.js";
|
|
18
|
+
import { Fragment as D, Transition as Ge, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as N, createVNode as P, defineComponent as F, inject as I, nextTick as Ke, normalizeClass as L, normalizeStyle as R, openBlock as z, reactive as qe, ref as B, renderList as V, renderSlot as Je, resolveDynamicComponent as H, toDisplayString as U, unref as W, vModelText as Ye, vShow as Xe, watch as Ze, withCtx as G, withDirectives as Qe, withKeys as $e, withModifiers as et } from "vue";
|
|
19
|
+
import { useDataSourceFetch as tt } from "@templatical/core";
|
|
20
|
+
import { SYNTAX_PRESETS as nt, containsMergeTag as rt, createBlock as it, createCustomBlock as at, generateId as ot, getLogicMergeTagKeyword as st, isCustomBlock as ct, isLogicMergeTagValue as lt } from "@templatical/types";
|
|
21
|
+
var ut = b("circle", [["circle", {
|
|
22
22
|
cx: "12",
|
|
23
23
|
cy: "12",
|
|
24
24
|
r: "10",
|
|
25
25
|
key: "1mglay"
|
|
26
|
-
}]]),
|
|
26
|
+
}]]), dt = b("layout-template", [
|
|
27
27
|
["rect", {
|
|
28
28
|
width: "18",
|
|
29
29
|
height: "7",
|
|
@@ -48,7 +48,7 @@ var st = b("circle", [["circle", {
|
|
|
48
48
|
rx: "1",
|
|
49
49
|
key: "q5h2i8"
|
|
50
50
|
}]
|
|
51
|
-
]),
|
|
51
|
+
]), ft = b("lock-open", [["rect", {
|
|
52
52
|
width: "18",
|
|
53
53
|
height: "11",
|
|
54
54
|
x: "3",
|
|
@@ -59,7 +59,7 @@ var st = b("circle", [["circle", {
|
|
|
59
59
|
}], ["path", {
|
|
60
60
|
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
61
61
|
key: "1mm8w8"
|
|
62
|
-
}]]),
|
|
62
|
+
}]]), pt = b("lock", [["rect", {
|
|
63
63
|
width: "18",
|
|
64
64
|
height: "11",
|
|
65
65
|
x: "3",
|
|
@@ -70,7 +70,7 @@ var st = b("circle", [["circle", {
|
|
|
70
70
|
}], ["path", {
|
|
71
71
|
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
72
72
|
key: "fwvmzm"
|
|
73
|
-
}]]),
|
|
73
|
+
}]]), mt = b("monitor", [
|
|
74
74
|
["rect", {
|
|
75
75
|
width: "20",
|
|
76
76
|
height: "14",
|
|
@@ -93,10 +93,10 @@ var st = b("circle", [["circle", {
|
|
|
93
93
|
y2: "21",
|
|
94
94
|
key: "vw1qmm"
|
|
95
95
|
}]
|
|
96
|
-
]),
|
|
96
|
+
]), ht = b("moon", [["path", {
|
|
97
97
|
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
98
98
|
key: "kfwtm"
|
|
99
|
-
}]]),
|
|
99
|
+
}]]), gt = b("panel-top", [["rect", {
|
|
100
100
|
width: "18",
|
|
101
101
|
height: "18",
|
|
102
102
|
x: "3",
|
|
@@ -106,19 +106,19 @@ var st = b("circle", [["circle", {
|
|
|
106
106
|
}], ["path", {
|
|
107
107
|
d: "M3 9h18",
|
|
108
108
|
key: "1pudct"
|
|
109
|
-
}]]),
|
|
109
|
+
}]]), K = b("plus", [["path", {
|
|
110
110
|
d: "M5 12h14",
|
|
111
111
|
key: "1ays0h"
|
|
112
112
|
}], ["path", {
|
|
113
113
|
d: "M12 5v14",
|
|
114
114
|
key: "s699le"
|
|
115
|
-
}]]),
|
|
115
|
+
}]]), _t = b("rotate-ccw", [["path", {
|
|
116
116
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
117
117
|
key: "1357e3"
|
|
118
118
|
}], ["path", {
|
|
119
119
|
d: "M3 3v5h5",
|
|
120
120
|
key: "1xhq8a"
|
|
121
|
-
}]]),
|
|
121
|
+
}]]), vt = b("settings", [["path", {
|
|
122
122
|
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
123
123
|
key: "1i5ecw"
|
|
124
124
|
}], ["circle", {
|
|
@@ -126,7 +126,7 @@ var st = b("circle", [["circle", {
|
|
|
126
126
|
cy: "12",
|
|
127
127
|
r: "3",
|
|
128
128
|
key: "1v7zrd"
|
|
129
|
-
}]]),
|
|
129
|
+
}]]), yt = b("smartphone", [["rect", {
|
|
130
130
|
width: "14",
|
|
131
131
|
height: "20",
|
|
132
132
|
x: "5",
|
|
@@ -137,7 +137,7 @@ var st = b("circle", [["circle", {
|
|
|
137
137
|
}], ["path", {
|
|
138
138
|
d: "M12 18h.01",
|
|
139
139
|
key: "mhygvu"
|
|
140
|
-
}]]),
|
|
140
|
+
}]]), bt = b("square-plus", [
|
|
141
141
|
["rect", {
|
|
142
142
|
width: "18",
|
|
143
143
|
height: "18",
|
|
@@ -154,14 +154,14 @@ var st = b("circle", [["circle", {
|
|
|
154
154
|
d: "M12 8v8",
|
|
155
155
|
key: "napkw2"
|
|
156
156
|
}]
|
|
157
|
-
]),
|
|
157
|
+
]), xt = b("square", [["rect", {
|
|
158
158
|
width: "18",
|
|
159
159
|
height: "18",
|
|
160
160
|
x: "3",
|
|
161
161
|
y: "3",
|
|
162
162
|
rx: "2",
|
|
163
163
|
key: "afitv7"
|
|
164
|
-
}]]),
|
|
164
|
+
}]]), St = b("sun", [
|
|
165
165
|
["circle", {
|
|
166
166
|
cx: "12",
|
|
167
167
|
cy: "12",
|
|
@@ -200,7 +200,7 @@ var st = b("circle", [["circle", {
|
|
|
200
200
|
d: "m19.07 4.93-1.41 1.41",
|
|
201
201
|
key: "1shlcs"
|
|
202
202
|
}]
|
|
203
|
-
]),
|
|
203
|
+
]), Ct = b("tablet", [["rect", {
|
|
204
204
|
width: "16",
|
|
205
205
|
height: "20",
|
|
206
206
|
x: "4",
|
|
@@ -214,19 +214,19 @@ var st = b("circle", [["circle", {
|
|
|
214
214
|
y1: "18",
|
|
215
215
|
y2: "18",
|
|
216
216
|
key: "1dp563"
|
|
217
|
-
}]]),
|
|
217
|
+
}]]), wt = /* @__PURE__ */ a(g(), 1), Tt = ["aria-label"], Et = { class: "tpl:relative" }, Dt = {
|
|
218
218
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
219
219
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
220
|
-
},
|
|
220
|
+
}, Ot = {
|
|
221
221
|
key: 0,
|
|
222
222
|
class: "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:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)]"
|
|
223
|
-
},
|
|
223
|
+
}, kt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, At = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, jt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Mt = {
|
|
224
224
|
key: 0,
|
|
225
225
|
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)]"
|
|
226
|
-
},
|
|
226
|
+
}, Nt = {
|
|
227
227
|
key: 1,
|
|
228
228
|
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)]"
|
|
229
|
-
},
|
|
229
|
+
}, Pt = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
230
230
|
__name: "Canvas",
|
|
231
231
|
props: {
|
|
232
232
|
viewport: {},
|
|
@@ -245,44 +245,44 @@ var st = b("circle", [["circle", {
|
|
|
245
245
|
let n = {
|
|
246
246
|
section: l,
|
|
247
247
|
title: ae,
|
|
248
|
-
paragraph:
|
|
248
|
+
paragraph: ee,
|
|
249
249
|
image: d,
|
|
250
|
-
button:
|
|
250
|
+
button: i,
|
|
251
251
|
divider: oe,
|
|
252
252
|
spacer: p,
|
|
253
253
|
html: s,
|
|
254
254
|
social: c,
|
|
255
255
|
menu: f,
|
|
256
256
|
table: re,
|
|
257
|
-
video:
|
|
258
|
-
countdown:
|
|
257
|
+
video: te,
|
|
258
|
+
countdown: r,
|
|
259
259
|
custom: se
|
|
260
|
-
},
|
|
261
|
-
get: () =>
|
|
260
|
+
}, a = e, o = t, { t: m } = y(), h = ue(me, "Canvas"), g = I(he, null), _ = I(_e, null), ie = I(ye, {}), ce = O(() => (ie.plan?.hasFeature("ai_generation") ?? !1) && (ie.ai?.isFeatureEnabled("chat") ?? !1)), le = O(() => (ie.plan?.hasFeature("ai_generation") ?? !1) && (ie.ai?.isFeatureEnabled("designToTemplate") ?? !1)), de = O({
|
|
261
|
+
get: () => a.content.blocks,
|
|
262
262
|
set: (e) => {
|
|
263
263
|
h.setContent({
|
|
264
|
-
...
|
|
264
|
+
...a.content,
|
|
265
265
|
blocks: e
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
}), fe = O(() => {
|
|
269
|
-
switch (
|
|
269
|
+
switch (a.viewport) {
|
|
270
270
|
case "mobile": return 375;
|
|
271
271
|
case "tablet": return 768;
|
|
272
|
-
default: return
|
|
272
|
+
default: return a.content.settings.width;
|
|
273
273
|
}
|
|
274
274
|
}), pe = O(() => ({
|
|
275
|
-
backgroundColor:
|
|
276
|
-
fontFamily:
|
|
275
|
+
backgroundColor: a.content.settings.backgroundColor,
|
|
276
|
+
fontFamily: a.content.settings.fontFamily
|
|
277
277
|
}));
|
|
278
278
|
function ge(e) {
|
|
279
|
-
|
|
279
|
+
a.previewMode || e.target === e.currentTarget && o("select-block", null);
|
|
280
280
|
}
|
|
281
281
|
function ve(e) {
|
|
282
|
-
return ne(e,
|
|
282
|
+
return ne(e, _, n);
|
|
283
283
|
}
|
|
284
284
|
function v(e) {
|
|
285
|
-
return
|
|
285
|
+
return a.lockedBlocks?.get(e) ?? null;
|
|
286
286
|
}
|
|
287
287
|
function be(e, t) {
|
|
288
288
|
e.type === "custom" && h.updateBlock(e.id, {
|
|
@@ -293,7 +293,7 @@ var st = b("circle", [["circle", {
|
|
|
293
293
|
return (t, n) => (z(), j("div", {
|
|
294
294
|
"data-testid": "canvas-wrapper",
|
|
295
295
|
role: "region",
|
|
296
|
-
"aria-label":
|
|
296
|
+
"aria-label": W(m).landmarks.canvas,
|
|
297
297
|
class: "tpl-canvas-wrapper tpl:rounded-lg",
|
|
298
298
|
style: R({
|
|
299
299
|
width: `${fe.value}px`,
|
|
@@ -309,7 +309,7 @@ var st = b("circle", [["circle", {
|
|
|
309
309
|
}]),
|
|
310
310
|
style: R(pe.value),
|
|
311
311
|
onClick: ge
|
|
312
|
-
}, [P(
|
|
312
|
+
}, [P(W(wt.default), {
|
|
313
313
|
modelValue: de.value,
|
|
314
314
|
"onUpdate:modelValue": n[2] ||= (e) => de.value = e,
|
|
315
315
|
group: "blocks",
|
|
@@ -323,7 +323,7 @@ var st = b("circle", [["circle", {
|
|
|
323
323
|
disabled: e.previewMode,
|
|
324
324
|
class: "tpl-canvas-blocks"
|
|
325
325
|
}, {
|
|
326
|
-
item:
|
|
326
|
+
item: G(({ element: t }) => [Qe(M("div", null, [M("div", Et, [v(t.id) ? (z(), j("div", {
|
|
327
327
|
key: 0,
|
|
328
328
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
329
329
|
style: R({
|
|
@@ -334,20 +334,20 @@ var st = b("circle", [["circle", {
|
|
|
334
334
|
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",
|
|
335
335
|
style: R({
|
|
336
336
|
backgroundColor: v(t.id).color,
|
|
337
|
-
color:
|
|
337
|
+
color: W(We)(v(t.id).color)
|
|
338
338
|
})
|
|
339
|
-
}, [M("span",
|
|
339
|
+
}, [M("span", Dt, U(v(t.id).name.charAt(0)), 1), N(" " + U(v(t.id).name), 1)], 4)], 4)) : A("", !0), P(u, {
|
|
340
340
|
block: t,
|
|
341
341
|
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !v(t.id),
|
|
342
342
|
viewport: e.viewport,
|
|
343
343
|
"preview-mode": e.previewMode,
|
|
344
344
|
onSelect: (n) => e.previewMode || v(t.id) ? void 0 : o("select-block", t.id)
|
|
345
345
|
}, {
|
|
346
|
-
default:
|
|
346
|
+
default: G(() => [(z(), k(H(ve(t)), {
|
|
347
347
|
block: t,
|
|
348
348
|
viewport: e.viewport,
|
|
349
349
|
onFetchData: (e) => be(t, e),
|
|
350
|
-
onUpdate: (e) =>
|
|
350
|
+
onUpdate: (e) => W(h).updateBlock(t.id, e)
|
|
351
351
|
}, null, 40, [
|
|
352
352
|
"block",
|
|
353
353
|
"viewport",
|
|
@@ -361,58 +361,58 @@ var st = b("circle", [["circle", {
|
|
|
361
361
|
"viewport",
|
|
362
362
|
"preview-mode",
|
|
363
363
|
"onSelect"
|
|
364
|
-
])])], 512), [[
|
|
365
|
-
footer:
|
|
366
|
-
M("div",
|
|
364
|
+
])])], 512), [[Xe, !W(g)?.isHidden(t.id)]])]),
|
|
365
|
+
footer: G(() => [de.value.length === 0 && !e.previewMode ? (z(), j("div", Ot, [
|
|
366
|
+
M("div", kt, [P(W(bt), {
|
|
367
367
|
size: 48,
|
|
368
368
|
"stroke-width": 1
|
|
369
369
|
})]),
|
|
370
|
-
M("p",
|
|
371
|
-
M("p",
|
|
372
|
-
ce.value ? (z(), j("p",
|
|
373
|
-
N(
|
|
370
|
+
M("p", At, U(W(m).canvas.noBlocks), 1),
|
|
371
|
+
M("p", jt, U(W(m).canvas.dragHint), 1),
|
|
372
|
+
ce.value ? (z(), j("p", Mt, [
|
|
373
|
+
N(U(W(m).canvas.aiHintChat) + " ", 1),
|
|
374
374
|
M("button", {
|
|
375
375
|
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)]",
|
|
376
376
|
onClick: n[0] ||= (e) => o("open-ai-chat")
|
|
377
|
-
}, [P(
|
|
377
|
+
}, [P(W(Ae), {
|
|
378
378
|
size: 14,
|
|
379
379
|
"stroke-width": 2
|
|
380
|
-
}), N(" " +
|
|
381
|
-
N(" " +
|
|
380
|
+
}), N(" " + U(W(m).aiMenu.aiAssistant), 1)]),
|
|
381
|
+
N(" " + U(W(m).canvas.aiHintChatSuffix), 1)
|
|
382
382
|
])) : A("", !0),
|
|
383
|
-
le.value ? (z(), j("p",
|
|
384
|
-
N(
|
|
383
|
+
le.value ? (z(), j("p", Nt, [
|
|
384
|
+
N(U(W(m).canvas.aiHintDesign) + " ", 1),
|
|
385
385
|
M("button", {
|
|
386
386
|
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)]",
|
|
387
387
|
onClick: n[1] ||= (e) => o("open-design-reference")
|
|
388
|
-
}, [P(
|
|
388
|
+
}, [P(W(Oe), {
|
|
389
389
|
size: 14,
|
|
390
390
|
"stroke-width": 2
|
|
391
|
-
}), N(" " +
|
|
392
|
-
N(" " +
|
|
391
|
+
}), N(" " + U(W(m).aiMenu.designToTemplate), 1)]),
|
|
392
|
+
N(" " + U(W(m).canvas.aiHintDesignSuffix), 1)
|
|
393
393
|
])) : A("", !0)
|
|
394
394
|
])) : A("", !0)]),
|
|
395
395
|
_: 1
|
|
396
|
-
}, 8, ["modelValue", "disabled"])], 6)], 12,
|
|
396
|
+
}, 8, ["modelValue", "disabled"])], 6)], 12, Tt));
|
|
397
397
|
}
|
|
398
|
-
}), [["__scopeId", "data-v-43f4b3a0"]]),
|
|
398
|
+
}), [["__scopeId", "data-v-43f4b3a0"]]), Ft = ["aria-label"], It = {
|
|
399
399
|
key: 0,
|
|
400
400
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
401
|
-
},
|
|
401
|
+
}, Lt = ["aria-label"], Rt = {
|
|
402
402
|
key: 0,
|
|
403
403
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
404
|
-
},
|
|
404
|
+
}, zt = {
|
|
405
405
|
key: 1,
|
|
406
406
|
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)]"
|
|
407
|
-
},
|
|
407
|
+
}, Bt = [
|
|
408
408
|
"data-palette-type",
|
|
409
409
|
"aria-label",
|
|
410
410
|
"onClick",
|
|
411
411
|
"onKeydown"
|
|
412
|
-
],
|
|
412
|
+
], Vt = { 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" }, Ht = {
|
|
413
413
|
key: 0,
|
|
414
414
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
415
|
-
},
|
|
415
|
+
}, Ut = /* @__PURE__ */ F({
|
|
416
416
|
__name: "Sidebar",
|
|
417
417
|
setup(e) {
|
|
418
418
|
let { t: n, format: r } = y(), i = I(v, []), a = I(fe, void 0), s = I(me, null), c = I(ye, {}), l = O(() => (c.savedModules?.moduleCount.value ?? 0) > 0), u = B(!1), d = [
|
|
@@ -446,20 +446,20 @@ var st = b("circle", [["circle", {
|
|
|
446
446
|
function h(e) {
|
|
447
447
|
if (e.isCustom) {
|
|
448
448
|
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
449
|
-
if (n) return
|
|
449
|
+
if (n) return at(n);
|
|
450
450
|
}
|
|
451
|
-
return
|
|
451
|
+
return it(e.type, a);
|
|
452
452
|
}
|
|
453
453
|
function g(e) {
|
|
454
454
|
if (!s) return;
|
|
455
455
|
let t = h(e);
|
|
456
456
|
s.addBlock(t), s.selectBlock(t.id);
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ee(e, t) {
|
|
459
459
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), g(t));
|
|
460
460
|
}
|
|
461
461
|
return (e, t) => (z(), j("aside", {
|
|
462
|
-
"aria-label":
|
|
462
|
+
"aria-label": W(n).sidebarNav.palette,
|
|
463
463
|
class: "tpl-sidebar-rail tpl:absolute tpl:top-14 tpl:bottom-0 tpl:left-0 tpl:z-40 tpl:overflow-hidden",
|
|
464
464
|
style: R({
|
|
465
465
|
width: u.value ? "200px" : "48px",
|
|
@@ -472,21 +472,21 @@ var st = b("circle", [["circle", {
|
|
|
472
472
|
onMouseleave: t[2] ||= (e) => u.value = !1,
|
|
473
473
|
onFocusin: t[3] ||= (e) => u.value = !0,
|
|
474
474
|
onFocusout: t[4] ||= (e) => u.value = !1
|
|
475
|
-
}, [l.value ? (z(), j("div",
|
|
475
|
+
}, [l.value ? (z(), j("div", It, [M("button", {
|
|
476
476
|
type: "button",
|
|
477
|
-
"aria-label":
|
|
477
|
+
"aria-label": W(n).sidebarNav.browseModules,
|
|
478
478
|
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)]",
|
|
479
479
|
style: R({ justifyContent: u.value ? "flex-start" : "center" }),
|
|
480
|
-
onClick: t[0] ||= (e) =>
|
|
480
|
+
onClick: t[0] ||= (e) => W(c).savedModules?.openBrowser()
|
|
481
481
|
}, [
|
|
482
|
-
P(
|
|
482
|
+
P(W(Ce), {
|
|
483
483
|
size: 20,
|
|
484
484
|
"stroke-width": 1.5,
|
|
485
485
|
class: "tpl:shrink-0"
|
|
486
486
|
}),
|
|
487
|
-
u.value ? (z(), j("span",
|
|
488
|
-
u.value ? (z(), j("span",
|
|
489
|
-
], 12,
|
|
487
|
+
u.value ? (z(), j("span", Rt, U(W(n).modules.title), 1)) : A("", !0),
|
|
488
|
+
u.value ? (z(), j("span", zt, U(W(c).savedModules?.moduleCount.value ?? 0), 1)) : A("", !0)
|
|
489
|
+
], 12, Lt)])) : A("", !0), P(W(wt.default), {
|
|
490
490
|
list: m.value,
|
|
491
491
|
group: {
|
|
492
492
|
name: "blocks",
|
|
@@ -500,15 +500,15 @@ var st = b("circle", [["circle", {
|
|
|
500
500
|
"ghost-class": "tpl-ghost",
|
|
501
501
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:p-1"
|
|
502
502
|
}, {
|
|
503
|
-
item:
|
|
503
|
+
item: G(({ element: e }) => [M("button", {
|
|
504
504
|
type: "button",
|
|
505
505
|
"data-palette-type": e.type,
|
|
506
|
-
"aria-label":
|
|
506
|
+
"aria-label": W(r)(W(n).sidebarNav.insertBlock, { block: e.label }),
|
|
507
507
|
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",
|
|
508
508
|
style: R({ justifyContent: u.value ? "flex-start" : "center" }),
|
|
509
509
|
onClick: (t) => g(e),
|
|
510
|
-
onKeydown: (t) =>
|
|
511
|
-
}, [M("div",
|
|
510
|
+
onKeydown: (t) => ee(t, e)
|
|
511
|
+
}, [M("div", Vt, [W(we)[e.type] ? (z(), k(H(W(we)[e.type]), {
|
|
512
512
|
key: 0,
|
|
513
513
|
size: 20,
|
|
514
514
|
"stroke-width": 1.5
|
|
@@ -516,38 +516,38 @@ var st = b("circle", [["circle", {
|
|
|
516
516
|
key: 1,
|
|
517
517
|
icon: e.icon,
|
|
518
518
|
size: 20
|
|
519
|
-
}, null, 8, ["icon"])) : A("", !0)]), u.value ? (z(), j("span",
|
|
519
|
+
}, null, 8, ["icon"])) : A("", !0)]), u.value ? (z(), j("span", Ht, U(e.label), 1)) : A("", !0)], 44, Bt)]),
|
|
520
520
|
_: 1
|
|
521
|
-
}, 8, ["list"])], 44,
|
|
521
|
+
}, 8, ["list"])], 44, Ft));
|
|
522
522
|
}
|
|
523
|
-
}),
|
|
523
|
+
}), Wt = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, q = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
524
524
|
360 / (Math.PI * 2);
|
|
525
|
-
var
|
|
525
|
+
var Gt = (e) => $t(Kt(e)), Kt = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
526
526
|
r: parseInt(e[0] + e[0], 16),
|
|
527
527
|
g: parseInt(e[1] + e[1], 16),
|
|
528
528
|
b: parseInt(e[2] + e[2], 16),
|
|
529
|
-
a: e.length === 4 ?
|
|
529
|
+
a: e.length === 4 ? q(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
530
530
|
} : {
|
|
531
531
|
r: parseInt(e.substring(0, 2), 16),
|
|
532
532
|
g: parseInt(e.substring(2, 4), 16),
|
|
533
533
|
b: parseInt(e.substring(4, 6), 16),
|
|
534
|
-
a: e.length === 8 ?
|
|
535
|
-
}),
|
|
534
|
+
a: e.length === 8 ? q(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
535
|
+
}), qt = (e) => Qt(Xt(e)), Jt = ({ h: e, s: t, v: n, a: r }) => {
|
|
536
536
|
let i = (200 - t) * n / 100;
|
|
537
537
|
return {
|
|
538
|
-
h:
|
|
539
|
-
s:
|
|
540
|
-
l:
|
|
541
|
-
a:
|
|
538
|
+
h: q(e),
|
|
539
|
+
s: q(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
540
|
+
l: q(i / 2),
|
|
541
|
+
a: q(r, 2)
|
|
542
542
|
};
|
|
543
|
-
},
|
|
544
|
-
let { h: t, s: n, l: r } =
|
|
543
|
+
}, Yt = (e) => {
|
|
544
|
+
let { h: t, s: n, l: r } = Jt(e);
|
|
545
545
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
546
|
-
},
|
|
546
|
+
}, Xt = ({ h: e, s: t, v: n, a: r }) => {
|
|
547
547
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
548
548
|
let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
|
|
549
549
|
return {
|
|
550
|
-
r:
|
|
550
|
+
r: q([
|
|
551
551
|
n,
|
|
552
552
|
o,
|
|
553
553
|
a,
|
|
@@ -555,7 +555,7 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
555
555
|
s,
|
|
556
556
|
n
|
|
557
557
|
][c] * 255),
|
|
558
|
-
g:
|
|
558
|
+
g: q([
|
|
559
559
|
s,
|
|
560
560
|
n,
|
|
561
561
|
n,
|
|
@@ -563,7 +563,7 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
563
563
|
a,
|
|
564
564
|
a
|
|
565
565
|
][c] * 255),
|
|
566
|
-
b:
|
|
566
|
+
b: q([
|
|
567
567
|
a,
|
|
568
568
|
a,
|
|
569
569
|
s,
|
|
@@ -571,74 +571,74 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
571
571
|
n,
|
|
572
572
|
o
|
|
573
573
|
][c] * 255),
|
|
574
|
-
a:
|
|
574
|
+
a: q(r, 2)
|
|
575
575
|
};
|
|
576
|
-
},
|
|
576
|
+
}, Zt = (e) => {
|
|
577
577
|
let t = e.toString(16);
|
|
578
578
|
return t.length < 2 ? "0" + t : t;
|
|
579
|
-
},
|
|
580
|
-
let i = r < 1 ?
|
|
581
|
-
return "#" +
|
|
582
|
-
},
|
|
579
|
+
}, Qt = ({ r: e, g: t, b: n, a: r }) => {
|
|
580
|
+
let i = r < 1 ? Zt(q(r * 255)) : "";
|
|
581
|
+
return "#" + Zt(e) + Zt(t) + Zt(n) + i;
|
|
582
|
+
}, $t = ({ r: e, g: t, b: n, a: r }) => {
|
|
583
583
|
let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
|
|
584
584
|
return {
|
|
585
|
-
h:
|
|
586
|
-
s:
|
|
587
|
-
v:
|
|
585
|
+
h: q(60 * (o < 0 ? o + 6 : o)),
|
|
586
|
+
s: q(i ? a / i * 100 : 0),
|
|
587
|
+
v: q(i / 255 * 100),
|
|
588
588
|
a: r
|
|
589
589
|
};
|
|
590
|
-
},
|
|
590
|
+
}, en = (e, t) => {
|
|
591
591
|
if (e === t) return !0;
|
|
592
592
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
593
593
|
return !0;
|
|
594
|
-
},
|
|
595
|
-
let t =
|
|
596
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
597
|
-
},
|
|
594
|
+
}, tn = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : en(Kt(e), Kt(t)), nn = {}, rn = (e) => {
|
|
595
|
+
let t = nn[e];
|
|
596
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, nn[e] = t), t;
|
|
597
|
+
}, an = (e, t, n) => {
|
|
598
598
|
e.dispatchEvent(new CustomEvent(t, {
|
|
599
599
|
bubbles: !0,
|
|
600
600
|
detail: n
|
|
601
601
|
}));
|
|
602
|
-
},
|
|
603
|
-
let n =
|
|
604
|
-
|
|
605
|
-
x:
|
|
606
|
-
y:
|
|
602
|
+
}, on = !1, sn = (e) => "touches" in e, cn = (e) => on && !sn(e) ? !1 : (on ||= sn(e), !0), ln = (e, t) => {
|
|
603
|
+
let n = sn(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
604
|
+
an(e.el, "move", e.getMove({
|
|
605
|
+
x: Wt((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
606
|
+
y: Wt((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
607
607
|
}));
|
|
608
|
-
},
|
|
608
|
+
}, un = (e, t) => {
|
|
609
609
|
let n = t.keyCode;
|
|
610
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
610
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), an(e.el, "move", e.getMove({
|
|
611
611
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
612
612
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
613
613
|
}, !0)));
|
|
614
|
-
},
|
|
614
|
+
}, dn = class {
|
|
615
615
|
constructor(e, t, n, r) {
|
|
616
|
-
let i =
|
|
616
|
+
let i = rn(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
617
617
|
e.appendChild(i.content.cloneNode(!0));
|
|
618
618
|
let a = e.querySelector(`[part=${t}]`);
|
|
619
619
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
620
620
|
}
|
|
621
621
|
set dragging(e) {
|
|
622
622
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
623
|
-
t(
|
|
623
|
+
t(on ? "touchmove" : "mousemove", this), t(on ? "touchend" : "mouseup", this);
|
|
624
624
|
}
|
|
625
625
|
handleEvent(e) {
|
|
626
626
|
switch (e.type) {
|
|
627
627
|
case "mousedown":
|
|
628
628
|
case "touchstart":
|
|
629
|
-
if (e.preventDefault(), !
|
|
630
|
-
this.el.focus(),
|
|
629
|
+
if (e.preventDefault(), !cn(e) || !on && e.button != 0) return;
|
|
630
|
+
this.el.focus(), ln(this, e), this.dragging = !0;
|
|
631
631
|
break;
|
|
632
632
|
case "mousemove":
|
|
633
633
|
case "touchmove":
|
|
634
|
-
e.preventDefault(),
|
|
634
|
+
e.preventDefault(), ln(this, e);
|
|
635
635
|
break;
|
|
636
636
|
case "mouseup":
|
|
637
637
|
case "touchend":
|
|
638
638
|
this.dragging = !1;
|
|
639
639
|
break;
|
|
640
640
|
case "keydown":
|
|
641
|
-
|
|
641
|
+
un(this, e);
|
|
642
642
|
break;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
@@ -647,25 +647,25 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
647
647
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, fn = class extends dn {
|
|
651
651
|
constructor(e) {
|
|
652
652
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
653
653
|
}
|
|
654
654
|
update({ h: e }) {
|
|
655
655
|
this.h = e, this.style([{
|
|
656
656
|
left: `${e / 360 * 100}%`,
|
|
657
|
-
color:
|
|
657
|
+
color: Yt({
|
|
658
658
|
h: e,
|
|
659
659
|
s: 100,
|
|
660
660
|
v: 100,
|
|
661
661
|
a: 1
|
|
662
662
|
})
|
|
663
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
663
|
+
}]), this.el.setAttribute("aria-valuenow", `${q(e)}`);
|
|
664
664
|
}
|
|
665
665
|
getMove(e, t) {
|
|
666
|
-
return { h: t ?
|
|
666
|
+
return { h: t ? Wt(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
667
667
|
}
|
|
668
|
-
},
|
|
668
|
+
}, pn = class extends dn {
|
|
669
669
|
constructor(e) {
|
|
670
670
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
671
671
|
}
|
|
@@ -673,47 +673,47 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
673
673
|
this.hsva = e, this.style([{
|
|
674
674
|
top: `${100 - e.v}%`,
|
|
675
675
|
left: `${e.s}%`,
|
|
676
|
-
color:
|
|
677
|
-
}, { "background-color":
|
|
676
|
+
color: Yt(e)
|
|
677
|
+
}, { "background-color": Yt({
|
|
678
678
|
h: e.h,
|
|
679
679
|
s: 100,
|
|
680
680
|
v: 100,
|
|
681
681
|
a: 1
|
|
682
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
682
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${q(e.s)}%, Brightness ${q(e.v)}%`);
|
|
683
683
|
}
|
|
684
684
|
getMove(e, t) {
|
|
685
685
|
return {
|
|
686
|
-
s: t ?
|
|
687
|
-
v: t ?
|
|
686
|
+
s: t ? Wt(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
687
|
+
v: t ? Wt(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
},
|
|
690
|
+
}, mn = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", hn = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", gn = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", _n = Symbol("same"), vn = Symbol("color"), yn = Symbol("hsva"), bn = Symbol("update"), xn = Symbol("parts"), Sn = Symbol("css"), Cn = Symbol("sliders"), wn = class extends HTMLElement {
|
|
691
691
|
static get observedAttributes() {
|
|
692
692
|
return ["color"];
|
|
693
693
|
}
|
|
694
|
-
get [
|
|
694
|
+
get [Sn]() {
|
|
695
695
|
return [
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
696
|
+
mn,
|
|
697
|
+
hn,
|
|
698
|
+
gn
|
|
699
699
|
];
|
|
700
700
|
}
|
|
701
|
-
get [
|
|
702
|
-
return [
|
|
701
|
+
get [Cn]() {
|
|
702
|
+
return [pn, fn];
|
|
703
703
|
}
|
|
704
704
|
get color() {
|
|
705
|
-
return this[
|
|
705
|
+
return this[vn];
|
|
706
706
|
}
|
|
707
707
|
set color(e) {
|
|
708
|
-
if (!this[
|
|
708
|
+
if (!this[_n](e)) {
|
|
709
709
|
let t = this.colorModel.toHsva(e);
|
|
710
|
-
this[
|
|
710
|
+
this[bn](t), this[vn] = e;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
constructor() {
|
|
714
714
|
super();
|
|
715
|
-
let e =
|
|
716
|
-
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[
|
|
715
|
+
let e = rn(`<style>${this[Sn].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
716
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[xn] = this[Cn].map((e) => new e(t));
|
|
717
717
|
}
|
|
718
718
|
connectedCallback() {
|
|
719
719
|
if (this.hasOwnProperty("color")) {
|
|
@@ -723,52 +723,52 @@ var Ht = (e) => Xt(Ut(e)), Ut = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
723
723
|
}
|
|
724
724
|
attributeChangedCallback(e, t, n) {
|
|
725
725
|
let r = this.colorModel.fromAttr(n);
|
|
726
|
-
this[
|
|
726
|
+
this[_n](r) || (this.color = r);
|
|
727
727
|
}
|
|
728
728
|
handleEvent(e) {
|
|
729
|
-
let t = this[
|
|
729
|
+
let t = this[yn], n = {
|
|
730
730
|
...t,
|
|
731
731
|
...e.detail
|
|
732
732
|
};
|
|
733
|
-
this[
|
|
733
|
+
this[bn](n);
|
|
734
734
|
let r;
|
|
735
|
-
!
|
|
735
|
+
!en(n, t) && !this[_n](r = this.colorModel.fromHsva(n)) && (this[vn] = r, an(this, "color-changed", { value: r }));
|
|
736
736
|
}
|
|
737
|
-
[
|
|
737
|
+
[_n](e) {
|
|
738
738
|
return this.color && this.colorModel.equal(e, this.color);
|
|
739
739
|
}
|
|
740
|
-
[
|
|
741
|
-
this[
|
|
740
|
+
[bn](e) {
|
|
741
|
+
this[yn] = e, this[xn].forEach((t) => t.update(e));
|
|
742
742
|
}
|
|
743
|
-
},
|
|
743
|
+
}, Tn = {
|
|
744
744
|
defaultColor: "#000",
|
|
745
|
-
toHsva:
|
|
746
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
745
|
+
toHsva: Gt,
|
|
746
|
+
fromHsva: ({ h: e, s: t, v: n }) => qt({
|
|
747
747
|
h: e,
|
|
748
748
|
s: t,
|
|
749
749
|
v: n,
|
|
750
750
|
a: 1
|
|
751
751
|
}),
|
|
752
|
-
equal:
|
|
752
|
+
equal: tn,
|
|
753
753
|
fromAttr: (e) => e
|
|
754
|
-
},
|
|
754
|
+
}, En = class extends wn {
|
|
755
755
|
get colorModel() {
|
|
756
|
-
return
|
|
756
|
+
return Tn;
|
|
757
757
|
}
|
|
758
|
-
},
|
|
759
|
-
customElements.define("hex-color-picker",
|
|
758
|
+
}, Dn = class extends En {};
|
|
759
|
+
customElements.define("hex-color-picker", Dn);
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
762
|
-
var
|
|
762
|
+
var On = [
|
|
763
763
|
"disabled",
|
|
764
764
|
"aria-label",
|
|
765
765
|
"aria-expanded"
|
|
766
|
-
],
|
|
766
|
+
], kn = [
|
|
767
767
|
"value",
|
|
768
768
|
"placeholder",
|
|
769
769
|
"disabled",
|
|
770
770
|
"aria-label"
|
|
771
|
-
],
|
|
771
|
+
], An = ["color", "aria-label"], J = /* @__PURE__ */ F({
|
|
772
772
|
__name: "ColorPicker",
|
|
773
773
|
props: {
|
|
774
774
|
modelValue: {},
|
|
@@ -805,7 +805,7 @@ var Tn = [
|
|
|
805
805
|
ref: s,
|
|
806
806
|
type: "button",
|
|
807
807
|
disabled: e.disabled,
|
|
808
|
-
"aria-label":
|
|
808
|
+
"aria-label": W(i).colorPicker.pickColor,
|
|
809
809
|
"aria-expanded": a.value,
|
|
810
810
|
class: L([
|
|
811
811
|
"tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
@@ -817,18 +817,18 @@ var Tn = [
|
|
|
817
817
|
}, [M("span", {
|
|
818
818
|
class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
|
|
819
819
|
style: R({ backgroundColor: c.value })
|
|
820
|
-
}, null, 4)], 10,
|
|
820
|
+
}, null, 4)], 10, On),
|
|
821
821
|
e.swatchOnly ? A("", !0) : (z(), j("input", {
|
|
822
822
|
key: 0,
|
|
823
823
|
type: "text",
|
|
824
|
-
class: L(
|
|
824
|
+
class: L(W(Re)),
|
|
825
825
|
value: e.modelValue,
|
|
826
826
|
placeholder: e.placeholder,
|
|
827
827
|
disabled: e.disabled,
|
|
828
|
-
"aria-label":
|
|
828
|
+
"aria-label": W(i).colorPicker.hexValue,
|
|
829
829
|
onInput: u
|
|
830
|
-
}, null, 42,
|
|
831
|
-
P(
|
|
830
|
+
}, null, 42, kn)),
|
|
831
|
+
P(Ge, {
|
|
832
832
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
833
833
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
834
834
|
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
@@ -836,17 +836,17 @@ var Tn = [
|
|
|
836
836
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
837
837
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
838
838
|
}, {
|
|
839
|
-
default:
|
|
839
|
+
default: G(() => [a.value ? (z(), j("div", {
|
|
840
840
|
key: 0,
|
|
841
841
|
ref_key: "popoverRef",
|
|
842
842
|
ref: o,
|
|
843
843
|
class: "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg"
|
|
844
844
|
}, [M("hex-color-picker", {
|
|
845
845
|
color: c.value,
|
|
846
|
-
"aria-label":
|
|
846
|
+
"aria-label": W(i).colorPicker.pickColor,
|
|
847
847
|
onColorChanged: l,
|
|
848
|
-
onKeydown: n[1] ||=
|
|
849
|
-
}, null, 40,
|
|
848
|
+
onKeydown: n[1] ||= $e((e) => a.value = !1, ["escape"])
|
|
849
|
+
}, null, 40, An)], 512)) : A("", !0)]),
|
|
850
850
|
_: 1
|
|
851
851
|
})
|
|
852
852
|
], 2));
|
|
@@ -854,8 +854,8 @@ var Tn = [
|
|
|
854
854
|
});
|
|
855
855
|
//#endregion
|
|
856
856
|
//#region src/composables/useMergeTagField.ts
|
|
857
|
-
function
|
|
858
|
-
let { modelValue: t, emit: n, elementRef: r } = e, { isEnabled: i, isRequesting: a, isMergeTagValue: o, getMergeTagLabel: s, requestMergeTag: c, syntax: l } =
|
|
857
|
+
function jn(e) {
|
|
858
|
+
let { modelValue: t, emit: n, elementRef: r } = e, { isEnabled: i, isRequesting: a, isMergeTagValue: o, getMergeTagLabel: s, requestMergeTag: c, syntax: l } = Ue(), u = B(!1), d = !1, f = O(() => {
|
|
859
859
|
let e = t();
|
|
860
860
|
if (!e) return [];
|
|
861
861
|
let n = [], r = `(${l.value.source}|${l.logic.source})`, i = new RegExp(r, "g"), a = 0, c;
|
|
@@ -869,10 +869,10 @@ function On(e) {
|
|
|
869
869
|
type: "mergeTag",
|
|
870
870
|
value: t,
|
|
871
871
|
label: s(t)
|
|
872
|
-
}) :
|
|
872
|
+
}) : lt(t, l) ? n.push({
|
|
873
873
|
type: "logicMergeTag",
|
|
874
874
|
value: t,
|
|
875
|
-
keyword:
|
|
875
|
+
keyword: st(t, l)
|
|
876
876
|
}) : n.push({
|
|
877
877
|
type: "text",
|
|
878
878
|
value: t
|
|
@@ -884,7 +884,7 @@ function On(e) {
|
|
|
884
884
|
}), n;
|
|
885
885
|
}), p = O(() => f.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
886
886
|
function m() {
|
|
887
|
-
u.value = !0,
|
|
887
|
+
u.value = !0, Ke(() => {
|
|
888
888
|
r.value?.focus();
|
|
889
889
|
let e = t()?.length || 0;
|
|
890
890
|
r.value?.setSelectionRange(e, e);
|
|
@@ -896,16 +896,16 @@ function On(e) {
|
|
|
896
896
|
function g(e) {
|
|
897
897
|
n(e.target.value);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function ee() {
|
|
900
900
|
n("");
|
|
901
901
|
}
|
|
902
|
-
async function
|
|
902
|
+
async function te() {
|
|
903
903
|
let e = u.value && r.value ? r.value.selectionStart ?? t().length : t().length;
|
|
904
904
|
d = !0;
|
|
905
905
|
let i = await c();
|
|
906
906
|
if (d = !1, i) {
|
|
907
907
|
let a = t().slice(0, e), o = t().slice(e);
|
|
908
|
-
n(a + i.value + o), u.value = !0,
|
|
908
|
+
n(a + i.value + o), u.value = !0, Ke(() => {
|
|
909
909
|
let t = e + i.value.length;
|
|
910
910
|
r.value?.focus(), r.value?.setSelectionRange(t, t);
|
|
911
911
|
});
|
|
@@ -920,109 +920,133 @@ function On(e) {
|
|
|
920
920
|
startEditing: m,
|
|
921
921
|
stopEditing: h,
|
|
922
922
|
handleInput: g,
|
|
923
|
-
clearValue:
|
|
924
|
-
insertMergeTag:
|
|
923
|
+
clearValue: ee,
|
|
924
|
+
insertMergeTag: te
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
927
|
//#endregion
|
|
928
|
-
//#region src/components/
|
|
929
|
-
var
|
|
928
|
+
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
929
|
+
var Mn = ["aria-label", "onKeydown"], Nn = ["data-tooltip"], Pn = ["data-tooltip"], Fn = {
|
|
930
930
|
key: 2,
|
|
931
931
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
932
|
-
},
|
|
933
|
-
"
|
|
934
|
-
"title",
|
|
935
|
-
"disabled"
|
|
936
|
-
], In = { key: 1 }, Ln = [
|
|
937
|
-
"value",
|
|
938
|
-
"placeholder",
|
|
939
|
-
"rows"
|
|
940
|
-
], Rn = [
|
|
941
|
-
"aria-label",
|
|
942
|
-
"title",
|
|
943
|
-
"disabled"
|
|
944
|
-
], zn = "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)]", Bn = "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)]", Vn = "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)]", Hn = /* @__PURE__ */ F({
|
|
945
|
-
__name: "MergeTagTextarea",
|
|
932
|
+
}, In = ["aria-label", "title"], Ln = /* @__PURE__ */ F({
|
|
933
|
+
__name: "MergeTagSegments",
|
|
946
934
|
props: {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
935
|
+
segments: {},
|
|
936
|
+
displayClass: {},
|
|
937
|
+
pulse: { type: Boolean }
|
|
950
938
|
},
|
|
951
|
-
emits: ["
|
|
939
|
+
emits: ["edit", "clear"],
|
|
952
940
|
setup(e, { emit: t }) {
|
|
953
|
-
let n =
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
return (t, n) => U(s) && !U(u) ? (z(), j("div", kn, [M("div", {
|
|
941
|
+
let n = t, { t: r } = y();
|
|
942
|
+
function i() {
|
|
943
|
+
n("edit");
|
|
944
|
+
}
|
|
945
|
+
return (t, a) => (z(), j("div", {
|
|
959
946
|
role: "button",
|
|
960
947
|
tabindex: "0",
|
|
961
|
-
"aria-label":
|
|
962
|
-
class: L(
|
|
963
|
-
onClick:
|
|
964
|
-
onKeydown: [
|
|
965
|
-
}, [(z(!0), j(D, null, V(
|
|
948
|
+
"aria-label": W(r).mergeTag.clickToEdit,
|
|
949
|
+
class: L([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
950
|
+
onClick: i,
|
|
951
|
+
onKeydown: [$e(i, ["enter"]), $e(et(i, ["prevent"]), ["space"])]
|
|
952
|
+
}, [(z(!0), j(D, null, V(e.segments, (e, t) => (z(), j(D, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (z(), j("span", {
|
|
966
953
|
key: 0,
|
|
967
954
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium",
|
|
968
955
|
"data-tooltip": e.value,
|
|
969
956
|
style: {
|
|
970
|
-
"background-color": "color-mix(\n
|
|
957
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
971
958
|
color: "var(--tpl-primary)"
|
|
972
959
|
}
|
|
973
|
-
},
|
|
960
|
+
}, U(e.label), 9, Nn)) : e.type === "logicMergeTag" ? (z(), j("span", {
|
|
974
961
|
key: 1,
|
|
975
962
|
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",
|
|
976
963
|
"data-tooltip": e.value,
|
|
977
964
|
style: {
|
|
978
965
|
"background-color": "transparent",
|
|
979
|
-
border: "1.5px solid\n
|
|
966
|
+
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
980
967
|
color: "var(--tpl-primary)"
|
|
981
968
|
}
|
|
982
|
-
},
|
|
969
|
+
}, U(e.keyword), 9, Pn)) : (z(), j("span", Fn, U(e.value), 1))], 64))), 128)), M("button", {
|
|
983
970
|
type: "button",
|
|
984
971
|
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",
|
|
985
|
-
"aria-label":
|
|
986
|
-
title:
|
|
987
|
-
onClick:
|
|
988
|
-
}, [P(
|
|
972
|
+
"aria-label": W(r).mergeTag.remove,
|
|
973
|
+
title: W(r).mergeTag.remove,
|
|
974
|
+
onClick: a[0] ||= et((e) => n("clear"), ["stop"])
|
|
975
|
+
}, [P(W(He), {
|
|
989
976
|
size: 12,
|
|
990
977
|
"stroke-width": 2.5
|
|
991
|
-
})], 8,
|
|
992
|
-
|
|
978
|
+
})], 8, In)], 42, Mn));
|
|
979
|
+
}
|
|
980
|
+
}), Rn = [
|
|
981
|
+
"aria-label",
|
|
982
|
+
"title",
|
|
983
|
+
"disabled"
|
|
984
|
+
], zn = "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)]", Bn = /* @__PURE__ */ F({
|
|
985
|
+
__name: "MergeTagInsertButton",
|
|
986
|
+
props: { disabled: { type: Boolean } },
|
|
987
|
+
emits: ["insert"],
|
|
988
|
+
setup(e) {
|
|
989
|
+
let { t } = y();
|
|
990
|
+
return (n, r) => (z(), j("button", {
|
|
993
991
|
type: "button",
|
|
994
|
-
class: L([
|
|
995
|
-
"aria-label":
|
|
996
|
-
title:
|
|
997
|
-
disabled:
|
|
998
|
-
onClick:
|
|
999
|
-
}, [P(
|
|
992
|
+
class: L([zn, "tpl:mt-1.5"]),
|
|
993
|
+
"aria-label": W(t).mergeTag.insert,
|
|
994
|
+
title: W(t).mergeTag.insert,
|
|
995
|
+
disabled: e.disabled,
|
|
996
|
+
onClick: r[0] ||= (e) => n.$emit("insert")
|
|
997
|
+
}, [P(W(ke), {
|
|
1000
998
|
size: 12,
|
|
1001
999
|
"stroke-width": 2
|
|
1002
|
-
}), N(" " +
|
|
1000
|
+
}), N(" " + U(W(t).mergeTag.insert), 1)], 10, Rn));
|
|
1001
|
+
}
|
|
1002
|
+
}), Vn = { key: 0 }, Hn = { key: 1 }, Un = [
|
|
1003
|
+
"value",
|
|
1004
|
+
"placeholder",
|
|
1005
|
+
"rows"
|
|
1006
|
+
], Wn = "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)]", Gn = "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)]", Kn = /* @__PURE__ */ F({
|
|
1007
|
+
__name: "MergeTagTextarea",
|
|
1008
|
+
props: {
|
|
1009
|
+
modelValue: {},
|
|
1010
|
+
placeholder: { default: "" },
|
|
1011
|
+
rows: { default: 3 }
|
|
1012
|
+
},
|
|
1013
|
+
emits: ["update:modelValue"],
|
|
1014
|
+
setup(e, { emit: t }) {
|
|
1015
|
+
let n = e, r = t, i = B(null), { segments: a, hasMergeTags: o, mergeTagEnabled: s, isRequestingMergeTag: c, isEditing: l, startEditing: u, stopEditing: d, handleInput: f, clearValue: p, insertMergeTag: m } = jn({
|
|
1016
|
+
modelValue: () => n.modelValue,
|
|
1017
|
+
emit: (e) => r("update:modelValue", e),
|
|
1018
|
+
elementRef: i
|
|
1019
|
+
});
|
|
1020
|
+
return (t, n) => W(o) && !W(l) ? (z(), j("div", Vn, [P(Ln, {
|
|
1021
|
+
segments: W(a),
|
|
1022
|
+
"display-class": Gn,
|
|
1023
|
+
onEdit: W(u),
|
|
1024
|
+
onClear: W(p)
|
|
1025
|
+
}, null, 8, [
|
|
1026
|
+
"segments",
|
|
1027
|
+
"onEdit",
|
|
1028
|
+
"onClear"
|
|
1029
|
+
]), W(s) ? (z(), k(Bn, {
|
|
1030
|
+
key: 0,
|
|
1031
|
+
disabled: W(c),
|
|
1032
|
+
onInsert: W(m)
|
|
1033
|
+
}, null, 8, ["disabled", "onInsert"])) : A("", !0)])) : (z(), j("div", Hn, [M("textarea", {
|
|
1003
1034
|
ref_key: "textareaRef",
|
|
1004
|
-
ref:
|
|
1005
|
-
class: L(
|
|
1035
|
+
ref: i,
|
|
1036
|
+
class: L(Wn),
|
|
1006
1037
|
value: e.modelValue,
|
|
1007
1038
|
placeholder: e.placeholder,
|
|
1008
1039
|
rows: e.rows,
|
|
1009
|
-
onInput: n[
|
|
1010
|
-
onBlur: n[
|
|
1011
|
-
onKeydown: n[
|
|
1012
|
-
}, null, 40,
|
|
1040
|
+
onInput: n[0] ||= (...e) => W(f) && W(f)(...e),
|
|
1041
|
+
onBlur: n[1] ||= (...e) => W(d) && W(d)(...e),
|
|
1042
|
+
onKeydown: n[2] ||= $e((...e) => W(d) && W(d)(...e), ["escape"])
|
|
1043
|
+
}, null, 40, Un), W(s) ? (z(), k(Bn, {
|
|
1013
1044
|
key: 0,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
title: U(i).mergeTag.insert,
|
|
1018
|
-
disabled: U(l),
|
|
1019
|
-
onClick: n[8] ||= (...e) => U(h) && U(h)(...e)
|
|
1020
|
-
}, [P(U(ke), {
|
|
1021
|
-
size: 12,
|
|
1022
|
-
"stroke-width": 2
|
|
1023
|
-
}), N(" " + H(U(i).mergeTag.insert), 1)], 8, Rn)) : A("", !0)]));
|
|
1045
|
+
disabled: W(c),
|
|
1046
|
+
onInsert: W(m)
|
|
1047
|
+
}, null, 8, ["disabled", "onInsert"])) : A("", !0)]));
|
|
1024
1048
|
}
|
|
1025
|
-
}),
|
|
1049
|
+
}), qn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, Jn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, Yn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xn = { class: "tpl:mb-3.5" }, Zn = { 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)]" }, Qn = ["onClick"], $n = { class: "tpl:flex tpl:items-stretch" }, er = ["value"], tr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, nr = { class: "tpl:mb-3.5" }, rr = ["value"], ir = ["value"], ar = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, or = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, sr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, cr = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, lr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, ur = { 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)]" }, dr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, fr = { class: "tpl:mb-1 tpl:last:mb-0" }, pr = { class: "tpl:mb-1 tpl:last:mb-0" }, mr = { class: "tpl:mb-1 tpl:last:mb-0" }, hr = 150, gr = /* @__PURE__ */ F({
|
|
1026
1050
|
__name: "TemplateSettings",
|
|
1027
1051
|
props: { settings: {} },
|
|
1028
1052
|
emits: ["update"],
|
|
@@ -1045,14 +1069,14 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1045
1069
|
label: "800px"
|
|
1046
1070
|
}
|
|
1047
1071
|
];
|
|
1048
|
-
return (t, n) => (z(), j("aside",
|
|
1049
|
-
M("div", { class: L(
|
|
1050
|
-
M("div",
|
|
1072
|
+
return (t, n) => (z(), j("aside", qn, [M("div", Jn, [
|
|
1073
|
+
M("div", { class: L(W(Ie)) }, [
|
|
1074
|
+
M("div", Yn, [P(W(xt), {
|
|
1051
1075
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1052
1076
|
size: 14,
|
|
1053
1077
|
"stroke-width": 2
|
|
1054
|
-
}), M("span", null,
|
|
1055
|
-
M("div",
|
|
1078
|
+
}), M("span", null, U(W(i).templateSettings.layout), 1)]),
|
|
1079
|
+
M("div", Xn, [M("label", { class: L(W(w)) }, U(W(i).templateSettings.widthPreset), 3), M("div", Zn, [(z(), j(D, null, V(c, (t) => M("button", {
|
|
1056
1080
|
key: t.value,
|
|
1057
1081
|
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)]",
|
|
1058
1082
|
style: R({
|
|
@@ -1061,72 +1085,61 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1061
1085
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
1062
1086
|
}),
|
|
1063
1087
|
onClick: (e) => r("update", { width: t.value })
|
|
1064
|
-
},
|
|
1065
|
-
M("div", null, [M("label", { class: L(
|
|
1088
|
+
}, U(t.label), 13, Qn)), 64))])]),
|
|
1089
|
+
M("div", null, [M("label", { class: L(W(w)) }, U(W(i).templateSettings.customWidth), 3), M("div", $n, [M("input", {
|
|
1066
1090
|
type: "number",
|
|
1067
|
-
class: L(
|
|
1091
|
+
class: L(W(E)),
|
|
1068
1092
|
value: e.settings.width,
|
|
1069
1093
|
min: "300",
|
|
1070
1094
|
max: "900",
|
|
1071
1095
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
1072
|
-
}, null, 42,
|
|
1096
|
+
}, null, 42, er), M("span", { class: L(W(T)) }, "px", 2)])])
|
|
1073
1097
|
], 2),
|
|
1074
|
-
M("div", { class: L(
|
|
1075
|
-
M("div",
|
|
1098
|
+
M("div", { class: L(W(Ie)) }, [
|
|
1099
|
+
M("div", tr, [P(W(ut), {
|
|
1076
1100
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1077
1101
|
size: 14,
|
|
1078
1102
|
"stroke-width": 2
|
|
1079
|
-
}), M("span", null,
|
|
1080
|
-
M("div",
|
|
1103
|
+
}), M("span", null, U(W(i).templateSettings.appearance), 1)]),
|
|
1104
|
+
M("div", nr, [M("label", { class: L(W(w)) }, U(W(i).templateSettings.backgroundColor), 3), P(J, {
|
|
1081
1105
|
"model-value": e.settings.backgroundColor,
|
|
1082
|
-
placeholder:
|
|
1106
|
+
placeholder: W(Le),
|
|
1083
1107
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
1084
1108
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
1085
|
-
M("div", null, [M("label", { class: L(
|
|
1086
|
-
class: L(
|
|
1109
|
+
M("div", null, [M("label", { class: L(W(w)) }, U(W(i).templateSettings.fontFamily), 3), M("select", {
|
|
1110
|
+
class: L(W(C)),
|
|
1087
1111
|
value: s.value,
|
|
1088
1112
|
onChange: n[2] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
1089
1113
|
}, [(z(!0), j(D, null, V(o.value, (e) => (z(), j("option", {
|
|
1090
1114
|
key: e.value,
|
|
1091
1115
|
value: e.value
|
|
1092
|
-
},
|
|
1116
|
+
}, U(e.label), 9, ir))), 128))], 42, rr)])
|
|
1093
1117
|
], 2),
|
|
1094
|
-
M("div", { class: L(
|
|
1118
|
+
M("div", { class: L(W(Ie)) }, [M("div", ar, [P(W(Ee), {
|
|
1095
1119
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1096
1120
|
size: 14,
|
|
1097
1121
|
"stroke-width": 2
|
|
1098
|
-
}), M("span", null,
|
|
1122
|
+
}), M("span", null, U(W(i).templateSettings.preheaderText), 1)]), M("div", null, [P(Kn, {
|
|
1099
1123
|
"model-value": e.settings.preheaderText ?? "",
|
|
1100
|
-
placeholder:
|
|
1124
|
+
placeholder: W(i).templateSettings.preheaderTextPlaceholder,
|
|
1101
1125
|
rows: 2,
|
|
1102
1126
|
"onUpdate:modelValue": n[3] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
1103
|
-
}, null, 8, ["model-value", "placeholder"]), M("div",
|
|
1104
|
-
M("div",
|
|
1127
|
+
}, null, 8, ["model-value", "placeholder"]), M("div", or, [M("span", sr, U(W(i).templateSettings.preheaderTextHint), 1), M("span", cr, U((e.settings.preheaderText ?? "").length) + "/" + U(hr), 1)])])], 2),
|
|
1128
|
+
M("div", lr, [M("div", ur, [P(W(Te), {
|
|
1105
1129
|
size: 14,
|
|
1106
1130
|
"stroke-width": 2
|
|
1107
|
-
}), M("span", null,
|
|
1108
|
-
M("li",
|
|
1109
|
-
M("li",
|
|
1110
|
-
M("li",
|
|
1131
|
+
}), M("span", null, U(W(i).templateSettings.tips), 1)]), M("ul", dr, [
|
|
1132
|
+
M("li", fr, U(W(i).templateSettings.tip1), 1),
|
|
1133
|
+
M("li", pr, U(W(i).templateSettings.tip2), 1),
|
|
1134
|
+
M("li", mr, U(W(i).templateSettings.tip3), 1)
|
|
1111
1135
|
])])
|
|
1112
1136
|
])]));
|
|
1113
1137
|
}
|
|
1114
|
-
}),
|
|
1115
|
-
key: 2,
|
|
1116
|
-
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
1117
|
-
}, vr = ["aria-label", "title"], yr = [
|
|
1118
|
-
"aria-label",
|
|
1119
|
-
"title",
|
|
1120
|
-
"disabled"
|
|
1121
|
-
], br = { key: 1 }, xr = [
|
|
1138
|
+
}), _r = { key: 0 }, vr = { key: 1 }, yr = [
|
|
1122
1139
|
"type",
|
|
1123
1140
|
"value",
|
|
1124
1141
|
"placeholder"
|
|
1125
|
-
],
|
|
1126
|
-
"aria-label",
|
|
1127
|
-
"title",
|
|
1128
|
-
"disabled"
|
|
1129
|
-
], Cr = "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)]", wr = "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)]", X = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
1142
|
+
], br = "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)]", Y = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
1130
1143
|
__name: "MergeTagInput",
|
|
1131
1144
|
props: {
|
|
1132
1145
|
modelValue: {},
|
|
@@ -1139,82 +1152,46 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1139
1152
|
},
|
|
1140
1153
|
emits: ["update:modelValue"],
|
|
1141
1154
|
setup(e, { emit: t }) {
|
|
1142
|
-
let n = e, r = t,
|
|
1155
|
+
let n = e, r = t, i = B(null), { segments: a, hasMergeTags: o, mergeTagEnabled: s, isRequestingMergeTag: c, isEditing: l, startEditing: u, stopEditing: d, handleInput: f, clearValue: p, insertMergeTag: m } = jn({
|
|
1143
1156
|
modelValue: () => n.modelValue,
|
|
1144
1157
|
emit: (e) => r("update:modelValue", e),
|
|
1145
|
-
elementRef:
|
|
1158
|
+
elementRef: i
|
|
1146
1159
|
});
|
|
1147
|
-
return (t, n) =>
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1160
|
+
return (t, n) => W(o) && !W(l) ? (z(), j("div", _r, [P(Ln, {
|
|
1161
|
+
segments: W(a),
|
|
1162
|
+
"display-class": br,
|
|
1163
|
+
pulse: e.pulse,
|
|
1164
|
+
onEdit: W(u),
|
|
1165
|
+
onClear: W(p)
|
|
1166
|
+
}, null, 8, [
|
|
1167
|
+
"segments",
|
|
1168
|
+
"pulse",
|
|
1169
|
+
"onEdit",
|
|
1170
|
+
"onClear"
|
|
1171
|
+
]), W(s) ? (z(), k(Bn, {
|
|
1155
1172
|
key: 0,
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
1160
|
-
color: "var(--tpl-primary)"
|
|
1161
|
-
}
|
|
1162
|
-
}, H(e.label), 9, hr)) : e.type === "logicMergeTag" ? (z(), j("span", {
|
|
1163
|
-
key: 1,
|
|
1164
|
-
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",
|
|
1165
|
-
"data-tooltip": e.value,
|
|
1166
|
-
style: {
|
|
1167
|
-
"background-color": "transparent",
|
|
1168
|
-
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
1169
|
-
color: "var(--tpl-primary)"
|
|
1170
|
-
}
|
|
1171
|
-
}, H(e.keyword), 9, gr)) : (z(), j("span", _r, H(e.value), 1))], 64))), 128)), M("button", {
|
|
1172
|
-
type: "button",
|
|
1173
|
-
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",
|
|
1174
|
-
"aria-label": U(i).mergeTag.remove,
|
|
1175
|
-
title: U(i).mergeTag.remove,
|
|
1176
|
-
onClick: n[0] ||= Ze((...e) => U(m) && U(m)(...e), ["stop"])
|
|
1177
|
-
}, [P(U(ze), {
|
|
1178
|
-
size: 12,
|
|
1179
|
-
"stroke-width": 2.5
|
|
1180
|
-
})], 8, vr)], 42, mr), U(c) ? (z(), j("button", {
|
|
1181
|
-
key: 0,
|
|
1182
|
-
type: "button",
|
|
1183
|
-
class: L([wr, "tpl:mt-1.5"]),
|
|
1184
|
-
"aria-label": U(i).mergeTag.insert,
|
|
1185
|
-
title: U(i).mergeTag.insert,
|
|
1186
|
-
disabled: U(l),
|
|
1187
|
-
onClick: n[4] ||= (...e) => U(h) && U(h)(...e)
|
|
1188
|
-
}, [P(U(ke), {
|
|
1189
|
-
size: 12,
|
|
1190
|
-
"stroke-width": 2
|
|
1191
|
-
}), N(" " + H(U(i).mergeTag.insert), 1)], 8, yr)) : A("", !0)])) : (z(), j("div", br, [M("input", {
|
|
1173
|
+
disabled: W(c),
|
|
1174
|
+
onInsert: W(m)
|
|
1175
|
+
}, null, 8, ["disabled", "onInsert"])) : A("", !0)])) : (z(), j("div", vr, [M("input", {
|
|
1192
1176
|
ref_key: "inputRef",
|
|
1193
|
-
ref:
|
|
1177
|
+
ref: i,
|
|
1194
1178
|
type: e.type,
|
|
1195
|
-
class: L([
|
|
1179
|
+
class: L([W(C), { "tpl-pulse-fill": e.pulse }]),
|
|
1196
1180
|
value: e.modelValue,
|
|
1197
1181
|
placeholder: e.placeholder,
|
|
1198
|
-
onInput: n[
|
|
1199
|
-
onBlur: n[
|
|
1200
|
-
onKeydown: n[
|
|
1201
|
-
}, null, 42,
|
|
1182
|
+
onInput: n[0] ||= (...e) => W(f) && W(f)(...e),
|
|
1183
|
+
onBlur: n[1] ||= (...e) => W(d) && W(d)(...e),
|
|
1184
|
+
onKeydown: n[2] ||= $e((...e) => W(d) && W(d)(...e), ["escape"])
|
|
1185
|
+
}, null, 42, yr), W(s) ? (z(), k(Bn, {
|
|
1202
1186
|
key: 0,
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
title: U(i).mergeTag.insert,
|
|
1207
|
-
disabled: U(l),
|
|
1208
|
-
onClick: n[8] ||= (...e) => U(h) && U(h)(...e)
|
|
1209
|
-
}, [P(U(ke), {
|
|
1210
|
-
size: 12,
|
|
1211
|
-
"stroke-width": 2
|
|
1212
|
-
}), N(" " + H(U(i).mergeTag.insert), 1)], 8, Sr)) : A("", !0)]));
|
|
1187
|
+
disabled: W(c),
|
|
1188
|
+
onInsert: W(m)
|
|
1189
|
+
}, null, 8, ["disabled", "onInsert"])) : A("", !0)]));
|
|
1213
1190
|
}
|
|
1214
|
-
}), [["__scopeId", "data-v-
|
|
1191
|
+
}), [["__scopeId", "data-v-b982cc87"]]), xr = { class: "tpl:mb-3.5" }, Sr = ["value"], Cr = { value: "" }, wr = ["value"], Tr = { class: "tpl:mb-3.5" }, Er = { class: "tpl:mb-3.5" }, Dr = {
|
|
1215
1192
|
key: 0,
|
|
1216
1193
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1217
|
-
},
|
|
1194
|
+
}, Or = ["checked"], kr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Ar = { class: "tpl:mb-3.5" }, jr = { class: "tpl:mb-3.5" }, Mr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Nr = { class: "tpl:mb-3.5" }, Pr = { class: "tpl:flex tpl:items-stretch" }, Fr = ["value"], Ir = { class: "tpl:mb-3.5" }, Lr = { class: "tpl:flex tpl:items-stretch" }, Rr = ["value"], zr = /* @__PURE__ */ F({
|
|
1218
1195
|
__name: "ButtonToolbar",
|
|
1219
1196
|
props: {
|
|
1220
1197
|
block: {},
|
|
@@ -1227,59 +1204,59 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1227
1204
|
n("update", { [e]: t });
|
|
1228
1205
|
}
|
|
1229
1206
|
return (t, n) => (z(), j(D, null, [
|
|
1230
|
-
M("div",
|
|
1231
|
-
class: L(
|
|
1207
|
+
M("div", xr, [M("label", { class: L(W(w)) }, U(W(r).button.fontFamily), 3), M("select", {
|
|
1208
|
+
class: L(W(C)),
|
|
1232
1209
|
value: e.block.fontFamily || "",
|
|
1233
1210
|
onChange: n[0] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
1234
|
-
}, [M("option",
|
|
1211
|
+
}, [M("option", Cr, U(W(r).button.inheritFont), 1), (z(!0), j(D, null, V(e.fontFamilies, (e) => (z(), j("option", {
|
|
1235
1212
|
key: e.value,
|
|
1236
1213
|
value: e.value
|
|
1237
|
-
},
|
|
1238
|
-
M("div",
|
|
1214
|
+
}, U(e.label), 9, wr))), 128))], 42, Sr)]),
|
|
1215
|
+
M("div", Tr, [M("label", { class: L(W(w)) }, U(W(r).button.text), 3), P(Y, {
|
|
1239
1216
|
"model-value": e.block.text,
|
|
1240
1217
|
type: "text",
|
|
1241
1218
|
"onUpdate:modelValue": n[1] ||= (e) => i("text", e)
|
|
1242
1219
|
}, null, 8, ["model-value"])]),
|
|
1243
|
-
M("div",
|
|
1244
|
-
M("label", { class: L(
|
|
1245
|
-
P(
|
|
1220
|
+
M("div", Er, [
|
|
1221
|
+
M("label", { class: L(W(w)) }, U(W(r).button.url), 3),
|
|
1222
|
+
P(Y, {
|
|
1246
1223
|
"model-value": e.block.url,
|
|
1247
1224
|
type: "url",
|
|
1248
|
-
placeholder:
|
|
1225
|
+
placeholder: W(r).button.urlPlaceholder,
|
|
1249
1226
|
"onUpdate:modelValue": n[2] ||= (e) => i("url", e)
|
|
1250
1227
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1251
|
-
e.block.url ? (z(), j("label",
|
|
1228
|
+
e.block.url ? (z(), j("label", Dr, [M("input", {
|
|
1252
1229
|
type: "checkbox",
|
|
1253
1230
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1254
1231
|
checked: e.block.openInNewTab ?? !1,
|
|
1255
1232
|
onChange: n[3] ||= (e) => i("openInNewTab", e.target.checked)
|
|
1256
|
-
}, null, 40,
|
|
1233
|
+
}, null, 40, Or), N(" " + U(W(r).button.openInNewTab), 1)])) : A("", !0)
|
|
1257
1234
|
]),
|
|
1258
|
-
M("div",
|
|
1235
|
+
M("div", kr, [M("div", Ar, [M("label", { class: L(W(w)) }, U(W(r).button.background), 3), P(J, {
|
|
1259
1236
|
"model-value": e.block.backgroundColor,
|
|
1260
1237
|
"onUpdate:modelValue": n[4] ||= (e) => i("backgroundColor", e)
|
|
1261
|
-
}, null, 8, ["model-value"])]), M("div",
|
|
1238
|
+
}, null, 8, ["model-value"])]), M("div", jr, [M("label", { class: L(W(w)) }, U(W(r).button.textColor), 3), P(J, {
|
|
1262
1239
|
"model-value": e.block.textColor,
|
|
1263
1240
|
"onUpdate:modelValue": n[5] ||= (e) => i("textColor", e)
|
|
1264
1241
|
}, null, 8, ["model-value"])])]),
|
|
1265
|
-
M("div",
|
|
1242
|
+
M("div", Mr, [M("div", Nr, [M("label", { class: L(W(w)) }, U(W(r).button.borderRadius), 3), M("div", Pr, [M("input", {
|
|
1266
1243
|
type: "number",
|
|
1267
|
-
class: L(
|
|
1244
|
+
class: L(W(E)),
|
|
1268
1245
|
value: e.block.borderRadius,
|
|
1269
1246
|
min: "0",
|
|
1270
1247
|
max: "50",
|
|
1271
1248
|
onInput: n[6] ||= (e) => i("borderRadius", Number(e.target.value))
|
|
1272
|
-
}, null, 42,
|
|
1249
|
+
}, null, 42, Fr), M("span", { class: L(W(T)) }, "px", 2)])]), M("div", Ir, [M("label", { class: L(W(w)) }, U(W(r).button.fontSize), 3), M("div", Lr, [M("input", {
|
|
1273
1250
|
type: "number",
|
|
1274
|
-
class: L(
|
|
1251
|
+
class: L(W(E)),
|
|
1275
1252
|
value: e.block.fontSize,
|
|
1276
1253
|
min: "10",
|
|
1277
1254
|
max: "36",
|
|
1278
1255
|
onInput: n[7] ||= (e) => i("fontSize", Number(e.target.value))
|
|
1279
|
-
}, null, 42,
|
|
1256
|
+
}, null, 42, Rr), M("span", { class: L(W(T)) }, "px", 2)])])])
|
|
1280
1257
|
], 64));
|
|
1281
1258
|
}
|
|
1282
|
-
}),
|
|
1259
|
+
}), Br = { class: "spacing-control" }, Vr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Hr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Ur = { class: "tpl:flex tpl:items-center" }, Wr = ["aria-label"], Gr = ["value", "aria-label"], Kr = ["aria-label"], qr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Jr = { class: "tpl:flex tpl:items-center" }, Yr = ["aria-label"], Xr = ["value", "aria-label"], Zr = ["aria-label"], Qr = ["aria-label", "title"], $r = { class: "tpl:flex tpl:items-center" }, ei = ["aria-label"], ti = ["value", "aria-label"], ni = ["aria-label"], ri = { class: "tpl:flex tpl:items-center" }, ii = ["aria-label"], ai = ["value", "aria-label"], oi = ["aria-label"], X = "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)]", si = "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)]", ci = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
1283
1260
|
__name: "SpacingControl",
|
|
1284
1261
|
props: {
|
|
1285
1262
|
modelValue: {},
|
|
@@ -1288,7 +1265,7 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1288
1265
|
emits: ["update:modelValue"],
|
|
1289
1266
|
setup(e, { emit: t }) {
|
|
1290
1267
|
let n = e, r = t, { t: i } = y(), a = O(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), o = B(a.value);
|
|
1291
|
-
|
|
1268
|
+
Ze(a, (e) => {
|
|
1292
1269
|
!e && o.value && (o.value = !1);
|
|
1293
1270
|
});
|
|
1294
1271
|
function s(e, t) {
|
|
@@ -1326,145 +1303,161 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1326
1303
|
});
|
|
1327
1304
|
}
|
|
1328
1305
|
}
|
|
1329
|
-
return (t, n) => (z(), j("div",
|
|
1330
|
-
M("div",
|
|
1306
|
+
return (t, n) => (z(), j("div", Br, [M("label", Vr, U(e.label), 1), M("div", Hr, [
|
|
1307
|
+
M("div", Ur, [
|
|
1331
1308
|
M("button", {
|
|
1332
|
-
"aria-label":
|
|
1333
|
-
class: L([
|
|
1309
|
+
"aria-label": W(i).spacingControl.decreaseTop,
|
|
1310
|
+
class: L([X, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1334
1311
|
onClick: n[0] ||= (e) => s("top", -1)
|
|
1335
|
-
}, [P(
|
|
1312
|
+
}, [P(W(S), {
|
|
1336
1313
|
size: 12,
|
|
1337
1314
|
"stroke-width": 2
|
|
1338
|
-
})], 10,
|
|
1315
|
+
})], 10, Wr),
|
|
1339
1316
|
M("input", {
|
|
1340
1317
|
type: "number",
|
|
1341
|
-
class: L(
|
|
1318
|
+
class: L(si),
|
|
1342
1319
|
value: e.modelValue.top,
|
|
1343
|
-
"aria-label":
|
|
1320
|
+
"aria-label": W(i).spacingControl.top,
|
|
1344
1321
|
min: "0",
|
|
1345
1322
|
onInput: n[1] ||= (e) => c("top", Number(e.target.value))
|
|
1346
|
-
}, null, 40,
|
|
1323
|
+
}, null, 40, Gr),
|
|
1347
1324
|
M("button", {
|
|
1348
|
-
"aria-label":
|
|
1349
|
-
class: L([
|
|
1325
|
+
"aria-label": W(i).spacingControl.increaseTop,
|
|
1326
|
+
class: L([X, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1350
1327
|
onClick: n[2] ||= (e) => s("top", 1)
|
|
1351
|
-
}, [P(
|
|
1328
|
+
}, [P(W(K), {
|
|
1352
1329
|
size: 12,
|
|
1353
1330
|
"stroke-width": 2
|
|
1354
|
-
})], 10,
|
|
1331
|
+
})], 10, Kr)
|
|
1355
1332
|
]),
|
|
1356
|
-
M("div",
|
|
1357
|
-
M("div",
|
|
1333
|
+
M("div", qr, [
|
|
1334
|
+
M("div", Jr, [
|
|
1358
1335
|
M("button", {
|
|
1359
|
-
"aria-label":
|
|
1360
|
-
class: L([
|
|
1336
|
+
"aria-label": W(i).spacingControl.decreaseLeft,
|
|
1337
|
+
class: L([X, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1361
1338
|
onClick: n[3] ||= (e) => s("left", -1)
|
|
1362
|
-
}, [P(
|
|
1339
|
+
}, [P(W(S), {
|
|
1363
1340
|
size: 12,
|
|
1364
1341
|
"stroke-width": 2
|
|
1365
|
-
})], 10,
|
|
1342
|
+
})], 10, Yr),
|
|
1366
1343
|
M("input", {
|
|
1367
1344
|
type: "number",
|
|
1368
|
-
class: L(
|
|
1345
|
+
class: L(si),
|
|
1369
1346
|
value: e.modelValue.left,
|
|
1370
|
-
"aria-label":
|
|
1347
|
+
"aria-label": W(i).spacingControl.left,
|
|
1371
1348
|
min: "0",
|
|
1372
1349
|
onInput: n[4] ||= (e) => c("left", Number(e.target.value))
|
|
1373
|
-
}, null, 40,
|
|
1350
|
+
}, null, 40, Xr),
|
|
1374
1351
|
M("button", {
|
|
1375
|
-
"aria-label":
|
|
1376
|
-
class: L([
|
|
1352
|
+
"aria-label": W(i).spacingControl.increaseLeft,
|
|
1353
|
+
class: L([X, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1377
1354
|
onClick: n[5] ||= (e) => s("left", 1)
|
|
1378
|
-
}, [P(
|
|
1355
|
+
}, [P(W(K), {
|
|
1379
1356
|
size: 12,
|
|
1380
1357
|
"stroke-width": 2
|
|
1381
|
-
})], 10,
|
|
1358
|
+
})], 10, Zr)
|
|
1382
1359
|
]),
|
|
1383
1360
|
M("button", {
|
|
1384
1361
|
class: L(["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)]", o.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)]"]),
|
|
1385
|
-
"aria-label": o.value ?
|
|
1386
|
-
title: o.value ?
|
|
1362
|
+
"aria-label": o.value ? W(i).spacingControl.unlock : W(i).spacingControl.lockAll,
|
|
1363
|
+
title: o.value ? W(i).spacingControl.unlock : W(i).spacingControl.lockAll,
|
|
1387
1364
|
onClick: l
|
|
1388
|
-
}, [o.value ? (z(), k(
|
|
1365
|
+
}, [o.value ? (z(), k(W(pt), {
|
|
1389
1366
|
key: 0,
|
|
1390
1367
|
size: 14,
|
|
1391
1368
|
"stroke-width": 2
|
|
1392
|
-
})) : (z(), k(
|
|
1369
|
+
})) : (z(), k(W(ft), {
|
|
1393
1370
|
key: 1,
|
|
1394
1371
|
size: 14,
|
|
1395
1372
|
"stroke-width": 2
|
|
1396
|
-
}))], 10,
|
|
1397
|
-
M("div",
|
|
1373
|
+
}))], 10, Qr),
|
|
1374
|
+
M("div", $r, [
|
|
1398
1375
|
M("button", {
|
|
1399
|
-
"aria-label":
|
|
1400
|
-
class: L([
|
|
1376
|
+
"aria-label": W(i).spacingControl.decreaseRight,
|
|
1377
|
+
class: L([X, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1401
1378
|
onClick: n[6] ||= (e) => s("right", -1)
|
|
1402
|
-
}, [P(
|
|
1379
|
+
}, [P(W(S), {
|
|
1403
1380
|
size: 12,
|
|
1404
1381
|
"stroke-width": 2
|
|
1405
|
-
})], 10,
|
|
1382
|
+
})], 10, ei),
|
|
1406
1383
|
M("input", {
|
|
1407
1384
|
type: "number",
|
|
1408
|
-
class: L(
|
|
1385
|
+
class: L(si),
|
|
1409
1386
|
value: e.modelValue.right,
|
|
1410
|
-
"aria-label":
|
|
1387
|
+
"aria-label": W(i).spacingControl.right,
|
|
1411
1388
|
min: "0",
|
|
1412
1389
|
onInput: n[7] ||= (e) => c("right", Number(e.target.value))
|
|
1413
|
-
}, null, 40,
|
|
1390
|
+
}, null, 40, ti),
|
|
1414
1391
|
M("button", {
|
|
1415
|
-
"aria-label":
|
|
1416
|
-
class: L([
|
|
1392
|
+
"aria-label": W(i).spacingControl.increaseRight,
|
|
1393
|
+
class: L([X, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1417
1394
|
onClick: n[8] ||= (e) => s("right", 1)
|
|
1418
|
-
}, [P(
|
|
1395
|
+
}, [P(W(K), {
|
|
1419
1396
|
size: 12,
|
|
1420
1397
|
"stroke-width": 2
|
|
1421
|
-
})], 10,
|
|
1398
|
+
})], 10, ni)
|
|
1422
1399
|
])
|
|
1423
1400
|
]),
|
|
1424
|
-
M("div",
|
|
1401
|
+
M("div", ri, [
|
|
1425
1402
|
M("button", {
|
|
1426
|
-
"aria-label":
|
|
1427
|
-
class: L([
|
|
1403
|
+
"aria-label": W(i).spacingControl.decreaseBottom,
|
|
1404
|
+
class: L([X, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1428
1405
|
onClick: n[9] ||= (e) => s("bottom", -1)
|
|
1429
|
-
}, [P(
|
|
1406
|
+
}, [P(W(S), {
|
|
1430
1407
|
size: 12,
|
|
1431
1408
|
"stroke-width": 2
|
|
1432
|
-
})], 10,
|
|
1409
|
+
})], 10, ii),
|
|
1433
1410
|
M("input", {
|
|
1434
1411
|
type: "number",
|
|
1435
|
-
class: L(
|
|
1412
|
+
class: L(si),
|
|
1436
1413
|
value: e.modelValue.bottom,
|
|
1437
|
-
"aria-label":
|
|
1414
|
+
"aria-label": W(i).spacingControl.bottom,
|
|
1438
1415
|
min: "0",
|
|
1439
1416
|
onInput: n[10] ||= (e) => c("bottom", Number(e.target.value))
|
|
1440
|
-
}, null, 40,
|
|
1417
|
+
}, null, 40, ai),
|
|
1441
1418
|
M("button", {
|
|
1442
|
-
"aria-label":
|
|
1443
|
-
class: L([
|
|
1419
|
+
"aria-label": W(i).spacingControl.increaseBottom,
|
|
1420
|
+
class: L([X, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1444
1421
|
onClick: n[11] ||= (e) => s("bottom", 1)
|
|
1445
|
-
}, [P(
|
|
1422
|
+
}, [P(W(K), {
|
|
1446
1423
|
size: 12,
|
|
1447
1424
|
"stroke-width": 2
|
|
1448
|
-
})], 10,
|
|
1425
|
+
})], 10, oi)
|
|
1449
1426
|
])
|
|
1450
1427
|
])]));
|
|
1451
1428
|
}
|
|
1452
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1429
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), li = { class: "tpl:mt-3" }, ui = /* @__PURE__ */ F({
|
|
1430
|
+
__name: "CollapsibleSection",
|
|
1431
|
+
props: {
|
|
1432
|
+
title: {},
|
|
1433
|
+
open: { type: Boolean },
|
|
1434
|
+
noBorder: { type: Boolean }
|
|
1435
|
+
},
|
|
1436
|
+
emits: ["toggle"],
|
|
1437
|
+
setup(e) {
|
|
1438
|
+
return (t, n) => (z(), j("div", { class: L(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [M("button", {
|
|
1439
|
+
type: "button",
|
|
1440
|
+
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1441
|
+
onClick: n[0] ||= (e) => t.$emit("toggle")
|
|
1442
|
+
}, [P(W(xe), {
|
|
1443
|
+
class: L(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1444
|
+
size: 12,
|
|
1445
|
+
"stroke-width": 2
|
|
1446
|
+
}, null, 8, ["class"]), M("span", null, U(e.title), 1)]), Qe(M("div", li, [Je(t.$slots, "default")], 512), [[Xe, e.open]])], 2));
|
|
1447
|
+
}
|
|
1448
|
+
}), di = { class: "tpl:mt-4" }, fi = { class: "tpl:space-y-2" }, pi = ["checked", "onChange"], mi = ["value", "placeholder"], hi = { class: "tpl:space-y-2" }, gi = ["value"], _i = { value: "" }, vi = ["label"], yi = ["value"], bi = ["value"], xi = {
|
|
1456
1449
|
key: 0,
|
|
1457
1450
|
value: "__custom__"
|
|
1458
|
-
},
|
|
1451
|
+
}, Si = {
|
|
1459
1452
|
key: 0,
|
|
1460
1453
|
class: "tpl:space-y-2"
|
|
1461
|
-
},
|
|
1454
|
+
}, Ci = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, wi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ti = { class: "tpl:flex tpl:justify-end" }, Ei = ["disabled"], Di = {
|
|
1462
1455
|
key: 0,
|
|
1463
1456
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1464
|
-
},
|
|
1457
|
+
}, Oi = { class: "tpl:space-y-1" }, ki = { 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)]" }, Ai = {
|
|
1465
1458
|
key: 0,
|
|
1466
1459
|
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)]"
|
|
1467
|
-
},
|
|
1460
|
+
}, ji = /* @__PURE__ */ F({
|
|
1468
1461
|
__name: "CommonBlockSettings",
|
|
1469
1462
|
props: {
|
|
1470
1463
|
block: {},
|
|
@@ -1472,29 +1465,45 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1472
1465
|
},
|
|
1473
1466
|
emits: ["update"],
|
|
1474
1467
|
setup(e, { emit: t }) {
|
|
1475
|
-
let n = e, r = t, { t: i } = y(), a = I(pe, []), o = I(ge, !1), s =
|
|
1476
|
-
|
|
1468
|
+
let n = e, r = t, { t: i } = y(), a = I(pe, []), o = I(ge, !1), s = qe(/* @__PURE__ */ new Set()), c = B(!1), l = B(""), u = B(""), d = [
|
|
1469
|
+
{
|
|
1470
|
+
key: "desktop",
|
|
1471
|
+
icon: mt,
|
|
1472
|
+
labelKey: "showOnDesktop"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
key: "tablet",
|
|
1476
|
+
icon: Ct,
|
|
1477
|
+
labelKey: "showOnTablet"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
key: "mobile",
|
|
1481
|
+
icon: yt,
|
|
1482
|
+
labelKey: "showOnMobile"
|
|
1483
|
+
}
|
|
1484
|
+
];
|
|
1485
|
+
function f(e) {
|
|
1477
1486
|
s.has(e) ? s.delete(e) : s.add(e);
|
|
1478
1487
|
}
|
|
1479
|
-
let
|
|
1480
|
-
function m() {
|
|
1481
|
-
u.value = !0, p.value && n.block.displayCondition ? (d.value = n.block.displayCondition.before, f.value = n.block.displayCondition.after ?? "") : (d.value = "", f.value = "");
|
|
1482
|
-
}
|
|
1488
|
+
let p = O(() => a.length > 0 || o), m = O(() => n.block.displayCondition ? !a.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1483
1489
|
function h() {
|
|
1484
|
-
|
|
1490
|
+
c.value = !0, m.value && n.block.displayCondition ? (l.value = n.block.displayCondition.before, u.value = n.block.displayCondition.after ?? "") : (l.value = "", u.value = "");
|
|
1491
|
+
}
|
|
1492
|
+
function g() {
|
|
1493
|
+
l.value.trim() && (r("update", { displayCondition: {
|
|
1485
1494
|
label: i.blockSettings.customCondition,
|
|
1486
|
-
before:
|
|
1487
|
-
after:
|
|
1488
|
-
} }),
|
|
1495
|
+
before: l.value.trim(),
|
|
1496
|
+
after: u.value.trim()
|
|
1497
|
+
} }), c.value = !1, l.value = "", u.value = "");
|
|
1489
1498
|
}
|
|
1490
|
-
|
|
1499
|
+
Ze(() => n.block.displayCondition, (e) => {
|
|
1491
1500
|
if (!e) {
|
|
1492
|
-
|
|
1501
|
+
c.value = !1, l.value = "", u.value = "";
|
|
1493
1502
|
return;
|
|
1494
1503
|
}
|
|
1495
|
-
|
|
1504
|
+
m.value && (l.value = e.before, u.value = e.after ?? "");
|
|
1496
1505
|
}, { immediate: !0 });
|
|
1497
|
-
let
|
|
1506
|
+
let ee = O(() => {
|
|
1498
1507
|
let e = {};
|
|
1499
1508
|
for (let t of a) {
|
|
1500
1509
|
let n = t.group ?? "";
|
|
@@ -1502,182 +1511,157 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1502
1511
|
}
|
|
1503
1512
|
return e;
|
|
1504
1513
|
});
|
|
1505
|
-
function
|
|
1514
|
+
function te(e, t) {
|
|
1506
1515
|
r("update", { styles: {
|
|
1507
1516
|
...n.block.styles,
|
|
1508
1517
|
[e]: t
|
|
1509
1518
|
} });
|
|
1510
1519
|
}
|
|
1520
|
+
function _(e) {
|
|
1521
|
+
return n.block.visibility?.[e] !== !1;
|
|
1522
|
+
}
|
|
1523
|
+
function ne(e) {
|
|
1524
|
+
let t = {
|
|
1525
|
+
desktop: _("desktop"),
|
|
1526
|
+
tablet: _("tablet"),
|
|
1527
|
+
mobile: _("mobile")
|
|
1528
|
+
};
|
|
1529
|
+
t[e] = !t[e], r("update", { visibility: t });
|
|
1530
|
+
}
|
|
1511
1531
|
return (t, n) => (z(), j("div", { class: L(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
"model-value"
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
"model-value"
|
|
1527
|
-
|
|
1528
|
-
},
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
"
|
|
1537
|
-
},
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1555
|
-
checked: e.block.visibility?.desktop !== !1,
|
|
1556
|
-
onChange: n[6] ||= (t) => r("update", { visibility: {
|
|
1557
|
-
desktop: e.block.visibility?.desktop === !1,
|
|
1558
|
-
tablet: e.block.visibility?.tablet !== !1,
|
|
1559
|
-
mobile: e.block.visibility?.mobile !== !1
|
|
1560
|
-
} })
|
|
1561
|
-
}, null, 40, bi),
|
|
1562
|
-
P(U(dt), {
|
|
1563
|
-
size: 14,
|
|
1564
|
-
"stroke-width": 1.5
|
|
1565
|
-
}),
|
|
1566
|
-
N(" " + H(U(i).blockSettings.showOnDesktop), 1)
|
|
1567
|
-
]),
|
|
1568
|
-
M("label", xi, [
|
|
1569
|
-
M("input", {
|
|
1570
|
-
type: "checkbox",
|
|
1571
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1572
|
-
checked: e.block.visibility?.tablet !== !1,
|
|
1573
|
-
onChange: n[7] ||= (t) => r("update", { visibility: {
|
|
1574
|
-
desktop: e.block.visibility?.desktop !== !1,
|
|
1575
|
-
tablet: e.block.visibility?.tablet === !1,
|
|
1576
|
-
mobile: e.block.visibility?.mobile !== !1
|
|
1577
|
-
} })
|
|
1578
|
-
}, null, 40, Si),
|
|
1579
|
-
P(U(bt), {
|
|
1580
|
-
size: 14,
|
|
1581
|
-
"stroke-width": 1.5
|
|
1582
|
-
}),
|
|
1583
|
-
N(" " + H(U(i).blockSettings.showOnTablet), 1)
|
|
1584
|
-
]),
|
|
1585
|
-
M("label", Ci, [
|
|
1532
|
+
P(ui, {
|
|
1533
|
+
title: W(i).blockSettings.spacing,
|
|
1534
|
+
open: s.has("spacing"),
|
|
1535
|
+
"no-border": e.isFirstSection,
|
|
1536
|
+
onToggle: n[2] ||= (e) => f("spacing")
|
|
1537
|
+
}, {
|
|
1538
|
+
default: G(() => [P(ci, {
|
|
1539
|
+
label: W(i).blockSettings.padding,
|
|
1540
|
+
"model-value": e.block.styles.padding,
|
|
1541
|
+
"onUpdate:modelValue": n[0] ||= (e) => te("padding", e)
|
|
1542
|
+
}, null, 8, ["label", "model-value"]), M("div", di, [P(ci, {
|
|
1543
|
+
label: W(i).blockSettings.margin,
|
|
1544
|
+
"model-value": e.block.styles.margin,
|
|
1545
|
+
"onUpdate:modelValue": n[1] ||= (e) => te("margin", e)
|
|
1546
|
+
}, null, 8, ["label", "model-value"])])]),
|
|
1547
|
+
_: 1
|
|
1548
|
+
}, 8, [
|
|
1549
|
+
"title",
|
|
1550
|
+
"open",
|
|
1551
|
+
"no-border"
|
|
1552
|
+
]),
|
|
1553
|
+
P(ui, {
|
|
1554
|
+
title: W(i).blockSettings.background,
|
|
1555
|
+
open: s.has("bg"),
|
|
1556
|
+
onToggle: n[4] ||= (e) => f("bg")
|
|
1557
|
+
}, {
|
|
1558
|
+
default: G(() => [M("label", { class: L(W(w)) }, U(W(i).blockSettings.color), 3), P(J, {
|
|
1559
|
+
size: "large",
|
|
1560
|
+
"model-value": e.block.styles.backgroundColor || W("#ffffff"),
|
|
1561
|
+
"onUpdate:modelValue": n[3] ||= (e) => te("backgroundColor", e)
|
|
1562
|
+
}, null, 8, ["model-value"])]),
|
|
1563
|
+
_: 1
|
|
1564
|
+
}, 8, ["title", "open"]),
|
|
1565
|
+
P(ui, {
|
|
1566
|
+
title: W(i).blockSettings.display,
|
|
1567
|
+
open: s.has("display"),
|
|
1568
|
+
onToggle: n[5] ||= (e) => f("display")
|
|
1569
|
+
}, {
|
|
1570
|
+
default: G(() => [M("div", fi, [(z(), j(D, null, V(d, (e) => M("label", {
|
|
1571
|
+
key: e.key,
|
|
1572
|
+
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1573
|
+
}, [
|
|
1586
1574
|
M("input", {
|
|
1587
1575
|
type: "checkbox",
|
|
1588
1576
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1589
|
-
checked: e.
|
|
1590
|
-
onChange:
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
mobile: e.block.visibility?.mobile === !1
|
|
1594
|
-
} })
|
|
1595
|
-
}, null, 40, wi),
|
|
1596
|
-
P(U(gt), {
|
|
1577
|
+
checked: _(e.key),
|
|
1578
|
+
onChange: (t) => ne(e.key)
|
|
1579
|
+
}, null, 40, pi),
|
|
1580
|
+
(z(), k(H(e.icon), {
|
|
1597
1581
|
size: 14,
|
|
1598
1582
|
"stroke-width": 1.5
|
|
1599
|
-
}),
|
|
1600
|
-
N(" " +
|
|
1601
|
-
])
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
},
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1583
|
+
})),
|
|
1584
|
+
N(" " + U(W(i).blockSettings[e.labelKey]), 1)
|
|
1585
|
+
])), 64))])]),
|
|
1586
|
+
_: 1
|
|
1587
|
+
}, 8, ["title", "open"]),
|
|
1588
|
+
P(ui, {
|
|
1589
|
+
title: W(i).blockSettings.customCss,
|
|
1590
|
+
open: s.has("css"),
|
|
1591
|
+
onToggle: n[7] ||= (e) => f("css")
|
|
1592
|
+
}, {
|
|
1593
|
+
default: G(() => [M("label", { class: L(W(w)) }, U(W(i).blockSettings.css), 3), M("textarea", {
|
|
1594
|
+
value: e.block.customCss || "",
|
|
1595
|
+
placeholder: W(i).blockSettings.cssPlaceholder,
|
|
1596
|
+
rows: "3",
|
|
1597
|
+
class: L(W(Pe)),
|
|
1598
|
+
onInput: n[6] ||= (e) => r("update", { customCss: e.target.value })
|
|
1599
|
+
}, null, 42, mi)]),
|
|
1600
|
+
_: 1
|
|
1601
|
+
}, 8, ["title", "open"]),
|
|
1602
|
+
p.value ? (z(), k(ui, {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
title: W(i).blockSettings.displayCondition,
|
|
1605
|
+
open: s.has("condition"),
|
|
1606
|
+
onToggle: n[11] ||= (e) => f("condition")
|
|
1607
|
+
}, {
|
|
1608
|
+
default: G(() => [M("div", hi, [M("select", {
|
|
1609
|
+
class: L(["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)]"]),
|
|
1610
|
+
value: c.value || m.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1611
|
+
onChange: n[8] ||= (e) => {
|
|
1612
|
+
let t = e.target.value;
|
|
1613
|
+
if (t === "__custom__") {
|
|
1614
|
+
h();
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
if (c.value = !1, !t) {
|
|
1618
|
+
r("update", { displayCondition: void 0 });
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
let n = W(a).find((e) => e.label === t);
|
|
1622
|
+
n && r("update", { displayCondition: n });
|
|
1638
1623
|
}
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
])) : e.block.displayCondition && !p.value ? (z(), j(D, { key: 1 }, [e.block.displayCondition.description ? (z(), j("p", Vi, H(e.block.displayCondition.description), 1)) : A("", !0), M("div", Hi, [M("pre", Ui, H(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (z(), j("pre", Wi, H(e.block.displayCondition.after), 1)) : A("", !0)])], 64)) : A("", !0)], 512), [[Ye, s.has("condition")]])])) : A("", !0)
|
|
1624
|
+
}, [
|
|
1625
|
+
M("option", _i, U(W(i).blockSettings.noCondition), 1),
|
|
1626
|
+
(z(!0), j(D, null, V(ee.value, (e, t) => (z(), j(D, { key: t }, [t ? (z(), j("optgroup", {
|
|
1627
|
+
key: 0,
|
|
1628
|
+
label: String(t)
|
|
1629
|
+
}, [(z(!0), j(D, null, V(e, (e) => (z(), j("option", {
|
|
1630
|
+
key: e.label,
|
|
1631
|
+
value: e.label
|
|
1632
|
+
}, U(e.label), 9, yi))), 128))], 8, vi)) : (z(!0), j(D, { key: 1 }, V(e, (e) => (z(), j("option", {
|
|
1633
|
+
key: e.label,
|
|
1634
|
+
value: e.label
|
|
1635
|
+
}, U(e.label), 9, bi))), 128))], 64))), 128)),
|
|
1636
|
+
W(o) ? (z(), j("option", xi, U(W(i).blockSettings.customCondition), 1)) : A("", !0)
|
|
1637
|
+
], 42, gi), c.value || m.value ? (z(), j("div", Si, [
|
|
1638
|
+
M("div", null, [M("label", Ci, U(W(i).blockSettings.customConditionBefore), 1), Qe(M("textarea", {
|
|
1639
|
+
"onUpdate:modelValue": n[9] ||= (e) => l.value = e,
|
|
1640
|
+
rows: "2",
|
|
1641
|
+
class: L(W(Pe))
|
|
1642
|
+
}, null, 2), [[Ye, l.value]])]),
|
|
1643
|
+
M("div", null, [M("label", wi, U(W(i).blockSettings.customConditionAfter), 1), Qe(M("textarea", {
|
|
1644
|
+
"onUpdate:modelValue": n[10] ||= (e) => u.value = e,
|
|
1645
|
+
rows: "2",
|
|
1646
|
+
class: L(W(Pe))
|
|
1647
|
+
}, null, 2), [[Ye, u.value]])]),
|
|
1648
|
+
M("div", Ti, [M("button", {
|
|
1649
|
+
type: "button",
|
|
1650
|
+
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",
|
|
1651
|
+
disabled: !l.value.trim(),
|
|
1652
|
+
onClick: g
|
|
1653
|
+
}, U(W(i).blockSettings.applyCondition), 9, Ei)])
|
|
1654
|
+
])) : e.block.displayCondition && !m.value ? (z(), j(D, { key: 1 }, [e.block.displayCondition.description ? (z(), j("p", Di, U(e.block.displayCondition.description), 1)) : A("", !0), M("div", Oi, [M("pre", ki, U(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (z(), j("pre", Ai, U(e.block.displayCondition.after), 1)) : A("", !0)])], 64)) : A("", !0)])]),
|
|
1655
|
+
_: 1
|
|
1656
|
+
}, 8, ["title", "open"])) : A("", !0)
|
|
1673
1657
|
], 2));
|
|
1674
1658
|
}
|
|
1675
|
-
}),
|
|
1659
|
+
}), Mi = [
|
|
1676
1660
|
"aria-checked",
|
|
1677
1661
|
"aria-label",
|
|
1678
1662
|
"title",
|
|
1679
1663
|
"onClick"
|
|
1680
|
-
],
|
|
1664
|
+
], Ni = { key: 1 }, Z = /* @__PURE__ */ F({
|
|
1681
1665
|
__name: "SlidingPillSelect",
|
|
1682
1666
|
props: {
|
|
1683
1667
|
options: {},
|
|
@@ -1718,13 +1702,66 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1718
1702
|
}),
|
|
1719
1703
|
title: t.label,
|
|
1720
1704
|
onClick: (e) => r("update:modelValue", t.value)
|
|
1721
|
-
}, [t.icon ? (z(), k(
|
|
1705
|
+
}, [t.icon ? (z(), k(H(t.icon), {
|
|
1722
1706
|
key: 0,
|
|
1723
1707
|
size: 14,
|
|
1724
1708
|
"stroke-width": 2
|
|
1725
|
-
})) : (z(), j("span",
|
|
1709
|
+
})) : (z(), j("span", Ni, U(t.label), 1))], 12, Mi))), 128))], 4));
|
|
1710
|
+
}
|
|
1711
|
+
}), Pi = { class: "tpl:mb-3.5" }, Q = /* @__PURE__ */ F({
|
|
1712
|
+
__name: "FieldRow",
|
|
1713
|
+
props: { label: {} },
|
|
1714
|
+
setup(e) {
|
|
1715
|
+
return (t, n) => (z(), j("div", Pi, [e.label ? (z(), j("label", {
|
|
1716
|
+
key: 0,
|
|
1717
|
+
class: L(W(w))
|
|
1718
|
+
}, U(e.label), 3)) : A("", !0), Je(t.$slots, "default")]));
|
|
1719
|
+
}
|
|
1720
|
+
}), Fi = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, Ii = ["checked"], Li = /* @__PURE__ */ F({
|
|
1721
|
+
__name: "CheckboxItem",
|
|
1722
|
+
props: {
|
|
1723
|
+
modelValue: { type: Boolean },
|
|
1724
|
+
label: {}
|
|
1725
|
+
},
|
|
1726
|
+
emits: ["update:modelValue"],
|
|
1727
|
+
setup(e, { emit: t }) {
|
|
1728
|
+
let n = t;
|
|
1729
|
+
return (t, r) => (z(), j("label", Fi, [M("input", {
|
|
1730
|
+
type: "checkbox",
|
|
1731
|
+
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1732
|
+
checked: e.modelValue,
|
|
1733
|
+
onChange: r[0] ||= (e) => n("update:modelValue", e.target.checked)
|
|
1734
|
+
}, null, 40, Ii), N(" " + U(e.label), 1)]));
|
|
1726
1735
|
}
|
|
1727
|
-
}),
|
|
1736
|
+
}), Ri = { class: "tpl:flex tpl:items-stretch" }, zi = [
|
|
1737
|
+
"value",
|
|
1738
|
+
"min",
|
|
1739
|
+
"max"
|
|
1740
|
+
], Bi = /* @__PURE__ */ F({
|
|
1741
|
+
__name: "NumberWithSuffix",
|
|
1742
|
+
props: {
|
|
1743
|
+
modelValue: {},
|
|
1744
|
+
min: {},
|
|
1745
|
+
max: {},
|
|
1746
|
+
suffix: {}
|
|
1747
|
+
},
|
|
1748
|
+
emits: ["update:modelValue"],
|
|
1749
|
+
setup(e, { emit: t }) {
|
|
1750
|
+
let n = t;
|
|
1751
|
+
return (t, r) => (z(), j("div", Ri, [M("input", {
|
|
1752
|
+
type: "number",
|
|
1753
|
+
class: L(W(E)),
|
|
1754
|
+
value: e.modelValue,
|
|
1755
|
+
min: e.min,
|
|
1756
|
+
max: e.max,
|
|
1757
|
+
onInput: r[0] ||= (e) => n("update:modelValue", Number(e.target.value))
|
|
1758
|
+
}, null, 42, zi), M("span", { class: L(W(T)) }, U(e.suffix), 3)]));
|
|
1759
|
+
}
|
|
1760
|
+
}), Vi = ["value"], Hi = ["value"], Ui = ["value"], Wi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, Gi = ["value"], Ki = { value: "" }, qi = ["value"], Ji = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Yi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Xi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, Zi = [
|
|
1761
|
+
"value",
|
|
1762
|
+
"placeholder",
|
|
1763
|
+
"onInput"
|
|
1764
|
+
], Qi = ["value", "placeholder"], $i = ["value"], ea = /* @__PURE__ */ F({
|
|
1728
1765
|
__name: "CountdownToolbar",
|
|
1729
1766
|
props: {
|
|
1730
1767
|
block: {},
|
|
@@ -1732,160 +1769,188 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1732
1769
|
},
|
|
1733
1770
|
emits: ["update"],
|
|
1734
1771
|
setup(e, { emit: t }) {
|
|
1735
|
-
let n = t, { t: r } = y()
|
|
1736
|
-
|
|
1772
|
+
let n = t, { t: r } = y(), i = [
|
|
1773
|
+
"UTC",
|
|
1774
|
+
"America/New_York",
|
|
1775
|
+
"America/Chicago",
|
|
1776
|
+
"America/Denver",
|
|
1777
|
+
"America/Los_Angeles",
|
|
1778
|
+
"Europe/London",
|
|
1779
|
+
"Europe/Berlin",
|
|
1780
|
+
"Europe/Paris",
|
|
1781
|
+
"Europe/Moscow",
|
|
1782
|
+
"Asia/Dubai",
|
|
1783
|
+
"Asia/Kolkata",
|
|
1784
|
+
"Asia/Shanghai",
|
|
1785
|
+
"Asia/Tokyo",
|
|
1786
|
+
"Australia/Sydney",
|
|
1787
|
+
"Pacific/Auckland"
|
|
1788
|
+
], a = [
|
|
1789
|
+
{
|
|
1790
|
+
value: ":",
|
|
1791
|
+
label: ":"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
value: "-",
|
|
1795
|
+
label: "-"
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
value: " ",
|
|
1799
|
+
label: "␣"
|
|
1800
|
+
}
|
|
1801
|
+
], o = [
|
|
1802
|
+
"Days",
|
|
1803
|
+
"Hours",
|
|
1804
|
+
"Minutes",
|
|
1805
|
+
"Seconds"
|
|
1806
|
+
], s = O(() => o.map((e) => ({
|
|
1807
|
+
unit: e,
|
|
1808
|
+
showKey: `show${e}`,
|
|
1809
|
+
labelKey: `label${e}`,
|
|
1810
|
+
translationKey: e.toLowerCase()
|
|
1811
|
+
})));
|
|
1812
|
+
function c(e, t) {
|
|
1737
1813
|
n("update", { [e]: t });
|
|
1738
1814
|
}
|
|
1739
1815
|
return (t, n) => (z(), j(D, null, [
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
},
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
},
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
},
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
placeholder: U(r).countdown.days,
|
|
1835
|
-
onInput: n[13] ||= (e) => i("labelDays", e.target.value)
|
|
1836
|
-
}, null, 42, Ea),
|
|
1837
|
-
M("input", {
|
|
1838
|
-
type: "text",
|
|
1839
|
-
class: L(U(C)),
|
|
1840
|
-
value: e.block.labelHours,
|
|
1841
|
-
placeholder: U(r).countdown.hours,
|
|
1842
|
-
onInput: n[14] ||= (e) => i("labelHours", e.target.value)
|
|
1843
|
-
}, null, 42, Da),
|
|
1844
|
-
M("input", {
|
|
1816
|
+
P(Q, { label: W(r).countdown.targetDate }, {
|
|
1817
|
+
default: G(() => [M("input", {
|
|
1818
|
+
type: "datetime-local",
|
|
1819
|
+
class: L(W(C)),
|
|
1820
|
+
value: e.block.targetDate,
|
|
1821
|
+
onInput: n[0] ||= (e) => c("targetDate", e.target.value)
|
|
1822
|
+
}, null, 42, Vi)]),
|
|
1823
|
+
_: 1
|
|
1824
|
+
}, 8, ["label"]),
|
|
1825
|
+
P(Q, { label: W(r).countdown.timezone }, {
|
|
1826
|
+
default: G(() => [M("select", {
|
|
1827
|
+
class: L(W(C)),
|
|
1828
|
+
value: e.block.timezone,
|
|
1829
|
+
onChange: n[1] ||= (e) => c("timezone", e.target.value)
|
|
1830
|
+
}, [(z(), j(D, null, V(i, (e) => M("option", {
|
|
1831
|
+
key: e,
|
|
1832
|
+
value: e
|
|
1833
|
+
}, U(e), 9, Ui)), 64))], 42, Hi)]),
|
|
1834
|
+
_: 1
|
|
1835
|
+
}, 8, ["label"]),
|
|
1836
|
+
P(Q, { label: W(r).countdown.display }, {
|
|
1837
|
+
default: G(() => [M("div", Wi, [(z(!0), j(D, null, V(s.value, (t) => (z(), k(Li, {
|
|
1838
|
+
key: t.unit,
|
|
1839
|
+
"model-value": e.block[t.showKey],
|
|
1840
|
+
label: W(r).countdown[t.translationKey],
|
|
1841
|
+
"onUpdate:modelValue": (e) => c(t.showKey, e)
|
|
1842
|
+
}, null, 8, [
|
|
1843
|
+
"model-value",
|
|
1844
|
+
"label",
|
|
1845
|
+
"onUpdate:modelValue"
|
|
1846
|
+
]))), 128))])]),
|
|
1847
|
+
_: 1
|
|
1848
|
+
}, 8, ["label"]),
|
|
1849
|
+
P(Q, { label: W(r).countdown.separator }, {
|
|
1850
|
+
default: G(() => [P(Z, {
|
|
1851
|
+
options: a,
|
|
1852
|
+
"model-value": e.block.separator,
|
|
1853
|
+
"onUpdate:modelValue": n[2] ||= (e) => c("separator", e)
|
|
1854
|
+
}, null, 8, ["model-value"])]),
|
|
1855
|
+
_: 1
|
|
1856
|
+
}, 8, ["label"]),
|
|
1857
|
+
P(Q, { label: W(r).countdown.fontFamily }, {
|
|
1858
|
+
default: G(() => [M("select", {
|
|
1859
|
+
class: L(W(C)),
|
|
1860
|
+
value: e.block.fontFamily || "",
|
|
1861
|
+
onChange: n[3] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
1862
|
+
}, [M("option", Ki, U(W(r).countdown.inheritFont), 1), (z(!0), j(D, null, V(e.fontFamilies, (e) => (z(), j("option", {
|
|
1863
|
+
key: e.value,
|
|
1864
|
+
value: e.value
|
|
1865
|
+
}, U(e.label), 9, qi))), 128))], 42, Gi)]),
|
|
1866
|
+
_: 1
|
|
1867
|
+
}, 8, ["label"]),
|
|
1868
|
+
M("div", Ji, [P(Q, { label: W(r).countdown.digitFontSize }, {
|
|
1869
|
+
default: G(() => [P(Bi, {
|
|
1870
|
+
"model-value": e.block.digitFontSize,
|
|
1871
|
+
min: 12,
|
|
1872
|
+
max: 72,
|
|
1873
|
+
suffix: "px",
|
|
1874
|
+
"onUpdate:modelValue": n[4] ||= (e) => c("digitFontSize", e)
|
|
1875
|
+
}, null, 8, ["model-value"])]),
|
|
1876
|
+
_: 1
|
|
1877
|
+
}, 8, ["label"]), P(Q, { label: W(r).countdown.labelFontSize }, {
|
|
1878
|
+
default: G(() => [P(Bi, {
|
|
1879
|
+
"model-value": e.block.labelFontSize,
|
|
1880
|
+
min: 8,
|
|
1881
|
+
max: 24,
|
|
1882
|
+
suffix: "px",
|
|
1883
|
+
"onUpdate:modelValue": n[5] ||= (e) => c("labelFontSize", e)
|
|
1884
|
+
}, null, 8, ["model-value"])]),
|
|
1885
|
+
_: 1
|
|
1886
|
+
}, 8, ["label"])]),
|
|
1887
|
+
M("div", Yi, [P(Q, { label: W(r).countdown.digitColor }, {
|
|
1888
|
+
default: G(() => [P(J, {
|
|
1889
|
+
"model-value": e.block.digitColor,
|
|
1890
|
+
"onUpdate:modelValue": n[6] ||= (e) => c("digitColor", e)
|
|
1891
|
+
}, null, 8, ["model-value"])]),
|
|
1892
|
+
_: 1
|
|
1893
|
+
}, 8, ["label"]), P(Q, { label: W(r).countdown.labelColor }, {
|
|
1894
|
+
default: G(() => [P(J, {
|
|
1895
|
+
"model-value": e.block.labelColor,
|
|
1896
|
+
"onUpdate:modelValue": n[7] ||= (e) => c("labelColor", e)
|
|
1897
|
+
}, null, 8, ["model-value"])]),
|
|
1898
|
+
_: 1
|
|
1899
|
+
}, 8, ["label"])]),
|
|
1900
|
+
P(Q, { label: W(r).countdown.background }, {
|
|
1901
|
+
default: G(() => [P(J, {
|
|
1902
|
+
"model-value": e.block.backgroundColor,
|
|
1903
|
+
"onUpdate:modelValue": n[8] ||= (e) => c("backgroundColor", e)
|
|
1904
|
+
}, null, 8, ["model-value"])]),
|
|
1905
|
+
_: 1
|
|
1906
|
+
}, 8, ["label"]),
|
|
1907
|
+
P(Q, { label: W(r).countdown.labels }, {
|
|
1908
|
+
default: G(() => [M("div", Xi, [(z(!0), j(D, null, V(s.value, (t) => (z(), j("input", {
|
|
1909
|
+
key: t.unit,
|
|
1845
1910
|
type: "text",
|
|
1846
|
-
class: L(
|
|
1847
|
-
value: e.block.
|
|
1848
|
-
placeholder:
|
|
1849
|
-
onInput:
|
|
1850
|
-
}, null, 42,
|
|
1851
|
-
|
|
1911
|
+
class: L(W(C)),
|
|
1912
|
+
value: e.block[t.labelKey],
|
|
1913
|
+
placeholder: W(r).countdown[t.translationKey],
|
|
1914
|
+
onInput: (e) => c(t.labelKey, e.target.value)
|
|
1915
|
+
}, null, 42, Zi))), 128))])]),
|
|
1916
|
+
_: 1
|
|
1917
|
+
}, 8, ["label"]),
|
|
1918
|
+
P(Q, { label: W(r).countdown.expiry }, {
|
|
1919
|
+
default: G(() => [M("input", {
|
|
1852
1920
|
type: "text",
|
|
1853
|
-
class: L(
|
|
1854
|
-
value: e.block.
|
|
1855
|
-
placeholder:
|
|
1856
|
-
onInput: n[
|
|
1857
|
-
}, null, 42,
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
checked: e.block.hideOnExpiry,
|
|
1877
|
-
onChange: n[19] ||= (e) => i("hideOnExpiry", e.target.checked)
|
|
1878
|
-
}, null, 40, Fa), N(" " + H(U(r).countdown.hideOnExpiry), 1)])
|
|
1921
|
+
class: L(W(C)),
|
|
1922
|
+
value: e.block.expiredMessage,
|
|
1923
|
+
placeholder: W(r).countdown.expiredMessagePlaceholder,
|
|
1924
|
+
onInput: n[9] ||= (e) => c("expiredMessage", e.target.value)
|
|
1925
|
+
}, null, 42, Qi)]),
|
|
1926
|
+
_: 1
|
|
1927
|
+
}, 8, ["label"]),
|
|
1928
|
+
P(Q, { label: W(r).countdown.expiredImageUrl }, {
|
|
1929
|
+
default: G(() => [M("input", {
|
|
1930
|
+
type: "url",
|
|
1931
|
+
class: L(W(C)),
|
|
1932
|
+
value: e.block.expiredImageUrl,
|
|
1933
|
+
placeholder: "https://...",
|
|
1934
|
+
onInput: n[10] ||= (e) => c("expiredImageUrl", e.target.value)
|
|
1935
|
+
}, null, 42, $i)]),
|
|
1936
|
+
_: 1
|
|
1937
|
+
}, 8, ["label"]),
|
|
1938
|
+
P(Li, {
|
|
1939
|
+
"model-value": e.block.hideOnExpiry,
|
|
1940
|
+
label: W(r).countdown.hideOnExpiry,
|
|
1941
|
+
class: "tpl:mb-3.5",
|
|
1942
|
+
"onUpdate:modelValue": n[11] ||= (e) => c("hideOnExpiry", e)
|
|
1943
|
+
}, null, 8, ["model-value", "label"])
|
|
1879
1944
|
], 64));
|
|
1880
1945
|
}
|
|
1881
|
-
}),
|
|
1946
|
+
}), ta = ["title"], na = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ra = {
|
|
1882
1947
|
key: 1,
|
|
1883
1948
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1884
|
-
},
|
|
1949
|
+
}, ia = [
|
|
1885
1950
|
"aria-checked",
|
|
1886
1951
|
"aria-label",
|
|
1887
1952
|
"disabled"
|
|
1888
|
-
],
|
|
1953
|
+
], aa = /* @__PURE__ */ F({
|
|
1889
1954
|
__name: "BooleanField",
|
|
1890
1955
|
props: {
|
|
1891
1956
|
field: {},
|
|
@@ -1897,15 +1962,15 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1897
1962
|
let n = t, { t: r } = y();
|
|
1898
1963
|
return (t, i) => (z(), j("div", {
|
|
1899
1964
|
class: "tpl:mb-3.5",
|
|
1900
|
-
title: e.readOnly ?
|
|
1901
|
-
}, [M("label", { class: L(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [M("span",
|
|
1902
|
-
N(
|
|
1903
|
-
e.readOnly ? (z(), k(
|
|
1965
|
+
title: e.readOnly ? W(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1966
|
+
}, [M("label", { class: L(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [M("span", na, [
|
|
1967
|
+
N(U(e.field.label) + " ", 1),
|
|
1968
|
+
e.readOnly ? (z(), k(W(pt), {
|
|
1904
1969
|
key: 0,
|
|
1905
1970
|
size: 12,
|
|
1906
1971
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1907
1972
|
})) : A("", !0),
|
|
1908
|
-
e.field.required ? (z(), j("span",
|
|
1973
|
+
e.field.required ? (z(), j("span", ra, " * ")) : A("", !0)
|
|
1909
1974
|
]), M("button", {
|
|
1910
1975
|
type: "button",
|
|
1911
1976
|
role: "switch",
|
|
@@ -1918,9 +1983,9 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1918
1983
|
]),
|
|
1919
1984
|
disabled: e.readOnly,
|
|
1920
1985
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1921
|
-
}, [M("span", { class: L(["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,
|
|
1986
|
+
}, [M("span", { class: L(["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, ia)], 2)], 8, ta));
|
|
1922
1987
|
}
|
|
1923
|
-
}),
|
|
1988
|
+
}), oa = { class: "tpl:mb-3.5" }, sa = {
|
|
1924
1989
|
key: 1,
|
|
1925
1990
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1926
1991
|
}, $ = /* @__PURE__ */ F({
|
|
@@ -1931,17 +1996,17 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1931
1996
|
readOnly: { type: Boolean }
|
|
1932
1997
|
},
|
|
1933
1998
|
setup(e) {
|
|
1934
|
-
return (t, n) => (z(), j("div",
|
|
1935
|
-
N(
|
|
1936
|
-
e.readOnly ? (z(), k(
|
|
1999
|
+
return (t, n) => (z(), j("div", oa, [M("label", { class: L(W(w)) }, [
|
|
2000
|
+
N(U(e.label) + " ", 1),
|
|
2001
|
+
e.readOnly ? (z(), k(W(pt), {
|
|
1937
2002
|
key: 0,
|
|
1938
2003
|
size: 12,
|
|
1939
2004
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1940
2005
|
})) : A("", !0),
|
|
1941
|
-
e.required ? (z(), j("span",
|
|
1942
|
-
], 2),
|
|
2006
|
+
e.required ? (z(), j("span", sa, "*")) : A("", !0)
|
|
2007
|
+
], 2), Je(t.$slots, "default")]));
|
|
1943
2008
|
}
|
|
1944
|
-
}),
|
|
2009
|
+
}), ca = /* @__PURE__ */ F({
|
|
1945
2010
|
__name: "ColorField",
|
|
1946
2011
|
props: {
|
|
1947
2012
|
field: {},
|
|
@@ -1956,11 +2021,11 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1956
2021
|
required: e.field.required,
|
|
1957
2022
|
"read-only": e.readOnly
|
|
1958
2023
|
}, {
|
|
1959
|
-
default:
|
|
1960
|
-
"model-value": e.modelValue ||
|
|
1961
|
-
placeholder: e.field.placeholder ||
|
|
2024
|
+
default: G(() => [P(J, {
|
|
2025
|
+
"model-value": e.modelValue || W("#000000"),
|
|
2026
|
+
placeholder: e.field.placeholder || W("#000000"),
|
|
1962
2027
|
disabled: e.readOnly,
|
|
1963
|
-
title: e.readOnly ?
|
|
2028
|
+
title: e.readOnly ? W(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1964
2029
|
"onUpdate:modelValue": i[0] ||= (e) => n("update:modelValue", e)
|
|
1965
2030
|
}, null, 8, [
|
|
1966
2031
|
"model-value",
|
|
@@ -1975,11 +2040,11 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1975
2040
|
"read-only"
|
|
1976
2041
|
]));
|
|
1977
2042
|
}
|
|
1978
|
-
}),
|
|
2043
|
+
}), la = [
|
|
1979
2044
|
"value",
|
|
1980
2045
|
"placeholder",
|
|
1981
2046
|
"title"
|
|
1982
|
-
],
|
|
2047
|
+
], ua = ["value", "placeholder"], da = /* @__PURE__ */ F({
|
|
1983
2048
|
__name: "ImageField",
|
|
1984
2049
|
props: {
|
|
1985
2050
|
field: {},
|
|
@@ -1998,29 +2063,29 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
1998
2063
|
required: e.field.required,
|
|
1999
2064
|
"read-only": e.readOnly
|
|
2000
2065
|
}, {
|
|
2001
|
-
default:
|
|
2066
|
+
default: G(() => [e.readOnly ? (z(), j("input", {
|
|
2002
2067
|
key: 0,
|
|
2003
2068
|
type: "url",
|
|
2004
|
-
class: L([
|
|
2069
|
+
class: L([W(C), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2005
2070
|
value: e.modelValue,
|
|
2006
2071
|
placeholder: e.field.placeholder || "https://...",
|
|
2007
2072
|
disabled: "",
|
|
2008
|
-
title:
|
|
2009
|
-
}, null, 10,
|
|
2073
|
+
title: W(r).customBlocks.dataSource.readOnlyTooltip
|
|
2074
|
+
}, null, 10, la)) : (z(), j("input", {
|
|
2010
2075
|
key: 1,
|
|
2011
2076
|
type: "url",
|
|
2012
|
-
class: L(
|
|
2077
|
+
class: L(W(C)),
|
|
2013
2078
|
value: e.modelValue,
|
|
2014
2079
|
placeholder: e.field.placeholder || "https://...",
|
|
2015
2080
|
onInput: i[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
2016
|
-
}, null, 42,
|
|
2081
|
+
}, null, 42, ua)), a.value && !e.readOnly ? (z(), j("button", {
|
|
2017
2082
|
key: 2,
|
|
2018
2083
|
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)]",
|
|
2019
2084
|
onClick: i[1] ||= (e) => o()
|
|
2020
|
-
}, [P(
|
|
2085
|
+
}, [P(W(h), {
|
|
2021
2086
|
size: 14,
|
|
2022
2087
|
"stroke-width": 1.5
|
|
2023
|
-
}), N(" " +
|
|
2088
|
+
}), N(" " + U(W(r).image.browseMedia), 1)])) : A("", !0)]),
|
|
2024
2089
|
_: 1
|
|
2025
2090
|
}, 8, [
|
|
2026
2091
|
"label",
|
|
@@ -2028,7 +2093,7 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2028
2093
|
"read-only"
|
|
2029
2094
|
]));
|
|
2030
2095
|
}
|
|
2031
|
-
}),
|
|
2096
|
+
}), fa = [
|
|
2032
2097
|
"value",
|
|
2033
2098
|
"placeholder",
|
|
2034
2099
|
"min",
|
|
@@ -2036,7 +2101,7 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2036
2101
|
"step",
|
|
2037
2102
|
"disabled",
|
|
2038
2103
|
"title"
|
|
2039
|
-
],
|
|
2104
|
+
], pa = /* @__PURE__ */ F({
|
|
2040
2105
|
__name: "NumberField",
|
|
2041
2106
|
props: {
|
|
2042
2107
|
field: {},
|
|
@@ -2051,18 +2116,18 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2051
2116
|
required: e.field.required,
|
|
2052
2117
|
"read-only": e.readOnly
|
|
2053
2118
|
}, {
|
|
2054
|
-
default:
|
|
2119
|
+
default: G(() => [M("input", {
|
|
2055
2120
|
type: "number",
|
|
2056
|
-
class: L([
|
|
2121
|
+
class: L([W(C), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2057
2122
|
value: e.modelValue,
|
|
2058
2123
|
placeholder: e.field.placeholder,
|
|
2059
2124
|
min: e.field.min,
|
|
2060
2125
|
max: e.field.max,
|
|
2061
2126
|
step: e.field.step,
|
|
2062
2127
|
disabled: e.readOnly,
|
|
2063
|
-
title: e.readOnly ?
|
|
2128
|
+
title: e.readOnly ? W(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
2064
2129
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
2065
|
-
}, null, 42,
|
|
2130
|
+
}, null, 42, fa)]),
|
|
2066
2131
|
_: 1
|
|
2067
2132
|
}, 8, [
|
|
2068
2133
|
"label",
|
|
@@ -2070,10 +2135,10 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2070
2135
|
"read-only"
|
|
2071
2136
|
]));
|
|
2072
2137
|
}
|
|
2073
|
-
}),
|
|
2138
|
+
}), ma = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ha = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, ga = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, _a = ["title", "onClick"], va = {
|
|
2074
2139
|
key: 1,
|
|
2075
2140
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2076
|
-
},
|
|
2141
|
+
}, ya = /* @__PURE__ */ F({
|
|
2077
2142
|
__name: "RepeatableField",
|
|
2078
2143
|
props: {
|
|
2079
2144
|
field: {},
|
|
@@ -2105,20 +2170,20 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2105
2170
|
required: e.field.required,
|
|
2106
2171
|
"read-only": e.readOnly
|
|
2107
2172
|
}, {
|
|
2108
|
-
default:
|
|
2173
|
+
default: G(() => [M("div", ma, [
|
|
2109
2174
|
(z(!0), j(D, null, V(a.value, (t, n) => (z(), j("div", {
|
|
2110
2175
|
key: `${e.field.key}-${n}`,
|
|
2111
2176
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
2112
|
-
}, [M("div",
|
|
2177
|
+
}, [M("div", ha, [M("span", ga, " #" + U(n + 1), 1), s.value && !e.readOnly ? (z(), j("button", {
|
|
2113
2178
|
key: 0,
|
|
2114
2179
|
type: "button",
|
|
2115
2180
|
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)]",
|
|
2116
|
-
title:
|
|
2181
|
+
title: W(i).customBlocks.fields.removeItem,
|
|
2117
2182
|
onClick: (e) => l(n)
|
|
2118
|
-
}, [P(
|
|
2183
|
+
}, [P(W(Ve), {
|
|
2119
2184
|
size: 12,
|
|
2120
2185
|
"stroke-width": 2
|
|
2121
|
-
})], 8,
|
|
2186
|
+
})], 8, _a)) : A("", !0)]), (z(!0), j(D, null, V(e.field.fields, (r) => (z(), k(H(W(Oa)(r.type)), {
|
|
2122
2187
|
key: r.key,
|
|
2123
2188
|
field: r,
|
|
2124
2189
|
"model-value": t[r.key],
|
|
@@ -2133,13 +2198,13 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2133
2198
|
o.value && !e.readOnly ? (z(), j("button", {
|
|
2134
2199
|
key: 0,
|
|
2135
2200
|
type: "button",
|
|
2136
|
-
class:
|
|
2201
|
+
class: L(W(Ne)),
|
|
2137
2202
|
onClick: c
|
|
2138
|
-
}, [P(
|
|
2203
|
+
}, [P(W(K), {
|
|
2139
2204
|
size: 14,
|
|
2140
2205
|
"stroke-width": 2
|
|
2141
|
-
}), N(" " +
|
|
2142
|
-
!o.value && !e.readOnly ? (z(), j("p",
|
|
2206
|
+
}), N(" " + U(W(i).customBlocks.fields.addItem), 1)], 2)) : A("", !0),
|
|
2207
|
+
!o.value && !e.readOnly ? (z(), j("p", va, U(W(i).customBlocks.fields.maxItemsReached), 1)) : A("", !0)
|
|
2143
2208
|
])]),
|
|
2144
2209
|
_: 1
|
|
2145
2210
|
}, 8, [
|
|
@@ -2148,11 +2213,11 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2148
2213
|
"read-only"
|
|
2149
2214
|
]));
|
|
2150
2215
|
}
|
|
2151
|
-
}),
|
|
2216
|
+
}), ba = [
|
|
2152
2217
|
"value",
|
|
2153
2218
|
"disabled",
|
|
2154
2219
|
"title"
|
|
2155
|
-
],
|
|
2220
|
+
], xa = ["value"], Sa = /* @__PURE__ */ F({
|
|
2156
2221
|
__name: "SelectField",
|
|
2157
2222
|
props: {
|
|
2158
2223
|
field: {},
|
|
@@ -2167,16 +2232,16 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2167
2232
|
required: e.field.required,
|
|
2168
2233
|
"read-only": e.readOnly
|
|
2169
2234
|
}, {
|
|
2170
|
-
default:
|
|
2171
|
-
class: L([
|
|
2235
|
+
default: G(() => [M("select", {
|
|
2236
|
+
class: L([W(C), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2172
2237
|
value: e.modelValue,
|
|
2173
2238
|
disabled: e.readOnly,
|
|
2174
|
-
title: e.readOnly ?
|
|
2239
|
+
title: e.readOnly ? W(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
2175
2240
|
onChange: i[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
|
|
2176
2241
|
}, [(z(!0), j(D, null, V(e.field.options, (e) => (z(), j("option", {
|
|
2177
2242
|
key: e.value,
|
|
2178
2243
|
value: e.value
|
|
2179
|
-
},
|
|
2244
|
+
}, U(e.label), 9, xa))), 128))], 42, ba)]),
|
|
2180
2245
|
_: 1
|
|
2181
2246
|
}, 8, [
|
|
2182
2247
|
"label",
|
|
@@ -2184,11 +2249,11 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2184
2249
|
"read-only"
|
|
2185
2250
|
]));
|
|
2186
2251
|
}
|
|
2187
|
-
}),
|
|
2252
|
+
}), Ca = [
|
|
2188
2253
|
"value",
|
|
2189
2254
|
"placeholder",
|
|
2190
2255
|
"title"
|
|
2191
|
-
],
|
|
2256
|
+
], wa = /* @__PURE__ */ F({
|
|
2192
2257
|
__name: "TextField",
|
|
2193
2258
|
props: {
|
|
2194
2259
|
field: {},
|
|
@@ -2203,15 +2268,15 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2203
2268
|
required: e.field.required,
|
|
2204
2269
|
"read-only": e.readOnly
|
|
2205
2270
|
}, {
|
|
2206
|
-
default:
|
|
2271
|
+
default: G(() => [e.readOnly ? (z(), j("input", {
|
|
2207
2272
|
key: 0,
|
|
2208
2273
|
type: "text",
|
|
2209
|
-
class: L([
|
|
2274
|
+
class: L([W(C), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2210
2275
|
value: e.modelValue,
|
|
2211
2276
|
placeholder: e.field.placeholder,
|
|
2212
2277
|
disabled: "",
|
|
2213
|
-
title:
|
|
2214
|
-
}, null, 10,
|
|
2278
|
+
title: W(r).customBlocks.dataSource.readOnlyTooltip
|
|
2279
|
+
}, null, 10, Ca)) : (z(), k(Y, {
|
|
2215
2280
|
key: 1,
|
|
2216
2281
|
"model-value": e.modelValue,
|
|
2217
2282
|
placeholder: e.field.placeholder,
|
|
@@ -2224,12 +2289,12 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2224
2289
|
"read-only"
|
|
2225
2290
|
]));
|
|
2226
2291
|
}
|
|
2227
|
-
}),
|
|
2292
|
+
}), Ta = [
|
|
2228
2293
|
"value",
|
|
2229
2294
|
"placeholder",
|
|
2230
2295
|
"title"
|
|
2231
|
-
],
|
|
2232
|
-
text:
|
|
2296
|
+
], Ea = "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", Da = {
|
|
2297
|
+
text: wa,
|
|
2233
2298
|
textarea: /* @__PURE__ */ F({
|
|
2234
2299
|
__name: "TextareaField",
|
|
2235
2300
|
props: {
|
|
@@ -2245,15 +2310,15 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2245
2310
|
required: e.field.required,
|
|
2246
2311
|
"read-only": e.readOnly
|
|
2247
2312
|
}, {
|
|
2248
|
-
default:
|
|
2313
|
+
default: G(() => [e.readOnly ? (z(), j("textarea", {
|
|
2249
2314
|
key: 0,
|
|
2250
2315
|
value: e.modelValue,
|
|
2251
2316
|
placeholder: e.field.placeholder,
|
|
2252
2317
|
rows: "3",
|
|
2253
2318
|
disabled: "",
|
|
2254
|
-
title:
|
|
2255
|
-
class: L(
|
|
2256
|
-
}, null, 8,
|
|
2319
|
+
title: W(r).customBlocks.dataSource.readOnlyTooltip,
|
|
2320
|
+
class: L(Ea)
|
|
2321
|
+
}, null, 8, Ta)) : (z(), k(Kn, {
|
|
2257
2322
|
key: 1,
|
|
2258
2323
|
"model-value": e.modelValue,
|
|
2259
2324
|
placeholder: e.field.placeholder,
|
|
@@ -2267,42 +2332,42 @@ var kn = { key: 0 }, An = ["aria-label"], jn = ["data-tooltip"], Mn = ["data-too
|
|
|
2267
2332
|
]));
|
|
2268
2333
|
}
|
|
2269
2334
|
}),
|
|
2270
|
-
image:
|
|
2271
|
-
color:
|
|
2272
|
-
number:
|
|
2273
|
-
select:
|
|
2274
|
-
boolean:
|
|
2275
|
-
repeatable:
|
|
2335
|
+
image: da,
|
|
2336
|
+
color: ca,
|
|
2337
|
+
number: pa,
|
|
2338
|
+
select: Sa,
|
|
2339
|
+
boolean: aa,
|
|
2340
|
+
repeatable: ya
|
|
2276
2341
|
};
|
|
2277
|
-
function
|
|
2278
|
-
return
|
|
2342
|
+
function Oa(e) {
|
|
2343
|
+
return Da[e] ?? wa;
|
|
2279
2344
|
}
|
|
2280
2345
|
//#endregion
|
|
2281
2346
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2282
|
-
var
|
|
2347
|
+
var ka = {
|
|
2283
2348
|
key: 0,
|
|
2284
2349
|
class: "tpl:p-4"
|
|
2285
|
-
},
|
|
2350
|
+
}, Aa = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ja = { key: 1 }, Ma = {
|
|
2286
2351
|
key: 0,
|
|
2287
2352
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2288
|
-
},
|
|
2353
|
+
}, Na = {
|
|
2289
2354
|
key: 1,
|
|
2290
2355
|
class: "tpl:mb-4"
|
|
2291
|
-
},
|
|
2356
|
+
}, Pa = {
|
|
2292
2357
|
key: 1,
|
|
2293
2358
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
2294
|
-
},
|
|
2359
|
+
}, Fa = {
|
|
2295
2360
|
key: 0,
|
|
2296
2361
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
2297
|
-
},
|
|
2362
|
+
}, Ia = {
|
|
2298
2363
|
key: 2,
|
|
2299
2364
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
2300
|
-
},
|
|
2365
|
+
}, La = /* @__PURE__ */ F({
|
|
2301
2366
|
__name: "CustomBlockToolbar",
|
|
2302
2367
|
props: { block: {} },
|
|
2303
2368
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
2304
2369
|
setup(e, { emit: t }) {
|
|
2305
|
-
let n = e, r = t, { t: i } = y(), a = I(v, []), o = O(() => a.find((e) => e.type === n.block.customType)), { isFetching: s, fetchError: c, fetch: l, hasDataSource: u, needsFetch: d } =
|
|
2370
|
+
let n = e, r = t, { t: i } = y(), a = I(v, []), o = O(() => a.find((e) => e.type === n.block.customType)), { isFetching: s, fetchError: c, fetch: l, hasDataSource: u, needsFetch: d } = tt({
|
|
2306
2371
|
definition: o,
|
|
2307
2372
|
block: O(() => n.block),
|
|
2308
2373
|
onUpdate: (e, t) => {
|
|
@@ -2318,23 +2383,23 @@ var fo = {
|
|
|
2318
2383
|
[e]: t
|
|
2319
2384
|
});
|
|
2320
2385
|
}
|
|
2321
|
-
return (t, n) => o.value ? (z(), j("div",
|
|
2322
|
-
o.value.description ? (z(), j("p",
|
|
2323
|
-
|
|
2386
|
+
return (t, n) => o.value ? (z(), j("div", ja, [
|
|
2387
|
+
o.value.description ? (z(), j("p", Ma, U(o.value.description), 1)) : A("", !0),
|
|
2388
|
+
W(u) ? (z(), j("div", Na, [W(d) && !W(s) ? (z(), j("button", {
|
|
2324
2389
|
key: 0,
|
|
2325
2390
|
type: "button",
|
|
2326
2391
|
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)]",
|
|
2327
|
-
onClick: n[0] ||= (...e) =>
|
|
2328
|
-
},
|
|
2392
|
+
onClick: n[0] ||= (...e) => W(l) && W(l)(...e)
|
|
2393
|
+
}, U(o.value?.dataSource?.label || W(i).customBlocks.dataSource.fetchButton), 1)) : (z(), j("div", Pa, [W(s) ? (z(), j("div", Fa, U(W(i).customBlocks.dataSource.fetching), 1)) : (z(), j("button", {
|
|
2329
2394
|
key: 1,
|
|
2330
2395
|
type: "button",
|
|
2331
2396
|
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)]",
|
|
2332
|
-
onClick: n[1] ||= (...e) =>
|
|
2333
|
-
}, [P(
|
|
2397
|
+
onClick: n[1] ||= (...e) => W(l) && W(l)(...e)
|
|
2398
|
+
}, [P(W(De), { size: 12 }), N(" " + U(W(i).customBlocks.dataSource.changeButton), 1)]))])), W(c) ? (z(), j("p", Ia, [P(W(Se), {
|
|
2334
2399
|
size: 14,
|
|
2335
2400
|
class: "tpl:shrink-0"
|
|
2336
|
-
}), N(" " +
|
|
2337
|
-
(z(!0), j(D, null, V(o.value.fields, (t) => (z(), k(
|
|
2401
|
+
}), N(" " + U(W(i).customBlocks.dataSource.fetchError), 1)])) : A("", !0)])) : A("", !0),
|
|
2402
|
+
(z(!0), j(D, null, V(o.value.fields, (t) => (z(), k(H(W(Oa)(t.type)), {
|
|
2338
2403
|
key: t.key,
|
|
2339
2404
|
field: t,
|
|
2340
2405
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -2346,9 +2411,9 @@ var fo = {
|
|
|
2346
2411
|
"read-only",
|
|
2347
2412
|
"onUpdate:modelValue"
|
|
2348
2413
|
]))), 128))
|
|
2349
|
-
])) : (z(), j("div",
|
|
2414
|
+
])) : (z(), j("div", ka, [M("p", Aa, U(W(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
2350
2415
|
}
|
|
2351
|
-
}),
|
|
2416
|
+
}), Ra = { class: "tpl:mb-3.5" }, za = { class: "tpl:mb-3.5" }, Ba = { class: "tpl:mb-3.5" }, Va = { class: "tpl:flex tpl:items-stretch" }, Ha = ["value"], Ua = /* @__PURE__ */ F({
|
|
2352
2417
|
__name: "DividerToolbar",
|
|
2353
2418
|
props: { block: {} },
|
|
2354
2419
|
emits: ["update"],
|
|
@@ -2358,71 +2423,71 @@ var fo = {
|
|
|
2358
2423
|
n("update", { [e]: t });
|
|
2359
2424
|
}
|
|
2360
2425
|
return (t, n) => (z(), j(D, null, [
|
|
2361
|
-
M("div",
|
|
2426
|
+
M("div", Ra, [M("label", { class: L(W(w)) }, U(W(r).divider.style), 3), P(Z, {
|
|
2362
2427
|
options: [
|
|
2363
2428
|
{
|
|
2364
2429
|
value: "solid",
|
|
2365
|
-
label:
|
|
2430
|
+
label: W(r).divider.solid
|
|
2366
2431
|
},
|
|
2367
2432
|
{
|
|
2368
2433
|
value: "dashed",
|
|
2369
|
-
label:
|
|
2434
|
+
label: W(r).divider.dashed
|
|
2370
2435
|
},
|
|
2371
2436
|
{
|
|
2372
2437
|
value: "dotted",
|
|
2373
|
-
label:
|
|
2438
|
+
label: W(r).divider.dotted
|
|
2374
2439
|
}
|
|
2375
2440
|
],
|
|
2376
2441
|
"model-value": e.block.lineStyle,
|
|
2377
2442
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
2378
2443
|
}, null, 8, ["options", "model-value"])]),
|
|
2379
|
-
M("div",
|
|
2444
|
+
M("div", za, [M("label", { class: L(W(w)) }, U(W(r).divider.color), 3), P(J, {
|
|
2380
2445
|
"model-value": e.block.color,
|
|
2381
2446
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
2382
2447
|
}, null, 8, ["model-value"])]),
|
|
2383
|
-
M("div",
|
|
2448
|
+
M("div", Ba, [M("label", { class: L(W(w)) }, U(W(r).divider.thickness), 3), M("div", Va, [M("input", {
|
|
2384
2449
|
type: "number",
|
|
2385
|
-
class: L(
|
|
2450
|
+
class: L(W(E)),
|
|
2386
2451
|
value: e.block.thickness,
|
|
2387
2452
|
min: "1",
|
|
2388
2453
|
max: "10",
|
|
2389
2454
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
2390
|
-
}, null, 42,
|
|
2455
|
+
}, null, 42, Ha), M("span", { class: L(W(T)) }, "px", 2)])])
|
|
2391
2456
|
], 64));
|
|
2392
2457
|
}
|
|
2393
|
-
}),
|
|
2458
|
+
}), Wa = { class: "tpl:mb-3.5" }, Ga = ["value"], Ka = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, qa = /* @__PURE__ */ F({
|
|
2394
2459
|
__name: "HtmlToolbar",
|
|
2395
2460
|
props: { block: {} },
|
|
2396
2461
|
emits: ["update"],
|
|
2397
2462
|
setup(e, { emit: t }) {
|
|
2398
2463
|
let n = t, { t: r } = y();
|
|
2399
|
-
return (t, i) => (z(), j("div",
|
|
2400
|
-
M("label", { class: L(
|
|
2464
|
+
return (t, i) => (z(), j("div", Wa, [
|
|
2465
|
+
M("label", { class: L(W(w)) }, U(W(r).html.content), 3),
|
|
2401
2466
|
M("textarea", {
|
|
2402
2467
|
value: e.block.content,
|
|
2403
2468
|
placeholder: "<div>...</div>",
|
|
2404
2469
|
rows: "10",
|
|
2405
|
-
class:
|
|
2470
|
+
class: L(W(Pe)),
|
|
2406
2471
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2407
|
-
}, null,
|
|
2408
|
-
M("p",
|
|
2472
|
+
}, null, 42, Ga),
|
|
2473
|
+
M("p", Ka, [P(W(Te), {
|
|
2409
2474
|
size: 12,
|
|
2410
2475
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2411
|
-
}), N(" " +
|
|
2476
|
+
}), N(" " + U(W(r).html.sanitizationHint), 1)])
|
|
2412
2477
|
]));
|
|
2413
2478
|
}
|
|
2414
|
-
}),
|
|
2479
|
+
}), Ja = { class: "tpl:mb-3.5" }, Ya = {
|
|
2415
2480
|
key: 0,
|
|
2416
2481
|
class: "tpl:mb-3.5"
|
|
2417
|
-
},
|
|
2482
|
+
}, Xa = ["value", "placeholder"], Za = { class: "tpl:mb-3.5" }, Qa = { class: "tpl:mb-3.5" }, $a = ["value"], eo = { value: "full" }, to = { class: "tpl:mb-3.5" }, no = { class: "tpl:mb-3.5" }, ro = {
|
|
2418
2483
|
key: 0,
|
|
2419
2484
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2420
|
-
},
|
|
2485
|
+
}, io = ["checked"], ao = /* @__PURE__ */ F({
|
|
2421
2486
|
__name: "ImageToolbar",
|
|
2422
2487
|
props: { block: {} },
|
|
2423
2488
|
emits: ["update"],
|
|
2424
2489
|
setup(e, { emit: t }) {
|
|
2425
|
-
let n = t, { t: r } = y(), i = I(be, null), a = I(de,
|
|
2490
|
+
let n = t, { t: r } = y(), i = I(be, null), a = I(de, nt.liquid), o = O(() => !!i), s = B(!1), c = B(!1), { start: l } = ce(() => {
|
|
2426
2491
|
s.value = !1;
|
|
2427
2492
|
}, 1e3, { immediate: !1 });
|
|
2428
2493
|
function u(e, t) {
|
|
@@ -2433,12 +2498,12 @@ var fo = {
|
|
|
2433
2498
|
e && (u("src", e.url), e.alt && (u("alt", e.alt), c.value = !0), s.value = !0, l());
|
|
2434
2499
|
}
|
|
2435
2500
|
return (t, n) => (z(), j(D, null, [
|
|
2436
|
-
M("div",
|
|
2437
|
-
M("label", { class: L(
|
|
2438
|
-
P(
|
|
2501
|
+
M("div", Ja, [
|
|
2502
|
+
M("label", { class: L(W(w)) }, U(W(r).image.imageUrl), 3),
|
|
2503
|
+
P(Y, {
|
|
2439
2504
|
"model-value": e.block.src,
|
|
2440
2505
|
type: "url",
|
|
2441
|
-
placeholder:
|
|
2506
|
+
placeholder: W(r).image.imageUrlPlaceholder,
|
|
2442
2507
|
pulse: s.value,
|
|
2443
2508
|
"onUpdate:modelValue": n[0] ||= (e) => u("src", e)
|
|
2444
2509
|
}, null, 8, [
|
|
@@ -2455,22 +2520,22 @@ var fo = {
|
|
|
2455
2520
|
"background-color": "var(--tpl-bg)"
|
|
2456
2521
|
},
|
|
2457
2522
|
onClick: d
|
|
2458
|
-
}, [P(
|
|
2523
|
+
}, [P(W(h), {
|
|
2459
2524
|
size: 14,
|
|
2460
2525
|
"stroke-width": 1.5
|
|
2461
|
-
}), N(" " +
|
|
2526
|
+
}), N(" " + U(W(r).image.browseMedia), 1)])) : A("", !0)
|
|
2462
2527
|
]),
|
|
2463
|
-
|
|
2528
|
+
W(rt)(e.block.src, W(a)) ? (z(), j("div", Ya, [M("label", { class: L(W(w)) }, [N(U(W(r).image.placeholderUrl) + " ", 1), n[7] ||= M("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, U("(optional)"), -1)], 2), M("input", {
|
|
2464
2529
|
type: "url",
|
|
2465
|
-
class: L(
|
|
2530
|
+
class: L(W(C)),
|
|
2466
2531
|
value: e.block.placeholderUrl || "",
|
|
2467
|
-
placeholder:
|
|
2532
|
+
placeholder: W(r).image.placeholderUrlPlaceholder,
|
|
2468
2533
|
onInput: n[1] ||= (e) => u("placeholderUrl", e.target.value)
|
|
2469
|
-
}, null, 42,
|
|
2470
|
-
M("div",
|
|
2534
|
+
}, null, 42, Xa)])) : A("", !0),
|
|
2535
|
+
M("div", Za, [M("label", { class: L(W(w)) }, U(W(r).image.altText), 3), P(Y, {
|
|
2471
2536
|
"model-value": e.block.alt,
|
|
2472
2537
|
type: "text",
|
|
2473
|
-
placeholder:
|
|
2538
|
+
placeholder: W(r).image.altTextPlaceholder,
|
|
2474
2539
|
pulse: c.value,
|
|
2475
2540
|
"onUpdate:modelValue": n[2] ||= (e) => u("alt", e)
|
|
2476
2541
|
}, null, 8, [
|
|
@@ -2478,56 +2543,56 @@ var fo = {
|
|
|
2478
2543
|
"placeholder",
|
|
2479
2544
|
"pulse"
|
|
2480
2545
|
])]),
|
|
2481
|
-
M("div",
|
|
2482
|
-
class: L(
|
|
2546
|
+
M("div", Qa, [M("label", { class: L(W(w)) }, U(W(r).image.width), 3), M("select", {
|
|
2547
|
+
class: L(W(C)),
|
|
2483
2548
|
value: e.block.width,
|
|
2484
2549
|
onChange: n[3] ||= (e) => u("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2485
2550
|
}, [
|
|
2486
|
-
M("option",
|
|
2551
|
+
M("option", eo, U(W(r).image.fullWidth), 1),
|
|
2487
2552
|
n[8] ||= M("option", { value: "300" }, "300px", -1),
|
|
2488
2553
|
n[9] ||= M("option", { value: "400" }, "400px", -1),
|
|
2489
2554
|
n[10] ||= M("option", { value: "500" }, "500px", -1)
|
|
2490
|
-
], 42,
|
|
2491
|
-
M("div",
|
|
2555
|
+
], 42, $a)]),
|
|
2556
|
+
M("div", to, [M("label", { class: L(W(w)) }, U(W(r).title.align), 3), P(Z, {
|
|
2492
2557
|
options: [
|
|
2493
2558
|
{
|
|
2494
2559
|
value: "left",
|
|
2495
|
-
label:
|
|
2560
|
+
label: W(r).title.alignLeft
|
|
2496
2561
|
},
|
|
2497
2562
|
{
|
|
2498
2563
|
value: "center",
|
|
2499
|
-
label:
|
|
2564
|
+
label: W(r).title.alignCenter
|
|
2500
2565
|
},
|
|
2501
2566
|
{
|
|
2502
2567
|
value: "right",
|
|
2503
|
-
label:
|
|
2568
|
+
label: W(r).title.alignRight
|
|
2504
2569
|
}
|
|
2505
2570
|
],
|
|
2506
2571
|
"model-value": e.block.align,
|
|
2507
2572
|
"onUpdate:modelValue": n[4] ||= (e) => u("align", e)
|
|
2508
2573
|
}, null, 8, ["options", "model-value"])]),
|
|
2509
|
-
M("div",
|
|
2510
|
-
M("label", { class: L(
|
|
2511
|
-
P(
|
|
2574
|
+
M("div", no, [
|
|
2575
|
+
M("label", { class: L(W(w)) }, U(W(r).image.linkUrl), 3),
|
|
2576
|
+
P(Y, {
|
|
2512
2577
|
"model-value": e.block.linkUrl || "",
|
|
2513
2578
|
type: "url",
|
|
2514
|
-
placeholder:
|
|
2579
|
+
placeholder: W(r).image.imageUrlPlaceholder,
|
|
2515
2580
|
"onUpdate:modelValue": n[5] ||= (e) => u("linkUrl", e)
|
|
2516
2581
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2517
|
-
e.block.linkUrl ? (z(), j("label",
|
|
2582
|
+
e.block.linkUrl ? (z(), j("label", ro, [M("input", {
|
|
2518
2583
|
type: "checkbox",
|
|
2519
2584
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2520
2585
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
2521
2586
|
onChange: n[6] ||= (e) => u("linkOpenInNewTab", e.target.checked)
|
|
2522
|
-
}, null, 40,
|
|
2587
|
+
}, null, 40, io), N(" " + U(W(r).image.openInNewTab), 1)])) : A("", !0)
|
|
2523
2588
|
])
|
|
2524
2589
|
], 64));
|
|
2525
2590
|
}
|
|
2526
|
-
}),
|
|
2591
|
+
}), oo = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, so = { class: "tpl:flex tpl:items-center tpl:gap-2" }, co = [
|
|
2527
2592
|
"value",
|
|
2528
2593
|
"placeholder",
|
|
2529
2594
|
"onInput"
|
|
2530
|
-
],
|
|
2595
|
+
], lo = ["title", "onClick"], uo = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, fo = ["checked", "onChange"], po = { class: "tpl:flex tpl:items-center tpl:gap-2" }, mo = ["value"], ho = { value: "" }, go = ["value"], _o = ["value"], vo = /* @__PURE__ */ F({
|
|
2531
2596
|
__name: "MenuToolbar",
|
|
2532
2597
|
props: {
|
|
2533
2598
|
block: {},
|
|
@@ -2535,13 +2600,42 @@ var fo = {
|
|
|
2535
2600
|
},
|
|
2536
2601
|
emits: ["update"],
|
|
2537
2602
|
setup(e, { emit: t }) {
|
|
2538
|
-
let n = e, r = t, { t: i } = y()
|
|
2539
|
-
|
|
2603
|
+
let n = e, r = t, { t: i } = y(), a = O(() => [
|
|
2604
|
+
{
|
|
2605
|
+
key: "openInNewTab",
|
|
2606
|
+
label: i.menu.openInNewTab
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
key: "bold",
|
|
2610
|
+
label: i.menu.bold
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
key: "underline",
|
|
2614
|
+
label: i.menu.underline
|
|
2615
|
+
}
|
|
2616
|
+
]), o = O(() => [
|
|
2617
|
+
{
|
|
2618
|
+
value: "left",
|
|
2619
|
+
label: i.title.alignLeft,
|
|
2620
|
+
icon: ze
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
value: "center",
|
|
2624
|
+
label: i.title.alignCenter,
|
|
2625
|
+
icon: Me
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
value: "right",
|
|
2629
|
+
label: i.title.alignRight,
|
|
2630
|
+
icon: Be
|
|
2631
|
+
}
|
|
2632
|
+
]);
|
|
2633
|
+
function s(e, t) {
|
|
2540
2634
|
r("update", { [e]: t });
|
|
2541
2635
|
}
|
|
2542
|
-
function
|
|
2636
|
+
function c() {
|
|
2543
2637
|
let e = {
|
|
2544
|
-
id:
|
|
2638
|
+
id: ot(),
|
|
2545
2639
|
text: "",
|
|
2546
2640
|
url: "",
|
|
2547
2641
|
openInNewTab: !1,
|
|
@@ -2550,142 +2644,140 @@ var fo = {
|
|
|
2550
2644
|
};
|
|
2551
2645
|
r("update", { items: [...n.block.items, e] });
|
|
2552
2646
|
}
|
|
2553
|
-
function
|
|
2647
|
+
function l(e, t, i) {
|
|
2554
2648
|
r("update", { items: n.block.items.map((n) => n.id === e ? {
|
|
2555
2649
|
...n,
|
|
2556
2650
|
[t]: i
|
|
2557
2651
|
} : n) });
|
|
2558
2652
|
}
|
|
2559
|
-
function
|
|
2653
|
+
function u(e) {
|
|
2560
2654
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
2561
2655
|
}
|
|
2562
2656
|
return (t, n) => (z(), j(D, null, [
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
M("
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
onChange: (e) => s(t.id, "openInNewTab", e.target.checked)
|
|
2597
|
-
}, null, 40, Xo), N(" " + H(U(i).menu.openInNewTab), 1)]),
|
|
2598
|
-
M("label", Zo, [M("input", {
|
|
2599
|
-
type: "checkbox",
|
|
2600
|
-
checked: t.bold,
|
|
2601
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2602
|
-
onChange: (e) => s(t.id, "bold", e.target.checked)
|
|
2603
|
-
}, null, 40, Qo), N(" " + H(U(i).menu.bold), 1)]),
|
|
2604
|
-
M("label", $o, [M("input", {
|
|
2657
|
+
P(Q, { label: W(i).menu.items }, {
|
|
2658
|
+
default: G(() => [M("div", oo, [(z(!0), j(D, null, V(e.block.items, (t) => (z(), j("div", {
|
|
2659
|
+
key: t.id,
|
|
2660
|
+
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"
|
|
2661
|
+
}, [
|
|
2662
|
+
M("div", so, [M("input", {
|
|
2663
|
+
type: "text",
|
|
2664
|
+
class: L([W(C), "tpl:flex-1"]),
|
|
2665
|
+
value: t.text,
|
|
2666
|
+
placeholder: W(i).menu.text,
|
|
2667
|
+
onInput: (e) => l(t.id, "text", e.target.value)
|
|
2668
|
+
}, null, 42, co), M("button", {
|
|
2669
|
+
class: L(W(je)),
|
|
2670
|
+
title: W(i).menu.removeItem,
|
|
2671
|
+
onClick: (e) => u(t.id)
|
|
2672
|
+
}, [P(W(He), {
|
|
2673
|
+
size: 14,
|
|
2674
|
+
"stroke-width": 2
|
|
2675
|
+
})], 10, lo)]),
|
|
2676
|
+
P(Y, {
|
|
2677
|
+
"model-value": t.url,
|
|
2678
|
+
type: "url",
|
|
2679
|
+
placeholder: W(i).menu.urlPlaceholder,
|
|
2680
|
+
"onUpdate:modelValue": (e) => l(t.id, "url", e)
|
|
2681
|
+
}, null, 8, [
|
|
2682
|
+
"model-value",
|
|
2683
|
+
"placeholder",
|
|
2684
|
+
"onUpdate:modelValue"
|
|
2685
|
+
]),
|
|
2686
|
+
M("div", uo, [(z(!0), j(D, null, V(a.value, (e) => (z(), j("label", {
|
|
2687
|
+
key: e.key,
|
|
2688
|
+
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2689
|
+
}, [M("input", {
|
|
2605
2690
|
type: "checkbox",
|
|
2606
|
-
checked: t.
|
|
2691
|
+
checked: t[e.key],
|
|
2607
2692
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2608
|
-
onChange: (
|
|
2609
|
-
}, null, 40,
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
"
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
],
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2693
|
+
onChange: (n) => l(t.id, e.key, n.target.checked)
|
|
2694
|
+
}, null, 40, fo), N(" " + U(e.label), 1)]))), 128))]),
|
|
2695
|
+
M("div", po, [M("label", { class: L([W(w), "tpl:!mb-0"]) }, U(W(i).menu.color), 3), P(J, {
|
|
2696
|
+
"swatch-only": "",
|
|
2697
|
+
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
2698
|
+
"onUpdate:modelValue": (e) => l(t.id, "color", e)
|
|
2699
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2700
|
+
]))), 128)), M("button", {
|
|
2701
|
+
class: L(W(Ne)),
|
|
2702
|
+
onClick: c
|
|
2703
|
+
}, [P(W(K), {
|
|
2704
|
+
size: 14,
|
|
2705
|
+
"stroke-width": 2
|
|
2706
|
+
}), N(" " + U(W(i).menu.addItem), 1)], 2)])]),
|
|
2707
|
+
_: 1
|
|
2708
|
+
}, 8, ["label"]),
|
|
2709
|
+
P(Q, { label: W(i).menu.fontFamily }, {
|
|
2710
|
+
default: G(() => [M("select", {
|
|
2711
|
+
class: L(W(C)),
|
|
2712
|
+
value: e.block.fontFamily || "",
|
|
2713
|
+
onChange: n[0] ||= (e) => s("fontFamily", e.target.value || void 0)
|
|
2714
|
+
}, [M("option", ho, U(W(i).title.inheritFont), 1), (z(!0), j(D, null, V(e.fontFamilies, (e) => (z(), j("option", {
|
|
2715
|
+
key: e.value,
|
|
2716
|
+
value: e.value
|
|
2717
|
+
}, U(e.label), 9, go))), 128))], 42, mo)]),
|
|
2718
|
+
_: 1
|
|
2719
|
+
}, 8, ["label"]),
|
|
2720
|
+
P(Q, { label: W(i).menu.fontSize }, {
|
|
2721
|
+
default: G(() => [P(Bi, {
|
|
2722
|
+
"model-value": e.block.fontSize,
|
|
2723
|
+
min: 8,
|
|
2724
|
+
max: 48,
|
|
2725
|
+
suffix: "px",
|
|
2726
|
+
"onUpdate:modelValue": n[1] ||= (e) => s("fontSize", e)
|
|
2727
|
+
}, null, 8, ["model-value"])]),
|
|
2728
|
+
_: 1
|
|
2729
|
+
}, 8, ["label"]),
|
|
2730
|
+
P(Q, { label: W(i).menu.color }, {
|
|
2731
|
+
default: G(() => [P(J, {
|
|
2732
|
+
"model-value": e.block.color,
|
|
2733
|
+
"onUpdate:modelValue": n[2] ||= (e) => s("color", e)
|
|
2734
|
+
}, null, 8, ["model-value"])]),
|
|
2735
|
+
_: 1
|
|
2736
|
+
}, 8, ["label"]),
|
|
2737
|
+
P(Q, { label: W(i).menu.linkColor }, {
|
|
2738
|
+
default: G(() => [P(J, {
|
|
2739
|
+
"model-value": e.block.linkColor || e.block.color,
|
|
2740
|
+
"onUpdate:modelValue": n[3] ||= (e) => s("linkColor", e || void 0)
|
|
2741
|
+
}, null, 8, ["model-value"])]),
|
|
2742
|
+
_: 1
|
|
2743
|
+
}, 8, ["label"]),
|
|
2744
|
+
P(Q, { label: W(i).menu.textAlign }, {
|
|
2745
|
+
default: G(() => [P(Z, {
|
|
2746
|
+
options: o.value,
|
|
2747
|
+
"model-value": e.block.textAlign,
|
|
2748
|
+
"onUpdate:modelValue": n[4] ||= (e) => s("textAlign", e)
|
|
2749
|
+
}, null, 8, ["options", "model-value"])]),
|
|
2750
|
+
_: 1
|
|
2751
|
+
}, 8, ["label"]),
|
|
2752
|
+
P(Q, { label: W(i).menu.separator }, {
|
|
2753
|
+
default: G(() => [M("input", {
|
|
2754
|
+
type: "text",
|
|
2755
|
+
class: L(W(C)),
|
|
2756
|
+
value: e.block.separator,
|
|
2757
|
+
onInput: n[5] ||= (e) => s("separator", e.target.value)
|
|
2758
|
+
}, null, 42, _o)]),
|
|
2759
|
+
_: 1
|
|
2760
|
+
}, 8, ["label"]),
|
|
2761
|
+
P(Q, { label: W(i).menu.separatorColor }, {
|
|
2762
|
+
default: G(() => [P(J, {
|
|
2763
|
+
"model-value": e.block.separatorColor,
|
|
2764
|
+
"onUpdate:modelValue": n[6] ||= (e) => s("separatorColor", e)
|
|
2765
|
+
}, null, 8, ["model-value"])]),
|
|
2766
|
+
_: 1
|
|
2767
|
+
}, 8, ["label"]),
|
|
2768
|
+
P(Q, { label: W(i).menu.spacing }, {
|
|
2769
|
+
default: G(() => [P(Bi, {
|
|
2770
|
+
"model-value": e.block.spacing,
|
|
2771
|
+
min: 0,
|
|
2772
|
+
max: 50,
|
|
2773
|
+
suffix: "px",
|
|
2774
|
+
"onUpdate:modelValue": n[7] ||= (e) => s("spacing", e)
|
|
2775
|
+
}, null, 8, ["model-value"])]),
|
|
2776
|
+
_: 1
|
|
2777
|
+
}, 8, ["label"])
|
|
2686
2778
|
], 64));
|
|
2687
2779
|
}
|
|
2688
|
-
}),
|
|
2780
|
+
}), yo = { class: "tpl:mb-3.5" }, bo = ["value"], xo = ["value"], So = /* @__PURE__ */ F({
|
|
2689
2781
|
__name: "SectionToolbar",
|
|
2690
2782
|
props: { block: {} },
|
|
2691
2783
|
emits: ["update"],
|
|
@@ -2712,16 +2804,16 @@ var fo = {
|
|
|
2712
2804
|
label: r.section.ratio21
|
|
2713
2805
|
}
|
|
2714
2806
|
]);
|
|
2715
|
-
return (t, a) => (z(), j("div",
|
|
2716
|
-
class: L(
|
|
2807
|
+
return (t, a) => (z(), j("div", yo, [M("label", { class: L(W(w)) }, U(W(r).section.columns), 3), M("select", {
|
|
2808
|
+
class: L(W(C)),
|
|
2717
2809
|
value: e.block.columns,
|
|
2718
2810
|
onChange: a[0] ||= (e) => n("update", { columns: e.target.value })
|
|
2719
2811
|
}, [(z(!0), j(D, null, V(i.value, (e) => (z(), j("option", {
|
|
2720
2812
|
key: e.value,
|
|
2721
2813
|
value: e.value
|
|
2722
|
-
},
|
|
2814
|
+
}, U(e.label), 9, xo))), 128))], 42, bo)]));
|
|
2723
2815
|
}
|
|
2724
|
-
}),
|
|
2816
|
+
}), Co = { class: "tpl:mb-3.5" }, wo = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, To = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Eo = ["value", "onChange"], Do = ["value"], Oo = ["title", "onClick"], ko = { class: "tpl:mb-3.5" }, Ao = { class: "tpl:mb-3.5" }, jo = { class: "tpl:mb-3.5" }, Mo = { class: "tpl:flex tpl:items-stretch" }, No = ["value"], Po = { class: "tpl:mb-3.5" }, Fo = /* @__PURE__ */ F({
|
|
2725
2817
|
__name: "SocialToolbar",
|
|
2726
2818
|
props: { block: {} },
|
|
2727
2819
|
emits: ["update"],
|
|
@@ -2732,7 +2824,7 @@ var fo = {
|
|
|
2732
2824
|
}
|
|
2733
2825
|
function o() {
|
|
2734
2826
|
let e = {
|
|
2735
|
-
id:
|
|
2827
|
+
id: ot(),
|
|
2736
2828
|
platform: "facebook",
|
|
2737
2829
|
url: ""
|
|
2738
2830
|
};
|
|
@@ -2748,107 +2840,107 @@ var fo = {
|
|
|
2748
2840
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2749
2841
|
}
|
|
2750
2842
|
return (t, n) => (z(), j(D, null, [
|
|
2751
|
-
M("div",
|
|
2843
|
+
M("div", Co, [M("label", { class: L(W(w)) }, U(W(i).social.icons), 3), M("div", wo, [(z(!0), j(D, null, V(e.block.icons, (e) => (z(), j("div", {
|
|
2752
2844
|
key: e.id,
|
|
2753
2845
|
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"
|
|
2754
|
-
}, [M("div",
|
|
2755
|
-
class: L([
|
|
2846
|
+
}, [M("div", To, [M("select", {
|
|
2847
|
+
class: L([W(C), "tpl:flex-1"]),
|
|
2756
2848
|
value: e.platform,
|
|
2757
2849
|
onChange: (t) => s(e.id, "platform", t.target.value)
|
|
2758
|
-
}, [(z(!0), j(D, null, V(
|
|
2850
|
+
}, [(z(!0), j(D, null, V(W(ie), (e) => (z(), j("option", {
|
|
2759
2851
|
key: e,
|
|
2760
2852
|
value: e
|
|
2761
|
-
},
|
|
2762
|
-
class:
|
|
2763
|
-
title:
|
|
2853
|
+
}, U(W(_)[e].name), 9, Do))), 128))], 42, Eo), M("button", {
|
|
2854
|
+
class: L(W(je)),
|
|
2855
|
+
title: W(i).social.removeIcon,
|
|
2764
2856
|
onClick: (t) => c(e.id)
|
|
2765
|
-
}, [P(
|
|
2857
|
+
}, [P(W(He), {
|
|
2766
2858
|
size: 14,
|
|
2767
2859
|
"stroke-width": 2
|
|
2768
|
-
})],
|
|
2860
|
+
})], 10, Oo)]), P(Y, {
|
|
2769
2861
|
"model-value": e.url,
|
|
2770
2862
|
type: "url",
|
|
2771
|
-
placeholder:
|
|
2863
|
+
placeholder: W(i).social.urlPlaceholder,
|
|
2772
2864
|
"onUpdate:modelValue": (t) => s(e.id, "url", t)
|
|
2773
2865
|
}, null, 8, [
|
|
2774
2866
|
"model-value",
|
|
2775
2867
|
"placeholder",
|
|
2776
2868
|
"onUpdate:modelValue"
|
|
2777
2869
|
])]))), 128)), M("button", {
|
|
2778
|
-
class:
|
|
2870
|
+
class: L(W(Ne)),
|
|
2779
2871
|
onClick: o
|
|
2780
|
-
}, [P(
|
|
2872
|
+
}, [P(W(K), {
|
|
2781
2873
|
size: 14,
|
|
2782
2874
|
"stroke-width": 2
|
|
2783
|
-
}), N(" " +
|
|
2784
|
-
M("div",
|
|
2875
|
+
}), N(" " + U(W(i).social.addIcon), 1)], 2)])]),
|
|
2876
|
+
M("div", ko, [M("label", { class: L(W(w)) }, U(W(i).social.style), 3), P(Z, {
|
|
2785
2877
|
options: [
|
|
2786
2878
|
{
|
|
2787
2879
|
value: "solid",
|
|
2788
|
-
label:
|
|
2880
|
+
label: W(i).social.styleSolid
|
|
2789
2881
|
},
|
|
2790
2882
|
{
|
|
2791
2883
|
value: "outlined",
|
|
2792
|
-
label:
|
|
2884
|
+
label: W(i).social.styleOutlined
|
|
2793
2885
|
},
|
|
2794
2886
|
{
|
|
2795
2887
|
value: "rounded",
|
|
2796
|
-
label:
|
|
2888
|
+
label: W(i).social.styleRounded
|
|
2797
2889
|
},
|
|
2798
2890
|
{
|
|
2799
2891
|
value: "square",
|
|
2800
|
-
label:
|
|
2892
|
+
label: W(i).social.styleSquare
|
|
2801
2893
|
},
|
|
2802
2894
|
{
|
|
2803
2895
|
value: "circle",
|
|
2804
|
-
label:
|
|
2896
|
+
label: W(i).social.styleCircle
|
|
2805
2897
|
}
|
|
2806
2898
|
],
|
|
2807
2899
|
"model-value": e.block.iconStyle,
|
|
2808
2900
|
"onUpdate:modelValue": n[0] ||= (e) => a("iconStyle", e)
|
|
2809
2901
|
}, null, 8, ["options", "model-value"])]),
|
|
2810
|
-
M("div",
|
|
2902
|
+
M("div", Ao, [M("label", { class: L(W(w)) }, U(W(i).social.size), 3), P(Z, {
|
|
2811
2903
|
options: [
|
|
2812
2904
|
{
|
|
2813
2905
|
value: "small",
|
|
2814
|
-
label:
|
|
2906
|
+
label: W(i).social.sizeSmall
|
|
2815
2907
|
},
|
|
2816
2908
|
{
|
|
2817
2909
|
value: "medium",
|
|
2818
|
-
label:
|
|
2910
|
+
label: W(i).social.sizeMedium
|
|
2819
2911
|
},
|
|
2820
2912
|
{
|
|
2821
2913
|
value: "large",
|
|
2822
|
-
label:
|
|
2914
|
+
label: W(i).social.sizeLarge
|
|
2823
2915
|
}
|
|
2824
2916
|
],
|
|
2825
2917
|
"model-value": e.block.iconSize,
|
|
2826
2918
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2827
2919
|
}, null, 8, ["options", "model-value"])]),
|
|
2828
|
-
M("div",
|
|
2920
|
+
M("div", jo, [M("label", { class: L(W(w)) }, U(W(i).social.spacing), 3), M("div", Mo, [M("input", {
|
|
2829
2921
|
type: "number",
|
|
2830
|
-
class: L(
|
|
2922
|
+
class: L(W(E)),
|
|
2831
2923
|
value: e.block.spacing,
|
|
2832
2924
|
min: "0",
|
|
2833
2925
|
max: "50",
|
|
2834
2926
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2835
|
-
}, null, 42,
|
|
2836
|
-
M("div",
|
|
2927
|
+
}, null, 42, No), M("span", { class: L(W(T)) }, "px", 2)])]),
|
|
2928
|
+
M("div", Po, [M("label", { class: L(W(w)) }, U(W(i).social.align), 3), P(Z, {
|
|
2837
2929
|
options: [
|
|
2838
2930
|
{
|
|
2839
2931
|
value: "left",
|
|
2840
|
-
label:
|
|
2841
|
-
icon:
|
|
2932
|
+
label: W(i).title.alignLeft,
|
|
2933
|
+
icon: W(ze)
|
|
2842
2934
|
},
|
|
2843
2935
|
{
|
|
2844
2936
|
value: "center",
|
|
2845
|
-
label:
|
|
2846
|
-
icon:
|
|
2937
|
+
label: W(i).title.alignCenter,
|
|
2938
|
+
icon: W(Me)
|
|
2847
2939
|
},
|
|
2848
2940
|
{
|
|
2849
2941
|
value: "right",
|
|
2850
|
-
label:
|
|
2851
|
-
icon:
|
|
2942
|
+
label: W(i).title.alignRight,
|
|
2943
|
+
icon: W(Be)
|
|
2852
2944
|
}
|
|
2853
2945
|
],
|
|
2854
2946
|
"model-value": e.block.align,
|
|
@@ -2856,22 +2948,22 @@ var fo = {
|
|
|
2856
2948
|
}, null, 8, ["options", "model-value"])])
|
|
2857
2949
|
], 64));
|
|
2858
2950
|
}
|
|
2859
|
-
}),
|
|
2951
|
+
}), Io = { class: "tpl:mb-3.5" }, Lo = { class: "tpl:flex tpl:items-stretch" }, Ro = ["value"], zo = ["value"], Bo = /* @__PURE__ */ F({
|
|
2860
2952
|
__name: "SpacerToolbar",
|
|
2861
2953
|
props: { block: {} },
|
|
2862
2954
|
emits: ["update"],
|
|
2863
2955
|
setup(e, { emit: t }) {
|
|
2864
2956
|
let n = t, { t: r } = y();
|
|
2865
|
-
return (t, i) => (z(), j("div",
|
|
2866
|
-
M("label", { class: L(
|
|
2867
|
-
M("div",
|
|
2957
|
+
return (t, i) => (z(), j("div", Io, [
|
|
2958
|
+
M("label", { class: L(W(w)) }, U(W(r).spacer.height), 3),
|
|
2959
|
+
M("div", Lo, [M("input", {
|
|
2868
2960
|
type: "number",
|
|
2869
|
-
class: L(
|
|
2961
|
+
class: L(W(E)),
|
|
2870
2962
|
value: e.block.height,
|
|
2871
2963
|
min: "10",
|
|
2872
2964
|
max: "100",
|
|
2873
2965
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2874
|
-
}, null, 42,
|
|
2966
|
+
}, null, 42, Ro), M("span", { class: L(W(T)) }, "px", 2)]),
|
|
2875
2967
|
M("input", {
|
|
2876
2968
|
type: "range",
|
|
2877
2969
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2879,13 +2971,13 @@ var fo = {
|
|
|
2879
2971
|
min: "10",
|
|
2880
2972
|
max: "100",
|
|
2881
2973
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2882
|
-
}, null, 40,
|
|
2974
|
+
}, null, 40, zo)
|
|
2883
2975
|
]));
|
|
2884
2976
|
}
|
|
2885
|
-
}),
|
|
2977
|
+
}), Vo = { class: "tpl:mb-3.5" }, Ho = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Uo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Wo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Go = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ko = ["disabled"], qo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Jo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Yo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Xo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Zo = ["disabled"], Qo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, $o = { class: "tpl:mb-3.5" }, es = { 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)]" }, ts = ["checked"], ns = {
|
|
2886
2978
|
key: 0,
|
|
2887
2979
|
class: "tpl:mb-3.5"
|
|
2888
|
-
},
|
|
2980
|
+
}, rs = { class: "tpl:mb-3.5" }, is = { class: "tpl:mb-3.5" }, as = { class: "tpl:flex tpl:items-stretch" }, os = ["value"], ss = { class: "tpl:mb-3.5" }, cs = { class: "tpl:flex tpl:items-stretch" }, ls = ["value"], us = { class: "tpl:mb-3.5" }, ds = ["value"], fs = { value: "" }, ps = ["value"], ms = { class: "tpl:mb-3.5" }, hs = { class: "tpl:flex tpl:items-stretch" }, gs = ["value"], _s = { class: "tpl:mb-3.5" }, vs = { class: "tpl:mb-3.5" }, ys = /* @__PURE__ */ F({
|
|
2889
2981
|
__name: "TableToolbar",
|
|
2890
2982
|
props: {
|
|
2891
2983
|
block: {},
|
|
@@ -2899,9 +2991,9 @@ var fo = {
|
|
|
2899
2991
|
}
|
|
2900
2992
|
function s() {
|
|
2901
2993
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2902
|
-
id:
|
|
2994
|
+
id: ot(),
|
|
2903
2995
|
cells: Array.from({ length: e }, () => ({
|
|
2904
|
-
id:
|
|
2996
|
+
id: ot(),
|
|
2905
2997
|
content: ""
|
|
2906
2998
|
}))
|
|
2907
2999
|
};
|
|
@@ -2914,7 +3006,7 @@ var fo = {
|
|
|
2914
3006
|
r("update", { rows: n.block.rows.map((e) => ({
|
|
2915
3007
|
...e,
|
|
2916
3008
|
cells: [...e.cells, {
|
|
2917
|
-
id:
|
|
3009
|
+
id: ot(),
|
|
2918
3010
|
content: ""
|
|
2919
3011
|
}]
|
|
2920
3012
|
})) });
|
|
@@ -2926,108 +3018,108 @@ var fo = {
|
|
|
2926
3018
|
})) });
|
|
2927
3019
|
}
|
|
2928
3020
|
return (t, n) => (z(), j(D, null, [
|
|
2929
|
-
M("div",
|
|
3021
|
+
M("div", Vo, [M("label", { class: L(W(w)) }, U(W(i).table.dimensions), 3), M("div", Ho, [M("div", Uo, [M("span", Wo, U(W(i).table.rows), 1), M("div", Go, [
|
|
2930
3022
|
M("button", {
|
|
2931
3023
|
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",
|
|
2932
3024
|
disabled: e.block.rows.length <= 1,
|
|
2933
3025
|
onClick: n[0] ||= (t) => c(e.block.rows[e.block.rows.length - 1].id)
|
|
2934
|
-
}, [P(
|
|
3026
|
+
}, [P(W(S), {
|
|
2935
3027
|
size: 12,
|
|
2936
3028
|
"stroke-width": 2
|
|
2937
|
-
})], 8,
|
|
2938
|
-
M("span",
|
|
3029
|
+
})], 8, Ko),
|
|
3030
|
+
M("span", qo, U(e.block.rows.length), 1),
|
|
2939
3031
|
M("button", {
|
|
2940
3032
|
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)]",
|
|
2941
3033
|
onClick: s
|
|
2942
|
-
}, [P(
|
|
3034
|
+
}, [P(W(K), {
|
|
2943
3035
|
size: 12,
|
|
2944
3036
|
"stroke-width": 2
|
|
2945
3037
|
})])
|
|
2946
|
-
])]), M("div",
|
|
3038
|
+
])]), M("div", Jo, [M("span", Yo, U(W(i).table.columns), 1), M("div", Xo, [
|
|
2947
3039
|
M("button", {
|
|
2948
3040
|
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",
|
|
2949
3041
|
disabled: a.value <= 1,
|
|
2950
3042
|
onClick: n[1] ||= (e) => u(a.value - 1)
|
|
2951
|
-
}, [P(
|
|
3043
|
+
}, [P(W(S), {
|
|
2952
3044
|
size: 12,
|
|
2953
3045
|
"stroke-width": 2
|
|
2954
|
-
})], 8,
|
|
2955
|
-
M("span",
|
|
3046
|
+
})], 8, Zo),
|
|
3047
|
+
M("span", Qo, U(a.value), 1),
|
|
2956
3048
|
M("button", {
|
|
2957
3049
|
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)]",
|
|
2958
3050
|
onClick: l
|
|
2959
|
-
}, [P(
|
|
3051
|
+
}, [P(W(K), {
|
|
2960
3052
|
size: 12,
|
|
2961
3053
|
"stroke-width": 2
|
|
2962
3054
|
})])
|
|
2963
3055
|
])])])]),
|
|
2964
|
-
M("div",
|
|
3056
|
+
M("div", $o, [M("label", es, [M("input", {
|
|
2965
3057
|
type: "checkbox",
|
|
2966
3058
|
checked: e.block.hasHeaderRow,
|
|
2967
3059
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2968
3060
|
onChange: n[2] ||= (e) => o("hasHeaderRow", e.target.checked)
|
|
2969
|
-
}, null, 40,
|
|
2970
|
-
e.block.hasHeaderRow ? (z(), j("div",
|
|
2971
|
-
"model-value": e.block.headerBackgroundColor ||
|
|
2972
|
-
placeholder:
|
|
3061
|
+
}, null, 40, ts), N(" " + U(W(i).table.hasHeaderRow), 1)])]),
|
|
3062
|
+
e.block.hasHeaderRow ? (z(), j("div", ns, [M("label", { class: L(W(w)) }, U(W(i).table.headerBackgroundColor), 3), P(J, {
|
|
3063
|
+
"model-value": e.block.headerBackgroundColor || W("#f2f2f2"),
|
|
3064
|
+
placeholder: W(i).table.noHeaderBg,
|
|
2973
3065
|
"onUpdate:modelValue": n[3] ||= (e) => o("headerBackgroundColor", e || null)
|
|
2974
3066
|
}, null, 8, ["model-value", "placeholder"])])) : A("", !0),
|
|
2975
|
-
M("div",
|
|
3067
|
+
M("div", rs, [M("label", { class: L(W(w)) }, U(W(i).table.borderColor), 3), P(J, {
|
|
2976
3068
|
"model-value": e.block.borderColor,
|
|
2977
3069
|
"onUpdate:modelValue": n[4] ||= (e) => o("borderColor", e)
|
|
2978
3070
|
}, null, 8, ["model-value"])]),
|
|
2979
|
-
M("div",
|
|
3071
|
+
M("div", is, [M("label", { class: L(W(w)) }, U(W(i).table.borderWidth), 3), M("div", as, [M("input", {
|
|
2980
3072
|
type: "number",
|
|
2981
|
-
class: L(
|
|
3073
|
+
class: L(W(E)),
|
|
2982
3074
|
value: e.block.borderWidth,
|
|
2983
3075
|
min: "0",
|
|
2984
3076
|
max: "10",
|
|
2985
3077
|
onInput: n[5] ||= (e) => o("borderWidth", Number(e.target.value))
|
|
2986
|
-
}, null, 42,
|
|
2987
|
-
M("div",
|
|
3078
|
+
}, null, 42, os), M("span", { class: L(W(T)) }, "px", 2)])]),
|
|
3079
|
+
M("div", ss, [M("label", { class: L(W(w)) }, U(W(i).table.cellPadding), 3), M("div", cs, [M("input", {
|
|
2988
3080
|
type: "number",
|
|
2989
|
-
class: L(
|
|
3081
|
+
class: L(W(E)),
|
|
2990
3082
|
value: e.block.cellPadding,
|
|
2991
3083
|
min: "0",
|
|
2992
3084
|
max: "30",
|
|
2993
3085
|
onInput: n[6] ||= (e) => o("cellPadding", Number(e.target.value))
|
|
2994
|
-
}, null, 42,
|
|
2995
|
-
M("div",
|
|
2996
|
-
class: L(
|
|
3086
|
+
}, null, 42, ls), M("span", { class: L(W(T)) }, "px", 2)])]),
|
|
3087
|
+
M("div", us, [M("label", { class: L(W(w)) }, U(W(i).table.fontFamily), 3), M("select", {
|
|
3088
|
+
class: L(W(C)),
|
|
2997
3089
|
value: e.block.fontFamily || "",
|
|
2998
3090
|
onChange: n[7] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
2999
|
-
}, [M("option",
|
|
3091
|
+
}, [M("option", fs, U(W(i).title.inheritFont), 1), (z(!0), j(D, null, V(e.fontFamilies, (e) => (z(), j("option", {
|
|
3000
3092
|
key: e.value,
|
|
3001
3093
|
value: e.value
|
|
3002
|
-
},
|
|
3003
|
-
M("div",
|
|
3094
|
+
}, U(e.label), 9, ps))), 128))], 42, ds)]),
|
|
3095
|
+
M("div", ms, [M("label", { class: L(W(w)) }, U(W(i).table.fontSize), 3), M("div", hs, [M("input", {
|
|
3004
3096
|
type: "number",
|
|
3005
|
-
class: L(
|
|
3097
|
+
class: L(W(E)),
|
|
3006
3098
|
value: e.block.fontSize,
|
|
3007
3099
|
min: "10",
|
|
3008
3100
|
max: "32",
|
|
3009
3101
|
onInput: n[8] ||= (e) => o("fontSize", Number(e.target.value))
|
|
3010
|
-
}, null, 42,
|
|
3011
|
-
M("div",
|
|
3102
|
+
}, null, 42, gs), M("span", { class: L(W(T)) }, "px", 2)])]),
|
|
3103
|
+
M("div", _s, [M("label", { class: L(W(w)) }, U(W(i).table.color), 3), P(J, {
|
|
3012
3104
|
"model-value": e.block.color,
|
|
3013
3105
|
"onUpdate:modelValue": n[9] ||= (e) => o("color", e)
|
|
3014
3106
|
}, null, 8, ["model-value"])]),
|
|
3015
|
-
M("div",
|
|
3107
|
+
M("div", vs, [M("label", { class: L(W(w)) }, U(W(i).table.textAlign), 3), P(Z, {
|
|
3016
3108
|
options: [
|
|
3017
3109
|
{
|
|
3018
3110
|
value: "left",
|
|
3019
|
-
label:
|
|
3020
|
-
icon:
|
|
3111
|
+
label: W(i).title.alignLeft,
|
|
3112
|
+
icon: W(ze)
|
|
3021
3113
|
},
|
|
3022
3114
|
{
|
|
3023
3115
|
value: "center",
|
|
3024
|
-
label:
|
|
3025
|
-
icon:
|
|
3116
|
+
label: W(i).title.alignCenter,
|
|
3117
|
+
icon: W(Me)
|
|
3026
3118
|
},
|
|
3027
3119
|
{
|
|
3028
3120
|
value: "right",
|
|
3029
|
-
label:
|
|
3030
|
-
icon:
|
|
3121
|
+
label: W(i).title.alignRight,
|
|
3122
|
+
icon: W(Be)
|
|
3031
3123
|
}
|
|
3032
3124
|
],
|
|
3033
3125
|
"model-value": e.block.textAlign,
|
|
@@ -3035,7 +3127,7 @@ var fo = {
|
|
|
3035
3127
|
}, null, 8, ["options", "model-value"])])
|
|
3036
3128
|
], 64));
|
|
3037
3129
|
}
|
|
3038
|
-
}),
|
|
3130
|
+
}), bs = { class: "tpl:mb-3.5" }, xs = ["value"], Ss = { value: 1 }, Cs = { value: 2 }, ws = { value: 3 }, Ts = { value: 4 }, Es = { class: "tpl:mb-3.5" }, Ds = ["value"], Os = { value: "" }, ks = ["value"], As = { class: "tpl:mb-3.5" }, js = { class: "tpl:mb-3.5" }, Ms = /* @__PURE__ */ F({
|
|
3039
3131
|
__name: "TitleToolbar",
|
|
3040
3132
|
props: {
|
|
3041
3133
|
block: {},
|
|
@@ -3048,44 +3140,44 @@ var fo = {
|
|
|
3048
3140
|
n("update", { [e]: t });
|
|
3049
3141
|
}
|
|
3050
3142
|
return (t, n) => (z(), j(D, null, [
|
|
3051
|
-
M("div",
|
|
3052
|
-
class: L(
|
|
3143
|
+
M("div", bs, [M("label", { class: L(W(w)) }, U(W(r).title.level), 3), M("select", {
|
|
3144
|
+
class: L(W(C)),
|
|
3053
3145
|
value: e.block.level,
|
|
3054
3146
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
3055
3147
|
}, [
|
|
3056
|
-
M("option",
|
|
3057
|
-
M("option",
|
|
3058
|
-
M("option",
|
|
3059
|
-
M("option",
|
|
3060
|
-
], 42,
|
|
3061
|
-
M("div",
|
|
3062
|
-
class: L(
|
|
3148
|
+
M("option", Ss, U(W(r).title.heading1), 1),
|
|
3149
|
+
M("option", Cs, U(W(r).title.heading2), 1),
|
|
3150
|
+
M("option", ws, U(W(r).title.heading3), 1),
|
|
3151
|
+
M("option", Ts, U(W(r).title.heading4), 1)
|
|
3152
|
+
], 42, xs)]),
|
|
3153
|
+
M("div", Es, [M("label", { class: L(W(w)) }, U(W(r).title.fontFamily), 3), M("select", {
|
|
3154
|
+
class: L(W(C)),
|
|
3063
3155
|
value: e.block.fontFamily || "",
|
|
3064
3156
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
3065
|
-
}, [M("option",
|
|
3157
|
+
}, [M("option", Os, U(W(r).title.inheritFont), 1), (z(!0), j(D, null, V(e.fontFamilies, (e) => (z(), j("option", {
|
|
3066
3158
|
key: e.value,
|
|
3067
3159
|
value: e.value
|
|
3068
|
-
},
|
|
3069
|
-
M("div",
|
|
3160
|
+
}, U(e.label), 9, ks))), 128))], 42, Ds)]),
|
|
3161
|
+
M("div", As, [M("label", { class: L(W(w)) }, U(W(r).title.color), 3), P(J, {
|
|
3070
3162
|
"model-value": e.block.color,
|
|
3071
3163
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e)
|
|
3072
3164
|
}, null, 8, ["model-value"])]),
|
|
3073
|
-
M("div",
|
|
3165
|
+
M("div", js, [M("label", { class: L(W(w)) }, U(W(r).title.align), 3), P(Z, {
|
|
3074
3166
|
options: [
|
|
3075
3167
|
{
|
|
3076
3168
|
value: "left",
|
|
3077
|
-
label:
|
|
3078
|
-
icon:
|
|
3169
|
+
label: W(r).title.alignLeft,
|
|
3170
|
+
icon: W(ze)
|
|
3079
3171
|
},
|
|
3080
3172
|
{
|
|
3081
3173
|
value: "center",
|
|
3082
|
-
label:
|
|
3083
|
-
icon:
|
|
3174
|
+
label: W(r).title.alignCenter,
|
|
3175
|
+
icon: W(Me)
|
|
3084
3176
|
},
|
|
3085
3177
|
{
|
|
3086
3178
|
value: "right",
|
|
3087
|
-
label:
|
|
3088
|
-
icon:
|
|
3179
|
+
label: W(r).title.alignRight,
|
|
3180
|
+
icon: W(Be)
|
|
3089
3181
|
}
|
|
3090
3182
|
],
|
|
3091
3183
|
"model-value": e.block.textAlign,
|
|
@@ -3093,7 +3185,7 @@ var fo = {
|
|
|
3093
3185
|
}, null, 8, ["options", "model-value"])])
|
|
3094
3186
|
], 64));
|
|
3095
3187
|
}
|
|
3096
|
-
}),
|
|
3188
|
+
}), Ns = ["aria-label"], Ps = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Fs = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Is = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ls = { class: "tpl:flex tpl:gap-1" }, Rs = ["title"], zs = ["title"], Bs = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Vs = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
3097
3189
|
__name: "Toolbar",
|
|
3098
3190
|
props: { block: {} },
|
|
3099
3191
|
emits: [
|
|
@@ -3101,117 +3193,117 @@ var fo = {
|
|
|
3101
3193
|
"delete",
|
|
3102
3194
|
"duplicate"
|
|
3103
3195
|
],
|
|
3104
|
-
setup(e, { emit:
|
|
3105
|
-
let i = e, a =
|
|
3196
|
+
setup(e, { emit: r }) {
|
|
3197
|
+
let i = e, a = r, { t: o } = y(), s = ue(ve, "Toolbar"), c = I(v, []), l = O(() => i.block.type), u = O(() => ct(i.block)), d = O(() => {
|
|
3106
3198
|
if (u.value) return c.find((e) => e.type === i.block.customType);
|
|
3107
3199
|
}), f = O(() => u.value ? d.value?.name ?? i.block.customType : t(l.value, o)), p = s.fonts;
|
|
3108
3200
|
function h(e) {
|
|
3109
3201
|
a("update", e);
|
|
3110
3202
|
}
|
|
3111
|
-
return (t,
|
|
3112
|
-
"aria-label":
|
|
3203
|
+
return (t, r) => (z(), j("aside", {
|
|
3204
|
+
"aria-label": W(o).landmarks.blockToolbar,
|
|
3113
3205
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
3114
|
-
}, [M("div",
|
|
3206
|
+
}, [M("div", Ps, [M("div", Fs, [W(we)[l.value] ? (z(), k(H(W(we)[l.value]), {
|
|
3115
3207
|
key: 0,
|
|
3116
3208
|
size: 16,
|
|
3117
3209
|
"stroke-width": 1.5
|
|
3118
|
-
})) : u.value ? (z(), k(
|
|
3210
|
+
})) : u.value ? (z(), k(W(n), {
|
|
3119
3211
|
key: 1,
|
|
3120
3212
|
size: 16,
|
|
3121
3213
|
"stroke-width": 1.5
|
|
3122
|
-
})) : A("", !0), M("h3",
|
|
3214
|
+
})) : A("", !0), M("h3", Is, U(f.value), 1)]), M("div", Ls, [M("button", {
|
|
3123
3215
|
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)]",
|
|
3124
|
-
title:
|
|
3125
|
-
onClick:
|
|
3126
|
-
}, [P(
|
|
3216
|
+
title: W(o).toolbar.duplicate,
|
|
3217
|
+
onClick: r[0] ||= (e) => a("duplicate")
|
|
3218
|
+
}, [P(W(m), {
|
|
3127
3219
|
size: 14,
|
|
3128
3220
|
"stroke-width": 2
|
|
3129
|
-
})], 8,
|
|
3221
|
+
})], 8, Rs), M("button", {
|
|
3130
3222
|
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)]",
|
|
3131
|
-
title:
|
|
3132
|
-
onClick:
|
|
3133
|
-
}, [P(
|
|
3223
|
+
title: W(o).toolbar.delete,
|
|
3224
|
+
onClick: r[1] ||= (e) => a("delete")
|
|
3225
|
+
}, [P(W(Ve), {
|
|
3134
3226
|
size: 14,
|
|
3135
3227
|
"stroke-width": 2
|
|
3136
|
-
})], 8,
|
|
3228
|
+
})], 8, zs)])]), M("div", Bs, [u.value ? (z(), k(La, {
|
|
3137
3229
|
key: 0,
|
|
3138
3230
|
block: e.block,
|
|
3139
|
-
onUpdateFieldValues:
|
|
3140
|
-
onUpdateDataSourceFetched:
|
|
3141
|
-
}, null, 8, ["block"])) : l.value === "section" ? (z(), k(
|
|
3231
|
+
onUpdateFieldValues: r[2] ||= (e) => a("update", { fieldValues: e }),
|
|
3232
|
+
onUpdateDataSourceFetched: r[3] ||= (e) => a("update", { dataSourceFetched: e })
|
|
3233
|
+
}, null, 8, ["block"])) : l.value === "section" ? (z(), k(So, {
|
|
3142
3234
|
key: 1,
|
|
3143
3235
|
block: e.block,
|
|
3144
3236
|
onUpdate: h
|
|
3145
|
-
}, null, 8, ["block"])) : l.value === "title" ? (z(), k(
|
|
3237
|
+
}, null, 8, ["block"])) : l.value === "title" ? (z(), k(Ms, {
|
|
3146
3238
|
key: 2,
|
|
3147
3239
|
block: e.block,
|
|
3148
|
-
"font-families":
|
|
3240
|
+
"font-families": W(p),
|
|
3149
3241
|
onUpdate: h
|
|
3150
|
-
}, null, 8, ["block", "font-families"])) : l.value === "paragraph" ? (z(), j(D, { key: 3 }, [], 64)) : l.value === "image" ? (z(), k(
|
|
3242
|
+
}, null, 8, ["block", "font-families"])) : l.value === "paragraph" ? (z(), j(D, { key: 3 }, [], 64)) : l.value === "image" ? (z(), k(ao, {
|
|
3151
3243
|
key: 4,
|
|
3152
3244
|
block: e.block,
|
|
3153
3245
|
onUpdate: h
|
|
3154
|
-
}, null, 8, ["block"])) : l.value === "button" ? (z(), k(
|
|
3246
|
+
}, null, 8, ["block"])) : l.value === "button" ? (z(), k(zr, {
|
|
3155
3247
|
key: 5,
|
|
3156
3248
|
block: e.block,
|
|
3157
|
-
"font-families":
|
|
3249
|
+
"font-families": W(p),
|
|
3158
3250
|
onUpdate: h
|
|
3159
|
-
}, null, 8, ["block", "font-families"])) : l.value === "divider" ? (z(), k(
|
|
3251
|
+
}, null, 8, ["block", "font-families"])) : l.value === "divider" ? (z(), k(Ua, {
|
|
3160
3252
|
key: 6,
|
|
3161
3253
|
block: e.block,
|
|
3162
3254
|
onUpdate: h
|
|
3163
|
-
}, null, 8, ["block"])) : l.value === "social" ? (z(), k(
|
|
3255
|
+
}, null, 8, ["block"])) : l.value === "social" ? (z(), k(Fo, {
|
|
3164
3256
|
key: 7,
|
|
3165
3257
|
block: e.block,
|
|
3166
3258
|
onUpdate: h
|
|
3167
|
-
}, null, 8, ["block"])) : l.value === "menu" ? (z(), k(
|
|
3259
|
+
}, null, 8, ["block"])) : l.value === "menu" ? (z(), k(vo, {
|
|
3168
3260
|
key: 8,
|
|
3169
3261
|
block: e.block,
|
|
3170
|
-
"font-families":
|
|
3262
|
+
"font-families": W(p),
|
|
3171
3263
|
onUpdate: h
|
|
3172
|
-
}, null, 8, ["block", "font-families"])) : l.value === "table" ? (z(), k(
|
|
3264
|
+
}, null, 8, ["block", "font-families"])) : l.value === "table" ? (z(), k(ys, {
|
|
3173
3265
|
key: 9,
|
|
3174
3266
|
block: e.block,
|
|
3175
|
-
"font-families":
|
|
3267
|
+
"font-families": W(p),
|
|
3176
3268
|
onUpdate: h
|
|
3177
|
-
}, null, 8, ["block", "font-families"])) : l.value === "spacer" ? (z(), k(
|
|
3269
|
+
}, null, 8, ["block", "font-families"])) : l.value === "spacer" ? (z(), k(Bo, {
|
|
3178
3270
|
key: 10,
|
|
3179
3271
|
block: e.block,
|
|
3180
3272
|
onUpdate: h
|
|
3181
|
-
}, null, 8, ["block"])) : l.value === "html" ? (z(), k(
|
|
3273
|
+
}, null, 8, ["block"])) : l.value === "html" ? (z(), k(qa, {
|
|
3182
3274
|
key: 11,
|
|
3183
3275
|
block: e.block,
|
|
3184
3276
|
onUpdate: h
|
|
3185
|
-
}, null, 8, ["block"])) : l.value === "countdown" ? (z(), k(
|
|
3277
|
+
}, null, 8, ["block"])) : l.value === "countdown" ? (z(), k(ea, {
|
|
3186
3278
|
key: 12,
|
|
3187
3279
|
block: e.block,
|
|
3188
|
-
"font-families":
|
|
3280
|
+
"font-families": W(p),
|
|
3189
3281
|
onUpdate: h
|
|
3190
|
-
}, null, 8, ["block", "font-families"])) : A("", !0), P(
|
|
3282
|
+
}, null, 8, ["block", "font-families"])) : A("", !0), P(ji, {
|
|
3191
3283
|
block: e.block,
|
|
3192
3284
|
"is-first-section": l.value === "paragraph",
|
|
3193
3285
|
onUpdate: h
|
|
3194
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3286
|
+
}, null, 8, ["block", "is-first-section"])])], 8, Ns));
|
|
3195
3287
|
}
|
|
3196
|
-
}), [["__scopeId", "data-v-fb6efed6"]]),
|
|
3288
|
+
}), [["__scopeId", "data-v-fb6efed6"]]), Hs = ["aria-label"], Us = {
|
|
3197
3289
|
role: "tablist",
|
|
3198
3290
|
class: "tpl:relative tpl:flex tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
3199
|
-
},
|
|
3291
|
+
}, Ws = ["aria-selected"], Gs = ["aria-selected"], Ks = {
|
|
3200
3292
|
key: 0,
|
|
3201
3293
|
id: "tpl-tabpanel-content",
|
|
3202
3294
|
role: "tabpanel",
|
|
3203
3295
|
"aria-labelledby": "tpl-tab-content",
|
|
3204
3296
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3205
|
-
},
|
|
3297
|
+
}, qs = {
|
|
3206
3298
|
key: 1,
|
|
3207
3299
|
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)]"
|
|
3208
|
-
},
|
|
3300
|
+
}, Js = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Ys = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xs = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Zs = {
|
|
3209
3301
|
key: 1,
|
|
3210
3302
|
id: "tpl-tabpanel-settings",
|
|
3211
3303
|
role: "tabpanel",
|
|
3212
3304
|
"aria-labelledby": "tpl-tab-settings",
|
|
3213
3305
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3214
|
-
},
|
|
3306
|
+
}, Qs = /* @__PURE__ */ F({
|
|
3215
3307
|
__name: "RightSidebar",
|
|
3216
3308
|
props: {
|
|
3217
3309
|
selectedBlock: {},
|
|
@@ -3226,13 +3318,13 @@ var fo = {
|
|
|
3226
3318
|
],
|
|
3227
3319
|
setup(e, { emit: t }) {
|
|
3228
3320
|
let n = e, r = t, { t: i } = y(), a = B("content"), o = O(() => a.value === "content" ? "tpl:translate-x-0" : "tpl:translate-x-full");
|
|
3229
|
-
return
|
|
3321
|
+
return Ze(() => n.selectedBlock, (e) => {
|
|
3230
3322
|
e && (a.value = "content");
|
|
3231
3323
|
}), (t, n) => (z(), j("aside", {
|
|
3232
|
-
"aria-label":
|
|
3324
|
+
"aria-label": W(i).landmarks.rightSidebar,
|
|
3233
3325
|
class: L(["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"])
|
|
3234
3326
|
}, [
|
|
3235
|
-
M("div",
|
|
3327
|
+
M("div", Us, [
|
|
3236
3328
|
M("div", { class: L(["tpl:absolute tpl:bottom-0 tpl:left-0 tpl:h-full tpl:w-1/2 tpl:p-1.5 tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", o.value]) }, [...n[6] ||= [M("div", { class: "tpl:h-full tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow)]" }, null, -1)]], 2),
|
|
3237
3329
|
M("button", {
|
|
3238
3330
|
id: "tpl-tab-content",
|
|
@@ -3241,10 +3333,10 @@ var fo = {
|
|
|
3241
3333
|
"aria-controls": "tpl-tabpanel-content",
|
|
3242
3334
|
class: L(["tpl:relative tpl:z-10 tpl:flex tpl:flex-1 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:px-4 tpl:py-3 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-[120ms]", a.value === "content" ? "tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]"]),
|
|
3243
3335
|
onClick: n[0] ||= (e) => a.value = "content"
|
|
3244
|
-
}, [P(
|
|
3336
|
+
}, [P(W(gt), {
|
|
3245
3337
|
size: 14,
|
|
3246
3338
|
"stroke-width": 2
|
|
3247
|
-
}), N(" " +
|
|
3339
|
+
}), N(" " + U(W(i).sidebar.content), 1)], 10, Ws),
|
|
3248
3340
|
M("button", {
|
|
3249
3341
|
id: "tpl-tab-settings",
|
|
3250
3342
|
role: "tab",
|
|
@@ -3252,37 +3344,37 @@ var fo = {
|
|
|
3252
3344
|
"aria-controls": "tpl-tabpanel-settings",
|
|
3253
3345
|
class: L(["tpl:relative tpl:z-10 tpl:flex tpl:flex-1 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:px-4 tpl:py-3 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-[120ms]", a.value === "settings" ? "tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]"]),
|
|
3254
3346
|
onClick: n[1] ||= (e) => a.value = "settings"
|
|
3255
|
-
}, [P(
|
|
3347
|
+
}, [P(W(vt), {
|
|
3256
3348
|
size: 14,
|
|
3257
3349
|
"stroke-width": 1.5
|
|
3258
|
-
}), N(" " +
|
|
3350
|
+
}), N(" " + U(W(i).sidebar.settings), 1)], 10, Gs)
|
|
3259
3351
|
]),
|
|
3260
|
-
a.value === "content" ? (z(), j("div",
|
|
3352
|
+
a.value === "content" ? (z(), j("div", Ks, [e.selectedBlock ? (z(), k(Vs, {
|
|
3261
3353
|
key: 0,
|
|
3262
3354
|
block: e.selectedBlock,
|
|
3263
3355
|
onUpdate: n[2] ||= (e) => r("update-block", e),
|
|
3264
3356
|
onDelete: n[3] ||= (e) => r("delete-block"),
|
|
3265
3357
|
onDuplicate: n[4] ||= (e) => r("duplicate-block")
|
|
3266
|
-
}, null, 8, ["block"])) : (z(), j("div",
|
|
3267
|
-
M("div",
|
|
3358
|
+
}, null, 8, ["block"])) : (z(), j("div", qs, [
|
|
3359
|
+
M("div", Js, [P(W(dt), {
|
|
3268
3360
|
size: 40,
|
|
3269
3361
|
"stroke-width": 1.5
|
|
3270
3362
|
})]),
|
|
3271
|
-
M("h3",
|
|
3272
|
-
M("p",
|
|
3363
|
+
M("h3", Ys, U(W(i).sidebar.noSelection), 1),
|
|
3364
|
+
M("p", Xs, U(W(i).sidebar.noSelectionHint), 1)
|
|
3273
3365
|
]))])) : A("", !0),
|
|
3274
|
-
a.value === "settings" ? (z(), j("div",
|
|
3366
|
+
a.value === "settings" ? (z(), j("div", Zs, [P(gr, {
|
|
3275
3367
|
settings: e.settings,
|
|
3276
3368
|
onUpdate: n[5] ||= (e) => r("update-settings", e)
|
|
3277
3369
|
}, null, 8, ["settings"])])) : A("", !0)
|
|
3278
|
-
], 10,
|
|
3370
|
+
], 10, Hs));
|
|
3279
3371
|
}
|
|
3280
|
-
}),
|
|
3372
|
+
}), $s = ["aria-label"], ec = [
|
|
3281
3373
|
"aria-checked",
|
|
3282
3374
|
"aria-label",
|
|
3283
3375
|
"title",
|
|
3284
3376
|
"onClick"
|
|
3285
|
-
],
|
|
3377
|
+
], tc = /* @__PURE__ */ F({
|
|
3286
3378
|
__name: "ViewportToggle",
|
|
3287
3379
|
props: { viewport: {} },
|
|
3288
3380
|
emits: ["change"],
|
|
@@ -3303,7 +3395,7 @@ var fo = {
|
|
|
3303
3395
|
]), o = O(() => `translateX(${a.value.findIndex((e) => e.value === n.viewport) * 100}%)`);
|
|
3304
3396
|
return (t, n) => (z(), j("div", {
|
|
3305
3397
|
role: "radiogroup",
|
|
3306
|
-
"aria-label":
|
|
3398
|
+
"aria-label": W(i).viewport.label,
|
|
3307
3399
|
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
3308
3400
|
style: R({
|
|
3309
3401
|
gridTemplateColumns: `repeat(${a.value.length}, 1fr)`,
|
|
@@ -3331,25 +3423,25 @@ var fo = {
|
|
|
3331
3423
|
}),
|
|
3332
3424
|
title: t.label,
|
|
3333
3425
|
onClick: (e) => r("change", t.value)
|
|
3334
|
-
}, [t.value === "desktop" ? (z(), k(
|
|
3426
|
+
}, [t.value === "desktop" ? (z(), k(W(mt), {
|
|
3335
3427
|
key: 0,
|
|
3336
3428
|
size: 18,
|
|
3337
3429
|
"stroke-width": 1.5
|
|
3338
|
-
})) : t.value === "tablet" ? (z(), k(
|
|
3430
|
+
})) : t.value === "tablet" ? (z(), k(W(Ct), {
|
|
3339
3431
|
key: 1,
|
|
3340
3432
|
size: 18,
|
|
3341
3433
|
"stroke-width": 1.5
|
|
3342
|
-
})) : (z(), k(
|
|
3434
|
+
})) : (z(), k(W(yt), {
|
|
3343
3435
|
key: 2,
|
|
3344
3436
|
size: 18,
|
|
3345
3437
|
"stroke-width": 1.5
|
|
3346
|
-
})), M("span", null,
|
|
3438
|
+
})), M("span", null, U(t.label), 1)], 12, ec))), 128))], 12, $s));
|
|
3347
3439
|
}
|
|
3348
|
-
}),
|
|
3440
|
+
}), nc = [
|
|
3349
3441
|
"aria-label",
|
|
3350
3442
|
"title",
|
|
3351
3443
|
"aria-pressed"
|
|
3352
|
-
],
|
|
3444
|
+
], rc = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
3353
3445
|
__name: "PreviewToggle",
|
|
3354
3446
|
props: { previewMode: { type: Boolean } },
|
|
3355
3447
|
emits: ["change"],
|
|
@@ -3361,34 +3453,34 @@ var fo = {
|
|
|
3361
3453
|
color: t.previewMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3362
3454
|
backgroundColor: t.previewMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3363
3455
|
}),
|
|
3364
|
-
"aria-label": t.previewMode ?
|
|
3365
|
-
title: t.previewMode ?
|
|
3456
|
+
"aria-label": t.previewMode ? W(i).previewMode.disable : W(i).previewMode.enable,
|
|
3457
|
+
title: t.previewMode ? W(i).previewMode.disable : W(i).previewMode.enable,
|
|
3366
3458
|
"aria-pressed": t.previewMode,
|
|
3367
3459
|
onClick: a[0] ||= (e) => r("change", !t.previewMode)
|
|
3368
|
-
}, [P(
|
|
3460
|
+
}, [P(Ge, {
|
|
3369
3461
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3370
3462
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3371
3463
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3372
3464
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3373
3465
|
mode: "out-in"
|
|
3374
3466
|
}, {
|
|
3375
|
-
default:
|
|
3467
|
+
default: G(() => [t.previewMode ? (z(), k(W(Ee), {
|
|
3376
3468
|
key: "eye",
|
|
3377
3469
|
size: 18,
|
|
3378
3470
|
"stroke-width": 1.5
|
|
3379
|
-
})) : (z(), k(
|
|
3471
|
+
})) : (z(), k(W(e), {
|
|
3380
3472
|
key: "eye-off",
|
|
3381
3473
|
size: 18,
|
|
3382
3474
|
"stroke-width": 1.5
|
|
3383
3475
|
}))]),
|
|
3384
3476
|
_: 1
|
|
3385
|
-
})], 12,
|
|
3477
|
+
})], 12, nc));
|
|
3386
3478
|
}
|
|
3387
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3479
|
+
}), [["__scopeId", "data-v-af87d02a"]]), ic = [
|
|
3388
3480
|
"aria-label",
|
|
3389
3481
|
"title",
|
|
3390
3482
|
"aria-pressed"
|
|
3391
|
-
],
|
|
3483
|
+
], ac = /* @__PURE__ */ x(/* @__PURE__ */ F({
|
|
3392
3484
|
__name: "DarkModeToggle",
|
|
3393
3485
|
props: { darkMode: { type: Boolean } },
|
|
3394
3486
|
emits: ["change"],
|
|
@@ -3400,29 +3492,65 @@ var fo = {
|
|
|
3400
3492
|
color: e.darkMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3401
3493
|
backgroundColor: e.darkMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3402
3494
|
}),
|
|
3403
|
-
"aria-label": e.darkMode ?
|
|
3404
|
-
title: e.darkMode ?
|
|
3495
|
+
"aria-label": e.darkMode ? W(r).darkMode.disable : W(r).darkMode.enable,
|
|
3496
|
+
title: e.darkMode ? W(r).darkMode.disable : W(r).darkMode.enable,
|
|
3405
3497
|
"aria-pressed": e.darkMode,
|
|
3406
3498
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
3407
|
-
}, [P(
|
|
3499
|
+
}, [P(Ge, {
|
|
3408
3500
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3409
3501
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3410
3502
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3411
3503
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3412
3504
|
mode: "out-in"
|
|
3413
3505
|
}, {
|
|
3414
|
-
default:
|
|
3506
|
+
default: G(() => [e.darkMode ? (z(), k(W(ht), {
|
|
3415
3507
|
key: "moon",
|
|
3416
3508
|
size: 18,
|
|
3417
3509
|
"stroke-width": 1.5
|
|
3418
|
-
})) : (z(), k(
|
|
3510
|
+
})) : (z(), k(W(St), {
|
|
3419
3511
|
key: "sun",
|
|
3420
3512
|
size: 18,
|
|
3421
3513
|
"stroke-width": 1.5
|
|
3422
3514
|
}))]),
|
|
3423
3515
|
_: 1
|
|
3424
|
-
})], 12,
|
|
3516
|
+
})], 12, ic));
|
|
3517
|
+
}
|
|
3518
|
+
}), [["__scopeId", "data-v-f8694f76"]]), oc = {
|
|
3519
|
+
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3520
|
+
style: {
|
|
3521
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3522
|
+
"backdrop-filter": "blur(8px)",
|
|
3523
|
+
"-webkit-backdrop-filter": "blur(8px)"
|
|
3425
3524
|
}
|
|
3426
|
-
}
|
|
3525
|
+
}, sc = {
|
|
3526
|
+
href: "https://github.com/templatical/sdk",
|
|
3527
|
+
target: "_blank",
|
|
3528
|
+
rel: "noopener noreferrer",
|
|
3529
|
+
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3530
|
+
style: { "text-decoration": "none" }
|
|
3531
|
+
}, cc = /* @__PURE__ */ F({
|
|
3532
|
+
__name: "EditorFooter",
|
|
3533
|
+
props: { positionClass: {} },
|
|
3534
|
+
setup(e) {
|
|
3535
|
+
let { t } = y();
|
|
3536
|
+
return (n, r) => (z(), j("footer", { class: L(["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]) }, [M("div", oc, [
|
|
3537
|
+
M("span", null, U(W(t).footer.poweredBy), 1),
|
|
3538
|
+
r[0] ||= M("a", {
|
|
3539
|
+
href: "https://templatical.com",
|
|
3540
|
+
target: "_blank",
|
|
3541
|
+
rel: "noopener noreferrer",
|
|
3542
|
+
class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
|
|
3543
|
+
style: { "text-decoration": "none" }
|
|
3544
|
+
}, [M("img", {
|
|
3545
|
+
width: "14",
|
|
3546
|
+
height: "14",
|
|
3547
|
+
src: "https://templatical.com/logo.svg",
|
|
3548
|
+
alt: ""
|
|
3549
|
+
}), N(" Templatical ")], -1),
|
|
3550
|
+
r[1] ||= M("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3551
|
+
M("a", sc, U(W(t).footer.openSource), 1)
|
|
3552
|
+
])], 2));
|
|
3553
|
+
}
|
|
3554
|
+
});
|
|
3427
3555
|
//#endregion
|
|
3428
|
-
export {
|
|
3556
|
+
export { Qs as a, _t as c, tc as i, ac as n, Ut as o, rc as r, Pt as s, cc as t };
|