@templatical/editor 0.9.0 → 0.10.0
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-BUKj9n02.js → AiChatSidebar-D30WPhbv.js} +2 -2
- package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-B5CJX5zr.js} +3 -3
- package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CkB4Yyz2.js} +2 -2
- package/dist/{CloudEditor-CAtw_sFC.js → CloudEditor-nT-R769W.js} +128 -127
- package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-CwhlXODK.js} +2 -2
- package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-gpZMMI5w.js} +3 -3
- package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-BNvuXucv.js} +1 -1
- package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-Dl82DAmI.js} +2 -2
- package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-Bs5AMxVd.js} +3 -3
- package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-CqQa2BtU.js} +2 -2
- package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-BWWgF0LC.js} +7 -7
- package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-D7Tk5HOt.js} +2 -2
- package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DVy5HxMi.js} +1 -1
- package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-DVSGdMOo.js} +7 -7
- package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-DN-fRjMa.js} +3 -3
- package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-CkEYkyVD.js} +5 -5
- package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-Nx9wrlbF.js} +3 -3
- package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BG9M-29t.js} +2 -2
- package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-CRjtEs6S.js} +3 -3
- package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-CvtV4pCA.js} +6 -6
- package/dist/{TplModal-YFpBaiLj.js → TplModal-BudEYVcJ.js} +3 -3
- package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-Dd-UvfnC.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-DKOv8VnB.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-DKOv8VnB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-DpiSTwM7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-DpiSTwM7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js → CloudEditor-xc_uOEgn.js} +169 -168
- package/dist/cdn/chunks/{CloudEditor-CyJItWsK.js.map → CloudEditor-xc_uOEgn.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-VWfPri_h.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-VWfPri_h.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-BKsCWboK.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-BKsCWboK.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BLtECDNb.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BLtECDNb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BW2piyvs.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BW2piyvs.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-TLlKpvjX.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-TLlKpvjX.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-wu7y-vrh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-wu7y-vrh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DxoUtTMr.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DxoUtTMr.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-DvxIO2LN.js} +33 -33
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-DvxIO2LN.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-Dm9GXJmo.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-Dm9GXJmo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-BRAdVcYM.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-BRAdVcYM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-D3gPRd0x.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-D3gPRd0x.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C2cm4RjU.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-C2cm4RjU.js.map} +1 -1
- package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
- package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-SS1ywPUR.js} +21 -21
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-SS1ywPUR.js.map} +1 -1
- package/dist/cdn/chunks/{features-D-2kVhHY.js → features-CwZTdcbt.js} +988 -967
- package/dist/cdn/chunks/features-CwZTdcbt.js.map +1 -0
- package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CbNEr1kc.js} +11 -25
- package/dist/cdn/chunks/icons-CbNEr1kc.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-BRpHZOl7.js} +76 -76
- package/dist/cdn/chunks/{media-library-CO2WOETY.js.map → media-library-BRpHZOl7.js.map} +1 -1
- package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
- package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-BqJqIPRU.js} +494 -484
- package/dist/cdn/chunks/quality-BqJqIPRU.js.map +1 -0
- package/dist/cdn/chunks/{renderer-7z2t_bYQ.js → renderer-CGVYkdUi.js} +99 -82
- package/dist/cdn/chunks/renderer-CGVYkdUi.js.map +1 -0
- package/dist/cdn/chunks/{src-ftxPuuQh.js → src-CvzfrFlT.js} +8 -8
- package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-CvzfrFlT.js.map} +1 -1
- package/dist/cdn/chunks/{styles-o0HIrw9F.js → styles-2P5yvfsS.js} +1186 -1213
- package/dist/cdn/chunks/styles-2P5yvfsS.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -100
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-VxYMtfXC.js → cloud-BBC7bv8q.js} +1 -1
- package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
- package/dist/{dist-CIV3Brg-.js → dist-GAmhYvUK.js} +3 -5
- package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
- package/dist/{extensions-Mj2-D8uK.js → extensions-C87ZSllQ.js} +3 -3
- package/dist/index.d.ts +8 -0
- package/dist/keys-Vt3XipJl.js +10 -0
- package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
- package/dist/style.css +1 -1
- package/dist/{styles-CJtcKmsx.js → styles-DOjWbqA9.js} +1149 -1190
- package/dist/templatical-editor.js +116 -107
- package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-sRfoQCZY.js} +1 -1
- package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-DxApq2hZ.js} +713 -690
- package/dist/{useI18n-Besvmtxy.js → useI18n-lF6hYgZu.js} +1 -1
- package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-CZVI7Xe5.js} +3 -3
- package/dist/{usePopoverRoot-CKt956u-.js → usePopoverRoot-p2BanBI7.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
- package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
- package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
- package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
- package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
- package/dist/cdn/chunks/renderer-7z2t_bYQ.js.map +0 -1
- package/dist/cdn/chunks/styles-o0HIrw9F.js.map +0 -1
- package/dist/keys-BiQlvx51.js +0 -10
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, F as r, J as i, L as a, M as o, N as s,
|
|
2
|
-
import { C as
|
|
3
|
-
import { A as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { t as V } from "./useI18n-
|
|
1
|
+
import { A as e, B as t, E as n, F as r, J as i, L as a, M as o, N as s, S as c, U as l, X as u, _ as d, a as f, at as p, b as m, c as h, d as g, f as _, h as v, l as y, m as b, o as x, ot as S, p as C, q as w, rt as T, s as E, st as D, t as O, v as k, w as A, y as j, z as M } from "./vue.runtime.esm-bundler-BDSGA5hA.js";
|
|
2
|
+
import { C as N, D as P, E as F, S as I, a as L, l as ee, n as R, o as z } from "./dist-GAmhYvUK.js";
|
|
3
|
+
import { A as te, F as ne, I as re, M as B, N as ie, T as ae, _ as oe, a as se, c as ce, d as le, g as ue, h as de, i as fe, j as pe, k as me, l as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, u as Se, v as Ce, y as we } from "./useEditorCore-DxApq2hZ.js";
|
|
4
|
+
import { a as Te, c as Ee } from "./dist-CNLAS2v2.js";
|
|
5
|
+
import { C as De, M as Oe, O as ke, S as Ae, a as je, d as Me, f as Ne, g as Pe, j as Fe, k as Ie, m as Le, n as Re, o as ze, p as Be, s as Ve, u as He, x as Ue } from "./keys-Vt3XipJl.js";
|
|
6
|
+
import { t as V } from "./useI18n-lF6hYgZu.js";
|
|
7
7
|
import { t as H } from "./createLucideIcon-XgXOJ05E.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { _ as
|
|
27
|
-
import { i as q, n as J, r as Y, t as
|
|
28
|
-
import { t as
|
|
29
|
-
var
|
|
8
|
+
import { t as We } from "./chevron-down-DJjo0jSV.js";
|
|
9
|
+
import { t as Ge } from "./circle-alert-CPH6l3Lc.js";
|
|
10
|
+
import { i as Ke, n as qe, r as Je, t as Ye } from "./blockTypeIcons-Dd-UvfnC.js";
|
|
11
|
+
import { n as Xe, t as Ze } from "./refresh-cw-CvWF4jfR.js";
|
|
12
|
+
import { t as Qe } from "./image-up-CPBCOMit.js";
|
|
13
|
+
import { t as $e } from "./info-DIY9mguM.js";
|
|
14
|
+
import { t as et } from "./list-checks-CSCyu3fH.js";
|
|
15
|
+
import { t as tt } from "./scan-line-wanvAFDr.js";
|
|
16
|
+
import { t as nt } from "./sparkles-CrUN0KWY.js";
|
|
17
|
+
import { n as rt, r as it, t as at } from "./text-align-end-Bkq8oBrD.js";
|
|
18
|
+
import { t as ot } from "./trash-2-BpY5BCLT.js";
|
|
19
|
+
import { t as st } from "./x-rcnxRG8Y.js";
|
|
20
|
+
import { t as ct } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
21
|
+
import { t as lt } from "./useCloudI18n-sRfoQCZY.js";
|
|
22
|
+
import { t as ut } from "./useMergeTag-CZVI7Xe5.js";
|
|
23
|
+
import { t as dt } from "./useAliveFlag-BLyG8L4d.js";
|
|
24
|
+
import { t as ft } from "./readableTextColor-f8Kykfnh.js";
|
|
25
|
+
import { t as pt } from "./CountdownBlock-BNvuXucv.js";
|
|
26
|
+
import { _ as mt, c as ht, f as U, g as gt, h as W, l as _t, m as G, p as K, t as vt } from "./styleConstants-lGobwiLH.js";
|
|
27
|
+
import { i as q, n as J, r as Y, t as yt } from "./NumberWithSuffix-DVy5HxMi.js";
|
|
28
|
+
import { t as bt } from "./TplModal-BudEYVcJ.js";
|
|
29
|
+
var xt = H("circle", [["circle", {
|
|
30
30
|
cx: "12",
|
|
31
31
|
cy: "12",
|
|
32
32
|
r: "10",
|
|
33
33
|
key: "1mglay"
|
|
34
|
-
}]]),
|
|
34
|
+
}]]), St = H("globe", [
|
|
35
35
|
["circle", {
|
|
36
36
|
cx: "12",
|
|
37
37
|
cy: "12",
|
|
@@ -46,7 +46,7 @@ var _t = H("circle", [["circle", {
|
|
|
46
46
|
d: "M2 12h20",
|
|
47
47
|
key: "9i4pu4"
|
|
48
48
|
}]
|
|
49
|
-
]),
|
|
49
|
+
]), Ct = H("layout-template", [
|
|
50
50
|
["rect", {
|
|
51
51
|
width: "18",
|
|
52
52
|
height: "7",
|
|
@@ -71,7 +71,7 @@ var _t = H("circle", [["circle", {
|
|
|
71
71
|
rx: "1",
|
|
72
72
|
key: "q5h2i8"
|
|
73
73
|
}]
|
|
74
|
-
]),
|
|
74
|
+
]), wt = H("lock-open", [["rect", {
|
|
75
75
|
width: "18",
|
|
76
76
|
height: "11",
|
|
77
77
|
x: "3",
|
|
@@ -82,7 +82,7 @@ var _t = H("circle", [["circle", {
|
|
|
82
82
|
}], ["path", {
|
|
83
83
|
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
84
84
|
key: "1mm8w8"
|
|
85
|
-
}]]),
|
|
85
|
+
}]]), Tt = H("lock", [["rect", {
|
|
86
86
|
width: "18",
|
|
87
87
|
height: "11",
|
|
88
88
|
x: "3",
|
|
@@ -93,7 +93,7 @@ var _t = H("circle", [["circle", {
|
|
|
93
93
|
}], ["path", {
|
|
94
94
|
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
95
95
|
key: "fwvmzm"
|
|
96
|
-
}]]),
|
|
96
|
+
}]]), Et = H("monitor", [
|
|
97
97
|
["rect", {
|
|
98
98
|
width: "20",
|
|
99
99
|
height: "14",
|
|
@@ -116,10 +116,10 @@ var _t = H("circle", [["circle", {
|
|
|
116
116
|
y2: "21",
|
|
117
117
|
key: "vw1qmm"
|
|
118
118
|
}]
|
|
119
|
-
]),
|
|
119
|
+
]), Dt = H("moon", [["path", {
|
|
120
120
|
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",
|
|
121
121
|
key: "kfwtm"
|
|
122
|
-
}]]),
|
|
122
|
+
}]]), Ot = H("panel-top", [["rect", {
|
|
123
123
|
width: "18",
|
|
124
124
|
height: "18",
|
|
125
125
|
x: "3",
|
|
@@ -135,13 +135,13 @@ var _t = H("circle", [["circle", {
|
|
|
135
135
|
}], ["path", {
|
|
136
136
|
d: "M12 5v14",
|
|
137
137
|
key: "s699le"
|
|
138
|
-
}]]),
|
|
138
|
+
}]]), kt = H("rotate-ccw", [["path", {
|
|
139
139
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
140
140
|
key: "1357e3"
|
|
141
141
|
}], ["path", {
|
|
142
142
|
d: "M3 3v5h5",
|
|
143
143
|
key: "1xhq8a"
|
|
144
|
-
}]]),
|
|
144
|
+
}]]), At = H("settings", [["path", {
|
|
145
145
|
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",
|
|
146
146
|
key: "1i5ecw"
|
|
147
147
|
}], ["circle", {
|
|
@@ -149,7 +149,7 @@ var _t = H("circle", [["circle", {
|
|
|
149
149
|
cy: "12",
|
|
150
150
|
r: "3",
|
|
151
151
|
key: "1v7zrd"
|
|
152
|
-
}]]),
|
|
152
|
+
}]]), jt = H("smartphone", [["rect", {
|
|
153
153
|
width: "14",
|
|
154
154
|
height: "20",
|
|
155
155
|
x: "5",
|
|
@@ -160,7 +160,7 @@ var _t = H("circle", [["circle", {
|
|
|
160
160
|
}], ["path", {
|
|
161
161
|
d: "M12 18h.01",
|
|
162
162
|
key: "mhygvu"
|
|
163
|
-
}]]),
|
|
163
|
+
}]]), Mt = H("square-plus", [
|
|
164
164
|
["rect", {
|
|
165
165
|
width: "18",
|
|
166
166
|
height: "18",
|
|
@@ -177,14 +177,14 @@ var _t = H("circle", [["circle", {
|
|
|
177
177
|
d: "M12 8v8",
|
|
178
178
|
key: "napkw2"
|
|
179
179
|
}]
|
|
180
|
-
]),
|
|
180
|
+
]), Nt = H("square", [["rect", {
|
|
181
181
|
width: "18",
|
|
182
182
|
height: "18",
|
|
183
183
|
x: "3",
|
|
184
184
|
y: "3",
|
|
185
185
|
rx: "2",
|
|
186
186
|
key: "afitv7"
|
|
187
|
-
}]]),
|
|
187
|
+
}]]), Pt = H("sun", [
|
|
188
188
|
["circle", {
|
|
189
189
|
cx: "12",
|
|
190
190
|
cy: "12",
|
|
@@ -223,24 +223,10 @@ var _t = H("circle", [["circle", {
|
|
|
223
223
|
d: "m19.07 4.93-1.41 1.41",
|
|
224
224
|
key: "1shlcs"
|
|
225
225
|
}]
|
|
226
|
-
])
|
|
227
|
-
width: "16",
|
|
228
|
-
height: "20",
|
|
229
|
-
x: "4",
|
|
230
|
-
y: "2",
|
|
231
|
-
rx: "2",
|
|
232
|
-
ry: "2",
|
|
233
|
-
key: "76otgf"
|
|
234
|
-
}], ["line", {
|
|
235
|
-
x1: "12",
|
|
236
|
-
x2: "12.01",
|
|
237
|
-
y1: "18",
|
|
238
|
-
y2: "18",
|
|
239
|
-
key: "1dp563"
|
|
240
|
-
}]]);
|
|
226
|
+
]);
|
|
241
227
|
//#endregion
|
|
242
228
|
//#region src/utils/resolveLintOptions.ts
|
|
243
|
-
function
|
|
229
|
+
function Ft(e) {
|
|
244
230
|
return {
|
|
245
231
|
...e.lint,
|
|
246
232
|
locale: e.locale
|
|
@@ -248,19 +234,19 @@ function Mt(e) {
|
|
|
248
234
|
}
|
|
249
235
|
//#endregion
|
|
250
236
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
251
|
-
var
|
|
237
|
+
var It = ["aria-label"], Lt = {
|
|
252
238
|
key: 0,
|
|
253
239
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
254
|
-
},
|
|
240
|
+
}, Rt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, zt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Bt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Vt = {
|
|
255
241
|
key: 0,
|
|
256
242
|
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)]"
|
|
257
|
-
},
|
|
243
|
+
}, Ht = {
|
|
258
244
|
key: 1,
|
|
259
245
|
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)]"
|
|
260
|
-
},
|
|
246
|
+
}, Ut = { class: "tpl:relative" }, Wt = {
|
|
261
247
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
262
248
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
263
|
-
},
|
|
249
|
+
}, Gt = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
264
250
|
__name: "Canvas",
|
|
265
251
|
props: {
|
|
266
252
|
viewport: {},
|
|
@@ -277,21 +263,21 @@ var Nt = ["aria-label"], Pt = {
|
|
|
277
263
|
],
|
|
278
264
|
setup(n, { emit: i }) {
|
|
279
265
|
let a = {
|
|
280
|
-
section:
|
|
281
|
-
title:
|
|
282
|
-
paragraph:
|
|
283
|
-
image:
|
|
266
|
+
section: ce,
|
|
267
|
+
title: Se,
|
|
268
|
+
paragraph: ge,
|
|
269
|
+
image: ue,
|
|
284
270
|
button: ie,
|
|
285
|
-
divider:
|
|
286
|
-
spacer:
|
|
287
|
-
html:
|
|
288
|
-
social:
|
|
289
|
-
menu:
|
|
290
|
-
table:
|
|
291
|
-
video:
|
|
292
|
-
countdown:
|
|
293
|
-
custom:
|
|
294
|
-
}, s = n, c = i, { t:
|
|
271
|
+
divider: Ce,
|
|
272
|
+
spacer: fe,
|
|
273
|
+
html: oe,
|
|
274
|
+
social: se,
|
|
275
|
+
menu: de,
|
|
276
|
+
table: be,
|
|
277
|
+
video: _e,
|
|
278
|
+
countdown: pt,
|
|
279
|
+
custom: we
|
|
280
|
+
}, s = n, c = i, { t: l } = V(), { t: f } = lt(), m = Oe(Le, "Canvas"), h = A(He, null), w = A(ze, null), E = A(Ve, {}), O = g(() => (E.plan?.hasFeature("ai_generation") ?? !1) && (E.ai?.isFeatureEnabled("chat") ?? !1)), j = g(() => (E.plan?.hasFeature("ai_generation") ?? !1) && (E.ai?.isFeatureEnabled("designToTemplate") ?? !1)), N = g({
|
|
295
281
|
get: () => s.content.blocks,
|
|
296
282
|
set: (e) => {
|
|
297
283
|
m.setContent({
|
|
@@ -299,64 +285,63 @@ var Nt = ["aria-label"], Pt = {
|
|
|
299
285
|
blocks: e
|
|
300
286
|
});
|
|
301
287
|
}
|
|
302
|
-
}),
|
|
288
|
+
}), P = g(() => {
|
|
303
289
|
switch (s.viewport) {
|
|
304
290
|
case "mobile": return 375;
|
|
305
|
-
case "tablet": return 768;
|
|
306
291
|
default: return s.content.settings.width;
|
|
307
292
|
}
|
|
308
|
-
}),
|
|
293
|
+
}), F = g(() => ({ fontFamily: s.content.settings.fontFamily })), I = g(() => N.value.length === 0 && !s.previewMode), L = u(0), ee = g(() => I.value && L.value > 0);
|
|
309
294
|
function R() {
|
|
310
|
-
|
|
295
|
+
I.value && (L.value += 1);
|
|
311
296
|
}
|
|
312
297
|
function z() {
|
|
313
|
-
|
|
298
|
+
I.value && (L.value = Math.max(0, L.value - 1));
|
|
314
299
|
}
|
|
315
300
|
function te() {
|
|
316
|
-
|
|
301
|
+
L.value = 0;
|
|
317
302
|
}
|
|
318
303
|
function ne(e) {
|
|
319
304
|
s.previewMode || e.target === e.currentTarget && c("select-block", null);
|
|
320
305
|
}
|
|
321
306
|
function re(e) {
|
|
322
|
-
return
|
|
307
|
+
return ye(e, w, a);
|
|
323
308
|
}
|
|
324
309
|
function B(e) {
|
|
325
310
|
return s.lockedBlocks?.get(e) ?? null;
|
|
326
311
|
}
|
|
327
|
-
function
|
|
312
|
+
function ae(e, t) {
|
|
328
313
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
329
314
|
fieldValues: t.fieldValues,
|
|
330
315
|
dataSourceFetched: t.dataSourceFetched
|
|
331
316
|
});
|
|
332
317
|
}
|
|
333
|
-
return (i, a) => (e(),
|
|
318
|
+
return (i, a) => (e(), v("div", {
|
|
334
319
|
"data-testid": "canvas-wrapper",
|
|
335
320
|
role: "region",
|
|
336
|
-
"aria-label":
|
|
321
|
+
"aria-label": T(l).landmarks.canvas,
|
|
337
322
|
class: "tpl-canvas-wrapper tpl:relative tpl:rounded-lg",
|
|
338
|
-
style:
|
|
339
|
-
width: `${
|
|
323
|
+
style: S({
|
|
324
|
+
width: `${P.value}px`,
|
|
340
325
|
boxShadow: n.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
341
326
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
342
327
|
})
|
|
343
|
-
}, [
|
|
328
|
+
}, [_("div", {
|
|
344
329
|
class: "tpl-canvas-bg tpl:absolute tpl:inset-0 tpl:rounded-lg tpl:pointer-events-none",
|
|
345
|
-
style:
|
|
330
|
+
style: S({
|
|
346
331
|
backgroundColor: n.content.settings.backgroundColor,
|
|
347
332
|
...n.darkMode ? { filter: "invert(1) hue-rotate(180deg)" } : {},
|
|
348
333
|
transition: "filter 300ms ease"
|
|
349
334
|
})
|
|
350
|
-
}, null, 4),
|
|
351
|
-
class:
|
|
335
|
+
}, null, 4), _("div", {
|
|
336
|
+
class: p(["tpl-canvas tpl:relative tpl:rounded-lg", {
|
|
352
337
|
"tpl-canvas--dark-mode": n.darkMode,
|
|
353
338
|
"tpl-preview-mode": n.previewMode
|
|
354
339
|
}]),
|
|
355
|
-
style:
|
|
340
|
+
style: S(F.value),
|
|
356
341
|
onClick: ne
|
|
357
|
-
}, [
|
|
358
|
-
modelValue:
|
|
359
|
-
"onUpdate:modelValue": a[2] ||= (e) =>
|
|
342
|
+
}, [k(T(he), {
|
|
343
|
+
modelValue: N.value,
|
|
344
|
+
"onUpdate:modelValue": a[2] ||= (e) => N.value = e,
|
|
360
345
|
group: "blocks",
|
|
361
346
|
animation: 150,
|
|
362
347
|
"ghost-class": "tpl-ghost",
|
|
@@ -367,73 +352,73 @@ var Nt = ["aria-label"], Pt = {
|
|
|
367
352
|
disabled: n.previewMode,
|
|
368
353
|
draggable: ".tpl-block-item",
|
|
369
354
|
"force-fallback": !0,
|
|
370
|
-
class:
|
|
355
|
+
class: p([
|
|
371
356
|
"tpl-canvas-blocks",
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
357
|
+
I.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
358
|
+
I.value && ee.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
359
|
+
I.value && !ee.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
375
360
|
]),
|
|
376
361
|
onDragenter: R,
|
|
377
362
|
onDragleave: z,
|
|
378
363
|
onDrop: te
|
|
379
364
|
}, {
|
|
380
|
-
default:
|
|
381
|
-
|
|
365
|
+
default: M(() => [I.value ? (e(), v("div", Lt, [
|
|
366
|
+
_("div", Rt, [k(T(Mt), {
|
|
382
367
|
size: 48,
|
|
383
368
|
"stroke-width": 1
|
|
384
369
|
})]),
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
370
|
+
_("p", zt, D(T(l).canvas.noBlocks), 1),
|
|
371
|
+
_("p", Bt, D(T(l).canvas.dragHint), 1),
|
|
372
|
+
O.value && T(f) ? (e(), v("p", Vt, [
|
|
373
|
+
d(D(T(l).canvas.aiHintChat) + " ", 1),
|
|
374
|
+
_("button", {
|
|
390
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)]",
|
|
391
376
|
onClick: a[0] ||= (e) => c("open-ai-chat")
|
|
392
|
-
}, [
|
|
377
|
+
}, [k(T(nt), {
|
|
393
378
|
size: 14,
|
|
394
379
|
"stroke-width": 2
|
|
395
|
-
}),
|
|
396
|
-
|
|
397
|
-
])) :
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
380
|
+
}), d(" " + D(T(f).aiMenu.aiAssistant), 1)]),
|
|
381
|
+
d(" " + D(T(l).canvas.aiHintChatSuffix), 1)
|
|
382
|
+
])) : b("", !0),
|
|
383
|
+
j.value && T(f) ? (e(), v("p", Ht, [
|
|
384
|
+
d(D(T(l).canvas.aiHintDesign) + " ", 1),
|
|
385
|
+
_("button", {
|
|
401
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)]",
|
|
402
387
|
onClick: a[1] ||= (e) => c("open-design-reference")
|
|
403
|
-
}, [
|
|
388
|
+
}, [k(T(Qe), {
|
|
404
389
|
size: 14,
|
|
405
390
|
"stroke-width": 2
|
|
406
|
-
}),
|
|
407
|
-
|
|
408
|
-
])) :
|
|
409
|
-
])) :
|
|
391
|
+
}), d(" " + D(T(f).aiMenu.designToTemplate), 1)]),
|
|
392
|
+
d(" " + D(T(l).canvas.aiHintDesignSuffix), 1)
|
|
393
|
+
])) : b("", !0)
|
|
394
|
+
])) : b("", !0), (e(!0), v(y, null, o(N.value, (i) => t((e(), v("div", {
|
|
410
395
|
key: i.id,
|
|
411
396
|
class: "tpl-block-item"
|
|
412
|
-
}, [
|
|
397
|
+
}, [_("div", Ut, [B(i.id) ? (e(), v("div", {
|
|
413
398
|
key: 0,
|
|
414
399
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
415
|
-
style:
|
|
400
|
+
style: S({
|
|
416
401
|
outline: `2px solid ${B(i.id).color}`,
|
|
417
402
|
outlineOffset: "-1px"
|
|
418
403
|
})
|
|
419
|
-
}, [
|
|
404
|
+
}, [_("span", {
|
|
420
405
|
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",
|
|
421
|
-
style:
|
|
406
|
+
style: S({
|
|
422
407
|
backgroundColor: B(i.id).color,
|
|
423
|
-
color:
|
|
408
|
+
color: T(ft)(B(i.id).color)
|
|
424
409
|
})
|
|
425
|
-
}, [
|
|
410
|
+
}, [_("span", Wt, D(B(i.id).name.charAt(0)), 1), d(" " + D(B(i.id).name), 1)], 4)], 4)) : b("", !0), k(le, {
|
|
426
411
|
block: i,
|
|
427
412
|
"is-selected": !n.previewMode && n.selectedBlockId === i.id && !B(i.id),
|
|
428
413
|
viewport: n.viewport,
|
|
429
414
|
"preview-mode": n.previewMode,
|
|
430
415
|
onSelect: (e) => n.previewMode || B(i.id) ? void 0 : c("select-block", i.id)
|
|
431
416
|
}, {
|
|
432
|
-
default:
|
|
417
|
+
default: M(() => [(e(), C(r(re(i)), {
|
|
433
418
|
block: i,
|
|
434
419
|
viewport: n.viewport,
|
|
435
|
-
onFetchData: (e) =>
|
|
436
|
-
onUpdate: (e) =>
|
|
420
|
+
onFetchData: (e) => ae(i, e),
|
|
421
|
+
onUpdate: (e) => T(m).updateBlock(i.id, e)
|
|
437
422
|
}, null, 40, [
|
|
438
423
|
"block",
|
|
439
424
|
"viewport",
|
|
@@ -447,45 +432,55 @@ var Nt = ["aria-label"], Pt = {
|
|
|
447
432
|
"viewport",
|
|
448
433
|
"preview-mode",
|
|
449
434
|
"onSelect"
|
|
450
|
-
])])])), [[
|
|
435
|
+
])])])), [[x, !T(h)?.isHidden(i.id)]])), 128))]),
|
|
451
436
|
_: 1
|
|
452
437
|
}, 8, [
|
|
453
438
|
"modelValue",
|
|
454
439
|
"disabled",
|
|
455
440
|
"class"
|
|
456
|
-
])], 6)], 12,
|
|
441
|
+
])], 6)], 12, It));
|
|
457
442
|
}
|
|
458
|
-
}), [["__scopeId", "data-v-
|
|
443
|
+
}), [["__scopeId", "data-v-1aed1727"]]), Kt = m({
|
|
444
|
+
name: "CustomBlockStylesheets",
|
|
445
|
+
setup() {
|
|
446
|
+
let e = A(Ne, null);
|
|
447
|
+
return () => e ? e.value.map((e, t) => c("style", {
|
|
448
|
+
key: t,
|
|
449
|
+
"data-tpl-custom-block-stylesheet": "",
|
|
450
|
+
innerHTML: e
|
|
451
|
+
})) : null;
|
|
452
|
+
}
|
|
453
|
+
}), qt = ["aria-label"], Jt = {
|
|
459
454
|
key: 0,
|
|
460
455
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
461
|
-
},
|
|
456
|
+
}, Yt = ["aria-label"], Xt = {
|
|
462
457
|
key: 0,
|
|
463
458
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
464
|
-
},
|
|
459
|
+
}, Zt = {
|
|
465
460
|
key: 1,
|
|
466
461
|
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)]"
|
|
467
|
-
},
|
|
462
|
+
}, Qt = [
|
|
468
463
|
"data-palette-type",
|
|
469
464
|
"aria-label",
|
|
470
465
|
"onClick",
|
|
471
466
|
"onKeydown"
|
|
472
|
-
],
|
|
467
|
+
], $t = { 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" }, en = {
|
|
473
468
|
key: 0,
|
|
474
469
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
475
|
-
},
|
|
470
|
+
}, tn = /* @__PURE__ */ m({
|
|
476
471
|
__name: "Sidebar",
|
|
477
472
|
setup(t) {
|
|
478
|
-
let { t: n, format: i } = V(), { t: a } =
|
|
479
|
-
function
|
|
473
|
+
let { t: n, format: i } = V(), { t: a } = lt(), s = A(Me, []), c = A(je, void 0), l = A(Le, null), d = A(Ve, {}), f = g(() => (d.savedModules?.moduleCount.value ?? 0) > 0), p = u(!1), m = u(!1);
|
|
474
|
+
function h() {
|
|
480
475
|
m.value || (p.value = !1);
|
|
481
476
|
}
|
|
482
|
-
function
|
|
477
|
+
function x() {
|
|
483
478
|
m.value = !0;
|
|
484
479
|
}
|
|
485
|
-
function
|
|
480
|
+
function w() {
|
|
486
481
|
m.value = !1;
|
|
487
482
|
}
|
|
488
|
-
let
|
|
483
|
+
let E = [
|
|
489
484
|
"section",
|
|
490
485
|
"image",
|
|
491
486
|
"title",
|
|
@@ -498,40 +493,40 @@ var Nt = ["aria-label"], Pt = {
|
|
|
498
493
|
"table",
|
|
499
494
|
"spacer",
|
|
500
495
|
"html"
|
|
501
|
-
],
|
|
502
|
-
let e =
|
|
496
|
+
], O = g(() => {
|
|
497
|
+
let e = E.map((e) => ({
|
|
503
498
|
type: e,
|
|
504
|
-
label:
|
|
499
|
+
label: ne(e, n)
|
|
505
500
|
}));
|
|
506
501
|
return d.plan && e.splice(-1, 0, {
|
|
507
502
|
type: "countdown",
|
|
508
|
-
label:
|
|
503
|
+
label: ne("countdown", n)
|
|
509
504
|
}), e;
|
|
510
|
-
}),
|
|
505
|
+
}), j = g(() => s.map((e) => ({
|
|
511
506
|
type: `custom:${e.type}`,
|
|
512
507
|
label: e.name,
|
|
513
508
|
isCustom: !0,
|
|
514
509
|
icon: e.icon
|
|
515
|
-
}))),
|
|
516
|
-
function
|
|
510
|
+
}))), N = g(() => [...O.value, ...j.value]);
|
|
511
|
+
function P(e) {
|
|
517
512
|
if (e.isCustom) {
|
|
518
513
|
let t = e.type.replace("custom:", ""), n = s.find((e) => e.type === t);
|
|
519
|
-
if (n) return
|
|
514
|
+
if (n) return ee(n);
|
|
520
515
|
}
|
|
521
|
-
return
|
|
516
|
+
return z(e.type, c);
|
|
522
517
|
}
|
|
523
|
-
function
|
|
524
|
-
if (!
|
|
525
|
-
let t =
|
|
526
|
-
|
|
518
|
+
function F(e) {
|
|
519
|
+
if (!l) return;
|
|
520
|
+
let t = P(e);
|
|
521
|
+
l.addBlock(t), l.selectBlock(t.id);
|
|
527
522
|
}
|
|
528
|
-
function
|
|
529
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
523
|
+
function I(e, t) {
|
|
524
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), F(t));
|
|
530
525
|
}
|
|
531
|
-
return (t, s) => (e(),
|
|
532
|
-
"aria-label":
|
|
526
|
+
return (t, s) => (e(), v("aside", {
|
|
527
|
+
"aria-label": T(n).sidebarNav.palette,
|
|
533
528
|
class: "tpl-sidebar-rail tpl:absolute tpl:top-14 tpl:bottom-0 tpl:left-0 tpl:z-40 tpl:overflow-hidden",
|
|
534
|
-
style:
|
|
529
|
+
style: S({
|
|
535
530
|
width: p.value ? "200px" : "48px",
|
|
536
531
|
backgroundColor: "var(--tpl-bg-elevated)",
|
|
537
532
|
borderRight: "1px solid var(--tpl-border)",
|
|
@@ -539,69 +534,69 @@ var Nt = ["aria-label"], Pt = {
|
|
|
539
534
|
transition: "width 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
540
535
|
}),
|
|
541
536
|
onMouseenter: s[1] ||= (e) => p.value = !0,
|
|
542
|
-
onMouseleave:
|
|
537
|
+
onMouseleave: h,
|
|
543
538
|
onFocusin: s[2] ||= (e) => p.value = !0,
|
|
544
539
|
onFocusout: s[3] ||= (e) => p.value = !1
|
|
545
|
-
}, [f.value &&
|
|
540
|
+
}, [f.value && T(a) ? (e(), v("div", Jt, [_("button", {
|
|
546
541
|
type: "button",
|
|
547
|
-
"aria-label":
|
|
542
|
+
"aria-label": T(n).sidebarNav.browseModules,
|
|
548
543
|
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)]",
|
|
549
|
-
style:
|
|
550
|
-
onClick: s[0] ||= (e) =>
|
|
544
|
+
style: S({ justifyContent: p.value ? "flex-start" : "center" }),
|
|
545
|
+
onClick: s[0] ||= (e) => T(d).savedModules?.openBrowser()
|
|
551
546
|
}, [
|
|
552
|
-
|
|
547
|
+
k(T(Je), {
|
|
553
548
|
size: 20,
|
|
554
549
|
"stroke-width": 1.5,
|
|
555
550
|
class: "tpl:shrink-0"
|
|
556
551
|
}),
|
|
557
|
-
p.value ? (e(),
|
|
558
|
-
p.value ? (e(),
|
|
559
|
-
], 12,
|
|
560
|
-
"model-value":
|
|
552
|
+
p.value ? (e(), v("span", Xt, D(T(a).modules.title), 1)) : b("", !0),
|
|
553
|
+
p.value ? (e(), v("span", Zt, D(T(d).savedModules?.moduleCount.value ?? 0), 1)) : b("", !0)
|
|
554
|
+
], 12, Yt)])) : b("", !0), k(T(he), {
|
|
555
|
+
"model-value": N.value,
|
|
561
556
|
group: {
|
|
562
557
|
name: "blocks",
|
|
563
558
|
pull: "clone",
|
|
564
559
|
put: !1
|
|
565
560
|
},
|
|
566
|
-
clone:
|
|
561
|
+
clone: P,
|
|
567
562
|
sort: !1,
|
|
568
563
|
animation: 150,
|
|
569
564
|
"ghost-class": "tpl-ghost",
|
|
570
565
|
"force-fallback": !0,
|
|
571
566
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:p-1",
|
|
572
|
-
onChoose:
|
|
573
|
-
onEnd:
|
|
567
|
+
onChoose: x,
|
|
568
|
+
onEnd: w
|
|
574
569
|
}, {
|
|
575
|
-
default:
|
|
570
|
+
default: M(() => [(e(!0), v(y, null, o(N.value, (t) => (e(), v("button", {
|
|
576
571
|
key: t.type,
|
|
577
572
|
type: "button",
|
|
578
573
|
"data-palette-type": t.type,
|
|
579
|
-
"aria-label":
|
|
574
|
+
"aria-label": T(i)(T(n).sidebarNav.insertBlock, { block: t.label }),
|
|
580
575
|
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",
|
|
581
|
-
style:
|
|
582
|
-
onClick: (e) =>
|
|
583
|
-
onKeydown: (e) =>
|
|
584
|
-
}, [
|
|
576
|
+
style: S({ justifyContent: p.value ? "flex-start" : "center" }),
|
|
577
|
+
onClick: (e) => F(t),
|
|
578
|
+
onKeydown: (e) => I(e, t)
|
|
579
|
+
}, [_("div", $t, [T(Ye)[t.type] ? (e(), C(r(T(Ye)[t.type]), {
|
|
585
580
|
key: 0,
|
|
586
581
|
size: 20,
|
|
587
582
|
"stroke-width": 1.5
|
|
588
|
-
})) : t.isCustom ? (e(),
|
|
583
|
+
})) : t.isCustom ? (e(), C(ae, {
|
|
589
584
|
key: 1,
|
|
590
585
|
icon: t.icon,
|
|
591
586
|
size: 20
|
|
592
|
-
}, null, 8, ["icon"])) :
|
|
587
|
+
}, null, 8, ["icon"])) : b("", !0)]), p.value ? (e(), v("span", en, D(t.label), 1)) : b("", !0)], 44, Qt))), 128))]),
|
|
593
588
|
_: 1
|
|
594
|
-
}, 8, ["model-value"])], 44,
|
|
589
|
+
}, 8, ["model-value"])], 44, qt));
|
|
595
590
|
}
|
|
596
591
|
});
|
|
597
592
|
//#endregion
|
|
598
593
|
//#region src/composables/useMergeTagField.ts
|
|
599
|
-
function
|
|
600
|
-
let { modelValue: t, emit: r, elementRef: i } = e, { canRequestMergeTag: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel:
|
|
601
|
-
|
|
602
|
-
|
|
594
|
+
function nn(e) {
|
|
595
|
+
let { modelValue: t, emit: r, elementRef: i } = e, { canRequestMergeTag: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: c, requestMergeTag: d, syntax: f } = ut(), p = u(!1), m = !1, h = !1;
|
|
596
|
+
l() && w(() => {
|
|
597
|
+
h = !0;
|
|
603
598
|
});
|
|
604
|
-
let _ =
|
|
599
|
+
let _ = g(() => {
|
|
605
600
|
let e = t();
|
|
606
601
|
if (!e) return [];
|
|
607
602
|
let n = [], r = `(${f.value.source}|${f.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
@@ -614,11 +609,11 @@ function Qt(e) {
|
|
|
614
609
|
s(t) ? n.push({
|
|
615
610
|
type: "mergeTag",
|
|
616
611
|
value: t,
|
|
617
|
-
label:
|
|
618
|
-
}) :
|
|
612
|
+
label: c(t)
|
|
613
|
+
}) : P(t, f) ? n.push({
|
|
619
614
|
type: "logicMergeTag",
|
|
620
615
|
value: t,
|
|
621
|
-
keyword:
|
|
616
|
+
keyword: N(t, f)
|
|
622
617
|
}) : n.push({
|
|
623
618
|
type: "text",
|
|
624
619
|
value: t
|
|
@@ -628,7 +623,7 @@ function Qt(e) {
|
|
|
628
623
|
type: "text",
|
|
629
624
|
value: e.slice(a)
|
|
630
625
|
}), n;
|
|
631
|
-
}), v =
|
|
626
|
+
}), v = g(() => _.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
632
627
|
function y() {
|
|
633
628
|
p.value = !0, n(() => {
|
|
634
629
|
i.value?.focus();
|
|
@@ -645,7 +640,7 @@ function Qt(e) {
|
|
|
645
640
|
function S() {
|
|
646
641
|
r("");
|
|
647
642
|
}
|
|
648
|
-
async function
|
|
643
|
+
async function C() {
|
|
649
644
|
let e = p.value && i.value ? i.value.selectionStart ?? t().length : t().length;
|
|
650
645
|
m = !0;
|
|
651
646
|
let a;
|
|
@@ -654,10 +649,10 @@ function Qt(e) {
|
|
|
654
649
|
} finally {
|
|
655
650
|
m = !1;
|
|
656
651
|
}
|
|
657
|
-
if (!
|
|
652
|
+
if (!h && a) {
|
|
658
653
|
let o = t().slice(0, e), s = t().slice(e);
|
|
659
654
|
r(o + a.value + s), p.value = !0, n(() => {
|
|
660
|
-
if (
|
|
655
|
+
if (h) return;
|
|
661
656
|
let t = e + a.value.length;
|
|
662
657
|
i.value?.focus(), i.value?.setSelectionRange(t, t);
|
|
663
658
|
});
|
|
@@ -673,15 +668,15 @@ function Qt(e) {
|
|
|
673
668
|
stopEditing: b,
|
|
674
669
|
handleInput: x,
|
|
675
670
|
clearValue: S,
|
|
676
|
-
insertMergeTag:
|
|
671
|
+
insertMergeTag: C
|
|
677
672
|
};
|
|
678
673
|
}
|
|
679
674
|
//#endregion
|
|
680
675
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
681
|
-
var
|
|
676
|
+
var rn = ["aria-label", "onKeydown"], an = ["data-tooltip"], on = ["data-tooltip"], sn = {
|
|
682
677
|
key: 2,
|
|
683
678
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
684
|
-
},
|
|
679
|
+
}, cn = ["aria-label", "title"], ln = /* @__PURE__ */ m({
|
|
685
680
|
__name: "MergeTagSegments",
|
|
686
681
|
props: {
|
|
687
682
|
segments: {},
|
|
@@ -694,14 +689,14 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
694
689
|
function a() {
|
|
695
690
|
r("edit");
|
|
696
691
|
}
|
|
697
|
-
return (n, s) => (e(),
|
|
692
|
+
return (n, s) => (e(), v("div", {
|
|
698
693
|
role: "button",
|
|
699
694
|
tabindex: "0",
|
|
700
|
-
"aria-label":
|
|
701
|
-
class:
|
|
695
|
+
"aria-label": T(i).mergeTag.clickToEdit,
|
|
696
|
+
class: p([t.displayClass, { "tpl-pulse-fill": t.pulse }]),
|
|
702
697
|
onClick: a,
|
|
703
|
-
onKeydown: [
|
|
704
|
-
}, [(e(!0),
|
|
698
|
+
onKeydown: [E(a, ["enter"]), E(h(a, ["prevent"]), ["space"])]
|
|
699
|
+
}, [(e(!0), v(y, null, o(t.segments, (t, n) => (e(), v(y, { key: `${t.type}-${n}-${t.value}` }, [t.type === "mergeTag" ? (e(), v("span", {
|
|
705
700
|
key: 0,
|
|
706
701
|
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",
|
|
707
702
|
"data-tooltip": t.value,
|
|
@@ -709,7 +704,7 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
709
704
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
710
705
|
color: "var(--tpl-primary)"
|
|
711
706
|
}
|
|
712
|
-
},
|
|
707
|
+
}, D(t.label), 9, an)) : t.type === "logicMergeTag" ? (e(), v("span", {
|
|
713
708
|
key: 1,
|
|
714
709
|
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",
|
|
715
710
|
"data-tooltip": t.value,
|
|
@@ -718,44 +713,44 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
718
713
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
719
714
|
color: "var(--tpl-primary)"
|
|
720
715
|
}
|
|
721
|
-
},
|
|
716
|
+
}, D(t.keyword), 9, on)) : (e(), v("span", sn, D(t.value), 1))], 64))), 128)), _("button", {
|
|
722
717
|
type: "button",
|
|
723
718
|
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",
|
|
724
|
-
"aria-label":
|
|
725
|
-
title:
|
|
726
|
-
onClick: s[0] ||=
|
|
727
|
-
}, [
|
|
719
|
+
"aria-label": T(i).mergeTag.remove,
|
|
720
|
+
title: T(i).mergeTag.remove,
|
|
721
|
+
onClick: s[0] ||= h((e) => r("clear"), ["stop"])
|
|
722
|
+
}, [k(T(st), {
|
|
728
723
|
size: 12,
|
|
729
724
|
"stroke-width": 2.5
|
|
730
|
-
})], 8,
|
|
725
|
+
})], 8, cn)], 42, rn));
|
|
731
726
|
}
|
|
732
|
-
}),
|
|
727
|
+
}), un = [
|
|
733
728
|
"aria-label",
|
|
734
729
|
"title",
|
|
735
730
|
"disabled"
|
|
736
|
-
],
|
|
731
|
+
], dn = "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)]", fn = /* @__PURE__ */ m({
|
|
737
732
|
__name: "MergeTagInsertButton",
|
|
738
733
|
props: { disabled: { type: Boolean } },
|
|
739
734
|
emits: ["insert"],
|
|
740
735
|
setup(t) {
|
|
741
736
|
let { t: n } = V();
|
|
742
|
-
return (r, i) => (e(),
|
|
737
|
+
return (r, i) => (e(), v("button", {
|
|
743
738
|
type: "button",
|
|
744
|
-
class:
|
|
745
|
-
"aria-label":
|
|
746
|
-
title:
|
|
739
|
+
class: p([dn, "tpl:mt-1.5"]),
|
|
740
|
+
"aria-label": T(n).mergeTag.insert,
|
|
741
|
+
title: T(n).mergeTag.insert,
|
|
747
742
|
disabled: t.disabled,
|
|
748
743
|
onClick: i[0] ||= (e) => r.$emit("insert")
|
|
749
|
-
}, [
|
|
744
|
+
}, [k(T(tt), {
|
|
750
745
|
size: 12,
|
|
751
746
|
"stroke-width": 2
|
|
752
|
-
}),
|
|
747
|
+
}), d(" " + D(T(n).mergeTag.insert), 1)], 10, un));
|
|
753
748
|
}
|
|
754
|
-
}),
|
|
749
|
+
}), pn = { key: 0 }, mn = { key: 1 }, hn = [
|
|
755
750
|
"value",
|
|
756
751
|
"placeholder",
|
|
757
752
|
"rows"
|
|
758
|
-
],
|
|
753
|
+
], gn = "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)]", _n = "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 = /* @__PURE__ */ m({
|
|
759
754
|
__name: "MergeTagTextarea",
|
|
760
755
|
props: {
|
|
761
756
|
modelValue: {},
|
|
@@ -764,46 +759,46 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
764
759
|
},
|
|
765
760
|
emits: ["update:modelValue"],
|
|
766
761
|
setup(t, { emit: n }) {
|
|
767
|
-
let r = t, i = n, a =
|
|
762
|
+
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } = nn({
|
|
768
763
|
modelValue: () => r.modelValue,
|
|
769
764
|
emit: (e) => i("update:modelValue", e),
|
|
770
765
|
elementRef: a
|
|
771
766
|
});
|
|
772
|
-
return (n, r) =>
|
|
773
|
-
segments:
|
|
774
|
-
"display-class":
|
|
775
|
-
onEdit:
|
|
776
|
-
onClear:
|
|
767
|
+
return (n, r) => T(s) && !T(d) ? (e(), v("div", pn, [k(ln, {
|
|
768
|
+
segments: T(o),
|
|
769
|
+
"display-class": _n,
|
|
770
|
+
onEdit: T(f),
|
|
771
|
+
onClear: T(g)
|
|
777
772
|
}, null, 8, [
|
|
778
773
|
"segments",
|
|
779
774
|
"onEdit",
|
|
780
775
|
"onClear"
|
|
781
|
-
]),
|
|
776
|
+
]), T(c) ? (e(), C(fn, {
|
|
782
777
|
key: 0,
|
|
783
|
-
disabled:
|
|
784
|
-
onInsert:
|
|
785
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
778
|
+
disabled: T(l),
|
|
779
|
+
onInsert: T(y)
|
|
780
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div", mn, [_("textarea", {
|
|
786
781
|
ref_key: "textareaRef",
|
|
787
782
|
ref: a,
|
|
788
|
-
class:
|
|
783
|
+
class: p(gn),
|
|
789
784
|
value: t.modelValue,
|
|
790
785
|
placeholder: t.placeholder,
|
|
791
786
|
rows: t.rows,
|
|
792
|
-
onInput: r[0] ||= (...e) =>
|
|
793
|
-
onBlur: r[1] ||= (...e) =>
|
|
794
|
-
onKeydown: r[2] ||=
|
|
795
|
-
}, null, 40,
|
|
787
|
+
onInput: r[0] ||= (...e) => T(h) && T(h)(...e),
|
|
788
|
+
onBlur: r[1] ||= (...e) => T(m) && T(m)(...e),
|
|
789
|
+
onKeydown: r[2] ||= E((...e) => T(m) && T(m)(...e), ["escape"])
|
|
790
|
+
}, null, 40, hn), T(c) ? (e(), C(fn, {
|
|
796
791
|
key: 0,
|
|
797
|
-
disabled:
|
|
798
|
-
onInsert:
|
|
799
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
792
|
+
disabled: T(l),
|
|
793
|
+
onInsert: T(y)
|
|
794
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)]));
|
|
800
795
|
}
|
|
801
|
-
}),
|
|
796
|
+
}), yn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, bn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, xn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Sn = { class: "tpl:mb-3.5" }, Cn = { 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)]" }, wn = ["onClick"], Tn = { class: "tpl:flex tpl:items-stretch" }, En = ["value"], Dn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, On = { class: "tpl:mb-3.5" }, kn = ["value"], An = ["value"], jn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Mn = ["value"], Nn = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Pn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Fn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, In = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Ln = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Rn = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, zn = { 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)]" }, Bn = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Vn = { class: "tpl:mb-1 tpl:last:mb-0" }, Hn = { class: "tpl:mb-1 tpl:last:mb-0" }, Un = { class: "tpl:mb-1 tpl:last:mb-0" }, Wn = 150, Gn = /* @__PURE__ */ m({
|
|
802
797
|
__name: "TemplateSettings",
|
|
803
798
|
props: { settings: {} },
|
|
804
799
|
emits: ["update"],
|
|
805
800
|
setup(t, { emit: n }) {
|
|
806
|
-
let r = t, i = n, { t: a } = V(), s =
|
|
801
|
+
let r = t, i = n, { t: a } = V(), s = Oe(Pe, "TemplateSettings"), c = g(() => s.fonts.value), l = g(() => c.value.some((e) => e.value === r.settings.fontFamily) ? r.settings.fontFamily : s.defaultFont.value), u = [
|
|
807
802
|
{
|
|
808
803
|
value: 480,
|
|
809
804
|
label: "480px"
|
|
@@ -821,95 +816,95 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
821
816
|
label: "800px"
|
|
822
817
|
}
|
|
823
818
|
];
|
|
824
|
-
return (n, r) => (e(),
|
|
825
|
-
|
|
826
|
-
|
|
819
|
+
return (n, r) => (e(), v("aside", yn, [_("div", bn, [
|
|
820
|
+
_("div", { class: p(T(_t)) }, [
|
|
821
|
+
_("div", xn, [k(T(Nt), {
|
|
827
822
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
828
823
|
size: 14,
|
|
829
824
|
"stroke-width": 2
|
|
830
|
-
}),
|
|
831
|
-
|
|
825
|
+
}), _("span", null, D(T(a).templateSettings.layout), 1)]),
|
|
826
|
+
_("div", Sn, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.widthPreset), 3), _("div", Cn, [(e(), v(y, null, o(u, (e) => _("button", {
|
|
832
827
|
key: e.value,
|
|
833
828
|
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)]",
|
|
834
|
-
style:
|
|
829
|
+
style: S({
|
|
835
830
|
backgroundColor: t.settings.width === e.value ? "var(--tpl-bg)" : "transparent",
|
|
836
831
|
color: t.settings.width === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
837
832
|
boxShadow: t.settings.width === e.value ? "var(--tpl-shadow)" : "none"
|
|
838
833
|
}),
|
|
839
834
|
onClick: (t) => i("update", { width: e.value })
|
|
840
|
-
},
|
|
841
|
-
|
|
835
|
+
}, D(e.label), 13, wn)), 64))])]),
|
|
836
|
+
_("div", null, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.customWidth), 3), _("div", Tn, [_("input", {
|
|
842
837
|
type: "number",
|
|
843
|
-
class:
|
|
838
|
+
class: p(T(K)),
|
|
844
839
|
value: t.settings.width,
|
|
845
840
|
min: "300",
|
|
846
841
|
max: "900",
|
|
847
842
|
onInput: r[0] ||= (e) => i("update", { width: Number(e.target.value) })
|
|
848
|
-
}, null, 42,
|
|
843
|
+
}, null, 42, En), _("span", { class: p(T(G)) }, "px", 2)])])
|
|
849
844
|
], 2),
|
|
850
|
-
|
|
851
|
-
|
|
845
|
+
_("div", { class: p(T(_t)) }, [
|
|
846
|
+
_("div", Dn, [k(T(xt), {
|
|
852
847
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
853
848
|
size: 14,
|
|
854
849
|
"stroke-width": 2
|
|
855
|
-
}),
|
|
856
|
-
|
|
850
|
+
}), _("span", null, D(T(a).templateSettings.appearance), 1)]),
|
|
851
|
+
_("div", On, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.backgroundColor), 3), k(q, {
|
|
857
852
|
"model-value": t.settings.backgroundColor,
|
|
858
|
-
placeholder:
|
|
853
|
+
placeholder: T(vt),
|
|
859
854
|
"onUpdate:modelValue": r[1] ||= (e) => i("update", { backgroundColor: e })
|
|
860
855
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
861
|
-
|
|
862
|
-
class:
|
|
856
|
+
_("div", null, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.fontFamily), 3), _("select", {
|
|
857
|
+
class: p(T(U)),
|
|
863
858
|
value: l.value,
|
|
864
859
|
onChange: r[2] ||= (e) => i("update", { fontFamily: e.target.value })
|
|
865
|
-
}, [(e(!0),
|
|
860
|
+
}, [(e(!0), v(y, null, o(c.value, (t) => (e(), v("option", {
|
|
866
861
|
key: t.value,
|
|
867
862
|
value: t.value
|
|
868
|
-
},
|
|
863
|
+
}, D(t.label), 9, An))), 128))], 42, kn)])
|
|
869
864
|
], 2),
|
|
870
|
-
|
|
865
|
+
_("div", { class: p(T(_t)) }, [_("div", jn, [k(T(St), {
|
|
871
866
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
872
867
|
size: 14,
|
|
873
868
|
"stroke-width": 2
|
|
874
|
-
}),
|
|
875
|
-
|
|
876
|
-
|
|
869
|
+
}), _("span", null, D(T(a).templateSettings.language), 1)]), _("div", null, [
|
|
870
|
+
_("label", { class: p(T(W)) }, D(T(a).templateSettings.contentLocale), 3),
|
|
871
|
+
_("input", {
|
|
877
872
|
type: "text",
|
|
878
|
-
class:
|
|
873
|
+
class: p(T(U)),
|
|
879
874
|
value: t.settings.locale ?? "",
|
|
880
875
|
placeholder: "en",
|
|
881
876
|
spellcheck: "false",
|
|
882
877
|
autocapitalize: "off",
|
|
883
878
|
autocomplete: "off",
|
|
884
879
|
onInput: r[3] ||= (e) => i("update", { locale: e.target.value.trim() || void 0 })
|
|
885
|
-
}, null, 42,
|
|
886
|
-
|
|
880
|
+
}, null, 42, Mn),
|
|
881
|
+
_("p", Nn, D(T(a).templateSettings.contentLocaleHint), 1)
|
|
887
882
|
])], 2),
|
|
888
|
-
|
|
883
|
+
_("div", { class: p(T(_t)) }, [_("div", Pn, [k(T(Xe), {
|
|
889
884
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
890
885
|
size: 14,
|
|
891
886
|
"stroke-width": 2
|
|
892
|
-
}),
|
|
887
|
+
}), _("span", null, D(T(a).templateSettings.preheaderText), 1)]), _("div", null, [k(vn, {
|
|
893
888
|
"model-value": t.settings.preheaderText ?? "",
|
|
894
|
-
placeholder:
|
|
889
|
+
placeholder: T(a).templateSettings.preheaderTextPlaceholder,
|
|
895
890
|
rows: 2,
|
|
896
891
|
"onUpdate:modelValue": r[4] ||= (e) => i("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
897
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
898
|
-
|
|
892
|
+
}, null, 8, ["model-value", "placeholder"]), _("div", Fn, [_("span", In, D(T(a).templateSettings.preheaderTextHint), 1), _("span", Ln, D((t.settings.preheaderText ?? "").length) + "/" + D(Wn), 1)])])], 2),
|
|
893
|
+
_("div", Rn, [_("div", zn, [k(T($e), {
|
|
899
894
|
size: 14,
|
|
900
895
|
"stroke-width": 2
|
|
901
|
-
}),
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
896
|
+
}), _("span", null, D(T(a).templateSettings.tips), 1)]), _("ul", Bn, [
|
|
897
|
+
_("li", Vn, D(T(a).templateSettings.tip1), 1),
|
|
898
|
+
_("li", Hn, D(T(a).templateSettings.tip2), 1),
|
|
899
|
+
_("li", Un, D(T(a).templateSettings.tip3), 1)
|
|
905
900
|
])])
|
|
906
901
|
])]));
|
|
907
902
|
}
|
|
908
|
-
}),
|
|
903
|
+
}), Kn = { key: 0 }, qn = { key: 1 }, Jn = [
|
|
909
904
|
"type",
|
|
910
905
|
"value",
|
|
911
906
|
"placeholder"
|
|
912
|
-
],
|
|
907
|
+
], Yn = "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)]", Z = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
913
908
|
__name: "MergeTagInput",
|
|
914
909
|
props: {
|
|
915
910
|
modelValue: {},
|
|
@@ -922,46 +917,46 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
922
917
|
},
|
|
923
918
|
emits: ["update:modelValue"],
|
|
924
919
|
setup(t, { emit: n }) {
|
|
925
|
-
let r = t, i = n, a =
|
|
920
|
+
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } = nn({
|
|
926
921
|
modelValue: () => r.modelValue,
|
|
927
922
|
emit: (e) => i("update:modelValue", e),
|
|
928
923
|
elementRef: a
|
|
929
924
|
});
|
|
930
|
-
return (n, r) =>
|
|
931
|
-
segments:
|
|
932
|
-
"display-class":
|
|
925
|
+
return (n, r) => T(s) && !T(d) ? (e(), v("div", Kn, [k(ln, {
|
|
926
|
+
segments: T(o),
|
|
927
|
+
"display-class": Yn,
|
|
933
928
|
pulse: t.pulse,
|
|
934
|
-
onEdit:
|
|
935
|
-
onClear:
|
|
929
|
+
onEdit: T(f),
|
|
930
|
+
onClear: T(g)
|
|
936
931
|
}, null, 8, [
|
|
937
932
|
"segments",
|
|
938
933
|
"pulse",
|
|
939
934
|
"onEdit",
|
|
940
935
|
"onClear"
|
|
941
|
-
]),
|
|
936
|
+
]), T(c) ? (e(), C(fn, {
|
|
942
937
|
key: 0,
|
|
943
|
-
disabled:
|
|
944
|
-
onInsert:
|
|
945
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
938
|
+
disabled: T(l),
|
|
939
|
+
onInsert: T(y)
|
|
940
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div", qn, [_("input", {
|
|
946
941
|
ref_key: "inputRef",
|
|
947
942
|
ref: a,
|
|
948
943
|
type: t.type,
|
|
949
|
-
class:
|
|
944
|
+
class: p([T(U), { "tpl-pulse-fill": t.pulse }]),
|
|
950
945
|
value: t.modelValue,
|
|
951
946
|
placeholder: t.placeholder,
|
|
952
|
-
onInput: r[0] ||= (...e) =>
|
|
953
|
-
onBlur: r[1] ||= (...e) =>
|
|
954
|
-
onKeydown: r[2] ||=
|
|
955
|
-
}, null, 42,
|
|
947
|
+
onInput: r[0] ||= (...e) => T(h) && T(h)(...e),
|
|
948
|
+
onBlur: r[1] ||= (...e) => T(m) && T(m)(...e),
|
|
949
|
+
onKeydown: r[2] ||= E((...e) => T(m) && T(m)(...e), ["escape"])
|
|
950
|
+
}, null, 42, Jn), T(c) ? (e(), C(fn, {
|
|
956
951
|
key: 0,
|
|
957
|
-
disabled:
|
|
958
|
-
onInsert:
|
|
959
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
952
|
+
disabled: T(l),
|
|
953
|
+
onInsert: T(y)
|
|
954
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)]));
|
|
960
955
|
}
|
|
961
|
-
}), [["__scopeId", "data-v-358207dd"]]),
|
|
956
|
+
}), [["__scopeId", "data-v-358207dd"]]), Xn = { class: "tpl:mb-3.5" }, Zn = ["value"], Qn = { value: "" }, $n = ["value"], er = { class: "tpl:mb-3.5" }, tr = { class: "tpl:mb-3.5" }, nr = {
|
|
962
957
|
key: 0,
|
|
963
958
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
964
|
-
},
|
|
959
|
+
}, rr = ["checked"], ir = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, ar = { class: "tpl:mb-3.5" }, or = { class: "tpl:mb-3.5" }, sr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, cr = { class: "tpl:mb-3.5" }, lr = { class: "tpl:flex tpl:items-stretch" }, ur = ["value"], dr = { class: "tpl:mb-3.5" }, fr = { class: "tpl:flex tpl:items-stretch" }, pr = ["value"], mr = /* @__PURE__ */ m({
|
|
965
960
|
__name: "ButtonToolbar",
|
|
966
961
|
props: {
|
|
967
962
|
block: {},
|
|
@@ -973,60 +968,60 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
973
968
|
function a(e, t) {
|
|
974
969
|
r("update", { [e]: t });
|
|
975
970
|
}
|
|
976
|
-
return (n, r) => (e(),
|
|
977
|
-
|
|
978
|
-
class:
|
|
971
|
+
return (n, r) => (e(), v(y, null, [
|
|
972
|
+
_("div", Xn, [_("label", { class: p(T(W)) }, D(T(i).button.fontFamily), 3), _("select", {
|
|
973
|
+
class: p(T(U)),
|
|
979
974
|
value: t.block.fontFamily || "",
|
|
980
975
|
onChange: r[0] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
981
|
-
}, [
|
|
976
|
+
}, [_("option", Qn, D(T(i).button.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
982
977
|
key: t.value,
|
|
983
978
|
value: t.value
|
|
984
|
-
},
|
|
985
|
-
|
|
979
|
+
}, D(t.label), 9, $n))), 128))], 42, Zn)]),
|
|
980
|
+
_("div", er, [_("label", { class: p(T(W)) }, D(T(i).button.text), 3), k(Z, {
|
|
986
981
|
"model-value": t.block.text,
|
|
987
982
|
type: "text",
|
|
988
983
|
"onUpdate:modelValue": r[1] ||= (e) => a("text", e)
|
|
989
984
|
}, null, 8, ["model-value"])]),
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
985
|
+
_("div", tr, [
|
|
986
|
+
_("label", { class: p(T(W)) }, D(T(i).button.url), 3),
|
|
987
|
+
k(Z, {
|
|
993
988
|
"model-value": t.block.url,
|
|
994
989
|
type: "url",
|
|
995
|
-
placeholder:
|
|
990
|
+
placeholder: T(i).button.urlPlaceholder,
|
|
996
991
|
"onUpdate:modelValue": r[2] ||= (e) => a("url", e)
|
|
997
992
|
}, null, 8, ["model-value", "placeholder"]),
|
|
998
|
-
t.block.url ? (e(),
|
|
993
|
+
t.block.url ? (e(), v("label", nr, [_("input", {
|
|
999
994
|
type: "checkbox",
|
|
1000
995
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1001
996
|
checked: t.block.openInNewTab ?? !1,
|
|
1002
997
|
onChange: r[3] ||= (e) => a("openInNewTab", e.target.checked)
|
|
1003
|
-
}, null, 40,
|
|
998
|
+
}, null, 40, rr), d(" " + D(T(i).button.openInNewTab), 1)])) : b("", !0)
|
|
1004
999
|
]),
|
|
1005
|
-
|
|
1000
|
+
_("div", ir, [_("div", ar, [_("label", { class: p(T(W)) }, D(T(i).button.background), 3), k(q, {
|
|
1006
1001
|
"model-value": t.block.backgroundColor,
|
|
1007
1002
|
"onUpdate:modelValue": r[4] ||= (e) => a("backgroundColor", e)
|
|
1008
|
-
}, null, 8, ["model-value"])]),
|
|
1003
|
+
}, null, 8, ["model-value"])]), _("div", or, [_("label", { class: p(T(W)) }, D(T(i).button.textColor), 3), k(q, {
|
|
1009
1004
|
"model-value": t.block.textColor,
|
|
1010
1005
|
"onUpdate:modelValue": r[5] ||= (e) => a("textColor", e)
|
|
1011
1006
|
}, null, 8, ["model-value"])])]),
|
|
1012
|
-
|
|
1007
|
+
_("div", sr, [_("div", cr, [_("label", { class: p(T(W)) }, D(T(i).button.borderRadius), 3), _("div", lr, [_("input", {
|
|
1013
1008
|
type: "number",
|
|
1014
|
-
class:
|
|
1009
|
+
class: p(T(K)),
|
|
1015
1010
|
value: t.block.borderRadius,
|
|
1016
1011
|
min: "0",
|
|
1017
1012
|
max: "50",
|
|
1018
1013
|
onInput: r[6] ||= (e) => a("borderRadius", Number(e.target.value))
|
|
1019
|
-
}, null, 42,
|
|
1014
|
+
}, null, 42, ur), _("span", { class: p(T(G)) }, "px", 2)])]), _("div", dr, [_("label", { class: p(T(W)) }, D(T(i).button.fontSize), 3), _("div", fr, [_("input", {
|
|
1020
1015
|
type: "number",
|
|
1021
|
-
class:
|
|
1016
|
+
class: p(T(K)),
|
|
1022
1017
|
value: t.block.fontSize,
|
|
1023
1018
|
min: "10",
|
|
1024
1019
|
max: "36",
|
|
1025
1020
|
onInput: r[7] ||= (e) => a("fontSize", Number(e.target.value))
|
|
1026
|
-
}, null, 42,
|
|
1021
|
+
}, null, 42, pr), _("span", { class: p(T(G)) }, "px", 2)])])])
|
|
1027
1022
|
], 64));
|
|
1028
1023
|
}
|
|
1029
|
-
}),
|
|
1024
|
+
}), hr = { class: "spacing-control" }, gr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, _r = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, vr = { class: "tpl:flex tpl:items-center" }, yr = ["aria-label"], br = ["value", "aria-label"], xr = ["aria-label"], Sr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Cr = { class: "tpl:flex tpl:items-center" }, wr = ["aria-label"], Tr = ["value", "aria-label"], Er = ["aria-label"], Dr = ["aria-label", "title"], Or = { class: "tpl:flex tpl:items-center" }, kr = ["aria-label"], Ar = ["value", "aria-label"], jr = ["aria-label"], Mr = { class: "tpl:flex tpl:items-center" }, Nr = ["aria-label"], Pr = ["value", "aria-label"], Fr = ["aria-label"], Q = "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)]", Ir = "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)]", Lr = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
1030
1025
|
__name: "SpacingControl",
|
|
1031
1026
|
props: {
|
|
1032
1027
|
modelValue: {},
|
|
@@ -1034,11 +1029,11 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1034
1029
|
},
|
|
1035
1030
|
emits: ["update:modelValue"],
|
|
1036
1031
|
setup(t, { emit: n }) {
|
|
1037
|
-
let r = t, i = n, { t: o } = V(), s =
|
|
1032
|
+
let r = t, i = n, { t: o } = V(), s = g(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), c = u(s.value);
|
|
1038
1033
|
a(s, (e) => {
|
|
1039
1034
|
!e && c.value && (c.value = !1);
|
|
1040
1035
|
});
|
|
1041
|
-
function
|
|
1036
|
+
function l(e, t) {
|
|
1042
1037
|
let n = r.modelValue[e], a = Math.max(0, n + t);
|
|
1043
1038
|
c.value ? i("update:modelValue", {
|
|
1044
1039
|
top: a,
|
|
@@ -1062,7 +1057,7 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1062
1057
|
[e]: n
|
|
1063
1058
|
});
|
|
1064
1059
|
}
|
|
1065
|
-
function
|
|
1060
|
+
function f() {
|
|
1066
1061
|
if (c.value = !c.value, c.value) {
|
|
1067
1062
|
let e = r.modelValue.top;
|
|
1068
1063
|
i("update:modelValue", {
|
|
@@ -1073,130 +1068,130 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1073
1068
|
});
|
|
1074
1069
|
}
|
|
1075
1070
|
}
|
|
1076
|
-
return (n, r) => (e(),
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
"aria-label":
|
|
1080
|
-
class:
|
|
1081
|
-
onClick: r[0] ||= (e) =>
|
|
1082
|
-
}, [
|
|
1071
|
+
return (n, r) => (e(), v("div", hr, [_("label", gr, D(t.label), 1), _("div", _r, [
|
|
1072
|
+
_("div", vr, [
|
|
1073
|
+
_("button", {
|
|
1074
|
+
"aria-label": T(o).spacingControl.decreaseTop,
|
|
1075
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1076
|
+
onClick: r[0] ||= (e) => l("top", -1)
|
|
1077
|
+
}, [k(T(Ke), {
|
|
1083
1078
|
size: 12,
|
|
1084
1079
|
"stroke-width": 2
|
|
1085
|
-
})], 10,
|
|
1086
|
-
|
|
1080
|
+
})], 10, yr),
|
|
1081
|
+
_("input", {
|
|
1087
1082
|
type: "number",
|
|
1088
|
-
class:
|
|
1083
|
+
class: p(Ir),
|
|
1089
1084
|
value: t.modelValue.top,
|
|
1090
|
-
"aria-label":
|
|
1085
|
+
"aria-label": T(o).spacingControl.top,
|
|
1091
1086
|
min: "0",
|
|
1092
1087
|
onInput: r[1] ||= (e) => d("top", Number(e.target.value))
|
|
1093
|
-
}, null, 40,
|
|
1094
|
-
|
|
1095
|
-
"aria-label":
|
|
1096
|
-
class:
|
|
1097
|
-
onClick: r[2] ||= (e) =>
|
|
1098
|
-
}, [
|
|
1088
|
+
}, null, 40, br),
|
|
1089
|
+
_("button", {
|
|
1090
|
+
"aria-label": T(o).spacingControl.increaseTop,
|
|
1091
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1092
|
+
onClick: r[2] ||= (e) => l("top", 1)
|
|
1093
|
+
}, [k(T(X), {
|
|
1099
1094
|
size: 12,
|
|
1100
1095
|
"stroke-width": 2
|
|
1101
|
-
})], 10,
|
|
1096
|
+
})], 10, xr)
|
|
1102
1097
|
]),
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
"aria-label":
|
|
1107
|
-
class:
|
|
1108
|
-
onClick: r[3] ||= (e) =>
|
|
1109
|
-
}, [
|
|
1098
|
+
_("div", Sr, [
|
|
1099
|
+
_("div", Cr, [
|
|
1100
|
+
_("button", {
|
|
1101
|
+
"aria-label": T(o).spacingControl.decreaseLeft,
|
|
1102
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1103
|
+
onClick: r[3] ||= (e) => l("left", -1)
|
|
1104
|
+
}, [k(T(Ke), {
|
|
1110
1105
|
size: 12,
|
|
1111
1106
|
"stroke-width": 2
|
|
1112
|
-
})], 10,
|
|
1113
|
-
|
|
1107
|
+
})], 10, wr),
|
|
1108
|
+
_("input", {
|
|
1114
1109
|
type: "number",
|
|
1115
|
-
class:
|
|
1110
|
+
class: p(Ir),
|
|
1116
1111
|
value: t.modelValue.left,
|
|
1117
|
-
"aria-label":
|
|
1112
|
+
"aria-label": T(o).spacingControl.left,
|
|
1118
1113
|
min: "0",
|
|
1119
1114
|
onInput: r[4] ||= (e) => d("left", Number(e.target.value))
|
|
1120
|
-
}, null, 40,
|
|
1121
|
-
|
|
1122
|
-
"aria-label":
|
|
1123
|
-
class:
|
|
1124
|
-
onClick: r[5] ||= (e) =>
|
|
1125
|
-
}, [
|
|
1115
|
+
}, null, 40, Tr),
|
|
1116
|
+
_("button", {
|
|
1117
|
+
"aria-label": T(o).spacingControl.increaseLeft,
|
|
1118
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1119
|
+
onClick: r[5] ||= (e) => l("left", 1)
|
|
1120
|
+
}, [k(T(X), {
|
|
1126
1121
|
size: 12,
|
|
1127
1122
|
"stroke-width": 2
|
|
1128
|
-
})], 10,
|
|
1123
|
+
})], 10, Er)
|
|
1129
1124
|
]),
|
|
1130
|
-
|
|
1131
|
-
class:
|
|
1132
|
-
"aria-label": c.value ?
|
|
1133
|
-
title: c.value ?
|
|
1134
|
-
onClick:
|
|
1135
|
-
}, [c.value ? (e(),
|
|
1125
|
+
_("button", {
|
|
1126
|
+
class: p(["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)]", c.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)]"]),
|
|
1127
|
+
"aria-label": c.value ? T(o).spacingControl.unlock : T(o).spacingControl.lockAll,
|
|
1128
|
+
title: c.value ? T(o).spacingControl.unlock : T(o).spacingControl.lockAll,
|
|
1129
|
+
onClick: f
|
|
1130
|
+
}, [c.value ? (e(), C(T(Tt), {
|
|
1136
1131
|
key: 0,
|
|
1137
1132
|
size: 14,
|
|
1138
1133
|
"stroke-width": 2
|
|
1139
|
-
})) : (e(),
|
|
1134
|
+
})) : (e(), C(T(wt), {
|
|
1140
1135
|
key: 1,
|
|
1141
1136
|
size: 14,
|
|
1142
1137
|
"stroke-width": 2
|
|
1143
|
-
}))], 10,
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
"aria-label":
|
|
1147
|
-
class:
|
|
1148
|
-
onClick: r[6] ||= (e) =>
|
|
1149
|
-
}, [
|
|
1138
|
+
}))], 10, Dr),
|
|
1139
|
+
_("div", Or, [
|
|
1140
|
+
_("button", {
|
|
1141
|
+
"aria-label": T(o).spacingControl.decreaseRight,
|
|
1142
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1143
|
+
onClick: r[6] ||= (e) => l("right", -1)
|
|
1144
|
+
}, [k(T(Ke), {
|
|
1150
1145
|
size: 12,
|
|
1151
1146
|
"stroke-width": 2
|
|
1152
|
-
})], 10,
|
|
1153
|
-
|
|
1147
|
+
})], 10, kr),
|
|
1148
|
+
_("input", {
|
|
1154
1149
|
type: "number",
|
|
1155
|
-
class:
|
|
1150
|
+
class: p(Ir),
|
|
1156
1151
|
value: t.modelValue.right,
|
|
1157
|
-
"aria-label":
|
|
1152
|
+
"aria-label": T(o).spacingControl.right,
|
|
1158
1153
|
min: "0",
|
|
1159
1154
|
onInput: r[7] ||= (e) => d("right", Number(e.target.value))
|
|
1160
|
-
}, null, 40,
|
|
1161
|
-
|
|
1162
|
-
"aria-label":
|
|
1163
|
-
class:
|
|
1164
|
-
onClick: r[8] ||= (e) =>
|
|
1165
|
-
}, [
|
|
1155
|
+
}, null, 40, Ar),
|
|
1156
|
+
_("button", {
|
|
1157
|
+
"aria-label": T(o).spacingControl.increaseRight,
|
|
1158
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1159
|
+
onClick: r[8] ||= (e) => l("right", 1)
|
|
1160
|
+
}, [k(T(X), {
|
|
1166
1161
|
size: 12,
|
|
1167
1162
|
"stroke-width": 2
|
|
1168
|
-
})], 10,
|
|
1163
|
+
})], 10, jr)
|
|
1169
1164
|
])
|
|
1170
1165
|
]),
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
"aria-label":
|
|
1174
|
-
class:
|
|
1175
|
-
onClick: r[9] ||= (e) =>
|
|
1176
|
-
}, [
|
|
1166
|
+
_("div", Mr, [
|
|
1167
|
+
_("button", {
|
|
1168
|
+
"aria-label": T(o).spacingControl.decreaseBottom,
|
|
1169
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1170
|
+
onClick: r[9] ||= (e) => l("bottom", -1)
|
|
1171
|
+
}, [k(T(Ke), {
|
|
1177
1172
|
size: 12,
|
|
1178
1173
|
"stroke-width": 2
|
|
1179
|
-
})], 10,
|
|
1180
|
-
|
|
1174
|
+
})], 10, Nr),
|
|
1175
|
+
_("input", {
|
|
1181
1176
|
type: "number",
|
|
1182
|
-
class:
|
|
1177
|
+
class: p(Ir),
|
|
1183
1178
|
value: t.modelValue.bottom,
|
|
1184
|
-
"aria-label":
|
|
1179
|
+
"aria-label": T(o).spacingControl.bottom,
|
|
1185
1180
|
min: "0",
|
|
1186
1181
|
onInput: r[10] ||= (e) => d("bottom", Number(e.target.value))
|
|
1187
|
-
}, null, 40,
|
|
1188
|
-
|
|
1189
|
-
"aria-label":
|
|
1190
|
-
class:
|
|
1191
|
-
onClick: r[11] ||= (e) =>
|
|
1192
|
-
}, [
|
|
1182
|
+
}, null, 40, Pr),
|
|
1183
|
+
_("button", {
|
|
1184
|
+
"aria-label": T(o).spacingControl.increaseBottom,
|
|
1185
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1186
|
+
onClick: r[11] ||= (e) => l("bottom", 1)
|
|
1187
|
+
}, [k(T(X), {
|
|
1193
1188
|
size: 12,
|
|
1194
1189
|
"stroke-width": 2
|
|
1195
|
-
})], 10,
|
|
1190
|
+
})], 10, Fr)
|
|
1196
1191
|
])
|
|
1197
1192
|
])]));
|
|
1198
1193
|
}
|
|
1199
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1194
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Rr = { class: "tpl:mt-3" }, zr = /* @__PURE__ */ m({
|
|
1200
1195
|
__name: "CollapsibleSection",
|
|
1201
1196
|
props: {
|
|
1202
1197
|
title: {},
|
|
@@ -1205,29 +1200,29 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1205
1200
|
},
|
|
1206
1201
|
emits: ["toggle"],
|
|
1207
1202
|
setup(n) {
|
|
1208
|
-
return (r, i) => (e(),
|
|
1203
|
+
return (r, i) => (e(), v("div", { class: p(["tpl:py-3", n.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [_("button", {
|
|
1209
1204
|
type: "button",
|
|
1210
1205
|
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)]",
|
|
1211
1206
|
onClick: i[0] ||= (e) => r.$emit("toggle")
|
|
1212
|
-
}, [
|
|
1213
|
-
class:
|
|
1207
|
+
}, [k(T(We), {
|
|
1208
|
+
class: p(["tpl:transition-transform tpl:duration-200", n.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1214
1209
|
size: 12,
|
|
1215
1210
|
"stroke-width": 2
|
|
1216
|
-
}, null, 8, ["class"]),
|
|
1211
|
+
}, null, 8, ["class"]), _("span", null, D(n.title), 1)]), t(_("div", Rr, [s(r.$slots, "default")], 512), [[x, n.open]])], 2));
|
|
1217
1212
|
}
|
|
1218
|
-
}),
|
|
1213
|
+
}), Br = { class: "tpl:space-y-2" }, Vr = ["checked", "onChange"], Hr = { class: "tpl:space-y-2" }, Ur = ["value"], Wr = { value: "" }, Gr = ["label"], Kr = ["value"], qr = ["value"], Jr = {
|
|
1219
1214
|
key: 0,
|
|
1220
1215
|
value: "__custom__"
|
|
1221
|
-
},
|
|
1216
|
+
}, Yr = {
|
|
1222
1217
|
key: 0,
|
|
1223
1218
|
class: "tpl:space-y-2"
|
|
1224
|
-
},
|
|
1219
|
+
}, Xr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Zr = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qr = { class: "tpl:flex tpl:justify-end" }, $r = ["disabled"], ei = {
|
|
1225
1220
|
key: 0,
|
|
1226
1221
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1227
|
-
},
|
|
1222
|
+
}, ti = { class: "tpl:space-y-1" }, ni = { 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)]" }, ri = {
|
|
1228
1223
|
key: 0,
|
|
1229
1224
|
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)]"
|
|
1230
|
-
},
|
|
1225
|
+
}, ii = /* @__PURE__ */ m({
|
|
1231
1226
|
__name: "CommonBlockSettings",
|
|
1232
1227
|
props: {
|
|
1233
1228
|
block: {},
|
|
@@ -1235,54 +1230,46 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1235
1230
|
},
|
|
1236
1231
|
emits: ["update"],
|
|
1237
1232
|
setup(n, { emit: s }) {
|
|
1238
|
-
let c = n,
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
{
|
|
1250
|
-
key: "mobile",
|
|
1251
|
-
icon: Dt,
|
|
1252
|
-
labelKey: "showOnMobile"
|
|
1253
|
-
}
|
|
1254
|
-
];
|
|
1255
|
-
function M(e) {
|
|
1256
|
-
C.has(e) ? C.delete(e) : C.add(e);
|
|
1257
|
-
}
|
|
1258
|
-
let N = h(() => b.length > 0 || x), P = h(() => c.block.displayCondition ? !b.some((e) => e.label === c.block.displayCondition?.label) : !1);
|
|
1259
|
-
function F() {
|
|
1260
|
-
T.value = !0, P.value && c.block.displayCondition ? (D.value = c.block.displayCondition.before, A.value = c.block.displayCondition.after ?? "") : (D.value = "", A.value = "");
|
|
1233
|
+
let c = n, l = s, { t: m } = V(), h = A(Be, []), x = A(Re, !1), S = i(/* @__PURE__ */ new Set()), w = u(!1), E = u(""), O = u(""), j = [{
|
|
1234
|
+
key: "desktop",
|
|
1235
|
+
icon: Et,
|
|
1236
|
+
labelKey: "showOnDesktop"
|
|
1237
|
+
}, {
|
|
1238
|
+
key: "mobile",
|
|
1239
|
+
icon: jt,
|
|
1240
|
+
labelKey: "showOnMobile"
|
|
1241
|
+
}];
|
|
1242
|
+
function N(e) {
|
|
1243
|
+
S.has(e) ? S.delete(e) : S.add(e);
|
|
1261
1244
|
}
|
|
1245
|
+
let P = g(() => h.length > 0 || x), F = g(() => c.block.displayCondition ? !h.some((e) => e.label === c.block.displayCondition?.label) : !1);
|
|
1262
1246
|
function I() {
|
|
1263
|
-
|
|
1247
|
+
w.value = !0, F.value && c.block.displayCondition ? (E.value = c.block.displayCondition.before, O.value = c.block.displayCondition.after ?? "") : (E.value = "", O.value = "");
|
|
1248
|
+
}
|
|
1249
|
+
function L() {
|
|
1250
|
+
E.value.trim() && (l("update", { displayCondition: {
|
|
1264
1251
|
label: m.blockSettings.customCondition,
|
|
1265
|
-
before:
|
|
1266
|
-
after:
|
|
1267
|
-
} }),
|
|
1252
|
+
before: E.value.trim(),
|
|
1253
|
+
after: O.value.trim()
|
|
1254
|
+
} }), w.value = !1, E.value = "", O.value = "");
|
|
1268
1255
|
}
|
|
1269
1256
|
a(() => c.block.displayCondition, (e) => {
|
|
1270
1257
|
if (!e) {
|
|
1271
|
-
|
|
1258
|
+
w.value = !1, E.value = "", O.value = "";
|
|
1272
1259
|
return;
|
|
1273
1260
|
}
|
|
1274
|
-
|
|
1261
|
+
F.value && (E.value = e.before, O.value = e.after ?? "");
|
|
1275
1262
|
}, { immediate: !0 });
|
|
1276
|
-
let
|
|
1263
|
+
let ee = g(() => {
|
|
1277
1264
|
let e = {};
|
|
1278
|
-
for (let t of
|
|
1265
|
+
for (let t of h) {
|
|
1279
1266
|
let n = t.group ?? "";
|
|
1280
1267
|
e[n] || (e[n] = []), e[n].push(t);
|
|
1281
1268
|
}
|
|
1282
1269
|
return e;
|
|
1283
1270
|
});
|
|
1284
1271
|
function R(e, t) {
|
|
1285
|
-
|
|
1272
|
+
l("update", { styles: {
|
|
1286
1273
|
...c.block.styles,
|
|
1287
1274
|
[e]: t
|
|
1288
1275
|
} });
|
|
@@ -1293,147 +1280,128 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1293
1280
|
function te(e) {
|
|
1294
1281
|
let t = {
|
|
1295
1282
|
desktop: z("desktop"),
|
|
1296
|
-
tablet: z("tablet"),
|
|
1297
1283
|
mobile: z("mobile")
|
|
1298
1284
|
};
|
|
1299
|
-
t[e] = !t[e],
|
|
1285
|
+
t[e] = !t[e], l("update", { visibility: t });
|
|
1300
1286
|
}
|
|
1301
|
-
return (i, a) => (e(),
|
|
1302
|
-
|
|
1303
|
-
title:
|
|
1304
|
-
open:
|
|
1287
|
+
return (i, a) => (e(), v("div", { class: p(["tpl:flex tpl:flex-col", n.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1288
|
+
k(zr, {
|
|
1289
|
+
title: T(m).blockSettings.spacing,
|
|
1290
|
+
open: S.has("spacing"),
|
|
1305
1291
|
"no-border": n.isFirstSection,
|
|
1306
|
-
onToggle: a[
|
|
1292
|
+
onToggle: a[1] ||= (e) => N("spacing")
|
|
1307
1293
|
}, {
|
|
1308
|
-
default:
|
|
1309
|
-
label:
|
|
1294
|
+
default: M(() => [k(Lr, {
|
|
1295
|
+
label: T(m).blockSettings.padding,
|
|
1310
1296
|
"model-value": n.block.styles.padding,
|
|
1311
1297
|
"onUpdate:modelValue": a[0] ||= (e) => R("padding", e)
|
|
1312
|
-
}, null, 8, ["label", "model-value"]),
|
|
1313
|
-
label: w(m).blockSettings.margin,
|
|
1314
|
-
"model-value": n.block.styles.margin,
|
|
1315
|
-
"onUpdate:modelValue": a[1] ||= (e) => R("margin", e)
|
|
1316
|
-
}, null, 8, ["label", "model-value"])])]),
|
|
1298
|
+
}, null, 8, ["label", "model-value"])]),
|
|
1317
1299
|
_: 1
|
|
1318
1300
|
}, 8, [
|
|
1319
1301
|
"title",
|
|
1320
1302
|
"open",
|
|
1321
1303
|
"no-border"
|
|
1322
1304
|
]),
|
|
1323
|
-
|
|
1324
|
-
title:
|
|
1325
|
-
open:
|
|
1326
|
-
onToggle: a[
|
|
1305
|
+
k(zr, {
|
|
1306
|
+
title: T(m).blockSettings.background,
|
|
1307
|
+
open: S.has("bg"),
|
|
1308
|
+
onToggle: a[3] ||= (e) => N("bg")
|
|
1327
1309
|
}, {
|
|
1328
|
-
default:
|
|
1310
|
+
default: M(() => [_("label", { class: p(T(W)) }, D(T(m).blockSettings.color), 3), k(q, {
|
|
1329
1311
|
size: "large",
|
|
1330
|
-
"model-value": n.block.styles.backgroundColor ||
|
|
1331
|
-
"onUpdate:modelValue": a[
|
|
1312
|
+
"model-value": n.block.styles.backgroundColor || T("#ffffff"),
|
|
1313
|
+
"onUpdate:modelValue": a[2] ||= (e) => R("backgroundColor", e)
|
|
1332
1314
|
}, null, 8, ["model-value"])]),
|
|
1333
1315
|
_: 1
|
|
1334
1316
|
}, 8, ["title", "open"]),
|
|
1335
|
-
|
|
1336
|
-
title:
|
|
1337
|
-
open:
|
|
1338
|
-
onToggle: a[
|
|
1317
|
+
k(zr, {
|
|
1318
|
+
title: T(m).blockSettings.display,
|
|
1319
|
+
open: S.has("display"),
|
|
1320
|
+
onToggle: a[4] ||= (e) => N("display")
|
|
1339
1321
|
}, {
|
|
1340
|
-
default:
|
|
1322
|
+
default: M(() => [_("div", Br, [(e(), v(y, null, o(j, (t) => _("label", {
|
|
1341
1323
|
key: t.key,
|
|
1342
1324
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1343
1325
|
}, [
|
|
1344
|
-
|
|
1326
|
+
_("input", {
|
|
1345
1327
|
type: "checkbox",
|
|
1346
1328
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1347
1329
|
checked: z(t.key),
|
|
1348
1330
|
onChange: (e) => te(t.key)
|
|
1349
|
-
}, null, 40,
|
|
1350
|
-
(e(),
|
|
1331
|
+
}, null, 40, Vr),
|
|
1332
|
+
(e(), C(r(t.icon), {
|
|
1351
1333
|
size: 14,
|
|
1352
1334
|
"stroke-width": 1.5
|
|
1353
1335
|
})),
|
|
1354
|
-
|
|
1336
|
+
d(" " + D(T(m).blockSettings[t.labelKey]), 1)
|
|
1355
1337
|
])), 64))])]),
|
|
1356
1338
|
_: 1
|
|
1357
1339
|
}, 8, ["title", "open"]),
|
|
1358
|
-
|
|
1359
|
-
title: w(m).blockSettings.customCss,
|
|
1360
|
-
open: C.has("css"),
|
|
1361
|
-
onToggle: a[7] ||= (e) => M("css")
|
|
1362
|
-
}, {
|
|
1363
|
-
default: j(() => [g("label", { class: f(w(W)) }, E(w(m).blockSettings.css), 3), g("textarea", {
|
|
1364
|
-
value: n.block.customCss || "",
|
|
1365
|
-
placeholder: w(m).blockSettings.cssPlaceholder,
|
|
1366
|
-
rows: "3",
|
|
1367
|
-
class: f(w(ft)),
|
|
1368
|
-
onInput: a[6] ||= (e) => p("update", { customCss: e.target.value })
|
|
1369
|
-
}, null, 42, zr)]),
|
|
1370
|
-
_: 1
|
|
1371
|
-
}, 8, ["title", "open"]),
|
|
1372
|
-
N.value ? (e(), S(Fr, {
|
|
1340
|
+
P.value ? (e(), C(zr, {
|
|
1373
1341
|
key: 0,
|
|
1374
|
-
title:
|
|
1375
|
-
open:
|
|
1376
|
-
onToggle: a[
|
|
1342
|
+
title: T(m).blockSettings.displayCondition,
|
|
1343
|
+
open: S.has("condition"),
|
|
1344
|
+
onToggle: a[8] ||= (e) => N("condition")
|
|
1377
1345
|
}, {
|
|
1378
|
-
default:
|
|
1379
|
-
class:
|
|
1380
|
-
value:
|
|
1381
|
-
onChange: a[
|
|
1346
|
+
default: M(() => [_("div", Hr, [_("select", {
|
|
1347
|
+
class: p(["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)]", n.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)]"]),
|
|
1348
|
+
value: w.value || F.value ? "__custom__" : n.block.displayCondition?.label ?? "",
|
|
1349
|
+
onChange: a[5] ||= (e) => {
|
|
1382
1350
|
let t = e.target.value;
|
|
1383
1351
|
if (t === "__custom__") {
|
|
1384
|
-
|
|
1352
|
+
I();
|
|
1385
1353
|
return;
|
|
1386
1354
|
}
|
|
1387
|
-
if (
|
|
1388
|
-
|
|
1355
|
+
if (w.value = !1, !t) {
|
|
1356
|
+
l("update", { displayCondition: void 0 });
|
|
1389
1357
|
return;
|
|
1390
1358
|
}
|
|
1391
|
-
let n =
|
|
1392
|
-
n &&
|
|
1359
|
+
let n = T(h).find((e) => e.label === t);
|
|
1360
|
+
n && l("update", { displayCondition: n });
|
|
1393
1361
|
}
|
|
1394
1362
|
}, [
|
|
1395
|
-
|
|
1396
|
-
(e(!0),
|
|
1363
|
+
_("option", Wr, D(T(m).blockSettings.noCondition), 1),
|
|
1364
|
+
(e(!0), v(y, null, o(ee.value, (t, n) => (e(), v(y, { key: n }, [n ? (e(), v("optgroup", {
|
|
1397
1365
|
key: 0,
|
|
1398
1366
|
label: String(n)
|
|
1399
|
-
}, [(e(!0),
|
|
1367
|
+
}, [(e(!0), v(y, null, o(t, (t) => (e(), v("option", {
|
|
1400
1368
|
key: t.label,
|
|
1401
1369
|
value: t.label
|
|
1402
|
-
},
|
|
1370
|
+
}, D(t.label), 9, Kr))), 128))], 8, Gr)) : (e(!0), v(y, { key: 1 }, o(t, (t) => (e(), v("option", {
|
|
1403
1371
|
key: t.label,
|
|
1404
1372
|
value: t.label
|
|
1405
|
-
},
|
|
1406
|
-
|
|
1407
|
-
], 42,
|
|
1408
|
-
|
|
1409
|
-
"onUpdate:modelValue": a[
|
|
1373
|
+
}, D(t.label), 9, qr))), 128))], 64))), 128)),
|
|
1374
|
+
T(x) ? (e(), v("option", Jr, D(T(m).blockSettings.customCondition), 1)) : b("", !0)
|
|
1375
|
+
], 42, Ur), w.value || F.value ? (e(), v("div", Yr, [
|
|
1376
|
+
_("div", null, [_("label", Xr, D(T(m).blockSettings.customConditionBefore), 1), t(_("textarea", {
|
|
1377
|
+
"onUpdate:modelValue": a[6] ||= (e) => E.value = e,
|
|
1410
1378
|
rows: "2",
|
|
1411
|
-
class:
|
|
1412
|
-
}, null, 2), [[
|
|
1413
|
-
|
|
1414
|
-
"onUpdate:modelValue": a[
|
|
1379
|
+
class: p(T(gt))
|
|
1380
|
+
}, null, 2), [[f, E.value]])]),
|
|
1381
|
+
_("div", null, [_("label", Zr, D(T(m).blockSettings.customConditionAfter), 1), t(_("textarea", {
|
|
1382
|
+
"onUpdate:modelValue": a[7] ||= (e) => O.value = e,
|
|
1415
1383
|
rows: "2",
|
|
1416
|
-
class:
|
|
1417
|
-
}, null, 2), [[
|
|
1418
|
-
|
|
1384
|
+
class: p(T(gt))
|
|
1385
|
+
}, null, 2), [[f, O.value]])]),
|
|
1386
|
+
_("div", Qr, [_("button", {
|
|
1419
1387
|
type: "button",
|
|
1420
1388
|
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",
|
|
1421
|
-
disabled: !
|
|
1422
|
-
onClick:
|
|
1423
|
-
},
|
|
1424
|
-
])) : n.block.displayCondition && !
|
|
1389
|
+
disabled: !E.value.trim(),
|
|
1390
|
+
onClick: L
|
|
1391
|
+
}, D(T(m).blockSettings.applyCondition), 9, $r)])
|
|
1392
|
+
])) : n.block.displayCondition && !F.value ? (e(), v(y, { key: 1 }, [n.block.displayCondition.description ? (e(), v("p", ei, D(n.block.displayCondition.description), 1)) : b("", !0), _("div", ti, [_("pre", ni, D(n.block.displayCondition.before), 1), n.block.displayCondition.after ? (e(), v("pre", ri, D(n.block.displayCondition.after), 1)) : b("", !0)])], 64)) : b("", !0)])]),
|
|
1425
1393
|
_: 1
|
|
1426
|
-
}, 8, ["title", "open"])) :
|
|
1394
|
+
}, 8, ["title", "open"])) : b("", !0)
|
|
1427
1395
|
], 2));
|
|
1428
1396
|
}
|
|
1429
|
-
}),
|
|
1397
|
+
}), ai = ["title"], oi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, si = {
|
|
1430
1398
|
key: 1,
|
|
1431
1399
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1432
|
-
},
|
|
1400
|
+
}, ci = [
|
|
1433
1401
|
"aria-checked",
|
|
1434
1402
|
"aria-label",
|
|
1435
1403
|
"disabled"
|
|
1436
|
-
],
|
|
1404
|
+
], li = /* @__PURE__ */ m({
|
|
1437
1405
|
__name: "BooleanField",
|
|
1438
1406
|
props: {
|
|
1439
1407
|
field: {},
|
|
@@ -1443,35 +1411,35 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1443
1411
|
emits: ["update:modelValue"],
|
|
1444
1412
|
setup(t, { emit: n }) {
|
|
1445
1413
|
let r = n, { t: i } = V();
|
|
1446
|
-
return (n, a) => (e(),
|
|
1414
|
+
return (n, a) => (e(), v("div", {
|
|
1447
1415
|
class: "tpl:mb-3.5",
|
|
1448
|
-
title: t.readOnly ?
|
|
1449
|
-
}, [
|
|
1450
|
-
|
|
1451
|
-
t.readOnly ? (e(),
|
|
1416
|
+
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1417
|
+
}, [_("label", { class: p(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", t.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [_("span", oi, [
|
|
1418
|
+
d(D(t.field.label) + " ", 1),
|
|
1419
|
+
t.readOnly ? (e(), C(T(Tt), {
|
|
1452
1420
|
key: 0,
|
|
1453
1421
|
size: 12,
|
|
1454
1422
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1455
|
-
})) :
|
|
1456
|
-
t.field.required ? (e(),
|
|
1457
|
-
]),
|
|
1423
|
+
})) : b("", !0),
|
|
1424
|
+
t.field.required ? (e(), v("span", si, " * ")) : b("", !0)
|
|
1425
|
+
]), _("button", {
|
|
1458
1426
|
type: "button",
|
|
1459
1427
|
role: "switch",
|
|
1460
1428
|
"aria-checked": t.modelValue,
|
|
1461
1429
|
"aria-label": t.field.label,
|
|
1462
|
-
class:
|
|
1430
|
+
class: p([
|
|
1463
1431
|
"tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200",
|
|
1464
1432
|
t.modelValue ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]",
|
|
1465
1433
|
t.readOnly ? "tpl:opacity-60 tpl:cursor-not-allowed" : "tpl:cursor-pointer"
|
|
1466
1434
|
]),
|
|
1467
1435
|
disabled: t.readOnly,
|
|
1468
1436
|
onClick: a[0] ||= (e) => !t.readOnly && r("update:modelValue", !t.modelValue)
|
|
1469
|
-
}, [
|
|
1437
|
+
}, [_("span", { class: p(["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", t.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, ci)], 2)], 8, ai));
|
|
1470
1438
|
}
|
|
1471
|
-
}),
|
|
1439
|
+
}), ui = { class: "tpl:mb-3.5" }, di = {
|
|
1472
1440
|
key: 1,
|
|
1473
1441
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1474
|
-
},
|
|
1442
|
+
}, fi = /* @__PURE__ */ m({
|
|
1475
1443
|
__name: "FieldWrapper",
|
|
1476
1444
|
props: {
|
|
1477
1445
|
label: {},
|
|
@@ -1479,17 +1447,17 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1479
1447
|
readOnly: { type: Boolean }
|
|
1480
1448
|
},
|
|
1481
1449
|
setup(t) {
|
|
1482
|
-
return (n, r) => (e(),
|
|
1483
|
-
|
|
1484
|
-
t.readOnly ? (e(),
|
|
1450
|
+
return (n, r) => (e(), v("div", ui, [_("label", { class: p(T(W)) }, [
|
|
1451
|
+
d(D(t.label) + " ", 1),
|
|
1452
|
+
t.readOnly ? (e(), C(T(Tt), {
|
|
1485
1453
|
key: 0,
|
|
1486
1454
|
size: 12,
|
|
1487
1455
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1488
|
-
})) :
|
|
1489
|
-
t.required ? (e(),
|
|
1456
|
+
})) : b("", !0),
|
|
1457
|
+
t.required ? (e(), v("span", di, "*")) : b("", !0)
|
|
1490
1458
|
], 2), s(n.$slots, "default")]));
|
|
1491
1459
|
}
|
|
1492
|
-
}),
|
|
1460
|
+
}), pi = /* @__PURE__ */ m({
|
|
1493
1461
|
__name: "ColorField",
|
|
1494
1462
|
props: {
|
|
1495
1463
|
field: {},
|
|
@@ -1499,16 +1467,16 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1499
1467
|
emits: ["update:modelValue"],
|
|
1500
1468
|
setup(t, { emit: n }) {
|
|
1501
1469
|
let r = n, { t: i } = V();
|
|
1502
|
-
return (n, a) => (e(),
|
|
1470
|
+
return (n, a) => (e(), C(fi, {
|
|
1503
1471
|
label: t.field.label,
|
|
1504
1472
|
required: t.field.required,
|
|
1505
1473
|
"read-only": t.readOnly
|
|
1506
1474
|
}, {
|
|
1507
|
-
default:
|
|
1508
|
-
"model-value": t.modelValue ||
|
|
1509
|
-
placeholder: t.field.placeholder ||
|
|
1475
|
+
default: M(() => [k(q, {
|
|
1476
|
+
"model-value": t.modelValue || T("#000000"),
|
|
1477
|
+
placeholder: t.field.placeholder || T("#000000"),
|
|
1510
1478
|
disabled: t.readOnly,
|
|
1511
|
-
title: t.readOnly ?
|
|
1479
|
+
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1512
1480
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1513
1481
|
}, null, 8, [
|
|
1514
1482
|
"model-value",
|
|
@@ -1523,11 +1491,11 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1523
1491
|
"read-only"
|
|
1524
1492
|
]));
|
|
1525
1493
|
}
|
|
1526
|
-
}),
|
|
1494
|
+
}), mi = [
|
|
1527
1495
|
"value",
|
|
1528
1496
|
"placeholder",
|
|
1529
1497
|
"title"
|
|
1530
|
-
],
|
|
1498
|
+
], hi = ["value", "placeholder"], gi = /* @__PURE__ */ m({
|
|
1531
1499
|
__name: "ImageField",
|
|
1532
1500
|
props: {
|
|
1533
1501
|
field: {},
|
|
@@ -1536,39 +1504,39 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1536
1504
|
},
|
|
1537
1505
|
emits: ["update:modelValue"],
|
|
1538
1506
|
setup(t, { emit: n }) {
|
|
1539
|
-
let r = n, { t: i } = V(), a =
|
|
1507
|
+
let r = n, { t: i } = V(), a = A(De, null), o = dt(), s = g(() => !!a);
|
|
1540
1508
|
async function c() {
|
|
1541
1509
|
let e = await a?.({ accept: ["images"] });
|
|
1542
1510
|
o.alive && e && r("update:modelValue", e.url);
|
|
1543
1511
|
}
|
|
1544
|
-
return (n, a) => (e(),
|
|
1512
|
+
return (n, a) => (e(), C(fi, {
|
|
1545
1513
|
label: t.field.label,
|
|
1546
1514
|
required: t.field.required,
|
|
1547
1515
|
"read-only": t.readOnly
|
|
1548
1516
|
}, {
|
|
1549
|
-
default:
|
|
1517
|
+
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1550
1518
|
key: 0,
|
|
1551
1519
|
type: "url",
|
|
1552
|
-
class:
|
|
1520
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1553
1521
|
value: t.modelValue,
|
|
1554
1522
|
placeholder: t.field.placeholder || "https://...",
|
|
1555
1523
|
disabled: "",
|
|
1556
|
-
title:
|
|
1557
|
-
}, null, 10,
|
|
1524
|
+
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1525
|
+
}, null, 10, mi)) : (e(), v("input", {
|
|
1558
1526
|
key: 1,
|
|
1559
1527
|
type: "url",
|
|
1560
|
-
class:
|
|
1528
|
+
class: p(T(U)),
|
|
1561
1529
|
value: t.modelValue,
|
|
1562
1530
|
placeholder: t.field.placeholder || "https://...",
|
|
1563
1531
|
onInput: a[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1564
|
-
}, null, 42,
|
|
1532
|
+
}, null, 42, hi)), s.value && !t.readOnly ? (e(), v("button", {
|
|
1565
1533
|
key: 2,
|
|
1566
1534
|
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)]",
|
|
1567
1535
|
onClick: a[1] ||= (e) => c()
|
|
1568
|
-
}, [
|
|
1536
|
+
}, [k(T(me), {
|
|
1569
1537
|
size: 14,
|
|
1570
1538
|
"stroke-width": 1.5
|
|
1571
|
-
}),
|
|
1539
|
+
}), d(" " + D(T(i).image.browseMedia), 1)])) : b("", !0)]),
|
|
1572
1540
|
_: 1
|
|
1573
1541
|
}, 8, [
|
|
1574
1542
|
"label",
|
|
@@ -1576,7 +1544,7 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1576
1544
|
"read-only"
|
|
1577
1545
|
]));
|
|
1578
1546
|
}
|
|
1579
|
-
}),
|
|
1547
|
+
}), _i = [
|
|
1580
1548
|
"value",
|
|
1581
1549
|
"placeholder",
|
|
1582
1550
|
"min",
|
|
@@ -1584,7 +1552,7 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1584
1552
|
"step",
|
|
1585
1553
|
"disabled",
|
|
1586
1554
|
"title"
|
|
1587
|
-
],
|
|
1555
|
+
], vi = /* @__PURE__ */ m({
|
|
1588
1556
|
__name: "NumberField",
|
|
1589
1557
|
props: {
|
|
1590
1558
|
field: {},
|
|
@@ -1594,23 +1562,23 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1594
1562
|
emits: ["update:modelValue"],
|
|
1595
1563
|
setup(t, { emit: n }) {
|
|
1596
1564
|
let r = n, { t: i } = V();
|
|
1597
|
-
return (n, a) => (e(),
|
|
1565
|
+
return (n, a) => (e(), C(fi, {
|
|
1598
1566
|
label: t.field.label,
|
|
1599
1567
|
required: t.field.required,
|
|
1600
1568
|
"read-only": t.readOnly
|
|
1601
1569
|
}, {
|
|
1602
|
-
default:
|
|
1570
|
+
default: M(() => [_("input", {
|
|
1603
1571
|
type: "number",
|
|
1604
|
-
class:
|
|
1572
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1605
1573
|
value: t.modelValue,
|
|
1606
1574
|
placeholder: t.field.placeholder,
|
|
1607
1575
|
min: t.field.min,
|
|
1608
1576
|
max: t.field.max,
|
|
1609
1577
|
step: t.field.step,
|
|
1610
1578
|
disabled: t.readOnly,
|
|
1611
|
-
title: t.readOnly ?
|
|
1579
|
+
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1612
1580
|
onInput: a[0] ||= (e) => !t.readOnly && r("update:modelValue", Number(e.target.value))
|
|
1613
|
-
}, null, 42,
|
|
1581
|
+
}, null, 42, _i)]),
|
|
1614
1582
|
_: 1
|
|
1615
1583
|
}, 8, [
|
|
1616
1584
|
"label",
|
|
@@ -1618,10 +1586,10 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1618
1586
|
"read-only"
|
|
1619
1587
|
]));
|
|
1620
1588
|
}
|
|
1621
|
-
}),
|
|
1589
|
+
}), yi = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, bi = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, xi = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Si = ["title", "onClick"], Ci = {
|
|
1622
1590
|
key: 1,
|
|
1623
1591
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1624
|
-
},
|
|
1592
|
+
}, wi = /* @__PURE__ */ m({
|
|
1625
1593
|
__name: "RepeatableField",
|
|
1626
1594
|
props: {
|
|
1627
1595
|
field: {},
|
|
@@ -1630,64 +1598,64 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1630
1598
|
},
|
|
1631
1599
|
emits: ["update:modelValue"],
|
|
1632
1600
|
setup(t, { emit: n }) {
|
|
1633
|
-
let i = t, a = n, { t: s } = V(), c =
|
|
1634
|
-
function
|
|
1601
|
+
let i = t, a = n, { t: s } = V(), c = g(() => i.modelValue || []), l = g(() => !i.field.maxItems || c.value.length < i.field.maxItems), u = g(() => !i.field.minItems || c.value.length > i.field.minItems);
|
|
1602
|
+
function f() {
|
|
1635
1603
|
if (!l.value || i.readOnly) return;
|
|
1636
1604
|
let e = {};
|
|
1637
1605
|
for (let t of i.field.fields) e[t.key] = t.default ?? "";
|
|
1638
1606
|
a("update:modelValue", [...c.value, e]);
|
|
1639
1607
|
}
|
|
1640
1608
|
function m(e) {
|
|
1641
|
-
if (!
|
|
1609
|
+
if (!u.value || i.readOnly) return;
|
|
1642
1610
|
let t = [...c.value];
|
|
1643
1611
|
t.splice(e, 1), a("update:modelValue", t);
|
|
1644
1612
|
}
|
|
1645
|
-
function
|
|
1613
|
+
function h(e, t, n) {
|
|
1646
1614
|
a("update:modelValue", c.value.map((r, i) => i === e ? {
|
|
1647
1615
|
...r,
|
|
1648
1616
|
[t]: n
|
|
1649
1617
|
} : r));
|
|
1650
1618
|
}
|
|
1651
|
-
return (n, i) => (e(),
|
|
1619
|
+
return (n, i) => (e(), C(fi, {
|
|
1652
1620
|
label: t.field.label,
|
|
1653
1621
|
required: t.field.required,
|
|
1654
1622
|
"read-only": t.readOnly
|
|
1655
1623
|
}, {
|
|
1656
|
-
default:
|
|
1657
|
-
(e(!0),
|
|
1624
|
+
default: M(() => [_("div", yi, [
|
|
1625
|
+
(e(!0), v(y, null, o(c.value, (n, i) => (e(), v("div", {
|
|
1658
1626
|
key: `${t.field.key}-${i}`,
|
|
1659
1627
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1660
|
-
}, [
|
|
1628
|
+
}, [_("div", bi, [_("span", xi, " #" + D(i + 1), 1), u.value && !t.readOnly ? (e(), v("button", {
|
|
1661
1629
|
key: 0,
|
|
1662
1630
|
type: "button",
|
|
1663
1631
|
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)]",
|
|
1664
|
-
title:
|
|
1632
|
+
title: T(s).customBlocks.fields.removeItem,
|
|
1665
1633
|
onClick: (e) => m(i)
|
|
1666
|
-
}, [
|
|
1634
|
+
}, [k(T(ot), {
|
|
1667
1635
|
size: 12,
|
|
1668
1636
|
"stroke-width": 2
|
|
1669
|
-
})], 8,
|
|
1637
|
+
})], 8, Si)) : b("", !0)]), (e(!0), v(y, null, o(t.field.fields, (a) => (e(), C(r(T(Ni)(a.type)), {
|
|
1670
1638
|
key: a.key,
|
|
1671
1639
|
field: a,
|
|
1672
1640
|
"model-value": n[a.key],
|
|
1673
1641
|
"read-only": t.readOnly,
|
|
1674
|
-
"onUpdate:modelValue": (e) =>
|
|
1642
|
+
"onUpdate:modelValue": (e) => h(i, a.key, e)
|
|
1675
1643
|
}, null, 8, [
|
|
1676
1644
|
"field",
|
|
1677
1645
|
"model-value",
|
|
1678
1646
|
"read-only",
|
|
1679
1647
|
"onUpdate:modelValue"
|
|
1680
1648
|
]))), 128))]))), 128)),
|
|
1681
|
-
l.value && !t.readOnly ? (e(),
|
|
1649
|
+
l.value && !t.readOnly ? (e(), v("button", {
|
|
1682
1650
|
key: 0,
|
|
1683
1651
|
type: "button",
|
|
1684
|
-
class:
|
|
1685
|
-
onClick:
|
|
1686
|
-
}, [
|
|
1652
|
+
class: p(T(ht)),
|
|
1653
|
+
onClick: f
|
|
1654
|
+
}, [k(T(X), {
|
|
1687
1655
|
size: 14,
|
|
1688
1656
|
"stroke-width": 2
|
|
1689
|
-
}),
|
|
1690
|
-
!l.value && !t.readOnly ? (e(),
|
|
1657
|
+
}), d(" " + D(T(s).customBlocks.fields.addItem), 1)], 2)) : b("", !0),
|
|
1658
|
+
!l.value && !t.readOnly ? (e(), v("p", Ci, D(T(s).customBlocks.fields.maxItemsReached), 1)) : b("", !0)
|
|
1691
1659
|
])]),
|
|
1692
1660
|
_: 1
|
|
1693
1661
|
}, 8, [
|
|
@@ -1696,11 +1664,11 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1696
1664
|
"read-only"
|
|
1697
1665
|
]));
|
|
1698
1666
|
}
|
|
1699
|
-
}),
|
|
1667
|
+
}), Ti = [
|
|
1700
1668
|
"value",
|
|
1701
1669
|
"disabled",
|
|
1702
1670
|
"title"
|
|
1703
|
-
],
|
|
1671
|
+
], Ei = ["value"], Di = /* @__PURE__ */ m({
|
|
1704
1672
|
__name: "SelectField",
|
|
1705
1673
|
props: {
|
|
1706
1674
|
field: {},
|
|
@@ -1710,21 +1678,21 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1710
1678
|
emits: ["update:modelValue"],
|
|
1711
1679
|
setup(t, { emit: n }) {
|
|
1712
1680
|
let r = n, { t: i } = V();
|
|
1713
|
-
return (n, a) => (e(),
|
|
1681
|
+
return (n, a) => (e(), C(fi, {
|
|
1714
1682
|
label: t.field.label,
|
|
1715
1683
|
required: t.field.required,
|
|
1716
1684
|
"read-only": t.readOnly
|
|
1717
1685
|
}, {
|
|
1718
|
-
default:
|
|
1719
|
-
class:
|
|
1686
|
+
default: M(() => [_("select", {
|
|
1687
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1720
1688
|
value: t.modelValue,
|
|
1721
1689
|
disabled: t.readOnly,
|
|
1722
|
-
title: t.readOnly ?
|
|
1690
|
+
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1723
1691
|
onChange: a[0] ||= (e) => !t.readOnly && r("update:modelValue", e.target.value)
|
|
1724
|
-
}, [(e(!0),
|
|
1692
|
+
}, [(e(!0), v(y, null, o(t.field.options, (t) => (e(), v("option", {
|
|
1725
1693
|
key: t.value,
|
|
1726
1694
|
value: t.value
|
|
1727
|
-
},
|
|
1695
|
+
}, D(t.label), 9, Ei))), 128))], 42, Ti)]),
|
|
1728
1696
|
_: 1
|
|
1729
1697
|
}, 8, [
|
|
1730
1698
|
"label",
|
|
@@ -1732,11 +1700,11 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1732
1700
|
"read-only"
|
|
1733
1701
|
]));
|
|
1734
1702
|
}
|
|
1735
|
-
}),
|
|
1703
|
+
}), Oi = [
|
|
1736
1704
|
"value",
|
|
1737
1705
|
"placeholder",
|
|
1738
1706
|
"title"
|
|
1739
|
-
],
|
|
1707
|
+
], ki = /* @__PURE__ */ m({
|
|
1740
1708
|
__name: "TextField",
|
|
1741
1709
|
props: {
|
|
1742
1710
|
field: {},
|
|
@@ -1746,20 +1714,20 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1746
1714
|
emits: ["update:modelValue"],
|
|
1747
1715
|
setup(t, { emit: n }) {
|
|
1748
1716
|
let r = n, { t: i } = V();
|
|
1749
|
-
return (n, a) => (e(),
|
|
1717
|
+
return (n, a) => (e(), C(fi, {
|
|
1750
1718
|
label: t.field.label,
|
|
1751
1719
|
required: t.field.required,
|
|
1752
1720
|
"read-only": t.readOnly
|
|
1753
1721
|
}, {
|
|
1754
|
-
default:
|
|
1722
|
+
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1755
1723
|
key: 0,
|
|
1756
1724
|
type: "text",
|
|
1757
|
-
class:
|
|
1725
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1758
1726
|
value: t.modelValue,
|
|
1759
1727
|
placeholder: t.field.placeholder,
|
|
1760
1728
|
disabled: "",
|
|
1761
|
-
title:
|
|
1762
|
-
}, null, 10,
|
|
1729
|
+
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1730
|
+
}, null, 10, Oi)) : (e(), C(Z, {
|
|
1763
1731
|
key: 1,
|
|
1764
1732
|
"model-value": t.modelValue,
|
|
1765
1733
|
placeholder: t.field.placeholder,
|
|
@@ -1772,13 +1740,13 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1772
1740
|
"read-only"
|
|
1773
1741
|
]));
|
|
1774
1742
|
}
|
|
1775
|
-
}),
|
|
1743
|
+
}), Ai = [
|
|
1776
1744
|
"value",
|
|
1777
1745
|
"placeholder",
|
|
1778
1746
|
"title"
|
|
1779
|
-
],
|
|
1780
|
-
text:
|
|
1781
|
-
textarea: /* @__PURE__ */
|
|
1747
|
+
], ji = "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", Mi = {
|
|
1748
|
+
text: ki,
|
|
1749
|
+
textarea: /* @__PURE__ */ m({
|
|
1782
1750
|
__name: "TextareaField",
|
|
1783
1751
|
props: {
|
|
1784
1752
|
field: {},
|
|
@@ -1788,20 +1756,20 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1788
1756
|
emits: ["update:modelValue"],
|
|
1789
1757
|
setup(t, { emit: n }) {
|
|
1790
1758
|
let r = n, { t: i } = V();
|
|
1791
|
-
return (n, a) => (e(),
|
|
1759
|
+
return (n, a) => (e(), C(fi, {
|
|
1792
1760
|
label: t.field.label,
|
|
1793
1761
|
required: t.field.required,
|
|
1794
1762
|
"read-only": t.readOnly
|
|
1795
1763
|
}, {
|
|
1796
|
-
default:
|
|
1764
|
+
default: M(() => [t.readOnly ? (e(), v("textarea", {
|
|
1797
1765
|
key: 0,
|
|
1798
1766
|
value: t.modelValue,
|
|
1799
1767
|
placeholder: t.field.placeholder,
|
|
1800
1768
|
rows: "3",
|
|
1801
1769
|
disabled: "",
|
|
1802
|
-
title:
|
|
1803
|
-
class:
|
|
1804
|
-
}, null, 8,
|
|
1770
|
+
title: T(i).customBlocks.dataSource.readOnlyTooltip,
|
|
1771
|
+
class: p(ji)
|
|
1772
|
+
}, null, 8, Ai)) : (e(), C(vn, {
|
|
1805
1773
|
key: 1,
|
|
1806
1774
|
"model-value": t.modelValue,
|
|
1807
1775
|
placeholder: t.field.placeholder,
|
|
@@ -1815,44 +1783,44 @@ var $t = ["aria-label", "onKeydown"], en = ["data-tooltip"], tn = ["data-tooltip
|
|
|
1815
1783
|
]));
|
|
1816
1784
|
}
|
|
1817
1785
|
}),
|
|
1818
|
-
image:
|
|
1819
|
-
color:
|
|
1820
|
-
number:
|
|
1821
|
-
select:
|
|
1822
|
-
boolean:
|
|
1823
|
-
repeatable:
|
|
1786
|
+
image: gi,
|
|
1787
|
+
color: pi,
|
|
1788
|
+
number: vi,
|
|
1789
|
+
select: Di,
|
|
1790
|
+
boolean: li,
|
|
1791
|
+
repeatable: wi
|
|
1824
1792
|
};
|
|
1825
|
-
function
|
|
1826
|
-
return
|
|
1793
|
+
function Ni(e) {
|
|
1794
|
+
return Mi[e] ?? ki;
|
|
1827
1795
|
}
|
|
1828
1796
|
//#endregion
|
|
1829
1797
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1830
|
-
var
|
|
1798
|
+
var Pi = {
|
|
1831
1799
|
key: 0,
|
|
1832
1800
|
class: "tpl:p-4"
|
|
1833
|
-
},
|
|
1801
|
+
}, Fi = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ii = { key: 1 }, Li = {
|
|
1834
1802
|
key: 0,
|
|
1835
1803
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1836
|
-
},
|
|
1804
|
+
}, Ri = {
|
|
1837
1805
|
key: 1,
|
|
1838
1806
|
class: "tpl:mb-4"
|
|
1839
|
-
},
|
|
1807
|
+
}, zi = {
|
|
1840
1808
|
key: 1,
|
|
1841
1809
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1842
|
-
},
|
|
1810
|
+
}, Bi = {
|
|
1843
1811
|
key: 0,
|
|
1844
1812
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1845
|
-
},
|
|
1813
|
+
}, Vi = {
|
|
1846
1814
|
key: 2,
|
|
1847
1815
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1848
|
-
},
|
|
1816
|
+
}, Hi = /* @__PURE__ */ m({
|
|
1849
1817
|
__name: "CustomBlockToolbar",
|
|
1850
1818
|
props: { block: {} },
|
|
1851
1819
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1852
1820
|
setup(t, { emit: n }) {
|
|
1853
|
-
let i = t, a = n, { t: s } = V(), c =
|
|
1821
|
+
let i = t, a = n, { t: s } = V(), c = A(Me, []), l = g(() => c.find((e) => e.type === i.block.customType)), { isFetching: u, fetchError: f, fetch: p, hasDataSource: m, needsFetch: h } = re({
|
|
1854
1822
|
definition: l,
|
|
1855
|
-
block:
|
|
1823
|
+
block: g(() => i.block),
|
|
1856
1824
|
onUpdate: (e, t) => {
|
|
1857
1825
|
a("updateFieldValues", e), a("updateDataSourceFetched", t);
|
|
1858
1826
|
}
|
|
@@ -1860,43 +1828,43 @@ var Mi = {
|
|
|
1860
1828
|
function x(e) {
|
|
1861
1829
|
return e.readOnly === !0 && m.value && !!i.block.dataSourceFetched;
|
|
1862
1830
|
}
|
|
1863
|
-
function
|
|
1831
|
+
function S(e, t) {
|
|
1864
1832
|
a("updateFieldValues", {
|
|
1865
1833
|
...i.block.fieldValues,
|
|
1866
1834
|
[e]: t
|
|
1867
1835
|
});
|
|
1868
1836
|
}
|
|
1869
|
-
return (n, i) => l.value ? (e(),
|
|
1870
|
-
l.value.description ? (e(),
|
|
1871
|
-
|
|
1837
|
+
return (n, i) => l.value ? (e(), v("div", Ii, [
|
|
1838
|
+
l.value.description ? (e(), v("p", Li, D(l.value.description), 1)) : b("", !0),
|
|
1839
|
+
T(m) ? (e(), v("div", Ri, [T(h) && !T(u) ? (e(), v("button", {
|
|
1872
1840
|
key: 0,
|
|
1873
1841
|
type: "button",
|
|
1874
1842
|
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)]",
|
|
1875
|
-
onClick: i[0] ||= (...e) =>
|
|
1876
|
-
},
|
|
1843
|
+
onClick: i[0] ||= (...e) => T(p) && T(p)(...e)
|
|
1844
|
+
}, D(l.value?.dataSource?.label || T(s).customBlocks.dataSource.fetchButton), 1)) : (e(), v("div", zi, [T(u) ? (e(), v("div", Bi, D(T(s).customBlocks.dataSource.fetching), 1)) : (e(), v("button", {
|
|
1877
1845
|
key: 1,
|
|
1878
1846
|
type: "button",
|
|
1879
1847
|
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)]",
|
|
1880
|
-
onClick: i[1] ||= (...e) =>
|
|
1881
|
-
}, [
|
|
1848
|
+
onClick: i[1] ||= (...e) => T(p) && T(p)(...e)
|
|
1849
|
+
}, [k(T(Ze), { size: 12 }), d(" " + D(T(s).customBlocks.dataSource.changeButton), 1)]))])), T(f) ? (e(), v("p", Vi, [k(T(Ge), {
|
|
1882
1850
|
size: 14,
|
|
1883
1851
|
class: "tpl:shrink-0"
|
|
1884
|
-
}),
|
|
1885
|
-
(e(!0),
|
|
1852
|
+
}), d(" " + D(T(s).customBlocks.dataSource.fetchError), 1)])) : b("", !0)])) : b("", !0),
|
|
1853
|
+
(e(!0), v(y, null, o(l.value.fields, (n) => (e(), C(r(T(Ni)(n.type)), {
|
|
1886
1854
|
key: n.key,
|
|
1887
1855
|
field: n,
|
|
1888
1856
|
"model-value": t.block.fieldValues[n.key],
|
|
1889
1857
|
"read-only": x(n),
|
|
1890
|
-
"onUpdate:modelValue": (e) =>
|
|
1858
|
+
"onUpdate:modelValue": (e) => S(n.key, e)
|
|
1891
1859
|
}, null, 8, [
|
|
1892
1860
|
"field",
|
|
1893
1861
|
"model-value",
|
|
1894
1862
|
"read-only",
|
|
1895
1863
|
"onUpdate:modelValue"
|
|
1896
1864
|
]))), 128))
|
|
1897
|
-
])) : (e(),
|
|
1865
|
+
])) : (e(), v("div", Pi, [_("p", Fi, D(T(s).customBlocks.toolbar.noDefinition), 1)]));
|
|
1898
1866
|
}
|
|
1899
|
-
}),
|
|
1867
|
+
}), Ui = { class: "tpl:mb-3.5" }, Wi = { class: "tpl:mb-3.5" }, Gi = { class: "tpl:mb-3.5" }, Ki = { class: "tpl:flex tpl:items-stretch" }, qi = ["value"], Ji = /* @__PURE__ */ m({
|
|
1900
1868
|
__name: "DividerToolbar",
|
|
1901
1869
|
props: { block: {} },
|
|
1902
1870
|
emits: ["update"],
|
|
@@ -1905,96 +1873,96 @@ var Mi = {
|
|
|
1905
1873
|
function a(e, t) {
|
|
1906
1874
|
r("update", { [e]: t });
|
|
1907
1875
|
}
|
|
1908
|
-
return (n, r) => (e(),
|
|
1909
|
-
|
|
1876
|
+
return (n, r) => (e(), v(y, null, [
|
|
1877
|
+
_("div", Ui, [_("label", { class: p(T(W)) }, D(T(i).divider.style), 3), k(Y, {
|
|
1910
1878
|
options: [
|
|
1911
1879
|
{
|
|
1912
1880
|
value: "solid",
|
|
1913
|
-
label:
|
|
1881
|
+
label: T(i).divider.solid
|
|
1914
1882
|
},
|
|
1915
1883
|
{
|
|
1916
1884
|
value: "dashed",
|
|
1917
|
-
label:
|
|
1885
|
+
label: T(i).divider.dashed
|
|
1918
1886
|
},
|
|
1919
1887
|
{
|
|
1920
1888
|
value: "dotted",
|
|
1921
|
-
label:
|
|
1889
|
+
label: T(i).divider.dotted
|
|
1922
1890
|
}
|
|
1923
1891
|
],
|
|
1924
1892
|
"model-value": t.block.lineStyle,
|
|
1925
1893
|
"onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
|
|
1926
1894
|
}, null, 8, ["options", "model-value"])]),
|
|
1927
|
-
|
|
1895
|
+
_("div", Wi, [_("label", { class: p(T(W)) }, D(T(i).divider.color), 3), k(q, {
|
|
1928
1896
|
"model-value": t.block.color,
|
|
1929
1897
|
"onUpdate:modelValue": r[1] ||= (e) => a("color", e)
|
|
1930
1898
|
}, null, 8, ["model-value"])]),
|
|
1931
|
-
|
|
1899
|
+
_("div", Gi, [_("label", { class: p(T(W)) }, D(T(i).divider.thickness), 3), _("div", Ki, [_("input", {
|
|
1932
1900
|
type: "number",
|
|
1933
|
-
class:
|
|
1901
|
+
class: p(T(K)),
|
|
1934
1902
|
value: t.block.thickness,
|
|
1935
1903
|
min: "1",
|
|
1936
1904
|
max: "10",
|
|
1937
1905
|
onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
|
|
1938
|
-
}, null, 42,
|
|
1906
|
+
}, null, 42, qi), _("span", { class: p(T(G)) }, "px", 2)])])
|
|
1939
1907
|
], 64));
|
|
1940
1908
|
}
|
|
1941
|
-
}),
|
|
1909
|
+
}), Yi = { class: "tpl:mb-3.5" }, Xi = ["value"], Zi = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Qi = /* @__PURE__ */ m({
|
|
1942
1910
|
__name: "HtmlToolbar",
|
|
1943
1911
|
props: { block: {} },
|
|
1944
1912
|
emits: ["update"],
|
|
1945
1913
|
setup(t, { emit: n }) {
|
|
1946
1914
|
let r = n, { t: i } = V();
|
|
1947
|
-
return (n, a) => (e(),
|
|
1948
|
-
|
|
1949
|
-
|
|
1915
|
+
return (n, a) => (e(), v("div", Yi, [
|
|
1916
|
+
_("label", { class: p(T(W)) }, D(T(i).html.content), 3),
|
|
1917
|
+
_("textarea", {
|
|
1950
1918
|
value: t.block.content,
|
|
1951
1919
|
placeholder: "<div>...</div>",
|
|
1952
1920
|
rows: "10",
|
|
1953
|
-
class:
|
|
1921
|
+
class: p(T(gt)),
|
|
1954
1922
|
onInput: a[0] ||= (e) => r("update", { content: e.target.value })
|
|
1955
|
-
}, null, 42,
|
|
1956
|
-
|
|
1923
|
+
}, null, 42, Xi),
|
|
1924
|
+
_("p", Zi, [k(T($e), {
|
|
1957
1925
|
size: 12,
|
|
1958
1926
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1959
|
-
}),
|
|
1927
|
+
}), d(" " + D(T(i).html.sanitizationHint), 1)])
|
|
1960
1928
|
]));
|
|
1961
1929
|
}
|
|
1962
|
-
}),
|
|
1930
|
+
}), $i = { class: "tpl:mb-3.5" }, ea = {
|
|
1963
1931
|
key: 0,
|
|
1964
1932
|
class: "tpl:mb-3.5"
|
|
1965
|
-
},
|
|
1933
|
+
}, ta = ["value", "placeholder"], na = { class: "tpl:mb-3.5" }, ra = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, ia = ["checked"], aa = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, oa = { class: "tpl:mb-3.5" }, sa = ["value"], ca = { value: "full" }, la = { class: "tpl:mb-3.5" }, ua = { class: "tpl:mb-3.5" }, da = {
|
|
1966
1934
|
key: 0,
|
|
1967
1935
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1968
|
-
},
|
|
1936
|
+
}, fa = ["checked"], pa = /* @__PURE__ */ m({
|
|
1969
1937
|
__name: "ImageToolbar",
|
|
1970
1938
|
props: { block: {} },
|
|
1971
1939
|
emits: ["update"],
|
|
1972
1940
|
setup(t, { emit: n }) {
|
|
1973
|
-
let r = n, { t: i } = V(), a =
|
|
1974
|
-
|
|
1941
|
+
let r = n, { t: i } = V(), a = A(De, null), o = A(Ae, R.liquid), s = dt(), c = g(() => !!a), l = u(!1), f = u(!1), { start: m } = Ee(() => {
|
|
1942
|
+
l.value = !1;
|
|
1975
1943
|
}, 1e3, { immediate: !1 });
|
|
1976
|
-
function
|
|
1944
|
+
function h(e, t) {
|
|
1977
1945
|
r("update", { [e]: t });
|
|
1978
1946
|
}
|
|
1979
1947
|
async function x() {
|
|
1980
1948
|
let e = await a?.({ accept: ["images"] });
|
|
1981
|
-
s.alive && e && (
|
|
1949
|
+
s.alive && e && (h("src", e.url), e.alt && (h("alt", e.alt), f.value = !0), l.value = !0, m());
|
|
1982
1950
|
}
|
|
1983
|
-
return (n, r) => (e(),
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1951
|
+
return (n, r) => (e(), v(y, null, [
|
|
1952
|
+
_("div", $i, [
|
|
1953
|
+
_("label", { class: p(T(W)) }, D(T(i).image.imageUrl), 3),
|
|
1954
|
+
k(Z, {
|
|
1987
1955
|
"model-value": t.block.src,
|
|
1988
1956
|
type: "url",
|
|
1989
|
-
placeholder:
|
|
1990
|
-
pulse:
|
|
1991
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1957
|
+
placeholder: T(i).image.imageUrlPlaceholder,
|
|
1958
|
+
pulse: l.value,
|
|
1959
|
+
"onUpdate:modelValue": r[0] ||= (e) => h("src", e)
|
|
1992
1960
|
}, null, 8, [
|
|
1993
1961
|
"model-value",
|
|
1994
1962
|
"placeholder",
|
|
1995
1963
|
"pulse"
|
|
1996
1964
|
]),
|
|
1997
|
-
c.value ? (e(),
|
|
1965
|
+
c.value ? (e(), v("button", {
|
|
1998
1966
|
key: 0,
|
|
1999
1967
|
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",
|
|
2000
1968
|
style: {
|
|
@@ -2003,90 +1971,90 @@ var Mi = {
|
|
|
2003
1971
|
"background-color": "var(--tpl-bg)"
|
|
2004
1972
|
},
|
|
2005
1973
|
onClick: x
|
|
2006
|
-
}, [
|
|
1974
|
+
}, [k(T(me), {
|
|
2007
1975
|
size: 14,
|
|
2008
1976
|
"stroke-width": 1.5
|
|
2009
|
-
}),
|
|
1977
|
+
}), d(" " + D(T(i).image.browseMedia), 1)])) : b("", !0)
|
|
2010
1978
|
]),
|
|
2011
|
-
|
|
1979
|
+
T(L)(t.block.src, T(o)) ? (e(), v("div", ea, [_("label", { class: p(T(W)) }, [d(D(T(i).image.placeholderUrl) + " ", 1), r[8] ||= _("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, D("(optional)"), -1)], 2), _("input", {
|
|
2012
1980
|
type: "url",
|
|
2013
|
-
class:
|
|
1981
|
+
class: p(T(U)),
|
|
2014
1982
|
value: t.block.placeholderUrl || "",
|
|
2015
|
-
placeholder:
|
|
2016
|
-
onInput: r[1] ||= (e) =>
|
|
2017
|
-
}, null, 42,
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
1983
|
+
placeholder: T(i).image.placeholderUrlPlaceholder,
|
|
1984
|
+
onInput: r[1] ||= (e) => h("placeholderUrl", e.target.value)
|
|
1985
|
+
}, null, 42, ta)])) : b("", !0),
|
|
1986
|
+
_("div", na, [
|
|
1987
|
+
_("label", { class: p(T(W)) }, D(T(i).image.altText), 3),
|
|
1988
|
+
k(Z, {
|
|
2021
1989
|
"model-value": t.block.alt,
|
|
2022
1990
|
type: "text",
|
|
2023
|
-
placeholder:
|
|
2024
|
-
pulse:
|
|
1991
|
+
placeholder: T(i).image.altTextPlaceholder,
|
|
1992
|
+
pulse: f.value,
|
|
2025
1993
|
disabled: t.block.decorative === !0,
|
|
2026
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
1994
|
+
"onUpdate:modelValue": r[2] ||= (e) => h("alt", e)
|
|
2027
1995
|
}, null, 8, [
|
|
2028
1996
|
"model-value",
|
|
2029
1997
|
"placeholder",
|
|
2030
1998
|
"pulse",
|
|
2031
1999
|
"disabled"
|
|
2032
2000
|
]),
|
|
2033
|
-
|
|
2001
|
+
_("label", ra, [_("input", {
|
|
2034
2002
|
type: "checkbox",
|
|
2035
2003
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2036
2004
|
checked: t.block.decorative === !0,
|
|
2037
|
-
onChange: r[3] ||= (e) =>
|
|
2038
|
-
}, null, 40,
|
|
2005
|
+
onChange: r[3] ||= (e) => h("decorative", e.target.checked)
|
|
2006
|
+
}, null, 40, ia), _("span", null, [d(D(T(i).image.decorative) + " ", 1), _("span", aa, D(T(i).image.decorativeHint), 1)])])
|
|
2039
2007
|
]),
|
|
2040
|
-
|
|
2041
|
-
class:
|
|
2008
|
+
_("div", oa, [_("label", { class: p(T(W)) }, D(T(i).image.width), 3), _("select", {
|
|
2009
|
+
class: p(T(U)),
|
|
2042
2010
|
value: t.block.width,
|
|
2043
|
-
onChange: r[4] ||= (e) =>
|
|
2011
|
+
onChange: r[4] ||= (e) => h("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2044
2012
|
}, [
|
|
2045
|
-
|
|
2046
|
-
r[9] ||=
|
|
2047
|
-
r[10] ||=
|
|
2048
|
-
r[11] ||=
|
|
2049
|
-
], 42,
|
|
2050
|
-
|
|
2013
|
+
_("option", ca, D(T(i).image.fullWidth), 1),
|
|
2014
|
+
r[9] ||= _("option", { value: "300" }, "300px", -1),
|
|
2015
|
+
r[10] ||= _("option", { value: "400" }, "400px", -1),
|
|
2016
|
+
r[11] ||= _("option", { value: "500" }, "500px", -1)
|
|
2017
|
+
], 42, sa)]),
|
|
2018
|
+
_("div", la, [_("label", { class: p(T(W)) }, D(T(i).title.align), 3), k(Y, {
|
|
2051
2019
|
options: [
|
|
2052
2020
|
{
|
|
2053
2021
|
value: "left",
|
|
2054
|
-
label:
|
|
2022
|
+
label: T(i).title.alignLeft
|
|
2055
2023
|
},
|
|
2056
2024
|
{
|
|
2057
2025
|
value: "center",
|
|
2058
|
-
label:
|
|
2026
|
+
label: T(i).title.alignCenter
|
|
2059
2027
|
},
|
|
2060
2028
|
{
|
|
2061
2029
|
value: "right",
|
|
2062
|
-
label:
|
|
2030
|
+
label: T(i).title.alignRight
|
|
2063
2031
|
}
|
|
2064
2032
|
],
|
|
2065
2033
|
"model-value": t.block.align,
|
|
2066
|
-
"onUpdate:modelValue": r[5] ||= (e) =>
|
|
2034
|
+
"onUpdate:modelValue": r[5] ||= (e) => h("align", e)
|
|
2067
2035
|
}, null, 8, ["options", "model-value"])]),
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2036
|
+
_("div", ua, [
|
|
2037
|
+
_("label", { class: p(T(W)) }, D(T(i).image.linkUrl), 3),
|
|
2038
|
+
k(Z, {
|
|
2071
2039
|
"model-value": t.block.linkUrl || "",
|
|
2072
2040
|
type: "url",
|
|
2073
|
-
placeholder:
|
|
2074
|
-
"onUpdate:modelValue": r[6] ||= (e) =>
|
|
2041
|
+
placeholder: T(i).image.imageUrlPlaceholder,
|
|
2042
|
+
"onUpdate:modelValue": r[6] ||= (e) => h("linkUrl", e)
|
|
2075
2043
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2076
|
-
t.block.linkUrl ? (e(),
|
|
2044
|
+
t.block.linkUrl ? (e(), v("label", da, [_("input", {
|
|
2077
2045
|
type: "checkbox",
|
|
2078
2046
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2079
2047
|
checked: t.block.linkOpenInNewTab ?? !1,
|
|
2080
|
-
onChange: r[7] ||= (e) =>
|
|
2081
|
-
}, null, 40,
|
|
2048
|
+
onChange: r[7] ||= (e) => h("linkOpenInNewTab", e.target.checked)
|
|
2049
|
+
}, null, 40, fa), d(" " + D(T(i).image.openInNewTab), 1)])) : b("", !0)
|
|
2082
2050
|
])
|
|
2083
2051
|
], 64));
|
|
2084
2052
|
}
|
|
2085
|
-
}),
|
|
2053
|
+
}), ma = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ha = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ga = [
|
|
2086
2054
|
"value",
|
|
2087
2055
|
"placeholder",
|
|
2088
2056
|
"onInput"
|
|
2089
|
-
],
|
|
2057
|
+
], _a = ["title", "onClick"], va = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ya = ["checked", "onChange"], ba = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xa = ["value"], Sa = { value: "" }, Ca = ["value"], wa = ["value"], Ta = /* @__PURE__ */ m({
|
|
2090
2058
|
__name: "MenuToolbar",
|
|
2091
2059
|
props: {
|
|
2092
2060
|
block: {},
|
|
@@ -2094,7 +2062,7 @@ var Mi = {
|
|
|
2094
2062
|
},
|
|
2095
2063
|
emits: ["update"],
|
|
2096
2064
|
setup(t, { emit: n }) {
|
|
2097
|
-
let r = t, i = n, { t: a } = V(), s =
|
|
2065
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2098
2066
|
{
|
|
2099
2067
|
key: "openInNewTab",
|
|
2100
2068
|
label: a.menu.openInNewTab
|
|
@@ -2107,29 +2075,29 @@ var Mi = {
|
|
|
2107
2075
|
key: "underline",
|
|
2108
2076
|
label: a.menu.underline
|
|
2109
2077
|
}
|
|
2110
|
-
]), c =
|
|
2078
|
+
]), c = g(() => [
|
|
2111
2079
|
{
|
|
2112
2080
|
value: "left",
|
|
2113
2081
|
label: a.title.alignLeft,
|
|
2114
|
-
icon:
|
|
2082
|
+
icon: rt
|
|
2115
2083
|
},
|
|
2116
2084
|
{
|
|
2117
2085
|
value: "center",
|
|
2118
2086
|
label: a.title.alignCenter,
|
|
2119
|
-
icon:
|
|
2087
|
+
icon: it
|
|
2120
2088
|
},
|
|
2121
2089
|
{
|
|
2122
2090
|
value: "right",
|
|
2123
2091
|
label: a.title.alignRight,
|
|
2124
|
-
icon:
|
|
2092
|
+
icon: at
|
|
2125
2093
|
}
|
|
2126
2094
|
]);
|
|
2127
2095
|
function l(e, t) {
|
|
2128
2096
|
i("update", { [e]: t });
|
|
2129
2097
|
}
|
|
2130
|
-
function
|
|
2098
|
+
function u() {
|
|
2131
2099
|
let e = {
|
|
2132
|
-
id:
|
|
2100
|
+
id: I(),
|
|
2133
2101
|
text: "",
|
|
2134
2102
|
url: "",
|
|
2135
2103
|
openInNewTab: !1,
|
|
@@ -2138,7 +2106,7 @@ var Mi = {
|
|
|
2138
2106
|
};
|
|
2139
2107
|
i("update", { items: [...r.block.items, e] });
|
|
2140
2108
|
}
|
|
2141
|
-
function
|
|
2109
|
+
function f(e, t, n) {
|
|
2142
2110
|
i("update", { items: r.block.items.map((r) => r.id === e ? {
|
|
2143
2111
|
...r,
|
|
2144
2112
|
[t]: n
|
|
@@ -2147,72 +2115,72 @@ var Mi = {
|
|
|
2147
2115
|
function m(e) {
|
|
2148
2116
|
i("update", { items: r.block.items.filter((t) => t.id !== e) });
|
|
2149
2117
|
}
|
|
2150
|
-
return (n, r) => (e(),
|
|
2151
|
-
|
|
2152
|
-
default:
|
|
2118
|
+
return (n, r) => (e(), v(y, null, [
|
|
2119
|
+
k(J, { label: T(a).menu.items }, {
|
|
2120
|
+
default: M(() => [_("div", ma, [(e(!0), v(y, null, o(t.block.items, (n) => (e(), v("div", {
|
|
2153
2121
|
key: n.id,
|
|
2154
2122
|
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"
|
|
2155
2123
|
}, [
|
|
2156
|
-
|
|
2124
|
+
_("div", ha, [_("input", {
|
|
2157
2125
|
type: "text",
|
|
2158
|
-
class:
|
|
2126
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2159
2127
|
value: n.text,
|
|
2160
|
-
placeholder:
|
|
2161
|
-
onInput: (e) =>
|
|
2162
|
-
}, null, 42,
|
|
2163
|
-
class:
|
|
2164
|
-
title:
|
|
2128
|
+
placeholder: T(a).menu.text,
|
|
2129
|
+
onInput: (e) => f(n.id, "text", e.target.value)
|
|
2130
|
+
}, null, 42, ga), _("button", {
|
|
2131
|
+
class: p(T(mt)),
|
|
2132
|
+
title: T(a).menu.removeItem,
|
|
2165
2133
|
onClick: (e) => m(n.id)
|
|
2166
|
-
}, [
|
|
2134
|
+
}, [k(T(st), {
|
|
2167
2135
|
size: 14,
|
|
2168
2136
|
"stroke-width": 2
|
|
2169
|
-
})], 10,
|
|
2170
|
-
|
|
2137
|
+
})], 10, _a)]),
|
|
2138
|
+
k(Z, {
|
|
2171
2139
|
"model-value": n.url,
|
|
2172
2140
|
type: "url",
|
|
2173
|
-
placeholder:
|
|
2174
|
-
"onUpdate:modelValue": (e) =>
|
|
2141
|
+
placeholder: T(a).menu.urlPlaceholder,
|
|
2142
|
+
"onUpdate:modelValue": (e) => f(n.id, "url", e)
|
|
2175
2143
|
}, null, 8, [
|
|
2176
2144
|
"model-value",
|
|
2177
2145
|
"placeholder",
|
|
2178
2146
|
"onUpdate:modelValue"
|
|
2179
2147
|
]),
|
|
2180
|
-
|
|
2148
|
+
_("div", va, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("label", {
|
|
2181
2149
|
key: t.key,
|
|
2182
2150
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2183
|
-
}, [
|
|
2151
|
+
}, [_("input", {
|
|
2184
2152
|
type: "checkbox",
|
|
2185
2153
|
checked: n[t.key],
|
|
2186
2154
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2187
|
-
onChange: (e) =>
|
|
2188
|
-
}, null, 40,
|
|
2189
|
-
|
|
2155
|
+
onChange: (e) => f(n.id, t.key, e.target.checked)
|
|
2156
|
+
}, null, 40, ya), d(" " + D(t.label), 1)]))), 128))]),
|
|
2157
|
+
_("div", ba, [_("label", { class: p([T(W), "tpl:!mb-0"]) }, D(T(a).menu.color), 3), k(q, {
|
|
2190
2158
|
"swatch-only": "",
|
|
2191
2159
|
"model-value": n.color || t.block.linkColor || t.block.color,
|
|
2192
|
-
"onUpdate:modelValue": (e) =>
|
|
2160
|
+
"onUpdate:modelValue": (e) => f(n.id, "color", e)
|
|
2193
2161
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2194
|
-
]))), 128)),
|
|
2195
|
-
class:
|
|
2196
|
-
onClick:
|
|
2197
|
-
}, [
|
|
2162
|
+
]))), 128)), _("button", {
|
|
2163
|
+
class: p(T(ht)),
|
|
2164
|
+
onClick: u
|
|
2165
|
+
}, [k(T(X), {
|
|
2198
2166
|
size: 14,
|
|
2199
2167
|
"stroke-width": 2
|
|
2200
|
-
}),
|
|
2168
|
+
}), d(" " + D(T(a).menu.addItem), 1)], 2)])]),
|
|
2201
2169
|
_: 1
|
|
2202
2170
|
}, 8, ["label"]),
|
|
2203
|
-
|
|
2204
|
-
default:
|
|
2205
|
-
class:
|
|
2171
|
+
k(J, { label: T(a).menu.fontFamily }, {
|
|
2172
|
+
default: M(() => [_("select", {
|
|
2173
|
+
class: p(T(U)),
|
|
2206
2174
|
value: t.block.fontFamily || "",
|
|
2207
2175
|
onChange: r[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
2208
|
-
}, [
|
|
2176
|
+
}, [_("option", Sa, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2209
2177
|
key: t.value,
|
|
2210
2178
|
value: t.value
|
|
2211
|
-
},
|
|
2179
|
+
}, D(t.label), 9, Ca))), 128))], 42, xa)]),
|
|
2212
2180
|
_: 1
|
|
2213
2181
|
}, 8, ["label"]),
|
|
2214
|
-
|
|
2215
|
-
default:
|
|
2182
|
+
k(J, { label: T(a).menu.fontSize }, {
|
|
2183
|
+
default: M(() => [k(yt, {
|
|
2216
2184
|
"model-value": t.block.fontSize,
|
|
2217
2185
|
min: 8,
|
|
2218
2186
|
max: 48,
|
|
@@ -2221,46 +2189,46 @@ var Mi = {
|
|
|
2221
2189
|
}, null, 8, ["model-value"])]),
|
|
2222
2190
|
_: 1
|
|
2223
2191
|
}, 8, ["label"]),
|
|
2224
|
-
|
|
2225
|
-
default:
|
|
2192
|
+
k(J, { label: T(a).menu.color }, {
|
|
2193
|
+
default: M(() => [k(q, {
|
|
2226
2194
|
"model-value": t.block.color,
|
|
2227
2195
|
"onUpdate:modelValue": r[2] ||= (e) => l("color", e)
|
|
2228
2196
|
}, null, 8, ["model-value"])]),
|
|
2229
2197
|
_: 1
|
|
2230
2198
|
}, 8, ["label"]),
|
|
2231
|
-
|
|
2232
|
-
default:
|
|
2199
|
+
k(J, { label: T(a).menu.linkColor }, {
|
|
2200
|
+
default: M(() => [k(q, {
|
|
2233
2201
|
"model-value": t.block.linkColor || t.block.color,
|
|
2234
2202
|
"onUpdate:modelValue": r[3] ||= (e) => l("linkColor", e || void 0)
|
|
2235
2203
|
}, null, 8, ["model-value"])]),
|
|
2236
2204
|
_: 1
|
|
2237
2205
|
}, 8, ["label"]),
|
|
2238
|
-
|
|
2239
|
-
default:
|
|
2206
|
+
k(J, { label: T(a).menu.textAlign }, {
|
|
2207
|
+
default: M(() => [k(Y, {
|
|
2240
2208
|
options: c.value,
|
|
2241
2209
|
"model-value": t.block.textAlign,
|
|
2242
2210
|
"onUpdate:modelValue": r[4] ||= (e) => l("textAlign", e)
|
|
2243
2211
|
}, null, 8, ["options", "model-value"])]),
|
|
2244
2212
|
_: 1
|
|
2245
2213
|
}, 8, ["label"]),
|
|
2246
|
-
|
|
2247
|
-
default:
|
|
2214
|
+
k(J, { label: T(a).menu.separator }, {
|
|
2215
|
+
default: M(() => [_("input", {
|
|
2248
2216
|
type: "text",
|
|
2249
|
-
class:
|
|
2217
|
+
class: p(T(U)),
|
|
2250
2218
|
value: t.block.separator,
|
|
2251
2219
|
onInput: r[5] ||= (e) => l("separator", e.target.value)
|
|
2252
|
-
}, null, 42,
|
|
2220
|
+
}, null, 42, wa)]),
|
|
2253
2221
|
_: 1
|
|
2254
2222
|
}, 8, ["label"]),
|
|
2255
|
-
|
|
2256
|
-
default:
|
|
2223
|
+
k(J, { label: T(a).menu.separatorColor }, {
|
|
2224
|
+
default: M(() => [k(q, {
|
|
2257
2225
|
"model-value": t.block.separatorColor,
|
|
2258
2226
|
"onUpdate:modelValue": r[6] ||= (e) => l("separatorColor", e)
|
|
2259
2227
|
}, null, 8, ["model-value"])]),
|
|
2260
2228
|
_: 1
|
|
2261
2229
|
}, 8, ["label"]),
|
|
2262
|
-
|
|
2263
|
-
default:
|
|
2230
|
+
k(J, { label: T(a).menu.spacing }, {
|
|
2231
|
+
default: M(() => [k(yt, {
|
|
2264
2232
|
"model-value": t.block.spacing,
|
|
2265
2233
|
min: 0,
|
|
2266
2234
|
max: 50,
|
|
@@ -2274,11 +2242,11 @@ var Mi = {
|
|
|
2274
2242
|
});
|
|
2275
2243
|
//#endregion
|
|
2276
2244
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2277
|
-
function
|
|
2245
|
+
function Ea(e) {
|
|
2278
2246
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2279
2247
|
}
|
|
2280
|
-
function
|
|
2281
|
-
let n =
|
|
2248
|
+
function Da(e, t) {
|
|
2249
|
+
let n = Ea(t);
|
|
2282
2250
|
if (e.length === n) return e;
|
|
2283
2251
|
if (e.length < n) {
|
|
2284
2252
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2289,12 +2257,12 @@ function Ta(e, t) {
|
|
|
2289
2257
|
}
|
|
2290
2258
|
//#endregion
|
|
2291
2259
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2292
|
-
var
|
|
2260
|
+
var Oa = { class: "tpl:mb-3.5" }, ka = ["value"], Aa = ["value"], ja = /* @__PURE__ */ m({
|
|
2293
2261
|
__name: "SectionToolbar",
|
|
2294
2262
|
props: { block: {} },
|
|
2295
2263
|
emits: ["update"],
|
|
2296
2264
|
setup(t, { emit: n }) {
|
|
2297
|
-
let r = t, i = n, { t: a } = V(), s =
|
|
2265
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2298
2266
|
{
|
|
2299
2267
|
value: "1",
|
|
2300
2268
|
label: a.section.column1
|
|
@@ -2320,19 +2288,19 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2320
2288
|
let t = e.target.value;
|
|
2321
2289
|
i("update", {
|
|
2322
2290
|
columns: t,
|
|
2323
|
-
children:
|
|
2291
|
+
children: Da(r.block.children, t)
|
|
2324
2292
|
});
|
|
2325
2293
|
}
|
|
2326
|
-
return (n, r) => (e(),
|
|
2327
|
-
class:
|
|
2294
|
+
return (n, r) => (e(), v("div", Oa, [_("label", { class: p(T(W)) }, D(T(a).section.columns), 3), _("select", {
|
|
2295
|
+
class: p(T(U)),
|
|
2328
2296
|
value: t.block.columns,
|
|
2329
2297
|
onChange: c
|
|
2330
|
-
}, [(e(!0),
|
|
2298
|
+
}, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("option", {
|
|
2331
2299
|
key: t.value,
|
|
2332
2300
|
value: t.value
|
|
2333
|
-
},
|
|
2301
|
+
}, D(t.label), 9, Aa))), 128))], 42, ka)]));
|
|
2334
2302
|
}
|
|
2335
|
-
}),
|
|
2303
|
+
}), Ma = { class: "tpl:mb-3.5" }, Na = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Pa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Fa = ["value", "onChange"], Ia = ["value"], La = ["title", "onClick"], Ra = { class: "tpl:mb-3.5" }, za = ["value"], Ba = { value: "solid" }, Va = { value: "outlined" }, Ha = { value: "rounded" }, Ua = { value: "square" }, Wa = { value: "circle" }, Ga = { class: "tpl:mb-3.5" }, Ka = { class: "tpl:mb-3.5" }, qa = { class: "tpl:flex tpl:items-stretch" }, Ja = ["value"], Ya = { class: "tpl:mb-3.5" }, Xa = /* @__PURE__ */ m({
|
|
2336
2304
|
__name: "SocialToolbar",
|
|
2337
2305
|
props: { block: {} },
|
|
2338
2306
|
emits: ["update"],
|
|
@@ -2343,7 +2311,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2343
2311
|
}
|
|
2344
2312
|
function c() {
|
|
2345
2313
|
let e = {
|
|
2346
|
-
id:
|
|
2314
|
+
id: I(),
|
|
2347
2315
|
platform: "facebook",
|
|
2348
2316
|
url: ""
|
|
2349
2317
|
};
|
|
@@ -2355,97 +2323,97 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2355
2323
|
[t]: n
|
|
2356
2324
|
} : r) });
|
|
2357
2325
|
}
|
|
2358
|
-
function
|
|
2326
|
+
function u(e) {
|
|
2359
2327
|
i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
|
|
2360
2328
|
}
|
|
2361
|
-
return (n, r) => (e(),
|
|
2362
|
-
|
|
2329
|
+
return (n, r) => (e(), v(y, null, [
|
|
2330
|
+
_("div", Ma, [_("label", { class: p(T(W)) }, D(T(a).social.icons), 3), _("div", Na, [(e(!0), v(y, null, o(t.block.icons, (t) => (e(), v("div", {
|
|
2363
2331
|
key: t.id,
|
|
2364
2332
|
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"
|
|
2365
|
-
}, [
|
|
2333
|
+
}, [_("div", Pa, [_("select", {
|
|
2366
2334
|
"data-testid": "social-platform-select",
|
|
2367
|
-
class:
|
|
2335
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2368
2336
|
value: t.platform,
|
|
2369
2337
|
onChange: (e) => l(t.id, "platform", e.target.value)
|
|
2370
|
-
}, [(e(!0),
|
|
2338
|
+
}, [(e(!0), v(y, null, o(T(xe), (t) => (e(), v("option", {
|
|
2371
2339
|
key: t,
|
|
2372
2340
|
value: t
|
|
2373
|
-
},
|
|
2374
|
-
class:
|
|
2375
|
-
title:
|
|
2376
|
-
onClick: (e) =>
|
|
2377
|
-
}, [
|
|
2341
|
+
}, D(T(ve)[t].name), 9, Ia))), 128))], 42, Fa), _("button", {
|
|
2342
|
+
class: p(T(mt)),
|
|
2343
|
+
title: T(a).social.removeIcon,
|
|
2344
|
+
onClick: (e) => u(t.id)
|
|
2345
|
+
}, [k(T(st), {
|
|
2378
2346
|
size: 14,
|
|
2379
2347
|
"stroke-width": 2
|
|
2380
|
-
})], 10,
|
|
2348
|
+
})], 10, La)]), k(Z, {
|
|
2381
2349
|
"model-value": t.url,
|
|
2382
2350
|
type: "url",
|
|
2383
|
-
placeholder:
|
|
2351
|
+
placeholder: T(a).social.urlPlaceholder,
|
|
2384
2352
|
"onUpdate:modelValue": (e) => l(t.id, "url", e)
|
|
2385
2353
|
}, null, 8, [
|
|
2386
2354
|
"model-value",
|
|
2387
2355
|
"placeholder",
|
|
2388
2356
|
"onUpdate:modelValue"
|
|
2389
|
-
])]))), 128)),
|
|
2390
|
-
class:
|
|
2357
|
+
])]))), 128)), _("button", {
|
|
2358
|
+
class: p(T(ht)),
|
|
2391
2359
|
onClick: c
|
|
2392
|
-
}, [
|
|
2360
|
+
}, [k(T(X), {
|
|
2393
2361
|
size: 14,
|
|
2394
2362
|
"stroke-width": 2
|
|
2395
|
-
}),
|
|
2396
|
-
|
|
2397
|
-
class:
|
|
2363
|
+
}), d(" " + D(T(a).social.addIcon), 1)], 2)])]),
|
|
2364
|
+
_("div", Ra, [_("label", { class: p(T(W)) }, D(T(a).social.style), 3), _("select", {
|
|
2365
|
+
class: p(T(U)),
|
|
2398
2366
|
value: t.block.iconStyle,
|
|
2399
2367
|
onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
|
|
2400
2368
|
}, [
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
], 42,
|
|
2407
|
-
|
|
2369
|
+
_("option", Ba, D(T(a).social.styleSolid), 1),
|
|
2370
|
+
_("option", Va, D(T(a).social.styleOutlined), 1),
|
|
2371
|
+
_("option", Ha, D(T(a).social.styleRounded), 1),
|
|
2372
|
+
_("option", Ua, D(T(a).social.styleSquare), 1),
|
|
2373
|
+
_("option", Wa, D(T(a).social.styleCircle), 1)
|
|
2374
|
+
], 42, za)]),
|
|
2375
|
+
_("div", Ga, [_("label", { class: p(T(W)) }, D(T(a).social.size), 3), k(Y, {
|
|
2408
2376
|
options: [
|
|
2409
2377
|
{
|
|
2410
2378
|
value: "small",
|
|
2411
|
-
label:
|
|
2379
|
+
label: T(a).social.sizeSmall
|
|
2412
2380
|
},
|
|
2413
2381
|
{
|
|
2414
2382
|
value: "medium",
|
|
2415
|
-
label:
|
|
2383
|
+
label: T(a).social.sizeMedium
|
|
2416
2384
|
},
|
|
2417
2385
|
{
|
|
2418
2386
|
value: "large",
|
|
2419
|
-
label:
|
|
2387
|
+
label: T(a).social.sizeLarge
|
|
2420
2388
|
}
|
|
2421
2389
|
],
|
|
2422
2390
|
"model-value": t.block.iconSize,
|
|
2423
2391
|
"onUpdate:modelValue": r[1] ||= (e) => s("iconSize", e)
|
|
2424
2392
|
}, null, 8, ["options", "model-value"])]),
|
|
2425
|
-
|
|
2393
|
+
_("div", Ka, [_("label", { class: p(T(W)) }, D(T(a).social.spacing), 3), _("div", qa, [_("input", {
|
|
2426
2394
|
type: "number",
|
|
2427
|
-
class:
|
|
2395
|
+
class: p(T(K)),
|
|
2428
2396
|
value: t.block.spacing,
|
|
2429
2397
|
min: "0",
|
|
2430
2398
|
max: "50",
|
|
2431
2399
|
onInput: r[2] ||= (e) => s("spacing", Number(e.target.value))
|
|
2432
|
-
}, null, 42,
|
|
2433
|
-
|
|
2400
|
+
}, null, 42, Ja), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2401
|
+
_("div", Ya, [_("label", { class: p(T(W)) }, D(T(a).social.align), 3), k(Y, {
|
|
2434
2402
|
options: [
|
|
2435
2403
|
{
|
|
2436
2404
|
value: "left",
|
|
2437
|
-
label:
|
|
2438
|
-
icon:
|
|
2405
|
+
label: T(a).title.alignLeft,
|
|
2406
|
+
icon: T(rt)
|
|
2439
2407
|
},
|
|
2440
2408
|
{
|
|
2441
2409
|
value: "center",
|
|
2442
|
-
label:
|
|
2443
|
-
icon:
|
|
2410
|
+
label: T(a).title.alignCenter,
|
|
2411
|
+
icon: T(it)
|
|
2444
2412
|
},
|
|
2445
2413
|
{
|
|
2446
2414
|
value: "right",
|
|
2447
|
-
label:
|
|
2448
|
-
icon:
|
|
2415
|
+
label: T(a).title.alignRight,
|
|
2416
|
+
icon: T(at)
|
|
2449
2417
|
}
|
|
2450
2418
|
],
|
|
2451
2419
|
"model-value": t.block.align,
|
|
@@ -2453,36 +2421,36 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2453
2421
|
}, null, 8, ["options", "model-value"])])
|
|
2454
2422
|
], 64));
|
|
2455
2423
|
}
|
|
2456
|
-
}),
|
|
2424
|
+
}), Za = { class: "tpl:mb-3.5" }, Qa = { class: "tpl:flex tpl:items-stretch" }, $a = ["value"], eo = ["value"], to = /* @__PURE__ */ m({
|
|
2457
2425
|
__name: "SpacerToolbar",
|
|
2458
2426
|
props: { block: {} },
|
|
2459
2427
|
emits: ["update"],
|
|
2460
2428
|
setup(t, { emit: n }) {
|
|
2461
2429
|
let r = n, { t: i } = V();
|
|
2462
|
-
return (n, a) => (e(),
|
|
2463
|
-
|
|
2464
|
-
|
|
2430
|
+
return (n, a) => (e(), v("div", Za, [
|
|
2431
|
+
_("label", { class: p(T(W)) }, D(T(i).spacer.height), 3),
|
|
2432
|
+
_("div", Qa, [_("input", {
|
|
2465
2433
|
type: "number",
|
|
2466
|
-
class:
|
|
2434
|
+
class: p(T(K)),
|
|
2467
2435
|
value: t.block.height,
|
|
2468
2436
|
min: "10",
|
|
2469
2437
|
max: "100",
|
|
2470
2438
|
onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2471
|
-
}, null, 42,
|
|
2472
|
-
|
|
2439
|
+
}, null, 42, $a), _("span", { class: p(T(G)) }, "px", 2)]),
|
|
2440
|
+
_("input", {
|
|
2473
2441
|
type: "range",
|
|
2474
2442
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
2475
2443
|
value: t.block.height,
|
|
2476
2444
|
min: "10",
|
|
2477
2445
|
max: "100",
|
|
2478
2446
|
onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2479
|
-
}, null, 40,
|
|
2447
|
+
}, null, 40, eo)
|
|
2480
2448
|
]));
|
|
2481
2449
|
}
|
|
2482
|
-
}),
|
|
2450
|
+
}), no = { class: "tpl:mb-3.5" }, ro = { class: "tpl:flex tpl:items-center tpl:gap-3" }, io = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ao = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, oo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, so = ["disabled"], co = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, lo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, uo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, fo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, po = ["disabled"], mo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ho = { class: "tpl:mb-3.5" }, go = { 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)]" }, _o = ["checked"], vo = {
|
|
2483
2451
|
key: 0,
|
|
2484
2452
|
class: "tpl:mb-3.5"
|
|
2485
|
-
},
|
|
2453
|
+
}, yo = { class: "tpl:mb-3.5" }, bo = { class: "tpl:mb-3.5" }, xo = { class: "tpl:flex tpl:items-stretch" }, So = ["value"], Co = { class: "tpl:mb-3.5" }, wo = { class: "tpl:flex tpl:items-stretch" }, To = ["value"], Eo = { class: "tpl:mb-3.5" }, Do = ["value"], Oo = { value: "" }, ko = ["value"], Ao = { class: "tpl:mb-3.5" }, jo = { class: "tpl:flex tpl:items-stretch" }, Mo = ["value"], No = { class: "tpl:mb-3.5" }, Po = { class: "tpl:mb-3.5" }, Fo = /* @__PURE__ */ m({
|
|
2486
2454
|
__name: "TableToolbar",
|
|
2487
2455
|
props: {
|
|
2488
2456
|
block: {},
|
|
@@ -2490,28 +2458,28 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2490
2458
|
},
|
|
2491
2459
|
emits: ["update"],
|
|
2492
2460
|
setup(t, { emit: n }) {
|
|
2493
|
-
let r = t, i = n, { t: a } = V(), s =
|
|
2461
|
+
let r = t, i = n, { t: a } = V(), s = g(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
|
|
2494
2462
|
function c(e, t) {
|
|
2495
2463
|
i("update", { [e]: t });
|
|
2496
2464
|
}
|
|
2497
2465
|
function l() {
|
|
2498
2466
|
let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
|
|
2499
|
-
id:
|
|
2467
|
+
id: I(),
|
|
2500
2468
|
cells: Array.from({ length: e }, () => ({
|
|
2501
|
-
id:
|
|
2469
|
+
id: I(),
|
|
2502
2470
|
content: ""
|
|
2503
2471
|
}))
|
|
2504
2472
|
};
|
|
2505
2473
|
i("update", { rows: [...r.block.rows, t] });
|
|
2506
2474
|
}
|
|
2507
|
-
function
|
|
2475
|
+
function u(e) {
|
|
2508
2476
|
i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
|
|
2509
2477
|
}
|
|
2510
|
-
function
|
|
2478
|
+
function f() {
|
|
2511
2479
|
i("update", { rows: r.block.rows.map((e) => ({
|
|
2512
2480
|
...e,
|
|
2513
2481
|
cells: [...e.cells, {
|
|
2514
|
-
id:
|
|
2482
|
+
id: I(),
|
|
2515
2483
|
content: ""
|
|
2516
2484
|
}]
|
|
2517
2485
|
})) });
|
|
@@ -2522,109 +2490,109 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2522
2490
|
cells: t.cells.filter((t, n) => n !== e)
|
|
2523
2491
|
})) });
|
|
2524
2492
|
}
|
|
2525
|
-
return (n, r) => (e(),
|
|
2526
|
-
|
|
2527
|
-
|
|
2493
|
+
return (n, r) => (e(), v(y, null, [
|
|
2494
|
+
_("div", no, [_("label", { class: p(T(W)) }, D(T(a).table.dimensions), 3), _("div", ro, [_("div", io, [_("span", ao, D(T(a).table.rows), 1), _("div", oo, [
|
|
2495
|
+
_("button", {
|
|
2528
2496
|
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",
|
|
2529
2497
|
disabled: t.block.rows.length <= 1,
|
|
2530
|
-
onClick: r[0] ||= (e) =>
|
|
2531
|
-
}, [
|
|
2498
|
+
onClick: r[0] ||= (e) => u(t.block.rows[t.block.rows.length - 1].id)
|
|
2499
|
+
}, [k(T(Ke), {
|
|
2532
2500
|
size: 12,
|
|
2533
2501
|
"stroke-width": 2
|
|
2534
|
-
})], 8,
|
|
2535
|
-
|
|
2536
|
-
|
|
2502
|
+
})], 8, so),
|
|
2503
|
+
_("span", co, D(t.block.rows.length), 1),
|
|
2504
|
+
_("button", {
|
|
2537
2505
|
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)]",
|
|
2538
2506
|
onClick: l
|
|
2539
|
-
}, [
|
|
2507
|
+
}, [k(T(X), {
|
|
2540
2508
|
size: 12,
|
|
2541
2509
|
"stroke-width": 2
|
|
2542
2510
|
})])
|
|
2543
|
-
])]),
|
|
2544
|
-
|
|
2511
|
+
])]), _("div", lo, [_("span", uo, D(T(a).table.columns), 1), _("div", fo, [
|
|
2512
|
+
_("button", {
|
|
2545
2513
|
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",
|
|
2546
2514
|
disabled: s.value <= 1,
|
|
2547
2515
|
onClick: r[1] ||= (e) => m(s.value - 1)
|
|
2548
|
-
}, [
|
|
2516
|
+
}, [k(T(Ke), {
|
|
2549
2517
|
size: 12,
|
|
2550
2518
|
"stroke-width": 2
|
|
2551
|
-
})], 8,
|
|
2552
|
-
|
|
2553
|
-
|
|
2519
|
+
})], 8, po),
|
|
2520
|
+
_("span", mo, D(s.value), 1),
|
|
2521
|
+
_("button", {
|
|
2554
2522
|
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)]",
|
|
2555
|
-
onClick:
|
|
2556
|
-
}, [
|
|
2523
|
+
onClick: f
|
|
2524
|
+
}, [k(T(X), {
|
|
2557
2525
|
size: 12,
|
|
2558
2526
|
"stroke-width": 2
|
|
2559
2527
|
})])
|
|
2560
2528
|
])])])]),
|
|
2561
|
-
|
|
2529
|
+
_("div", ho, [_("label", go, [_("input", {
|
|
2562
2530
|
type: "checkbox",
|
|
2563
2531
|
checked: t.block.hasHeaderRow,
|
|
2564
2532
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2565
2533
|
onChange: r[2] ||= (e) => c("hasHeaderRow", e.target.checked)
|
|
2566
|
-
}, null, 40,
|
|
2567
|
-
t.block.hasHeaderRow ? (e(),
|
|
2568
|
-
"model-value": t.block.headerBackgroundColor ||
|
|
2569
|
-
placeholder:
|
|
2534
|
+
}, null, 40, _o), d(" " + D(T(a).table.hasHeaderRow), 1)])]),
|
|
2535
|
+
t.block.hasHeaderRow ? (e(), v("div", vo, [_("label", { class: p(T(W)) }, D(T(a).table.headerBackgroundColor), 3), k(q, {
|
|
2536
|
+
"model-value": t.block.headerBackgroundColor || T("#f2f2f2"),
|
|
2537
|
+
placeholder: T(a).table.noHeaderBg,
|
|
2570
2538
|
"onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2571
|
-
}, null, 8, ["model-value", "placeholder"])])) :
|
|
2572
|
-
|
|
2539
|
+
}, null, 8, ["model-value", "placeholder"])])) : b("", !0),
|
|
2540
|
+
_("div", yo, [_("label", { class: p(T(W)) }, D(T(a).table.borderColor), 3), k(q, {
|
|
2573
2541
|
"model-value": t.block.borderColor,
|
|
2574
2542
|
"onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
|
|
2575
2543
|
}, null, 8, ["model-value"])]),
|
|
2576
|
-
|
|
2544
|
+
_("div", bo, [_("label", { class: p(T(W)) }, D(T(a).table.borderWidth), 3), _("div", xo, [_("input", {
|
|
2577
2545
|
type: "number",
|
|
2578
|
-
class:
|
|
2546
|
+
class: p(T(K)),
|
|
2579
2547
|
value: t.block.borderWidth,
|
|
2580
2548
|
min: "0",
|
|
2581
2549
|
max: "10",
|
|
2582
2550
|
onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2583
|
-
}, null, 42,
|
|
2584
|
-
|
|
2551
|
+
}, null, 42, So), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2552
|
+
_("div", Co, [_("label", { class: p(T(W)) }, D(T(a).table.cellPadding), 3), _("div", wo, [_("input", {
|
|
2585
2553
|
type: "number",
|
|
2586
|
-
class:
|
|
2554
|
+
class: p(T(K)),
|
|
2587
2555
|
value: t.block.cellPadding,
|
|
2588
2556
|
min: "0",
|
|
2589
2557
|
max: "30",
|
|
2590
2558
|
onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2591
|
-
}, null, 42,
|
|
2592
|
-
|
|
2593
|
-
class:
|
|
2559
|
+
}, null, 42, To), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2560
|
+
_("div", Eo, [_("label", { class: p(T(W)) }, D(T(a).table.fontFamily), 3), _("select", {
|
|
2561
|
+
class: p(T(U)),
|
|
2594
2562
|
value: t.block.fontFamily || "",
|
|
2595
2563
|
onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2596
|
-
}, [
|
|
2564
|
+
}, [_("option", Oo, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2597
2565
|
key: t.value,
|
|
2598
2566
|
value: t.value
|
|
2599
|
-
},
|
|
2600
|
-
|
|
2567
|
+
}, D(t.label), 9, ko))), 128))], 42, Do)]),
|
|
2568
|
+
_("div", Ao, [_("label", { class: p(T(W)) }, D(T(a).table.fontSize), 3), _("div", jo, [_("input", {
|
|
2601
2569
|
type: "number",
|
|
2602
|
-
class:
|
|
2570
|
+
class: p(T(K)),
|
|
2603
2571
|
value: t.block.fontSize,
|
|
2604
2572
|
min: "10",
|
|
2605
2573
|
max: "32",
|
|
2606
2574
|
onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2607
|
-
}, null, 42,
|
|
2608
|
-
|
|
2575
|
+
}, null, 42, Mo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2576
|
+
_("div", No, [_("label", { class: p(T(W)) }, D(T(a).table.color), 3), k(q, {
|
|
2609
2577
|
"model-value": t.block.color,
|
|
2610
2578
|
"onUpdate:modelValue": r[9] ||= (e) => c("color", e)
|
|
2611
2579
|
}, null, 8, ["model-value"])]),
|
|
2612
|
-
|
|
2580
|
+
_("div", Po, [_("label", { class: p(T(W)) }, D(T(a).table.textAlign), 3), k(Y, {
|
|
2613
2581
|
options: [
|
|
2614
2582
|
{
|
|
2615
2583
|
value: "left",
|
|
2616
|
-
label:
|
|
2617
|
-
icon:
|
|
2584
|
+
label: T(a).title.alignLeft,
|
|
2585
|
+
icon: T(rt)
|
|
2618
2586
|
},
|
|
2619
2587
|
{
|
|
2620
2588
|
value: "center",
|
|
2621
|
-
label:
|
|
2622
|
-
icon:
|
|
2589
|
+
label: T(a).title.alignCenter,
|
|
2590
|
+
icon: T(it)
|
|
2623
2591
|
},
|
|
2624
2592
|
{
|
|
2625
2593
|
value: "right",
|
|
2626
|
-
label:
|
|
2627
|
-
icon:
|
|
2594
|
+
label: T(a).title.alignRight,
|
|
2595
|
+
icon: T(at)
|
|
2628
2596
|
}
|
|
2629
2597
|
],
|
|
2630
2598
|
"model-value": t.block.textAlign,
|
|
@@ -2632,7 +2600,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2632
2600
|
}, null, 8, ["options", "model-value"])])
|
|
2633
2601
|
], 64));
|
|
2634
2602
|
}
|
|
2635
|
-
}),
|
|
2603
|
+
}), Io = { class: "tpl:mb-3.5" }, Lo = ["value"], Ro = { value: 1 }, zo = { value: 2 }, Bo = { value: 3 }, Vo = { value: 4 }, Ho = { class: "tpl:mb-3.5" }, Uo = ["value"], Wo = { value: "" }, Go = ["value"], Ko = { class: "tpl:mb-3.5" }, qo = { class: "tpl:mb-3.5" }, Jo = /* @__PURE__ */ m({
|
|
2636
2604
|
__name: "TitleToolbar",
|
|
2637
2605
|
props: {
|
|
2638
2606
|
block: {},
|
|
@@ -2644,45 +2612,45 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2644
2612
|
function a(e, t) {
|
|
2645
2613
|
r("update", { [e]: t });
|
|
2646
2614
|
}
|
|
2647
|
-
return (n, r) => (e(),
|
|
2648
|
-
|
|
2649
|
-
class:
|
|
2615
|
+
return (n, r) => (e(), v(y, null, [
|
|
2616
|
+
_("div", Io, [_("label", { class: p(T(W)) }, D(T(i).title.level), 3), _("select", {
|
|
2617
|
+
class: p(T(U)),
|
|
2650
2618
|
value: t.block.level,
|
|
2651
2619
|
onChange: r[0] ||= (e) => a("level", Number(e.target.value))
|
|
2652
2620
|
}, [
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
], 42,
|
|
2658
|
-
|
|
2659
|
-
class:
|
|
2621
|
+
_("option", Ro, D(T(i).title.heading1), 1),
|
|
2622
|
+
_("option", zo, D(T(i).title.heading2), 1),
|
|
2623
|
+
_("option", Bo, D(T(i).title.heading3), 1),
|
|
2624
|
+
_("option", Vo, D(T(i).title.heading4), 1)
|
|
2625
|
+
], 42, Lo)]),
|
|
2626
|
+
_("div", Ho, [_("label", { class: p(T(W)) }, D(T(i).title.fontFamily), 3), _("select", {
|
|
2627
|
+
class: p(T(U)),
|
|
2660
2628
|
value: t.block.fontFamily || "",
|
|
2661
2629
|
onChange: r[1] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
2662
|
-
}, [
|
|
2630
|
+
}, [_("option", Wo, D(T(i).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2663
2631
|
key: t.value,
|
|
2664
2632
|
value: t.value
|
|
2665
|
-
},
|
|
2666
|
-
|
|
2633
|
+
}, D(t.label), 9, Go))), 128))], 42, Uo)]),
|
|
2634
|
+
_("div", Ko, [_("label", { class: p(T(W)) }, D(T(i).title.color), 3), k(q, {
|
|
2667
2635
|
"model-value": t.block.color,
|
|
2668
2636
|
"onUpdate:modelValue": r[2] ||= (e) => a("color", e)
|
|
2669
2637
|
}, null, 8, ["model-value"])]),
|
|
2670
|
-
|
|
2638
|
+
_("div", qo, [_("label", { class: p(T(W)) }, D(T(i).title.align), 3), k(Y, {
|
|
2671
2639
|
options: [
|
|
2672
2640
|
{
|
|
2673
2641
|
value: "left",
|
|
2674
|
-
label:
|
|
2675
|
-
icon:
|
|
2642
|
+
label: T(i).title.alignLeft,
|
|
2643
|
+
icon: T(rt)
|
|
2676
2644
|
},
|
|
2677
2645
|
{
|
|
2678
2646
|
value: "center",
|
|
2679
|
-
label:
|
|
2680
|
-
icon:
|
|
2647
|
+
label: T(i).title.alignCenter,
|
|
2648
|
+
icon: T(it)
|
|
2681
2649
|
},
|
|
2682
2650
|
{
|
|
2683
2651
|
value: "right",
|
|
2684
|
-
label:
|
|
2685
|
-
icon:
|
|
2652
|
+
label: T(i).title.alignRight,
|
|
2653
|
+
icon: T(at)
|
|
2686
2654
|
}
|
|
2687
2655
|
],
|
|
2688
2656
|
"model-value": t.block.textAlign,
|
|
@@ -2690,22 +2658,22 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2690
2658
|
}, null, 8, ["options", "model-value"])])
|
|
2691
2659
|
], 64));
|
|
2692
2660
|
}
|
|
2693
|
-
}),
|
|
2661
|
+
}), Yo = { class: "tpl:mb-3.5" }, Xo = {
|
|
2694
2662
|
key: 0,
|
|
2695
2663
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2696
|
-
},
|
|
2664
|
+
}, Zo = ["checked"], Qo = {
|
|
2697
2665
|
key: 0,
|
|
2698
2666
|
class: "tpl:mb-3.5"
|
|
2699
|
-
},
|
|
2667
|
+
}, $o = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, es = [
|
|
2700
2668
|
"value",
|
|
2701
2669
|
"placeholder",
|
|
2702
2670
|
"title"
|
|
2703
|
-
],
|
|
2671
|
+
], ts = { class: "tpl:mb-3.5" }, ns = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, rs = { class: "tpl:mb-3.5" }, is = { class: "tpl:mb-3.5" }, as = ["value"], os = { value: "full" }, ss = { class: "tpl:mb-3.5" }, cs = /* @__PURE__ */ m({
|
|
2704
2672
|
__name: "VideoToolbar",
|
|
2705
2673
|
props: { block: {} },
|
|
2706
2674
|
emits: ["update"],
|
|
2707
2675
|
setup(t, { emit: n }) {
|
|
2708
|
-
let r = t, i = n, { t: a } = V(), o =
|
|
2676
|
+
let r = t, i = n, { t: a } = V(), o = A(De, null), s = A(Ae, R.liquid), c = dt(), l = g(() => !!o), f = g(() => L(r.block.url, s)), m = u(!1), { start: h } = Ee(() => {
|
|
2709
2677
|
m.value = !1;
|
|
2710
2678
|
}, 1e3, { immediate: !1 });
|
|
2711
2679
|
function x(e, t) {
|
|
@@ -2713,38 +2681,38 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2713
2681
|
}
|
|
2714
2682
|
async function S() {
|
|
2715
2683
|
let e = await o?.({ accept: ["images"] });
|
|
2716
|
-
c.alive && e && (x("thumbnailUrl", e.url), m.value = !0,
|
|
2684
|
+
c.alive && e && (x("thumbnailUrl", e.url), m.value = !0, h());
|
|
2717
2685
|
}
|
|
2718
|
-
return (n, r) => (e(),
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2686
|
+
return (n, r) => (e(), v(y, null, [
|
|
2687
|
+
_("div", Yo, [
|
|
2688
|
+
_("label", { class: p(T(W)) }, D(T(a).video.videoUrl), 3),
|
|
2689
|
+
k(Z, {
|
|
2722
2690
|
"model-value": t.block.url,
|
|
2723
2691
|
type: "url",
|
|
2724
|
-
placeholder:
|
|
2692
|
+
placeholder: T(a).video.videoUrlPlaceholder,
|
|
2725
2693
|
"onUpdate:modelValue": r[0] ||= (e) => x("url", e)
|
|
2726
2694
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2727
|
-
t.block.url ? (e(),
|
|
2695
|
+
t.block.url ? (e(), v("label", Xo, [_("input", {
|
|
2728
2696
|
type: "checkbox",
|
|
2729
2697
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2730
2698
|
checked: t.block.openInNewTab ?? !1,
|
|
2731
2699
|
onChange: r[1] ||= (e) => x("openInNewTab", e.target.checked)
|
|
2732
|
-
}, null, 40,
|
|
2700
|
+
}, null, 40, Zo), d(" " + D(T(a).video.openInNewTab), 1)])) : b("", !0)
|
|
2733
2701
|
]),
|
|
2734
|
-
|
|
2702
|
+
f.value ? (e(), v("div", Qo, [_("label", { class: p(T(W)) }, [d(D(T(a).video.placeholderUrl) + " ", 1), _("span", $o, D(T(a).video.optional), 1)], 2), _("input", {
|
|
2735
2703
|
type: "url",
|
|
2736
|
-
class:
|
|
2704
|
+
class: p(T(U)),
|
|
2737
2705
|
value: t.block.placeholderUrl || "",
|
|
2738
|
-
placeholder:
|
|
2739
|
-
title:
|
|
2706
|
+
placeholder: T(a).video.placeholderUrlPlaceholder,
|
|
2707
|
+
title: T(a).video.placeholderUrlTooltip,
|
|
2740
2708
|
onInput: r[2] ||= (e) => x("placeholderUrl", e.target.value)
|
|
2741
|
-
}, null, 42,
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2709
|
+
}, null, 42, es)])) : b("", !0),
|
|
2710
|
+
_("div", ts, [
|
|
2711
|
+
_("label", { class: p(T(W)) }, [d(D(T(a).video.customThumbnail) + " ", 1), _("span", ns, D(T(a).video.optional), 1)], 2),
|
|
2712
|
+
k(Z, {
|
|
2745
2713
|
"model-value": t.block.thumbnailUrl,
|
|
2746
2714
|
type: "url",
|
|
2747
|
-
placeholder:
|
|
2715
|
+
placeholder: T(a).video.thumbnailPlaceholder,
|
|
2748
2716
|
pulse: m.value,
|
|
2749
2717
|
"onUpdate:modelValue": r[3] ||= (e) => x("thumbnailUrl", e)
|
|
2750
2718
|
}, null, 8, [
|
|
@@ -2752,7 +2720,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2752
2720
|
"placeholder",
|
|
2753
2721
|
"pulse"
|
|
2754
2722
|
]),
|
|
2755
|
-
|
|
2723
|
+
l.value ? (e(), v("button", {
|
|
2756
2724
|
key: 0,
|
|
2757
2725
|
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",
|
|
2758
2726
|
style: {
|
|
@@ -2761,40 +2729,40 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2761
2729
|
"background-color": "var(--tpl-bg)"
|
|
2762
2730
|
},
|
|
2763
2731
|
onClick: S
|
|
2764
|
-
}, [
|
|
2732
|
+
}, [k(T(me), {
|
|
2765
2733
|
size: 14,
|
|
2766
2734
|
"stroke-width": 1.5
|
|
2767
|
-
}),
|
|
2735
|
+
}), d(" " + D(T(a).image.browseMedia), 1)])) : b("", !0)
|
|
2768
2736
|
]),
|
|
2769
|
-
|
|
2737
|
+
_("div", rs, [_("label", { class: p(T(W)) }, D(T(a).video.altText), 3), k(Z, {
|
|
2770
2738
|
"model-value": t.block.alt,
|
|
2771
2739
|
type: "text",
|
|
2772
|
-
placeholder:
|
|
2740
|
+
placeholder: T(a).video.altTextPlaceholder,
|
|
2773
2741
|
"onUpdate:modelValue": r[4] ||= (e) => x("alt", e)
|
|
2774
2742
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2775
|
-
|
|
2776
|
-
class:
|
|
2743
|
+
_("div", is, [_("label", { class: p(T(W)) }, D(T(a).video.width), 3), _("select", {
|
|
2744
|
+
class: p(T(U)),
|
|
2777
2745
|
value: t.block.width,
|
|
2778
2746
|
onChange: r[5] ||= (e) => x("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2779
2747
|
}, [
|
|
2780
|
-
|
|
2781
|
-
r[7] ||=
|
|
2782
|
-
r[8] ||=
|
|
2783
|
-
r[9] ||=
|
|
2784
|
-
], 42,
|
|
2785
|
-
|
|
2748
|
+
_("option", os, D(T(a).video.fullWidth), 1),
|
|
2749
|
+
r[7] ||= _("option", { value: "300" }, "300px", -1),
|
|
2750
|
+
r[8] ||= _("option", { value: "400" }, "400px", -1),
|
|
2751
|
+
r[9] ||= _("option", { value: "500" }, "500px", -1)
|
|
2752
|
+
], 42, as)]),
|
|
2753
|
+
_("div", ss, [_("label", { class: p(T(W)) }, D(T(a).title.align), 3), k(Y, {
|
|
2786
2754
|
options: [
|
|
2787
2755
|
{
|
|
2788
2756
|
value: "left",
|
|
2789
|
-
label:
|
|
2757
|
+
label: T(a).title.alignLeft
|
|
2790
2758
|
},
|
|
2791
2759
|
{
|
|
2792
2760
|
value: "center",
|
|
2793
|
-
label:
|
|
2761
|
+
label: T(a).title.alignCenter
|
|
2794
2762
|
},
|
|
2795
2763
|
{
|
|
2796
2764
|
value: "right",
|
|
2797
|
-
label:
|
|
2765
|
+
label: T(a).title.alignRight
|
|
2798
2766
|
}
|
|
2799
2767
|
],
|
|
2800
2768
|
"model-value": t.block.align,
|
|
@@ -2802,7 +2770,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2802
2770
|
}, null, 8, ["options", "model-value"])])
|
|
2803
2771
|
], 64));
|
|
2804
2772
|
}
|
|
2805
|
-
}),
|
|
2773
|
+
}), ls = ["aria-label"], us = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, ds = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, fs = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ps = { class: "tpl:flex tpl:gap-1" }, ms = ["title"], hs = ["title"], gs = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _s = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
2806
2774
|
__name: "Toolbar",
|
|
2807
2775
|
props: { block: {} },
|
|
2808
2776
|
emits: [
|
|
@@ -2811,141 +2779,141 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2811
2779
|
"duplicate"
|
|
2812
2780
|
],
|
|
2813
2781
|
setup(t, { emit: n }) {
|
|
2814
|
-
let i =
|
|
2782
|
+
let i = j(() => import("./CountdownToolbar-Dl82DAmI.js")), a = t, o = n, { t: s } = V(), c = Oe(Pe, "Toolbar"), l = A(Me, []), u = g(() => a.block.type), d = g(() => F(a.block)), f = g(() => {
|
|
2815
2783
|
if (d.value) return l.find((e) => e.type === a.block.customType);
|
|
2816
|
-
}), p =
|
|
2817
|
-
function
|
|
2784
|
+
}), p = g(() => d.value ? f.value?.name ?? a.block.customType : ne(u.value, s)), m = c.fonts;
|
|
2785
|
+
function h(e) {
|
|
2818
2786
|
o("update", e);
|
|
2819
2787
|
}
|
|
2820
|
-
return (n, a) => (e(),
|
|
2821
|
-
"aria-label":
|
|
2788
|
+
return (n, a) => (e(), v("aside", {
|
|
2789
|
+
"aria-label": T(s).landmarks.blockToolbar,
|
|
2822
2790
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2823
|
-
}, [
|
|
2791
|
+
}, [_("div", us, [_("div", ds, [T(Ye)[u.value] ? (e(), C(r(T(Ye)[u.value]), {
|
|
2824
2792
|
key: 0,
|
|
2825
2793
|
size: 16,
|
|
2826
2794
|
"stroke-width": 1.5
|
|
2827
|
-
})) : d.value ? (e(),
|
|
2795
|
+
})) : d.value ? (e(), C(T(B), {
|
|
2828
2796
|
key: 1,
|
|
2829
2797
|
size: 16,
|
|
2830
2798
|
"stroke-width": 1.5
|
|
2831
|
-
})) :
|
|
2799
|
+
})) : b("", !0), _("h3", fs, D(p.value), 1)]), _("div", ps, [_("button", {
|
|
2832
2800
|
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)]",
|
|
2833
|
-
title:
|
|
2801
|
+
title: T(s).toolbar.duplicate,
|
|
2834
2802
|
onClick: a[0] ||= (e) => o("duplicate")
|
|
2835
|
-
}, [
|
|
2803
|
+
}, [k(T(pe), {
|
|
2836
2804
|
size: 14,
|
|
2837
2805
|
"stroke-width": 2
|
|
2838
|
-
})], 8,
|
|
2806
|
+
})], 8, ms), _("button", {
|
|
2839
2807
|
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)]",
|
|
2840
|
-
title:
|
|
2808
|
+
title: T(s).toolbar.delete,
|
|
2841
2809
|
onClick: a[1] ||= (e) => o("delete")
|
|
2842
|
-
}, [
|
|
2810
|
+
}, [k(T(ot), {
|
|
2843
2811
|
size: 14,
|
|
2844
2812
|
"stroke-width": 2
|
|
2845
|
-
})], 8,
|
|
2813
|
+
})], 8, hs)])]), _("div", gs, [d.value ? (e(), C(Hi, {
|
|
2846
2814
|
key: 0,
|
|
2847
2815
|
block: t.block,
|
|
2848
2816
|
onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
|
|
2849
2817
|
onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
|
|
2850
|
-
}, null, 8, ["block"])) : u.value === "section" ? (e(),
|
|
2818
|
+
}, null, 8, ["block"])) : u.value === "section" ? (e(), C(ja, {
|
|
2851
2819
|
key: 1,
|
|
2852
2820
|
block: t.block,
|
|
2853
|
-
onUpdate:
|
|
2854
|
-
}, null, 8, ["block"])) : u.value === "title" ? (e(),
|
|
2821
|
+
onUpdate: h
|
|
2822
|
+
}, null, 8, ["block"])) : u.value === "title" ? (e(), C(Jo, {
|
|
2855
2823
|
key: 2,
|
|
2856
2824
|
block: t.block,
|
|
2857
|
-
"font-families":
|
|
2858
|
-
onUpdate:
|
|
2859
|
-
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(),
|
|
2825
|
+
"font-families": T(m),
|
|
2826
|
+
onUpdate: h
|
|
2827
|
+
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), v(y, { key: 3 }, [], 64)) : u.value === "image" ? (e(), C(pa, {
|
|
2860
2828
|
key: 4,
|
|
2861
2829
|
block: t.block,
|
|
2862
|
-
onUpdate:
|
|
2863
|
-
}, null, 8, ["block"])) : u.value === "video" ? (e(),
|
|
2830
|
+
onUpdate: h
|
|
2831
|
+
}, null, 8, ["block"])) : u.value === "video" ? (e(), C(cs, {
|
|
2864
2832
|
key: 5,
|
|
2865
2833
|
block: t.block,
|
|
2866
|
-
onUpdate:
|
|
2867
|
-
}, null, 8, ["block"])) : u.value === "button" ? (e(),
|
|
2834
|
+
onUpdate: h
|
|
2835
|
+
}, null, 8, ["block"])) : u.value === "button" ? (e(), C(mr, {
|
|
2868
2836
|
key: 6,
|
|
2869
2837
|
block: t.block,
|
|
2870
|
-
"font-families":
|
|
2871
|
-
onUpdate:
|
|
2872
|
-
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(),
|
|
2838
|
+
"font-families": T(m),
|
|
2839
|
+
onUpdate: h
|
|
2840
|
+
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), C(Ji, {
|
|
2873
2841
|
key: 7,
|
|
2874
2842
|
block: t.block,
|
|
2875
|
-
onUpdate:
|
|
2876
|
-
}, null, 8, ["block"])) : u.value === "social" ? (e(),
|
|
2843
|
+
onUpdate: h
|
|
2844
|
+
}, null, 8, ["block"])) : u.value === "social" ? (e(), C(Xa, {
|
|
2877
2845
|
key: 8,
|
|
2878
2846
|
block: t.block,
|
|
2879
|
-
onUpdate:
|
|
2880
|
-
}, null, 8, ["block"])) : u.value === "menu" ? (e(),
|
|
2847
|
+
onUpdate: h
|
|
2848
|
+
}, null, 8, ["block"])) : u.value === "menu" ? (e(), C(Ta, {
|
|
2881
2849
|
key: 9,
|
|
2882
2850
|
block: t.block,
|
|
2883
|
-
"font-families":
|
|
2884
|
-
onUpdate:
|
|
2885
|
-
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(),
|
|
2851
|
+
"font-families": T(m),
|
|
2852
|
+
onUpdate: h
|
|
2853
|
+
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), C(Fo, {
|
|
2886
2854
|
key: 10,
|
|
2887
2855
|
block: t.block,
|
|
2888
|
-
"font-families":
|
|
2889
|
-
onUpdate:
|
|
2890
|
-
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(),
|
|
2856
|
+
"font-families": T(m),
|
|
2857
|
+
onUpdate: h
|
|
2858
|
+
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), C(to, {
|
|
2891
2859
|
key: 11,
|
|
2892
2860
|
block: t.block,
|
|
2893
|
-
onUpdate:
|
|
2894
|
-
}, null, 8, ["block"])) : u.value === "html" ? (e(),
|
|
2861
|
+
onUpdate: h
|
|
2862
|
+
}, null, 8, ["block"])) : u.value === "html" ? (e(), C(Qi, {
|
|
2895
2863
|
key: 12,
|
|
2896
2864
|
block: t.block,
|
|
2897
|
-
onUpdate:
|
|
2898
|
-
}, null, 8, ["block"])) : u.value === "countdown" ? (e(),
|
|
2865
|
+
onUpdate: h
|
|
2866
|
+
}, null, 8, ["block"])) : u.value === "countdown" ? (e(), C(T(i), {
|
|
2899
2867
|
key: 13,
|
|
2900
2868
|
block: t.block,
|
|
2901
|
-
"font-families":
|
|
2902
|
-
onUpdate:
|
|
2903
|
-
}, null, 8, ["block", "font-families"])) :
|
|
2869
|
+
"font-families": T(m),
|
|
2870
|
+
onUpdate: h
|
|
2871
|
+
}, null, 8, ["block", "font-families"])) : b("", !0), k(ii, {
|
|
2904
2872
|
block: t.block,
|
|
2905
2873
|
"is-first-section": u.value === "paragraph",
|
|
2906
|
-
onUpdate:
|
|
2907
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2874
|
+
onUpdate: h
|
|
2875
|
+
}, null, 8, ["block", "is-first-section"])])], 8, ls));
|
|
2908
2876
|
}
|
|
2909
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2877
|
+
}), [["__scopeId", "data-v-2ac88283"]]), vs = ["aria-label"], ys = {
|
|
2910
2878
|
role: "tablist",
|
|
2911
2879
|
class: "tpl:relative tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-active)] tpl:p-1.5"
|
|
2912
|
-
},
|
|
2880
|
+
}, bs = [
|
|
2913
2881
|
"aria-selected",
|
|
2914
2882
|
"aria-label",
|
|
2915
2883
|
"title"
|
|
2916
|
-
],
|
|
2884
|
+
], xs = { key: 0 }, Ss = [
|
|
2917
2885
|
"aria-selected",
|
|
2918
2886
|
"aria-label",
|
|
2919
2887
|
"title"
|
|
2920
|
-
],
|
|
2888
|
+
], Cs = { key: 0 }, ws = [
|
|
2921
2889
|
"aria-selected",
|
|
2922
2890
|
"aria-label",
|
|
2923
2891
|
"title"
|
|
2924
|
-
],
|
|
2892
|
+
], Ts = { key: 0 }, Es = {
|
|
2925
2893
|
key: 1,
|
|
2926
2894
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2927
|
-
},
|
|
2895
|
+
}, Ds = {
|
|
2928
2896
|
key: 0,
|
|
2929
2897
|
id: "tpl-tabpanel-content",
|
|
2930
2898
|
role: "tabpanel",
|
|
2931
2899
|
"aria-labelledby": "tpl-tab-content",
|
|
2932
2900
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2933
|
-
},
|
|
2901
|
+
}, Os = {
|
|
2934
2902
|
key: 1,
|
|
2935
2903
|
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)]"
|
|
2936
|
-
},
|
|
2904
|
+
}, ks = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, As = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, js = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Ms = {
|
|
2937
2905
|
key: 1,
|
|
2938
2906
|
id: "tpl-tabpanel-settings",
|
|
2939
2907
|
role: "tabpanel",
|
|
2940
2908
|
"aria-labelledby": "tpl-tab-settings",
|
|
2941
2909
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2942
|
-
},
|
|
2910
|
+
}, Ns = {
|
|
2943
2911
|
key: 2,
|
|
2944
2912
|
id: "tpl-tabpanel-issues",
|
|
2945
2913
|
role: "tabpanel",
|
|
2946
2914
|
"aria-labelledby": "tpl-tab-issues",
|
|
2947
2915
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2948
|
-
},
|
|
2916
|
+
}, Ps = /* @__PURE__ */ m({
|
|
2949
2917
|
__name: "RightSidebar",
|
|
2950
2918
|
props: {
|
|
2951
2919
|
selectedBlock: {},
|
|
@@ -2959,11 +2927,11 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2959
2927
|
"update-settings"
|
|
2960
2928
|
],
|
|
2961
2929
|
setup(t, { emit: n }) {
|
|
2962
|
-
let r =
|
|
2930
|
+
let r = j(() => import("./IssuesPanel-CqQa2BtU.js")), i = t, o = n, { t: s } = V(), c = u("content"), l = A(ke, null), d = g(() => l !== null), f = g(() => l?.issues.value.length ?? 0);
|
|
2963
2931
|
function m(e) {
|
|
2964
2932
|
return c.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
|
|
2965
2933
|
}
|
|
2966
|
-
function
|
|
2934
|
+
function h(e) {
|
|
2967
2935
|
return c.value === e ? {
|
|
2968
2936
|
backgroundColor: "var(--tpl-bg)",
|
|
2969
2937
|
boxShadow: "var(--tpl-shadow-md)"
|
|
@@ -2971,115 +2939,108 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2971
2939
|
}
|
|
2972
2940
|
return a(() => i.selectedBlock, (e) => {
|
|
2973
2941
|
e && (c.value = "content");
|
|
2974
|
-
}), (n, i) => (e(),
|
|
2975
|
-
"aria-label":
|
|
2976
|
-
class:
|
|
2942
|
+
}), (n, i) => (e(), v("aside", {
|
|
2943
|
+
"aria-label": T(s).landmarks.rightSidebar,
|
|
2944
|
+
class: p(["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)]", t.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
2977
2945
|
}, [
|
|
2978
|
-
|
|
2979
|
-
|
|
2946
|
+
_("div", ys, [
|
|
2947
|
+
_("button", {
|
|
2980
2948
|
id: "tpl-tab-content",
|
|
2981
2949
|
role: "tab",
|
|
2982
2950
|
"aria-selected": c.value === "content",
|
|
2983
2951
|
"aria-controls": "tpl-tabpanel-content",
|
|
2984
|
-
"aria-label":
|
|
2985
|
-
title:
|
|
2986
|
-
class:
|
|
2987
|
-
style:
|
|
2952
|
+
"aria-label": T(s).sidebar.content,
|
|
2953
|
+
title: T(s).sidebar.content,
|
|
2954
|
+
class: p(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("content")]),
|
|
2955
|
+
style: S(h("content")),
|
|
2988
2956
|
onClick: i[0] ||= (e) => c.value = "content"
|
|
2989
|
-
}, [
|
|
2957
|
+
}, [k(T(Ot), {
|
|
2990
2958
|
size: 14,
|
|
2991
2959
|
"stroke-width": 2
|
|
2992
|
-
}), c.value === "content" ? (e(),
|
|
2993
|
-
|
|
2960
|
+
}), c.value === "content" ? (e(), v("span", xs, D(T(s).sidebar.content), 1)) : b("", !0)], 14, bs),
|
|
2961
|
+
_("button", {
|
|
2994
2962
|
id: "tpl-tab-settings",
|
|
2995
2963
|
role: "tab",
|
|
2996
2964
|
"aria-selected": c.value === "settings",
|
|
2997
2965
|
"aria-controls": "tpl-tabpanel-settings",
|
|
2998
|
-
"aria-label":
|
|
2999
|
-
title:
|
|
3000
|
-
class:
|
|
3001
|
-
style:
|
|
2966
|
+
"aria-label": T(s).sidebar.settings,
|
|
2967
|
+
title: T(s).sidebar.settings,
|
|
2968
|
+
class: p(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("settings")]),
|
|
2969
|
+
style: S(h("settings")),
|
|
3002
2970
|
onClick: i[1] ||= (e) => c.value = "settings"
|
|
3003
|
-
}, [
|
|
2971
|
+
}, [k(T(At), {
|
|
3004
2972
|
size: 14,
|
|
3005
2973
|
"stroke-width": 1.5
|
|
3006
|
-
}), c.value === "settings" ? (e(),
|
|
3007
|
-
d.value ? (e(),
|
|
2974
|
+
}), c.value === "settings" ? (e(), v("span", Cs, D(T(s).sidebar.settings), 1)) : b("", !0)], 14, Ss),
|
|
2975
|
+
d.value ? (e(), v("button", {
|
|
3008
2976
|
key: 0,
|
|
3009
2977
|
id: "tpl-tab-issues",
|
|
3010
2978
|
role: "tab",
|
|
3011
2979
|
"aria-selected": c.value === "issues",
|
|
3012
2980
|
"aria-controls": "tpl-tabpanel-issues",
|
|
3013
|
-
"aria-label":
|
|
3014
|
-
title:
|
|
3015
|
-
class:
|
|
3016
|
-
style:
|
|
2981
|
+
"aria-label": T(s).issues.panelTabLabel,
|
|
2982
|
+
title: T(s).issues.panelTabLabel,
|
|
2983
|
+
class: p(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("issues")]),
|
|
2984
|
+
style: S(h("issues")),
|
|
3017
2985
|
onClick: i[2] ||= (e) => c.value = "issues"
|
|
3018
2986
|
}, [
|
|
3019
|
-
|
|
2987
|
+
k(T(et), {
|
|
3020
2988
|
size: 14,
|
|
3021
2989
|
"stroke-width": 1.5
|
|
3022
2990
|
}),
|
|
3023
|
-
c.value === "issues" ? (e(),
|
|
3024
|
-
|
|
3025
|
-
], 14,
|
|
2991
|
+
c.value === "issues" ? (e(), v("span", Ts, D(T(s).issues.panelTabLabel), 1)) : b("", !0),
|
|
2992
|
+
f.value > 0 ? (e(), v("span", Es, D(f.value), 1)) : b("", !0)
|
|
2993
|
+
], 14, ws)) : b("", !0)
|
|
3026
2994
|
]),
|
|
3027
|
-
c.value === "content" ? (e(),
|
|
2995
|
+
c.value === "content" ? (e(), v("div", Ds, [t.selectedBlock ? (e(), C(_s, {
|
|
3028
2996
|
key: 0,
|
|
3029
2997
|
block: t.selectedBlock,
|
|
3030
2998
|
onUpdate: i[3] ||= (e) => o("update-block", e),
|
|
3031
2999
|
onDelete: i[4] ||= (e) => o("delete-block"),
|
|
3032
3000
|
onDuplicate: i[5] ||= (e) => o("duplicate-block")
|
|
3033
|
-
}, null, 8, ["block"])) : (e(),
|
|
3034
|
-
|
|
3001
|
+
}, null, 8, ["block"])) : (e(), v("div", Os, [
|
|
3002
|
+
_("div", ks, [k(T(Ct), {
|
|
3035
3003
|
size: 40,
|
|
3036
3004
|
"stroke-width": 1.5
|
|
3037
3005
|
})]),
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
]))])) :
|
|
3041
|
-
c.value === "settings" ? (e(),
|
|
3006
|
+
_("h3", As, D(T(s).sidebar.noSelection), 1),
|
|
3007
|
+
_("p", js, D(T(s).sidebar.noSelectionHint), 1)
|
|
3008
|
+
]))])) : b("", !0),
|
|
3009
|
+
c.value === "settings" ? (e(), v("div", Ms, [k(Gn, {
|
|
3042
3010
|
settings: t.settings,
|
|
3043
3011
|
onUpdate: i[6] ||= (e) => o("update-settings", e)
|
|
3044
|
-
}, null, 8, ["settings"])])) :
|
|
3045
|
-
c.value === "issues" && d.value ? (e(),
|
|
3046
|
-
], 10,
|
|
3012
|
+
}, null, 8, ["settings"])])) : b("", !0),
|
|
3013
|
+
c.value === "issues" && d.value ? (e(), v("div", Ns, [k(T(r))])) : b("", !0)
|
|
3014
|
+
], 10, vs));
|
|
3047
3015
|
}
|
|
3048
|
-
}),
|
|
3016
|
+
}), Fs = ["aria-label"], Is = [
|
|
3049
3017
|
"aria-checked",
|
|
3050
3018
|
"aria-label",
|
|
3051
3019
|
"title",
|
|
3052
3020
|
"onClick"
|
|
3053
|
-
],
|
|
3021
|
+
], Ls = /* @__PURE__ */ m({
|
|
3054
3022
|
__name: "ViewportToggle",
|
|
3055
3023
|
props: { viewport: {} },
|
|
3056
3024
|
emits: ["change"],
|
|
3057
3025
|
setup(t, { emit: n }) {
|
|
3058
|
-
let r = t, i = n, { t: a } = V(), s =
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
},
|
|
3067
|
-
{
|
|
3068
|
-
value: "mobile",
|
|
3069
|
-
label: a.viewport.mobile
|
|
3070
|
-
}
|
|
3071
|
-
]), c = h(() => `translateX(${s.value.findIndex((e) => e.value === r.viewport) * 100}%)`);
|
|
3072
|
-
return (n, r) => (e(), _("div", {
|
|
3026
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [{
|
|
3027
|
+
value: "desktop",
|
|
3028
|
+
label: a.viewport.desktop
|
|
3029
|
+
}, {
|
|
3030
|
+
value: "mobile",
|
|
3031
|
+
label: a.viewport.mobile
|
|
3032
|
+
}]), c = g(() => `translateX(${s.value.findIndex((e) => e.value === r.viewport) * 100}%)`);
|
|
3033
|
+
return (n, r) => (e(), v("div", {
|
|
3073
3034
|
role: "radiogroup",
|
|
3074
|
-
"aria-label":
|
|
3035
|
+
"aria-label": T(a).viewport.label,
|
|
3075
3036
|
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
3076
|
-
style:
|
|
3037
|
+
style: S({
|
|
3077
3038
|
gridTemplateColumns: `repeat(${s.value.length}, 1fr)`,
|
|
3078
3039
|
backgroundColor: "var(--tpl-bg-hover)"
|
|
3079
3040
|
})
|
|
3080
|
-
}, [
|
|
3041
|
+
}, [_("div", {
|
|
3081
3042
|
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
3082
|
-
style:
|
|
3043
|
+
style: S({
|
|
3083
3044
|
left: "4px",
|
|
3084
3045
|
width: `calc((100% - 8px) / ${s.value.length})`,
|
|
3085
3046
|
transform: c.value,
|
|
@@ -3087,169 +3048,165 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3087
3048
|
boxShadow: "var(--tpl-shadow)",
|
|
3088
3049
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
3089
3050
|
})
|
|
3090
|
-
}, null, 4), (e(!0),
|
|
3051
|
+
}, null, 4), (e(!0), v(y, null, o(s.value, (n) => (e(), v("button", {
|
|
3091
3052
|
key: n.value,
|
|
3092
3053
|
role: "radio",
|
|
3093
3054
|
"aria-checked": t.viewport === n.value,
|
|
3094
3055
|
"aria-label": n.label,
|
|
3095
3056
|
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium",
|
|
3096
|
-
style:
|
|
3057
|
+
style: S({
|
|
3097
3058
|
color: t.viewport === n.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3098
3059
|
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
3099
3060
|
}),
|
|
3100
3061
|
title: n.label,
|
|
3101
3062
|
onClick: (e) => i("change", n.value)
|
|
3102
|
-
}, [n.value === "desktop" ? (e(),
|
|
3063
|
+
}, [n.value === "desktop" ? (e(), C(T(Et), {
|
|
3103
3064
|
key: 0,
|
|
3104
3065
|
size: 18,
|
|
3105
3066
|
"stroke-width": 1.5
|
|
3106
|
-
})) :
|
|
3067
|
+
})) : (e(), C(T(jt), {
|
|
3107
3068
|
key: 1,
|
|
3108
3069
|
size: 18,
|
|
3109
3070
|
"stroke-width": 1.5
|
|
3110
|
-
}))
|
|
3111
|
-
key: 2,
|
|
3112
|
-
size: 18,
|
|
3113
|
-
"stroke-width": 1.5
|
|
3114
|
-
})), g("span", null, E(n.label), 1)], 12, Ps))), 128))], 12, Ns));
|
|
3071
|
+
})), _("span", null, D(n.label), 1)], 12, Is))), 128))], 12, Fs));
|
|
3115
3072
|
}
|
|
3116
|
-
}),
|
|
3073
|
+
}), Rs = [
|
|
3117
3074
|
"aria-label",
|
|
3118
3075
|
"title",
|
|
3119
3076
|
"aria-pressed"
|
|
3120
|
-
],
|
|
3077
|
+
], zs = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
3121
3078
|
__name: "PreviewToggle",
|
|
3122
3079
|
props: { previewMode: { type: Boolean } },
|
|
3123
3080
|
emits: ["change"],
|
|
3124
3081
|
setup(t, { emit: n }) {
|
|
3125
3082
|
let r = n, { t: i } = V();
|
|
3126
|
-
return (n, a) => (e(),
|
|
3083
|
+
return (n, a) => (e(), v("button", {
|
|
3127
3084
|
class: "tpl-preview-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
3128
|
-
style:
|
|
3085
|
+
style: S({
|
|
3129
3086
|
color: t.previewMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3130
3087
|
backgroundColor: t.previewMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3131
3088
|
}),
|
|
3132
|
-
"aria-label": t.previewMode ?
|
|
3133
|
-
title: t.previewMode ?
|
|
3089
|
+
"aria-label": t.previewMode ? T(i).previewMode.disable : T(i).previewMode.enable,
|
|
3090
|
+
title: t.previewMode ? T(i).previewMode.disable : T(i).previewMode.enable,
|
|
3134
3091
|
"aria-pressed": t.previewMode,
|
|
3135
3092
|
onClick: a[0] ||= (e) => r("change", !t.previewMode)
|
|
3136
|
-
}, [O
|
|
3093
|
+
}, [k(O, {
|
|
3137
3094
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3138
3095
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3139
3096
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3140
3097
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3141
3098
|
mode: "out-in"
|
|
3142
3099
|
}, {
|
|
3143
|
-
default:
|
|
3100
|
+
default: M(() => [t.previewMode ? (e(), C(T(Xe), {
|
|
3144
3101
|
key: "eye",
|
|
3145
3102
|
size: 18,
|
|
3146
3103
|
"stroke-width": 1.5
|
|
3147
|
-
})) : (e(),
|
|
3104
|
+
})) : (e(), C(T(te), {
|
|
3148
3105
|
key: "eye-off",
|
|
3149
3106
|
size: 18,
|
|
3150
3107
|
"stroke-width": 1.5
|
|
3151
3108
|
}))]),
|
|
3152
3109
|
_: 1
|
|
3153
|
-
})], 12,
|
|
3110
|
+
})], 12, Rs));
|
|
3154
3111
|
}
|
|
3155
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3112
|
+
}), [["__scopeId", "data-v-af87d02a"]]), Bs = [
|
|
3156
3113
|
"aria-label",
|
|
3157
3114
|
"title",
|
|
3158
3115
|
"aria-pressed"
|
|
3159
|
-
],
|
|
3116
|
+
], Vs = /* @__PURE__ */ ct(/* @__PURE__ */ m({
|
|
3160
3117
|
__name: "DarkModeToggle",
|
|
3161
3118
|
props: { darkMode: { type: Boolean } },
|
|
3162
3119
|
emits: ["change"],
|
|
3163
3120
|
setup(t, { emit: n }) {
|
|
3164
3121
|
let r = n, { t: i } = V();
|
|
3165
|
-
return (n, a) => (e(),
|
|
3122
|
+
return (n, a) => (e(), v("button", {
|
|
3166
3123
|
class: "tpl-dark-mode-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
3167
|
-
style:
|
|
3124
|
+
style: S({
|
|
3168
3125
|
color: t.darkMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3169
3126
|
backgroundColor: t.darkMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3170
3127
|
}),
|
|
3171
|
-
"aria-label": t.darkMode ?
|
|
3172
|
-
title: t.darkMode ?
|
|
3128
|
+
"aria-label": t.darkMode ? T(i).darkMode.disable : T(i).darkMode.enable,
|
|
3129
|
+
title: t.darkMode ? T(i).darkMode.disable : T(i).darkMode.enable,
|
|
3173
3130
|
"aria-pressed": t.darkMode,
|
|
3174
3131
|
onClick: a[0] ||= (e) => r("change", !t.darkMode)
|
|
3175
|
-
}, [O
|
|
3132
|
+
}, [k(O, {
|
|
3176
3133
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3177
3134
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3178
3135
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3179
3136
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3180
3137
|
mode: "out-in"
|
|
3181
3138
|
}, {
|
|
3182
|
-
default:
|
|
3139
|
+
default: M(() => [t.darkMode ? (e(), C(T(Dt), {
|
|
3183
3140
|
key: "moon",
|
|
3184
3141
|
size: 18,
|
|
3185
3142
|
"stroke-width": 1.5
|
|
3186
|
-
})) : (e(),
|
|
3143
|
+
})) : (e(), C(T(Pt), {
|
|
3187
3144
|
key: "sun",
|
|
3188
3145
|
size: 18,
|
|
3189
3146
|
"stroke-width": 1.5
|
|
3190
3147
|
}))]),
|
|
3191
3148
|
_: 1
|
|
3192
|
-
})], 12,
|
|
3149
|
+
})], 12, Bs));
|
|
3193
3150
|
}
|
|
3194
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3151
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Hs = {
|
|
3195
3152
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3196
3153
|
style: {
|
|
3197
3154
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3198
3155
|
"backdrop-filter": "blur(8px)",
|
|
3199
3156
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3200
3157
|
}
|
|
3201
|
-
},
|
|
3158
|
+
}, Us = {
|
|
3202
3159
|
href: "https://github.com/templatical/sdk",
|
|
3203
3160
|
target: "_blank",
|
|
3204
3161
|
rel: "noopener noreferrer",
|
|
3205
3162
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3206
3163
|
style: { "text-decoration": "none" }
|
|
3207
|
-
},
|
|
3164
|
+
}, Ws = /* @__PURE__ */ m({
|
|
3208
3165
|
__name: "EditorFooter",
|
|
3209
3166
|
props: { positionClass: {} },
|
|
3210
3167
|
setup(t) {
|
|
3211
3168
|
let { t: n } = V();
|
|
3212
|
-
return (r, i) => (e(),
|
|
3213
|
-
|
|
3214
|
-
i[0] ||=
|
|
3169
|
+
return (r, i) => (e(), v("footer", { class: p(["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)]", t.positionClass]) }, [_("div", Hs, [
|
|
3170
|
+
_("span", null, D(T(n).footer.poweredBy), 1),
|
|
3171
|
+
i[0] ||= _("a", {
|
|
3215
3172
|
href: "https://templatical.com",
|
|
3216
3173
|
target: "_blank",
|
|
3217
3174
|
rel: "noopener noreferrer",
|
|
3218
3175
|
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)]",
|
|
3219
3176
|
style: { "text-decoration": "none" }
|
|
3220
|
-
}, [
|
|
3177
|
+
}, [_("img", {
|
|
3221
3178
|
width: "14",
|
|
3222
3179
|
height: "14",
|
|
3223
3180
|
src: "https://templatical.com/logo.svg",
|
|
3224
3181
|
alt: ""
|
|
3225
|
-
}),
|
|
3226
|
-
i[1] ||=
|
|
3227
|
-
|
|
3182
|
+
}), d(" Templatical ")], -1),
|
|
3183
|
+
i[1] ||= _("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3184
|
+
_("a", Us, D(T(n).footer.openSource), 1)
|
|
3228
3185
|
])], 2));
|
|
3229
3186
|
}
|
|
3230
|
-
}),
|
|
3187
|
+
}), Gs = ["aria-labelledby", "data-tpl-theme"], Ks = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, qs = ["id"], Js = ["aria-label"], Ys = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Xs = [
|
|
3231
3188
|
"id",
|
|
3232
3189
|
"placeholder",
|
|
3233
3190
|
"aria-label",
|
|
3234
3191
|
"aria-activedescendant"
|
|
3235
|
-
],
|
|
3192
|
+
], Zs = {
|
|
3236
3193
|
key: 0,
|
|
3237
3194
|
class: "tpl:flex tpl:gap-1.5 tpl:overflow-x-auto tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2",
|
|
3238
3195
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3239
|
-
},
|
|
3196
|
+
}, Qs = ["data-group-name", "onClick"], $s = ["aria-label"], ec = {
|
|
3240
3197
|
key: 0,
|
|
3241
3198
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3242
3199
|
"data-testid": "merge-tag-picker-empty"
|
|
3243
|
-
},
|
|
3200
|
+
}, tc = {
|
|
3244
3201
|
key: 1,
|
|
3245
3202
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3246
3203
|
"data-testid": "merge-tag-picker-empty"
|
|
3247
|
-
},
|
|
3204
|
+
}, nc = [
|
|
3248
3205
|
"aria-expanded",
|
|
3249
3206
|
"data-group-name",
|
|
3250
3207
|
"data-group-collapsed",
|
|
3251
3208
|
"onClick"
|
|
3252
|
-
],
|
|
3209
|
+
], rc = { class: "tpl:ml-1 tpl:font-normal" }, ic = [
|
|
3253
3210
|
"id",
|
|
3254
3211
|
"aria-selected",
|
|
3255
3212
|
"data-selected",
|
|
@@ -3258,38 +3215,38 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3258
3215
|
"title",
|
|
3259
3216
|
"onMousemove",
|
|
3260
3217
|
"onClick"
|
|
3261
|
-
],
|
|
3218
|
+
], ac = { class: "tpl:text-sm tpl:font-medium" }, oc = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, sc = {
|
|
3262
3219
|
key: 0,
|
|
3263
3220
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3264
|
-
}, $ = "tpl-merge-tag-picker-list",
|
|
3221
|
+
}, $ = "tpl-merge-tag-picker-list", cc = /* @__PURE__ */ m({
|
|
3265
3222
|
__name: "MergeTagPickerModal",
|
|
3266
3223
|
setup(r) {
|
|
3267
|
-
let i =
|
|
3268
|
-
function
|
|
3269
|
-
return
|
|
3224
|
+
let i = Oe(Ue, "MergeTagPickerModal"), { t: s, format: c } = V(), l = A(Ie, null), d = A(Fe, null), m = u(""), x = Te(m, 200), w = u(null), O = g(() => x.value.trim().length > 0), j = u(0), N = g(() => i.tags.value.some((e) => !!e.group)), P = u(/* @__PURE__ */ new Set());
|
|
3225
|
+
function F(e) {
|
|
3226
|
+
return P.value.has(e);
|
|
3270
3227
|
}
|
|
3271
|
-
function
|
|
3272
|
-
let t = new Set(
|
|
3273
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
3228
|
+
function I(e) {
|
|
3229
|
+
let t = new Set(P.value);
|
|
3230
|
+
t.has(e) ? t.delete(e) : t.add(e), P.value = t, j.value = 0;
|
|
3274
3231
|
}
|
|
3275
|
-
let
|
|
3276
|
-
let e =
|
|
3232
|
+
let L = g(() => {
|
|
3233
|
+
let e = x.value.trim().toLowerCase();
|
|
3277
3234
|
return e ? i.tags.value.filter((t) => [
|
|
3278
3235
|
t.label,
|
|
3279
3236
|
t.value,
|
|
3280
3237
|
t.description ?? ""
|
|
3281
3238
|
].join(" ").toLowerCase().includes(e)) : i.tags.value;
|
|
3282
|
-
}),
|
|
3283
|
-
if (!
|
|
3239
|
+
}), ee = g(() => {
|
|
3240
|
+
if (!N.value) return [];
|
|
3284
3241
|
let e = s.mergeTag.picker.otherGroup, t = /* @__PURE__ */ new Set(), n = [];
|
|
3285
3242
|
for (let r of i.tags.value) {
|
|
3286
3243
|
let i = r.group ?? e;
|
|
3287
3244
|
t.has(i) || (t.add(i), n.push(i));
|
|
3288
3245
|
}
|
|
3289
3246
|
return n;
|
|
3290
|
-
}),
|
|
3291
|
-
let e =
|
|
3292
|
-
if (!
|
|
3247
|
+
}), R = g(() => {
|
|
3248
|
+
let e = L.value;
|
|
3249
|
+
if (!N.value || O.value) return e.map((e, t) => ({
|
|
3293
3250
|
kind: "tag",
|
|
3294
3251
|
tag: e,
|
|
3295
3252
|
index: t
|
|
@@ -3306,49 +3263,49 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3306
3263
|
kind: "header",
|
|
3307
3264
|
group: e,
|
|
3308
3265
|
count: t.length
|
|
3309
|
-
}), !
|
|
3266
|
+
}), !P.value.has(e)) for (let e of t) i.push({
|
|
3310
3267
|
kind: "tag",
|
|
3311
3268
|
tag: e,
|
|
3312
3269
|
index: a
|
|
3313
3270
|
}), a++;
|
|
3314
3271
|
}
|
|
3315
3272
|
return i;
|
|
3316
|
-
}),
|
|
3273
|
+
}), z = g(() => R.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3317
3274
|
a(() => i.isOpen.value, (e) => {
|
|
3318
|
-
e && (
|
|
3319
|
-
|
|
3275
|
+
e && (m.value = "", j.value = 0, P.value = /* @__PURE__ */ new Set(), n(() => {
|
|
3276
|
+
w.value?.focus();
|
|
3320
3277
|
}));
|
|
3321
|
-
}), a(
|
|
3322
|
-
|
|
3278
|
+
}), a(z, (e) => {
|
|
3279
|
+
j.value >= e.length && (j.value = Math.max(0, e.length - 1));
|
|
3323
3280
|
});
|
|
3324
|
-
function
|
|
3281
|
+
function te(e) {
|
|
3325
3282
|
i.resolve(e);
|
|
3326
3283
|
}
|
|
3327
|
-
function
|
|
3284
|
+
function ne() {
|
|
3328
3285
|
i.resolve(null);
|
|
3329
3286
|
}
|
|
3330
|
-
function
|
|
3331
|
-
if (
|
|
3332
|
-
let t =
|
|
3333
|
-
|
|
3287
|
+
function re(e) {
|
|
3288
|
+
if (z.value.length === 0) return;
|
|
3289
|
+
let t = j.value + e;
|
|
3290
|
+
j.value = Math.max(0, Math.min(z.value.length - 1, t)), oe();
|
|
3334
3291
|
}
|
|
3335
|
-
let
|
|
3336
|
-
function
|
|
3337
|
-
|
|
3292
|
+
let B = u(null), ie = u({});
|
|
3293
|
+
function ae(e, t) {
|
|
3294
|
+
ie.value[e] = t ?? null;
|
|
3338
3295
|
}
|
|
3339
|
-
function
|
|
3296
|
+
function oe() {
|
|
3340
3297
|
n(() => {
|
|
3341
|
-
let e =
|
|
3342
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3298
|
+
let e = B.value;
|
|
3299
|
+
e && e.querySelector(`[data-merge-tag-index="${j.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3343
3300
|
});
|
|
3344
3301
|
}
|
|
3345
|
-
function
|
|
3346
|
-
if (
|
|
3347
|
-
let t = new Set(
|
|
3348
|
-
t.delete(e),
|
|
3302
|
+
function se(e) {
|
|
3303
|
+
if (P.value.has(e)) {
|
|
3304
|
+
let t = new Set(P.value);
|
|
3305
|
+
t.delete(e), P.value = t;
|
|
3349
3306
|
}
|
|
3350
3307
|
n(() => {
|
|
3351
|
-
let t =
|
|
3308
|
+
let t = B.value;
|
|
3352
3309
|
if (!t) return;
|
|
3353
3310
|
let n = 0, r = !1;
|
|
3354
3311
|
for (let i of Array.from(t.children)) {
|
|
@@ -3364,124 +3321,126 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3364
3321
|
});
|
|
3365
3322
|
});
|
|
3366
3323
|
}
|
|
3367
|
-
function
|
|
3368
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3369
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3324
|
+
function ce(e) {
|
|
3325
|
+
if (e.key === "ArrowDown") e.preventDefault(), re(1);
|
|
3326
|
+
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3370
3327
|
else if (e.key === "Enter") {
|
|
3371
3328
|
e.preventDefault();
|
|
3372
|
-
let t =
|
|
3373
|
-
t &&
|
|
3329
|
+
let t = z.value[j.value];
|
|
3330
|
+
t && te(t);
|
|
3374
3331
|
}
|
|
3375
3332
|
}
|
|
3376
|
-
function
|
|
3377
|
-
if (
|
|
3333
|
+
function le() {
|
|
3334
|
+
if (z.value.length !== 0) return `${$}-opt-${j.value}`;
|
|
3378
3335
|
}
|
|
3379
|
-
function
|
|
3336
|
+
function ue(e) {
|
|
3380
3337
|
return `${$}-opt-${e}`;
|
|
3381
3338
|
}
|
|
3382
|
-
let
|
|
3383
|
-
return (n, r) => (e(),
|
|
3384
|
-
visible:
|
|
3385
|
-
onClose:
|
|
3386
|
-
onKeydown:
|
|
3339
|
+
let de = g(() => i.tags.value.length === 0), fe = g(() => !de.value && L.value.length === 0), pe = g(() => N.value && ee.value.length > 1 && !O.value);
|
|
3340
|
+
return (n, r) => (e(), C(bt, {
|
|
3341
|
+
visible: T(i).isOpen.value,
|
|
3342
|
+
onClose: ne,
|
|
3343
|
+
onKeydown: ce
|
|
3387
3344
|
}, {
|
|
3388
|
-
default:
|
|
3345
|
+
default: M(() => [_("div", {
|
|
3389
3346
|
role: "dialog",
|
|
3390
3347
|
"aria-modal": "true",
|
|
3391
3348
|
"aria-labelledby": `${$}-title`,
|
|
3349
|
+
"data-tpl-theme": T(d),
|
|
3392
3350
|
"data-testid": "merge-tag-picker-modal",
|
|
3393
|
-
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
3351
|
+
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
3352
|
+
style: S(T(l))
|
|
3394
3353
|
}, [
|
|
3395
|
-
|
|
3354
|
+
_("header", Ks, [_("h2", {
|
|
3396
3355
|
id: `${$}-title`,
|
|
3397
3356
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3398
|
-
},
|
|
3357
|
+
}, D(T(s).mergeTag.picker.title), 9, qs), _("button", {
|
|
3399
3358
|
type: "button",
|
|
3400
3359
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3401
|
-
"aria-label":
|
|
3360
|
+
"aria-label": T(s).mergeTag.picker.close,
|
|
3402
3361
|
"data-testid": "merge-tag-picker-close",
|
|
3403
|
-
onClick:
|
|
3404
|
-
}, [
|
|
3362
|
+
onClick: ne
|
|
3363
|
+
}, [k(T(st), {
|
|
3405
3364
|
size: 16,
|
|
3406
3365
|
"stroke-width": 2
|
|
3407
|
-
})], 8,
|
|
3408
|
-
|
|
3366
|
+
})], 8, Js)]),
|
|
3367
|
+
_("div", Ys, [k(T(qe), {
|
|
3409
3368
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3410
3369
|
size: 14,
|
|
3411
3370
|
"stroke-width": 2
|
|
3412
|
-
}), t(
|
|
3371
|
+
}), t(_("input", {
|
|
3413
3372
|
id: `${$}-search`,
|
|
3414
3373
|
ref_key: "searchInputRef",
|
|
3415
|
-
ref:
|
|
3416
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
3374
|
+
ref: w,
|
|
3375
|
+
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
3417
3376
|
type: "text",
|
|
3418
3377
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3419
|
-
placeholder:
|
|
3420
|
-
"aria-label":
|
|
3378
|
+
placeholder: T(s).mergeTag.picker.searchPlaceholder,
|
|
3379
|
+
"aria-label": T(s).mergeTag.picker.searchAriaLabel,
|
|
3421
3380
|
"aria-controls": $,
|
|
3422
|
-
"aria-activedescendant":
|
|
3381
|
+
"aria-activedescendant": le(),
|
|
3423
3382
|
"data-testid": "merge-tag-picker-search",
|
|
3424
|
-
onKeydown: r[1] ||=
|
|
3425
|
-
}, null, 40,
|
|
3426
|
-
|
|
3383
|
+
onKeydown: r[1] ||= E(h(() => {}, ["prevent"]), ["enter"])
|
|
3384
|
+
}, null, 40, Xs), [[f, m.value]])]),
|
|
3385
|
+
pe.value ? (e(), v("div", Zs, [(e(!0), v(y, null, o(ee.value, (t) => (e(), v("button", {
|
|
3427
3386
|
key: t,
|
|
3428
3387
|
type: "button",
|
|
3429
3388
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3430
3389
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3431
3390
|
"data-group-name": t,
|
|
3432
|
-
onClick: (e) =>
|
|
3433
|
-
},
|
|
3434
|
-
|
|
3391
|
+
onClick: (e) => se(t)
|
|
3392
|
+
}, D(t), 9, Qs))), 128))])) : b("", !0),
|
|
3393
|
+
_("div", {
|
|
3435
3394
|
id: $,
|
|
3436
3395
|
ref_key: "listRef",
|
|
3437
|
-
ref:
|
|
3396
|
+
ref: B,
|
|
3438
3397
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3439
3398
|
role: "listbox",
|
|
3440
|
-
"aria-label":
|
|
3399
|
+
"aria-label": T(s).mergeTag.picker.title,
|
|
3441
3400
|
"data-testid": "merge-tag-picker-list"
|
|
3442
|
-
}, [
|
|
3401
|
+
}, [de.value ? (e(), v("div", ec, D(T(s).mergeTag.picker.empty), 1)) : fe.value ? (e(), v("div", tc, D(T(s).mergeTag.picker.noResults), 1)) : (e(!0), v(y, { key: 2 }, o(R.value, (t, n) => (e(), v(y, { key: n }, [t.kind === "header" ? (e(), v("button", {
|
|
3443
3402
|
key: 0,
|
|
3444
3403
|
ref_for: !0,
|
|
3445
|
-
ref: (e) =>
|
|
3404
|
+
ref: (e) => ae(t.group, e),
|
|
3446
3405
|
type: "button",
|
|
3447
|
-
"aria-expanded": !
|
|
3406
|
+
"aria-expanded": !F(t.group),
|
|
3448
3407
|
"aria-controls": $,
|
|
3449
3408
|
class: "tpl:sticky tpl:top-0 tpl:z-10 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-[var(--tpl-bg-elevated)] tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-left tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)]",
|
|
3450
3409
|
"data-testid": "merge-tag-picker-group-header",
|
|
3451
3410
|
"data-group-name": t.group,
|
|
3452
|
-
"data-group-collapsed":
|
|
3453
|
-
onClick: (e) =>
|
|
3411
|
+
"data-group-collapsed": F(t.group) ? "true" : "false",
|
|
3412
|
+
onClick: (e) => I(t.group)
|
|
3454
3413
|
}, [
|
|
3455
|
-
|
|
3414
|
+
k(T(We), {
|
|
3456
3415
|
size: 12,
|
|
3457
3416
|
"stroke-width": 2,
|
|
3458
|
-
class:
|
|
3417
|
+
class: p(["tpl:transition-transform", F(t.group) ? "tpl:-rotate-90" : ""])
|
|
3459
3418
|
}, null, 8, ["class"]),
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
], 8,
|
|
3419
|
+
_("span", null, D(t.group), 1),
|
|
3420
|
+
_("span", rc, " (" + D(T(c)(T(s).mergeTag.picker.groupCount, { count: t.count })) + ") ", 1)
|
|
3421
|
+
], 8, nc)) : (e(), v("button", {
|
|
3463
3422
|
key: 1,
|
|
3464
|
-
id:
|
|
3423
|
+
id: ue(t.index),
|
|
3465
3424
|
type: "button",
|
|
3466
3425
|
role: "option",
|
|
3467
|
-
"aria-selected": t.index ===
|
|
3468
|
-
"data-selected": t.index ===
|
|
3426
|
+
"aria-selected": t.index === j.value,
|
|
3427
|
+
"data-selected": t.index === j.value ? "true" : "false",
|
|
3469
3428
|
"data-merge-tag-index": t.index,
|
|
3470
3429
|
"data-merge-tag-value": t.tag.value,
|
|
3471
3430
|
title: t.tag.description ? `${t.tag.value} — ${t.tag.description}` : t.tag.value,
|
|
3472
|
-
class:
|
|
3431
|
+
class: p(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", t.index === j.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3473
3432
|
"data-testid": "merge-tag-picker-item",
|
|
3474
|
-
onMousemove: (e) =>
|
|
3475
|
-
onClick: (e) =>
|
|
3433
|
+
onMousemove: (e) => j.value = t.index,
|
|
3434
|
+
onClick: (e) => te(t.tag)
|
|
3476
3435
|
}, [
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
t.tag.description ? (e(),
|
|
3480
|
-
], 42,
|
|
3481
|
-
],
|
|
3436
|
+
_("span", ac, D(t.tag.label), 1),
|
|
3437
|
+
_("span", oc, D(t.tag.value), 1),
|
|
3438
|
+
t.tag.description ? (e(), v("span", sc, D(t.tag.description), 1)) : b("", !0)
|
|
3439
|
+
], 42, ic))], 64))), 128))], 8, $s)
|
|
3440
|
+
], 12, Gs)]),
|
|
3482
3441
|
_: 1
|
|
3483
3442
|
}, 8, ["visible"]));
|
|
3484
3443
|
}
|
|
3485
3444
|
});
|
|
3486
3445
|
//#endregion
|
|
3487
|
-
export {
|
|
3446
|
+
export { Ls as a, Kt as c, kt as d, zs as i, Gt as l, Ws as n, Ps as o, Vs as r, tn as s, cc as t, Ft as u };
|