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