@templatical/editor 0.11.1 → 0.12.1
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-Cm5RM5Qh.js → AiChatSidebar-CXH7l1Ar.js} +13 -13
- package/dist/{AiFeatureMenu-DBWcfcWl.js → AiFeatureMenu-BKbUUc1D.js} +10 -10
- package/dist/{BlockIssueBadge-BF4sdsr4.js → BlockIssueBadge-C-EPqWsh.js} +5 -5
- package/dist/{CloudEditor-C6cSXtcP.js → CloudEditor-CB16QzKM.js} +60 -60
- package/dist/{CollaboratorBar-B8-AQfG2.js → CollaboratorBar-ACUA7lBJ.js} +4 -4
- package/dist/{CommentsSidebar-BQJzyCc6.js → CommentsSidebar-CpRLN40c.js} +19 -19
- package/dist/{CountdownBlock-D_AsF4F3.js → CountdownBlock-C-6o19qS.js} +3 -3
- package/dist/{CountdownToolbar-BGTkFky9.js → CountdownToolbar-Dol7Q0Pv.js} +3 -3
- package/dist/{DesignReferenceSidebar-O3epZMXD.js → DesignReferenceSidebar-0dTsBW08.js} +9 -9
- package/dist/{IssuesPanel-CPBbR8yp.js → IssuesPanel-I0z6k6-H.js} +11 -11
- package/dist/{LoadingTrack-e67FA0NP.js → LoadingTrack-C7mGWPHS.js} +1 -1
- package/dist/{ModuleBrowserModal-B_tLzFAk.js → ModuleBrowserModal-Bz9hSjMS.js} +10 -10
- package/dist/{ModulePreviewCanvas-B7pNpAHM.js → ModulePreviewCanvas-CpaumPMS.js} +23 -23
- package/dist/{NumberWithSuffix-eI9pPDWT.js → NumberWithSuffix-Bp40ik4l.js} +101 -79
- package/dist/{ParagraphEditor-DmA9K7dx.js → ParagraphEditor-BqRFV_Y-.js} +47 -47
- package/dist/{RichTextEditorContent-Dvn4woIt.js → RichTextEditorContent-Q5altsx1.js} +6 -6
- package/dist/{SaveModuleDialog-B8ypoxdj.js → SaveModuleDialog-DmfvH5D0.js} +7 -7
- package/dist/{SnapshotHistory-BTHd7CVP.js → SnapshotHistory-C052o-8U.js} +13 -13
- package/dist/{TemplateScoringPanel-Bt5Rsgen.js → TemplateScoringPanel-CUs8XmIi.js} +24 -24
- package/dist/{TestEmailModal-CBIFMzK6.js → TestEmailModal-BIIxRWUt.js} +5 -5
- package/dist/{TitleEditor-C9jDA5lI.js → TitleEditor-FMh54Cx5.js} +18 -18
- package/dist/{TplModal-ND4fiqOS.js → TplModal-utMtXzSO.js} +4 -4
- package/dist/{blockTypeIcons-Bn-_Smlm.js → blockTypeIcons-C6UGDmrC.js} +5 -5
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BuSO0dXP.js → AiFeatureMenu-4NhCFeTh.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BuSO0dXP.js.map → AiFeatureMenu-4NhCFeTh.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-sv3IZ1Pb.js → BlockIssueBadge-BYKThwhE.js} +6 -6
- package/dist/cdn/chunks/{BlockIssueBadge-sv3IZ1Pb.js.map → BlockIssueBadge-BYKThwhE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-hxoqsTsq.js → CloudEditor-DSeihOan.js} +162 -162
- package/dist/cdn/chunks/{CloudEditor-hxoqsTsq.js.map → CloudEditor-DSeihOan.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DFqsaNX0.js → CollaboratorBar-Dn5gXNDt.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DFqsaNX0.js.map → CollaboratorBar-Dn5gXNDt.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-PpH3fxAX.js → CountdownBlock-hYoJdVOt.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-PpH3fxAX.js.map → CountdownBlock-hYoJdVOt.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CZN92Bhz.js → CountdownToolbar-BQn0Kj0X.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CZN92Bhz.js.map → CountdownToolbar-BQn0Kj0X.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-wQjrnuyc.js → IssuesPanel-_5fEnivU.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-wQjrnuyc.js.map → IssuesPanel-_5fEnivU.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-348wCgft.js → ModuleBrowserModal-DtCksAeW.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-348wCgft.js.map → ModuleBrowserModal-DtCksAeW.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cf6DUHml.js → ModulePreviewCanvas-CCOvabZd.js} +33 -33
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cf6DUHml.js.map → ModulePreviewCanvas-CCOvabZd.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Deo8EOSz.js → NumberWithSuffix-cdWjAK6y.js} +140 -119
- package/dist/cdn/chunks/NumberWithSuffix-cdWjAK6y.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-Cbl_gBYM.js → ParagraphEditor-BnhnFOW1.js} +67 -67
- package/dist/cdn/chunks/{ParagraphEditor-Cbl_gBYM.js.map → ParagraphEditor-BnhnFOW1.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-TBPzn3RC.js → RichTextEditorContent-DV2yknp8.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-TBPzn3RC.js.map → RichTextEditorContent-DV2yknp8.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CxdYMutK.js → SaveModuleDialog-CCX5U7VA.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-CxdYMutK.js.map → SaveModuleDialog-CCX5U7VA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor--XulEf7R.js → TitleEditor-CQqklX0D.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor--XulEf7R.js.map → TitleEditor-CQqklX0D.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BJND4L-A.js.map → blockTypeIcons-CpGPHppB.js.map} +1 -1
- package/dist/{de-BJMLpg_p.js → cdn/chunks/de-BpseTWOA.js} +12 -2
- package/dist/cdn/chunks/de-BpseTWOA.js.map +1 -0
- package/dist/cdn/chunks/{draggable-iAb7QVJo.js → draggable-Bci-fq8y.js} +473 -465
- package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +1 -0
- package/dist/{en-DFMMw7SL.js → cdn/chunks/en-VGIQ0WNq.js} +12 -2
- package/dist/cdn/chunks/en-VGIQ0WNq.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BtWoLy6E.js → extensions-Ds9GnMcd.js} +25 -25
- package/dist/cdn/chunks/{extensions-BtWoLy6E.js.map → extensions-Ds9GnMcd.js.map} +1 -1
- package/dist/cdn/chunks/{features-mO5NzwnN.js → features-DxWz_Enw.js} +1048 -1059
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +1 -0
- package/dist/cdn/chunks/{icons-CuXm6XAT.js → icons-BflGUmFY.js} +146 -146
- package/dist/cdn/chunks/icons-BflGUmFY.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DUDc3U21.js → liquid.browser-DKKBzRQu.js} +502 -497
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -0
- package/dist/cdn/chunks/{media-library-BtNzYUTi.js → media-library-C479-QcE.js} +565 -565
- package/dist/cdn/chunks/{media-library-BtNzYUTi.js.map → media-library-C479-QcE.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-C-9aWLlR.js → pt-BR-zAqpLQbW.js} +11 -3
- package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +1 -0
- package/dist/cdn/chunks/{pusher-CHo5Cua0.js → pusher-BICWUP2j.js} +3 -3
- package/dist/cdn/chunks/{pusher-CHo5Cua0.js.map → pusher-BICWUP2j.js.map} +1 -1
- package/dist/cdn/chunks/{quality-YKe19zp8.js → quality-BL_pEvFP.js} +101 -101
- package/dist/cdn/chunks/{quality-YKe19zp8.js.map → quality-BL_pEvFP.js.map} +1 -1
- package/dist/cdn/chunks/readableTextColor-f8Kykfnh.js.map +1 -1
- package/dist/cdn/chunks/{renderer-BcOaxCs6.js → renderer-C0vdAODQ.js} +53 -50
- package/dist/cdn/chunks/renderer-C0vdAODQ.js.map +1 -0
- package/dist/cdn/chunks/{src-B_ZRmuit.js → src-DzvOWQ9S.js} +11 -11
- package/dist/cdn/chunks/{src-B_ZRmuit.js.map → src-DzvOWQ9S.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DDBCCJ-l.js → styles-LfeoSNRA.js} +673 -599
- package/dist/cdn/chunks/styles-LfeoSNRA.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BAwu9VcJ.js → tiptap-CwScfbsM.js} +5 -4
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +36 -36
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BsNM6BDs.js → check-BRzXxFHr.js} +1 -1
- package/dist/{chevron-down-fcsZ5DU7.js → chevron-down-DmEgzmYT.js} +1 -1
- package/dist/{circle-alert-BZTbwc-B.js → circle-alert-BStvZr3O.js} +1 -1
- package/dist/{clock-B7iQRubC.js → clock-Blwp_1R6.js} +1 -1
- package/dist/{cloud-Dom4EH5Z.js → cloud-_olro76D.js} +6 -6
- package/dist/{createLucideIcon-C_fetdGM.js → createLucideIcon-CmPAC-gt.js} +3 -3
- package/dist/{cdn/chunks/de-BJMLpg_p.js → de-BpseTWOA.js} +10 -4
- package/dist/{dist-ByBVNmRN.js → dist-412xXefB.js} +1 -1
- package/dist/{dist-XdF11ZkX.js → dist-BCQZZUE9.js} +1 -1
- package/dist/{dist-CD3wbUoR.js → dist-BNEdeWub.js} +1 -1
- package/dist/dist-BctFrpeA.js +472 -0
- package/dist/{dist-eVlXvuKI.js → dist-BlG7k25W.js} +1 -1
- package/dist/{dist-BLcYl_de.js → dist-BwgjpLfr.js} +1 -1
- package/dist/{dist-Dhs3W2WW.js → dist-Cz79qrLL.js} +1 -1
- package/dist/{dist-c2sj5PQ5.js → dist-D6x1cQeh.js} +3 -3
- package/dist/{dist-cT52Hh9L.js → dist-DJ9aD8yA.js} +3 -3
- package/dist/{dist-Cwl7XXr4.js → dist-DULfKmTh.js} +3 -3
- package/dist/{dist-Dem8ODLh.js → dist-DhKTdU52.js} +3 -2
- package/dist/{dist-BOHAk4zI.js → dist-b7Ak-CuM.js} +1 -1
- package/dist/{dist-B4NkMBYc.js → dist-o73iaGqy.js} +1 -1
- package/dist/{dist-BsB4nPJD.js → dist-u0iIJH3V.js} +1 -1
- package/dist/{cdn/chunks/en-DFMMw7SL.js → en-VGIQ0WNq.js} +10 -4
- package/dist/{extensions-B2lSGCA8.js → extensions-XPlNAKIL.js} +23 -23
- package/dist/formatRelativeTime-CtUU-QZ8.js +10 -0
- package/dist/{image-up-1xrPPJYH.js → image-up-BFPbw_Zq.js} +1 -1
- package/dist/{info-ByAFxArD.js → info-B_qLEBN2.js} +1 -1
- package/dist/{keys-DsRdOmg3.js → keys-mFiJ5N0_.js} +1 -1
- package/dist/{liquid.browser--qtl1Fqy.js → liquid.browser-CVjP5Mex.js} +501 -496
- package/dist/{list-checks-CKUP4UZU.js → list-checks-CGg7JxPm.js} +1 -1
- package/dist/{loader-circle-BuxX338d.js → loader-circle-CDF8eR_Q.js} +1 -1
- package/dist/{message-circle-nLwqegRi.js → message-circle-C3cHsCJl.js} +1 -1
- package/dist/{pt-BR-C-9aWLlR.js → pt-BR-zAqpLQbW.js} +10 -2
- package/dist/{refresh-cw-DAkD6iDI.js → refresh-cw-Butml7Q4.js} +1 -1
- package/dist/{scan-line-DEELRJJ5.js → scan-line-XYEqim_E.js} +1 -1
- package/dist/{send-DCMgrNT4.js → send-k7npFJNO.js} +1 -1
- package/dist/{shield-check-BFtVr_ov.js → shield-check-CV6GbmCu.js} +1 -1
- package/dist/{sparkles-CeYIQ5RJ.js → sparkles-C965Xop4.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DZcQGzsN.js → styles-DSm9Ijxt.js} +898 -824
- package/dist/templatical-editor.js +14 -14
- package/dist/{text-align-start-BsmIoqLS.js → text-align-start-Bxnps8fH.js} +1 -1
- package/dist/{trash-2-C2S4-CIH.js → trash-2-DpGb7fIt.js} +1 -1
- package/dist/{triangle-alert-DMdedF6W.js → triangle-alert-BKYElAwz.js} +1 -1
- package/dist/{useAliveFlag-DlVvpZxc.js → useAliveFlag-BinvbqQR.js} +1 -1
- package/dist/{useCloudI18n-BEuiZdzs.js → useCloudI18n-L3H2XvdW.js} +2 -2
- package/dist/{useEditorCore-D00QzW07.js → useEditorCore-D7dQFRkw.js} +406 -486
- package/dist/{useI18n-DNspT6uw.js → useI18n-CTs_bP9d.js} +2 -2
- package/dist/{useMergeTag-abutjUud.js → useMergeTag-e3RSY-s3.js} +6 -6
- package/dist/usePopoverRoot-DVh7NY1q.js +8 -0
- package/dist/{vue.runtime.esm-bundler-mPytWZFh.js → vue.runtime.esm-bundler-B2k01iQh.js} +345 -337
- package/dist/{x-_9jw816B.js → x-CGjkjdKK.js} +1 -1
- package/package.json +10 -10
- package/dist/cdn/chunks/NumberWithSuffix-Deo8EOSz.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BJND4L-A.js +0 -22
- package/dist/cdn/chunks/de-BJMLpg_p.js.map +0 -1
- package/dist/cdn/chunks/draggable-iAb7QVJo.js.map +0 -1
- package/dist/cdn/chunks/en-DFMMw7SL.js.map +0 -1
- package/dist/cdn/chunks/features-mO5NzwnN.js.map +0 -1
- package/dist/cdn/chunks/icons-CuXm6XAT.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DUDc3U21.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-C-9aWLlR.js.map +0 -1
- package/dist/cdn/chunks/renderer-BcOaxCs6.js.map +0 -1
- package/dist/cdn/chunks/styles-DDBCCJ-l.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +0 -1
- package/dist/dist-D6L_WdRL.js +0 -403
- package/dist/formatRelativeTime-CyDg5cDD.js +0 -12
- package/dist/usePopoverRoot-DG3mlvd1.js +0 -8
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { F as e, L as t, M as n, P as r, V as i, Z as a, c as o, ct as s, f as c, g as l, h as u, it as d, m as f, n as p, ot as m, p as h, st as g, u as _, x as v, y } from "./draggable-
|
|
2
|
-
import {
|
|
3
|
-
import { h as b,
|
|
1
|
+
import { F as e, L as t, M as n, P as r, V as i, Z as a, c as o, ct as s, f as c, g as l, h as u, it as d, m as f, n as p, ot as m, p as h, st as g, u as _, x as v, y } from "./draggable-Bci-fq8y.js";
|
|
2
|
+
import { Ft as ee, at as te, on as ne } from "./features-DxWz_Enw.js";
|
|
3
|
+
import { h as b, m as x, p as S, u as re } from "./styleConstants-lGobwiLH.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 T = (e) => ae(E(e)), E = (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
|
+
}), D = (e) => ie(A(e)), O = ({ 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
|
-
},
|
|
26
|
-
let { h: t, s: n, l: r } =
|
|
25
|
+
}, k = (e) => {
|
|
26
|
+
let { h: t, s: n, l: r } = O(e);
|
|
27
27
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
28
|
-
},
|
|
28
|
+
}, A = ({ 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,62 +53,62 @@ 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
|
+
}, j = (e) => {
|
|
59
59
|
let t = e.toString(16);
|
|
60
60
|
return t.length < 2 ? "0" + t : t;
|
|
61
|
+
}, ie = ({ r: e, g: t, b: n, a: r }) => {
|
|
62
|
+
let i = r < 1 ? j(w(r * 255)) : "";
|
|
63
|
+
return "#" + j(e) + j(t) + j(n) + i;
|
|
61
64
|
}, ae = ({ r: e, g: t, b: n, a: r }) => {
|
|
62
|
-
let i = r < 1 ? A(T(r * 255)) : "";
|
|
63
|
-
return "#" + A(e) + A(t) + A(n) + i;
|
|
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
|
+
}, M = (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
|
-
},
|
|
77
|
-
let t =
|
|
78
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
79
|
-
},
|
|
76
|
+
}, N = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : M(E(e), E(t)), P = {}, F = (e) => {
|
|
77
|
+
let t = P[e];
|
|
78
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, P[e] = t), t;
|
|
79
|
+
}, I = (e, t, n) => {
|
|
80
80
|
e.dispatchEvent(new CustomEvent(t, {
|
|
81
81
|
bubbles: !0,
|
|
82
82
|
detail: n
|
|
83
83
|
}));
|
|
84
|
-
},
|
|
85
|
-
let n =
|
|
86
|
-
|
|
87
|
-
x:
|
|
88
|
-
y:
|
|
84
|
+
}, L = !1, R = (e) => "touches" in e, oe = (e) => L && !R(e) ? !1 : (L ||= R(e), !0), z = (e, t) => {
|
|
85
|
+
let n = R(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
86
|
+
I(e.el, "move", e.getMove({
|
|
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
|
+
}, se = (e, t) => {
|
|
91
91
|
let n = t.keyCode;
|
|
92
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
92
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), I(e.el, "move", e.getMove({
|
|
93
93
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
94
94
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
95
95
|
}, !0)));
|
|
96
|
-
},
|
|
96
|
+
}, B = class {
|
|
97
97
|
constructor(e, t, n, r) {
|
|
98
|
-
let i =
|
|
98
|
+
let i = F(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
99
99
|
e.appendChild(i.content.cloneNode(!0));
|
|
100
100
|
let a = e.querySelector(`[part=${t}]`);
|
|
101
101
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
102
102
|
}
|
|
103
103
|
set dragging(e) {
|
|
104
104
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
105
|
-
t(
|
|
105
|
+
t(L ? "touchmove" : "mousemove", this), t(L ? "touchend" : "mouseup", this);
|
|
106
106
|
}
|
|
107
107
|
handleEvent(e) {
|
|
108
108
|
switch (e.type) {
|
|
109
109
|
case "mousedown":
|
|
110
110
|
case "touchstart":
|
|
111
|
-
if (e.preventDefault(), !
|
|
111
|
+
if (e.preventDefault(), !oe(e) || !L && e.button != 0) return;
|
|
112
112
|
this.el.focus(), z(this, e), this.dragging = !0;
|
|
113
113
|
break;
|
|
114
114
|
case "mousemove":
|
|
@@ -120,7 +120,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
120
120
|
this.dragging = !1;
|
|
121
121
|
break;
|
|
122
122
|
case "keydown":
|
|
123
|
-
|
|
123
|
+
se(this, e);
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -129,25 +129,25 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
129
129
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, V = class extends B {
|
|
133
133
|
constructor(e) {
|
|
134
134
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
135
135
|
}
|
|
136
136
|
update({ h: e }) {
|
|
137
137
|
this.h = e, this.style([{
|
|
138
138
|
left: `${e / 360 * 100}%`,
|
|
139
|
-
color:
|
|
139
|
+
color: k({
|
|
140
140
|
h: e,
|
|
141
141
|
s: 100,
|
|
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
|
+
}, H = class extends B {
|
|
151
151
|
constructor(e) {
|
|
152
152
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
153
153
|
}
|
|
@@ -155,47 +155,47 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
155
155
|
this.hsva = e, this.style([{
|
|
156
156
|
top: `${100 - e.v}%`,
|
|
157
157
|
left: `${e.s}%`,
|
|
158
|
-
color:
|
|
159
|
-
}, { "background-color":
|
|
158
|
+
color: k(e)
|
|
159
|
+
}, { "background-color": k({
|
|
160
160
|
h: e.h,
|
|
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
|
+
}, U = ":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)}", W = "[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}", G = "[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}", K = Symbol("same"), q = Symbol("color"), J = Symbol("hsva"), Y = Symbol("update"), X = Symbol("parts"), Z = Symbol("css"), Q = Symbol("sliders"), ce = class extends HTMLElement {
|
|
173
173
|
static get observedAttributes() {
|
|
174
174
|
return ["color"];
|
|
175
175
|
}
|
|
176
|
-
get [
|
|
176
|
+
get [Z]() {
|
|
177
177
|
return [
|
|
178
|
+
U,
|
|
178
179
|
W,
|
|
179
|
-
G
|
|
180
|
-
K
|
|
180
|
+
G
|
|
181
181
|
];
|
|
182
182
|
}
|
|
183
|
-
get [
|
|
184
|
-
return [
|
|
183
|
+
get [Q]() {
|
|
184
|
+
return [H, V];
|
|
185
185
|
}
|
|
186
186
|
get color() {
|
|
187
|
-
return this[
|
|
187
|
+
return this[q];
|
|
188
188
|
}
|
|
189
189
|
set color(e) {
|
|
190
|
-
if (!this[
|
|
190
|
+
if (!this[K](e)) {
|
|
191
191
|
let t = this.colorModel.toHsva(e);
|
|
192
|
-
this[
|
|
192
|
+
this[Y](t), this[q] = e;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
constructor() {
|
|
196
196
|
super();
|
|
197
|
-
let e =
|
|
198
|
-
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[
|
|
197
|
+
let e = F(`<style>${this[Z].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
198
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[X] = this[Q].map((e) => new e(t));
|
|
199
199
|
}
|
|
200
200
|
connectedCallback() {
|
|
201
201
|
if (this.hasOwnProperty("color")) {
|
|
@@ -205,57 +205,60 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
|
|
|
205
205
|
}
|
|
206
206
|
attributeChangedCallback(e, t, n) {
|
|
207
207
|
let r = this.colorModel.fromAttr(n);
|
|
208
|
-
this[
|
|
208
|
+
this[K](r) || (this.color = r);
|
|
209
209
|
}
|
|
210
210
|
handleEvent(e) {
|
|
211
|
-
let t = this[
|
|
211
|
+
let t = this[J], n = {
|
|
212
212
|
...t,
|
|
213
213
|
...e.detail
|
|
214
214
|
};
|
|
215
|
-
this[
|
|
215
|
+
this[Y](n);
|
|
216
216
|
let r;
|
|
217
|
-
!
|
|
217
|
+
!M(n, t) && !this[K](r = this.colorModel.fromHsva(n)) && (this[q] = r, I(this, "color-changed", { value: r }));
|
|
218
218
|
}
|
|
219
|
-
[
|
|
219
|
+
[K](e) {
|
|
220
220
|
return this.color && this.colorModel.equal(e, this.color);
|
|
221
221
|
}
|
|
222
|
-
[
|
|
223
|
-
this[
|
|
222
|
+
[Y](e) {
|
|
223
|
+
this[J] = e, this[X].forEach((t) => t.update(e));
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, le = {
|
|
226
226
|
defaultColor: "#000",
|
|
227
|
-
toHsva:
|
|
228
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
227
|
+
toHsva: T,
|
|
228
|
+
fromHsva: ({ h: e, s: t, v: n }) => D({
|
|
229
229
|
h: e,
|
|
230
230
|
s: t,
|
|
231
231
|
v: n,
|
|
232
232
|
a: 1
|
|
233
233
|
}),
|
|
234
|
-
equal:
|
|
234
|
+
equal: N,
|
|
235
235
|
fromAttr: (e) => e
|
|
236
|
-
},
|
|
236
|
+
}, ue = class extends ce {
|
|
237
237
|
get colorModel() {
|
|
238
|
-
return
|
|
238
|
+
return le;
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
customElements.define("hex-color-picker", class extends
|
|
241
|
+
customElements.define("hex-color-picker", class extends ue {});
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
244
|
-
var
|
|
244
|
+
var de = [
|
|
245
245
|
"disabled",
|
|
246
246
|
"aria-label",
|
|
247
247
|
"aria-expanded"
|
|
248
|
-
],
|
|
248
|
+
], fe = {
|
|
249
|
+
key: 0,
|
|
250
|
+
class: "tpl:relative tpl:flex-1"
|
|
251
|
+
}, pe = [
|
|
249
252
|
"value",
|
|
250
253
|
"placeholder",
|
|
251
254
|
"disabled",
|
|
252
255
|
"aria-label"
|
|
253
|
-
],
|
|
256
|
+
], me = ["aria-label", "title"], $ = ["color", "aria-label"], he = /* @__PURE__ */ v({
|
|
254
257
|
__name: "ColorPicker",
|
|
255
258
|
props: {
|
|
256
259
|
modelValue: {},
|
|
257
|
-
placeholder: { default:
|
|
258
|
-
|
|
260
|
+
placeholder: { default: "" },
|
|
261
|
+
seedColor: { default: "#ffffff" },
|
|
259
262
|
swatchOnly: {
|
|
260
263
|
type: Boolean,
|
|
261
264
|
default: !1
|
|
@@ -267,21 +270,27 @@ var ue = [
|
|
|
267
270
|
},
|
|
268
271
|
emits: ["update:modelValue"],
|
|
269
272
|
setup(e, { emit: t }) {
|
|
270
|
-
let r = e, s = t, { t: f } = ee(), _ = a(!1), v = a(), b = a();
|
|
271
|
-
|
|
273
|
+
let r = e, s = t, { t: f } = ee(), _ = a(!1), v = a(), b = a(), x = a(!1);
|
|
274
|
+
ne(v, () => {
|
|
272
275
|
_.value = !1;
|
|
273
276
|
}, { ignore: [b] });
|
|
274
|
-
let
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
function
|
|
279
|
-
x.value =
|
|
277
|
+
let S = c(() => !r.modelValue), C = c(() => r.modelValue || r.seedColor), w = c(() => !r.swatchOnly && !r.disabled && !S.value);
|
|
278
|
+
function T(e) {
|
|
279
|
+
x.value = !0, s("update:modelValue", e.detail.value);
|
|
280
|
+
}
|
|
281
|
+
function E() {
|
|
282
|
+
x.value = !1;
|
|
283
|
+
}
|
|
284
|
+
function D() {
|
|
285
|
+
!x.value && S.value && s("update:modelValue", C.value);
|
|
280
286
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
287
|
+
function O(e) {
|
|
288
|
+
s("update:modelValue", e.target.value);
|
|
283
289
|
}
|
|
284
|
-
|
|
290
|
+
function k() {
|
|
291
|
+
s("update:modelValue", "");
|
|
292
|
+
}
|
|
293
|
+
return (t, r) => (n(), l("div", { class: m(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", e.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
285
294
|
h("button", {
|
|
286
295
|
ref_key: "swatchRef",
|
|
287
296
|
ref: b,
|
|
@@ -293,23 +302,33 @@ var ue = [
|
|
|
293
302
|
"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
303
|
e.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
295
304
|
_.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !e.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
296
|
-
|
|
305
|
+
"tpl:size-10"
|
|
297
306
|
]),
|
|
298
307
|
onClick: r[0] ||= (t) => !e.disabled && (_.value = !_.value)
|
|
299
308
|
}, [h("span", {
|
|
300
|
-
class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
|
|
301
|
-
style: g({ backgroundColor:
|
|
302
|
-
}, null,
|
|
303
|
-
e.swatchOnly ? u("", !0) : (n(), l("input", {
|
|
304
|
-
key: 0,
|
|
309
|
+
class: m(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": S.value }]),
|
|
310
|
+
style: g(S.value ? void 0 : { backgroundColor: e.modelValue })
|
|
311
|
+
}, null, 6)], 10, de),
|
|
312
|
+
e.swatchOnly ? u("", !0) : (n(), l("div", fe, [h("input", {
|
|
305
313
|
type: "text",
|
|
306
|
-
class: m(d(
|
|
314
|
+
class: m([d(re), "tpl:w-full"]),
|
|
315
|
+
style: g(w.value ? { paddingRight: "2.25rem" } : void 0),
|
|
307
316
|
value: e.modelValue,
|
|
308
|
-
placeholder: e.placeholder,
|
|
317
|
+
placeholder: e.placeholder || d(f).colorPicker.notSet,
|
|
309
318
|
disabled: e.disabled,
|
|
310
319
|
"aria-label": d(f).colorPicker.hexValue,
|
|
311
|
-
onInput:
|
|
312
|
-
}, null,
|
|
320
|
+
onInput: O
|
|
321
|
+
}, null, 46, pe), w.value ? (n(), l("button", {
|
|
322
|
+
key: 0,
|
|
323
|
+
type: "button",
|
|
324
|
+
"aria-label": d(f).colorPicker.clear,
|
|
325
|
+
title: d(f).colorPicker.clear,
|
|
326
|
+
class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors 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)]",
|
|
327
|
+
onClick: k
|
|
328
|
+
}, [y(d(te), {
|
|
329
|
+
size: 14,
|
|
330
|
+
"stroke-width": 1.5
|
|
331
|
+
})], 8, me)) : u("", !0)])),
|
|
313
332
|
y(p, {
|
|
314
333
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
315
334
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
@@ -324,21 +343,23 @@ var ue = [
|
|
|
324
343
|
ref: v,
|
|
325
344
|
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
345
|
}, [h("hex-color-picker", {
|
|
327
|
-
color:
|
|
346
|
+
color: C.value,
|
|
328
347
|
"aria-label": d(f).colorPicker.pickColor,
|
|
329
|
-
onColorChanged:
|
|
348
|
+
onColorChanged: T,
|
|
349
|
+
onPointerdown: E,
|
|
350
|
+
onPointerup: D,
|
|
330
351
|
onKeydown: r[1] ||= o((e) => _.value = !1, ["escape"])
|
|
331
|
-
}, null, 40,
|
|
352
|
+
}, null, 40, $)], 512)) : u("", !0)]),
|
|
332
353
|
_: 1
|
|
333
354
|
})
|
|
334
355
|
], 2));
|
|
335
356
|
}
|
|
336
|
-
}),
|
|
357
|
+
}), ge = [
|
|
337
358
|
"aria-checked",
|
|
338
359
|
"aria-label",
|
|
339
360
|
"title",
|
|
340
361
|
"onClick"
|
|
341
|
-
],
|
|
362
|
+
], _e = { key: 1 }, ve = /* @__PURE__ */ v({
|
|
342
363
|
__name: "SlidingPillSelect",
|
|
343
364
|
props: {
|
|
344
365
|
options: {},
|
|
@@ -381,22 +402,22 @@ var ue = [
|
|
|
381
402
|
key: 0,
|
|
382
403
|
size: 14,
|
|
383
404
|
"stroke-width": 2
|
|
384
|
-
})) : (n(), l("span",
|
|
405
|
+
})) : (n(), l("span", _e, s(r.label), 1))], 12, ge))), 128))], 4));
|
|
385
406
|
}
|
|
386
|
-
}),
|
|
407
|
+
}), ye = { class: "tpl:mb-3.5" }, be = /* @__PURE__ */ v({
|
|
387
408
|
__name: "FieldRow",
|
|
388
409
|
props: { label: {} },
|
|
389
410
|
setup(t) {
|
|
390
|
-
return (r, i) => (n(), l("div",
|
|
411
|
+
return (r, i) => (n(), l("div", ye, [t.label ? (n(), l("label", {
|
|
391
412
|
key: 0,
|
|
392
413
|
class: m(d(b))
|
|
393
414
|
}, s(t.label), 3)) : u("", !0), e(r.$slots, "default")]));
|
|
394
415
|
}
|
|
395
|
-
}),
|
|
416
|
+
}), xe = { class: "tpl:flex tpl:items-stretch" }, Se = [
|
|
396
417
|
"value",
|
|
397
418
|
"min",
|
|
398
419
|
"max"
|
|
399
|
-
],
|
|
420
|
+
], Ce = /* @__PURE__ */ v({
|
|
400
421
|
__name: "NumberWithSuffix",
|
|
401
422
|
props: {
|
|
402
423
|
modelValue: {},
|
|
@@ -407,17 +428,17 @@ var ue = [
|
|
|
407
428
|
emits: ["update:modelValue"],
|
|
408
429
|
setup(e, { emit: t }) {
|
|
409
430
|
let r = t;
|
|
410
|
-
return (t, i) => (n(), l("div",
|
|
431
|
+
return (t, i) => (n(), l("div", xe, [h("input", {
|
|
411
432
|
type: "number",
|
|
412
|
-
class: m(d(
|
|
433
|
+
class: m(d(S)),
|
|
413
434
|
value: e.modelValue,
|
|
414
435
|
min: e.min,
|
|
415
436
|
max: e.max,
|
|
416
437
|
onInput: i[0] ||= (e) => r("update:modelValue", Number(e.target.value))
|
|
417
|
-
}, null, 42,
|
|
438
|
+
}, null, 42, Se), h("span", { class: m(d(x)) }, s(e.suffix), 3)]));
|
|
418
439
|
}
|
|
419
440
|
});
|
|
420
441
|
//#endregion
|
|
421
|
-
export {
|
|
442
|
+
export { he as i, be as n, ve as r, Ce as t };
|
|
422
443
|
|
|
423
|
-
//# sourceMappingURL=NumberWithSuffix-
|
|
444
|
+
//# sourceMappingURL=NumberWithSuffix-cdWjAK6y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberWithSuffix-cdWjAK6y.js","names":["css","hueCss","saturationCss"],"sources":["../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/convert.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/compare.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/dom.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/slider.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/hue.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/saturation.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/color-picker.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/hue.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/styles/saturation.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/components/color-picker.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js","../../../../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/hex-color-picker.js","../../../src/components/ColorPicker.vue","../../../src/components/ColorPicker.vue","../../../src/components/SlidingPillSelect.vue","../../../src/components/SlidingPillSelect.vue","../../../src/components/toolbar/FieldRow.vue","../../../src/components/toolbar/FieldRow.vue","../../../src/components/toolbar/NumberWithSuffix.vue","../../../src/components/toolbar/NumberWithSuffix.vue"],"sourcesContent":["// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number, min = 0, max = 1) => {\n return number > max ? max : number < min ? min : number;\n};\nexport const round = (number, digits = 0, base = Math.pow(10, digits)) => {\n return Math.round(base * number) / base;\n};\n//# sourceMappingURL=math.js.map","import { round } from './math.js';\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2)\n};\nexport const hexToHsva = (hex) => rgbaToHsva(hexToRgba(hex));\nexport const hexToRgba = (hex) => {\n if (hex[0] === '#')\n hex = hex.substring(1);\n if (hex.length < 6) {\n return {\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1\n };\n }\n return {\n r: parseInt(hex.substring(0, 2), 16),\n g: parseInt(hex.substring(2, 4), 16),\n b: parseInt(hex.substring(4, 6), 16),\n a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1\n };\n};\nexport const parseHue = (value, unit = 'deg') => {\n return Number(value) * (angleUnits[unit] || 1);\n};\nexport const hslaStringToHsva = (hslString) => {\n const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hslString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport const hslStringToHsva = hslaStringToHsva;\nexport const hslaToHsva = ({ h, s, l, a }) => {\n s *= (l < 50 ? l : 100 - l) / 100;\n return {\n h: h,\n s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n v: l + s,\n a\n };\n};\nexport const hsvaToHex = (hsva) => rgbaToHex(hsvaToRgba(hsva));\nexport const hsvaToHsla = ({ h, s, v, a }) => {\n const hh = ((200 - s) * v) / 100;\n return {\n h: round(h),\n s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: round(hh / 2),\n a: round(a, 2)\n };\n};\nexport const hsvaToHsvString = (hsva) => {\n const { h, s, v } = roundHsva(hsva);\n return `hsv(${h}, ${s}%, ${v}%)`;\n};\nexport const hsvaToHsvaString = (hsva) => {\n const { h, s, v, a } = roundHsva(hsva);\n return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\nexport const hsvaToHslString = (hsva) => {\n const { h, s, l } = hsvaToHsla(hsva);\n return `hsl(${h}, ${s}%, ${l}%)`;\n};\nexport const hsvaToHslaString = (hsva) => {\n const { h, s, l, a } = hsvaToHsla(hsva);\n return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\nexport const hsvaToRgba = ({ h, s, v, a }) => {\n h = (h / 360) * 6;\n s = s / 100;\n v = v / 100;\n const hh = Math.floor(h), b = v * (1 - s), c = v * (1 - (h - hh) * s), d = v * (1 - (1 - h + hh) * s), module = hh % 6;\n return {\n r: round([v, c, b, b, d, v][module] * 255),\n g: round([d, v, v, c, b, b][module] * 255),\n b: round([b, b, d, v, v, c][module] * 255),\n a: round(a, 2)\n };\n};\nexport const hsvaToRgbString = (hsva) => {\n const { r, g, b } = hsvaToRgba(hsva);\n return `rgb(${r}, ${g}, ${b})`;\n};\nexport const hsvaToRgbaString = (hsva) => {\n const { r, g, b, a } = hsvaToRgba(hsva);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\nexport const hsvaStringToHsva = (hsvString) => {\n const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hsvString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return roundHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n });\n};\nexport const hsvStringToHsva = hsvaStringToHsva;\nexport const rgbaStringToHsva = (rgbaString) => {\n const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(rgbaString);\n if (!match)\n return { h: 0, s: 0, v: 0, a: 1 };\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1)\n });\n};\nexport const rgbStringToHsva = rgbaStringToHsva;\nconst format = (number) => {\n const hex = number.toString(16);\n return hex.length < 2 ? '0' + hex : hex;\n};\nexport const rgbaToHex = ({ r, g, b, a }) => {\n const alphaHex = a < 1 ? format(round(a * 255)) : '';\n return '#' + format(r) + format(g) + format(b) + alphaHex;\n};\nexport const rgbaToHsva = ({ r, g, b, a }) => {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n // prettier-ignore\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh)),\n s: round(max ? (delta / max) * 100 : 0),\n v: round((max / 255) * 100),\n a\n };\n};\nexport const roundHsva = (hsva) => ({\n h: round(hsva.h),\n s: round(hsva.s),\n v: round(hsva.v),\n a: round(hsva.a, 2)\n});\nexport const rgbaToRgb = ({ r, g, b }) => ({ r, g, b });\nexport const hslaToHsl = ({ h, s, l }) => ({ h, s, l });\nexport const hsvaToHsv = (hsva) => {\n const { h, s, v } = roundHsva(hsva);\n return { h, s, v };\n};\n//# sourceMappingURL=convert.js.map","import { hexToRgba } from './convert.js';\nexport const equalColorObjects = (first, second) => {\n if (first === second)\n return true;\n for (const prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (first[prop] !==\n second[prop])\n return false;\n }\n return true;\n};\nexport const equalColorString = (first, second) => {\n return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\nexport const equalHex = (first, second) => {\n if (first.toLowerCase() === second.toLowerCase())\n return true;\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n//# sourceMappingURL=compare.js.map","const cache = {};\nexport const tpl = (html) => {\n let template = cache[html];\n if (!template) {\n template = document.createElement('template');\n template.innerHTML = html;\n cache[html] = template;\n }\n return template;\n};\nexport const fire = (target, type, detail) => {\n target.dispatchEvent(new CustomEvent(type, {\n bubbles: true,\n detail\n }));\n};\n//# sourceMappingURL=dom.js.map","import { fire, tpl } from '../utils/dom.js';\nimport { clamp } from '../utils/math.js';\nlet hasTouched = false;\n// Check if an event was triggered by touch\nconst isTouch = (e) => 'touches' in e;\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isValid = (event) => {\n if (hasTouched && !isTouch(event))\n return false;\n if (!hasTouched)\n hasTouched = isTouch(event);\n return true;\n};\nconst pointerMove = (target, event) => {\n const pointer = isTouch(event) ? event.touches[0] : event;\n const rect = target.el.getBoundingClientRect();\n fire(target.el, 'move', target.getMove({\n x: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n y: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height)\n }));\n};\nconst keyMove = (target, event) => {\n // We use `keyCode` instead of `key` to reduce the size of the library.\n const keyCode = event.keyCode;\n // Ignore all keys except arrow ones, Page Up, Page Down, Home and End.\n if (keyCode > 40 || (target.xy && keyCode < 37) || keyCode < 33)\n return;\n // Do not scroll page by keys when color picker element has focus.\n event.preventDefault();\n // Send relative offset to the parent component.\n fire(target.el, 'move', target.getMove({\n x: keyCode === 39 // Arrow Right\n ? 0.01\n : keyCode === 37 // Arrow Left\n ? -0.01\n : keyCode === 34 // Page Down\n ? 0.05\n : keyCode === 33 // Page Up\n ? -0.05\n : keyCode === 35 // End\n ? 1\n : keyCode === 36 // Home\n ? -1\n : 0,\n y: keyCode === 40 // Arrow down\n ? 0.01\n : keyCode === 38 // Arrow Up\n ? -0.01\n : 0\n }, true));\n};\nexport class Slider {\n constructor(root, part, aria, xy) {\n const template = tpl(`<div role=\"slider\" tabindex=\"0\" part=\"${part}\" ${aria}><div part=\"${part}-pointer\"></div></div>`);\n root.appendChild(template.content.cloneNode(true));\n const el = root.querySelector(`[part=${part}]`);\n el.addEventListener('mousedown', this);\n el.addEventListener('touchstart', this);\n el.addEventListener('keydown', this);\n this.el = el;\n this.xy = xy;\n this.nodes = [el.firstChild, el];\n }\n set dragging(state) {\n const toggleEvent = state ? document.addEventListener : document.removeEventListener;\n toggleEvent(hasTouched ? 'touchmove' : 'mousemove', this);\n toggleEvent(hasTouched ? 'touchend' : 'mouseup', this);\n }\n handleEvent(event) {\n switch (event.type) {\n case 'mousedown':\n case 'touchstart':\n event.preventDefault();\n // event.button is 0 in mousedown for left button activation\n if (!isValid(event) || (!hasTouched && event.button != 0))\n return;\n this.el.focus();\n pointerMove(this, event);\n this.dragging = true;\n break;\n case 'mousemove':\n case 'touchmove':\n event.preventDefault();\n pointerMove(this, event);\n break;\n case 'mouseup':\n case 'touchend':\n this.dragging = false;\n break;\n case 'keydown':\n keyMove(this, event);\n break;\n }\n }\n style(styles) {\n styles.forEach((style, i) => {\n for (const p in style) {\n this.nodes[i].style.setProperty(p, style[p]);\n }\n });\n }\n}\n//# sourceMappingURL=slider.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Hue extends Slider {\n constructor(root) {\n super(root, 'hue', 'aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"', false);\n }\n update({ h }) {\n this.h = h;\n this.style([\n {\n left: `${(h / 360) * 100}%`,\n color: hsvaToHslString({ h, s: 100, v: 100, a: 1 })\n }\n ]);\n this.el.setAttribute('aria-valuenow', `${round(h)}`);\n }\n getMove(offset, key) {\n // Hue measured in degrees of the color circle ranging from 0 to 360\n return { h: key ? clamp(this.h + offset.x * 360, 0, 360) : 360 * offset.x };\n }\n}\n//# sourceMappingURL=hue.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Saturation extends Slider {\n constructor(root) {\n super(root, 'saturation', 'aria-label=\"Color\"', true);\n }\n update(hsva) {\n this.hsva = hsva;\n this.style([\n {\n top: `${100 - hsva.v}%`,\n left: `${hsva.s}%`,\n color: hsvaToHslString(hsva)\n },\n {\n 'background-color': hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 })\n }\n ]);\n this.el.setAttribute('aria-valuetext', `Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`);\n }\n getMove(offset, key) {\n // Saturation and brightness always fit into [0, 100] range\n return {\n s: key ? clamp(this.hsva.s + offset.x * 100, 0, 100) : offset.x * 100,\n v: key ? clamp(this.hsva.v - offset.y * 100, 0, 100) : Math.round(100 - offset.y * 100)\n };\n }\n}\n//# sourceMappingURL=saturation.js.map","export default `: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)}`;\n//# sourceMappingURL=color-picker.js.map","export default `[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}`;\n//# sourceMappingURL=hue.js.map","export default `[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}`;\n//# sourceMappingURL=saturation.js.map","import { equalColorObjects } from '../utils/compare.js';\nimport { fire, tpl } from '../utils/dom.js';\nimport { Hue } from './hue.js';\nimport { Saturation } from './saturation.js';\nimport css from '../styles/color-picker.js';\nimport hueCss from '../styles/hue.js';\nimport saturationCss from '../styles/saturation.js';\nconst $isSame = Symbol('same');\nconst $color = Symbol('color');\nconst $hsva = Symbol('hsva');\nconst $update = Symbol('update');\nconst $parts = Symbol('parts');\nexport const $css = Symbol('css');\nexport const $sliders = Symbol('sliders');\nexport class ColorPicker extends HTMLElement {\n static get observedAttributes() {\n return ['color'];\n }\n get [$css]() {\n return [css, hueCss, saturationCss];\n }\n get [$sliders]() {\n return [Saturation, Hue];\n }\n get color() {\n return this[$color];\n }\n set color(newColor) {\n if (!this[$isSame](newColor)) {\n const newHsva = this.colorModel.toHsva(newColor);\n this[$update](newHsva);\n this[$color] = newColor;\n }\n }\n constructor() {\n super();\n const template = tpl(`<style>${this[$css].join('')}</style>`);\n const root = this.attachShadow({ mode: 'open' });\n root.appendChild(template.content.cloneNode(true));\n root.addEventListener('move', this);\n this[$parts] = this[$sliders].map((slider) => new slider(root));\n }\n connectedCallback() {\n // A user may set a property on an _instance_ of an element,\n // before its prototype has been connected to this class.\n // If so, we need to run it through the proper class setter.\n if (this.hasOwnProperty('color')) {\n const value = this.color;\n delete this['color'];\n this.color = value;\n }\n else if (!this.color) {\n this.color = this.colorModel.defaultColor;\n }\n }\n attributeChangedCallback(_attr, _oldVal, newVal) {\n const color = this.colorModel.fromAttr(newVal);\n if (!this[$isSame](color)) {\n this.color = color;\n }\n }\n handleEvent(event) {\n // Merge the current HSV color object with updated params.\n const oldHsva = this[$hsva];\n const newHsva = { ...oldHsva, ...event.detail };\n this[$update](newHsva);\n let newColor;\n if (!equalColorObjects(newHsva, oldHsva) &&\n !this[$isSame]((newColor = this.colorModel.fromHsva(newHsva)))) {\n this[$color] = newColor;\n fire(this, 'color-changed', { value: newColor });\n }\n }\n [$isSame](color) {\n return this.color && this.colorModel.equal(color, this.color);\n }\n [$update](hsva) {\n this[$hsva] = hsva;\n this[$parts].forEach((part) => part.update(hsva));\n }\n}\n//# sourceMappingURL=color-picker.js.map","import { ColorPicker } from '../components/color-picker.js';\nimport { hexToHsva, hsvaToHex } from '../utils/convert.js';\nimport { equalHex } from '../utils/compare.js';\nconst colorModel = {\n defaultColor: '#000',\n toHsva: hexToHsva,\n fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n equal: equalHex,\n fromAttr: (color) => color\n};\nexport class HexBase extends ColorPicker {\n get colorModel() {\n return colorModel;\n }\n}\n//# sourceMappingURL=hex.js.map","import { HexBase } from './lib/entrypoints/hex.js';\n/**\n * A color picker custom element that uses HEX format.\n *\n * @element hex-color-picker\n *\n * @prop {string} color - Selected color in HEX format.\n * @attr {string} color - Selected color in HEX format.\n *\n * @fires color-changed - Event fired when color property changes.\n *\n * @csspart hue - A hue selector container.\n * @csspart saturation - A saturation selector container\n * @csspart hue-pointer - A hue pointer element.\n * @csspart saturation-pointer - A saturation pointer element.\n */\nexport class HexColorPicker extends HexBase {\n}\ncustomElements.define('hex-color-picker', HexColorPicker);\n//# sourceMappingURL=hex-color-picker.js.map","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { X } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { colorTextClass } from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n /**\n * Color the picker wheel opens on while the field is unset. It only\n * positions the wheel — it never paints the swatch or fills the input,\n * so an unset field still reads as \"not set\".\n */\n seedColor?: string;\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: \"\",\n seedColor: \"#ffffff\",\n swatchOnly: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst { t } = useI18n();\n\nconst open = ref(false);\nconst popoverRef = ref<HTMLElement>();\nconst swatchRef = ref<HTMLElement>();\n\n// Whether the picker emitted a real change during the current pointer gesture.\n// vanilla-colorful only fires `color-changed` when the chosen color differs\n// from the one the wheel was seeded with — so picking a color equal to the\n// seed emits nothing. When the field is still unset after such a no-change\n// pick, we commit the seed ourselves on pointerup so the value persists\n// (otherwise e.g. white on an empty background can never be set — issue #282).\nconst pickerTouched = ref(false);\n\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst isUnset = computed(() => !props.modelValue);\n\n// The color handed to the wheel: the stored value, or the seed when unset.\nconst seed = computed(() => props.modelValue || props.seedColor);\n\n// The clear (×) lives inside the input, shown only when a value is set.\nconst showClear = computed(\n () => !props.swatchOnly && !props.disabled && !isUnset.value,\n);\n\nfunction onPickerChange(e: Event): void {\n pickerTouched.value = true;\n emit(\"update:modelValue\", (e as CustomEvent).detail.value);\n}\n\nfunction onPickerPointerDown(): void {\n pickerTouched.value = false;\n}\n\nfunction onPickerPointerUp(): void {\n // A deliberate pick equal to the seed fires no `color-changed`; commit it.\n if (!pickerTouched.value && isUnset.value) {\n emit(\"update:modelValue\", seed.value);\n }\n}\n\nfunction onTextInput(e: Event): void {\n emit(\"update:modelValue\", (e.target as HTMLInputElement).value);\n}\n\nfunction clear(): void {\n emit(\"update:modelValue\", \"\");\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex tpl:items-center tpl:gap-2 tpl:relative',\n disabled && 'tpl:opacity-60 tpl:cursor-not-allowed',\n ]\"\n >\n <button\n ref=\"swatchRef\"\n type=\"button\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.pickColor\"\n :aria-expanded=\"open\"\n :class=\"[\n '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)]',\n disabled ? 'tpl:cursor-not-allowed' : 'tpl:cursor-pointer',\n open\n ? 'tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]'\n : !disabled && 'hover:tpl:border-[var(--tpl-text-dim)]',\n 'tpl:size-10',\n ]\"\n @click=\"!disabled && (open = !open)\"\n >\n <span\n class=\"tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]\"\n :class=\"{ 'tpl-color-swatch-empty': isUnset }\"\n :style=\"isUnset ? undefined : { backgroundColor: modelValue }\"\n />\n </button>\n <div v-if=\"!swatchOnly\" class=\"tpl:relative tpl:flex-1\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"modelValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors 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)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n enter-from-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n enter-to-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-active-class=\"tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n leave-from-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-to-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n >\n <div\n v-if=\"open\"\n ref=\"popoverRef\"\n 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\"\n >\n <hex-color-picker\n :color=\"seed\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\n @pointerdown=\"onPickerPointerDown\"\n @pointerup=\"onPickerPointerUp\"\n @keydown.escape=\"open = false\"\n />\n </div>\n </Transition>\n </div>\n</template>\n\n<style>\nhex-color-picker {\n --hcp-width: 200px;\n}\n\nhex-color-picker::part(hue) {\n border-radius: var(--tpl-radius-sm, 7px);\n}\n\nhex-color-picker::part(saturation) {\n border-radius: var(--tpl-radius-sm, 7px) var(--tpl-radius-sm, 7px) 0 0;\n}\n\n/* Unset swatch: paper with a single thin diagonal slash = \"no color set\".\n A neutral non-color signal — never Signal Amber (intent) or Danger. */\n.tpl-color-swatch-empty {\n background-color: var(--tpl-bg);\n background-image: linear-gradient(\n to top right,\n transparent calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% + 0.75px),\n transparent calc(50% + 0.75px)\n );\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { X } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { colorTextClass } from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n /**\n * Color the picker wheel opens on while the field is unset. It only\n * positions the wheel — it never paints the swatch or fills the input,\n * so an unset field still reads as \"not set\".\n */\n seedColor?: string;\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: \"\",\n seedColor: \"#ffffff\",\n swatchOnly: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst { t } = useI18n();\n\nconst open = ref(false);\nconst popoverRef = ref<HTMLElement>();\nconst swatchRef = ref<HTMLElement>();\n\n// Whether the picker emitted a real change during the current pointer gesture.\n// vanilla-colorful only fires `color-changed` when the chosen color differs\n// from the one the wheel was seeded with — so picking a color equal to the\n// seed emits nothing. When the field is still unset after such a no-change\n// pick, we commit the seed ourselves on pointerup so the value persists\n// (otherwise e.g. white on an empty background can never be set — issue #282).\nconst pickerTouched = ref(false);\n\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst isUnset = computed(() => !props.modelValue);\n\n// The color handed to the wheel: the stored value, or the seed when unset.\nconst seed = computed(() => props.modelValue || props.seedColor);\n\n// The clear (×) lives inside the input, shown only when a value is set.\nconst showClear = computed(\n () => !props.swatchOnly && !props.disabled && !isUnset.value,\n);\n\nfunction onPickerChange(e: Event): void {\n pickerTouched.value = true;\n emit(\"update:modelValue\", (e as CustomEvent).detail.value);\n}\n\nfunction onPickerPointerDown(): void {\n pickerTouched.value = false;\n}\n\nfunction onPickerPointerUp(): void {\n // A deliberate pick equal to the seed fires no `color-changed`; commit it.\n if (!pickerTouched.value && isUnset.value) {\n emit(\"update:modelValue\", seed.value);\n }\n}\n\nfunction onTextInput(e: Event): void {\n emit(\"update:modelValue\", (e.target as HTMLInputElement).value);\n}\n\nfunction clear(): void {\n emit(\"update:modelValue\", \"\");\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex tpl:items-center tpl:gap-2 tpl:relative',\n disabled && 'tpl:opacity-60 tpl:cursor-not-allowed',\n ]\"\n >\n <button\n ref=\"swatchRef\"\n type=\"button\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.pickColor\"\n :aria-expanded=\"open\"\n :class=\"[\n '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)]',\n disabled ? 'tpl:cursor-not-allowed' : 'tpl:cursor-pointer',\n open\n ? 'tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]'\n : !disabled && 'hover:tpl:border-[var(--tpl-text-dim)]',\n 'tpl:size-10',\n ]\"\n @click=\"!disabled && (open = !open)\"\n >\n <span\n class=\"tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]\"\n :class=\"{ 'tpl-color-swatch-empty': isUnset }\"\n :style=\"isUnset ? undefined : { backgroundColor: modelValue }\"\n />\n </button>\n <div v-if=\"!swatchOnly\" class=\"tpl:relative tpl:flex-1\">\n <input\n type=\"text\"\n :class=\"[colorTextClass, 'tpl:w-full']\"\n :style=\"showClear ? { paddingRight: '2.25rem' } : undefined\"\n :value=\"modelValue\"\n :placeholder=\"placeholder || t.colorPicker.notSet\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"t.colorPicker.clear\"\n :title=\"t.colorPicker.clear\"\n class=\"tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors 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)]\"\n @click=\"clear\"\n >\n <X :size=\"14\" :stroke-width=\"1.5\" />\n </button>\n </div>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n enter-from-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n enter-to-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-active-class=\"tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]\"\n leave-from-class=\"tpl:opacity-100 tpl:scale-100 tpl:translate-y-0\"\n leave-to-class=\"tpl:opacity-0 tpl:scale-95 tpl:translate-y-1\"\n >\n <div\n v-if=\"open\"\n ref=\"popoverRef\"\n 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\"\n >\n <hex-color-picker\n :color=\"seed\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\n @pointerdown=\"onPickerPointerDown\"\n @pointerup=\"onPickerPointerUp\"\n @keydown.escape=\"open = false\"\n />\n </div>\n </Transition>\n </div>\n</template>\n\n<style>\nhex-color-picker {\n --hcp-width: 200px;\n}\n\nhex-color-picker::part(hue) {\n border-radius: var(--tpl-radius-sm, 7px);\n}\n\nhex-color-picker::part(saturation) {\n border-radius: var(--tpl-radius-sm, 7px) var(--tpl-radius-sm, 7px) 0 0;\n}\n\n/* Unset swatch: paper with a single thin diagonal slash = \"no color set\".\n A neutral non-color signal — never Signal Amber (intent) or Danger. */\n.tpl-color-swatch-empty {\n background-color: var(--tpl-bg);\n background-image: linear-gradient(\n to top right,\n transparent calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% - 0.75px),\n var(--tpl-text-dim) calc(50% + 0.75px),\n transparent calc(50% + 0.75px)\n );\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { Component } from \"vue\";\nimport { computed } from \"vue\";\n\nexport interface PillOption {\n value: string;\n label: string;\n icon?: Component;\n}\n\nconst props = defineProps<{\n options: PillOption[];\n modelValue: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst selectedIndex = computed(() =>\n props.options.findIndex((o) => o.value === props.modelValue),\n);\n\nconst pillOffset = computed(\n () => `translateX(${Math.max(selectedIndex.value, 0) * 100}%)`,\n);\n</script>\n\n<template>\n <div\n role=\"radiogroup\"\n class=\"tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1\"\n :style=\"{\n gridTemplateColumns: `repeat(${options.length}, 1fr)`,\n backgroundColor: 'var(--tpl-bg-hover)',\n }\"\n >\n <!-- Sliding pill — hidden when modelValue matches no option,\n otherwise it would silently sit on the first option and create\n a visual mismatch with aria-checked. -->\n <div\n v-if=\"selectedIndex >= 0\"\n class=\"tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n left: '4px',\n width: `calc((100% - 8px) / ${options.length})`,\n transform: pillOffset,\n backgroundColor: 'var(--tpl-bg)',\n boxShadow: 'var(--tpl-shadow)',\n transition: 'transform 120ms cubic-bezier(0.16, 1, 0.3, 1)',\n }\"\n ></div>\n\n <button\n v-for=\"option in options\"\n :key=\"option.value\"\n role=\"radio\"\n :aria-checked=\"modelValue === option.value\"\n :aria-label=\"option.label\"\n 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\"\n :style=\"{\n color:\n modelValue === option.value\n ? 'var(--tpl-primary)'\n : 'var(--tpl-text-muted)',\n transition: 'color 120ms cubic-bezier(0.16, 1, 0.3, 1)',\n }\"\n :title=\"option.label\"\n @click=\"emit('update:modelValue', option.value)\"\n >\n <component\n :is=\"option.icon\"\n v-if=\"option.icon\"\n :size=\"14\"\n :stroke-width=\"2\"\n />\n <span v-else>{{ option.label }}</span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Component } from \"vue\";\nimport { computed } from \"vue\";\n\nexport interface PillOption {\n value: string;\n label: string;\n icon?: Component;\n}\n\nconst props = defineProps<{\n options: PillOption[];\n modelValue: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: string): void;\n}>();\n\nconst selectedIndex = computed(() =>\n props.options.findIndex((o) => o.value === props.modelValue),\n);\n\nconst pillOffset = computed(\n () => `translateX(${Math.max(selectedIndex.value, 0) * 100}%)`,\n);\n</script>\n\n<template>\n <div\n role=\"radiogroup\"\n class=\"tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1\"\n :style=\"{\n gridTemplateColumns: `repeat(${options.length}, 1fr)`,\n backgroundColor: 'var(--tpl-bg-hover)',\n }\"\n >\n <!-- Sliding pill — hidden when modelValue matches no option,\n otherwise it would silently sit on the first option and create\n a visual mismatch with aria-checked. -->\n <div\n v-if=\"selectedIndex >= 0\"\n class=\"tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n left: '4px',\n width: `calc((100% - 8px) / ${options.length})`,\n transform: pillOffset,\n backgroundColor: 'var(--tpl-bg)',\n boxShadow: 'var(--tpl-shadow)',\n transition: 'transform 120ms cubic-bezier(0.16, 1, 0.3, 1)',\n }\"\n ></div>\n\n <button\n v-for=\"option in options\"\n :key=\"option.value\"\n role=\"radio\"\n :aria-checked=\"modelValue === option.value\"\n :aria-label=\"option.label\"\n 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\"\n :style=\"{\n color:\n modelValue === option.value\n ? 'var(--tpl-primary)'\n : 'var(--tpl-text-muted)',\n transition: 'color 120ms cubic-bezier(0.16, 1, 0.3, 1)',\n }\"\n :title=\"option.label\"\n @click=\"emit('update:modelValue', option.value)\"\n >\n <component\n :is=\"option.icon\"\n v-if=\"option.icon\"\n :size=\"14\"\n :stroke-width=\"2\"\n />\n <span v-else>{{ option.label }}</span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { labelClass } from \"../../constants/styleConstants\";\n\ndefineProps<{\n label?: string;\n}>();\n</script>\n\n<template>\n <div class=\"tpl:mb-3.5\">\n <label v-if=\"label\" :class=\"labelClass\">{{ label }}</label>\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { labelClass } from \"../../constants/styleConstants\";\n\ndefineProps<{\n label?: string;\n}>();\n</script>\n\n<template>\n <div class=\"tpl:mb-3.5\">\n <label v-if=\"label\" :class=\"labelClass\">{{ label }}</label>\n <slot />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n inputGroupInputClass,\n inputSuffixClass,\n} from \"../../constants/styleConstants\";\n\ndefineProps<{\n modelValue: number;\n min?: number;\n max?: number;\n suffix: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: number): void;\n}>();\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:items-stretch\">\n <input\n type=\"number\"\n :class=\"inputGroupInputClass\"\n :value=\"modelValue\"\n :min=\"min\"\n :max=\"max\"\n @input=\"\n emit(\n 'update:modelValue',\n Number(($event.target as HTMLInputElement).value),\n )\n \"\n />\n <span :class=\"inputSuffixClass\">{{ suffix }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n inputGroupInputClass,\n inputSuffixClass,\n} from \"../../constants/styleConstants\";\n\ndefineProps<{\n modelValue: number;\n min?: number;\n max?: number;\n suffix: string;\n}>();\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", value: number): void;\n}>();\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:items-stretch\">\n <input\n type=\"number\"\n :class=\"inputGroupInputClass\"\n :value=\"modelValue\"\n :min=\"min\"\n :max=\"max\"\n @input=\"\n emit(\n 'update:modelValue',\n Number(($event.target as HTMLInputElement).value),\n )\n \"\n />\n <span :class=\"inputSuffixClass\">{{ suffix }}</span>\n </div>\n</template>\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12],"mappings":";;;;AAGA,IAAa,KAAS,GAAQ,IAAM,GAAG,IAAM,MAClC,IAAS,IAAM,IAAM,IAAS,IAAM,IAAM,GAExC,KAAS,GAAQ,IAAS,GAAG,IAAgB,MAAI,MACnD,KAAK,MAAM,I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