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