@mekari/pixel3-rich-text-editor 0.0.7-dev.4 → 0.0.8-dev.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.
Files changed (58) hide show
  1. package/dist/chunk-IYCO25GF.mjs +152 -0
  2. package/dist/chunk-JAKI6TU2.mjs +104 -0
  3. package/dist/chunk-JHFPEZ7I.mjs +74 -0
  4. package/dist/chunk-P5KVIGAP.mjs +204 -0
  5. package/dist/{chunk-HB4A6A3W.mjs → chunk-PLASPZGG.mjs} +28 -20
  6. package/dist/chunk-RNQQ7LGC.mjs +342 -0
  7. package/dist/chunk-V52XUOVW.mjs +64 -0
  8. package/dist/{chunk-Y2B3Z5EO.mjs → chunk-WBMECFO3.mjs} +31 -23
  9. package/dist/editor-toolbar.d.mts +16 -4
  10. package/dist/editor-toolbar.d.ts +16 -4
  11. package/dist/editor-toolbar.js +522 -166
  12. package/dist/editor-toolbar.mjs +8 -6
  13. package/dist/extensions/align-extension.d.mts +14 -4
  14. package/dist/extensions/align-extension.d.ts +14 -4
  15. package/dist/extensions/align-extension.js +138 -103
  16. package/dist/extensions/align-extension.mjs +2 -2
  17. package/dist/extensions/color-extension.d.mts +28 -0
  18. package/dist/extensions/color-extension.d.ts +28 -0
  19. package/dist/extensions/color-extension.js +415 -0
  20. package/dist/extensions/color-extension.mjs +8 -0
  21. package/dist/extensions/heading-extension.d.mts +14 -4
  22. package/dist/extensions/heading-extension.d.ts +14 -4
  23. package/dist/extensions/heading-extension.js +139 -74
  24. package/dist/extensions/heading-extension.mjs +2 -2
  25. package/dist/extensions/icons.d.mts +4 -1
  26. package/dist/extensions/icons.d.ts +4 -1
  27. package/dist/extensions/icons.js +114 -51
  28. package/dist/extensions/icons.mjs +7 -1
  29. package/dist/extensions/index.d.mts +3 -0
  30. package/dist/extensions/index.d.ts +3 -0
  31. package/dist/extensions/index.js +454 -130
  32. package/dist/extensions/index.mjs +13 -5
  33. package/dist/extensions/link-extension.d.mts +22 -0
  34. package/dist/extensions/link-extension.d.ts +22 -0
  35. package/dist/extensions/link-extension.js +546 -0
  36. package/dist/extensions/link-extension.mjs +8 -0
  37. package/dist/extensions/single-extension.d.mts +29 -10
  38. package/dist/extensions/single-extension.d.ts +29 -10
  39. package/dist/extensions/single-extension.js +134 -57
  40. package/dist/extensions/single-extension.mjs +2 -2
  41. package/dist/index.js +562 -201
  42. package/dist/index.mjs +9 -7
  43. package/dist/metafile-cjs.json +1 -1
  44. package/dist/metafile-esm.json +1 -1
  45. package/dist/modules/rich-text-editor.props.d.mts +3 -5
  46. package/dist/modules/rich-text-editor.props.d.ts +3 -5
  47. package/dist/modules/rich-text-editor.types.d.mts +4 -3
  48. package/dist/modules/rich-text-editor.types.d.ts +4 -3
  49. package/dist/rich-text-editor.d.mts +4 -5
  50. package/dist/rich-text-editor.d.ts +4 -5
  51. package/dist/rich-text-editor.js +562 -201
  52. package/dist/rich-text-editor.mjs +9 -7
  53. package/package.json +14 -6
  54. package/dist/chunk-J5QZDLNA.mjs +0 -282
  55. package/dist/chunk-MMFX326I.mjs +0 -44
  56. package/dist/chunk-O5NDSZL6.mjs +0 -124
  57. package/dist/chunk-SUI7NBPF.mjs +0 -107
  58. /package/dist/{chunk-CE52CW3F.mjs → chunk-VYCDVS5I.mjs} +0 -0
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -23,12 +24,15 @@ __export(editor_toolbar_exports, {
23
24
  EditorToolbar: () => EditorToolbar
24
25
  });
25
26
  module.exports = __toCommonJS(editor_toolbar_exports);
26
- var import_vue9 = require("vue");
27
- var import_vue10 = require("vue");
27
+ var import_vue13 = require("vue");
28
+ var import_vue14 = require("vue");
28
29
 
29
30
  // src/extensions/heading-extension.tsx
30
31
  var import_vue3 = require("vue");
31
32
  var import_vue4 = require("vue");
33
+ var import_css = require("@mekari/pixel3-styled-system/css");
34
+ var import_pixel3_text = require("@mekari/pixel3-text");
35
+ var import_pixel3_popover = require("@mekari/pixel3-popover");
32
36
 
33
37
  // src/extensions/icons.tsx
34
38
  var import_vue = require("vue");
@@ -37,17 +41,16 @@ var BoldIcon = (0, import_vue2.defineComponent)({
37
41
  name: "BoldIcon",
38
42
  setup() {
39
43
  return () => (0, import_vue.createVNode)("svg", {
40
- "width": "12",
41
- "height": "16",
42
- "viewBox": "0 0 12 16",
44
+ "width": "20",
45
+ "height": "20",
46
+ "viewBox": "0 0 20 20",
43
47
  "fill": "none",
44
48
  "xmlns": "http://www.w3.org/2000/svg"
45
49
  }, [(0, import_vue.createVNode)("path", {
46
- "d": "M1 8.00016H6C7.84095 8.00016 9.33333 6.50778 9.33333 4.66683C9.33333 2.82588 7.84095 1.3335 6 1.3335L1.92593 1.3335C1.41455 1.3335 1 1.74805 1 2.25942L1 8.00016ZM1 8.00016L7.66667 8.00016C9.50762 8.00016 11 9.49255 11 11.3335C11 13.1744 9.50761 14.6668 7.66666 14.6668H2.11111C1.49746 14.6668 1 14.1694 1 13.5557L1 8.00016Z",
47
- "stroke": "currentColor",
48
- "stroke-width": "1.5",
49
- "stroke-linecap": "round",
50
- "stroke-linejoin": "round"
50
+ "fill-rule": "evenodd",
51
+ "clip-rule": "evenodd",
52
+ "d": "M3.25 3.11111C3.25 2.08325 4.08325 1.25 5.11111 1.25H10C12.6233 1.25 14.75 3.37665 14.75 6C14.75 7.34675 14.1895 8.5626 13.2891 9.42701C15.2861 9.9888 16.75 11.8234 16.75 14C16.75 16.6234 14.6234 18.75 12 18.75H5.33333C4.18274 18.75 3.25 17.8173 3.25 16.6667L3.25 3.11111ZM10.0053 10.75C10.0035 10.75 10.0018 10.75 10 10.75H4.75V16.6667C4.75 16.9888 5.01117 17.25 5.33333 17.25H12C13.7949 17.25 15.25 15.7949 15.25 14C15.25 12.2051 13.7949 10.75 12 10.75L10.0053 10.75ZM4.75 9.25H10C10.0014 9.25 10.0027 9.25 10.0041 9.25C11.7971 9.2478 13.25 7.79357 13.25 6C13.25 4.20507 11.7949 2.75 10 2.75H5.11111C4.91167 2.75 4.75 2.91167 4.75 3.11111V9.25Z",
53
+ "fill": "currentColor"
51
54
  }, null)]);
52
55
  }
53
56
  });
@@ -55,17 +58,16 @@ var ItalicIcon = (0, import_vue2.defineComponent)({
55
58
  name: "ItalicIcon",
56
59
  setup() {
57
60
  return () => (0, import_vue.createVNode)("svg", {
58
- "width": "14",
59
- "height": "16",
60
- "viewBox": "0 0 14 16",
61
+ "width": "20",
62
+ "height": "20",
63
+ "viewBox": "0 0 20 20",
61
64
  "fill": "none",
62
65
  "xmlns": "http://www.w3.org/2000/svg"
63
66
  }, [(0, import_vue.createVNode)("path", {
64
- "d": "M4.50002 1.3335H12.8333M1.16675 14.6668H9.49998M8.66683 1.3335L5.33354 14.6668",
65
- "stroke": "currentColor",
66
- "stroke-width": "1.5",
67
- "stroke-linecap": "round",
68
- "stroke-linejoin": "round"
67
+ "fill-rule": "evenodd",
68
+ "clip-rule": "evenodd",
69
+ "d": "M11.9833 1.24999H6.99993C6.58571 1.24999 6.24993 1.58578 6.24993 1.99999C6.24993 2.41421 6.58571 2.74999 6.99993 2.74999H11.0395L7.41456 17.25H3C2.58579 17.25 2.25 17.5858 2.25 18C2.25 18.4142 2.58579 18.75 3 18.75H7.98445C7.99532 18.7502 8.00616 18.7502 8.01697 18.75H12.9999C13.4141 18.75 13.7499 18.4142 13.7499 18C13.7499 17.5858 13.4141 17.25 12.9999 17.25H8.96073L12.5857 2.74999H16.9998C17.414 2.74999 17.7498 2.41421 17.7498 1.99999C17.7498 1.58578 17.414 1.24999 16.9998 1.24999H12.0158C12.0049 1.24976 11.9941 1.24976 11.9833 1.24999Z",
70
+ "fill": "currentColor"
69
71
  }, null)]);
70
72
  }
71
73
  });
@@ -73,13 +75,15 @@ var UnderlineIcon = (0, import_vue2.defineComponent)({
73
75
  name: "UnderlineIcon",
74
76
  setup() {
75
77
  return () => (0, import_vue.createVNode)("svg", {
76
- "width": "16",
77
- "height": "16",
78
- "viewBox": "0 0 16 16",
78
+ "width": "20",
79
+ "height": "20",
80
+ "viewBox": "0 0 20 20",
79
81
  "fill": "none",
80
82
  "xmlns": "http://www.w3.org/2000/svg"
81
83
  }, [(0, import_vue.createVNode)("path", {
82
- "d": "M1 14.25C0.585786 14.25 0.25 14.5858 0.25 15C0.25 15.4142 0.585786 15.75 1 15.75L1 14.25ZM15 15.75C15.4142 15.75 15.75 15.4142 15.75 15C15.75 14.5858 15.4142 14.25 15 14.25V15.75ZM13.75 1C13.75 0.585786 13.4142 0.25 13 0.25C12.5858 0.25 12.25 0.585786 12.25 1H13.75ZM3.75 1C3.75 0.585786 3.41421 0.25 3 0.25C2.58579 0.25 2.25 0.585786 2.25 1H3.75ZM1 15.75L15 15.75V14.25L1 14.25L1 15.75ZM12.25 1V7H13.75V1H12.25ZM3.75 7V1H2.25V7H3.75ZM8 11.25C5.65279 11.25 3.75 9.34721 3.75 7H2.25C2.25 10.1756 4.82436 12.75 8 12.75V11.25ZM12.25 7C12.25 9.34721 10.3472 11.25 8 11.25V12.75C11.1756 12.75 13.75 10.1756 13.75 7H12.25Z",
84
+ "fill-rule": "evenodd",
85
+ "clip-rule": "evenodd",
86
+ "d": "M4.28571 1.25C4.69993 1.25 5.03571 1.58579 5.03571 2V8.85714C5.03571 11.5988 7.2583 13.8214 10 13.8214C12.7417 13.8214 14.9643 11.5988 14.9643 8.85714V2C14.9643 1.58579 15.3001 1.25 15.7143 1.25C16.1285 1.25 16.4643 1.58579 16.4643 2V8.85714C16.4643 12.4273 13.5701 15.3214 10 15.3214C6.42987 15.3214 3.53571 12.4273 3.53571 8.85714V2C3.53571 1.58579 3.8715 1.25 4.28571 1.25ZM1.25 18C1.25 17.5858 1.58579 17.25 2 17.25L18 17.25C18.4142 17.25 18.75 17.5858 18.75 18C18.75 18.4142 18.4142 18.75 18 18.75H2C1.58579 18.75 1.25 18.4142 1.25 18Z",
83
87
  "fill": "currentColor"
84
88
  }, null)]);
85
89
  }
@@ -88,13 +92,15 @@ var StrikeIcon = (0, import_vue2.defineComponent)({
88
92
  name: "StrikeIcon",
89
93
  setup() {
90
94
  return () => (0, import_vue.createVNode)("svg", {
91
- "width": "16",
92
- "height": "16",
93
- "viewBox": "0 0 16 16",
95
+ "width": "20",
96
+ "height": "20",
97
+ "viewBox": "0 0 20 20",
94
98
  "fill": "none",
95
99
  "xmlns": "http://www.w3.org/2000/svg"
96
100
  }, [(0, import_vue.createVNode)("path", {
97
- "d": "M1 7.25C0.585787 7.25 0.25 7.58579 0.25 8C0.25 8.41421 0.585786 8.75 1 8.75L1 7.25ZM15 8.75C15.4142 8.75 15.75 8.41422 15.75 8C15.75 7.58579 15.4142 7.25 15 7.25V8.75ZM11.75 3.59259C11.75 4.00681 12.0858 4.34259 12.5 4.34259C12.9142 4.34259 13.25 4.00681 13.25 3.59259H11.75ZM4.16799 12.0664C3.97965 11.6975 3.52791 11.5511 3.15899 11.7394C2.79007 11.9278 2.64367 12.3795 2.83201 12.7484L4.16799 12.0664ZM3.79533 5.9023C4.01752 6.25188 4.48103 6.35516 4.83061 6.13297C5.18019 5.91079 5.28346 5.44728 5.06127 5.0977L3.79533 5.9023ZM9.23449 7.2876C8.84104 7.15809 8.41711 7.37206 8.2876 7.76551C8.15809 8.15896 8.37206 8.58289 8.76551 8.7124L9.23449 7.2876ZM1 8.75L15 8.75V7.25L1 7.25L1 8.75ZM13.25 3.59259C13.25 3.27636 13.1143 2.91655 12.9402 2.60384C12.7507 2.26362 12.4657 1.88848 12.0695 1.53923C11.266 0.830943 10.0291 0.25 8.26471 0.25V1.75C9.67678 1.75 10.5576 2.20609 11.0776 2.66447C11.3431 2.89855 11.5214 3.13915 11.6297 3.33366C11.7533 3.55567 11.75 3.64957 11.75 3.59259H13.25ZM8.26471 0.25C4.6888 0.25 3.27941 2.64524 3.27941 4.11111H4.77941C4.77941 3.50291 5.48767 1.75 8.26471 1.75V0.25ZM11.75 11.3704C11.75 12.5369 10.7905 14.25 8.26471 14.25V15.75C11.6684 15.75 13.25 13.315 13.25 11.3704H11.75ZM8.26471 14.25C6.92152 14.25 6.0134 13.9003 5.39394 13.4745C4.76788 13.0442 4.39192 12.505 4.16799 12.0664L2.83201 12.7484C3.13749 13.3468 3.66154 14.1039 4.5443 14.7107C5.43366 15.3219 6.64319 15.75 8.26471 15.75V14.25ZM3.27941 4.11111C3.27941 4.62256 3.38349 5.25433 3.79533 5.9023L5.06127 5.0977C4.83648 4.74401 4.77941 4.4088 4.77941 4.11111H3.27941ZM8.76551 8.7124C10.0377 9.13116 10.7819 9.5689 11.2052 10.0002C11.5982 10.4006 11.75 10.8304 11.75 11.3704H13.25C13.25 10.48 12.9724 9.65929 12.2757 8.94946C11.6093 8.27047 10.6034 7.73819 9.23449 7.2876L8.76551 8.7124Z",
101
+ "fill-rule": "evenodd",
102
+ "clip-rule": "evenodd",
103
+ "d": "M4.71219 5.55556C4.71219 3.94153 6.27283 1.25 10.3025 1.25C12.2938 1.25 13.6819 1.90502 14.58 2.69664C15.0235 3.08756 15.3416 3.50668 15.5523 3.88509C15.7477 4.236 15.8929 4.62821 15.8929 4.96296C15.8929 5.37718 15.5571 5.71296 15.1429 5.71296C14.7286 5.71296 14.3929 5.37718 14.3929 4.96296C14.3929 4.97338 14.3924 4.97171 14.3889 4.95856C14.3794 4.92317 14.3475 4.80463 14.2418 4.61491C14.1122 4.38221 13.9009 4.09763 13.5881 3.82188C12.9735 3.28017 11.9415 2.75 10.3025 2.75C7.07171 2.75 6.21218 4.79921 6.21218 5.55556C6.21218 5.91104 6.28076 6.31532 6.55103 6.74055C6.77322 7.09013 6.66994 7.55364 6.32036 7.77583C5.97078 7.99801 5.50728 7.89474 5.28509 7.54516C4.82778 6.82564 4.71219 6.1248 4.71219 5.55556ZM14.3507 10.75H18C18.4142 10.75 18.75 10.4142 18.75 10C18.75 9.58579 18.4142 9.25 18 9.25H11.1602C11.1485 9.24973 11.1369 9.24973 11.1253 9.25L2 9.25C1.58579 9.25 1.25 9.58579 1.25 10C1.25 10.4142 1.58579 10.75 2 10.75L11.0212 10.75C12.4142 11.2197 13.2514 11.7136 13.7395 12.2109C14.2104 12.6906 14.3929 13.2098 14.3929 13.8519C14.3929 15.2406 13.2518 17.25 10.3025 17.25C8.74757 17.25 7.68819 16.8447 6.96095 16.3449C6.22712 15.8405 5.78688 15.2087 5.52513 14.696C5.3368 14.3271 4.88505 14.1807 4.51613 14.369C4.14721 14.5574 4.00082 15.0091 4.18915 15.378C4.53245 16.0505 5.12078 16.9002 6.11132 17.581C7.10845 18.2664 8.46924 18.75 10.3025 18.75C14.1297 18.75 15.8929 16.0187 15.8929 13.8519C15.8929 12.8593 15.5846 11.9493 14.81 11.1602C14.6706 11.0181 14.5176 10.8815 14.3507 10.75Z",
98
104
  "fill": "currentColor"
99
105
  }, null)]);
100
106
  }
@@ -121,17 +127,16 @@ var BulletListIcon = (0, import_vue2.defineComponent)({
121
127
  name: "BulletListIcon",
122
128
  setup() {
123
129
  return () => (0, import_vue.createVNode)("svg", {
124
- "width": "18",
125
- "height": "18",
126
- "viewBox": "0 0 16 16",
130
+ "width": "20",
131
+ "height": "20",
132
+ "viewBox": "0 0 20 20",
127
133
  "fill": "none",
128
134
  "xmlns": "http://www.w3.org/2000/svg"
129
135
  }, [(0, import_vue.createVNode)("path", {
130
- "d": "M7.16658 13.2085L14.6666 13.2085M7.16658 8.00016L14.6666 8.00016M7.16658 2.5835H14.6666M4.24992 2.79183C4.24992 3.59724 3.597 4.25016 2.79159 4.25016C1.98617 4.25016 1.33325 3.59724 1.33325 2.79183C1.33325 1.98641 1.98617 1.3335 2.79159 1.3335C3.597 1.3335 4.24992 1.98641 4.24992 2.79183ZM4.24992 8.00016C4.24992 8.80558 3.597 9.4585 2.79159 9.4585C1.98617 9.4585 1.33325 8.80558 1.33325 8.00016C1.33325 7.19475 1.98617 6.54183 2.79159 6.54183C3.597 6.54183 4.24992 7.19475 4.24992 8.00016ZM4.24992 13.2085C4.24992 14.0139 3.597 14.6668 2.79159 14.6668C1.98617 14.6668 1.33325 14.0139 1.33325 13.2085C1.33325 12.4031 1.98617 11.7502 2.79159 11.7502C3.597 11.7502 4.24992 12.4031 4.24992 13.2085Z",
131
- "stroke": "currentColor",
132
- "stroke-width": "1.5",
133
- "stroke-linecap": "round",
134
- "stroke-linejoin": "round"
136
+ "fill-rule": "evenodd",
137
+ "clip-rule": "evenodd",
138
+ "d": "M3.75 2.75C3.19772 2.75 2.75 3.19772 2.75 3.75C2.75 4.30228 3.19772 4.75 3.75 4.75C4.30228 4.75 4.75 4.30228 4.75 3.75C4.75 3.19772 4.30228 2.75 3.75 2.75ZM1.25 3.75C1.25 2.36929 2.36929 1.25 3.75 1.25C5.13071 1.25 6.25 2.36929 6.25 3.75C6.25 5.13071 5.13071 6.25 3.75 6.25C2.36929 6.25 1.25 5.13071 1.25 3.75ZM8.25 3.5C8.25 3.08579 8.58579 2.75 9 2.75H18C18.4142 2.75 18.75 3.08579 18.75 3.5C18.75 3.91421 18.4142 4.25 18 4.25H9C8.58579 4.25 8.25 3.91421 8.25 3.5ZM3.75 9C3.19772 9 2.75 9.44772 2.75 10C2.75 10.5523 3.19772 11 3.75 11C4.30228 11 4.75 10.5523 4.75 10C4.75 9.44772 4.30228 9 3.75 9ZM1.25 10C1.25 8.61929 2.36929 7.5 3.75 7.5C5.13071 7.5 6.25 8.61929 6.25 10C6.25 11.3807 5.13071 12.5 3.75 12.5C2.36929 12.5 1.25 11.3807 1.25 10ZM8.25 10C8.25 9.58579 8.58579 9.25 9 9.25L18 9.25C18.4142 9.25 18.75 9.58579 18.75 10C18.75 10.4142 18.4142 10.75 18 10.75L9 10.75C8.58579 10.75 8.25 10.4142 8.25 10ZM3.75 15.25C3.19772 15.25 2.75 15.6977 2.75 16.25C2.75 16.8023 3.19772 17.25 3.75 17.25C4.30228 17.25 4.75 16.8023 4.75 16.25C4.75 15.6977 4.30228 15.25 3.75 15.25ZM1.25 16.25C1.25 14.8693 2.36929 13.75 3.75 13.75C5.13071 13.75 6.25 14.8693 6.25 16.25C6.25 17.6307 5.13071 18.75 3.75 18.75C2.36929 18.75 1.25 17.6307 1.25 16.25ZM8.25 16.25C8.25 15.8358 8.58579 15.5 9 15.5L18 15.5C18.4142 15.5 18.75 15.8358 18.75 16.25C18.75 16.6642 18.4142 17 18 17L9 17C8.58579 17 8.25 16.6642 8.25 16.25Z",
139
+ "fill": "currentColor"
135
140
  }, null)]);
136
141
  }
137
142
  });
@@ -139,13 +144,15 @@ var OrderedListIcon = (0, import_vue2.defineComponent)({
139
144
  name: "OrderedListIcon",
140
145
  setup() {
141
146
  return () => (0, import_vue.createVNode)("svg", {
142
- "width": "18",
143
- "height": "18",
144
- "viewBox": "0 0 16 16",
147
+ "width": "20",
148
+ "height": "20",
149
+ "viewBox": "0 0 20 20",
145
150
  "fill": "none",
146
151
  "xmlns": "http://www.w3.org/2000/svg"
147
152
  }, [(0, import_vue.createVNode)("path", {
148
- "d": "M6.33337 12.4585C5.91916 12.4585 5.58337 12.7943 5.58337 13.2085C5.58337 13.6227 5.91916 13.9585 6.33337 13.9585V12.4585ZM14.6667 13.9585C15.0809 13.9585 15.4167 13.6227 15.4167 13.2085C15.4167 12.7943 15.0809 12.4585 14.6667 12.4585V13.9585ZM6.33337 7.25016C5.91916 7.25016 5.58337 7.58595 5.58337 8.00016C5.58337 8.41438 5.91916 8.75016 6.33337 8.75016V7.25016ZM14.6667 8.75016C15.0809 8.75016 15.4167 8.41438 15.4167 8.00016C15.4167 7.58595 15.0809 7.25016 14.6667 7.25016V8.75016ZM6.33337 1.8335C5.91916 1.8335 5.58337 2.16928 5.58337 2.5835C5.58337 2.99771 5.91916 3.3335 6.33337 3.3335V1.8335ZM14.6667 3.3335C15.0809 3.3335 15.4167 2.99771 15.4167 2.5835C15.4167 2.16928 15.0809 1.8335 14.6667 1.8335V3.3335ZM0.943538 1.1998C0.589676 1.4151 0.477349 1.87649 0.692649 2.23036C0.90795 2.58422 1.36935 2.69655 1.72321 2.48125L0.943538 1.1998ZM2.16671 1.3335H2.91671C2.91671 1.06246 2.77048 0.812517 2.53421 0.679708C2.29795 0.5469 2.00841 0.551894 1.77687 0.692771L2.16671 1.3335ZM1.41671 4.25016C1.41671 4.66438 1.75249 5.00016 2.16671 5.00016C2.58092 5.00016 2.91671 4.66438 2.91671 4.25016H1.41671ZM0.699845 6.6952C0.538586 7.07674 0.717155 7.51676 1.09869 7.67802C1.48022 7.83928 1.92024 7.66071 2.0815 7.27917L0.699845 6.6952ZM2.66717 7.67869L3.26734 8.12846C3.27485 8.11845 3.2821 8.10824 3.2891 8.09786L2.66717 7.67869ZM1.33337 9.4585L0.733203 9.00872C0.562863 9.23602 0.535546 9.54005 0.662638 9.79407C0.789729 10.0481 1.04942 10.2085 1.33346 10.2085L1.33337 9.4585ZM2.79179 10.2083C3.206 10.2083 3.54175 9.87245 3.5417 9.45823C3.54165 9.04402 3.20582 8.70827 2.79161 8.70832L2.79179 10.2083ZM1.33337 11.0002C0.91916 11.0002 0.583374 11.3359 0.583374 11.7502C0.583374 12.1644 0.91916 12.5002 1.33337 12.5002V11.0002ZM2.79159 11.7502L3.4061 12.1801C3.56641 11.951 3.58595 11.6518 3.45679 11.4037C3.32763 11.1557 3.07122 11.0002 2.79159 11.0002V11.7502ZM1.94116 12.9656L1.32665 12.5356C1.16633 12.7647 1.1468 13.064 1.27596 13.312C1.40512 13.56 1.66153 13.7156 1.94116 13.7156L1.94116 12.9656ZM1.87 13.8874C1.57711 13.5945 1.10224 13.5945 0.809343 13.8874C0.516449 14.1802 0.51645 14.6551 0.809343 14.948L1.87 13.8874ZM6.33337 13.9585L14.6667 13.9585V12.4585L6.33337 12.4585V13.9585ZM6.33337 8.75016L14.6667 8.75016V7.25016L6.33337 7.25016V8.75016ZM6.33337 3.3335H14.6667V1.8335H6.33337V3.3335ZM1.72321 2.48125L2.55654 1.97422L1.77687 0.692771L0.943538 1.1998L1.72321 2.48125ZM1.41671 1.3335V4.25016H2.91671V1.3335H1.41671ZM2.0815 7.27917C2.08038 7.28184 2.07871 7.28423 2.0766 7.28621L1.04969 6.19285C0.899323 6.33407 0.780157 6.50519 0.699845 6.6952L2.0815 7.27917ZM2.0766 7.28621C2.0745 7.28819 2.072 7.28971 2.06927 7.29066L1.57297 5.87515C1.3783 5.9434 1.20006 6.05162 1.04969 6.19285L2.0766 7.28621ZM2.06927 7.29066C2.06655 7.29162 2.06365 7.29199 2.06077 7.29176L2.18007 5.79652C1.97444 5.78011 1.76764 5.80689 1.57297 5.87515L2.06927 7.29066ZM2.06077 7.29176C2.05789 7.29153 2.05509 7.2907 2.05255 7.28933L2.76703 5.97042C2.58564 5.87216 2.38571 5.81292 2.18007 5.79652L2.06077 7.29176ZM2.05255 7.28933C2.05001 7.28795 2.04778 7.28606 2.04602 7.28377L3.23331 6.36708C3.10724 6.20379 2.94841 6.06868 2.76703 5.97042L2.05255 7.28933ZM2.04602 7.28377C2.04425 7.28148 2.04298 7.27885 2.04229 7.27605L3.49907 6.91855C3.44991 6.71821 3.35938 6.53036 3.23331 6.36708L2.04602 7.28377ZM2.04229 7.27605C2.0416 7.27324 2.04151 7.27032 2.04202 7.26748L3.51879 7.53041C3.55495 7.32731 3.54823 7.1189 3.49907 6.91855L2.04229 7.27605ZM2.04202 7.26748C2.04252 7.26463 2.04362 7.26192 2.04523 7.25953L3.2891 8.09786C3.40439 7.92679 3.48263 7.73351 3.51879 7.53041L2.04202 7.26748ZM2.06699 7.22892L0.733203 9.00872L1.93355 9.90827L3.26734 8.12846L2.06699 7.22892ZM1.33346 10.2085L2.79179 10.2083L2.79161 8.70832L1.33328 8.7085L1.33346 10.2085ZM1.33337 12.5002H2.79159V11.0002H1.33337V12.5002ZM2.17708 11.3202L1.32665 12.5356L2.55566 13.3956L3.4061 12.1801L2.17708 11.3202ZM1.94116 13.7156C1.9577 13.7156 1.97399 13.7197 1.98859 13.7275L2.69569 12.4046C2.46354 12.2805 2.20438 12.2156 1.94116 12.2156L1.94116 13.7156ZM1.98859 13.7275C2.00318 13.7353 2.01563 13.7465 2.02482 13.7603L3.27203 12.9269C3.12579 12.7081 2.92783 12.5287 2.69569 12.4046L1.98859 13.7275ZM2.02482 13.7603C2.03401 13.7741 2.03967 13.7899 2.0413 13.8063L3.53407 13.6593C3.50827 13.3974 3.41827 13.1458 3.27203 12.9269L2.02482 13.7603ZM2.0413 13.8063C2.04292 13.8228 2.04045 13.8394 2.03412 13.8547L3.41994 14.4287C3.52067 14.1855 3.55987 13.9213 3.53407 13.6593L2.0413 13.8063ZM2.03412 13.8547C2.02779 13.87 2.01778 13.8835 2.00499 13.894L2.95658 15.0535C3.16006 14.8865 3.31921 14.6719 3.41994 14.4287L2.03412 13.8547ZM2.00499 13.894C1.9922 13.9045 1.97701 13.9117 1.96079 13.9149L2.25342 15.3861C2.51159 15.3347 2.75311 15.2205 2.95658 15.0535L2.00499 13.894ZM1.96079 13.9149C1.94456 13.9181 1.92778 13.9173 1.91195 13.9125L1.47652 15.3479C1.72841 15.4243 1.99525 15.4374 2.25342 15.3861L1.96079 13.9149ZM1.91195 13.9125C1.89611 13.9077 1.8817 13.8991 1.87 13.8874L0.809343 14.948C0.995471 15.1341 1.22463 15.2715 1.47652 15.3479L1.91195 13.9125Z",
153
+ "fill-rule": "evenodd",
154
+ "clip-rule": "evenodd",
155
+ "d": "M3.36762 1.34621C3.60388 1.47902 3.75011 1.72897 3.75011 2V5.5C3.75011 5.91421 3.41432 6.25 3.00011 6.25C2.5859 6.25 2.25011 5.91421 2.25011 5.5V3.3157C1.92245 3.43189 1.54724 3.30702 1.35938 2.99827C1.14408 2.6444 1.25641 2.183 1.61027 1.9677L2.61027 1.35928C2.84182 1.2184 3.13135 1.2134 3.36762 1.34621ZM7.25011 3.5C7.25011 3.08579 7.5859 2.75 8.00011 2.75H18.0001C18.4143 2.75 18.7501 3.08579 18.7501 3.5C18.7501 3.91421 18.4143 4.25 18.0001 4.25H8.00011C7.5859 4.25 7.25011 3.91421 7.25011 3.5ZM2.88491 9.0004C2.86752 8.99901 2.85002 9.00127 2.83356 9.00705C2.81709 9.01282 2.80201 9.02198 2.78929 9.03392C2.77657 9.04587 2.76649 9.06034 2.7597 9.07642C2.59844 9.45795 2.15842 9.63652 1.77688 9.47526C1.39535 9.314 1.21678 8.87398 1.37804 8.49245C1.46627 8.2837 1.59719 8.09571 1.76238 7.94056C1.92757 7.7854 2.12339 7.66652 2.33726 7.59153C2.55112 7.51655 2.77831 7.48712 3.00422 7.50515C3.23013 7.52317 3.44978 7.58825 3.64904 7.6962C3.84831 7.80415 4.0228 7.95258 4.1613 8.13197C4.2998 8.31135 4.39925 8.51772 4.45327 8.73782C4.50728 8.95792 4.51466 9.18688 4.47493 9.41C4.43521 9.63313 4.34925 9.84547 4.22259 10.0334C4.21559 10.0438 4.20834 10.054 4.20083 10.064L3.49953 10.9998L3.75001 10.9998C4.16422 10.9997 4.50005 11.3355 4.5001 11.7497C4.50015 12.1639 4.1644 12.4997 3.75019 12.4998L2.0002 12.5C1.71615 12.5 1.45646 12.3396 1.32937 12.0856C1.20228 11.8316 1.2296 11.5275 1.39994 11.3002L2.98413 9.18629C2.99095 9.17411 2.9957 9.16086 2.99816 9.14707C3.00122 9.12989 3.00065 9.11226 2.99649 9.09531C2.99233 9.07836 2.98467 9.06247 2.97401 9.04866C2.96334 9.03485 2.94991 9.02342 2.93456 9.01511C2.91922 9.0068 2.90231 9.00178 2.88491 9.0004ZM7.25011 10C7.25011 9.58579 7.5859 9.25 8.00011 9.25L18.0001 9.25C18.4143 9.25 18.7501 9.58579 18.7501 10C18.7501 10.4142 18.4143 10.75 18.0001 10.75L8.00011 10.75C7.5859 10.75 7.25011 10.4142 7.25011 10ZM1.25011 14.5C1.25011 14.0858 1.5859 13.75 2.00011 13.75H3.74997C4.0296 13.75 4.286 13.9056 4.41517 14.1536C4.54433 14.4016 4.52479 14.7009 4.36447 14.93L3.87524 15.6292C4.0001 15.7351 4.11012 15.8583 4.20177 15.9955C4.36355 16.2376 4.46313 16.5159 4.49167 16.8057C4.52021 17.0955 4.47684 17.3879 4.36541 17.6569C4.25397 17.9259 4.0779 18.1633 3.8528 18.3481C3.6277 18.5328 3.36051 18.6592 3.0749 18.716C2.78929 18.7728 2.49408 18.7583 2.21543 18.6738C1.93676 18.5892 1.68325 18.4373 1.47734 18.2314C1.18444 17.9385 1.18444 17.4636 1.47734 17.1707C1.77023 16.8778 2.2451 16.8778 2.538 17.1707C2.56948 17.2022 2.60824 17.2254 2.65085 17.2383C2.69346 17.2513 2.7386 17.2535 2.78227 17.2448C2.82593 17.2361 2.86679 17.2168 2.90121 17.1885C2.93563 17.1603 2.96255 17.124 2.97959 17.0829C2.99663 17.0417 3.00326 16.997 2.99889 16.9527C2.99453 16.9084 2.9793 16.8659 2.95457 16.8288C2.92983 16.7918 2.89634 16.7615 2.85708 16.7405C2.81781 16.7195 2.77397 16.7085 2.72945 16.7085C2.44982 16.7085 2.19341 16.5529 2.06425 16.3049C1.93509 16.0569 1.95463 15.7576 2.11494 15.5285L2.30982 15.25H2.00011C1.5859 15.25 1.25011 14.9142 1.25011 14.5ZM7.25011 16.25C7.25011 15.8358 7.5859 15.5 8.00011 15.5L18.0001 15.5C18.4143 15.5 18.7501 15.8358 18.7501 16.25C18.7501 16.6642 18.4143 17 18.0001 17L8.00011 17C7.5859 17 7.25011 16.6642 7.25011 16.25Z",
149
156
  "fill": "currentColor"
150
157
  }, null)]);
151
158
  }
@@ -154,17 +161,16 @@ var AlignLeftIcon = (0, import_vue2.defineComponent)({
154
161
  name: "AlignLeftIcon",
155
162
  setup() {
156
163
  return () => (0, import_vue.createVNode)("svg", {
157
- "width": "22",
158
- "height": "22",
164
+ "width": "20",
165
+ "height": "20",
159
166
  "viewBox": "0 0 20 20",
160
167
  "fill": "none",
161
168
  "xmlns": "http://www.w3.org/2000/svg"
162
169
  }, [(0, import_vue.createVNode)("path", {
163
- "d": "M3 4L17 4 M3 12L17 12 M3 8L11 8 M3 16L11 16",
164
- "stroke": "currentColor",
165
- "stroke-width": "1.5",
166
- "stroke-linecap": "round",
167
- "stroke-linejoin": "round"
170
+ "fill-rule": "evenodd",
171
+ "clip-rule": "evenodd",
172
+ "d": "M1.25 2.75C1.25 2.33579 1.58579 2 2 2H18C18.4142 2 18.75 2.33579 18.75 2.75C18.75 3.16421 18.4142 3.5 18 3.5H2C1.58579 3.5 1.25 3.16421 1.25 2.75ZM1.25 7.5C1.25 7.08579 1.58579 6.75 2 6.75H13C13.4142 6.75 13.75 7.08579 13.75 7.5C13.75 7.91421 13.4142 8.25 13 8.25H2C1.58579 8.25 1.25 7.91421 1.25 7.5ZM1.25 12.5C1.25 12.0858 1.58579 11.75 2 11.75H14C14.4142 11.75 14.75 12.0858 14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H2C1.58579 13.25 1.25 12.9142 1.25 12.5ZM1.25 17.25C1.25 16.8358 1.58579 16.5 2 16.5H9C9.41421 16.5 9.75 16.8358 9.75 17.25C9.75 17.6642 9.41421 18 9 18H2C1.58579 18 1.25 17.6642 1.25 17.25Z",
173
+ "fill": "currentColor"
168
174
  }, null)]);
169
175
  }
170
176
  });
@@ -222,6 +228,62 @@ var AlignJustifyIcon = (0, import_vue2.defineComponent)({
222
228
  }, null)]);
223
229
  }
224
230
  });
231
+ var ColorTextIcon = (0, import_vue2.defineComponent)({
232
+ name: "ColorTextIcon",
233
+ setup() {
234
+ return () => (0, import_vue.createVNode)("svg", {
235
+ "width": "20",
236
+ "height": "20",
237
+ "viewBox": "0 0 20 20",
238
+ "fill": "none",
239
+ "xmlns": "http://www.w3.org/2000/svg"
240
+ }, [(0, import_vue.createVNode)("path", {
241
+ "fill-rule": "evenodd",
242
+ "clip-rule": "evenodd",
243
+ "d": "M8.66375 2.75C8.65635 2.75 8.65104 2.75456 8.64925 2.75941L5.28435 11.9167H12.0432L8.67826 2.75942C8.67647 2.75456 8.67115 2.75 8.66375 2.75ZM13.6412 11.9167L10.0862 2.24205C9.86695 1.64536 9.29844 1.25 8.66375 1.25C8.02906 1.25 7.46055 1.64536 7.24129 2.24205L3.68629 11.9167H2.24996C1.83575 11.9167 1.49996 12.2525 1.49996 12.6667C1.49996 13.0809 1.83575 13.4167 2.24996 13.4167H3.13511L1.54598 17.7413C1.40312 18.1301 1.60248 18.5611 1.99128 18.704C2.38007 18.8468 2.81107 18.6475 2.95394 18.2587L4.73317 13.4167H12.5943L14.3736 18.2587C14.5164 18.6475 14.9474 18.8468 15.3362 18.704C15.725 18.5611 15.9244 18.1301 15.7815 17.7413L14.1924 13.4167H15.0775C15.4918 13.4167 15.8275 13.0809 15.8275 12.6667C15.8275 12.2525 15.4918 11.9167 15.0775 11.9167H13.6412Z",
244
+ "fill": "currentColor"
245
+ }, null), (0, import_vue.createVNode)("path", {
246
+ "fill-rule": "evenodd",
247
+ "clip-rule": "evenodd",
248
+ "d": "M18.236 5.85908C18.6863 5.06151 18.5284 4.10075 18.0148 3.24065L17.3982 2.21746C17.0688 1.67034 16.5392 1.25 15.8758 1.25C15.2116 1.25 14.6841 1.67072 14.359 2.21977L13.7453 3.23806L13.7438 3.24065C13.2302 4.10075 13.0722 5.06151 13.5225 5.85908C13.9733 6.65767 14.8779 7.01667 15.8793 7.01667C16.8806 7.01667 17.7852 6.65767 18.236 5.85908ZM15.8297 2.77208C15.7896 2.79926 15.7224 2.8607 15.6489 2.98538L15.6454 2.9913L15.0316 4.00969C15.0314 4.01014 15.0311 4.01058 15.0308 4.01103C14.6783 4.60202 14.7383 4.96158 14.8287 5.12167C14.9186 5.28086 15.1933 5.51667 15.8793 5.51667C16.5652 5.51667 16.84 5.28086 16.9298 5.12167C17.0202 4.96157 17.0802 4.60198 16.7277 4.01092C16.7274 4.01051 16.7272 4.0101 16.7269 4.00969L16.1132 2.99128C16.0374 2.8654 15.9681 2.80201 15.9258 2.7736C15.9051 2.7597 15.891 2.75409 15.8842 2.7519C15.8807 2.75077 15.8785 2.75034 15.8774 2.75017L15.8758 2.75L15.8745 2.75013C15.8736 2.75027 15.8717 2.75064 15.8685 2.75165C15.8625 2.75359 15.8493 2.75879 15.8297 2.77208Z",
249
+ "fill": "currentColor"
250
+ }, null)]);
251
+ }
252
+ });
253
+ var FillTextIcon = (0, import_vue2.defineComponent)({
254
+ name: "FillTextIcon",
255
+ setup() {
256
+ return () => (0, import_vue.createVNode)("svg", {
257
+ "width": "20",
258
+ "height": "20",
259
+ "viewBox": "0 0 20 20",
260
+ "fill": "none",
261
+ "xmlns": "http://www.w3.org/2000/svg"
262
+ }, [(0, import_vue.createVNode)("path", {
263
+ "fill-rule": "evenodd",
264
+ "clip-rule": "evenodd",
265
+ "d": "M9.85054 2.01035C10.8883 1.91023 11.8433 2.53267 12.8842 3.58165L15.6188 6.3375C16.4029 7.12778 16.9285 7.87656 17.0862 8.66106C17.2546 9.49858 16.9767 10.2195 16.5202 10.8637C16.273 11.2125 15.9624 11.5558 15.6187 11.9022L11.2166 16.3386L11.2155 16.3397C10.7347 16.8222 10.2954 17.2249 9.87312 17.5083C9.44434 17.7961 8.98095 17.9967 8.46117 18C7.94043 18.0032 7.4735 17.8077 7.03901 17.5197C6.61159 17.2363 6.16667 16.8305 5.67861 16.3386L2.94407 13.5827C2.34101 12.975 1.86551 12.4395 1.5784 11.9277C1.27004 11.378 1.1551 10.8114 1.3357 10.2028C1.45205 9.81075 1.67641 9.45442 1.94159 9.11724C2.20805 8.77843 2.55027 8.41662 2.94297 8.0192L2.94407 8.01809L7.3462 3.58165C7.73335 3.19148 8.11559 2.82907 8.50434 2.55498C8.89821 2.27728 9.34093 2.05952 9.85054 2.01035ZM9.36868 3.78092C9.09479 3.97402 8.79043 4.25577 8.41097 4.63819L4.00994 9.07351C4.00972 9.07373 4.01017 9.07328 4.00994 9.07351C3.95938 9.12468 3.90979 9.17515 3.86249 9.22362C7.7286 8.47303 11.7202 8.57605 15.5538 9.54302C15.6416 9.32321 15.6521 9.13815 15.6156 8.95666C15.546 8.61027 15.2752 8.12087 14.554 7.39403L11.8194 4.63819C10.8134 3.62427 10.2984 3.47411 9.99459 3.50342C9.83341 3.51897 9.63745 3.59142 9.36868 3.78092ZM14.5533 10.8463C10.6783 9.97453 6.65031 10.0285 2.79358 10.9976C2.81491 11.0553 2.84515 11.1199 2.88659 11.1938C3.06542 11.5125 3.41126 11.924 4.00884 12.5262L6.74337 15.282C7.21556 15.7579 7.57282 16.0739 7.8678 16.2694C8.15572 16.4603 8.33143 16.5007 8.45185 16.5C8.57322 16.4992 8.7495 16.4559 9.0372 16.2628C9.3313 16.0654 9.68515 15.7504 10.1525 15.2814C10.1524 15.2815 10.1527 15.2812 10.1525 15.2814L14.5533 10.8463ZM17.8 13.6483C17.8 13.6482 17.8001 13.6485 17.8 13.6483L18.323 14.5187C18.7703 15.27 18.9201 16.1311 18.5119 16.8562C18.1027 17.5833 17.2879 17.8985 16.414 17.8985C15.5401 17.8985 14.7253 17.5833 14.3161 16.8562C13.9079 16.1311 14.0577 15.27 14.505 14.5187L14.5066 14.5161L15.0266 13.6506C15.3151 13.1622 15.7942 12.7705 16.411 12.7705C17.0271 12.7705 17.5081 13.1619 17.8 13.6483ZM16.4123 14.2895C16.3892 14.3113 16.3556 14.3498 16.3175 14.4146L16.314 14.4205L15.7939 15.286C15.7937 15.2865 15.7934 15.2869 15.7932 15.2873C15.5063 15.7697 15.5731 16.0313 15.6233 16.1205C15.6724 16.2079 15.8574 16.3985 16.414 16.3985C16.9706 16.3985 17.1556 16.2079 17.2047 16.1205C17.2549 16.0313 17.3217 15.7697 17.0349 15.2873C17.0346 15.2869 17.0343 15.2865 17.0341 15.286L16.514 14.4205C16.473 14.3521 16.4367 14.3117 16.4123 14.2895Z",
266
+ "fill": "currentColor"
267
+ }, null)]);
268
+ }
269
+ });
270
+ var LinkIcon = (0, import_vue2.defineComponent)({
271
+ name: "LinkIcon",
272
+ setup() {
273
+ return () => (0, import_vue.createVNode)("svg", {
274
+ "width": "20",
275
+ "height": "20",
276
+ "viewBox": "0 0 20 20",
277
+ "fill": "none",
278
+ "xmlns": "http://www.w3.org/2000/svg"
279
+ }, [(0, import_vue.createVNode)("path", {
280
+ "fill-rule": "evenodd",
281
+ "clip-rule": "evenodd",
282
+ "d": "M9.46974 2.84224C11.5927 0.719252 15.0348 0.719253 17.1578 2.84224C19.2807 4.96523 19.2807 8.40728 17.1578 10.5303L15.5774 12.1106C13.5952 14.0928 10.3814 14.0928 8.39916 12.1106L8.14427 11.8557C7.85137 11.5628 7.85137 11.088 8.14427 10.7951C8.43716 10.5022 8.91203 10.5022 9.20493 10.7951L9.45982 11.05C10.8562 12.4464 13.1203 12.4464 14.5167 11.05L16.0971 9.4696C17.6343 7.9324 17.6343 5.4401 16.0971 3.9029C14.5599 2.3657 12.0676 2.3657 10.5304 3.9029L9.86766 4.56564C9.57477 4.85853 9.09989 4.85853 8.807 4.56564C8.51411 4.27274 8.51411 3.79787 8.807 3.50498L9.46974 2.84224ZM10.5402 8.9499C9.14375 7.55348 6.8797 7.55348 5.48327 8.9499L3.9029 10.5303C2.3657 12.0675 2.3657 14.5598 3.9029 16.097C5.4401 17.6342 7.9324 17.6342 9.46961 16.097L10.1323 15.4342C10.4252 15.1413 10.9001 15.1413 11.193 15.4342C11.4859 15.7271 11.4859 16.202 11.193 16.4949L10.5303 17.1576C8.40728 19.2806 4.96523 19.2806 2.84224 17.1576C0.719253 15.0346 0.719252 11.5926 2.84224 9.46961L4.42261 7.88924C6.40482 5.90703 9.61862 5.90703 11.6008 7.88924L11.8557 8.14414C12.1486 8.43704 12.1486 8.91191 11.8557 9.2048C11.5628 9.49769 11.088 9.49769 10.7951 9.2048L10.5402 8.9499Z",
283
+ "fill": "currentColor"
284
+ }, null)]);
285
+ }
286
+ });
225
287
  var UndoIcon = (0, import_vue2.defineComponent)({
226
288
  name: "UndoIcon",
227
289
  setup() {
@@ -262,17 +324,16 @@ var ClearIcon = (0, import_vue2.defineComponent)({
262
324
  name: "ClearIcon",
263
325
  setup() {
264
326
  return () => (0, import_vue.createVNode)("svg", {
265
- "width": "18",
266
- "height": "16",
267
- "viewBox": "0 0 18 16",
327
+ "width": "20",
328
+ "height": "20",
329
+ "viewBox": "0 0 20 20",
268
330
  "fill": "none",
269
331
  "xmlns": "http://www.w3.org/2000/svg"
270
332
  }, [(0, import_vue.createVNode)("path", {
271
- "d": "M3.5 1H16.5M8.42149 6L10.6001 1M4.5 15L7.13903 8.9433M1.5 4L14.5 15",
272
- "stroke": "currentColor",
273
- "stroke-width": "1.5",
274
- "stroke-linecap": "round",
275
- "stroke-linejoin": "round"
333
+ "fill-rule": "evenodd",
334
+ "clip-rule": "evenodd",
335
+ "d": "M10.5639 3.25001L8.69489 7.55868C8.53005 7.93868 8.70447 8.38037 9.08447 8.5452C9.46447 8.71004 9.90615 8.53562 10.071 8.15562L12.199 3.25001H18C18.4142 3.25001 18.75 2.91422 18.75 2.50001C18.75 2.08579 18.4142 1.75001 18 1.75001H11.724C11.7128 1.74975 11.7015 1.74975 11.6903 1.75001H4.13335C3.71913 1.75001 3.38335 2.08579 3.38335 2.50001C3.38335 2.91422 3.71913 3.25001 4.13335 3.25001H10.5639ZM1.42854 5.22858C1.69679 4.91296 2.17011 4.87457 2.48573 5.14282L16.3524 16.9285C16.668 17.1968 16.7064 17.6701 16.4382 17.9857C16.1699 18.3013 15.6966 18.3397 15.381 18.0715L8.35867 12.103L5.88807 17.7985C5.72323 18.1785 5.28155 18.3529 4.90155 18.1881C4.52155 18.0232 4.34712 17.5815 4.51196 17.2015L7.16406 11.0877L1.5143 6.28577C1.19869 6.01752 1.16029 5.5442 1.42854 5.22858Z",
336
+ "fill": "currentColor"
276
337
  }, null)]);
277
338
  }
278
339
  });
@@ -296,14 +357,15 @@ var CaretIcon = (0, import_vue2.defineComponent)({
296
357
  });
297
358
 
298
359
  // src/extensions/heading-extension.tsx
299
- var import_pixel3_popover = require("@mekari/pixel3-popover");
300
- var import_pixel3_text = require("@mekari/pixel3-text");
301
- var import_css = require("@mekari/pixel3-styled-system/css");
302
360
  var HeadingExtention = (0, import_vue4.defineComponent)({
303
361
  name: "HeadingExtention",
304
362
  props: {
305
- tooltipLabel: String,
306
- editor: Object
363
+ tooltipLabel: {
364
+ type: String
365
+ },
366
+ editor: {
367
+ type: Object
368
+ }
307
369
  },
308
370
  setup({
309
371
  tooltipLabel,
@@ -328,7 +390,8 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
328
390
  level: 1
329
391
  })) && (0, import_vue3.createVNode)(import_pixel3_text.MpText, {
330
392
  "class": (0, import_css.css)({
331
- color: "currentColor"
393
+ color: "currentColor",
394
+ whiteSpace: "nowrap"
332
395
  })
333
396
  }, {
334
397
  default: () => [(0, import_vue3.createTextVNode)("Heading 1")]
@@ -336,7 +399,8 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
336
399
  level: 2
337
400
  })) && (0, import_vue3.createVNode)(import_pixel3_text.MpText, {
338
401
  "class": (0, import_css.css)({
339
- color: "currentColor"
402
+ color: "currentColor",
403
+ whiteSpace: "nowrap"
340
404
  })
341
405
  }, {
342
406
  default: () => [(0, import_vue3.createTextVNode)("Heading 2")]
@@ -344,13 +408,15 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
344
408
  level: 3
345
409
  })) && (0, import_vue3.createVNode)(import_pixel3_text.MpText, {
346
410
  "class": (0, import_css.css)({
347
- color: "currentColor"
411
+ color: "currentColor",
412
+ whiteSpace: "nowrap"
348
413
  })
349
414
  }, {
350
415
  default: () => [(0, import_vue3.createTextVNode)("Heading 3")]
351
416
  }), (editor == null ? void 0 : editor.isActive("paragraph")) && (0, import_vue3.createVNode)(import_pixel3_text.MpText, {
352
417
  "class": (0, import_css.css)({
353
- color: "currentColor"
418
+ color: "currentColor",
419
+ whiteSpace: "nowrap"
354
420
  })
355
421
  }, {
356
422
  default: () => [(0, import_vue3.createTextVNode)("Normal text")]
@@ -384,15 +450,15 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
384
450
  })
385
451
  }, {
386
452
  default: () => [(0, import_vue3.createVNode)(import_pixel3_popover.MpPopoverListItem, {
387
- "onClick": () => editor == null ? void 0 : editor.chain().focus().toggleHeading({
388
- level: 1
389
- }).run(),
390
453
  "class": {
391
454
  "is-active": editor == null ? void 0 : editor.isActive("heading", {
392
455
  level: 1
393
456
  }),
394
457
  "text-sizing": true
395
- }
458
+ },
459
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().toggleHeading({
460
+ level: 1
461
+ }).run()
396
462
  }, {
397
463
  default: () => [(0, import_vue3.createVNode)(import_pixel3_text.MpText, {
398
464
  "as": "h1",
@@ -404,15 +470,15 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
404
470
  default: () => [(0, import_vue3.createTextVNode)("Heading 1")]
405
471
  })]
406
472
  }), (0, import_vue3.createVNode)(import_pixel3_popover.MpPopoverListItem, {
407
- "onClick": () => editor == null ? void 0 : editor.chain().focus().toggleHeading({
408
- level: 2
409
- }).run(),
410
473
  "class": {
411
474
  "is-active": editor == null ? void 0 : editor.isActive("heading", {
412
475
  level: 2
413
476
  }),
414
477
  "text-sizing": true
415
- }
478
+ },
479
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().toggleHeading({
480
+ level: 2
481
+ }).run()
416
482
  }, {
417
483
  default: () => [(0, import_vue3.createVNode)(import_pixel3_text.MpText, {
418
484
  "as": "h2",
@@ -424,15 +490,15 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
424
490
  default: () => [(0, import_vue3.createTextVNode)("Heading 2")]
425
491
  })]
426
492
  }), (0, import_vue3.createVNode)(import_pixel3_popover.MpPopoverListItem, {
427
- "onClick": () => editor == null ? void 0 : editor.chain().focus().toggleHeading({
428
- level: 3
429
- }).run(),
430
493
  "class": {
431
494
  "is-active": editor == null ? void 0 : editor.isActive("heading", {
432
495
  level: 3
433
496
  }),
434
497
  "text-sizing": true
435
- }
498
+ },
499
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().toggleHeading({
500
+ level: 3
501
+ }).run()
436
502
  }, {
437
503
  default: () => [(0, import_vue3.createVNode)(import_pixel3_text.MpText, {
438
504
  "as": "h3",
@@ -444,11 +510,11 @@ var HeadingExtention = (0, import_vue4.defineComponent)({
444
510
  default: () => [(0, import_vue3.createTextVNode)("Heading 3")]
445
511
  })]
446
512
  }), (0, import_vue3.createVNode)(import_pixel3_popover.MpPopoverListItem, {
447
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setParagraph().run(),
448
513
  "class": {
449
514
  "is-active": editor == null ? void 0 : editor.isActive("paragraph"),
450
515
  "text-sizing": true
451
- }
516
+ },
517
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().setParagraph().run()
452
518
  }, {
453
519
  default: () => [(0, import_vue3.createVNode)(import_pixel3_text.MpText, {
454
520
  "class": (0, import_css.css)({
@@ -472,50 +538,35 @@ var import_css2 = require("@mekari/pixel3-styled-system/css");
472
538
  var AlignExtention = (0, import_vue6.defineComponent)({
473
539
  name: "AlignExtention",
474
540
  props: {
475
- tooltipLabel: String,
476
- editor: Object
541
+ tooltipLabel: {
542
+ type: String
543
+ },
544
+ editor: {
545
+ type: Object
546
+ }
477
547
  },
478
548
  setup({
479
549
  tooltipLabel,
480
550
  editor
481
551
  }) {
552
+ const isActiveAlignment = /* @__PURE__ */ __name((alignment) => {
553
+ return editor == null ? void 0 : editor.isActive({
554
+ textAlign: alignment
555
+ });
556
+ }, "isActiveAlignment");
482
557
  return () => (0, import_vue5.createVNode)(import_pixel3_popover2.MpPopover, {
483
558
  "id": "popover-align-extention"
484
559
  }, {
485
560
  default: () => [(0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverTrigger, null, {
486
561
  default: () => [(0, import_vue5.withDirectives)((0, import_vue5.createVNode)("button", {
487
562
  "class": {
488
- "is-active": (editor == null ? void 0 : editor.isActive({
489
- textAlign: "left"
490
- })) || (editor == null ? void 0 : editor.isActive({
491
- textAlign: "right"
492
- })) || (editor == null ? void 0 : editor.isActive({
493
- textAlign: "center"
494
- })) || (editor == null ? void 0 : editor.isActive({
495
- textAlign: "justify"
496
- })),
563
+ "is-active": isActiveAlignment("left") || isActiveAlignment("right") || isActiveAlignment("center") || isActiveAlignment("justify"),
497
564
  "text-sizing": true
498
565
  },
499
566
  "style": {
500
- padding: "0 4px"
567
+ padding: "4px"
501
568
  }
502
- }, [(editor == null ? void 0 : editor.isActive({
503
- textAlign: "left"
504
- })) && (0, import_vue5.createVNode)(AlignLeftIcon, null, null), (editor == null ? void 0 : editor.isActive({
505
- textAlign: "center"
506
- })) && (0, import_vue5.createVNode)(AlignCenterIcon, null, null), (editor == null ? void 0 : editor.isActive({
507
- textAlign: "right"
508
- })) && (0, import_vue5.createVNode)(AlignRightIcon, null, null), (editor == null ? void 0 : editor.isActive({
509
- textAlign: "justify"
510
- })) && (0, import_vue5.createVNode)(AlignJustifyIcon, null, null), !(editor == null ? void 0 : editor.isActive({
511
- textAlign: "left"
512
- })) && !(editor == null ? void 0 : editor.isActive({
513
- textAlign: "right"
514
- })) && !(editor == null ? void 0 : editor.isActive({
515
- textAlign: "center"
516
- })) && !(editor == null ? void 0 : editor.isActive({
517
- textAlign: "justify"
518
- })) && (0, import_vue5.createVNode)(AlignLeftIcon, null, null)]), [[(0, import_vue5.resolveDirective)("tooltip"), {
569
+ }, [isActiveAlignment("left") && (0, import_vue5.createVNode)(AlignLeftIcon, null, null), isActiveAlignment("center") && (0, import_vue5.createVNode)(AlignCenterIcon, null, null), isActiveAlignment("right") && (0, import_vue5.createVNode)(AlignRightIcon, null, null), isActiveAlignment("justify") && (0, import_vue5.createVNode)(AlignJustifyIcon, null, null), !isActiveAlignment("left") && !isActiveAlignment("right") && !isActiveAlignment("center") && !isActiveAlignment("justify") && (0, import_vue5.createVNode)(AlignLeftIcon, null, null)]), [[(0, import_vue5.resolveDirective)("tooltip"), {
519
570
  label: tooltipLabel
520
571
  }]])]
521
572
  }), (0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverContent, {
@@ -532,45 +583,37 @@ var AlignExtention = (0, import_vue6.defineComponent)({
532
583
  })
533
584
  }, {
534
585
  default: () => [(0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverListItem, {
535
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("left").run(),
536
586
  "class": {
537
- "is-active": editor == null ? void 0 : editor.isActive({
538
- textAlign: "left"
539
- }),
587
+ "is-active": isActiveAlignment("left"),
540
588
  "text-sizing": true
541
- }
589
+ },
590
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().setTextAlign("left").run()
542
591
  }, {
543
592
  default: () => [(0, import_vue5.createVNode)(AlignLeftIcon, null, null)]
544
593
  }), (0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverListItem, {
545
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("center").run(),
546
594
  "class": {
547
- "is-active": editor == null ? void 0 : editor.isActive({
548
- textAlign: "center"
549
- }),
595
+ "is-active": isActiveAlignment("center"),
550
596
  "text-sizing": true
551
- }
597
+ },
598
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().setTextAlign("center").run()
552
599
  }, {
553
600
  default: () => [(0, import_vue5.createVNode)(AlignCenterIcon, null, null)]
554
601
  }), (0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverListItem, {
555
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("right").run(),
556
602
  "class": {
557
- "is-active": editor == null ? void 0 : editor.isActive({
558
- textAlign: "right"
559
- }),
603
+ "is-active": isActiveAlignment("right"),
560
604
  "text-sizing": true
561
- }
605
+ },
606
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().setTextAlign("right").run()
562
607
  }, {
563
608
  default: () => [(0, import_vue5.createVNode)(AlignRightIcon, null, null)]
564
609
  }), (0, import_vue5.createVNode)(import_pixel3_popover2.MpPopoverListItem, {
565
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("justify").run(),
566
610
  "class": {
567
- "is-active": editor == null ? void 0 : editor.isActive({
568
- textAlign: "justify"
569
- }),
611
+ "is-active": isActiveAlignment("justify"),
570
612
  "text-sizing": true
571
- }
613
+ },
614
+ "onClick": () => (editor == null ? void 0 : editor.chain()).focus().setTextAlign("justify").run()
572
615
  }, {
573
- default: () => [(0, import_vue5.createVNode)(AlignLeftIcon, null, null)]
616
+ default: () => [(0, import_vue5.createVNode)(AlignJustifyIcon, null, null)]
574
617
  })]
575
618
  })]
576
619
  })]
@@ -584,10 +627,18 @@ var import_vue8 = require("vue");
584
627
  var SingleExtention = (0, import_vue8.defineComponent)({
585
628
  name: "SingleExtention",
586
629
  props: {
587
- name: String,
588
- tooltipLabel: String,
589
- onClick: Function,
590
- editor: Object
630
+ name: {
631
+ type: String
632
+ },
633
+ tooltipLabel: {
634
+ type: String
635
+ },
636
+ onClick: {
637
+ type: Function
638
+ },
639
+ editor: {
640
+ type: Object
641
+ }
591
642
  },
592
643
  setup({
593
644
  name,
@@ -595,103 +646,408 @@ var SingleExtention = (0, import_vue8.defineComponent)({
595
646
  onClick,
596
647
  editor
597
648
  }) {
649
+ const iconMap = {
650
+ bold: (0, import_vue7.createVNode)(BoldIcon, null, null),
651
+ italic: (0, import_vue7.createVNode)(ItalicIcon, null, null),
652
+ underline: (0, import_vue7.createVNode)(UnderlineIcon, null, null),
653
+ strike: (0, import_vue7.createVNode)(StrikeIcon, null, null),
654
+ blockquote: (0, import_vue7.createVNode)(BlockquoteIcon, null, null),
655
+ bulletList: (0, import_vue7.createVNode)(BulletListIcon, null, null),
656
+ orderedList: (0, import_vue7.createVNode)(OrderedListIcon, null, null),
657
+ undo: (0, import_vue7.createVNode)(UndoIcon, null, null),
658
+ redo: (0, import_vue7.createVNode)(RedoIcon, null, null),
659
+ clear: (0, import_vue7.createVNode)(ClearIcon, null, null)
660
+ };
598
661
  return () => (0, import_vue7.withDirectives)((0, import_vue7.createVNode)("button", {
599
662
  "class": {
600
- "is-active": editor == null ? void 0 : editor.isActive(name)
663
+ "is-active": name && (editor == null ? void 0 : editor.isActive(name))
601
664
  },
602
665
  "onClick": onClick
603
- }, [name === "bold" && (0, import_vue7.createVNode)(BoldIcon, null, null), name === "italic" && (0, import_vue7.createVNode)(ItalicIcon, null, null), name === "underline" && (0, import_vue7.createVNode)(UnderlineIcon, null, null), name === "strike" && (0, import_vue7.createVNode)(StrikeIcon, null, null), name === "blockquote" && (0, import_vue7.createVNode)(BlockquoteIcon, null, null), name === "bulletList" && (0, import_vue7.createVNode)(BulletListIcon, null, null), name === "orderedList" && (0, import_vue7.createVNode)(OrderedListIcon, null, null), name === "undo" && (0, import_vue7.createVNode)(UndoIcon, null, null), name === "redo" && (0, import_vue7.createVNode)(RedoIcon, null, null), name === "clear" && (0, import_vue7.createVNode)(ClearIcon, null, null)]), [[(0, import_vue7.resolveDirective)("tooltip"), {
666
+ }, [name && iconMap[name]]), [[(0, import_vue7.resolveDirective)("tooltip"), {
604
667
  label: tooltipLabel
605
668
  }]]);
606
669
  }
607
670
  });
608
671
 
672
+ // src/extensions/color-extension.tsx
673
+ var import_vue9 = require("vue");
674
+ var import_vue10 = require("vue");
675
+ var import_pixel3_color_picker = require("@mekari/pixel3-color-picker");
676
+ var import_css3 = require("@mekari/pixel3-styled-system/css");
677
+ var colorPreset = ["#3B82F6", "#14B8A6", "#8B5CF6", "#F59E0B", "#EF4444", "#71717A", "#84CC16", "#EC4899", "#232933", "#FFFFFF"];
678
+ var ColorExtension = (0, import_vue10.defineComponent)({
679
+ name: "ColorExtension",
680
+ props: {
681
+ tooltipLabel: {
682
+ type: String
683
+ },
684
+ editor: {
685
+ type: Object
686
+ },
687
+ type: {
688
+ type: String
689
+ }
690
+ },
691
+ setup({
692
+ tooltipLabel,
693
+ type,
694
+ editor
695
+ }) {
696
+ const color = (0, import_vue10.ref)("");
697
+ const onColorChange = /* @__PURE__ */ __name((value) => {
698
+ color.value = value.hex;
699
+ if (type === "fill") {
700
+ (editor == null ? void 0 : editor.chain()).focus().toggleHighlight({
701
+ color: value.hex
702
+ }).run();
703
+ } else {
704
+ (editor == null ? void 0 : editor.chain()).focus().setColor(value.hex).run();
705
+ }
706
+ }, "onColorChange");
707
+ return () => (0, import_vue9.createVNode)("button", {
708
+ "class": [{
709
+ "is-active": type === "fill" ? editor == null ? void 0 : editor.isActive("highlight", {
710
+ color: editor.getAttributes("highlight").color
711
+ }) : editor == null ? void 0 : editor.isActive("textStyle", {
712
+ color: editor.getAttributes("textStyle").color
713
+ })
714
+ }, (0, import_css3.css)({
715
+ textAlign: "left"
716
+ })]
717
+ }, [(0, import_vue9.createVNode)(import_pixel3_color_picker.MpColorPicker, {
718
+ "preset": colorPreset,
719
+ "variant": "basic",
720
+ "placement": "bottom-start",
721
+ "isShowPreset": true,
722
+ "isShowInput": false,
723
+ "class": (0, import_css3.css)({
724
+ width: "auto!"
725
+ }),
726
+ "onChange": onColorChange
727
+ }, {
728
+ default: () => [(0, import_vue9.withDirectives)((0, import_vue9.createVNode)("div", null, [type === "fill" ? (0, import_vue9.createVNode)(FillTextIcon, null, null) : (0, import_vue9.createVNode)(ColorTextIcon, null, null)]), [[(0, import_vue9.resolveDirective)("tooltip"), {
729
+ label: tooltipLabel
730
+ }]])]
731
+ })]);
732
+ }
733
+ });
734
+
735
+ // src/extensions/link-extension.tsx
736
+ var import_vue11 = require("vue");
737
+ var import_vue12 = require("vue");
738
+ var import_core = require("@popperjs/core");
739
+ var import_css4 = require("@mekari/pixel3-styled-system/css");
740
+ var import_pixel3_input = require("@mekari/pixel3-input");
741
+ var import_pixel3_button = require("@mekari/pixel3-button");
742
+ var LinkExtension = (0, import_vue12.defineComponent)({
743
+ name: "LinkExtension",
744
+ props: {
745
+ tooltipLabel: {
746
+ type: String
747
+ },
748
+ editor: {
749
+ type: Object
750
+ }
751
+ },
752
+ setup({
753
+ tooltipLabel,
754
+ editor
755
+ }) {
756
+ const isShowPopover = (0, import_vue12.ref)(false);
757
+ const isEditLink = (0, import_vue12.ref)(false);
758
+ const popoverRef = (0, import_vue12.ref)(null);
759
+ const inputRef = (0, import_vue12.ref)(null);
760
+ const url = (0, import_vue12.ref)("");
761
+ let popperInstance = null;
762
+ let linkElement = null;
763
+ let lastClickedElement = null;
764
+ const onClickOutside = /* @__PURE__ */ __name((event) => {
765
+ if (popoverRef.value && !popoverRef.value.contains(event.target) && event.target !== lastClickedElement) {
766
+ onClosePopover();
767
+ }
768
+ }, "onClickOutside");
769
+ const onOpenPopover = /* @__PURE__ */ __name((target) => {
770
+ isShowPopover.value = true;
771
+ isEditLink.value = target.tagName === "A";
772
+ if (target)
773
+ lastClickedElement = target;
774
+ (0, import_vue12.nextTick)(() => {
775
+ var _a;
776
+ if (popoverRef.value) {
777
+ if (popperInstance) {
778
+ popperInstance.destroy();
779
+ }
780
+ popperInstance = (0, import_core.createPopper)(target, popoverRef.value, {
781
+ onFirstUpdate: () => {
782
+ if (popperInstance) {
783
+ popperInstance.setOptions({
784
+ modifiers: [{
785
+ name: "eventListeners",
786
+ enabled: false
787
+ }, {
788
+ name: "offset",
789
+ options: {
790
+ offset: [0, 8]
791
+ }
792
+ }]
793
+ });
794
+ }
795
+ },
796
+ placement: "bottom"
797
+ });
798
+ }
799
+ const inputElement = (_a = popoverRef.value) == null ? void 0 : _a.querySelector("input");
800
+ if (inputElement)
801
+ inputElement.focus();
802
+ document.addEventListener("mousedown", onClickOutside);
803
+ });
804
+ }, "onOpenPopover");
805
+ const onCreateLink = /* @__PURE__ */ __name(() => {
806
+ const selection = editor == null ? void 0 : editor.view.state.selection;
807
+ if (selection && selection.from !== selection.to) {
808
+ const coords = editor.view.coordsAtPos(selection.from);
809
+ url.value = "";
810
+ onOpenPopover({
811
+ getBoundingClientRect: () => ({
812
+ top: coords.top,
813
+ left: coords.left,
814
+ bottom: coords.bottom,
815
+ right: coords.right,
816
+ width: coords.right - coords.left,
817
+ height: coords.bottom - coords.top
818
+ })
819
+ });
820
+ }
821
+ }, "onCreateLink");
822
+ const onEditLink = /* @__PURE__ */ __name(() => {
823
+ isEditLink.value = false;
824
+ }, "onEditLink");
825
+ const onUnlink = /* @__PURE__ */ __name(() => {
826
+ (editor == null ? void 0 : editor.chain()).focus().unsetLink().run();
827
+ onClosePopover();
828
+ }, "onUnlink");
829
+ const onSetLink = /* @__PURE__ */ __name(() => {
830
+ if (url.value && editor) {
831
+ editor.chain().focus().extendMarkRange("link").setLink({
832
+ href: url.value
833
+ }).run();
834
+ }
835
+ onClosePopover();
836
+ }, "onSetLink");
837
+ const onClosePopover = /* @__PURE__ */ __name(() => {
838
+ isShowPopover.value = false;
839
+ editor == null ? void 0 : editor.commands.setTextSelection({
840
+ from: 0,
841
+ to: 0
842
+ });
843
+ if (popperInstance) {
844
+ popperInstance.destroy();
845
+ popperInstance = null;
846
+ }
847
+ document.removeEventListener("mousedown", onClickOutside);
848
+ }, "onClosePopover");
849
+ (0, import_vue12.onMounted)(() => {
850
+ editor == null ? void 0 : editor.view.dom.addEventListener("click", (event) => {
851
+ const link = event.target.closest("a");
852
+ if (link) {
853
+ event.preventDefault();
854
+ linkElement = link;
855
+ url.value = linkElement.href;
856
+ onOpenPopover(linkElement);
857
+ }
858
+ });
859
+ });
860
+ (0, import_vue12.onBeforeUnmount)(() => {
861
+ if (popperInstance) {
862
+ popperInstance.destroy();
863
+ }
864
+ document.removeEventListener("mousedown", onClickOutside);
865
+ });
866
+ return () => (0, import_vue11.createVNode)(import_vue11.Fragment, null, [(0, import_vue11.withDirectives)((0, import_vue11.createVNode)("button", {
867
+ "class": {
868
+ "is-active": editor == null ? void 0 : editor.isActive("link")
869
+ },
870
+ "disabled": isShowPopover.value,
871
+ "onClick": onCreateLink
872
+ }, [(0, import_vue11.createVNode)(LinkIcon, null, null)]), [[(0, import_vue11.resolveDirective)("tooltip"), {
873
+ label: tooltipLabel
874
+ }]]), isShowPopover.value && (0, import_vue11.createVNode)(import_vue12.Teleport, {
875
+ "to": "body"
876
+ }, {
877
+ default: () => [(0, import_vue11.createVNode)("div", {
878
+ "ref": popoverRef,
879
+ "data-pixel-rte": true,
880
+ "style": {
881
+ position: "absolute",
882
+ zIndex: "var(--mp-z-index-popover)"
883
+ }
884
+ }, [(0, import_vue11.createVNode)("div", {
885
+ "class": (0, import_css4.css)({
886
+ display: "flex",
887
+ gap: "2",
888
+ backgroundColor: "white",
889
+ border: "1px solid",
890
+ borderColor: "gray.400",
891
+ borderRadius: "md",
892
+ boxShadow: "lg",
893
+ padding: "2"
894
+ })
895
+ }, [(0, import_vue11.createVNode)(import_pixel3_input.MpInput, {
896
+ "ref": inputRef,
897
+ "class": (0, import_css4.css)({
898
+ width: "212px",
899
+ marginRight: "1"
900
+ }),
901
+ "modelValue": url.value,
902
+ "onUpdate:modelValue": ($event) => url.value = $event,
903
+ "placeholder": "Insert URL here",
904
+ "isDisabled": isEditLink.value,
905
+ "onKeyup": (event) => {
906
+ if (event.key === "Enter")
907
+ onSetLink();
908
+ }
909
+ }, null), isEditLink.value ? (0, import_vue11.createVNode)(import_pixel3_button.MpButton, {
910
+ "leftIcon": "edit",
911
+ "variant": "ghost",
912
+ "onClick": onEditLink
913
+ }, null) : (0, import_vue11.createVNode)(import_pixel3_button.MpButton, {
914
+ "leftIcon": "check",
915
+ "onClick": onSetLink
916
+ }, null), isEditLink.value ? (0, import_vue11.createVNode)(import_pixel3_button.MpButton, {
917
+ "leftIcon": "delete",
918
+ "variant": "ghost",
919
+ "onClick": onUnlink
920
+ }, null) : (0, import_vue11.createVNode)(import_pixel3_button.MpButton, {
921
+ "leftIcon": "close",
922
+ "variant": "ghost",
923
+ "onClick": onClosePopover
924
+ }, null)])])]
925
+ })]);
926
+ }
927
+ });
928
+
609
929
  // src/editor-toolbar.tsx
610
930
  var import_pixel3_divider = require("@mekari/pixel3-divider");
611
- var EditorToolbar = (0, import_vue10.defineComponent)({
931
+ var EditorToolbar = (0, import_vue14.defineComponent)({
612
932
  name: "EditorToolbar",
613
933
  props: {
614
- editor: Object,
615
- options: Object
934
+ editor: {
935
+ type: Object
936
+ },
937
+ options: {
938
+ type: Array
939
+ }
616
940
  },
617
941
  setup({
618
942
  editor,
619
943
  options
620
944
  }) {
621
- const items = ["heading", "bold", "italic", "underline", "strike", "blockquote", "bulletList", "orderedList", "align", "undo", "redo", "clear"];
945
+ const items = ["heading", "bold", "italic", "underline", "strike", "blockquote", "bulletList", "orderedList", "textColor", "fillColor", "textLink", "align", "undo", "redo", "clear"];
622
946
  const itemOptions = {
623
947
  heading: {
624
- tooltipLabel: "Text sizing",
948
+ tooltipLabel: "Text style",
625
949
  editor
626
950
  },
627
951
  bold: {
628
952
  tooltipLabel: "Bold",
629
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run()
953
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleBold().run()
630
954
  },
631
955
  italic: {
632
956
  tooltipLabel: "Italic",
633
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run()
957
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleItalic().run()
634
958
  },
635
959
  underline: {
636
960
  tooltipLabel: "Underline",
637
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run()
961
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleUnderline().run()
638
962
  },
639
963
  strike: {
640
- tooltipLabel: "Strikethrough",
641
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleStrike().run()
964
+ tooltipLabel: "Strike",
965
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleStrike().run()
642
966
  },
643
967
  blockquote: {
644
968
  tooltipLabel: "Blockquote",
645
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBlockquote().run()
969
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleBlockquote().run()
646
970
  },
647
971
  bulletList: {
648
972
  tooltipLabel: "Bullet list",
649
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBulletList().run()
973
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleBulletList().run()
650
974
  },
651
975
  orderedList: {
652
- tooltipLabel: "Ordered list",
653
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleOrderedList().run()
976
+ tooltipLabel: "Number list",
977
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().toggleOrderedList().run()
978
+ },
979
+ textColor: {
980
+ tooltipLabel: "Text color",
981
+ editor,
982
+ type: "text"
983
+ },
984
+ fillColor: {
985
+ tooltipLabel: "Fill color",
986
+ editor,
987
+ type: "fill"
988
+ },
989
+ textLink: {
990
+ tooltipLabel: "Insert link",
991
+ editor
654
992
  },
655
993
  align: {
656
- tooltipLabel: "Text align",
994
+ tooltipLabel: "Text alignment",
657
995
  editor
658
996
  },
659
997
  undo: {
660
998
  tooltipLabel: "Undo",
661
- onClick: () => editor == null ? void 0 : editor.chain().focus().undo().run()
999
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().undo().run()
662
1000
  },
663
1001
  redo: {
664
1002
  tooltipLabel: "Redo",
665
- onClick: () => editor == null ? void 0 : editor.chain().focus().redo().run()
1003
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().redo().run()
666
1004
  },
667
1005
  clear: {
668
- tooltipLabel: "Clear formatting",
669
- onClick: () => editor == null ? void 0 : editor.chain().focus().unsetAllMarks().run()
1006
+ tooltipLabel: "Reset format",
1007
+ onClick: () => (editor == null ? void 0 : editor.chain()).focus().unsetAllMarks().run()
670
1008
  }
671
1009
  };
672
- return () => (0, import_vue9.createVNode)("div", null, [options == null ? void 0 : options.map((option, idx) => (0, import_vue9.createVNode)(import_vue9.Fragment, null, [option == null ? void 0 : option.map((item) => {
673
- var _a, _b, _c, _d;
674
- if (items.includes(item)) {
675
- if (item === "heading") {
676
- return (0, import_vue9.createVNode)(HeadingExtention, {
677
- "tooltipLabel": (_a = itemOptions[item]) == null ? void 0 : _a.tooltipLabel,
1010
+ const renderExtension = /* @__PURE__ */ __name((item) => {
1011
+ const options2 = itemOptions[item];
1012
+ if (!options2)
1013
+ return null;
1014
+ switch (item) {
1015
+ case "heading":
1016
+ return (0, import_vue13.createVNode)(HeadingExtention, {
1017
+ "tooltipLabel": options2.tooltipLabel,
678
1018
  "editor": editor
679
1019
  }, null);
680
- } else if (item === "align") {
681
- return (0, import_vue9.createVNode)(AlignExtention, {
682
- "tooltipLabel": (_b = itemOptions[item]) == null ? void 0 : _b.tooltipLabel,
1020
+ case "align":
1021
+ return (0, import_vue13.createVNode)(AlignExtention, {
1022
+ "tooltipLabel": options2.tooltipLabel,
683
1023
  "editor": editor
684
1024
  }, null);
685
- } else {
686
- return (0, import_vue9.createVNode)(SingleExtention, {
1025
+ case "textColor":
1026
+ case "fillColor":
1027
+ return (0, import_vue13.createVNode)(ColorExtension, {
1028
+ "tooltipLabel": options2.tooltipLabel,
1029
+ "editor": editor,
1030
+ "type": options2.type
1031
+ }, null);
1032
+ case "textLink":
1033
+ return (0, import_vue13.createVNode)(LinkExtension, {
1034
+ "tooltipLabel": options2.tooltipLabel,
1035
+ "editor": editor
1036
+ }, null);
1037
+ default:
1038
+ return (0, import_vue13.createVNode)(SingleExtention, {
687
1039
  "name": item,
688
- "tooltipLabel": (_c = itemOptions[item]) == null ? void 0 : _c.tooltipLabel,
689
- "onClick": (_d = itemOptions[item]) == null ? void 0 : _d.onClick,
1040
+ "tooltipLabel": options2.tooltipLabel,
1041
+ "onClick": options2.onClick,
690
1042
  "editor": editor
691
1043
  }, null);
692
- }
693
1044
  }
694
- }), idx !== options.length - 1 && (0, import_vue9.createVNode)(import_pixel3_divider.MpDivider, {
1045
+ }, "renderExtension");
1046
+ return () => (0, import_vue13.createVNode)("div", null, [options == null ? void 0 : options.map((option, index) => (0, import_vue13.createVNode)(import_vue13.Fragment, null, [option.map((item) => {
1047
+ if (items.includes(item)) {
1048
+ return renderExtension(item);
1049
+ }
1050
+ }), index !== (options == null ? void 0 : options.length) - 1 && (0, import_vue13.createVNode)(import_pixel3_divider.MpDivider, {
695
1051
  "id": "divider-toolbar",
696
1052
  "orientation": "vertical"
697
1053
  }, null)]))]);