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