@templatical/editor 0.6.4 → 0.6.6
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/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
- package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
- package/dist/CommentsSidebar-BQROg36f.js +441 -0
- package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
- package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
- package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
- package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
- package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
- package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
- package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
- package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
- package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
- package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
- package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
- package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
- package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
- package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
- package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +122 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
- package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
- package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
- package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
- package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-BgmKdc2x.js +3173 -0
- package/dist/templatical-editor.js +99 -99
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
- package/dist/useEditorCore-CnXrv71D.js +3794 -0
- package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
- package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
- package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
- package/package.json +8 -8
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/styles-DEXEkBvg.js +0 -3176
- package/dist/useEditorCore-C6ost42Q.js +0 -9342
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Nt as
|
|
3
|
-
import { h as
|
|
1
|
+
import { F as e, L as t, M as n, P as r, V as i, Z as a, at as o, c as s, f as c, g as l, h as u, m as d, n as f, ot as p, p as m, rt as h, st as g, u as _, x as v, y as ee } from "./draggable-CNhyCGIO.js";
|
|
2
|
+
import { Nt as te, tn as ne } from "./features-D6FoOm8v.js";
|
|
3
|
+
import { h as y, i as b, m as x, p as S, u as re } from "./styleConstants-DP1VOca8.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
5
|
-
var
|
|
5
|
+
var C = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, w = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
6
6
|
360 / (Math.PI * 2);
|
|
7
|
-
var
|
|
7
|
+
var ie = (e) => oe(T(e)), T = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
8
8
|
r: parseInt(e[0] + e[0], 16),
|
|
9
9
|
g: parseInt(e[1] + e[1], 16),
|
|
10
10
|
b: parseInt(e[2] + e[2], 16),
|
|
11
|
-
a: e.length === 4 ?
|
|
11
|
+
a: e.length === 4 ? w(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
12
12
|
} : {
|
|
13
13
|
r: parseInt(e.substring(0, 2), 16),
|
|
14
14
|
g: parseInt(e.substring(2, 4), 16),
|
|
15
15
|
b: parseInt(e.substring(4, 6), 16),
|
|
16
|
-
a: e.length === 8 ?
|
|
17
|
-
}),
|
|
16
|
+
a: e.length === 8 ? w(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
17
|
+
}), E = (e) => A(ae(e)), D = ({ h: e, s: t, v: n, a: r }) => {
|
|
18
18
|
let i = (200 - t) * n / 100;
|
|
19
19
|
return {
|
|
20
|
-
h:
|
|
21
|
-
s:
|
|
22
|
-
l:
|
|
23
|
-
a:
|
|
20
|
+
h: w(e),
|
|
21
|
+
s: w(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
22
|
+
l: w(i / 2),
|
|
23
|
+
a: w(r, 2)
|
|
24
24
|
};
|
|
25
25
|
}, O = (e) => {
|
|
26
|
-
let { h: t, s: n, l: r } =
|
|
26
|
+
let { h: t, s: n, l: r } = D(e);
|
|
27
27
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
28
|
-
},
|
|
28
|
+
}, ae = ({ h: e, s: t, v: n, a: r }) => {
|
|
29
29
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
30
30
|
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;
|
|
31
31
|
return {
|
|
32
|
-
r:
|
|
32
|
+
r: w([
|
|
33
33
|
n,
|
|
34
34
|
o,
|
|
35
35
|
a,
|
|
@@ -37,7 +37,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
37
37
|
s,
|
|
38
38
|
n
|
|
39
39
|
][c] * 255),
|
|
40
|
-
g:
|
|
40
|
+
g: w([
|
|
41
41
|
s,
|
|
42
42
|
n,
|
|
43
43
|
n,
|
|
@@ -45,7 +45,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
45
45
|
a,
|
|
46
46
|
a
|
|
47
47
|
][c] * 255),
|
|
48
|
-
b:
|
|
48
|
+
b: w([
|
|
49
49
|
a,
|
|
50
50
|
a,
|
|
51
51
|
s,
|
|
@@ -53,27 +53,27 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
53
53
|
n,
|
|
54
54
|
o
|
|
55
55
|
][c] * 255),
|
|
56
|
-
a:
|
|
56
|
+
a: w(r, 2)
|
|
57
57
|
};
|
|
58
|
-
},
|
|
58
|
+
}, k = (e) => {
|
|
59
59
|
let t = e.toString(16);
|
|
60
60
|
return t.length < 2 ? "0" + t : t;
|
|
61
|
-
},
|
|
62
|
-
let i = r < 1 ?
|
|
63
|
-
return "#" +
|
|
61
|
+
}, A = ({ r: e, g: t, b: n, a: r }) => {
|
|
62
|
+
let i = r < 1 ? k(w(r * 255)) : "";
|
|
63
|
+
return "#" + k(e) + k(t) + k(n) + i;
|
|
64
64
|
}, oe = ({ r: e, g: t, b: n, a: r }) => {
|
|
65
65
|
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;
|
|
66
66
|
return {
|
|
67
|
-
h:
|
|
68
|
-
s:
|
|
69
|
-
v:
|
|
67
|
+
h: w(60 * (o < 0 ? o + 6 : o)),
|
|
68
|
+
s: w(i ? a / i * 100 : 0),
|
|
69
|
+
v: w(i / 255 * 100),
|
|
70
70
|
a: r
|
|
71
71
|
};
|
|
72
72
|
}, j = (e, t) => {
|
|
73
73
|
if (e === t) return !0;
|
|
74
74
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
75
75
|
return !0;
|
|
76
|
-
}, M = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : j(
|
|
76
|
+
}, M = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : j(T(e), T(t)), N = {}, P = (e) => {
|
|
77
77
|
let t = N[e];
|
|
78
78
|
return t || (t = document.createElement("template"), t.innerHTML = e, N[e] = t), t;
|
|
79
79
|
}, F = (e, t, n) => {
|
|
@@ -84,8 +84,8 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
84
84
|
}, I = !1, L = (e) => "touches" in e, R = (e) => I && !L(e) ? !1 : (I ||= L(e), !0), z = (e, t) => {
|
|
85
85
|
let n = L(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
86
86
|
F(e.el, "move", e.getMove({
|
|
87
|
-
x:
|
|
88
|
-
y:
|
|
87
|
+
x: C((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
88
|
+
y: C((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
89
89
|
}));
|
|
90
90
|
}, B = (e, t) => {
|
|
91
91
|
let n = t.keyCode;
|
|
@@ -142,10 +142,10 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
142
142
|
v: 100,
|
|
143
143
|
a: 1
|
|
144
144
|
})
|
|
145
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
145
|
+
}]), this.el.setAttribute("aria-valuenow", `${w(e)}`);
|
|
146
146
|
}
|
|
147
147
|
getMove(e, t) {
|
|
148
|
-
return { h: t ?
|
|
148
|
+
return { h: t ? C(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
149
149
|
}
|
|
150
150
|
}, U = class extends V {
|
|
151
151
|
constructor(e) {
|
|
@@ -161,12 +161,12 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
161
161
|
s: 100,
|
|
162
162
|
v: 100,
|
|
163
163
|
a: 1
|
|
164
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
164
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${w(e.s)}%, Brightness ${w(e.v)}%`);
|
|
165
165
|
}
|
|
166
166
|
getMove(e, t) {
|
|
167
167
|
return {
|
|
168
|
-
s: t ?
|
|
169
|
-
v: t ?
|
|
168
|
+
s: t ? C(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
169
|
+
v: t ? C(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
}, W = ":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)}", G = "[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}", K = "[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}", q = Symbol("same"), J = Symbol("color"), Y = Symbol("hsva"), X = Symbol("update"), Z = Symbol("parts"), Q = Symbol("css"), $ = Symbol("sliders"), se = class extends HTMLElement {
|
|
@@ -224,8 +224,8 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
224
224
|
}
|
|
225
225
|
}, ce = {
|
|
226
226
|
defaultColor: "#000",
|
|
227
|
-
toHsva:
|
|
228
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
227
|
+
toHsva: ie,
|
|
228
|
+
fromHsva: ({ h: e, s: t, v: n }) => E({
|
|
229
229
|
h: e,
|
|
230
230
|
s: t,
|
|
231
231
|
v: n,
|
|
@@ -250,11 +250,11 @@ var ue = [
|
|
|
250
250
|
"placeholder",
|
|
251
251
|
"disabled",
|
|
252
252
|
"aria-label"
|
|
253
|
-
], fe = ["color", "aria-label"], pe = /* @__PURE__ */
|
|
253
|
+
], fe = ["color", "aria-label"], pe = /* @__PURE__ */ v({
|
|
254
254
|
__name: "ColorPicker",
|
|
255
255
|
props: {
|
|
256
256
|
modelValue: {},
|
|
257
|
-
placeholder: { default:
|
|
257
|
+
placeholder: { default: b },
|
|
258
258
|
size: { default: "default" },
|
|
259
259
|
swatchOnly: {
|
|
260
260
|
type: Boolean,
|
|
@@ -266,51 +266,51 @@ var ue = [
|
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
emits: ["update:modelValue"],
|
|
269
|
-
setup(
|
|
270
|
-
let
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}, { ignore: [
|
|
274
|
-
let
|
|
275
|
-
get: () =>
|
|
276
|
-
set: (e) =>
|
|
269
|
+
setup(e, { emit: t }) {
|
|
270
|
+
let r = e, d = t, { t: g } = te(), _ = a(!1), v = a(), y = a();
|
|
271
|
+
ne(v, () => {
|
|
272
|
+
_.value = !1;
|
|
273
|
+
}, { ignore: [y] });
|
|
274
|
+
let b = c({
|
|
275
|
+
get: () => r.modelValue || "#000000",
|
|
276
|
+
set: (e) => d("update:modelValue", e)
|
|
277
277
|
});
|
|
278
|
-
function
|
|
279
|
-
|
|
278
|
+
function x(e) {
|
|
279
|
+
b.value = e.detail.value;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
281
|
+
function S(e) {
|
|
282
|
+
b.value = e.target.value;
|
|
283
283
|
}
|
|
284
|
-
return (
|
|
285
|
-
|
|
284
|
+
return (t, r) => (n(), l("div", { class: o(["tpl:flex tpl:gap-2 tpl:relative", e.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
285
|
+
m("button", {
|
|
286
286
|
ref_key: "swatchRef",
|
|
287
|
-
ref:
|
|
287
|
+
ref: y,
|
|
288
288
|
type: "button",
|
|
289
|
-
disabled:
|
|
290
|
-
"aria-label":
|
|
291
|
-
"aria-expanded":
|
|
292
|
-
class:
|
|
289
|
+
disabled: e.disabled,
|
|
290
|
+
"aria-label": h(g).colorPicker.pickColor,
|
|
291
|
+
"aria-expanded": _.value,
|
|
292
|
+
class: o([
|
|
293
293
|
"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)]",
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
e.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
295
|
+
_.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !e.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
296
|
+
e.size === "large" ? "tpl:size-12" : "tpl:size-10"
|
|
297
297
|
]),
|
|
298
|
-
onClick: r[0] ||= (
|
|
299
|
-
}, [
|
|
298
|
+
onClick: r[0] ||= (t) => !e.disabled && (_.value = !_.value)
|
|
299
|
+
}, [m("span", {
|
|
300
300
|
class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
|
|
301
|
-
style:
|
|
301
|
+
style: p({ backgroundColor: b.value })
|
|
302
302
|
}, null, 4)], 10, ue),
|
|
303
|
-
|
|
303
|
+
e.swatchOnly ? u("", !0) : (n(), l("input", {
|
|
304
304
|
key: 0,
|
|
305
305
|
type: "text",
|
|
306
|
-
class:
|
|
307
|
-
value:
|
|
308
|
-
placeholder:
|
|
309
|
-
disabled:
|
|
310
|
-
"aria-label":
|
|
311
|
-
onInput:
|
|
306
|
+
class: o(h(re)),
|
|
307
|
+
value: e.modelValue,
|
|
308
|
+
placeholder: e.placeholder,
|
|
309
|
+
disabled: e.disabled,
|
|
310
|
+
"aria-label": h(g).colorPicker.hexValue,
|
|
311
|
+
onInput: S
|
|
312
312
|
}, null, 42, de)),
|
|
313
|
-
|
|
313
|
+
ee(f, {
|
|
314
314
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
315
315
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
316
316
|
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
@@ -318,17 +318,17 @@ var ue = [
|
|
|
318
318
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
319
319
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
320
320
|
}, {
|
|
321
|
-
default:
|
|
321
|
+
default: i(() => [_.value ? (n(), l("div", {
|
|
322
322
|
key: 0,
|
|
323
323
|
ref_key: "popoverRef",
|
|
324
|
-
ref:
|
|
324
|
+
ref: v,
|
|
325
325
|
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"
|
|
326
|
-
}, [
|
|
327
|
-
color:
|
|
328
|
-
"aria-label":
|
|
329
|
-
onColorChanged:
|
|
330
|
-
onKeydown: r[1] ||=
|
|
331
|
-
}, null, 40, fe)], 512)) :
|
|
326
|
+
}, [m("hex-color-picker", {
|
|
327
|
+
color: b.value,
|
|
328
|
+
"aria-label": h(g).colorPicker.pickColor,
|
|
329
|
+
onColorChanged: x,
|
|
330
|
+
onKeydown: r[1] ||= s((e) => _.value = !1, ["escape"])
|
|
331
|
+
}, null, 40, fe)], 512)) : u("", !0)]),
|
|
332
332
|
_: 1
|
|
333
333
|
})
|
|
334
334
|
], 2));
|
|
@@ -338,65 +338,65 @@ var ue = [
|
|
|
338
338
|
"aria-label",
|
|
339
339
|
"title",
|
|
340
340
|
"onClick"
|
|
341
|
-
], he = { key: 1 }, ge = /* @__PURE__ */
|
|
341
|
+
], he = { key: 1 }, ge = /* @__PURE__ */ v({
|
|
342
342
|
__name: "SlidingPillSelect",
|
|
343
343
|
props: {
|
|
344
344
|
options: {},
|
|
345
345
|
modelValue: {}
|
|
346
346
|
},
|
|
347
347
|
emits: ["update:modelValue"],
|
|
348
|
-
setup(e, { emit:
|
|
349
|
-
let
|
|
350
|
-
return (
|
|
348
|
+
setup(e, { emit: i }) {
|
|
349
|
+
let a = e, o = i, s = c(() => a.options.findIndex((e) => e.value === a.modelValue)), f = c(() => `translateX(${Math.max(s.value, 0) * 100}%)`);
|
|
350
|
+
return (i, a) => (n(), l("div", {
|
|
351
351
|
role: "radiogroup",
|
|
352
352
|
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
353
|
-
style:
|
|
353
|
+
style: p({
|
|
354
354
|
gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
|
|
355
355
|
backgroundColor: "var(--tpl-bg-hover)"
|
|
356
356
|
})
|
|
357
|
-
}, [
|
|
357
|
+
}, [s.value >= 0 ? (n(), l("div", {
|
|
358
358
|
key: 0,
|
|
359
359
|
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
360
|
-
style:
|
|
360
|
+
style: p({
|
|
361
361
|
left: "4px",
|
|
362
362
|
width: `calc((100% - 8px) / ${e.options.length})`,
|
|
363
|
-
transform:
|
|
363
|
+
transform: f.value,
|
|
364
364
|
backgroundColor: "var(--tpl-bg)",
|
|
365
365
|
boxShadow: "var(--tpl-shadow)",
|
|
366
366
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
367
367
|
})
|
|
368
|
-
}, null, 4)) :
|
|
369
|
-
key:
|
|
368
|
+
}, null, 4)) : u("", !0), (n(!0), l(_, null, r(e.options, (r) => (n(), l("button", {
|
|
369
|
+
key: r.value,
|
|
370
370
|
role: "radio",
|
|
371
|
-
"aria-checked": e.modelValue ===
|
|
372
|
-
"aria-label":
|
|
371
|
+
"aria-checked": e.modelValue === r.value,
|
|
372
|
+
"aria-label": r.label,
|
|
373
373
|
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",
|
|
374
|
-
style:
|
|
375
|
-
color: e.modelValue ===
|
|
374
|
+
style: p({
|
|
375
|
+
color: e.modelValue === r.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
376
376
|
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
377
377
|
}),
|
|
378
|
-
title:
|
|
379
|
-
onClick: (e) => o("update:modelValue",
|
|
380
|
-
}, [
|
|
378
|
+
title: r.label,
|
|
379
|
+
onClick: (e) => o("update:modelValue", r.value)
|
|
380
|
+
}, [r.icon ? (n(), d(t(r.icon), {
|
|
381
381
|
key: 0,
|
|
382
382
|
size: 14,
|
|
383
383
|
"stroke-width": 2
|
|
384
|
-
})) : (
|
|
384
|
+
})) : (n(), l("span", he, g(r.label), 1))], 12, me))), 128))], 4));
|
|
385
385
|
}
|
|
386
|
-
}), _e = { class: "tpl:mb-3.5" }, ve = /* @__PURE__ */
|
|
386
|
+
}), _e = { class: "tpl:mb-3.5" }, ve = /* @__PURE__ */ v({
|
|
387
387
|
__name: "FieldRow",
|
|
388
388
|
props: { label: {} },
|
|
389
|
-
setup(
|
|
390
|
-
return (
|
|
389
|
+
setup(t) {
|
|
390
|
+
return (r, i) => (n(), l("div", _e, [t.label ? (n(), l("label", {
|
|
391
391
|
key: 0,
|
|
392
|
-
class:
|
|
393
|
-
},
|
|
392
|
+
class: o(h(y))
|
|
393
|
+
}, g(t.label), 3)) : u("", !0), e(r.$slots, "default")]));
|
|
394
394
|
}
|
|
395
395
|
}), ye = { class: "tpl:flex tpl:items-stretch" }, be = [
|
|
396
396
|
"value",
|
|
397
397
|
"min",
|
|
398
398
|
"max"
|
|
399
|
-
], xe = /* @__PURE__ */
|
|
399
|
+
], xe = /* @__PURE__ */ v({
|
|
400
400
|
__name: "NumberWithSuffix",
|
|
401
401
|
props: {
|
|
402
402
|
modelValue: {},
|
|
@@ -406,18 +406,18 @@ var ue = [
|
|
|
406
406
|
},
|
|
407
407
|
emits: ["update:modelValue"],
|
|
408
408
|
setup(e, { emit: t }) {
|
|
409
|
-
let
|
|
410
|
-
return (t,
|
|
409
|
+
let r = t;
|
|
410
|
+
return (t, i) => (n(), l("div", ye, [m("input", {
|
|
411
411
|
type: "number",
|
|
412
|
-
class:
|
|
412
|
+
class: o(h(S)),
|
|
413
413
|
value: e.modelValue,
|
|
414
414
|
min: e.min,
|
|
415
415
|
max: e.max,
|
|
416
|
-
onInput:
|
|
417
|
-
}, null, 42, be),
|
|
416
|
+
onInput: i[0] ||= (e) => r("update:modelValue", Number(e.target.value))
|
|
417
|
+
}, null, 42, be), m("span", { class: o(h(x)) }, g(e.suffix), 3)]));
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
//#endregion
|
|
421
421
|
export { pe as i, ve as n, ge as r, xe as t };
|
|
422
422
|
|
|
423
|
-
//# sourceMappingURL=NumberWithSuffix-
|
|
423
|
+
//# sourceMappingURL=NumberWithSuffix-BSOUOUCL.js.map
|