@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
@@ -1,16 +1,18 @@
1
1
  import {
2
2
  MpRichTextEditor
3
- } from "./chunk-HB4A6A3W.mjs";
4
- import "./chunk-SUI7NBPF.mjs";
3
+ } from "./chunk-PLASPZGG.mjs";
4
+ import "./chunk-IYCO25GF.mjs";
5
+ import "./chunk-VYCDVS5I.mjs";
6
+ import "./chunk-P5KVIGAP.mjs";
7
+ import "./chunk-V52XUOVW.mjs";
5
8
  import "./chunk-JAMH4XOS.mjs";
6
9
  import "./chunk-7OT6SREP.mjs";
7
10
  import "./chunk-ZQYCZIUL.mjs";
8
11
  import "./chunk-CENCRLRC.mjs";
9
- import "./chunk-CE52CW3F.mjs";
10
- import "./chunk-MMFX326I.mjs";
11
- import "./chunk-O5NDSZL6.mjs";
12
- import "./chunk-Y2B3Z5EO.mjs";
13
- import "./chunk-J5QZDLNA.mjs";
12
+ import "./chunk-JAKI6TU2.mjs";
13
+ import "./chunk-JHFPEZ7I.mjs";
14
+ import "./chunk-WBMECFO3.mjs";
15
+ import "./chunk-RNQQ7LGC.mjs";
14
16
  import "./chunk-QZ7VFGWC.mjs";
15
17
  export {
16
18
  MpRichTextEditor
package/package.json CHANGED
@@ -1,29 +1,37 @@
1
1
  {
2
2
  "name": "@mekari/pixel3-rich-text-editor",
3
3
  "description": "Mekari Pixel 3 | Rich text editor component is used to content editor based Tiptap.js",
4
- "version": "0.0.7-dev.4",
4
+ "version": "0.0.8-dev.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
10
  "dependencies": {
11
+ "@popperjs/core": "^2.11.4",
11
12
  "@tiptap/extension-blockquote": "2.7.4",
12
13
  "@tiptap/extension-bullet-list": "2.7.4",
14
+ "@tiptap/extension-color": "2.7.4",
15
+ "@tiptap/extension-highlight": "2.7.4",
16
+ "@tiptap/extension-link": "2.7.4",
13
17
  "@tiptap/extension-list-item": "2.7.4",
14
18
  "@tiptap/extension-ordered-list": "2.7.4",
15
19
  "@tiptap/extension-placeholder": "2.7.4",
16
20
  "@tiptap/extension-text-align": "2.7.4",
21
+ "@tiptap/extension-text-style": "2.7.4",
17
22
  "@tiptap/extension-underline": "2.7.4",
18
23
  "@tiptap/pm": "2.7.4",
19
24
  "@tiptap/starter-kit": "2.7.4",
20
25
  "@tiptap/core": "2.7.4",
21
26
  "@tiptap/vue-3": "2.7.4",
22
- "@mekari/pixel3-divider": "0.0.14-dev.2",
23
- "@mekari/pixel3-form-control": "0.0.14-dev.2",
24
- "@mekari/pixel3-popover": "0.0.14-dev.2",
25
- "@mekari/pixel3-styled-system": "0.1.0-dev.2",
26
- "@mekari/pixel3-text": "0.0.14-dev.2",
27
+ "@mekari/pixel3-button": "0.0.15-dev.0",
28
+ "@mekari/pixel3-color-picker": "0.1.0-dev.0",
29
+ "@mekari/pixel3-divider": "0.0.15-dev.0",
30
+ "@mekari/pixel3-form-control": "0.0.15-dev.0",
31
+ "@mekari/pixel3-input": "0.0.15-dev.0",
32
+ "@mekari/pixel3-popover": "0.0.15-dev.0",
33
+ "@mekari/pixel3-styled-system": "0.1.1-dev.0",
34
+ "@mekari/pixel3-text": "0.0.15-dev.0",
27
35
  "@mekari/pixel3-utils": "0.0.6"
28
36
  },
29
37
  "peerDependencies": {
@@ -1,282 +0,0 @@
1
- // src/extensions/icons.tsx
2
- import { createVNode as _createVNode } from "vue";
3
- import { defineComponent } from "vue";
4
- var BoldIcon = defineComponent({
5
- name: "BoldIcon",
6
- setup() {
7
- return () => _createVNode("svg", {
8
- "width": "12",
9
- "height": "16",
10
- "viewBox": "0 0 12 16",
11
- "fill": "none",
12
- "xmlns": "http://www.w3.org/2000/svg"
13
- }, [_createVNode("path", {
14
- "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",
15
- "stroke": "currentColor",
16
- "stroke-width": "1.5",
17
- "stroke-linecap": "round",
18
- "stroke-linejoin": "round"
19
- }, null)]);
20
- }
21
- });
22
- var ItalicIcon = defineComponent({
23
- name: "ItalicIcon",
24
- setup() {
25
- return () => _createVNode("svg", {
26
- "width": "14",
27
- "height": "16",
28
- "viewBox": "0 0 14 16",
29
- "fill": "none",
30
- "xmlns": "http://www.w3.org/2000/svg"
31
- }, [_createVNode("path", {
32
- "d": "M4.50002 1.3335H12.8333M1.16675 14.6668H9.49998M8.66683 1.3335L5.33354 14.6668",
33
- "stroke": "currentColor",
34
- "stroke-width": "1.5",
35
- "stroke-linecap": "round",
36
- "stroke-linejoin": "round"
37
- }, null)]);
38
- }
39
- });
40
- var UnderlineIcon = defineComponent({
41
- name: "UnderlineIcon",
42
- setup() {
43
- return () => _createVNode("svg", {
44
- "width": "16",
45
- "height": "16",
46
- "viewBox": "0 0 16 16",
47
- "fill": "none",
48
- "xmlns": "http://www.w3.org/2000/svg"
49
- }, [_createVNode("path", {
50
- "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",
51
- "fill": "currentColor"
52
- }, null)]);
53
- }
54
- });
55
- var StrikeIcon = defineComponent({
56
- name: "StrikeIcon",
57
- setup() {
58
- return () => _createVNode("svg", {
59
- "width": "16",
60
- "height": "16",
61
- "viewBox": "0 0 16 16",
62
- "fill": "none",
63
- "xmlns": "http://www.w3.org/2000/svg"
64
- }, [_createVNode("path", {
65
- "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",
66
- "fill": "currentColor"
67
- }, null)]);
68
- }
69
- });
70
- var BlockquoteIcon = defineComponent({
71
- name: "BlockquoteIcon",
72
- setup() {
73
- return () => _createVNode("svg", {
74
- "width": "20",
75
- "height": "18",
76
- "viewBox": "0 0 20 18",
77
- "fill": "none",
78
- "xmlns": "http://www.w3.org/2000/svg"
79
- }, [_createVNode("path", {
80
- "d": "M1.66675 9.29169H6.50007C7.77507 9.29169 8.65009 10.2584 8.65009 11.4417V14.1251C8.65009 15.3084 7.77507 16.275 6.50007 16.275H3.81676C2.63343 16.275 1.66675 15.3084 1.66675 14.1251V9.29169ZM1.66675 9.29169C1.66675 4.25002 2.60844 3.41673 5.44177 1.7334M11.3584 9.29169H16.1917C17.4667 9.29169 18.3418 10.2584 18.3418 11.4417V14.1251C18.3418 15.3084 17.4667 16.275 16.1917 16.275H13.5084C12.3251 16.275 11.3584 15.3084 11.3584 14.1251V9.29169ZM11.3584 9.29169C11.3584 4.25002 12.3001 3.41673 15.1334 1.7334",
81
- "stroke": "currentColor",
82
- "stroke-width": "1.5",
83
- "stroke-linecap": "round",
84
- "stroke-linejoin": "round"
85
- }, null)]);
86
- }
87
- });
88
- var BulletListIcon = defineComponent({
89
- name: "BulletListIcon",
90
- setup() {
91
- return () => _createVNode("svg", {
92
- "width": "18",
93
- "height": "18",
94
- "viewBox": "0 0 16 16",
95
- "fill": "none",
96
- "xmlns": "http://www.w3.org/2000/svg"
97
- }, [_createVNode("path", {
98
- "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",
99
- "stroke": "currentColor",
100
- "stroke-width": "1.5",
101
- "stroke-linecap": "round",
102
- "stroke-linejoin": "round"
103
- }, null)]);
104
- }
105
- });
106
- var OrderedListIcon = defineComponent({
107
- name: "OrderedListIcon",
108
- setup() {
109
- return () => _createVNode("svg", {
110
- "width": "18",
111
- "height": "18",
112
- "viewBox": "0 0 16 16",
113
- "fill": "none",
114
- "xmlns": "http://www.w3.org/2000/svg"
115
- }, [_createVNode("path", {
116
- "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",
117
- "fill": "currentColor"
118
- }, null)]);
119
- }
120
- });
121
- var AlignLeftIcon = defineComponent({
122
- name: "AlignLeftIcon",
123
- setup() {
124
- return () => _createVNode("svg", {
125
- "width": "22",
126
- "height": "22",
127
- "viewBox": "0 0 20 20",
128
- "fill": "none",
129
- "xmlns": "http://www.w3.org/2000/svg"
130
- }, [_createVNode("path", {
131
- "d": "M3 4L17 4 M3 12L17 12 M3 8L11 8 M3 16L11 16",
132
- "stroke": "currentColor",
133
- "stroke-width": "1.5",
134
- "stroke-linecap": "round",
135
- "stroke-linejoin": "round"
136
- }, null)]);
137
- }
138
- });
139
- var AlignCenterIcon = defineComponent({
140
- name: "AlignCenterIcon",
141
- setup() {
142
- return () => _createVNode("svg", {
143
- "width": "22",
144
- "height": "22",
145
- "viewBox": "0 0 20 20",
146
- "fill": "none",
147
- "xmlns": "http://www.w3.org/2000/svg"
148
- }, [_createVNode("path", {
149
- "d": "M3 4L17 4 M3 12L17 12 M6 8L14 8 M6 16L14 16",
150
- "stroke": "currentColor",
151
- "stroke-width": "1.5",
152
- "stroke-linecap": "round",
153
- "stroke-linejoin": "round"
154
- }, null)]);
155
- }
156
- });
157
- var AlignRightIcon = defineComponent({
158
- name: "AlignRightIcon",
159
- setup() {
160
- return () => _createVNode("svg", {
161
- "width": "22",
162
- "height": "22",
163
- "viewBox": "0 0 20 20",
164
- "fill": "none",
165
- "xmlns": "http://www.w3.org/2000/svg"
166
- }, [_createVNode("path", {
167
- "d": "M3 4L17 4 M3 12L17 12 M9 8L17 8 M9 16L17 16",
168
- "stroke": "currentColor",
169
- "stroke-width": "1.5",
170
- "stroke-linecap": "round",
171
- "stroke-linejoin": "round"
172
- }, null)]);
173
- }
174
- });
175
- var AlignJustifyIcon = defineComponent({
176
- name: "AlignJustifyIcon",
177
- setup() {
178
- return () => _createVNode("svg", {
179
- "width": "22",
180
- "height": "22",
181
- "viewBox": "0 0 20 20",
182
- "fill": "none",
183
- "xmlns": "http://www.w3.org/2000/svg"
184
- }, [_createVNode("path", {
185
- "d": "M3 4L17 4 M3 12L17 12 M3 8L17 8 M3 16L17 16",
186
- "stroke": "currentColor",
187
- "stroke-width": "1.5",
188
- "stroke-linecap": "round",
189
- "stroke-linejoin": "round"
190
- }, null)]);
191
- }
192
- });
193
- var UndoIcon = defineComponent({
194
- name: "UndoIcon",
195
- setup() {
196
- return () => _createVNode("svg", {
197
- "width": "24",
198
- "height": "24",
199
- "viewBox": "0 0 24 24",
200
- "fill": "none",
201
- "xmlns": "http://www.w3.org/2000/svg"
202
- }, [_createVNode("path", {
203
- "d": "M4.06317 8.15033C4.49451 7.3513 5.05312 6.55227 5.80265 5.80273C9.18969 2.41569 14.6768 2.41569 18.0639 5.80273C21.4509 9.18977 21.4509 14.6769 18.0639 18.064C14.6768 21.451 9.18969 21.451 5.80265 18.064C4.544 16.8053 3.75204 15.2497 3.42677 13.6233M3.052 4.8057L3.35606 9.19684L7.47855 8.55343",
204
- "stroke": "currentColor",
205
- "stroke-width": "1.5",
206
- "stroke-linecap": "round",
207
- "stroke-linejoin": "round"
208
- }, null)]);
209
- }
210
- });
211
- var RedoIcon = defineComponent({
212
- name: "RedoIcon",
213
- setup() {
214
- return () => _createVNode("svg", {
215
- "width": "24",
216
- "height": "24",
217
- "viewBox": "0 0 24 24",
218
- "fill": "none",
219
- "xmlns": "http://www.w3.org/2000/svg"
220
- }, [_createVNode("path", {
221
- "d": "M19.593 8.15033C19.1617 7.3513 18.603 6.55227 17.8535 5.80273C14.4665 2.41569 8.97932 2.41569 5.59228 5.80273C2.20524 9.18977 2.20524 14.6769 5.59228 18.064C8.97932 21.451 14.4665 21.451 17.8535 18.064C19.1122 16.8053 19.9041 15.2497 20.2294 13.6233M20.6042 4.8057L20.3001 9.19684L16.1776 8.55343",
222
- "stroke": "currentColor",
223
- "stroke-width": "1.5",
224
- "stroke-linecap": "round",
225
- "stroke-linejoin": "round"
226
- }, null)]);
227
- }
228
- });
229
- var ClearIcon = defineComponent({
230
- name: "ClearIcon",
231
- setup() {
232
- return () => _createVNode("svg", {
233
- "width": "18",
234
- "height": "16",
235
- "viewBox": "0 0 18 16",
236
- "fill": "none",
237
- "xmlns": "http://www.w3.org/2000/svg"
238
- }, [_createVNode("path", {
239
- "d": "M3.5 1H16.5M8.42149 6L10.6001 1M4.5 15L7.13903 8.9433M1.5 4L14.5 15",
240
- "stroke": "currentColor",
241
- "stroke-width": "1.5",
242
- "stroke-linecap": "round",
243
- "stroke-linejoin": "round"
244
- }, null)]);
245
- }
246
- });
247
- var CaretIcon = defineComponent({
248
- name: "CaretIcon",
249
- setup() {
250
- return () => _createVNode("svg", {
251
- "width": "10",
252
- "height": "6",
253
- "viewBox": "0 0 10 6",
254
- "fill": "none",
255
- "xmlns": "http://www.w3.org/2000/svg",
256
- "style": {
257
- marginLeft: "8px"
258
- }
259
- }, [_createVNode("path", {
260
- "d": "M0 0.5L5 5.5L10 0.5L0 0.5Z",
261
- "fill": "currentColor"
262
- }, null)]);
263
- }
264
- });
265
-
266
- export {
267
- BoldIcon,
268
- ItalicIcon,
269
- UnderlineIcon,
270
- StrikeIcon,
271
- BlockquoteIcon,
272
- BulletListIcon,
273
- OrderedListIcon,
274
- AlignLeftIcon,
275
- AlignCenterIcon,
276
- AlignRightIcon,
277
- AlignJustifyIcon,
278
- UndoIcon,
279
- RedoIcon,
280
- ClearIcon,
281
- CaretIcon
282
- };
@@ -1,44 +0,0 @@
1
- import {
2
- BlockquoteIcon,
3
- BoldIcon,
4
- BulletListIcon,
5
- ClearIcon,
6
- ItalicIcon,
7
- OrderedListIcon,
8
- RedoIcon,
9
- StrikeIcon,
10
- UnderlineIcon,
11
- UndoIcon
12
- } from "./chunk-J5QZDLNA.mjs";
13
-
14
- // src/extensions/single-extension.tsx
15
- import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
16
- import { defineComponent } from "vue";
17
- var SingleExtention = defineComponent({
18
- name: "SingleExtention",
19
- props: {
20
- name: String,
21
- tooltipLabel: String,
22
- onClick: Function,
23
- editor: Object
24
- },
25
- setup({
26
- name,
27
- tooltipLabel,
28
- onClick,
29
- editor
30
- }) {
31
- return () => _withDirectives(_createVNode("button", {
32
- "class": {
33
- "is-active": editor == null ? void 0 : editor.isActive(name)
34
- },
35
- "onClick": onClick
36
- }, [name === "bold" && _createVNode(BoldIcon, null, null), name === "italic" && _createVNode(ItalicIcon, null, null), name === "underline" && _createVNode(UnderlineIcon, null, null), name === "strike" && _createVNode(StrikeIcon, null, null), name === "blockquote" && _createVNode(BlockquoteIcon, null, null), name === "bulletList" && _createVNode(BulletListIcon, null, null), name === "orderedList" && _createVNode(OrderedListIcon, null, null), name === "undo" && _createVNode(UndoIcon, null, null), name === "redo" && _createVNode(RedoIcon, null, null), name === "clear" && _createVNode(ClearIcon, null, null)]), [[_resolveDirective("tooltip"), {
37
- label: tooltipLabel
38
- }]]);
39
- }
40
- });
41
-
42
- export {
43
- SingleExtention
44
- };
@@ -1,124 +0,0 @@
1
- import {
2
- AlignCenterIcon,
3
- AlignJustifyIcon,
4
- AlignLeftIcon,
5
- AlignRightIcon
6
- } from "./chunk-J5QZDLNA.mjs";
7
-
8
- // src/extensions/align-extension.tsx
9
- import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
10
- import { defineComponent } from "vue";
11
- import { MpPopover, MpPopoverTrigger, MpPopoverContent, MpPopoverList, MpPopoverListItem } from "@mekari/pixel3-popover";
12
- import { css } from "@mekari/pixel3-styled-system/css";
13
- var AlignExtention = defineComponent({
14
- name: "AlignExtention",
15
- props: {
16
- tooltipLabel: String,
17
- editor: Object
18
- },
19
- setup({
20
- tooltipLabel,
21
- editor
22
- }) {
23
- return () => _createVNode(MpPopover, {
24
- "id": "popover-align-extention"
25
- }, {
26
- default: () => [_createVNode(MpPopoverTrigger, null, {
27
- default: () => [_withDirectives(_createVNode("button", {
28
- "class": {
29
- "is-active": (editor == null ? void 0 : editor.isActive({
30
- textAlign: "left"
31
- })) || (editor == null ? void 0 : editor.isActive({
32
- textAlign: "right"
33
- })) || (editor == null ? void 0 : editor.isActive({
34
- textAlign: "center"
35
- })) || (editor == null ? void 0 : editor.isActive({
36
- textAlign: "justify"
37
- })),
38
- "text-sizing": true
39
- },
40
- "style": {
41
- padding: "0 4px"
42
- }
43
- }, [(editor == null ? void 0 : editor.isActive({
44
- textAlign: "left"
45
- })) && _createVNode(AlignLeftIcon, null, null), (editor == null ? void 0 : editor.isActive({
46
- textAlign: "center"
47
- })) && _createVNode(AlignCenterIcon, null, null), (editor == null ? void 0 : editor.isActive({
48
- textAlign: "right"
49
- })) && _createVNode(AlignRightIcon, null, null), (editor == null ? void 0 : editor.isActive({
50
- textAlign: "justify"
51
- })) && _createVNode(AlignJustifyIcon, null, null), !(editor == null ? void 0 : editor.isActive({
52
- textAlign: "left"
53
- })) && !(editor == null ? void 0 : editor.isActive({
54
- textAlign: "right"
55
- })) && !(editor == null ? void 0 : editor.isActive({
56
- textAlign: "center"
57
- })) && !(editor == null ? void 0 : editor.isActive({
58
- textAlign: "justify"
59
- })) && _createVNode(AlignLeftIcon, null, null)]), [[_resolveDirective("tooltip"), {
60
- label: tooltipLabel
61
- }]])]
62
- }), _createVNode(MpPopoverContent, {
63
- "class": css({
64
- width: "46px",
65
- maxWidth: "46px",
66
- maxHeight: "300px"
67
- })
68
- }, {
69
- default: () => [_createVNode(MpPopoverList, {
70
- "class": css({
71
- gap: "2",
72
- alignItems: "center"
73
- })
74
- }, {
75
- default: () => [_createVNode(MpPopoverListItem, {
76
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("left").run(),
77
- "class": {
78
- "is-active": editor == null ? void 0 : editor.isActive({
79
- textAlign: "left"
80
- }),
81
- "text-sizing": true
82
- }
83
- }, {
84
- default: () => [_createVNode(AlignLeftIcon, null, null)]
85
- }), _createVNode(MpPopoverListItem, {
86
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("center").run(),
87
- "class": {
88
- "is-active": editor == null ? void 0 : editor.isActive({
89
- textAlign: "center"
90
- }),
91
- "text-sizing": true
92
- }
93
- }, {
94
- default: () => [_createVNode(AlignCenterIcon, null, null)]
95
- }), _createVNode(MpPopoverListItem, {
96
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("right").run(),
97
- "class": {
98
- "is-active": editor == null ? void 0 : editor.isActive({
99
- textAlign: "right"
100
- }),
101
- "text-sizing": true
102
- }
103
- }, {
104
- default: () => [_createVNode(AlignRightIcon, null, null)]
105
- }), _createVNode(MpPopoverListItem, {
106
- "onClick": () => editor == null ? void 0 : editor.chain().focus().setTextAlign("justify").run(),
107
- "class": {
108
- "is-active": editor == null ? void 0 : editor.isActive({
109
- textAlign: "justify"
110
- }),
111
- "text-sizing": true
112
- }
113
- }, {
114
- default: () => [_createVNode(AlignLeftIcon, null, null)]
115
- })]
116
- })]
117
- })]
118
- });
119
- }
120
- });
121
-
122
- export {
123
- AlignExtention
124
- };
@@ -1,107 +0,0 @@
1
- import {
2
- SingleExtention
3
- } from "./chunk-MMFX326I.mjs";
4
- import {
5
- AlignExtention
6
- } from "./chunk-O5NDSZL6.mjs";
7
- import {
8
- HeadingExtention
9
- } from "./chunk-Y2B3Z5EO.mjs";
10
-
11
- // src/editor-toolbar.tsx
12
- import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
13
- import { defineComponent } from "vue";
14
- import { MpDivider } from "@mekari/pixel3-divider";
15
- var EditorToolbar = defineComponent({
16
- name: "EditorToolbar",
17
- props: {
18
- editor: Object,
19
- options: Object
20
- },
21
- setup({
22
- editor,
23
- options
24
- }) {
25
- const items = ["heading", "bold", "italic", "underline", "strike", "blockquote", "bulletList", "orderedList", "align", "undo", "redo", "clear"];
26
- const itemOptions = {
27
- heading: {
28
- tooltipLabel: "Text sizing",
29
- editor
30
- },
31
- bold: {
32
- tooltipLabel: "Bold",
33
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run()
34
- },
35
- italic: {
36
- tooltipLabel: "Italic",
37
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run()
38
- },
39
- underline: {
40
- tooltipLabel: "Underline",
41
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleUnderline().run()
42
- },
43
- strike: {
44
- tooltipLabel: "Strikethrough",
45
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleStrike().run()
46
- },
47
- blockquote: {
48
- tooltipLabel: "Blockquote",
49
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBlockquote().run()
50
- },
51
- bulletList: {
52
- tooltipLabel: "Bullet list",
53
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleBulletList().run()
54
- },
55
- orderedList: {
56
- tooltipLabel: "Ordered list",
57
- onClick: () => editor == null ? void 0 : editor.chain().focus().toggleOrderedList().run()
58
- },
59
- align: {
60
- tooltipLabel: "Text align",
61
- editor
62
- },
63
- undo: {
64
- tooltipLabel: "Undo",
65
- onClick: () => editor == null ? void 0 : editor.chain().focus().undo().run()
66
- },
67
- redo: {
68
- tooltipLabel: "Redo",
69
- onClick: () => editor == null ? void 0 : editor.chain().focus().redo().run()
70
- },
71
- clear: {
72
- tooltipLabel: "Clear formatting",
73
- onClick: () => editor == null ? void 0 : editor.chain().focus().unsetAllMarks().run()
74
- }
75
- };
76
- return () => _createVNode("div", null, [options == null ? void 0 : options.map((option, idx) => _createVNode(_Fragment, null, [option == null ? void 0 : option.map((item) => {
77
- var _a, _b, _c, _d;
78
- if (items.includes(item)) {
79
- if (item === "heading") {
80
- return _createVNode(HeadingExtention, {
81
- "tooltipLabel": (_a = itemOptions[item]) == null ? void 0 : _a.tooltipLabel,
82
- "editor": editor
83
- }, null);
84
- } else if (item === "align") {
85
- return _createVNode(AlignExtention, {
86
- "tooltipLabel": (_b = itemOptions[item]) == null ? void 0 : _b.tooltipLabel,
87
- "editor": editor
88
- }, null);
89
- } else {
90
- return _createVNode(SingleExtention, {
91
- "name": item,
92
- "tooltipLabel": (_c = itemOptions[item]) == null ? void 0 : _c.tooltipLabel,
93
- "onClick": (_d = itemOptions[item]) == null ? void 0 : _d.onClick,
94
- "editor": editor
95
- }, null);
96
- }
97
- }
98
- }), idx !== options.length - 1 && _createVNode(MpDivider, {
99
- "id": "divider-toolbar",
100
- "orientation": "vertical"
101
- }, null)]))]);
102
- }
103
- });
104
-
105
- export {
106
- EditorToolbar
107
- };
File without changes