@templatical/editor 0.11.1 → 0.12.0
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-F5YV5hE3.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-CDy9_2Yj.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-Cd7bz1Wk.js} +3 -3
- 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-OO8hWAVp.js} +162 -162
- package/dist/cdn/chunks/{CloudEditor-hxoqsTsq.js.map → CloudEditor-OO8hWAVp.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-BXjDFRHI.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CZN92Bhz.js.map → CountdownToolbar-BXjDFRHI.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-ZuJ2ePB0.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-Deo8EOSz.js.map → NumberWithSuffix-ZuJ2ePB0.js.map} +1 -1
- 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-DpBN9H7-.js} +9 -1
- package/dist/cdn/chunks/de-DpBN9H7-.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-BhHtdIiU.js} +9 -1
- package/dist/cdn/chunks/en-BhHtdIiU.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-Bth5a93y.js} +8 -2
- package/dist/cdn/chunks/pt-BR-Bth5a93y.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-DwPomkBw.js} +53 -50
- package/dist/cdn/chunks/renderer-DwPomkBw.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-D45rgVq8.js} +737 -667
- package/dist/cdn/chunks/styles-D45rgVq8.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-DpBN9H7-.js} +7 -3
- 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-BhHtdIiU.js} +7 -3
- 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-Bth5a93y.js} +7 -1
- 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-Dp4mJuCM.js} +888 -818
- 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/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
package/dist/cdn/chunks/{NumberWithSuffix-Deo8EOSz.js.map → NumberWithSuffix-ZuJ2ePB0.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberWithSuffix-Deo8EOSz.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 { useI18n } from \"../composables/useI18n\";\nimport {\n colorTextClass,\n DEFAULT_TEXT_COLOR,\n} from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n size?: \"default\" | \"large\";\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: DEFAULT_TEXT_COLOR,\n size: \"default\",\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\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst internalColor = computed({\n get: () => props.modelValue || DEFAULT_TEXT_COLOR,\n set: (val) => emit(\"update:modelValue\", val),\n});\n\nfunction onPickerChange(e: Event) {\n internalColor.value = (e as CustomEvent).detail.value;\n}\n\nfunction onTextInput(e: Event) {\n internalColor.value = (e.target as HTMLInputElement).value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex 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 size === 'large' ? 'tpl:size-12' : '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 :style=\"{ backgroundColor: internalColor }\"\n />\n </button>\n <input\n v-if=\"!swatchOnly\"\n type=\"text\"\n :class=\"colorTextClass\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\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=\"internalColor\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\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</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { useI18n } from \"../composables/useI18n\";\nimport {\n colorTextClass,\n DEFAULT_TEXT_COLOR,\n} from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n size?: \"default\" | \"large\";\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: DEFAULT_TEXT_COLOR,\n size: \"default\",\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\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst internalColor = computed({\n get: () => props.modelValue || DEFAULT_TEXT_COLOR,\n set: (val) => emit(\"update:modelValue\", val),\n});\n\nfunction onPickerChange(e: Event) {\n internalColor.value = (e as CustomEvent).detail.value;\n}\n\nfunction onTextInput(e: Event) {\n internalColor.value = (e.target as HTMLInputElement).value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex 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 size === 'large' ? 'tpl:size-12' : '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 :style=\"{ backgroundColor: internalColor }\"\n />\n </button>\n <input\n v-if=\"!swatchOnly\"\n type=\"text\"\n :class=\"colorTextClass\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\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=\"internalColor\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\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</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,IAAO,CAAM,IAAI;ACC9B,OAAO,KAAK,KAAK;AAE1B,IAAa,MAAa,MAAQ,GAAW,EAAU,CAAG,CAAC,GAC9C,KAAa,OAClB,EAAI,OAAO,QACX,IAAM,EAAI,UAAU,CAAC,IACrB,EAAI,SAAS,IACN;CACH,GAAG,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,gBAAc,EAAA,eAAe,EAAO;GACpC,cAAY,EAAO;GACpB,OAAM;GACL,OAAK,EAAA;WAA6B,EAAA,eAAe,EAAO,QAAA,uBAAA;;;GAOxD,OAAO,EAAO;GACd,UAAK,MAAE,EAAI,qBAAsB,EAAO,KAAK;MAItC,EAAO,QAAA,EAAA,GAFf,EAKE,EAJK,EAAO,IAAI,GAAA;;GAEf,MAAM;GACN,gBAAc;cAEjB,EAAsC,QAAA,IAAA,EAAtB,EAAO,KAAK,GAAA,CAAA,EAAA,GAAA,IAAA,EAAA;;;;;;yBEnEhC,EAGM,OAHN,IAGM,CAFS,EAAA,SAAA,EAAA,GAAb,EAA2D,SAAA;;GAAtC,OAAK,EAAE,EAAA,CAAA,CAAU;OAAK,EAAA,KAAK,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAChD,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;EEEZ,IAAM,IAAO;yBAMX,EAeM,OAfN,IAeM,CAdJ,EAYE,SAAA;GAXA,MAAK;GACJ,OAAK,EAAE,EAAA,CAAA,CAAoB;GAC3B,OAAO,EAAA;GACP,KAAK,EAAA;GACL,KAAK,EAAA;GACL,SAAK,AAAA,EAAA,QAAA,MAAW,EAAA,qBAA+C,OAAQ,EAAO,OAA4B,KAAK,CAAA;oBAOlH,EAAmD,QAAA,EAA5C,OAAK,EAAE,EAAA,CAAA,CAAgB,EAAA,GAAA,EAAK,EAAA,MAAM,GAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"NumberWithSuffix-ZuJ2ePB0.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 { useI18n } from \"../composables/useI18n\";\nimport {\n colorTextClass,\n DEFAULT_TEXT_COLOR,\n} from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n size?: \"default\" | \"large\";\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: DEFAULT_TEXT_COLOR,\n size: \"default\",\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\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst internalColor = computed({\n get: () => props.modelValue || DEFAULT_TEXT_COLOR,\n set: (val) => emit(\"update:modelValue\", val),\n});\n\nfunction onPickerChange(e: Event) {\n internalColor.value = (e as CustomEvent).detail.value;\n}\n\nfunction onTextInput(e: Event) {\n internalColor.value = (e.target as HTMLInputElement).value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex 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 size === 'large' ? 'tpl:size-12' : '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 :style=\"{ backgroundColor: internalColor }\"\n />\n </button>\n <input\n v-if=\"!swatchOnly\"\n type=\"text\"\n :class=\"colorTextClass\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\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=\"internalColor\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\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</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport { useI18n } from \"../composables/useI18n\";\nimport {\n colorTextClass,\n DEFAULT_TEXT_COLOR,\n} from \"../constants/styleConstants\";\nimport \"vanilla-colorful\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n placeholder?: string;\n size?: \"default\" | \"large\";\n swatchOnly?: boolean;\n disabled?: boolean;\n }>(),\n {\n placeholder: DEFAULT_TEXT_COLOR,\n size: \"default\",\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\nonClickOutside(\n popoverRef,\n () => {\n open.value = false;\n },\n { ignore: [swatchRef] },\n);\n\nconst internalColor = computed({\n get: () => props.modelValue || DEFAULT_TEXT_COLOR,\n set: (val) => emit(\"update:modelValue\", val),\n});\n\nfunction onPickerChange(e: Event) {\n internalColor.value = (e as CustomEvent).detail.value;\n}\n\nfunction onTextInput(e: Event) {\n internalColor.value = (e.target as HTMLInputElement).value;\n}\n</script>\n\n<template>\n <div\n :class=\"[\n 'tpl:flex 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 size === 'large' ? 'tpl:size-12' : '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 :style=\"{ backgroundColor: internalColor }\"\n />\n </button>\n <input\n v-if=\"!swatchOnly\"\n type=\"text\"\n :class=\"colorTextClass\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :aria-label=\"t.colorPicker.hexValue\"\n @input=\"onTextInput\"\n />\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=\"internalColor\"\n :aria-label=\"t.colorPicker.pickColor\"\n @color-changed=\"onPickerChange\"\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</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,IAAO,CAAM,IAAI;ACC9B,OAAO,KAAK,KAAK;AAE1B,IAAa,MAAa,MAAQ,GAAW,EAAU,CAAG,CAAC,GAC9C,KAAa,OAClB,EAAI,OAAO,QACX,IAAM,EAAI,UAAU,CAAC,IACrB,EAAI,SAAS,IACN;CACH,GAAG,SAAS,EAAI,KAAK,EAAI,IAAI,EAAE;CAC/B,GAAG,SAAS,EAAI,KAAK,EAAI,IAAI,EAAE;CAC/B,GAAG,SAAS,EAAI,KAAK,EAAI,IAAI,EAAE;CAC/B,GAAG,EAAI,WAAW,IAAI,EAAM,SAAS,EAAI,KAAK,EAAI,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI;AAC1E,IAEG;CACH,GAAG,SAAS,EAAI,UAAU,GAAG,CAAC,GAAG,EAAE;CACnC,GAAG,SAAS,EAAI,UAAU,GAAG,CAAC,GAAG,EAAE;CACnC,GAAG,SAAS,EAAI,UAAU,GAAG,CAAC,GAAG,EAAE;CACnC,GAAG,EAAI,WAAW,IAAI,EAAM,SAAS,EAAI,UAAU,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,IAAI;AAC9E,IA2BS,MAAa,MAAS,GAAU,EAAW,CAAI,CAAC,GAChD,KAA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AAK,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAChD,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;EEEZ,IAAM,IAAO;yBAMX,EAeM,OAfN,IAeM,CAdJ,EAYE,SAAA;GAXA,MAAK;GACJ,OAAK,EAAE,EAAA,CAAA,CAAoB;GAC3B,OAAO,EAAA;GACP,KAAK,EAAA;GACL,KAAK,EAAA;GACL,SAAK,AAAA,EAAA,QAAA,MAAW,EAAA,qBAA+C,OAAQ,EAAO,OAA4B,KAAK,CAAA;oBAOlH,EAAmD,QAAA,EAA5C,OAAK,EAAE,EAAA,CAAA,CAAgB,EAAA,GAAA,EAAK,EAAA,MAAM,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { K as e, L as t, M as n, P as r, T as i, Z as a, c as o, ct as s, d as c, f as l, g as u, h as d, it as f, l as p, m, ot as h, p as g, st as _, u as v, v as y, x as b, y as x } from "./draggable-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { K as e, L as t, M as n, P as r, T as i, Z as a, c as o, ct as s, d as c, f as l, g as u, h as d, it as f, l as p, m, ot as h, p as g, st as _, u as v, v as y, x as b, y as x } from "./draggable-Bci-fq8y.js";
|
|
2
|
+
import { Ft as S, Q as C, Xt as w, Y as T, Yt as E, an as D, in as O, k, kt as ee, nt as A, on as j, rn as M, rt as N } from "./features-DxWz_Enw.js";
|
|
3
|
+
import { G as te, H as ne, I as re, K as ie, M as ae, P as oe, W as se, c as ce, f as P, g as le, i as ue, j as F, l as I, o as L, y as R } from "./icons-BflGUmFY.js";
|
|
4
4
|
import { a as z, o as B, s as V } from "./styleConstants-lGobwiLH.js";
|
|
5
|
-
import { n as H, t as U } from "./RichTextEditorContent-
|
|
5
|
+
import { n as H, t as U } from "./RichTextEditorContent-DV2yknp8.js";
|
|
6
6
|
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var W = [
|
|
8
8
|
"aria-label",
|
|
@@ -12,8 +12,8 @@ var W = [
|
|
|
12
12
|
__name: "EmojiPickerDropdown",
|
|
13
13
|
emits: ["insert"],
|
|
14
14
|
setup(e, { emit: t }) {
|
|
15
|
-
let i = t, { categories: c, isOpen: m, toggle: _, close: y } =
|
|
16
|
-
|
|
15
|
+
let i = t, { categories: c, isOpen: m, toggle: _, close: y } = C(), { t: b, format: w } = S(), T = a(null), E = a(null);
|
|
16
|
+
A(T, l(() => m.value)), j(E, () => {
|
|
17
17
|
m.value && y();
|
|
18
18
|
});
|
|
19
19
|
function D(e) {
|
|
@@ -89,7 +89,7 @@ var W = [
|
|
|
89
89
|
function me(e, t) {
|
|
90
90
|
return n(), u("span", pe);
|
|
91
91
|
}
|
|
92
|
-
var Z = /*#__PURE__*/
|
|
92
|
+
var Z = /*#__PURE__*/ N(fe, [["render", me]]), he = [
|
|
93
93
|
"value",
|
|
94
94
|
"aria-label",
|
|
95
95
|
"title"
|
|
@@ -146,8 +146,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
146
146
|
},
|
|
147
147
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
148
148
|
setup(e, { emit: t }) {
|
|
149
|
-
let r = e, a = t, o = i(
|
|
150
|
-
function
|
|
149
|
+
let r = e, a = t, o = i(M, null), p = i(O, null), h = D(E, "ParagraphToolbar"), b = k(), C = i(w, null), T = l(() => C?.isOpen.value ?? !1), { t: A } = S(), j = h.fonts;
|
|
150
|
+
function N(e) {
|
|
151
151
|
r.editor?.chain().focus().insertContent(e).run();
|
|
152
152
|
}
|
|
153
153
|
function P(e) {
|
|
@@ -183,13 +183,13 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
183
183
|
let t = r.editor?.chain().focus();
|
|
184
184
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
185
185
|
}
|
|
186
|
-
return (t, r) => f(b) && !
|
|
186
|
+
return (t, r) => f(b) && !T.value ? (n(), m(c, {
|
|
187
187
|
key: 0,
|
|
188
188
|
to: f(b)
|
|
189
189
|
}, [g("div", {
|
|
190
190
|
"data-tpl-theme": f(p),
|
|
191
191
|
role: "toolbar",
|
|
192
|
-
"aria-label": f(
|
|
192
|
+
"aria-label": f(A).paragraphEditor.toolbar,
|
|
193
193
|
class: "tpl tpl-text-toolbar tpl:fixed tpl:z-popover tpl:flex tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-lg",
|
|
194
194
|
style: _({
|
|
195
195
|
...f(o),
|
|
@@ -202,8 +202,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
202
202
|
x(Q, {
|
|
203
203
|
"model-value": P("fontFamily"),
|
|
204
204
|
options: f(j),
|
|
205
|
-
label: f(
|
|
206
|
-
placeholder: f(
|
|
205
|
+
label: f(A).paragraphEditor.fontFamily,
|
|
206
|
+
placeholder: f(A).paragraphEditor.defaultFont,
|
|
207
207
|
"width-class": "tpl:w-32",
|
|
208
208
|
"onUpdate:modelValue": H
|
|
209
209
|
}, null, 8, [
|
|
@@ -215,8 +215,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
215
215
|
x(Q, {
|
|
216
216
|
"model-value": P("fontSize"),
|
|
217
217
|
options: f(z),
|
|
218
|
-
label: f(
|
|
219
|
-
placeholder: f(
|
|
218
|
+
label: f(A).paragraphEditor.fontSize,
|
|
219
|
+
placeholder: f(A).paragraphEditor.defaultSize,
|
|
220
220
|
"width-class": "tpl:w-20",
|
|
221
221
|
"onUpdate:modelValue": U
|
|
222
222
|
}, null, 8, [
|
|
@@ -230,8 +230,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
230
230
|
type: "color",
|
|
231
231
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
232
232
|
value: P("color") || f("#000000"),
|
|
233
|
-
"aria-label": f(
|
|
234
|
-
title: f(
|
|
233
|
+
"aria-label": f(A).paragraphEditor.textColor,
|
|
234
|
+
title: f(A).paragraphEditor.textColor,
|
|
235
235
|
onInput: r[0] ||= (e) => W(e.target.value)
|
|
236
236
|
}, null, 40, xe)]),
|
|
237
237
|
g("div", Se, [g("input", {
|
|
@@ -239,14 +239,14 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
239
239
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
240
240
|
style: _({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
241
241
|
value: J() || f("#ffff00"),
|
|
242
|
-
"aria-label": f(
|
|
243
|
-
title: f(
|
|
242
|
+
"aria-label": f(A).paragraphEditor.highlightColor,
|
|
243
|
+
title: f(A).paragraphEditor.highlightColor,
|
|
244
244
|
onInput: r[1] ||= (e) => Y(e.target.value)
|
|
245
245
|
}, null, 44, Ce)]),
|
|
246
246
|
x(Z),
|
|
247
247
|
x(X, {
|
|
248
|
-
icon: f(
|
|
249
|
-
label: f(
|
|
248
|
+
icon: f(ne),
|
|
249
|
+
label: f(A).paragraphEditor.bold,
|
|
250
250
|
active: e.editor.isActive("bold"),
|
|
251
251
|
"stroke-width": 2.5,
|
|
252
252
|
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -257,7 +257,7 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
257
257
|
]),
|
|
258
258
|
x(X, {
|
|
259
259
|
icon: f(re),
|
|
260
|
-
label: f(
|
|
260
|
+
label: f(A).paragraphEditor.italic,
|
|
261
261
|
active: e.editor.isActive("italic"),
|
|
262
262
|
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
263
263
|
}, null, 8, [
|
|
@@ -266,8 +266,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
266
266
|
"active"
|
|
267
267
|
]),
|
|
268
268
|
x(X, {
|
|
269
|
-
icon: f(
|
|
270
|
-
label: f(
|
|
269
|
+
icon: f(ue),
|
|
270
|
+
label: f(A).paragraphEditor.underline,
|
|
271
271
|
active: e.editor.isActive("underline"),
|
|
272
272
|
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
273
273
|
}, null, 8, [
|
|
@@ -276,8 +276,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
276
276
|
"active"
|
|
277
277
|
]),
|
|
278
278
|
x(X, {
|
|
279
|
-
icon: f(
|
|
280
|
-
label: f(
|
|
279
|
+
icon: f(I),
|
|
280
|
+
label: f(A).paragraphEditor.strikethrough,
|
|
281
281
|
active: e.editor.isActive("strike"),
|
|
282
282
|
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
283
283
|
}, null, 8, [
|
|
@@ -287,8 +287,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
287
287
|
]),
|
|
288
288
|
x(Z),
|
|
289
289
|
x(X, {
|
|
290
|
-
icon: f(
|
|
291
|
-
label: f(
|
|
290
|
+
icon: f(ce),
|
|
291
|
+
label: f(A).paragraphEditor.subscript,
|
|
292
292
|
active: e.editor.isActive("subscript"),
|
|
293
293
|
onClick: r[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
294
294
|
}, null, 8, [
|
|
@@ -297,8 +297,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
297
297
|
"active"
|
|
298
298
|
]),
|
|
299
299
|
x(X, {
|
|
300
|
-
icon: f(
|
|
301
|
-
label: f(
|
|
300
|
+
icon: f(L),
|
|
301
|
+
label: f(A).paragraphEditor.superscript,
|
|
302
302
|
active: e.editor.isActive("superscript"),
|
|
303
303
|
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
304
304
|
}, null, 8, [
|
|
@@ -308,8 +308,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
308
308
|
]),
|
|
309
309
|
x(Z),
|
|
310
310
|
x(X, {
|
|
311
|
-
icon: f(
|
|
312
|
-
label: f(
|
|
311
|
+
icon: f(oe),
|
|
312
|
+
label: f(A).paragraphEditor.addLink,
|
|
313
313
|
active: e.editor.isActive("link"),
|
|
314
314
|
onClick: r[8] ||= (e) => a("open-link-dialog")
|
|
315
315
|
}, null, 8, [
|
|
@@ -319,8 +319,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
319
319
|
])
|
|
320
320
|
]), g("div", $, [
|
|
321
321
|
x(X, {
|
|
322
|
-
icon: f(
|
|
323
|
-
label: f(
|
|
322
|
+
icon: f(F),
|
|
323
|
+
label: f(A).paragraphEditor.bulletList,
|
|
324
324
|
active: e.editor.isActive("bulletList"),
|
|
325
325
|
onClick: r[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
326
326
|
}, null, 8, [
|
|
@@ -330,7 +330,7 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
330
330
|
]),
|
|
331
331
|
x(X, {
|
|
332
332
|
icon: f(ae),
|
|
333
|
-
label: f(
|
|
333
|
+
label: f(A).paragraphEditor.numberedList,
|
|
334
334
|
active: e.editor.isActive("orderedList"),
|
|
335
335
|
onClick: r[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
336
336
|
}, null, 8, [
|
|
@@ -340,8 +340,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
340
340
|
]),
|
|
341
341
|
x(Z),
|
|
342
342
|
x(X, {
|
|
343
|
-
icon: f(
|
|
344
|
-
label: f(
|
|
343
|
+
icon: f(se),
|
|
344
|
+
label: f(A).paragraphEditor.alignLeft,
|
|
345
345
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
346
346
|
onClick: r[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
347
347
|
}, null, 8, [
|
|
@@ -350,8 +350,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
350
350
|
"active"
|
|
351
351
|
]),
|
|
352
352
|
x(X, {
|
|
353
|
-
icon: f(
|
|
354
|
-
label: f(
|
|
353
|
+
icon: f(ie),
|
|
354
|
+
label: f(A).paragraphEditor.alignCenter,
|
|
355
355
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
356
356
|
onClick: r[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
357
357
|
}, null, 8, [
|
|
@@ -360,8 +360,8 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
360
360
|
"active"
|
|
361
361
|
]),
|
|
362
362
|
x(X, {
|
|
363
|
-
icon: f(
|
|
364
|
-
label: f(
|
|
363
|
+
icon: f(te),
|
|
364
|
+
label: f(A).paragraphEditor.alignRight,
|
|
365
365
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
366
366
|
onClick: r[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
367
367
|
}, null, 8, [
|
|
@@ -373,7 +373,7 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
373
373
|
x(Q, {
|
|
374
374
|
"model-value": G(),
|
|
375
375
|
options: f(V),
|
|
376
|
-
label: f(
|
|
376
|
+
label: f(A).paragraphEditor.lineHeight,
|
|
377
377
|
placeholder: "LH",
|
|
378
378
|
"width-class": "tpl:w-16",
|
|
379
379
|
"onUpdate:modelValue": K
|
|
@@ -385,7 +385,7 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
385
385
|
x(Q, {
|
|
386
386
|
"model-value": P("letterSpacing"),
|
|
387
387
|
options: f(B),
|
|
388
|
-
label: f(
|
|
388
|
+
label: f(A).paragraphEditor.letterSpacing,
|
|
389
389
|
placeholder: "LS",
|
|
390
390
|
"width-class": "tpl:w-20",
|
|
391
391
|
"onUpdate:modelValue": q
|
|
@@ -396,27 +396,27 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
396
396
|
]),
|
|
397
397
|
x(Z),
|
|
398
398
|
x(X, {
|
|
399
|
-
icon: f(
|
|
400
|
-
label: f(
|
|
399
|
+
icon: f(R),
|
|
400
|
+
label: f(A).paragraphEditor.clearFormatting,
|
|
401
401
|
onClick: r[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
402
402
|
}, null, 8, ["icon", "label"]),
|
|
403
403
|
x(Z),
|
|
404
|
-
x(de, { onInsert:
|
|
404
|
+
x(de, { onInsert: N }),
|
|
405
405
|
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(Z), g("button", {
|
|
406
406
|
type: "button",
|
|
407
407
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
408
|
-
"aria-label": f(
|
|
409
|
-
title: f(
|
|
408
|
+
"aria-label": f(A).mergeTag.insert,
|
|
409
|
+
title: f(A).mergeTag.insert,
|
|
410
410
|
onClick: r[15] ||= (e) => a("add-merge-tag")
|
|
411
|
-
}, [x(f(
|
|
411
|
+
}, [x(f(le), {
|
|
412
412
|
size: 16,
|
|
413
413
|
"stroke-width": 2
|
|
414
|
-
}), y(" " + s(f(
|
|
415
|
-
])], 64)) : (n(), u("div", Te, [x(f(
|
|
414
|
+
}), y(" " + s(f(A).mergeTag.insert), 1)], 8, we)], 64)) : d("", !0)
|
|
415
|
+
])], 64)) : (n(), u("div", Te, [x(f(ee), {
|
|
416
416
|
class: "tpl-spinner",
|
|
417
417
|
size: 14,
|
|
418
418
|
"stroke-width": 2
|
|
419
|
-
}), y(" " + s(f(
|
|
419
|
+
}), y(" " + s(f(A).errors.editorLoading), 1)]))], 12, ve)], 8, ["to"])) : d("", !0);
|
|
420
420
|
}
|
|
421
421
|
}), De = { class: "tpl-text-editor-wrapper tpl:relative" }, Oe = /* @__PURE__ */ b({
|
|
422
422
|
__name: "ParagraphEditor",
|
|
@@ -426,25 +426,25 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
426
426
|
},
|
|
427
427
|
emits: ["done"],
|
|
428
428
|
setup(t, { emit: r }) {
|
|
429
|
-
let i = t, a = r, o = k(), { editor: s, EditorContent: c, isLoading: l, initError: d, retry: p, showLinkDialog: m, linkUrl: h, linkDialogRef: g, canRequestMergeTag: _, openLinkDialog: v, insertLink: y, removeLink: b, closeLinkDialog: S, handleLinkKeydown: C, handleAddMergeTag:
|
|
429
|
+
let i = t, a = r, o = k(), { editor: s, EditorContent: c, isLoading: l, initError: d, retry: p, showLinkDialog: m, linkUrl: h, linkDialogRef: g, canRequestMergeTag: _, openLinkDialog: v, insertLink: y, removeLink: b, closeLinkDialog: S, handleLinkKeydown: C, handleAddMergeTag: w } = T({
|
|
430
430
|
blockId: () => i.block.id,
|
|
431
431
|
blockContent: () => i.block.content,
|
|
432
432
|
onDone: () => a("done"),
|
|
433
433
|
editorName: "ParagraphEditor",
|
|
434
434
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
435
435
|
let [{ Editor: a, EditorContent: s }, { default: c }, { default: l }, { default: u }, { default: d }, { default: f }, { default: p }, { TextStyle: m }, { default: h }, { default: g }, { default: _ }, { MergeTagNode: v, MergeTagSuggestion: y, LogicMergeTagNode: b, FontSize: x, LineHeight: S, LetterSpacing: C }] = await Promise.all([
|
|
436
|
-
import("./tiptap-
|
|
437
|
-
import("./tiptap-
|
|
438
|
-
import("./tiptap-
|
|
439
|
-
import("./tiptap-
|
|
440
|
-
import("./tiptap-
|
|
441
|
-
import("./tiptap-
|
|
442
|
-
import("./tiptap-
|
|
443
|
-
import("./tiptap-
|
|
444
|
-
import("./tiptap-
|
|
445
|
-
import("./tiptap-
|
|
446
|
-
import("./tiptap-
|
|
447
|
-
import("./extensions-
|
|
436
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.i),
|
|
437
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.a),
|
|
438
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.u),
|
|
439
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.o),
|
|
440
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.l),
|
|
441
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.c),
|
|
442
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.s),
|
|
443
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.m),
|
|
444
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.p),
|
|
445
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.f),
|
|
446
|
+
import("./tiptap-CwScfbsM.js").then((e) => e.d),
|
|
447
|
+
import("./extensions-Ds9GnMcd.js")
|
|
448
448
|
]);
|
|
449
449
|
return {
|
|
450
450
|
TiptapEditor: a,
|
|
@@ -496,7 +496,7 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
496
496
|
"is-loading": f(l),
|
|
497
497
|
"can-request-merge-tag": f(_),
|
|
498
498
|
onOpenLinkDialog: f(v),
|
|
499
|
-
onAddMergeTag: f(
|
|
499
|
+
onAddMergeTag: f(w)
|
|
500
500
|
}, null, 8, [
|
|
501
501
|
"editor",
|
|
502
502
|
"toolbar-position",
|
|
@@ -545,4 +545,4 @@ var Z = /*#__PURE__*/ O(fe, [["render", me]]), he = [
|
|
|
545
545
|
//#endregion
|
|
546
546
|
export { Oe as default };
|
|
547
547
|
|
|
548
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
548
|
+
//# sourceMappingURL=ParagraphEditor-BnhnFOW1.js.map
|