@aswin.dev/editor 0.7.1 → 0.7.3
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/LICENSE +56 -0
- package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-Dt5pvG5t.js} +37 -51
- package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-BipxcGap.js} +1 -1
- package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-CnUX0IOW.js} +283 -239
- package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-NaaZTjbs.js} +2 -2
- package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DE6ZsM4D.js} +9 -10
- package/dist/CountdownBlock-Ba3T-i2X.js +1536 -0
- package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-CbhSp_uq.js} +1 -1
- package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-CZg97bbj.js} +1 -1
- package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-D2EVdexc.js} +4 -4
- package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-P3N-nxkU.js} +52 -47
- package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-CihczoAd.js} +1 -1
- package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-BbRuKhWv.js} +7 -7
- package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-DLZa3m3O.js} +2 -2
- package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-Csg1_jXi.js} +3 -3
- package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-m3okLbJz.js} +2 -2
- package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CtJIS5ER.js} +2 -2
- package/dist/{TplModal-BAsVzcTb.js → TplModal-CQCrKeKP.js} +1 -1
- package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-Dah0pgt-.js} +50 -19
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js.map +1 -0
- package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-56lVcdot.js +1220 -0
- package/dist/cdn/chunks/CloudEditor-56lVcdot.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +1 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js +113 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js.map +1 -0
- package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js +423 -0
- package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js +544 -0
- package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js +171 -0
- package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +24 -0
- package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +1 -0
- package/dist/cdn/chunks/de-B05yW8Gi.js +840 -0
- package/dist/cdn/chunks/de-B05yW8Gi.js.map +1 -0
- package/dist/cdn/chunks/de-BPHtelu7.js +209 -0
- package/dist/cdn/chunks/de-BPHtelu7.js.map +1 -0
- package/dist/cdn/chunks/de-BRDqJwJe.js +89 -0
- package/dist/cdn/chunks/de-BRDqJwJe.js.map +1 -0
- package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
- package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
- package/dist/cdn/chunks/emojiData-DUHzsh4j.js +19 -0
- package/dist/cdn/chunks/emojiData-DUHzsh4j.js.map +1 -0
- package/dist/cdn/chunks/en-BII7695P.js +840 -0
- package/dist/cdn/chunks/en-BII7695P.js.map +1 -0
- package/dist/cdn/chunks/en-Cdj_Ikl1.js +89 -0
- package/dist/cdn/chunks/en-Cdj_Ikl1.js.map +1 -0
- package/dist/cdn/chunks/en-DejwuJhw.js +209 -0
- package/dist/cdn/chunks/en-DejwuJhw.js.map +1 -0
- package/dist/cdn/chunks/extensions-B0eT-yjf.js +598 -0
- package/dist/cdn/chunks/extensions-B0eT-yjf.js.map +1 -0
- package/dist/cdn/chunks/features-BrvE2Fzv.js +9677 -0
- package/dist/cdn/chunks/features-BrvE2Fzv.js.map +1 -0
- package/dist/cdn/chunks/icons-C7wtAD8p.js +1043 -0
- package/dist/cdn/chunks/icons-C7wtAD8p.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-CllF-us3.js +3279 -0
- package/dist/cdn/chunks/liquid.browser-CllF-us3.js.map +1 -0
- package/dist/cdn/chunks/media-library-Cl5XuaKy.js +6030 -0
- package/dist/cdn/chunks/media-library-Cl5XuaKy.js.map +1 -0
- package/dist/cdn/chunks/pusher-i7-OBujc.js +2508 -0
- package/dist/cdn/chunks/pusher-i7-OBujc.js.map +1 -0
- package/dist/cdn/chunks/quality-Va91a3N8.js +1456 -0
- package/dist/cdn/chunks/quality-Va91a3N8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
- package/dist/cdn/chunks/renderer-si0Zgxeb.js +642 -0
- package/dist/cdn/chunks/renderer-si0Zgxeb.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
- package/dist/cdn/chunks/src-BLyYIbdZ.js +497 -0
- package/dist/cdn/chunks/src-BLyYIbdZ.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DfcU8u_r.js +57 -0
- package/dist/cdn/chunks/styleConstants-DfcU8u_r.js.map +1 -0
- package/dist/cdn/chunks/styles-C6BQLT9F.js +5807 -0
- package/dist/cdn/chunks/styles-C6BQLT9F.js.map +1 -0
- package/dist/cdn/chunks/tiptap-D8whBv5F.js +14654 -0
- package/dist/cdn/chunks/tiptap-D8whBv5F.js.map +1 -0
- package/dist/cdn/editor.css +2 -0
- package/dist/cdn/editor.js +367 -0
- package/dist/cdn/editor.js.map +1 -0
- package/dist/{cloud-6ZmAvF0j.js → cloud-BoS0J0vs.js} +1 -1
- package/dist/{de-DWcgp-7T.js → de-C74F9xK3.js} +112 -3
- package/dist/dist-C2grMquk.js +1261 -0
- package/dist/{dist-CivF9P8b.js → dist-Djgi0A6k.js} +92 -77
- package/dist/{en-Cxd4fhNm.js → en-B24jVTeO.js} +112 -3
- package/dist/{extensions-D__hOlV1.js → extensions-DsmjHqBF.js} +14 -14
- package/dist/index.d.ts +21 -10
- package/dist/{pencil-BZJPNYWR.js → pencil-Bpimrzzw.js} +5 -2
- package/dist/style.css +1 -1
- package/dist/styles-BMFMtR9R.js +6341 -0
- package/dist/templatical-editor.js +197 -139
- package/dist/undo-2-m1EUDbUg.js +16 -0
- package/dist/{useEditorCore-wslttMH-.js → useEditorCore-CtNAo0uy.js} +2154 -2025
- package/dist/useMergeTag-2vTcVpNo.js +34 -0
- package/package.json +12 -12
- package/dist/CountdownBlock-DaYGxKqo.js +0 -92
- package/dist/check-DJrpDKO_.js +0 -7
- package/dist/dist-C04s_fLA.js +0 -563
- package/dist/styles-B4tjX5SP.js +0 -5224
- package/dist/useMergeTag-DX0XG5V9.js +0 -34
- /package/dist/{clock-ik2pRJKG.js → clock-Ba4p3rJM.js} +0 -0
- /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberWithSuffix-DfVBnsgc.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 tpl:w-full tpl:min-w-0',\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 tpl:w-full tpl:min-w-0',\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,KAA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,EAAO;GACb,MAAK;GACJ,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,MAAK;MAItC,EAAO,QAAA,GAAA,EAFf,EAKE,EAJK,EAAO,KAAI,EAAA;;GAEf,MAAM;GACN,gBAAc;cAEjB,EAAsC,QAAA,IAAA,EAAtB,EAAO,MAAK,EAAA,EAAA,EAAA,EAAA,IAAA,GAAA;;;;;;yBEnEhC,EAGM,OAHN,IAGM,CAFS,EAAA,SAAA,GAAA,EAAb,EAA2D,SAAA;;GAAtC,OAAK,EAAE,EAAA,EAAU,CAAA;OAAK,EAAA,MAAK,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA,EAChD,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;;;;;;EEEZ,IAAM,IAAO;yBAMX,EAeM,OAfN,IAeM,CAdJ,EAYE,SAAA;GAXA,MAAK;GACJ,OAAK,EAAE,EAAA,EAAoB,CAAA;GAC3B,OAAO,EAAA;GACP,KAAK,EAAA;GACL,KAAK,EAAA;GACL,SAAK,AAAA,EAAA,QAAA,MAAW,EAAA,qBAA+C,OAAQ,EAAO,OAA4B,MAAK,CAAA;oBAOlH,EAAmD,QAAA,EAA5C,OAAK,EAAE,EAAA,EAAgB,CAAA,EAAA,EAAA,EAAK,EAAA,OAAM,EAAA,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { C as e, D as t, I as n, P as r, X as i, _ as a, b as o, ct as s, d as c, dt as l, f as u, ft as d, g as f, h as p, m, p as h, tt as g, u as _, ut as v, v as y, x as b, z as x } from "./draggable-C-1_gch3.js";
|
|
2
|
+
import { Bt as S, St as C, Z as w, at as T, cn as E, et as D, fn as O, it as k, ln as A, tn as j, un as M } from "./features-BrvE2Fzv.js";
|
|
3
|
+
import { D as N, J as P, Q as ee, Y as te, a as ne, c as re, dt as ie, f as F, h as I, l as L, m as R, q as z, u as B, w as V, y as H } from "./icons-C7wtAD8p.js";
|
|
4
|
+
import { a as U, o as W, s as G } from "./styleConstants-DfcU8u_r.js";
|
|
5
|
+
import { n as K, t as q } from "./RichTextEditorContent-C2q8sbp2.js";
|
|
6
|
+
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var J = [
|
|
8
|
+
"aria-label",
|
|
9
|
+
"title",
|
|
10
|
+
"aria-expanded"
|
|
11
|
+
], Y = ["aria-label"], ae = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, oe = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, se = ["aria-label", "onClick"], ce = /* @__PURE__ */ e({
|
|
12
|
+
__name: "EmojiPickerDropdown",
|
|
13
|
+
emits: ["insert"],
|
|
14
|
+
setup(e, { emit: t }) {
|
|
15
|
+
let i = t, { categories: o, isOpen: l, toggle: f, close: h } = D(), { t: x, format: C } = S(), w = g(null), T = g(null);
|
|
16
|
+
k(w, m(() => l.value)), O(T, () => {
|
|
17
|
+
l.value && h();
|
|
18
|
+
});
|
|
19
|
+
function E(e) {
|
|
20
|
+
i("insert", e), h();
|
|
21
|
+
}
|
|
22
|
+
return (e, t) => (r(), y("div", {
|
|
23
|
+
ref_key: "rootRef",
|
|
24
|
+
ref: T,
|
|
25
|
+
class: "tpl:relative"
|
|
26
|
+
}, [p("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
class: v(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": s(l) }]),
|
|
29
|
+
"aria-label": s(x).paragraphEditor.insertEmoji,
|
|
30
|
+
title: s(x).paragraphEditor.insertEmoji,
|
|
31
|
+
"aria-expanded": s(l),
|
|
32
|
+
"aria-haspopup": "dialog",
|
|
33
|
+
"aria-controls": "tpl-emoji-picker",
|
|
34
|
+
onClick: t[0] ||= (...e) => s(f) && s(f)(...e)
|
|
35
|
+
}, [b(s(H), {
|
|
36
|
+
size: 16,
|
|
37
|
+
"stroke-width": 2
|
|
38
|
+
})], 10, J), s(l) ? (r(), y("div", {
|
|
39
|
+
key: 0,
|
|
40
|
+
id: "tpl-emoji-picker",
|
|
41
|
+
ref_key: "pickerRef",
|
|
42
|
+
ref: w,
|
|
43
|
+
role: "dialog",
|
|
44
|
+
"aria-modal": "false",
|
|
45
|
+
"aria-label": s(x).paragraphEditor.insertEmoji,
|
|
46
|
+
tabindex: "-1",
|
|
47
|
+
class: "tpl-emoji-picker tpl:absolute tpl:top-full tpl:left-0 tpl:z-10 tpl:mt-2 tpl:w-72 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:shadow-lg",
|
|
48
|
+
onKeydown: t[1] ||= _(c((...e) => s(h) && s(h)(...e), ["stop", "prevent"]), ["esc"])
|
|
49
|
+
}, [(r(!0), y(u, null, n(s(o), (e) => (r(), y("div", {
|
|
50
|
+
key: e.key,
|
|
51
|
+
class: "tpl:mb-2 tpl:last:mb-0"
|
|
52
|
+
}, [p("div", ae, d(s(x).emoji[e.key]), 1), p("div", oe, [(r(!0), y(u, null, n(e.emojis, (e) => (r(), y("button", {
|
|
53
|
+
key: e,
|
|
54
|
+
type: "button",
|
|
55
|
+
"aria-label": s(C)(s(x).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
56
|
+
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:text-base tpl:transition-all tpl:duration-100 tpl:hover:scale-125 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
57
|
+
onClick: (t) => E(e)
|
|
58
|
+
}, d(e), 9, se))), 128))])]))), 128))], 40, Y)) : a("", !0)], 512));
|
|
59
|
+
}
|
|
60
|
+
}), le = [
|
|
61
|
+
"aria-label",
|
|
62
|
+
"title",
|
|
63
|
+
"aria-pressed"
|
|
64
|
+
], X = /* @__PURE__ */ e({
|
|
65
|
+
__name: "ToolbarIconButton",
|
|
66
|
+
props: {
|
|
67
|
+
icon: {},
|
|
68
|
+
label: {},
|
|
69
|
+
active: { type: Boolean },
|
|
70
|
+
strokeWidth: {},
|
|
71
|
+
size: {}
|
|
72
|
+
},
|
|
73
|
+
setup(e) {
|
|
74
|
+
return (t, n) => (r(), y("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
class: v(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.active }]),
|
|
77
|
+
"aria-label": e.label,
|
|
78
|
+
title: e.label,
|
|
79
|
+
"aria-pressed": e.active ? "true" : "false"
|
|
80
|
+
}, [(r(), f(x(e.icon), {
|
|
81
|
+
size: e.size ?? 16,
|
|
82
|
+
"stroke-width": e.strokeWidth ?? 2
|
|
83
|
+
}, null, 8, ["size", "stroke-width"]))], 10, le));
|
|
84
|
+
}
|
|
85
|
+
}), ue = {}, de = {
|
|
86
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
87
|
+
"aria-hidden": "true"
|
|
88
|
+
};
|
|
89
|
+
function fe(e, t) {
|
|
90
|
+
return r(), y("span", de);
|
|
91
|
+
}
|
|
92
|
+
var Z = /* @__PURE__ */ T(ue, [["render", fe]]), pe = [
|
|
93
|
+
"value",
|
|
94
|
+
"aria-label",
|
|
95
|
+
"title"
|
|
96
|
+
], me = { value: "" }, he = ["value"], Q = /* @__PURE__ */ e({
|
|
97
|
+
__name: "ToolbarSelect",
|
|
98
|
+
props: {
|
|
99
|
+
modelValue: {},
|
|
100
|
+
options: {},
|
|
101
|
+
label: {},
|
|
102
|
+
placeholder: {},
|
|
103
|
+
widthClass: {}
|
|
104
|
+
},
|
|
105
|
+
emits: ["update:modelValue"],
|
|
106
|
+
setup(e, { emit: t }) {
|
|
107
|
+
let i = t;
|
|
108
|
+
function a(e) {
|
|
109
|
+
i("update:modelValue", e.target.value);
|
|
110
|
+
}
|
|
111
|
+
function o(e) {
|
|
112
|
+
return typeof e == "string" ? e : e.value;
|
|
113
|
+
}
|
|
114
|
+
function s(e) {
|
|
115
|
+
return typeof e == "string" ? e : e.label;
|
|
116
|
+
}
|
|
117
|
+
return (t, i) => (r(), y("select", {
|
|
118
|
+
class: v(["tpl:h-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none", e.widthClass ?? "tpl:w-20"]),
|
|
119
|
+
value: e.modelValue,
|
|
120
|
+
"aria-label": e.label,
|
|
121
|
+
title: e.label,
|
|
122
|
+
onChange: a
|
|
123
|
+
}, [p("option", me, d(e.placeholder ?? ""), 1), (r(!0), y(u, null, n(e.options, (e) => (r(), y("option", {
|
|
124
|
+
key: o(e),
|
|
125
|
+
value: o(e)
|
|
126
|
+
}, d(s(e)), 9, he))), 128))], 42, pe));
|
|
127
|
+
}
|
|
128
|
+
}), ge = ["data-tpl-theme", "aria-label"], _e = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ve = { class: "tpl:relative" }, ye = [
|
|
129
|
+
"value",
|
|
130
|
+
"aria-label",
|
|
131
|
+
"title"
|
|
132
|
+
], be = { class: "tpl:relative" }, $ = [
|
|
133
|
+
"value",
|
|
134
|
+
"aria-label",
|
|
135
|
+
"title"
|
|
136
|
+
], xe = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Se = ["aria-label", "title"], Ce = {
|
|
137
|
+
key: 1,
|
|
138
|
+
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
139
|
+
}, we = /* @__PURE__ */ e({
|
|
140
|
+
__name: "ParagraphToolbar",
|
|
141
|
+
props: {
|
|
142
|
+
editor: {},
|
|
143
|
+
toolbarPosition: {},
|
|
144
|
+
isLoading: { type: Boolean },
|
|
145
|
+
canRequestMergeTag: { type: Boolean }
|
|
146
|
+
},
|
|
147
|
+
emits: ["open-link-dialog", "add-merge-tag"],
|
|
148
|
+
setup(e, { emit: n }) {
|
|
149
|
+
let i = e, c = n, m = t(E, null), g = t(A, null), _ = M(j, "ParagraphToolbar"), { t: v } = S(), x = _.fonts;
|
|
150
|
+
function w(e) {
|
|
151
|
+
i.editor?.chain().focus().insertContent(e).run();
|
|
152
|
+
}
|
|
153
|
+
function T(e) {
|
|
154
|
+
return i.editor?.getAttributes("textStyle")[e] || "";
|
|
155
|
+
}
|
|
156
|
+
function D(e) {
|
|
157
|
+
let t = i.editor?.chain().focus();
|
|
158
|
+
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
159
|
+
}
|
|
160
|
+
function O(e) {
|
|
161
|
+
let t = i.editor?.chain().focus();
|
|
162
|
+
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
163
|
+
}
|
|
164
|
+
function k(e) {
|
|
165
|
+
let t = i.editor?.chain().focus();
|
|
166
|
+
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
167
|
+
}
|
|
168
|
+
function H() {
|
|
169
|
+
return i.editor?.getAttributes("paragraph").lineHeight || "";
|
|
170
|
+
}
|
|
171
|
+
function K(e) {
|
|
172
|
+
let t = i.editor?.chain().focus();
|
|
173
|
+
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
174
|
+
}
|
|
175
|
+
function q(e) {
|
|
176
|
+
let t = i.editor?.chain().focus();
|
|
177
|
+
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
178
|
+
}
|
|
179
|
+
function J() {
|
|
180
|
+
return i.editor?.getAttributes("highlight").color || "";
|
|
181
|
+
}
|
|
182
|
+
function Y(e) {
|
|
183
|
+
let t = i.editor?.chain().focus();
|
|
184
|
+
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
185
|
+
}
|
|
186
|
+
return (t, n) => (r(), f(h, { to: "body" }, [p("div", {
|
|
187
|
+
"data-tpl-theme": s(g),
|
|
188
|
+
role: "toolbar",
|
|
189
|
+
"aria-label": s(v).paragraphEditor.toolbar,
|
|
190
|
+
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",
|
|
191
|
+
style: l({
|
|
192
|
+
...s(m),
|
|
193
|
+
top: `${e.toolbarPosition.top}px`,
|
|
194
|
+
left: `${e.toolbarPosition.left}px`,
|
|
195
|
+
transform: "translateY(-100%)",
|
|
196
|
+
flexDirection: "column"
|
|
197
|
+
})
|
|
198
|
+
}, [!e.isLoading && e.editor ? (r(), y(u, { key: 0 }, [p("div", _e, [
|
|
199
|
+
b(Q, {
|
|
200
|
+
"model-value": T("fontFamily"),
|
|
201
|
+
options: s(x),
|
|
202
|
+
label: s(v).paragraphEditor.fontFamily,
|
|
203
|
+
placeholder: s(v).paragraphEditor.defaultFont,
|
|
204
|
+
"width-class": "tpl:w-32",
|
|
205
|
+
"onUpdate:modelValue": D
|
|
206
|
+
}, null, 8, [
|
|
207
|
+
"model-value",
|
|
208
|
+
"options",
|
|
209
|
+
"label",
|
|
210
|
+
"placeholder"
|
|
211
|
+
]),
|
|
212
|
+
b(Q, {
|
|
213
|
+
"model-value": T("fontSize"),
|
|
214
|
+
options: s(U),
|
|
215
|
+
label: s(v).paragraphEditor.fontSize,
|
|
216
|
+
placeholder: s(v).paragraphEditor.defaultSize,
|
|
217
|
+
"width-class": "tpl:w-20",
|
|
218
|
+
"onUpdate:modelValue": O
|
|
219
|
+
}, null, 8, [
|
|
220
|
+
"model-value",
|
|
221
|
+
"options",
|
|
222
|
+
"label",
|
|
223
|
+
"placeholder"
|
|
224
|
+
]),
|
|
225
|
+
b(Z),
|
|
226
|
+
p("div", ve, [p("input", {
|
|
227
|
+
type: "color",
|
|
228
|
+
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
229
|
+
value: T("color") || s("#000000"),
|
|
230
|
+
"aria-label": s(v).paragraphEditor.textColor,
|
|
231
|
+
title: s(v).paragraphEditor.textColor,
|
|
232
|
+
onInput: n[0] ||= (e) => k(e.target.value)
|
|
233
|
+
}, null, 40, ye)]),
|
|
234
|
+
p("div", be, [p("input", {
|
|
235
|
+
type: "color",
|
|
236
|
+
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
237
|
+
style: l({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
238
|
+
value: J() || s("#ffff00"),
|
|
239
|
+
"aria-label": s(v).paragraphEditor.highlightColor,
|
|
240
|
+
title: s(v).paragraphEditor.highlightColor,
|
|
241
|
+
onInput: n[1] ||= (e) => Y(e.target.value)
|
|
242
|
+
}, null, 44, $)]),
|
|
243
|
+
b(Z),
|
|
244
|
+
b(X, {
|
|
245
|
+
icon: s(ie),
|
|
246
|
+
label: s(v).paragraphEditor.bold,
|
|
247
|
+
active: e.editor.isActive("bold"),
|
|
248
|
+
"stroke-width": 2.5,
|
|
249
|
+
onClick: n[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
250
|
+
}, null, 8, [
|
|
251
|
+
"icon",
|
|
252
|
+
"label",
|
|
253
|
+
"active"
|
|
254
|
+
]),
|
|
255
|
+
b(X, {
|
|
256
|
+
icon: s(ee),
|
|
257
|
+
label: s(v).paragraphEditor.italic,
|
|
258
|
+
active: e.editor.isActive("italic"),
|
|
259
|
+
onClick: n[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
260
|
+
}, null, 8, [
|
|
261
|
+
"icon",
|
|
262
|
+
"label",
|
|
263
|
+
"active"
|
|
264
|
+
]),
|
|
265
|
+
b(X, {
|
|
266
|
+
icon: s(ne),
|
|
267
|
+
label: s(v).paragraphEditor.underline,
|
|
268
|
+
active: e.editor.isActive("underline"),
|
|
269
|
+
onClick: n[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
270
|
+
}, null, 8, [
|
|
271
|
+
"icon",
|
|
272
|
+
"label",
|
|
273
|
+
"active"
|
|
274
|
+
]),
|
|
275
|
+
b(X, {
|
|
276
|
+
icon: s(I),
|
|
277
|
+
label: s(v).paragraphEditor.strikethrough,
|
|
278
|
+
active: e.editor.isActive("strike"),
|
|
279
|
+
onClick: n[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
280
|
+
}, null, 8, [
|
|
281
|
+
"icon",
|
|
282
|
+
"label",
|
|
283
|
+
"active"
|
|
284
|
+
]),
|
|
285
|
+
b(Z),
|
|
286
|
+
b(X, {
|
|
287
|
+
icon: s(R),
|
|
288
|
+
label: s(v).paragraphEditor.subscript,
|
|
289
|
+
active: e.editor.isActive("subscript"),
|
|
290
|
+
onClick: n[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
291
|
+
}, null, 8, [
|
|
292
|
+
"icon",
|
|
293
|
+
"label",
|
|
294
|
+
"active"
|
|
295
|
+
]),
|
|
296
|
+
b(X, {
|
|
297
|
+
icon: s(F),
|
|
298
|
+
label: s(v).paragraphEditor.superscript,
|
|
299
|
+
active: e.editor.isActive("superscript"),
|
|
300
|
+
onClick: n[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
301
|
+
}, null, 8, [
|
|
302
|
+
"icon",
|
|
303
|
+
"label",
|
|
304
|
+
"active"
|
|
305
|
+
]),
|
|
306
|
+
b(Z),
|
|
307
|
+
b(X, {
|
|
308
|
+
icon: s(te),
|
|
309
|
+
label: s(v).paragraphEditor.addLink,
|
|
310
|
+
active: e.editor.isActive("link"),
|
|
311
|
+
onClick: n[8] ||= (e) => c("open-link-dialog")
|
|
312
|
+
}, null, 8, [
|
|
313
|
+
"icon",
|
|
314
|
+
"label",
|
|
315
|
+
"active"
|
|
316
|
+
])
|
|
317
|
+
]), p("div", xe, [
|
|
318
|
+
b(X, {
|
|
319
|
+
icon: s(z),
|
|
320
|
+
label: s(v).paragraphEditor.bulletList,
|
|
321
|
+
active: e.editor.isActive("bulletList"),
|
|
322
|
+
onClick: n[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
323
|
+
}, null, 8, [
|
|
324
|
+
"icon",
|
|
325
|
+
"label",
|
|
326
|
+
"active"
|
|
327
|
+
]),
|
|
328
|
+
b(X, {
|
|
329
|
+
icon: s(P),
|
|
330
|
+
label: s(v).paragraphEditor.numberedList,
|
|
331
|
+
active: e.editor.isActive("orderedList"),
|
|
332
|
+
onClick: n[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
333
|
+
}, null, 8, [
|
|
334
|
+
"icon",
|
|
335
|
+
"label",
|
|
336
|
+
"active"
|
|
337
|
+
]),
|
|
338
|
+
b(Z),
|
|
339
|
+
b(X, {
|
|
340
|
+
icon: s(re),
|
|
341
|
+
label: s(v).paragraphEditor.alignLeft,
|
|
342
|
+
active: e.editor.isActive({ textAlign: "left" }),
|
|
343
|
+
onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
344
|
+
}, null, 8, [
|
|
345
|
+
"icon",
|
|
346
|
+
"label",
|
|
347
|
+
"active"
|
|
348
|
+
]),
|
|
349
|
+
b(X, {
|
|
350
|
+
icon: s(B),
|
|
351
|
+
label: s(v).paragraphEditor.alignCenter,
|
|
352
|
+
active: e.editor.isActive({ textAlign: "center" }),
|
|
353
|
+
onClick: n[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
354
|
+
}, null, 8, [
|
|
355
|
+
"icon",
|
|
356
|
+
"label",
|
|
357
|
+
"active"
|
|
358
|
+
]),
|
|
359
|
+
b(X, {
|
|
360
|
+
icon: s(L),
|
|
361
|
+
label: s(v).paragraphEditor.alignRight,
|
|
362
|
+
active: e.editor.isActive({ textAlign: "right" }),
|
|
363
|
+
onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
364
|
+
}, null, 8, [
|
|
365
|
+
"icon",
|
|
366
|
+
"label",
|
|
367
|
+
"active"
|
|
368
|
+
]),
|
|
369
|
+
b(Z),
|
|
370
|
+
b(Q, {
|
|
371
|
+
"model-value": H(),
|
|
372
|
+
options: s(G),
|
|
373
|
+
label: s(v).paragraphEditor.lineHeight,
|
|
374
|
+
placeholder: "LH",
|
|
375
|
+
"width-class": "tpl:w-16",
|
|
376
|
+
"onUpdate:modelValue": K
|
|
377
|
+
}, null, 8, [
|
|
378
|
+
"model-value",
|
|
379
|
+
"options",
|
|
380
|
+
"label"
|
|
381
|
+
]),
|
|
382
|
+
b(Q, {
|
|
383
|
+
"model-value": T("letterSpacing"),
|
|
384
|
+
options: s(W),
|
|
385
|
+
label: s(v).paragraphEditor.letterSpacing,
|
|
386
|
+
placeholder: "LS",
|
|
387
|
+
"width-class": "tpl:w-20",
|
|
388
|
+
"onUpdate:modelValue": q
|
|
389
|
+
}, null, 8, [
|
|
390
|
+
"model-value",
|
|
391
|
+
"options",
|
|
392
|
+
"label"
|
|
393
|
+
]),
|
|
394
|
+
b(Z),
|
|
395
|
+
b(X, {
|
|
396
|
+
icon: s(N),
|
|
397
|
+
label: s(v).paragraphEditor.clearFormatting,
|
|
398
|
+
onClick: n[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
399
|
+
}, null, 8, ["icon", "label"]),
|
|
400
|
+
b(Z),
|
|
401
|
+
b(ce, { onInsert: w }),
|
|
402
|
+
e.canRequestMergeTag ? (r(), y(u, { key: 0 }, [b(Z), p("button", {
|
|
403
|
+
type: "button",
|
|
404
|
+
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)]",
|
|
405
|
+
"aria-label": s(v).mergeTag.add,
|
|
406
|
+
title: s(v).mergeTag.add,
|
|
407
|
+
onClick: n[15] ||= (e) => c("add-merge-tag")
|
|
408
|
+
}, [b(s(V), {
|
|
409
|
+
size: 16,
|
|
410
|
+
"stroke-width": 2
|
|
411
|
+
}), o(" " + d(s(v).mergeTag.add), 1)], 8, Se)], 64)) : a("", !0)
|
|
412
|
+
])], 64)) : (r(), y("div", Ce, [b(s(C), {
|
|
413
|
+
class: "tpl-spinner",
|
|
414
|
+
size: 14,
|
|
415
|
+
"stroke-width": 2
|
|
416
|
+
}), o(" " + d(s(v).errors.editorLoading), 1)]))], 12, ge)]));
|
|
417
|
+
}
|
|
418
|
+
}), Te = { class: "tpl-text-editor-wrapper tpl:relative" }, Ee = /* @__PURE__ */ e({
|
|
419
|
+
__name: "ParagraphEditor",
|
|
420
|
+
props: {
|
|
421
|
+
block: {},
|
|
422
|
+
toolbarPosition: {}
|
|
423
|
+
},
|
|
424
|
+
emits: ["done"],
|
|
425
|
+
setup(e, { emit: t }) {
|
|
426
|
+
let n = e, a = t, { editor: o, EditorContent: c, isLoading: l, initError: u, retry: d, showLinkDialog: f, linkUrl: p, linkDialogRef: m, canRequestMergeTag: h, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: x, handleLinkKeydown: S, handleAddMergeTag: C } = w({
|
|
427
|
+
blockId: () => n.block.id,
|
|
428
|
+
blockContent: () => n.block.content,
|
|
429
|
+
onDone: () => a("done"),
|
|
430
|
+
editorName: "ParagraphEditor",
|
|
431
|
+
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
432
|
+
let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { default: l }, { default: u }, { default: d }, { default: f }, { TextStyle: p }, { default: m }, { default: h }, { default: g }, { MergeTagNode: _, MergeTagSuggestion: v, LogicMergeTagNode: y, FontSize: b, LineHeight: x, LetterSpacing: S }] = await Promise.all([
|
|
433
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.i),
|
|
434
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.a),
|
|
435
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.u),
|
|
436
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.o),
|
|
437
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.l),
|
|
438
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.c),
|
|
439
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.s),
|
|
440
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.m),
|
|
441
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.p),
|
|
442
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.f),
|
|
443
|
+
import("./tiptap-D8whBv5F.js").then((e) => e.d),
|
|
444
|
+
import("./extensions-B0eT-yjf.js")
|
|
445
|
+
]);
|
|
446
|
+
return {
|
|
447
|
+
TiptapEditor: a,
|
|
448
|
+
EC: o,
|
|
449
|
+
extensions: [
|
|
450
|
+
s.configure({
|
|
451
|
+
heading: !1,
|
|
452
|
+
codeBlock: !1,
|
|
453
|
+
blockquote: !1,
|
|
454
|
+
horizontalRule: !1
|
|
455
|
+
}),
|
|
456
|
+
l,
|
|
457
|
+
u,
|
|
458
|
+
d,
|
|
459
|
+
c.configure({
|
|
460
|
+
openOnClick: !1,
|
|
461
|
+
HTMLAttributes: {
|
|
462
|
+
target: "_blank",
|
|
463
|
+
rel: "noopener noreferrer"
|
|
464
|
+
}
|
|
465
|
+
}),
|
|
466
|
+
f.configure({ types: ["paragraph"] }),
|
|
467
|
+
p,
|
|
468
|
+
m,
|
|
469
|
+
h,
|
|
470
|
+
g.configure({ multicolor: !0 }),
|
|
471
|
+
b,
|
|
472
|
+
x,
|
|
473
|
+
S,
|
|
474
|
+
_.configure({
|
|
475
|
+
mergeTags: e,
|
|
476
|
+
syntax: t
|
|
477
|
+
}),
|
|
478
|
+
y.configure({ syntax: t }),
|
|
479
|
+
...r && n && e.length > 0 ? [v.configure({
|
|
480
|
+
mergeTags: e,
|
|
481
|
+
char: n,
|
|
482
|
+
emptyText: i
|
|
483
|
+
})] : []
|
|
484
|
+
]
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
return (t, n) => (r(), y("div", Te, [
|
|
489
|
+
b(we, {
|
|
490
|
+
editor: s(o),
|
|
491
|
+
"toolbar-position": e.toolbarPosition,
|
|
492
|
+
"is-loading": s(l),
|
|
493
|
+
"can-request-merge-tag": s(h),
|
|
494
|
+
onOpenLinkDialog: s(g),
|
|
495
|
+
onAddMergeTag: s(C)
|
|
496
|
+
}, null, 8, [
|
|
497
|
+
"editor",
|
|
498
|
+
"toolbar-position",
|
|
499
|
+
"is-loading",
|
|
500
|
+
"can-request-merge-tag",
|
|
501
|
+
"onOpenLinkDialog",
|
|
502
|
+
"onAddMergeTag"
|
|
503
|
+
]),
|
|
504
|
+
b(q, {
|
|
505
|
+
editor: s(o),
|
|
506
|
+
"editor-content": s(c),
|
|
507
|
+
"is-loading": s(l),
|
|
508
|
+
"init-error": s(u),
|
|
509
|
+
onRetry: s(d)
|
|
510
|
+
}, null, 8, [
|
|
511
|
+
"editor",
|
|
512
|
+
"editor-content",
|
|
513
|
+
"is-loading",
|
|
514
|
+
"init-error",
|
|
515
|
+
"onRetry"
|
|
516
|
+
]),
|
|
517
|
+
b(K, {
|
|
518
|
+
visible: s(f),
|
|
519
|
+
"is-editing-link": s(o)?.isActive("link") ?? !1,
|
|
520
|
+
"dialog-ref": s(m),
|
|
521
|
+
"onUpdate:dialogRef": n[0] ||= (e) => i(m) ? m.value = e : null,
|
|
522
|
+
"link-url": s(p),
|
|
523
|
+
"onUpdate:linkUrl": n[1] ||= (e) => i(p) ? p.value = e : null,
|
|
524
|
+
onClose: s(x),
|
|
525
|
+
onInsert: s(_),
|
|
526
|
+
onRemove: s(v),
|
|
527
|
+
onKeydown: s(S)
|
|
528
|
+
}, null, 8, [
|
|
529
|
+
"visible",
|
|
530
|
+
"is-editing-link",
|
|
531
|
+
"dialog-ref",
|
|
532
|
+
"link-url",
|
|
533
|
+
"onClose",
|
|
534
|
+
"onInsert",
|
|
535
|
+
"onRemove",
|
|
536
|
+
"onKeydown"
|
|
537
|
+
])
|
|
538
|
+
]));
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
//#endregion
|
|
542
|
+
export { Ee as default };
|
|
543
|
+
|
|
544
|
+
//# sourceMappingURL=ParagraphEditor-1XJOpiLX.js.map
|