@templatical/editor 0.21.0 → 0.21.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/{AiFeatureMenu-CPdNpHpZ.js → AiFeatureMenu-CcqQDHzJ.js} +1 -1
- package/dist/{CloudEditor-3a7mqMhe.js → CloudEditor-Dnww6og-.js} +5 -5
- package/dist/{CollaboratorBar-Ds0YZWzV.js → CollaboratorBar-Bj4NZiie.js} +1 -1
- package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
- package/dist/{ParagraphEditor-CkwBirNl.js → ParagraphEditor--_zWfxps.js} +1 -1
- package/dist/{SaveBlockDialog-Cc5BSUBx.js → SaveBlockDialog-CYIEHABH.js} +3 -3
- package/dist/{SavedBlockPreviewCanvas-ubttfmKr.js → SavedBlockPreviewCanvas-2-mzAnZE.js} +1 -1
- package/dist/{SavedBlocksBrowserModal-LkY_U3lY.js → SavedBlocksBrowserModal-D5V5yF_3.js} +4 -4
- package/dist/{SavedBlocksPanels-CET0zvH6.js → SavedBlocksPanels-Dff38YXu.js} +1 -1
- package/dist/{SavedBlocksPickBar-poGS4PoI.js → SavedBlocksPickBar-rB6iyji6.js} +1 -1
- package/dist/{SnapshotHistory-BvF5IXn1.js → SnapshotHistory-FtzDq8f0.js} +1 -1
- package/dist/{TestEmailModal-BRaM_eko.js → TestEmailModal-DL2O1H8M.js} +2 -2
- package/dist/{TitleEditor-Bhgzh-iQ.js → TitleEditor-CPda5lh-.js} +1 -1
- package/dist/{TplModal-BA-Zsg0O.js → TplModal-C7Koj5gM.js} +1 -1
- package/dist/{blockTypeIcons-B1-Yzp-a.js → blockTypeIcons-CgwECCut.js} +1 -1
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu--PdArSnv.js → AiFeatureMenu-Duwg413F.js} +9 -5
- package/dist/cdn/chunks/{AiFeatureMenu--PdArSnv.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DMSd0SIl.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
- package/dist/cdn/chunks/{BlockIssueBadge-DMSd0SIl.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DnTfI5GU.js → CloudEditor-B3hqbwfP.js} +179 -170
- package/dist/cdn/chunks/{CloudEditor-DnTfI5GU.js.map → CloudEditor-B3hqbwfP.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CBqd7ldq.js → CollaboratorBar-BS3rJy6-.js} +7 -6
- package/dist/cdn/chunks/{CollaboratorBar-CBqd7ldq.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DCdWP8YB.js → ColorPicker-DZSzZ5ZP.js} +107 -103
- package/dist/cdn/chunks/{ColorPicker-DCdWP8YB.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-BDnWMAME.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BbLoo22S.js → CountdownToolbar-DAnmIZjq.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-BbLoo22S.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-CfudrI3T.js → IssuesPanel-D80JedOj.js} +11 -10
- package/dist/cdn/chunks/{IssuesPanel-CfudrI3T.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-BmMx9_n_.js → NumberWithSuffix-CjlVNIEe.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-BmMx9_n_.js.map → NumberWithSuffix-CjlVNIEe.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DPCUSXpx.js → ParagraphEditor-CtaRa1vr.js} +73 -68
- package/dist/cdn/chunks/{ParagraphEditor-DPCUSXpx.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-B8dOiv_D.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
- package/dist/cdn/chunks/{RichTextEditorContent-B8dOiv_D.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BY3SMnNV.js → SaveBlockDialog-Bb3fdUEZ.js} +30 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BY3SMnNV.js.map → SaveBlockDialog-Bb3fdUEZ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-LpaOcusq.js → SavedBlockPreviewCanvas-DZOMgNsz.js} +33 -32
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-LpaOcusq.js.map → SavedBlockPreviewCanvas-DZOMgNsz.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CfIcmyzF.js → SavedBlocksBrowserModal-CeUWcPv0.js} +14 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CfIcmyzF.js.map → SavedBlocksBrowserModal-CeUWcPv0.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-kIowCfh_.js → SavedBlocksPanels-D-pA_wfk.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-kIowCfh_.js.map → SavedBlocksPanels-D-pA_wfk.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-WSGe1GiZ.js → SavedBlocksPickBar-1rf1KpqS.js} +6 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-WSGe1GiZ.js.map → SavedBlocksPickBar-1rf1KpqS.js.map} +1 -1
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-iwd-O9sO.js → TitleEditor-BJ7LFykI.js} +15 -12
- package/dist/cdn/chunks/{TitleEditor-iwd-O9sO.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
- package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-BYz0fgLz.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DeJh3E9b.js → extensions-ZX2oarW6.js} +17 -15
- package/dist/cdn/chunks/{extensions-DeJh3E9b.js.map → extensions-ZX2oarW6.js.map} +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
- package/dist/cdn/chunks/{media-library-mCCZieYO.js → src-D6F_3XkE.js} +1782 -1280
- package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
- package/dist/cdn/chunks/{renderer-Yg1XhsBN.js → src-DYji-wXB.js} +118 -134
- package/dist/cdn/chunks/src-DYji-wXB.js.map +1 -0
- package/dist/cdn/chunks/{styles-Bp5Jsu9J.js → styles-DMOEiSX9.js} +867 -859
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +72 -69
- package/dist/cdn/editor.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DIDAJdkj.js → styles-PcOPXvLO.js} +547 -549
- package/dist/templatical-editor.js +5 -5
- package/dist/{useEditorCore-Bd9CA4L_.js → useEditorCore-CT1slufs.js} +3 -3
- package/package.json +7 -7
- package/dist/CountdownBlock-BUHYIAe9.js +0 -92
- package/dist/cdn/chunks/CountdownBlock-BDnWMAME.js +0 -93
- package/dist/cdn/chunks/blockTypeIcons-BYz0fgLz.js +0 -22
- package/dist/cdn/chunks/features-pLfGJWIB.js +0 -7813
- package/dist/cdn/chunks/features-pLfGJWIB.js.map +0 -1
- package/dist/cdn/chunks/icons-FLemooQz.js +0 -690
- package/dist/cdn/chunks/icons-FLemooQz.js.map +0 -1
- package/dist/cdn/chunks/media-library-mCCZieYO.js.map +0 -1
- package/dist/cdn/chunks/quality-BRbHtAk1.js +0 -2180
- package/dist/cdn/chunks/quality-BRbHtAk1.js.map +0 -1
- package/dist/cdn/chunks/renderer-Yg1XhsBN.js.map +0 -1
- package/dist/cdn/chunks/src-BDJeYiVE.js +0 -509
- package/dist/cdn/chunks/src-BDJeYiVE.js.map +0 -1
- package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { M as e, P as t, ct as n, f as r, g as i, h as a, it as o, m as s, p as c, st as l, u, x as d } from "./draggable-D840DIZB.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import "./useEditorCore-BA6mspzD.js";
|
|
3
|
+
import { a as f, i as p } from "./icons-CYWw8Xfp.js";
|
|
4
|
+
import { n as m } from "./useCloudI18n-BjNENqkM.js";
|
|
4
5
|
import { t as h } from "./readableTextColor-f8Kykfnh.js";
|
|
5
6
|
//#region src/cloud/components/CollaboratorBar.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _ = ["title"], v = {
|
|
@@ -13,12 +14,12 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
13
14
|
isConnected: { type: Boolean }
|
|
14
15
|
},
|
|
15
16
|
setup(d) {
|
|
16
|
-
let S = d, { t: C } =
|
|
17
|
+
let S = d, { t: C } = m(), w = r(() => S.collaborators.slice(0, x)), T = r(() => S.collaborators.slice(x)), E = r(() => T.value.length), D = r(() => T.value.map((e) => e.name).join("\n"));
|
|
17
18
|
function O(e) {
|
|
18
19
|
let t = e.trim().split(/\s+/);
|
|
19
20
|
return t.length >= 2 ? (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase() : e.charAt(0).toUpperCase();
|
|
20
21
|
}
|
|
21
|
-
return (r,
|
|
22
|
+
return (r, m) => (e(), i("div", g, [c("div", {
|
|
22
23
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
|
|
23
24
|
style: l({ color: d.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
|
|
24
25
|
title: d.isConnected ? o(C).collaboration.connected : o(C).collaboration.disconnected
|
|
@@ -26,7 +27,7 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
26
27
|
key: 0,
|
|
27
28
|
size: 12,
|
|
28
29
|
"stroke-width": 2
|
|
29
|
-
})) : (e(), s(o(
|
|
30
|
+
})) : (e(), s(o(f), {
|
|
30
31
|
key: 1,
|
|
31
32
|
size: 12,
|
|
32
33
|
"stroke-width": 2
|
|
@@ -48,4 +49,4 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
|
|
|
48
49
|
//#endregion
|
|
49
50
|
export { S as default };
|
|
50
51
|
|
|
51
|
-
//# sourceMappingURL=CollaboratorBar-
|
|
52
|
+
//# sourceMappingURL=CollaboratorBar-BS3rJy6-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollaboratorBar-
|
|
1
|
+
{"version":3,"file":"CollaboratorBar-BS3rJy6-.js","names":[],"sources":["../../../src/cloud/components/CollaboratorBar.vue","../../../src/cloud/components/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;iCAcM,IAAa;;;;;;;EAPnB,IAAM,IAAQ,GAKR,EAAE,GAAG,MAAW,EAAmB,GAInC,IAAuB,QAC3B,EAAM,cAAc,MAAM,GAAG,CAAU,CACzC,GAEM,IAAwB,QAC5B,EAAM,cAAc,MAAM,CAAU,CACtC,GAEM,IAAgB,QAAe,EAAsB,MAAM,MAAM,GAEjE,IAAgB,QACpB,EAAsB,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAC1D;EAEA,SAAS,EAAY,GAAsB;GACzC,IAAM,IAAQ,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK;GAMrC,OALI,EAAM,UAAU,KAEhB,EAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAM,EAAM,SAAS,EAAE,CAAC,OAAO,CAAC,EAAA,CACrD,YAAY,IAET,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY;EACpC;yBAIE,EA0CM,OA1CN,GA0CM,CAxCJ,EAaM,OAAA;GAZJ,OAAM;GACL,OAAK,EAAA,EAAA,OAAmB,EAAA,cAAW,uBAAA,wBAAA,CAAA;GAGnC,OAAgB,EAAA,cAAwB,EAAA,CAAA,CAAM,CAAC,cAAc,YAAsB,EAAA,CAAA,CAAM,CAAC,cAAc;MAM7F,EAAA,eAAA,EAAA,GAAZ,EAAwD,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;cACnD,EAA+C,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;gBAKpC,EAAA,cAAc,SAAM,KAAA,EAAA,GAD5B,EAuBM,OAvBN,GAuBM,EAAA,EAAA,EAAA,GAnBJ,EAWM,GAAA,MAAA,EAVmB,EAAA,QAAhB,YADT,EAWM,OAAA;GATH,KAAK,EAAa;GACnB,OAAM;GACL,OAAK,EAAA;qBAA+B,EAAa;WAAwB,EAAA,CAAA,CAAiB,CAAC,EAAa,KAAK;;GAI7G,OAAO,EAAa;OAElB,EAAY,EAAa,IAAI,CAAA,GAAA,IAAA,CAAA,YAG1B,EAAA,QAAa,KAAA,EAAA,GADrB,EAMM,OAAA;;GAJJ,OAAM;GACL,OAAO,EAAA;KACT,OACE,EAAG,EAAA,KAAa,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { M as e, P as t, T as n, V as r, Z as i, c as a, d as o, f as s, g as c, h as l, it as u, l as ee, m as te, n as ne, ot as d, p as f, st as p, u as re, x as m, y as h } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as ie } from "./dist-CxTt8FRE.js";
|
|
3
|
+
import { L as ae, l as oe, z as se } from "./keys-D7kUmfpE.js";
|
|
4
|
+
import { t as ce } from "./useI18n-8Wd7G-cq.js";
|
|
5
|
+
import { a as le, i as g, n as ue, r as de, t as fe } from "./usePopoverPosition-Bx0QewTv.js";
|
|
6
|
+
import { n as pe } from "./icons-CYWw8Xfp.js";
|
|
3
7
|
//#region src/constants/styleConstants.ts
|
|
4
|
-
var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", v = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]",
|
|
8
|
+
var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", v = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]", me = "tpl:flex-1 tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-mono tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", x = "tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:border tpl:border-[var(--tpl-border)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)]", S = "tpl:flex tpl:size-8 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]", C = "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]", w = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2.5 tpl:py-2 tpl:font-mono tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-150 tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", T = "tpl-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3.5 tpl:py-2 tpl:text-sm tpl:font-medium tpl:whitespace-nowrap tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary)] hover:tpl:text-[var(--tpl-bg)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", E = [
|
|
5
9
|
"10px",
|
|
6
10
|
"12px",
|
|
7
11
|
"14px",
|
|
@@ -14,7 +18,7 @@ var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
14
18
|
"36px",
|
|
15
19
|
"48px",
|
|
16
20
|
"64px"
|
|
17
|
-
],
|
|
21
|
+
], D = [
|
|
18
22
|
"1",
|
|
19
23
|
"1.2",
|
|
20
24
|
"1.4",
|
|
@@ -23,7 +27,7 @@ var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
23
27
|
"1.8",
|
|
24
28
|
"2",
|
|
25
29
|
"2.5"
|
|
26
|
-
],
|
|
30
|
+
], O = [
|
|
27
31
|
{
|
|
28
32
|
label: "Normal",
|
|
29
33
|
value: "normal"
|
|
@@ -52,34 +56,34 @@ var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
52
56
|
label: "3px",
|
|
53
57
|
value: "3px"
|
|
54
58
|
}
|
|
55
|
-
],
|
|
59
|
+
], k = "#000000", A = "#ffffff", j = "#ffff00", M = "#f2f2f2", N = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, P = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
56
60
|
360 / (Math.PI * 2);
|
|
57
|
-
var
|
|
61
|
+
var F = (e) => ge(I(e)), I = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
58
62
|
r: parseInt(e[0] + e[0], 16),
|
|
59
63
|
g: parseInt(e[1] + e[1], 16),
|
|
60
64
|
b: parseInt(e[2] + e[2], 16),
|
|
61
|
-
a: e.length === 4 ?
|
|
65
|
+
a: e.length === 4 ? P(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
62
66
|
} : {
|
|
63
67
|
r: parseInt(e.substring(0, 2), 16),
|
|
64
68
|
g: parseInt(e.substring(2, 4), 16),
|
|
65
69
|
b: parseInt(e.substring(4, 6), 16),
|
|
66
|
-
a: e.length === 8 ?
|
|
67
|
-
}),
|
|
70
|
+
a: e.length === 8 ? P(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
71
|
+
}), L = (e) => he(B(e)), R = ({ h: e, s: t, v: n, a: r }) => {
|
|
68
72
|
let i = (200 - t) * n / 100;
|
|
69
73
|
return {
|
|
70
|
-
h:
|
|
71
|
-
s:
|
|
72
|
-
l:
|
|
73
|
-
a:
|
|
74
|
+
h: P(e),
|
|
75
|
+
s: P(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
76
|
+
l: P(i / 2),
|
|
77
|
+
a: P(r, 2)
|
|
74
78
|
};
|
|
75
|
-
},
|
|
76
|
-
let { h: t, s: n, l: r } =
|
|
79
|
+
}, z = (e) => {
|
|
80
|
+
let { h: t, s: n, l: r } = R(e);
|
|
77
81
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
78
|
-
},
|
|
82
|
+
}, B = ({ h: e, s: t, v: n, a: r }) => {
|
|
79
83
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
80
84
|
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;
|
|
81
85
|
return {
|
|
82
|
-
r:
|
|
86
|
+
r: P([
|
|
83
87
|
n,
|
|
84
88
|
o,
|
|
85
89
|
a,
|
|
@@ -87,7 +91,7 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
87
91
|
s,
|
|
88
92
|
n
|
|
89
93
|
][c] * 255),
|
|
90
|
-
g:
|
|
94
|
+
g: P([
|
|
91
95
|
s,
|
|
92
96
|
n,
|
|
93
97
|
n,
|
|
@@ -95,7 +99,7 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
95
99
|
a,
|
|
96
100
|
a
|
|
97
101
|
][c] * 255),
|
|
98
|
-
b:
|
|
102
|
+
b: P([
|
|
99
103
|
a,
|
|
100
104
|
a,
|
|
101
105
|
s,
|
|
@@ -103,27 +107,27 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
103
107
|
n,
|
|
104
108
|
o
|
|
105
109
|
][c] * 255),
|
|
106
|
-
a:
|
|
110
|
+
a: P(r, 2)
|
|
107
111
|
};
|
|
108
112
|
}, V = (e) => {
|
|
109
113
|
let t = e.toString(16);
|
|
110
114
|
return t.length < 2 ? "0" + t : t;
|
|
111
115
|
}, he = ({ r: e, g: t, b: n, a: r }) => {
|
|
112
|
-
let i = r < 1 ? V(
|
|
116
|
+
let i = r < 1 ? V(P(r * 255)) : "";
|
|
113
117
|
return "#" + V(e) + V(t) + V(n) + i;
|
|
114
118
|
}, ge = ({ r: e, g: t, b: n, a: r }) => {
|
|
115
119
|
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;
|
|
116
120
|
return {
|
|
117
|
-
h:
|
|
118
|
-
s:
|
|
119
|
-
v:
|
|
121
|
+
h: P(60 * (o < 0 ? o + 6 : o)),
|
|
122
|
+
s: P(i ? a / i * 100 : 0),
|
|
123
|
+
v: P(i / 255 * 100),
|
|
120
124
|
a: r
|
|
121
125
|
};
|
|
122
126
|
}, H = (e, t) => {
|
|
123
127
|
if (e === t) return !0;
|
|
124
128
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
125
129
|
return !0;
|
|
126
|
-
}, U = (e, t) => e.toLowerCase() === t.toLowerCase() || H(
|
|
130
|
+
}, U = (e, t) => e.toLowerCase() === t.toLowerCase() || H(I(e), I(t)), W = {}, G = (e) => {
|
|
127
131
|
let t = W[e];
|
|
128
132
|
return t || (t = document.createElement("template"), t.innerHTML = e, W[e] = t), t;
|
|
129
133
|
}, K = (e, t, n) => {
|
|
@@ -134,16 +138,16 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
134
138
|
}, q = !1, J = (e) => "touches" in e, _e = (e) => q && !J(e) ? !1 : (q ||= J(e), !0), Y = (e, t) => {
|
|
135
139
|
let n = J(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
136
140
|
K(e.el, "move", e.getMove({
|
|
137
|
-
x:
|
|
138
|
-
y:
|
|
141
|
+
x: N((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
142
|
+
y: N((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
139
143
|
}));
|
|
140
|
-
},
|
|
144
|
+
}, ve = (e, t) => {
|
|
141
145
|
let n = t.keyCode;
|
|
142
146
|
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), K(e.el, "move", e.getMove({
|
|
143
147
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
144
148
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
145
149
|
}, !0)));
|
|
146
|
-
},
|
|
150
|
+
}, X = class {
|
|
147
151
|
constructor(e, t, n, r) {
|
|
148
152
|
let i = G(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
149
153
|
e.appendChild(i.content.cloneNode(!0));
|
|
@@ -170,7 +174,7 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
170
174
|
this.dragging = !1;
|
|
171
175
|
break;
|
|
172
176
|
case "keydown":
|
|
173
|
-
|
|
177
|
+
ve(this, e);
|
|
174
178
|
break;
|
|
175
179
|
}
|
|
176
180
|
}
|
|
@@ -179,25 +183,25 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
179
183
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
180
184
|
});
|
|
181
185
|
}
|
|
182
|
-
}, ye = class extends
|
|
186
|
+
}, ye = class extends X {
|
|
183
187
|
constructor(e) {
|
|
184
188
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
185
189
|
}
|
|
186
190
|
update({ h: e }) {
|
|
187
191
|
this.h = e, this.style([{
|
|
188
192
|
left: `${e / 360 * 100}%`,
|
|
189
|
-
color:
|
|
193
|
+
color: z({
|
|
190
194
|
h: e,
|
|
191
195
|
s: 100,
|
|
192
196
|
v: 100,
|
|
193
197
|
a: 1
|
|
194
198
|
})
|
|
195
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
199
|
+
}]), this.el.setAttribute("aria-valuenow", `${P(e)}`);
|
|
196
200
|
}
|
|
197
201
|
getMove(e, t) {
|
|
198
|
-
return { h: t ?
|
|
202
|
+
return { h: t ? N(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
199
203
|
}
|
|
200
|
-
}, be = class extends
|
|
204
|
+
}, be = class extends X {
|
|
201
205
|
constructor(e) {
|
|
202
206
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
203
207
|
}
|
|
@@ -205,18 +209,18 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
205
209
|
this.hsva = e, this.style([{
|
|
206
210
|
top: `${100 - e.v}%`,
|
|
207
211
|
left: `${e.s}%`,
|
|
208
|
-
color:
|
|
209
|
-
}, { "background-color":
|
|
212
|
+
color: z(e)
|
|
213
|
+
}, { "background-color": z({
|
|
210
214
|
h: e.h,
|
|
211
215
|
s: 100,
|
|
212
216
|
v: 100,
|
|
213
217
|
a: 1
|
|
214
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
218
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${P(e.s)}%, Brightness ${P(e.v)}%`);
|
|
215
219
|
}
|
|
216
220
|
getMove(e, t) {
|
|
217
221
|
return {
|
|
218
|
-
s: t ?
|
|
219
|
-
v: t ?
|
|
222
|
+
s: t ? N(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
223
|
+
v: t ? N(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
220
224
|
};
|
|
221
225
|
}
|
|
222
226
|
}, xe = ":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)}", Se = "[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}", Ce = "[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}", Z = Symbol("same"), Q = Symbol("color"), we = Symbol("hsva"), $ = Symbol("update"), Te = Symbol("parts"), Ee = Symbol("css"), De = Symbol("sliders"), Oe = class extends HTMLElement {
|
|
@@ -274,8 +278,8 @@ var I = (e) => ge(L(e)), L = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
274
278
|
}
|
|
275
279
|
}, ke = {
|
|
276
280
|
defaultColor: "#000",
|
|
277
|
-
toHsva:
|
|
278
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
281
|
+
toHsva: F,
|
|
282
|
+
fromHsva: ({ h: e, s: t, v: n }) => L({
|
|
279
283
|
h: e,
|
|
280
284
|
s: t,
|
|
281
285
|
v: n,
|
|
@@ -347,31 +351,31 @@ var je = [
|
|
|
347
351
|
},
|
|
348
352
|
emits: ["update:modelValue"],
|
|
349
353
|
setup(m, { emit: _ }) {
|
|
350
|
-
let v = m, y = _, { t: b } =
|
|
351
|
-
ie(
|
|
352
|
-
|
|
353
|
-
}, { ignore: [
|
|
354
|
-
let
|
|
355
|
-
function
|
|
356
|
-
return
|
|
354
|
+
let v = m, y = _, { t: b } = ce(), x = i(!1), S = i(), C = i(), w = i(!1);
|
|
355
|
+
ie(S, () => {
|
|
356
|
+
x.value = !1;
|
|
357
|
+
}, { ignore: [C] });
|
|
358
|
+
let T = s(() => !v.modelValue), E = s(() => g(v.modelValue)), D = s(() => g(v.modelValue || v.seedColor)), O = s(() => !v.disabled && !T.value), k = n(oe, le), A = s(() => [...new Set(v.presets ?? k.presets)]), j = s(() => v.allowCustom ?? k.allowCustom), M = s(() => A.value.length > 0), N = s(() => j.value || !M.value), P = s(() => de(v.modelValue));
|
|
359
|
+
function F(e) {
|
|
360
|
+
return P.value !== "" && de(e) === P.value;
|
|
357
361
|
}
|
|
358
|
-
function
|
|
362
|
+
function I(e) {
|
|
359
363
|
y("update:modelValue", e);
|
|
360
364
|
}
|
|
361
|
-
let
|
|
362
|
-
function
|
|
363
|
-
return
|
|
365
|
+
let L = s(() => M.value && !N.value);
|
|
366
|
+
function R(e) {
|
|
367
|
+
return L.value ? e + 1 : e;
|
|
364
368
|
}
|
|
365
|
-
let
|
|
366
|
-
if (
|
|
367
|
-
let e =
|
|
368
|
-
return e === -1 ? 0 :
|
|
369
|
+
let z = s(() => {
|
|
370
|
+
if (L.value && T.value) return 0;
|
|
371
|
+
let e = A.value.findIndex((e) => F(e));
|
|
372
|
+
return e === -1 ? 0 : R(e);
|
|
369
373
|
});
|
|
370
|
-
function
|
|
371
|
-
return
|
|
374
|
+
function B() {
|
|
375
|
+
return z.value === 0 ? 0 : -1;
|
|
372
376
|
}
|
|
373
377
|
function V(e) {
|
|
374
|
-
return
|
|
378
|
+
return R(e) === z.value ? 0 : -1;
|
|
375
379
|
}
|
|
376
380
|
function he(e) {
|
|
377
381
|
if (![
|
|
@@ -384,13 +388,13 @@ var je = [
|
|
|
384
388
|
r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
|
|
385
389
|
}
|
|
386
390
|
function ge(e) {
|
|
387
|
-
|
|
391
|
+
w.value = !0, y("update:modelValue", e.detail.value);
|
|
388
392
|
}
|
|
389
393
|
function H() {
|
|
390
|
-
|
|
394
|
+
w.value = !1;
|
|
391
395
|
}
|
|
392
396
|
function U() {
|
|
393
|
-
!
|
|
397
|
+
!w.value && T.value && y("update:modelValue", D.value);
|
|
394
398
|
}
|
|
395
399
|
function W(e) {
|
|
396
400
|
y("update:modelValue", e.target.value);
|
|
@@ -398,14 +402,14 @@ var je = [
|
|
|
398
402
|
function G() {
|
|
399
403
|
y("update:modelValue", "");
|
|
400
404
|
}
|
|
401
|
-
let K =
|
|
405
|
+
let K = ue(), { toLocal: q } = fe(), J = n(ae, null), _e = n(se, null), Y = i({
|
|
402
406
|
top: 0,
|
|
403
407
|
left: 0
|
|
404
408
|
});
|
|
405
|
-
function
|
|
409
|
+
function ve() {
|
|
406
410
|
if (!v.disabled) {
|
|
407
|
-
if (!
|
|
408
|
-
let e =
|
|
411
|
+
if (!x.value) {
|
|
412
|
+
let e = C.value?.getBoundingClientRect();
|
|
409
413
|
if (e) {
|
|
410
414
|
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
411
415
|
Y.value = q({
|
|
@@ -414,46 +418,46 @@ var je = [
|
|
|
414
418
|
});
|
|
415
419
|
}
|
|
416
420
|
}
|
|
417
|
-
|
|
421
|
+
x.value = !x.value;
|
|
418
422
|
}
|
|
419
423
|
}
|
|
420
424
|
return (n, i) => (e(), c("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", m.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
421
425
|
f("button", {
|
|
422
426
|
ref_key: "swatchRef",
|
|
423
|
-
ref:
|
|
427
|
+
ref: C,
|
|
424
428
|
type: "button",
|
|
425
429
|
disabled: m.disabled,
|
|
426
430
|
"aria-label": m.ariaLabel || u(b).colorPicker.pickColor,
|
|
427
431
|
title: m.ariaLabel || void 0,
|
|
428
|
-
"aria-expanded":
|
|
432
|
+
"aria-expanded": x.value,
|
|
429
433
|
class: d([
|
|
430
434
|
"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)]",
|
|
431
435
|
m.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
432
|
-
|
|
436
|
+
x.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !m.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
433
437
|
m.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
434
438
|
]),
|
|
435
|
-
onClick:
|
|
439
|
+
onClick: ve
|
|
436
440
|
}, [f("span", {
|
|
437
|
-
class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty":
|
|
438
|
-
style: p(
|
|
441
|
+
class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": T.value }]),
|
|
442
|
+
style: p(T.value ? void 0 : { backgroundColor: E.value })
|
|
439
443
|
}, null, 6)], 10, je),
|
|
440
|
-
!m.swatchOnly &&
|
|
444
|
+
!m.swatchOnly && N.value ? (e(), c("div", Me, [f("input", {
|
|
441
445
|
type: "text",
|
|
442
|
-
class: d([u(
|
|
443
|
-
style: p(
|
|
444
|
-
value:
|
|
446
|
+
class: d([u(me), "tpl:w-full"]),
|
|
447
|
+
style: p(O.value ? { paddingRight: "2.25rem" } : void 0),
|
|
448
|
+
value: E.value,
|
|
445
449
|
placeholder: m.placeholder || u(b).colorPicker.notSet,
|
|
446
450
|
disabled: m.disabled,
|
|
447
451
|
"aria-label": u(b).colorPicker.hexValue,
|
|
448
452
|
onInput: W
|
|
449
|
-
}, null, 46, Ne),
|
|
453
|
+
}, null, 46, Ne), O.value ? (e(), c("button", {
|
|
450
454
|
key: 0,
|
|
451
455
|
type: "button",
|
|
452
456
|
"aria-label": u(b).colorPicker.clear,
|
|
453
457
|
title: u(b).colorPicker.clear,
|
|
454
458
|
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)]",
|
|
455
459
|
onClick: G
|
|
456
|
-
}, [h(u(
|
|
460
|
+
}, [h(u(pe), {
|
|
457
461
|
size: 14,
|
|
458
462
|
"stroke-width": 1.5
|
|
459
463
|
})], 8, Pe)) : l("", !0)])) : l("", !0),
|
|
@@ -468,10 +472,10 @@ var je = [
|
|
|
468
472
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
469
473
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
470
474
|
}, {
|
|
471
|
-
default: r(() => [
|
|
475
|
+
default: r(() => [x.value ? (e(), c("div", {
|
|
472
476
|
key: 0,
|
|
473
477
|
ref_key: "popoverRef",
|
|
474
|
-
ref:
|
|
478
|
+
ref: S,
|
|
475
479
|
"data-tpl-theme": u(_e),
|
|
476
480
|
class: "tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg",
|
|
477
481
|
style: p({
|
|
@@ -480,61 +484,61 @@ var je = [
|
|
|
480
484
|
...u(J)
|
|
481
485
|
})
|
|
482
486
|
}, [
|
|
483
|
-
|
|
487
|
+
M.value ? (e(), c("div", {
|
|
484
488
|
key: 0,
|
|
485
489
|
role: "radiogroup",
|
|
486
490
|
"aria-label": u(b).colorPicker.presetColors,
|
|
487
|
-
class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5",
|
|
491
|
+
class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", N.value && "tpl:mb-2"]),
|
|
488
492
|
onKeydown: he
|
|
489
|
-
}, [
|
|
493
|
+
}, [L.value ? (e(), c("button", {
|
|
490
494
|
key: 0,
|
|
491
495
|
type: "button",
|
|
492
496
|
role: "radio",
|
|
493
497
|
"aria-label": u(b).colorPicker.clear,
|
|
494
498
|
title: u(b).colorPicker.clear,
|
|
495
|
-
"aria-checked":
|
|
496
|
-
tabindex:
|
|
497
|
-
class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]",
|
|
499
|
+
"aria-checked": T.value,
|
|
500
|
+
tabindex: B(),
|
|
501
|
+
class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", T.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
|
|
498
502
|
onClick: G
|
|
499
|
-
}, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(
|
|
503
|
+
}, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(A.value, (t, n) => (e(), c("button", {
|
|
500
504
|
key: t,
|
|
501
505
|
type: "button",
|
|
502
506
|
role: "radio",
|
|
503
507
|
"aria-label": t,
|
|
504
508
|
title: t,
|
|
505
|
-
"aria-checked":
|
|
509
|
+
"aria-checked": F(t),
|
|
506
510
|
tabindex: V(n),
|
|
507
511
|
style: p({ backgroundColor: t }),
|
|
508
|
-
class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]",
|
|
509
|
-
onClick: (e) =>
|
|
512
|
+
class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", F(t) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
|
|
513
|
+
onClick: (e) => I(t)
|
|
510
514
|
}, null, 14, Re))), 128))], 42, Ie)) : l("", !0),
|
|
511
|
-
|
|
515
|
+
N.value ? (e(), c("hex-color-picker", {
|
|
512
516
|
key: 1,
|
|
513
|
-
color:
|
|
517
|
+
color: D.value,
|
|
514
518
|
"aria-label": u(b).colorPicker.pickColor,
|
|
515
519
|
onColorChanged: ge,
|
|
516
520
|
onPointerdown: H,
|
|
517
521
|
onPointerup: U,
|
|
518
|
-
onKeydown: i[0] ||= a((e) =>
|
|
522
|
+
onKeydown: i[0] ||= a((e) => x.value = !1, ["escape"])
|
|
519
523
|
}, null, 40, ze)) : l("", !0),
|
|
520
|
-
m.swatchOnly &&
|
|
524
|
+
m.swatchOnly && N.value ? (e(), c("div", Be, [f("input", {
|
|
521
525
|
type: "text",
|
|
522
|
-
class: d([u(
|
|
523
|
-
style: p(
|
|
524
|
-
value:
|
|
526
|
+
class: d([u(me), "tpl:w-full"]),
|
|
527
|
+
style: p(O.value ? { paddingRight: "2.25rem" } : void 0),
|
|
528
|
+
value: E.value,
|
|
525
529
|
placeholder: m.placeholder || u(b).colorPicker.notSet,
|
|
526
530
|
disabled: m.disabled,
|
|
527
531
|
"aria-label": u(b).colorPicker.hexValue,
|
|
528
532
|
onChange: W,
|
|
529
533
|
onKeydown: i[1] ||= a(ee((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
530
|
-
}, null, 46, Ve),
|
|
534
|
+
}, null, 46, Ve), O.value ? (e(), c("button", {
|
|
531
535
|
key: 0,
|
|
532
536
|
type: "button",
|
|
533
537
|
"aria-label": u(b).colorPicker.clear,
|
|
534
538
|
title: u(b).colorPicker.clear,
|
|
535
539
|
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)]",
|
|
536
540
|
onClick: G
|
|
537
|
-
}, [h(u(
|
|
541
|
+
}, [h(u(pe), {
|
|
538
542
|
size: 14,
|
|
539
543
|
"stroke-width": 1.5
|
|
540
544
|
})], 8, He)) : l("", !0)])) : l("", !0)
|
|
@@ -545,6 +549,6 @@ var je = [
|
|
|
545
549
|
}
|
|
546
550
|
});
|
|
547
551
|
//#endregion
|
|
548
|
-
export {
|
|
552
|
+
export { S as _, k as a, D as c, T as d, v as f, w as g, _ as h, M as i, C as l, b as m, A as n, E as o, y as p, j as r, O as s, Ue as t, x as u };
|
|
549
553
|
|
|
550
|
-
//# sourceMappingURL=ColorPicker-
|
|
554
|
+
//# sourceMappingURL=ColorPicker-DZSzZ5ZP.js.map
|