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