@remarkablejames/editor 0.0.2 → 0.0.4

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 (193) hide show
  1. package/lib/{ActionMenuButton-Bmn3RME4.js → ActionMenuButton-BUtJUsfO.js} +9 -10
  2. package/lib/ActionMenuButton-M55VtCZ5.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +166 -133
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +13 -12
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -10
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +9 -8
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +42 -46
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +13 -14
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +6 -5
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +30 -31
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +9 -8
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +18 -19
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +9 -8
  25. package/lib/Drawer-CdQBnwUs.cjs +2 -0
  26. package/lib/{Drawer-DvGh9aXG.js → Drawer-mlmJ2nCT.js} +41 -47
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +3 -3
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +15 -16
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +24 -28
  33. package/lib/ExportPdf.cjs +3 -3
  34. package/lib/ExportPdf.js +14 -13
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +6 -6
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +8 -7
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +16 -15
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +27 -27
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +22 -23
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +11 -11
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +10 -9
  49. package/lib/Iframe-B_a_AoZc.cjs +1 -0
  50. package/lib/{Iframe-CnnvV6cK.js → Iframe-CYgR99Ny.js} +11 -13
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +2 -2
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +4 -5
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +79 -82
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +26 -27
  59. package/lib/Indent-BAcoFdaq.cjs +1 -0
  60. package/lib/{Indent-Bsj8gKvT.js → Indent-BMz2ILRl.js} +31 -30
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +2 -2
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +12 -11
  65. package/lib/{Katex-CilGTz7u.js → Katex-DOlb4iTP.js} +19 -22
  66. package/lib/Katex-bIhj82VV.cjs +4 -0
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +2 -2
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +19 -20
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/LinkEditBlock-Cqs5RxjV.cjs +5 -0
  74. package/lib/{LinkEditBlock-BD_WvA3r.js → LinkEditBlock-xnokk4G7.js} +19 -24
  75. package/lib/Mention.js +3 -3
  76. package/lib/{Mermaid-BrjU75Bs.js → Mermaid-Bs3pIGc6.js} +45 -48
  77. package/lib/Mermaid-DiOdgQv1.cjs +2 -0
  78. package/lib/Mermaid.cjs +1 -1
  79. package/lib/Mermaid.js +2 -2
  80. package/lib/MoreMark.cjs +1 -1
  81. package/lib/MoreMark.js +26 -28
  82. package/lib/OrderedList.cjs +1 -1
  83. package/lib/OrderedList.js +11 -10
  84. package/lib/SearchAndReplace.cjs +1 -1
  85. package/lib/SearchAndReplace.js +37 -42
  86. package/lib/SlashCommand.cjs +1 -1
  87. package/lib/SlashCommand.js +6 -6
  88. package/lib/SlashCommandNodeView-CLimjqhb.cjs +1 -0
  89. package/lib/{SlashCommandNodeView-COx5qZ2y.js → SlashCommandNodeView-CYcf7mVz.js} +67 -79
  90. package/lib/Strike.cjs +1 -1
  91. package/lib/Strike.js +12 -11
  92. package/lib/{Table-BlM8yMhr.js → Table-bz1Wcojf.js} +47 -47
  93. package/lib/Table-dlXTKKwJ.cjs +5 -0
  94. package/lib/Table.cjs +1 -1
  95. package/lib/Table.js +1 -1
  96. package/lib/TaskList.cjs +1 -1
  97. package/lib/TaskList.js +12 -11
  98. package/lib/TextAlign.cjs +1 -1
  99. package/lib/TextAlign.js +26 -27
  100. package/lib/TextDirection.cjs +1 -1
  101. package/lib/TextDirection.js +18 -19
  102. package/lib/TextUnderline.cjs +1 -1
  103. package/lib/TextUnderline.js +9 -8
  104. package/lib/{Twitter-BP8sYXX7.js → Twitter-CNTXzgt0.js} +18 -22
  105. package/lib/Twitter-DhEnGg6P.cjs +1 -0
  106. package/lib/Twitter.cjs +1 -1
  107. package/lib/Twitter.js +2 -2
  108. package/lib/Video.cjs +1 -1
  109. package/lib/Video.js +5 -6
  110. package/lib/bubble.cjs +3 -3
  111. package/lib/bubble.js +78 -87
  112. package/lib/{clsx-m_C5j3RU.js → clsx-CDyrfCnw.js} +24 -24
  113. package/lib/{dropdown-menu-C1hdPLCZ.js → dropdown-menu-BuSlU2uN.js} +1 -1
  114. package/lib/{dropdown-menu-CkHN04Mx.cjs → dropdown-menu-CfWNst4v.cjs} +1 -1
  115. package/lib/extensions/Attachment/Attachment.d.ts +22 -2
  116. package/lib/extensions/Image/Image.d.ts +11 -0
  117. package/lib/extensions/Image/components/ImageCropper.d.ts +1 -1
  118. package/lib/index-8B00E8e4.js +5055 -0
  119. package/lib/index-BrxL7y9p.cjs +1 -0
  120. package/lib/index-Bt9LiArC.cjs +10 -0
  121. package/lib/{index-B3Ijnbxs.js → index-C-tDsIKJ.js} +1 -1
  122. package/lib/{index-C1KQsOcg.js → index-C1WCZhyA.js} +1 -1
  123. package/lib/{index-C8FjP66D.js → index-CsSfYR30.js} +1 -1
  124. package/lib/{index-4Q5IhypJ.js → index-DZfkCNKr.js} +15 -9
  125. package/lib/{index-s3l5RdyW.js → index-DjDf4BK8.js} +1 -1
  126. package/lib/index.cjs +4 -4
  127. package/lib/index.js +147 -392
  128. package/lib/locale-bundle.cjs +1 -1
  129. package/lib/locale-bundle.js +1 -1
  130. package/lib/locales/en.d.ts +189 -188
  131. package/lib/locales/fi.d.ts +189 -188
  132. package/lib/locales/hu.d.ts +189 -188
  133. package/lib/locales/index.d.ts +1134 -1128
  134. package/lib/locales/pt-br.d.ts +189 -188
  135. package/lib/locales/vi.d.ts +189 -188
  136. package/lib/locales/zh-cn.d.ts +189 -188
  137. package/lib/{popover-B05Fd8lC.cjs → popover-51mwx3UY.cjs} +1 -1
  138. package/lib/{popover-CsSXh7w6.js → popover-DMPRgXD3.js} +1 -1
  139. package/lib/{renderNodeView-C_hPIdEs.js → renderNodeView-BJSrgyGj.js} +2 -2
  140. package/lib/{select-7ubC1NF0.cjs → select-B7v1Scb-.cjs} +1 -1
  141. package/lib/{select-B3-5wTqn.js → select-BxFDMaZi.js} +1 -1
  142. package/lib/{separator-CYCA8tSn.js → separator-CpqX9KQC.js} +12 -13
  143. package/lib/separator-kB9YUfeO.cjs +1 -0
  144. package/lib/style.css +1 -1
  145. package/lib/{textarea-1FhpmBkP.js → textarea-C5DsgzSy.js} +1 -1
  146. package/lib/{textarea-Bjhcpp76.cjs → textarea-bQSzjqg3.cjs} +1 -1
  147. package/lib/theme/theme.d.ts +1 -1
  148. package/lib/{updatePosition-DvfTZHcH.js → updatePosition-e90ZrFWW.js} +2 -2
  149. package/package.json +1 -1
  150. package/lib/ActionMenuButton-C5P0Kzrb.cjs +0 -1
  151. package/lib/Drawer-gz9U5ArC.cjs +0 -2
  152. package/lib/Icon-CKM0tYbW.js +0 -15
  153. package/lib/Icon-CQyFgXeo.cjs +0 -1
  154. package/lib/Iframe-Ds6gG2YO.cjs +0 -1
  155. package/lib/ImageCropper-BKhXlnXN.cjs +0 -1
  156. package/lib/ImageCropper-DUzu_9-6.js +0 -896
  157. package/lib/Indent-D_7HOYYd.cjs +0 -1
  158. package/lib/Katex-lL3bHXJd.cjs +0 -4
  159. package/lib/LinkEditBlock-D3HSHmsU.cjs +0 -5
  160. package/lib/Mermaid-BfeLPzoS.cjs +0 -2
  161. package/lib/SlashCommandNodeView-DD-nlhM-.cjs +0 -1
  162. package/lib/Table-C21AlUrh.cjs +0 -5
  163. package/lib/Twitter-D46MnvPr.cjs +0 -1
  164. package/lib/Video-Bpd8W8l6.js +0 -231
  165. package/lib/Video-BwrHx6B1.cjs +0 -1
  166. package/lib/button-BmTP96NR.cjs +0 -1
  167. package/lib/button-CDIxPURh.js +0 -35
  168. package/lib/checkbox-7sfSdzy9.js +0 -29
  169. package/lib/checkbox-DyVlLWHv.cjs +0 -1
  170. package/lib/dialog-B-jOQ5i3.cjs +0 -1
  171. package/lib/dialog-QWWUWOGP.js +0 -95
  172. package/lib/events.constant-Bh2uzJud.js +0 -71
  173. package/lib/events.constant-ELn21EzG.cjs +0 -1
  174. package/lib/file-BLas99n7.js +0 -43
  175. package/lib/file-i7e4nQY2.cjs +0 -1
  176. package/lib/index-CAiZY1nx.js +0 -2741
  177. package/lib/index-DWSAk_9a.cjs +0 -1
  178. package/lib/index-bVGIXhRg.cjs +0 -1
  179. package/lib/input-qvpuOf-3.js +0 -21
  180. package/lib/input-s0JD5kf2.cjs +0 -1
  181. package/lib/isNumber-BTYSVlKo.cjs +0 -1
  182. package/lib/isNumber-WaBzl_0s.js +0 -15
  183. package/lib/label-CFax-gzo.cjs +0 -1
  184. package/lib/label-DC37f2RQ.js +0 -11
  185. package/lib/separator-ncbdw4oq.cjs +0 -1
  186. package/lib/tabs-BeHxylKH.js +0 -46
  187. package/lib/tabs-DBqNpGAq.cjs +0 -1
  188. package/lib/throttle-CRNq0z-O.js +0 -249
  189. package/lib/throttle-gTTvqDTW.cjs +0 -1
  190. package/lib/toggle-DoJTBdvy.js +0 -89
  191. package/lib/toggle-oFwBZC4x.cjs +0 -1
  192. package/lib/useButtonProps-BE10eHkG.js +0 -165
  193. package/lib/useButtonProps-CFu0GHzW.cjs +0 -1
@@ -1,33 +1,31 @@
1
- import { jsx as d, jsxs as g } from "react/jsx-runtime";
2
- import { forwardRef as y, useState as b, useRef as v, useImperativeHandle as S, useEffect as B, Fragment as D } from "react";
3
- import { E as w, e as N } from "./events.constant-Bh2uzJud.js";
4
- import { H as L, u as T } from "./index-4Q5IhypJ.js";
5
- import { c as V } from "./index-CAiZY1nx.js";
6
- import { y as $, V as z } from "./index-BG0kQamI.js";
7
- import { L as q } from "./label-DC37f2RQ.js";
8
- import { I as G } from "./Icon-CKM0tYbW.js";
9
- function Z({ t: i }) {
1
+ import { jsx as d, jsxs as p } from "react/jsx-runtime";
2
+ import { forwardRef as H, useState as b, useRef as w, useImperativeHandle as y, useEffect as S, Fragment as E } from "react";
3
+ import { E as B, v as T, L as $, c as z, I as q } from "./index-8B00E8e4.js";
4
+ import "./theme.js";
5
+ import { H as v, u as D } from "./index-DZfkCNKr.js";
6
+ import { y as G, V } from "./index-BG0kQamI.js";
7
+ function X({ t: n }) {
10
8
  const a = [
11
9
  {
12
10
  name: "format",
13
- title: i("editor.slash.format"),
11
+ title: n("editor.slash.format"),
14
12
  commands: []
15
13
  },
16
14
  {
17
15
  name: "insert",
18
- title: i("editor.slash.insert"),
16
+ title: n("editor.slash.insert"),
19
17
  commands: []
20
18
  }
21
19
  ];
22
- return L.forEach((e) => {
20
+ return v.forEach((e) => {
23
21
  a[0].commands.push({
24
22
  name: `heading${e}`,
25
- label: i(e === "Paragraph" ? "editor.paragraph.tooltip" : `editor.heading.h${e}.tooltip`),
23
+ label: n(e === "Paragraph" ? "editor.paragraph.tooltip" : `editor.heading.h${e}.tooltip`),
26
24
  aliases: [`h${e}`, "bt", `bt${e}`],
27
25
  iconName: `Heading${e}`,
28
26
  isActive: (t) => e === "Paragraph" ? !1 : t.isActive("heading", { level: e }) || !1,
29
27
  action: ({ editor: t, range: l }) => {
30
- const r = L.find(
28
+ const r = v.find(
31
29
  (m) => t.isActive("heading", { level: m })
32
30
  );
33
31
  if (e === "Paragraph") {
@@ -43,7 +41,7 @@ function Z({ t: i }) {
43
41
  });
44
42
  }), a[0].commands.push({
45
43
  name: "bulletList",
46
- label: i("editor.bulletlist.tooltip"),
44
+ label: n("editor.bulletlist.tooltip"),
47
45
  aliases: ["ul", "yxlb"],
48
46
  iconName: "List",
49
47
  isActive: (e) => e.isActive("bulletList"),
@@ -52,7 +50,7 @@ function Z({ t: i }) {
52
50
  }
53
51
  }), a[0].commands.push({
54
52
  name: "orderedlist",
55
- label: i("editor.orderedlist.tooltip"),
53
+ label: n("editor.orderedlist.tooltip"),
56
54
  aliases: ["ol", "yxlb"],
57
55
  iconName: "ListOrdered",
58
56
  isActive: (e) => e.isActive("orderedList"),
@@ -61,7 +59,7 @@ function Z({ t: i }) {
61
59
  }
62
60
  }), a[0].commands.push({
63
61
  name: "taskList",
64
- label: i("editor.tasklist.tooltip"),
62
+ label: n("editor.tasklist.tooltip"),
65
63
  iconName: "ListTodo",
66
64
  description: "Task list with todo items",
67
65
  aliases: ["todo"],
@@ -71,7 +69,7 @@ function Z({ t: i }) {
71
69
  }
72
70
  }), a[0].commands.push({
73
71
  name: "blockquote",
74
- label: i("editor.blockquote.tooltip"),
72
+ label: n("editor.blockquote.tooltip"),
75
73
  description: "插入引入格式",
76
74
  aliases: ["yr"],
77
75
  iconName: "TextQuote",
@@ -81,7 +79,7 @@ function Z({ t: i }) {
81
79
  }
82
80
  }), a[0].commands.push({
83
81
  name: "codeBlock",
84
- label: i("editor.codeblock.tooltip"),
82
+ label: n("editor.codeblock.tooltip"),
85
83
  iconName: "Code2",
86
84
  description: "Code block with syntax highlighting",
87
85
  shouldBeHidden: (e) => e.isActive("columns"),
@@ -91,31 +89,19 @@ function Z({ t: i }) {
91
89
  }
92
90
  }), a[1].commands.push({
93
91
  name: "image",
94
- label: i("editor.image.tooltip"),
92
+ label: n("editor.image.tooltip"),
95
93
  iconName: "ImageUp",
96
94
  description: "Insert a image",
97
95
  aliases: ["image", "tp", "tupian"],
98
96
  shouldBeHidden: (e) => e.isActive("columns"),
99
97
  action: ({ editor: e, range: t }) => {
100
98
  e.chain().focus().deleteRange(t).run();
101
- const l = w.UPLOAD_IMAGE(e.id);
102
- N(l, !0);
103
- }
104
- }), a[1].commands.push({
105
- name: "video",
106
- label: i("editor.video.tooltip"),
107
- iconName: "Video",
108
- description: "Insert a video",
109
- aliases: ["video", "sp", "shipin"],
110
- shouldBeHidden: (e) => e.isActive("columns"),
111
- action: ({ editor: e, range: t }) => {
112
- e.chain().focus().deleteRange(t).run();
113
- const l = w.UPLOAD_VIDEO(e.id);
114
- N(l, !0);
99
+ const l = B.UPLOAD_IMAGE(e.id);
100
+ T(l, !0);
115
101
  }
116
102
  }), a[1].commands.push({
117
103
  name: "table",
118
- label: i("editor.table.tooltip"),
104
+ label: n("editor.table.tooltip"),
119
105
  iconName: "Table",
120
106
  description: "Insert a table",
121
107
  aliases: ["table", "bg", "biaoge", "biao"],
@@ -125,7 +111,7 @@ function Z({ t: i }) {
125
111
  }
126
112
  }), a[1].commands.push({
127
113
  name: "horizontalRule",
128
- label: i("editor.horizontalrule.tooltip"),
114
+ label: n("editor.horizontalrule.tooltip"),
129
115
  iconName: "Minus",
130
116
  description: "Insert a horizontal divider",
131
117
  aliases: ["hr", "fgx", "fg"],
@@ -134,7 +120,7 @@ function Z({ t: i }) {
134
120
  }
135
121
  }), a[1].commands.push({
136
122
  name: "columns",
137
- label: i("editor.columns.tooltip"),
123
+ label: n("editor.columns.tooltip"),
138
124
  iconName: "Columns2",
139
125
  description: "Add two column content",
140
126
  action: ({ editor: e }) => {
@@ -142,68 +128,70 @@ function Z({ t: i }) {
142
128
  }
143
129
  }), a;
144
130
  }
145
- function P(i, a) {
146
- return i.map((t) => ({
131
+ function P(n, a) {
132
+ return n.map((t) => ({
147
133
  ...t,
148
134
  commands: t.commands.filter((l) => {
149
135
  const r = l.label.toLowerCase().trim(), m = a.toLowerCase().trim();
150
136
  if (l.aliases) {
151
- const u = l.aliases.map((h) => h.toLowerCase().trim()), x = r.match(m), s = u.some((h) => h.match(m));
137
+ const u = l.aliases.map((h) => h.toLowerCase().trim()), x = r.match(m), s = u.some(
138
+ (h) => h.match(m)
139
+ );
152
140
  return x || s;
153
141
  }
154
142
  return r.match(m);
155
143
  })
156
144
  })).filter((t) => t.commands.length > 0);
157
145
  }
158
- const U = $([]);
159
- function O() {
160
- const [i, a] = z(U);
161
- return [i, a];
146
+ const U = G([]);
147
+ function F() {
148
+ const [n, a] = V(U);
149
+ return [n, a];
162
150
  }
163
- function F(i, a) {
164
- const [e] = O(), [t, l] = b(0), [r, m] = b(0), u = v(null), { t: x } = T(), s = P(e, i.query), h = v([]);
165
- S(a, () => ({
166
- onKeyDown: A
167
- })), B(() => {
151
+ function M(n, a) {
152
+ const [e] = F(), [t, l] = b(0), [r, m] = b(0), u = w(null), { t: x } = D(), s = P(e, n.query), h = w([]);
153
+ y(a, () => ({
154
+ onKeyDown: N
155
+ })), S(() => {
168
156
  if (!u.current)
169
157
  return;
170
- const o = r * 1e3 + t, n = h.current[o];
171
- n && n.scrollIntoView({
158
+ const o = r * 1e3 + t, i = h.current[o];
159
+ i && i.scrollIntoView({
172
160
  behavior: "smooth",
173
161
  block: "nearest"
174
162
  });
175
163
  }, [t, r]);
176
- function A({ event: o }) {
177
- return o.key === "ArrowUp" ? (C(), !0) : o.key === "ArrowDown" ? (I(), !0) : o.key === "Enter" ? (k(), !0) : !1;
164
+ function N({ event: o }) {
165
+ return o.key === "ArrowUp" ? (C(), !0) : o.key === "ArrowDown" ? (L(), !0) : o.key === "Enter" ? (A(), !0) : !1;
178
166
  }
179
167
  function C() {
180
168
  var c;
181
169
  if (s.length === 0)
182
170
  return !1;
183
- let o = t - 1, n = r;
184
- o < 0 && (n = r - 1, o = ((c = s[n]) == null ? void 0 : c.commands.length) - 1 || 0), n < 0 && (n = s.length - 1, o = s[n].commands.length - 1), l(o), m(n);
171
+ let o = t - 1, i = r;
172
+ o < 0 && (i = r - 1, o = ((c = s[i]) == null ? void 0 : c.commands.length) - 1 || 0), i < 0 && (i = s.length - 1, o = s[i].commands.length - 1), l(o), m(i);
185
173
  }
186
- function I() {
174
+ function L() {
187
175
  if (s.length === 0)
188
176
  return !1;
189
177
  const o = s[r].commands;
190
- let n = t + 1, c = r;
191
- o.length - 1 < n && (n = 0, c = r + 1), s.length - 1 < c && (c = 0), l(n), m(c);
178
+ let i = t + 1, c = r;
179
+ o.length - 1 < i && (i = 0, c = r + 1), s.length - 1 < c && (c = 0), l(i), m(c);
192
180
  }
193
- function k() {
181
+ function A() {
194
182
  if (s.length === 0 || r === -1 || t === -1)
195
183
  return !1;
196
- p(r, t);
184
+ g(r, t);
197
185
  }
198
- function p(o, n) {
199
- const c = s[o].commands[n];
200
- i == null || i.command(c);
186
+ function g(o, i) {
187
+ const c = s[o].commands[i];
188
+ n == null || n.command(c);
201
189
  }
202
- function R(o, n) {
203
- p(o, n);
190
+ function k(o, i) {
191
+ g(o, i);
204
192
  }
205
- function H(o, n, c) {
206
- h.current[o * 1e3 + n] = c;
193
+ function I(o, i, c) {
194
+ h.current[o * 1e3 + i] = c;
207
195
  }
208
196
  return /* @__PURE__ */ d(
209
197
  "div",
@@ -211,23 +199,23 @@ function F(i, a) {
211
199
  className: "richtext-max-h-[min(80vh,24rem)] richtext-flex-wrap richtext-overflow-y-auto richtext-overflow-x-hidden richtext-rounded-md !richtext-border !richtext-border-solid !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none",
212
200
  "data-richtext-portal": !0,
213
201
  ref: u,
214
- children: s != null && s.length ? /* @__PURE__ */ d("div", { className: "richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5", children: s == null ? void 0 : s.map((o, n) => /* @__PURE__ */ g(D, { children: [
215
- /* @__PURE__ */ d(q, { className: "richtext-mx-[4px] richtext-mb-[4px] richtext-mt-[8px] !richtext-text-[0.65rem] richtext-uppercase", children: o.title }),
216
- o.commands.map((c, f) => /* @__PURE__ */ g(
202
+ children: s != null && s.length ? /* @__PURE__ */ d("div", { className: "richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5", children: s == null ? void 0 : s.map((o, i) => /* @__PURE__ */ p(E, { children: [
203
+ /* @__PURE__ */ d($, { className: "richtext-mx-[4px] richtext-mb-[4px] richtext-mt-[8px] !richtext-text-[0.65rem] richtext-uppercase", children: o.title }),
204
+ o.commands.map((c, f) => /* @__PURE__ */ p(
217
205
  "button",
218
206
  {
219
- onClick: () => R(n, f),
220
- ref: (E) => H(n, f, E),
221
- className: V(
207
+ onClick: () => k(i, f),
208
+ ref: (R) => I(i, f, R),
209
+ className: z(
222
210
  "richtext-flex richtext-w-full richtext-items-center richtext-gap-3 richtext-rounded-sm !richtext-border-none !richtext-bg-transparent richtext-px-2 richtext-py-1.5 richtext-text-left richtext-text-sm richtext-text-foreground !richtext-outline-none richtext-transition-colors hover:!richtext-bg-accent",
223
211
  {
224
- "bg-item-active": r === n && t === f
212
+ "bg-item-active": r === i && t === f
225
213
  }
226
214
  ),
227
215
  children: [
228
216
  c.iconUrl && /* @__PURE__ */ d("img", { alt: "", className: "richtext-size-6", src: c.iconUrl }),
229
217
  c.iconName && /* @__PURE__ */ d(
230
- G,
218
+ q,
231
219
  {
232
220
  className: "!richtext-mr-1 !richtext-text-lg",
233
221
  name: c.iconName
@@ -242,10 +230,10 @@ function F(i, a) {
242
230
  }
243
231
  );
244
232
  }
245
- const Q = y(F);
233
+ const Y = H(M);
246
234
  export {
247
- Q as S,
235
+ Y as S,
248
236
  P as a,
249
- Z as r,
250
- O as u
237
+ X as r,
238
+ F as u
251
239
  };
package/lib/Strike.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),i=require("react/jsx-runtime"),m=require("./toggle-oFwBZC4x.cjs"),u=require("./useButtonProps-CFu0GHzW.cjs");var h=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,S=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,f=r.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",r.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[r.markInputRule({find:h,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:S,type:this.type})]}});function v(){const t=u.useButtonProps(d.name),{icon:e=void 0,tooltip:s=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:o=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:p,disabled:a,update:k}=u.useToggleActive(l),g=()=>{a||o&&(o(),k())};return t?i.jsx(m.ActionButton,{action:g,dataState:p,disabled:a,icon:e,shortcutKeys:n,tooltip:s,tooltipOptions:c}):i.jsx(i.Fragment,{})}const d=f.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:s,extension:n})=>({componentProps:{action:()=>e.commands.toggleStrike(),isActive:()=>e.isActive("strike")||!1,disabled:!1,icon:"Strikethrough",shortcutKeys:n.options.shortcutKeys??["shift","mod","S"],tooltip:s("editor.strike.tooltip")}})}}});exports.RichTextStrike=v;exports.Strike=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),o=require("./index-Bt9LiArC.cjs");require("react");require("./theme.cjs");var m=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,h=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,S=r.Mark.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",r.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[r.markInputRule({find:m,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:h,type:this.type})]}});function f(){const t=o.useButtonProps(d.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:s=void 0,tooltipOptions:c={},action:a=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:k,disabled:u,update:p}=o.useToggleActive(l),g=()=>{u||a&&(a(),p())};return t?n.jsx(o.ActionButton,{action:g,dataState:k,disabled:u,icon:e,shortcutKeys:s,tooltip:i,tooltipOptions:c}):n.jsx(n.Fragment,{})}const d=S.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:s})=>({componentProps:{action:()=>e.commands.toggleStrike(),isActive:()=>e.isActive("strike")||!1,disabled:!1,icon:"Strikethrough",shortcutKeys:s.options.shortcutKeys??["shift","mod","S"],tooltip:i("editor.strike.tooltip")}})}}});exports.RichTextStrike=f;exports.Strike=d;
package/lib/Strike.js CHANGED
@@ -1,7 +1,8 @@
1
- import { M as m, e as k, f as l, m as g } from "./clsx-m_C5j3RU.js";
1
+ import { M as m, e as k, f as l, m as g } from "./clsx-CDyrfCnw.js";
2
2
  import { jsx as n, Fragment as h } from "react/jsx-runtime";
3
- import { A as f } from "./toggle-DoJTBdvy.js";
4
- import { u as M, c as S } from "./useButtonProps-BE10eHkG.js";
3
+ import { u as f, d as M, A as S } from "./index-8B00E8e4.js";
4
+ import "react";
5
+ import "./theme.js";
5
6
  var v = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, A = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, y = m.create({
6
7
  name: "strike",
7
8
  addOptions() {
@@ -62,23 +63,23 @@ var v = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, A = /(?:^|\s)(~~(?!\s+~~
62
63
  ];
63
64
  }
64
65
  });
65
- function K() {
66
- const t = M(x.name), {
66
+ function L() {
67
+ const t = f(x.name), {
67
68
  icon: e = void 0,
68
69
  tooltip: r = void 0,
69
70
  shortcutKeys: s = void 0,
70
71
  tooltipOptions: a = {},
71
- action: o = void 0,
72
+ action: i = void 0,
72
73
  isActive: d = void 0
73
- } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: i, update: p } = S(d), c = () => {
74
- i || o && (o(), p());
74
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: o, update: p } = M(d), c = () => {
75
+ o || i && (i(), p());
75
76
  };
76
77
  return t ? /* @__PURE__ */ n(
77
- f,
78
+ S,
78
79
  {
79
80
  action: c,
80
81
  dataState: u,
81
- disabled: i,
82
+ disabled: o,
82
83
  icon: e,
83
84
  shortcutKeys: s,
84
85
  tooltip: r,
@@ -106,6 +107,6 @@ const x = /* @__PURE__ */ y.extend({
106
107
  }
107
108
  });
108
109
  export {
109
- K as RichTextStrike,
110
+ L as RichTextStrike,
110
111
  x as Strike
111
112
  };
@@ -1,12 +1,12 @@
1
- import { O as de, S as E, X as Ve, T as $, F as v, v as L, L as ke, u as Ke, Y as Xe, N as Z, m as J, U as Ue, V as Ge, E as Ee, Z as qe } from "./clsx-m_C5j3RU.js";
1
+ import { Q as de, S as E, Y as Ve, T as W, F as v, v as L, O as ke, u as Ke, Z as Xe, N as Z, m as J, V as Ge, W as Ue, E as Ee, _ as qe } from "./clsx-CDyrfCnw.js";
2
2
  import { TextSelection as Ze } from "@tiptap/pm/state";
3
- import { k as Je, D as oe, a as ne } from "./index-B3Ijnbxs.js";
3
+ import { k as Je, D as oe, a as ne } from "./index-C-tDsIKJ.js";
4
4
  import { jsxs as ee, jsx as k, Fragment as Ye } from "react/jsx-runtime";
5
- import { A as Qe } from "./toggle-DoJTBdvy.js";
5
+ import { h as Qe, u as et, d as tt, A as ot } from "./index-8B00E8e4.js";
6
6
  import { useState as _ } from "react";
7
- import { T as O, k as F, m as j } from "./index-4Q5IhypJ.js";
8
- import { P as et, a as tt, b as ot } from "./popover-CsSXh7w6.js";
9
- import { f as nt, u as lt, c as rt } from "./useButtonProps-BE10eHkG.js";
7
+ import "./theme.js";
8
+ import { T as O, k as F, m as j } from "./index-DZfkCNKr.js";
9
+ import { P as nt, a as lt, b as rt } from "./popover-DMPRgXD3.js";
10
10
  let le, re;
11
11
  if (typeof WeakMap < "u") {
12
12
  let t = /* @__PURE__ */ new WeakMap();
@@ -241,7 +241,7 @@ function ze(t, e, o) {
241
241
  const n = t.node(-1), l = C.get(n), r = t.start(-1), s = l.nextCell(t.pos - r, e, o);
242
242
  return s == null ? null : t.node(0).resolve(r + s);
243
243
  }
244
- function W(t, e, o = 1) {
244
+ function $(t, e, o = 1) {
245
245
  const n = {
246
246
  ...t,
247
247
  colspan: t.colspan - o
@@ -282,7 +282,7 @@ var b = class N extends E {
282
282
  const r = this.$anchorCell.node(-1) != n.node(-1);
283
283
  return r && this.isRowSelection() ? N.rowSelection(n, l) : r && this.isColSelection() ? N.colSelection(n, l) : new N(n, l);
284
284
  }
285
- return $.between(n, l);
285
+ return W.between(n, l);
286
286
  }
287
287
  content() {
288
288
  const e = this.$anchorCell.node(-1), o = C.get(e), n = this.$anchorCell.start(-1), l = o.rectBetween(this.$anchorCell.pos - n, this.$headCell.pos - n), r = {}, s = [];
@@ -298,7 +298,7 @@ var b = class N extends E {
298
298
  const m = l.left - h.left, g = h.right - l.right;
299
299
  if (m > 0 || g > 0) {
300
300
  let w = p.attrs;
301
- if (m > 0 && (w = W(w, 0, m)), g > 0 && (w = W(w, w.colspan - g, g)), h.left < l.left) {
301
+ if (m > 0 && (w = $(w, 0, m)), g > 0 && (w = $(w, w.colspan - g, g)), h.left < l.left) {
302
302
  if (p = p.type.createAndFill(w), !p) throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`);
303
303
  } else p = p.type.create(w, p.content);
304
304
  }
@@ -430,11 +430,11 @@ function bt(t, e, o) {
430
430
  const i = C.get(n.node), c = n.from + 1, a = c + i.map[i.width * i.height - 1];
431
431
  r = b.create(l, c + 1, a);
432
432
  }
433
- } else n instanceof $ && gt(n) ? r = $.create(l, n.from) : n instanceof $ && wt(n) && (r = $.create(l, n.$from.start(), n.$from.end()));
433
+ } else n instanceof W && gt(n) ? r = W.create(l, n.from) : n instanceof W && wt(n) && (r = W.create(l, n.$from.start(), n.$from.end()));
434
434
  return r && (e || (e = t.tr)).setSelection(r), e;
435
435
  }
436
436
  const Ct = new de("fix-tables");
437
- function $e(t, e, o, n) {
437
+ function We(t, e, o, n) {
438
438
  const l = t.childCount, r = e.childCount;
439
439
  e: for (let s = 0, i = 0; s < r; s++) {
440
440
  const c = e.child(s);
@@ -442,15 +442,15 @@ function $e(t, e, o, n) {
442
442
  i = a + 1, o += c.nodeSize;
443
443
  continue e;
444
444
  }
445
- n(c, o), i < l && t.child(i).sameMarkup(c) ? $e(t.child(i), c, o + 1, n) : c.nodesBetween(0, c.content.size, n, o + 1), o += c.nodeSize;
445
+ n(c, o), i < l && t.child(i).sameMarkup(c) ? We(t.child(i), c, o + 1, n) : c.nodesBetween(0, c.content.size, n, o + 1), o += c.nodeSize;
446
446
  }
447
447
  }
448
- function We(t, e) {
448
+ function $e(t, e) {
449
449
  let o;
450
450
  const n = (l, r) => {
451
451
  l.type.spec.tableRole == "table" && (o = yt(t, l, r, o));
452
452
  };
453
- return e ? e.doc != t.doc && $e(e.doc, t.doc, 0, n) : t.doc.descendants(n), o;
453
+ return e ? e.doc != t.doc && We(e.doc, t.doc, 0, n) : t.doc.descendants(n), o;
454
454
  }
455
455
  function yt(t, e, o, n) {
456
456
  const l = C.get(e);
@@ -465,7 +465,7 @@ function yt(t, e, o, n) {
465
465
  if (!d) continue;
466
466
  const u = d.attrs;
467
467
  for (let f = 0; f < u.rowspan; f++) r[a.row + f] += a.n;
468
- n.setNodeMarkup(n.mapping.map(o + 1 + a.pos), null, W(u, u.colspan - a.n, a.n));
468
+ n.setNodeMarkup(n.mapping.map(o + 1 + a.pos), null, $(u, u.colspan - a.n, a.n));
469
469
  } else if (a.type == "missing") r[a.row] += a.n;
470
470
  else if (a.type == "overlong_rowspan") {
471
471
  const d = e.nodeAt(a.pos);
@@ -549,7 +549,7 @@ function xt(t, { map: e, table: o, tableStart: n }, l) {
549
549
  const r = t.mapping.maps.length;
550
550
  for (let s = 0; s < e.height; ) {
551
551
  const i = s * e.width + l, c = e.map[i], a = o.nodeAt(c), d = a.attrs;
552
- if (l > 0 && e.map[i - 1] == c || l < e.width - 1 && e.map[i + 1] == c) t.setNodeMarkup(t.mapping.slice(r).map(n + c), null, W(d, l - e.colCount(c)));
552
+ if (l > 0 && e.map[i - 1] == c || l < e.width - 1 && e.map[i + 1] == c) t.setNodeMarkup(t.mapping.slice(r).map(n + c), null, $(d, l - e.colCount(c)));
553
553
  else {
554
554
  const u = t.mapping.slice(r).map(n + c);
555
555
  t.delete(u, u + a.nodeSize);
@@ -830,8 +830,8 @@ function I(t, e) {
830
830
  }
831
831
  I("row", { useDeprecatedLogic: !0 });
832
832
  I("column", { useDeprecatedLogic: !0 });
833
- const $t = I("cell", { useDeprecatedLogic: !0 });
834
- function Wt(t, e) {
833
+ const Wt = I("cell", { useDeprecatedLogic: !0 });
834
+ function $t(t, e) {
835
835
  if (e < 0) {
836
836
  const o = t.nodeBefore;
837
837
  if (o) return t.pos - o.nodeSize;
@@ -854,11 +854,11 @@ function Wt(t, e) {
854
854
  function ge(t) {
855
855
  return function(e, o) {
856
856
  if (!R(e)) return !1;
857
- const n = Wt(Y(e), t);
857
+ const n = $t(Y(e), t);
858
858
  if (n == null) return !1;
859
859
  if (o) {
860
860
  const l = e.doc.resolve(n);
861
- o(e.tr.setSelection($.between(l, ft(l))).scrollIntoView());
861
+ o(e.tr.setSelection(W.between(l, ft(l))).scrollIntoView());
862
862
  }
863
863
  return !0;
864
864
  };
@@ -929,7 +929,7 @@ function Pt({ width: t, height: e, rows: o }, n, l) {
929
929
  const c = o[i], a = [];
930
930
  for (let d = r[i] || 0, u = 0; d < n; u++) {
931
931
  let f = c.child(u % c.childCount);
932
- d + f.attrs.colspan > n && (f = f.type.createChecked(W(f.attrs, f.attrs.colspan, d + f.attrs.colspan - n), f.content)), a.push(f), d += f.attrs.colspan;
932
+ d + f.attrs.colspan > n && (f = f.type.createChecked($(f.attrs, f.attrs.colspan, d + f.attrs.colspan - n), f.content)), a.push(f), d += f.attrs.colspan;
933
933
  for (let h = 1; h < f.attrs.rowspan; h++) r[i + h] = (r[i + h] || 0) + f.attrs.colspan;
934
934
  }
935
935
  s.push(v.from(a));
@@ -1008,7 +1008,7 @@ function be(t, e, o, n, l, r, s, i) {
1008
1008
  if (e.map[d - 1] == u) {
1009
1009
  c = !0;
1010
1010
  const f = o.nodeAt(u), h = e.colCount(u), p = t.mapping.slice(i).map(u + n);
1011
- t.setNodeMarkup(p, null, W(f.attrs, s - h, f.attrs.colspan - (s - h))), t.insert(p + f.nodeSize, f.type.createAndFill(W(f.attrs, 0, s - h))), a += f.attrs.rowspan - 1;
1011
+ t.setNodeMarkup(p, null, $(f.attrs, s - h, f.attrs.colspan - (s - h))), t.insert(p + f.nodeSize, f.type.createAndFill($(f.attrs, 0, s - h))), a += f.attrs.rowspan - 1;
1012
1012
  }
1013
1013
  }
1014
1014
  return c;
@@ -1044,22 +1044,22 @@ const Ot = Je({
1044
1044
  Delete: V,
1045
1045
  "Mod-Delete": V
1046
1046
  });
1047
- function G(t, e, o) {
1047
+ function U(t, e, o) {
1048
1048
  return o.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(o).scrollIntoView()), !0);
1049
1049
  }
1050
1050
  function K(t, e) {
1051
1051
  return (o, n, l) => {
1052
1052
  if (!l) return !1;
1053
1053
  const r = o.selection;
1054
- if (r instanceof b) return G(o, n, E.near(r.$headCell, e));
1054
+ if (r instanceof b) return U(o, n, E.near(r.$headCell, e));
1055
1055
  if (t != "horiz" && !r.empty) return !1;
1056
1056
  const s = Ie(l, t, e);
1057
1057
  if (s == null) return !1;
1058
- if (t == "horiz") return G(o, n, E.near(o.doc.resolve(r.head + e), e));
1058
+ if (t == "horiz") return U(o, n, E.near(o.doc.resolve(r.head + e), e));
1059
1059
  {
1060
1060
  const i = o.doc.resolve(s), c = ze(i, t, e);
1061
1061
  let a;
1062
- return c ? a = E.near(c, 1) : e < 0 ? a = E.near(o.doc.resolve(i.before(-1)), -1) : a = E.near(o.doc.resolve(i.after(-1)), 1), G(o, n, a);
1062
+ return c ? a = E.near(c, 1) : e < 0 ? a = E.near(o.doc.resolve(i.before(-1)), -1) : a = E.near(o.doc.resolve(i.after(-1)), 1), U(o, n, a);
1063
1063
  }
1064
1064
  };
1065
1065
  }
@@ -1075,7 +1075,7 @@ function X(t, e) {
1075
1075
  s = new b(o.doc.resolve(c));
1076
1076
  }
1077
1077
  const i = ze(s.$headCell, t, e);
1078
- return i ? G(o, n, new b(s.$anchorCell, i)) : !1;
1078
+ return i ? U(o, n, new b(s.$anchorCell, i)) : !1;
1079
1079
  };
1080
1080
  }
1081
1081
  function Ft(t, e) {
@@ -1134,7 +1134,7 @@ function Vt(t, e) {
1134
1134
  t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", i);
1135
1135
  }
1136
1136
  function Ie(t, e, o) {
1137
- if (!(t.state.selection instanceof $)) return null;
1137
+ if (!(t.state.selection instanceof W)) return null;
1138
1138
  const { $head: n } = t.state.selection;
1139
1139
  for (let l = n.depth - 1; l >= 0; l--) {
1140
1140
  const r = n.node(l);
@@ -1202,7 +1202,7 @@ function Xt({ handleWidth: t = 5, cellMinWidth: e = 25, defaultCellMinWidth: o =
1202
1202
  init(s, i) {
1203
1203
  var c;
1204
1204
  const a = (c = r.spec) === null || c === void 0 || (c = c.props) === null || c === void 0 ? void 0 : c.nodeViews, d = y(i.schema).table.name;
1205
- return n && a && (a[d] = (u, f) => new n(u, o, f)), new Ut(-1, !1);
1205
+ return n && a && (a[d] = (u, f) => new n(u, o, f)), new Gt(-1, !1);
1206
1206
  },
1207
1207
  apply(s, i) {
1208
1208
  return i.apply(s);
@@ -1215,7 +1215,7 @@ function Xt({ handleWidth: t = 5, cellMinWidth: e = 25, defaultCellMinWidth: o =
1215
1215
  },
1216
1216
  handleDOMEvents: {
1217
1217
  mousemove: (s, i) => {
1218
- Gt(s, i, t, l);
1218
+ Ut(s, i, t, l);
1219
1219
  },
1220
1220
  mouseleave: (s) => {
1221
1221
  qt(s);
@@ -1233,7 +1233,7 @@ function Xt({ handleWidth: t = 5, cellMinWidth: e = 25, defaultCellMinWidth: o =
1233
1233
  });
1234
1234
  return r;
1235
1235
  }
1236
- var Ut = class q {
1236
+ var Gt = class q {
1237
1237
  constructor(e, o) {
1238
1238
  this.activeHandle = e, this.dragging = o;
1239
1239
  }
@@ -1248,7 +1248,7 @@ var Ut = class q {
1248
1248
  return o;
1249
1249
  }
1250
1250
  };
1251
- function Gt(t, e, o, n) {
1251
+ function Ut(t, e, o, n) {
1252
1252
  if (!t.editable) return;
1253
1253
  const l = A.getState(t.state);
1254
1254
  if (l && !l.dragging) {
@@ -1393,7 +1393,7 @@ function oo({ allowTableNodeSelection: t = !1 } = {}) {
1393
1393
  handlePaste: jt
1394
1394
  },
1395
1395
  appendTransaction(e, o, n) {
1396
- return bt(n, We(n, o), t);
1396
+ return bt(n, $e(n, o), t);
1397
1397
  }
1398
1398
  });
1399
1399
  }
@@ -1576,7 +1576,7 @@ function so(t, e, o, n, l) {
1576
1576
  function io(t) {
1577
1577
  return t instanceof b;
1578
1578
  }
1579
- var U = ({ editor: t }) => {
1579
+ var G = ({ editor: t }) => {
1580
1580
  const { selection: e } = t.state;
1581
1581
  if (!io(e))
1582
1582
  return !1;
@@ -1703,12 +1703,12 @@ var fo = uo, je = Z.create({
1703
1703
  splitCell: () => ({ state: t, dispatch: e }) => pe(t, e),
1704
1704
  toggleHeaderColumn: () => ({ state: t, dispatch: e }) => I("column")(t, e),
1705
1705
  toggleHeaderRow: () => ({ state: t, dispatch: e }) => I("row")(t, e),
1706
- toggleHeaderCell: () => ({ state: t, dispatch: e }) => $t(t, e),
1706
+ toggleHeaderCell: () => ({ state: t, dispatch: e }) => Wt(t, e),
1707
1707
  mergeOrSplit: () => ({ state: t, dispatch: e }) => he(t, e) ? !0 : pe(t, e),
1708
1708
  setCellAttribute: (t, e) => ({ state: o, dispatch: n }) => Ht(t, e)(o, n),
1709
1709
  goToNextCell: () => ({ state: t, dispatch: e }) => ge(1)(t, e),
1710
1710
  goToPreviousCell: () => ({ state: t, dispatch: e }) => ge(-1)(t, e),
1711
- fixTables: () => ({ state: t, dispatch: e }) => (e && We(t), !0),
1711
+ fixTables: () => ({ state: t, dispatch: e }) => (e && $e(t), !0),
1712
1712
  setCellSelection: (t) => ({ tr: e, dispatch: o }) => {
1713
1713
  if (o) {
1714
1714
  const n = b.create(e.doc, t.anchorCell, t.headCell);
@@ -1722,10 +1722,10 @@ var fo = uo, je = Z.create({
1722
1722
  return {
1723
1723
  Tab: () => this.editor.commands.goToNextCell() ? !0 : this.editor.can().addRowAfter() ? this.editor.chain().addRowAfter().goToNextCell().run() : !1,
1724
1724
  "Shift-Tab": () => this.editor.commands.goToPreviousCell(),
1725
- Backspace: U,
1726
- "Mod-Backspace": U,
1727
- Delete: U,
1728
- "Mod-Delete": U
1725
+ Backspace: G,
1726
+ "Mod-Backspace": G,
1727
+ Delete: G,
1728
+ "Mod-Delete": G
1729
1729
  };
1730
1730
  },
1731
1731
  addProseMirrorPlugins() {
@@ -1751,7 +1751,7 @@ var fo = uo, je = Z.create({
1751
1751
  storage: t.storage
1752
1752
  };
1753
1753
  return {
1754
- tableRole: Ue(Ge(t, "tableRole", e))
1754
+ tableRole: Ge(Ue(t, "tableRole", e))
1755
1755
  };
1756
1756
  }
1757
1757
  });
@@ -1854,9 +1854,9 @@ function Co(t) {
1854
1854
  cols: j
1855
1855
  });
1856
1856
  }
1857
- return /* @__PURE__ */ ee(et, { modal: !0, onOpenChange: o, open: e, children: [
1858
- /* @__PURE__ */ k(tt, { asChild: !0, "data-state": t != null && t.dataState ? "on" : "off", children: t == null ? void 0 : t.children }),
1859
- /* @__PURE__ */ k(ot, { align: "start", className: "richtext-w-full !richtext-p-2", side: "bottom", children: /* @__PURE__ */ ee("div", { className: "table-grid-size-editor richtext-p-0", children: [
1857
+ return /* @__PURE__ */ ee(nt, { modal: !0, onOpenChange: o, open: e, children: [
1858
+ /* @__PURE__ */ k(lt, { asChild: !0, "data-state": t != null && t.dataState ? "on" : "off", children: t == null ? void 0 : t.children }),
1859
+ /* @__PURE__ */ k(rt, { align: "start", className: "richtext-w-full !richtext-p-2", side: "bottom", children: /* @__PURE__ */ ee("div", { className: "table-grid-size-editor richtext-p-0", children: [
1860
1860
  /* @__PURE__ */ k("div", { className: "richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1", children: (f = Ne(r == null ? void 0 : r.rows)) == null ? void 0 : f.map((h) => {
1861
1861
  var p;
1862
1862
  return /* @__PURE__ */ k("div", { className: "richtext-flex richtext-gap-1", children: (p = Ne(r == null ? void 0 : r.cols)) == null ? void 0 : p.map((m) => /* @__PURE__ */ k(
@@ -1879,20 +1879,20 @@ function Co(t) {
1879
1879
  ] });
1880
1880
  }
1881
1881
  function zo() {
1882
- const t = nt(), e = lt(yo.name), {
1882
+ const t = Qe(), e = et(yo.name), {
1883
1883
  icon: o = void 0,
1884
1884
  tooltip: n = void 0,
1885
1885
  action: l = void 0,
1886
1886
  isActive: r = void 0,
1887
1887
  color: s
1888
- } = (e == null ? void 0 : e.componentProps) ?? {}, { dataState: i, disabled: c } = rt(r);
1888
+ } = (e == null ? void 0 : e.componentProps) ?? {}, { dataState: i, disabled: c } = tt(r);
1889
1889
  if (!e)
1890
1890
  return /* @__PURE__ */ k(Ye, {});
1891
1891
  function a(d) {
1892
1892
  t.chain().focus().insertTable({ ...d, withHeaderRow: !1 }).run();
1893
1893
  }
1894
1894
  return /* @__PURE__ */ k(Co, { createTable: a, dataState: i, children: /* @__PURE__ */ k(
1895
- Qe,
1895
+ ot,
1896
1896
  {
1897
1897
  action: l,
1898
1898
  color: s,