reactjs-tiptap-editor 0.3.8 → 0.3.10

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 (225) hide show
  1. package/lib/{ActionMenuButton-CqlhqVIW.cjs → ActionMenuButton-D96eTByd.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DXwpQHj4.js → ActionMenuButton-ZOYNohaO.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +12 -12
  5. package/lib/Attachment.d.ts +12 -12
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +12 -12
  9. package/lib/Blockquote.d.ts +12 -12
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +12 -12
  13. package/lib/Bold.d.ts +12 -12
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +12 -12
  17. package/lib/BulletList.d.ts +12 -12
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +12 -12
  21. package/lib/Clear.d.ts +12 -12
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +12 -12
  25. package/lib/Code.d.ts +12 -12
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +12 -12
  29. package/lib/CodeBlock.d.ts +12 -12
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +12 -12
  33. package/lib/CodeView.d.ts +12 -12
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +12 -12
  37. package/lib/Color.d.ts +12 -12
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +12 -12
  40. package/lib/Document.d.ts +12 -12
  41. package/lib/{Drawer-B6uGc4Ab.js → Drawer-D7VC0bqz.js} +1 -1
  42. package/lib/{Drawer-DBt_aN5x.cjs → Drawer-hzhjTRvj.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +12 -12
  45. package/lib/Drawer.d.ts +12 -12
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +12 -12
  49. package/lib/Emoji.d.ts +12 -12
  50. package/lib/Emoji.js +1 -1
  51. package/lib/Excalidraw-Bj3dtbC4.cjs +1 -0
  52. package/lib/Excalidraw-DuV1h_du.js +282 -0
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +12 -12
  55. package/lib/Excalidraw.d.ts +12 -12
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +12 -12
  59. package/lib/ExportPdf.d.ts +12 -12
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +12 -12
  63. package/lib/ExportWord.d.ts +12 -12
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +12 -12
  67. package/lib/FontFamily.d.ts +12 -12
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +12 -12
  71. package/lib/FontSize.d.ts +12 -12
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +12 -12
  75. package/lib/FormatPainter.d.ts +12 -12
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +12 -12
  79. package/lib/Heading.d.ts +12 -12
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +12 -12
  83. package/lib/Highlight.d.ts +12 -12
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +12 -12
  87. package/lib/History.d.ts +12 -12
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +12 -12
  91. package/lib/HorizontalRule.d.ts +12 -12
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +12 -12
  95. package/lib/Iframe.d.ts +12 -12
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +12 -12
  99. package/lib/Image.d.ts +12 -12
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +12 -12
  103. package/lib/ImageGif.d.ts +12 -12
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +12 -12
  107. package/lib/ImportWord.d.ts +12 -12
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +12 -12
  111. package/lib/Indent.d.ts +12 -12
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +12 -12
  115. package/lib/Italic.d.ts +12 -12
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +12 -12
  119. package/lib/Katex.d.ts +12 -12
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +12 -12
  123. package/lib/LineHeight.d.ts +12 -12
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +12 -12
  127. package/lib/Link.d.ts +12 -12
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +12 -12
  130. package/lib/ListItem.d.ts +12 -12
  131. package/lib/Mention.cjs +1 -1
  132. package/lib/Mention.d.cts +12 -12
  133. package/lib/Mention.d.ts +12 -12
  134. package/lib/Mermaid.cjs +1 -1
  135. package/lib/Mermaid.d.cts +12 -12
  136. package/lib/Mermaid.d.ts +12 -12
  137. package/lib/Mermaid.js +2 -2
  138. package/lib/MoreMark.cjs +1 -1
  139. package/lib/MoreMark.d.cts +12 -12
  140. package/lib/MoreMark.d.ts +12 -12
  141. package/lib/MoreMark.js +1 -1
  142. package/lib/MultiColumn.cjs +1 -1
  143. package/lib/MultiColumn.d.cts +12 -12
  144. package/lib/MultiColumn.d.ts +12 -12
  145. package/lib/MultiColumn.js +1 -1
  146. package/lib/OrderedList.cjs +1 -1
  147. package/lib/OrderedList.d.cts +12 -12
  148. package/lib/OrderedList.d.ts +12 -12
  149. package/lib/OrderedList.js +1 -1
  150. package/lib/{RichTextEditor-BfYZYQb9.js → RichTextEditor-CRDKX-F8.js} +11 -11
  151. package/lib/{RichTextEditor-Db6oQoYY.cjs → RichTextEditor-ymQlnG9m.cjs} +1 -1
  152. package/lib/SearchAndReplace.cjs +1 -1
  153. package/lib/SearchAndReplace.d.cts +12 -12
  154. package/lib/SearchAndReplace.d.ts +12 -12
  155. package/lib/SearchAndReplace.js +1 -1
  156. package/lib/Selection.d.cts +12 -12
  157. package/lib/Selection.d.ts +12 -12
  158. package/lib/SlashCommand.cjs +1 -1
  159. package/lib/SlashCommand.d.cts +12 -12
  160. package/lib/SlashCommand.d.ts +12 -12
  161. package/lib/SlashCommand.js +1 -1
  162. package/lib/Strike.cjs +1 -1
  163. package/lib/Strike.d.cts +12 -12
  164. package/lib/Strike.d.ts +12 -12
  165. package/lib/Strike.js +1 -1
  166. package/lib/SubAndSuperScript.cjs +1 -1
  167. package/lib/SubAndSuperScript.d.cts +12 -12
  168. package/lib/SubAndSuperScript.d.ts +12 -12
  169. package/lib/SubAndSuperScript.js +1 -1
  170. package/lib/Table.cjs +1 -1
  171. package/lib/Table.d.cts +12 -12
  172. package/lib/Table.d.ts +12 -12
  173. package/lib/Table.js +1 -1
  174. package/lib/TableOfContent.cjs +1 -1
  175. package/lib/TableOfContent.d.cts +12 -12
  176. package/lib/TableOfContent.d.ts +12 -12
  177. package/lib/TableOfContent.js +1 -1
  178. package/lib/TaskList.cjs +1 -1
  179. package/lib/TaskList.d.cts +12 -12
  180. package/lib/TaskList.d.ts +12 -12
  181. package/lib/TaskList.js +1 -1
  182. package/lib/TextAlign.cjs +1 -1
  183. package/lib/TextAlign.d.cts +12 -12
  184. package/lib/TextAlign.d.ts +12 -12
  185. package/lib/TextAlign.js +1 -1
  186. package/lib/TextBubble.cjs +1 -1
  187. package/lib/TextBubble.d.cts +12 -12
  188. package/lib/TextBubble.d.ts +12 -12
  189. package/lib/TextBubble.js +1 -1
  190. package/lib/TextDirection.cjs +1 -1
  191. package/lib/TextDirection.d.cts +12 -12
  192. package/lib/TextDirection.d.ts +12 -12
  193. package/lib/TextDirection.js +1 -1
  194. package/lib/TextUnderline.cjs +1 -1
  195. package/lib/TextUnderline.d.cts +12 -12
  196. package/lib/TextUnderline.d.ts +12 -12
  197. package/lib/TextUnderline.js +1 -1
  198. package/lib/TrailingNode.d.cts +12 -12
  199. package/lib/TrailingNode.d.ts +12 -12
  200. package/lib/{Twitter-DLO12QnF.cjs → Twitter-CMr6GpHp.cjs} +1 -1
  201. package/lib/{Twitter-CZA9dXpC.js → Twitter-CjAodXzu.js} +1 -1
  202. package/lib/Twitter.cjs +1 -1
  203. package/lib/Twitter.d.cts +12 -12
  204. package/lib/Twitter.d.ts +12 -12
  205. package/lib/Twitter.js +1 -1
  206. package/lib/Video.cjs +1 -1
  207. package/lib/Video.d.cts +12 -12
  208. package/lib/Video.d.ts +12 -12
  209. package/lib/Video.js +1 -1
  210. package/lib/bubble-extra.cjs +1 -1
  211. package/lib/bubble-extra.d.cts +12 -12
  212. package/lib/bubble-extra.d.ts +12 -12
  213. package/lib/bubble-extra.js +5 -5
  214. package/lib/{dom-dataset-DmsCLv1q.cjs → dom-dataset-Cuy-pIfj.cjs} +3 -3
  215. package/lib/index.cjs +1 -1
  216. package/lib/index.d.cts +12 -12
  217. package/lib/index.d.ts +12 -12
  218. package/lib/index.js +2 -2
  219. package/lib/locale-bundle.d.cts +12 -12
  220. package/lib/locale-bundle.d.ts +12 -12
  221. package/lib/{textarea-ILk3QoYy.cjs → textarea-Ci1tHD6V.cjs} +1 -1
  222. package/lib/{textarea-BUlQB7hI.js → textarea-CtL8w6IS.js} +1 -1
  223. package/package.json +1 -2
  224. package/lib/Excalidraw-BmNljVH8.cjs +0 -1
  225. package/lib/Excalidraw-DwD8Qm59.js +0 -651
@@ -0,0 +1,282 @@
1
+ import { N as Z, n as k, m as z } from "./index-CXIIg9Sq.js";
2
+ import { N as j, c as C, R as P, n as V, g as y } from "./dom-dataset-2RXYq9wp.js";
3
+ import { jsxs as x, jsx as n } from "react/jsx-runtime";
4
+ import { useState as o, useCallback as v, useEffect as T, useRef as B } from "react";
5
+ import { w as U, x as $, A as M, y as F, z as X, F as G, B as K, K as Y } from "./RichTextEditor-CRDKX-F8.js";
6
+ import { n as q } from "./index-D-DR0FPY.js";
7
+ import { Resizable as J } from "re-resizable";
8
+ let I;
9
+ function D() {
10
+ try {
11
+ return I || (I = q()), I;
12
+ } catch {
13
+ throw new Error("Error EventEmitter");
14
+ }
15
+ }
16
+ const S = "OPEN_EXCALIDRAW_SETTING_MODAL";
17
+ function Q(e, r) {
18
+ D().on(e, r);
19
+ }
20
+ function ee(e, r) {
21
+ D().off(e, r);
22
+ }
23
+ function fe(e) {
24
+ D().emit(S, e);
25
+ }
26
+ const te = ({ editor: e }) => {
27
+ const [r, u] = o(null), [c, m] = o({}), [l, h] = o({ elements: [], appState: { isLoading: !1 }, files: null }), [g, a] = o(!1), [f, p] = o(!0), [w, d] = o(null), _ = v(
28
+ (i) => {
29
+ i && import("@excalidraw/excalidraw").then((t) => {
30
+ u(t.Excalidraw);
31
+ }).catch(d).finally(() => p(!1));
32
+ },
33
+ [p]
34
+ ), N = v((i) => {
35
+ setTimeout(() => {
36
+ i.refresh();
37
+ });
38
+ }, []), L = v((i, t, s) => {
39
+ m({
40
+ elements: i,
41
+ appState: { isLoading: !1 },
42
+ files: s
43
+ });
44
+ }, []), b = v(() => {
45
+ if (!r) {
46
+ a(!1);
47
+ return;
48
+ }
49
+ e.chain().focus().setExcalidraw({ data: c }).run(), a(!1);
50
+ }, [r, e, c, a]);
51
+ return T(() => {
52
+ const i = (t) => {
53
+ (t == null ? void 0 : t.editor) === e && (a(!0), t && h(t.data));
54
+ };
55
+ return Q(S, i), () => {
56
+ ee(S, i);
57
+ };
58
+ }, [e, a]), T(() => {
59
+ !f && r && g && setTimeout(() => {
60
+ window.dispatchEvent(new Event("resize"));
61
+ }, 400);
62
+ }, [f, r, g]), /* @__PURE__ */ x(
63
+ U,
64
+ {
65
+ onOpenChange: a,
66
+ open: g,
67
+ children: [
68
+ /* @__PURE__ */ n($, { asChild: !0, children: /* @__PURE__ */ n(
69
+ M,
70
+ {
71
+ action: () => a(!0),
72
+ icon: "Excalidraw",
73
+ tooltip: "Excalidraw"
74
+ }
75
+ ) }),
76
+ /* @__PURE__ */ x(F, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
77
+ /* @__PURE__ */ n(X, { children: "Excalidraw" }),
78
+ /* @__PURE__ */ x("div", { style: { height: "100%", borderWidth: 1 }, children: [
79
+ f && /* @__PURE__ */ n("p", { children: "Loading..." }),
80
+ w && /* @__PURE__ */ n("p", { children: w && w.message || "Error" }),
81
+ /* @__PURE__ */ n(
82
+ "div",
83
+ {
84
+ ref: _,
85
+ style: { width: "100%", height: 600 },
86
+ children: !f && !w && r ? /* @__PURE__ */ n(
87
+ r,
88
+ {
89
+ initialData: l,
90
+ langCode: "en",
91
+ onChange: L,
92
+ ref: N
93
+ }
94
+ ) : null
95
+ }
96
+ )
97
+ ] }),
98
+ /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(
99
+ K,
100
+ {
101
+ onClick: b,
102
+ type: "button",
103
+ children: "Save changes"
104
+ }
105
+ ) })
106
+ ] })
107
+ ]
108
+ }
109
+ );
110
+ }, re = "_wrap_15k3c_1", ne = "_renderWrap_15k3c_7", ae = "_handlerWrap_15k3c_30", A = {
111
+ wrap: re,
112
+ renderWrap: ne,
113
+ handlerWrap: ae
114
+ }, ie = 10, se = 200, R = 15, W = { width: "100%", height: "100%", maxWidth: "100%" };
115
+ function oe({ editor: e, node: r, updateAttributes: u }) {
116
+ const c = B(null), m = e.isActive(le.name), { data: l, width: h, height: g } = r.attrs, [a, f] = o(null), [p, w] = o(!0), [d, _] = o(null), [N, L] = o(100), b = v((t) => () => {
117
+ L(
118
+ (s) => Y(t === "minus" ? s - R : s + R, ie, se)
119
+ );
120
+ }, []);
121
+ T(() => {
122
+ let t = !1;
123
+ return import("@excalidraw/excalidraw").then((s) => {
124
+ t || (c.current = s.exportToSvg);
125
+ }).catch((s) => !t && _(s)).finally(() => !t && w(!1)), () => {
126
+ t = !0;
127
+ };
128
+ }, [l]), T(() => {
129
+ let t = !1;
130
+ return (async () => {
131
+ if (!c.current || t || p || d || !l)
132
+ return;
133
+ const E = await c.current(l);
134
+ t || (E.setAttribute("width", "100%"), E.setAttribute("height", "100%"), E.setAttribute("display", "block"), f(E));
135
+ })(), () => {
136
+ t = !0;
137
+ };
138
+ }, [l, p, d]);
139
+ const i = (t) => {
140
+ u({ width: t.width, height: t.height });
141
+ };
142
+ return /* @__PURE__ */ n(j, { className: C(A.wrap, m && A.isActive), children: /* @__PURE__ */ n(
143
+ J,
144
+ {
145
+ size: { width: Number.parseInt(h), height: Number.parseInt(g) },
146
+ onResizeStop: (t, s, E, O) => {
147
+ i({
148
+ width: Number.parseInt(h) + O.width,
149
+ height: Number.parseInt(g) + O.height
150
+ });
151
+ },
152
+ children: /* @__PURE__ */ x(
153
+ "div",
154
+ {
155
+ className: C(A.renderWrap, "render-wrapper"),
156
+ style: { ...W, overflow: "hidden" },
157
+ children: [
158
+ d && /* @__PURE__ */ n("div", { style: W, children: /* @__PURE__ */ n("p", { children: d.message || d }) }),
159
+ p && /* @__PURE__ */ n("p", { children: "Loading..." }),
160
+ !p && !d && a && /* @__PURE__ */ n(
161
+ "div",
162
+ {
163
+ dangerouslySetInnerHTML: { __html: (a == null ? void 0 : a.outerHTML) ?? "" },
164
+ style: {
165
+ height: "100%",
166
+ maxHeight: "100%",
167
+ padding: 24,
168
+ overflow: "hidden",
169
+ display: "flex",
170
+ justifyContent: "center",
171
+ alignItems: "center",
172
+ transform: `scale(${N / 100})`,
173
+ transition: "all ease-in-out .3s"
174
+ }
175
+ }
176
+ ),
177
+ /* @__PURE__ */ x("div", { className: A.handlerWrap, children: [
178
+ /* @__PURE__ */ n(
179
+ M,
180
+ {
181
+ action: b("minus"),
182
+ icon: "ZoomOut",
183
+ tooltip: "Zoom Out"
184
+ }
185
+ ),
186
+ /* @__PURE__ */ n(
187
+ M,
188
+ {
189
+ action: b("plus"),
190
+ icon: "ZoomIn",
191
+ tooltip: "Zoom In"
192
+ }
193
+ )
194
+ ] })
195
+ ]
196
+ }
197
+ )
198
+ }
199
+ ) });
200
+ }
201
+ const H = { elements: [] }, le = /* @__PURE__ */ Z.create({
202
+ name: "excalidraw",
203
+ group: "block",
204
+ selectable: !0,
205
+ atom: !0,
206
+ draggable: !0,
207
+ inline: !1,
208
+ addAttributes() {
209
+ return {
210
+ defaultShowPicker: {
211
+ default: !1
212
+ },
213
+ createUser: {
214
+ default: null
215
+ },
216
+ width: {
217
+ default: "100%",
218
+ parseHTML: y("width")
219
+ },
220
+ height: {
221
+ default: 240,
222
+ parseHTML: y("height")
223
+ },
224
+ data: {
225
+ default: H,
226
+ parseHTML: y("data", !0)
227
+ }
228
+ };
229
+ },
230
+ addOptions() {
231
+ var e;
232
+ return {
233
+ ...(e = this.parent) == null ? void 0 : e.call(this),
234
+ HTMLAttributes: {
235
+ class: "excalidraw"
236
+ },
237
+ button: ({ editor: r }) => ({
238
+ component: te,
239
+ componentProps: {
240
+ editor: r
241
+ }
242
+ })
243
+ };
244
+ },
245
+ parseHTML() {
246
+ return [
247
+ {
248
+ tag: "div[class=excalidraw]"
249
+ }
250
+ ];
251
+ },
252
+ renderHTML({ HTMLAttributes: e, node: r }) {
253
+ return ["div", z(this.options.HTMLAttributes, e, V(r))];
254
+ },
255
+ addCommands() {
256
+ return {
257
+ setExcalidraw: (e) => ({ tr: r, commands: u, chain: c }) => {
258
+ var m, l, h;
259
+ return e = e || {}, e.data = e.data || H, ((h = (l = (m = r.selection) == null ? void 0 : m.node) == null ? void 0 : l.type) == null ? void 0 : h.name) == this.name ? u.updateAttributes(this.name, e) : c().insertContent({
260
+ type: this.name,
261
+ attrs: e
262
+ }).run();
263
+ }
264
+ };
265
+ },
266
+ addNodeView() {
267
+ return P(oe);
268
+ },
269
+ addInputRules() {
270
+ return [
271
+ k({
272
+ find: /^\$excalidraw\$$/,
273
+ type: this.type,
274
+ getAttributes: () => ({ width: "100%" })
275
+ })
276
+ ];
277
+ }
278
+ });
279
+ export {
280
+ le as E,
281
+ fe as t
282
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CSvnpArE.cjs");require("./dom-dataset-DmsCLv1q.cjs");const e=require("./Excalidraw-BmNljVH8.cjs");exports.Excalidraw=e.Excalidraw;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CSvnpArE.cjs");require("./dom-dataset-Cuy-pIfj.cjs");const e=require("./Excalidraw-Bj3dtbC4.cjs");exports.Excalidraw=e.Excalidraw;
@@ -127,19 +127,19 @@ declare module '@tiptap/core' {
127
127
 
128
128
  declare module '@tiptap/core' {
129
129
  interface Commands<ReturnType> {
130
- imageUpload: {
130
+ imageGifUpload: {
131
131
  /**
132
- * Add an image
132
+ * Add an image gif
133
133
  */
134
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
134
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
135
135
  /**
136
- * Update an image
136
+ * Update an image gif
137
137
  */
138
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
138
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
139
139
  /**
140
140
  * Set image alignment
141
141
  */
142
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
142
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
143
143
  };
144
144
  }
145
145
  }
@@ -147,19 +147,19 @@ declare module '@tiptap/core' {
147
147
 
148
148
  declare module '@tiptap/core' {
149
149
  interface Commands<ReturnType> {
150
- imageGifUpload: {
150
+ imageUpload: {
151
151
  /**
152
- * Add an image gif
152
+ * Add an image
153
153
  */
154
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
154
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
155
155
  /**
156
- * Update an image gif
156
+ * Update an image
157
157
  */
158
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
158
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
159
159
  /**
160
160
  * Set image alignment
161
161
  */
162
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
162
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
163
163
  };
164
164
  }
165
165
  }
@@ -127,19 +127,19 @@ declare module '@tiptap/core' {
127
127
 
128
128
  declare module '@tiptap/core' {
129
129
  interface Commands<ReturnType> {
130
- imageUpload: {
130
+ imageGifUpload: {
131
131
  /**
132
- * Add an image
132
+ * Add an image gif
133
133
  */
134
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
134
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
135
135
  /**
136
- * Update an image
136
+ * Update an image gif
137
137
  */
138
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
138
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
139
139
  /**
140
140
  * Set image alignment
141
141
  */
142
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
142
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
143
143
  };
144
144
  }
145
145
  }
@@ -147,19 +147,19 @@ declare module '@tiptap/core' {
147
147
 
148
148
  declare module '@tiptap/core' {
149
149
  interface Commands<ReturnType> {
150
- imageGifUpload: {
150
+ imageUpload: {
151
151
  /**
152
- * Add an image gif
152
+ * Add an image
153
153
  */
154
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
154
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
155
155
  /**
156
- * Update an image gif
156
+ * Update an image
157
157
  */
158
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
158
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
159
159
  /**
160
160
  * Set image alignment
161
161
  */
162
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
162
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
163
163
  };
164
164
  }
165
165
  }
package/lib/Excalidraw.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index-CXIIg9Sq.js";
2
2
  import "./dom-dataset-2RXYq9wp.js";
3
- import { E as m } from "./Excalidraw-DwD8Qm59.js";
3
+ import { E as m } from "./Excalidraw-DuV1h_du.js";
4
4
  export {
5
5
  m as Excalidraw
6
6
  };
package/lib/ExportPdf.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CSvnpArE.cjs"),d=require("./RichTextEditor-Db6oQoYY.cjs");function s(n){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CSvnpArE.cjs"),d=require("./RichTextEditor-ymQlnG9m.cjs");function s(n){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
2
2
  <!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
@@ -119,19 +119,19 @@ declare module '@tiptap/core' {
119
119
 
120
120
  declare module '@tiptap/core' {
121
121
  interface Commands<ReturnType> {
122
- imageUpload: {
122
+ imageGifUpload: {
123
123
  /**
124
- * Add an image
124
+ * Add an image gif
125
125
  */
126
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
127
127
  /**
128
- * Update an image
128
+ * Update an image gif
129
129
  */
130
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
132
  * Set image alignment
133
133
  */
134
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
135
135
  };
136
136
  }
137
137
  }
@@ -139,19 +139,19 @@ declare module '@tiptap/core' {
139
139
 
140
140
  declare module '@tiptap/core' {
141
141
  interface Commands<ReturnType> {
142
- imageGifUpload: {
142
+ imageUpload: {
143
143
  /**
144
- * Add an image gif
144
+ * Add an image
145
145
  */
146
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
147
147
  /**
148
- * Update an image gif
148
+ * Update an image
149
149
  */
150
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
152
  * Set image alignment
153
153
  */
154
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
154
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
155
155
  };
156
156
  }
157
157
  }
@@ -119,19 +119,19 @@ declare module '@tiptap/core' {
119
119
 
120
120
  declare module '@tiptap/core' {
121
121
  interface Commands<ReturnType> {
122
- imageUpload: {
122
+ imageGifUpload: {
123
123
  /**
124
- * Add an image
124
+ * Add an image gif
125
125
  */
126
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
127
127
  /**
128
- * Update an image
128
+ * Update an image gif
129
129
  */
130
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
132
  * Set image alignment
133
133
  */
134
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
135
135
  };
136
136
  }
137
137
  }
@@ -139,19 +139,19 @@ declare module '@tiptap/core' {
139
139
 
140
140
  declare module '@tiptap/core' {
141
141
  interface Commands<ReturnType> {
142
- imageGifUpload: {
142
+ imageUpload: {
143
143
  /**
144
- * Add an image gif
144
+ * Add an image
145
145
  */
146
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
147
147
  /**
148
- * Update an image gif
148
+ * Update an image
149
149
  */
150
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
152
  * Set image alignment
153
153
  */
154
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
154
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
155
155
  };
156
156
  }
157
157
  }
package/lib/ExportPdf.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { E as c } from "./index-CXIIg9Sq.js";
2
- import { A as d } from "./RichTextEditor-BfYZYQb9.js";
2
+ import { A as d } from "./RichTextEditor-CRDKX-F8.js";
3
3
  function s(n) {
4
4
  const t = document.createElement("iframe");
5
5
  t.setAttribute("style", "position: absolute; width: 0; height: 0; top: 0; left: 0;"), document.body.appendChild(t), t.textContent = `
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CSvnpArE.cjs"),s=require("docx"),t=require("prosemirror-docx"),i=require("./RichTextEditor-Db6oQoYY.cjs"),l=typeof window<"u";function c(o,e){if(l){const n=window.URL.createObjectURL(o),r=document.createElement("a");return r.href=n,r.download=e,r.click(),window.URL.revokeObjectURL(n),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}const u={...t.defaultNodes,hardBreak:t.defaultNodes.hard_break,codeBlock:t.defaultNodes.code_block,orderedList:t.defaultNodes.ordered_list,listItem:t.defaultNodes.list_item,bulletList:t.defaultNodes.bullet_list,horizontalRule:t.defaultNodes.horizontal_rule,image(o,e){o.renderInline(e),o.closeBlock(e)},table(o,e){o.table(e,{tableOptions:{width:{size:100,type:s.WidthType.PERCENTAGE}}})}},p=new t.DocxSerializer(u,t.defaultMarks),f=a.Extension.create({name:"exportWord",addOptions(){var o;return{...(o=this.parent)==null?void 0:o.call(this),button:({editor:e,t:n})=>({component:i.ActionButton,componentProps:{icon:"ExportWord",action:()=>{e==null||e.commands.exportToWord()},tooltip:n("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:()=>async({editor:o})=>{const e={getImageBuffer:async r=>{const d=await(await fetch(r)).arrayBuffer();return new Uint8Array(d)}},n=p.serialize(o.state.doc,e);return s.Packer.toBlob(n).then(r=>c(new Blob([r]),"export-document.docx")),!0}}}});exports.ExportWord=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CSvnpArE.cjs"),s=require("docx"),t=require("prosemirror-docx"),i=require("./RichTextEditor-ymQlnG9m.cjs"),l=typeof window<"u";function c(o,e){if(l){const n=window.URL.createObjectURL(o),r=document.createElement("a");return r.href=n,r.download=e,r.click(),window.URL.revokeObjectURL(n),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}const u={...t.defaultNodes,hardBreak:t.defaultNodes.hard_break,codeBlock:t.defaultNodes.code_block,orderedList:t.defaultNodes.ordered_list,listItem:t.defaultNodes.list_item,bulletList:t.defaultNodes.bullet_list,horizontalRule:t.defaultNodes.horizontal_rule,image(o,e){o.renderInline(e),o.closeBlock(e)},table(o,e){o.table(e,{tableOptions:{width:{size:100,type:s.WidthType.PERCENTAGE}}})}},p=new t.DocxSerializer(u,t.defaultMarks),f=a.Extension.create({name:"exportWord",addOptions(){var o;return{...(o=this.parent)==null?void 0:o.call(this),button:({editor:e,t:n})=>({component:i.ActionButton,componentProps:{icon:"ExportWord",action:()=>{e==null||e.commands.exportToWord()},tooltip:n("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:()=>async({editor:o})=>{const e={getImageBuffer:async r=>{const d=await(await fetch(r)).arrayBuffer();return new Uint8Array(d)}},n=p.serialize(o.state.doc,e);return s.Packer.toBlob(n).then(r=>c(new Blob([r]),"export-document.docx")),!0}}}});exports.ExportWord=f;
@@ -190,19 +190,19 @@ declare module '@tiptap/core' {
190
190
 
191
191
  declare module '@tiptap/core' {
192
192
  interface Commands<ReturnType> {
193
- imageUpload: {
193
+ imageGifUpload: {
194
194
  /**
195
- * Add an image
195
+ * Add an image gif
196
196
  */
197
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
197
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
198
198
  /**
199
- * Update an image
199
+ * Update an image gif
200
200
  */
201
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
201
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
202
202
  /**
203
203
  * Set image alignment
204
204
  */
205
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
205
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
206
206
  };
207
207
  }
208
208
  }
@@ -210,19 +210,19 @@ declare module '@tiptap/core' {
210
210
 
211
211
  declare module '@tiptap/core' {
212
212
  interface Commands<ReturnType> {
213
- imageGifUpload: {
213
+ imageUpload: {
214
214
  /**
215
- * Add an image gif
215
+ * Add an image
216
216
  */
217
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
217
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
218
218
  /**
219
- * Update an image gif
219
+ * Update an image
220
220
  */
221
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
221
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
222
222
  /**
223
223
  * Set image alignment
224
224
  */
225
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
225
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
226
226
  };
227
227
  }
228
228
  }
@@ -190,19 +190,19 @@ declare module '@tiptap/core' {
190
190
 
191
191
  declare module '@tiptap/core' {
192
192
  interface Commands<ReturnType> {
193
- imageUpload: {
193
+ imageGifUpload: {
194
194
  /**
195
- * Add an image
195
+ * Add an image gif
196
196
  */
197
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
197
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
198
198
  /**
199
- * Update an image
199
+ * Update an image gif
200
200
  */
201
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
201
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
202
202
  /**
203
203
  * Set image alignment
204
204
  */
205
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
205
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
206
206
  };
207
207
  }
208
208
  }
@@ -210,19 +210,19 @@ declare module '@tiptap/core' {
210
210
 
211
211
  declare module '@tiptap/core' {
212
212
  interface Commands<ReturnType> {
213
- imageGifUpload: {
213
+ imageUpload: {
214
214
  /**
215
- * Add an image gif
215
+ * Add an image
216
216
  */
217
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
217
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
218
218
  /**
219
- * Update an image gif
219
+ * Update an image
220
220
  */
221
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
221
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
222
222
  /**
223
223
  * Set image alignment
224
224
  */
225
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
225
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
226
226
  };
227
227
  }
228
228
  }
package/lib/ExportWord.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { E as a } from "./index-CXIIg9Sq.js";
2
2
  import { Packer as i, WidthType as c } from "docx";
3
3
  import { defaultNodes as t, DocxSerializer as d, defaultMarks as l } from "prosemirror-docx";
4
- import { A as p } from "./RichTextEditor-BfYZYQb9.js";
4
+ import { A as p } from "./RichTextEditor-CRDKX-F8.js";
5
5
  const m = typeof window < "u";
6
6
  function u(e, o) {
7
7
  if (m) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const y=require("./index-CSvnpArE.cjs"),m=require("./index-Dz3YxLE7.cjs"),o=require("react/jsx-runtime"),F=require("react"),h=require("./ActionMenuButton-CqlhqVIW.cjs"),s=require("./RichTextEditor-Db6oQoYY.cjs"),x=y.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:i})=>i().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function M(t){var r,f,d;const{t:i,lang:u}=m.useLocale(),e=F.useMemo(()=>{var a;const n=(a=t==null?void 0:t.items)==null?void 0:a.find(l=>l.isActive());return n&&!n.default?{...n}:{title:t.tooltip,font:i("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>t.editor.chain().focus().unsetFontFamily().run()}},[i,u,t]);return o.jsxs(s.DropdownMenu,{children:[o.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:o.jsx(h.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:((r=e==null?void 0:e.font)==null?void 0:r.length)>7?`${(f=e==null?void 0:e.font)==null?void 0:f.slice(0,6)}...`:e==null?void 0:e.font,tooltip:t==null?void 0:t.tooltip})}),o.jsx(s.DropdownMenuContent,{className:"richtext-w-full",children:(d=t==null?void 0:t.items)==null?void 0:d.map((n,c)=>{const a=n.font===i("editor.fontFamily.default.tooltip")?{}:{fontFamily:n.font};return o.jsxs(F.Fragment,{children:[o.jsx(s.DropdownMenuCheckboxItem,{checked:(e==null?void 0:e.font)===n.font,onClick:n.action,children:o.jsx("div",{className:"richtext-ml-1 richtext-h-full",style:a,children:n.font})}),n.font===i("editor.fontFamily.default.tooltip")&&o.jsx(s.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const b=x.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),fontFamilyList:m.DEFAULT_FONT_FAMILY_LIST,button({editor:i,extension:u,t:e}){var a;const{extensions:r=[]}=i.extensionManager??[],f=s.ensureNameValueOptions(((a=u==null?void 0:u.options)==null?void 0:a.fontFamilyList)||[]),d=r.find(l=>l.name==="base-kit"),n=f.map(l=>({action:()=>{i.chain().focus().setFontFamily(l.value).run()},isActive:()=>i.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!i.can().setFontFamily(l.value),title:l.name,font:l.value}));d&&d.options.textStyle!==!1&&n.unshift({action:()=>i.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:e("editor.fontFamily.default.tooltip"),title:e("editor.fontFamily.tooltip")});const c=n.filter(l=>l.disabled).length===n.length;return{component:M,componentProps:{tooltip:e("editor.fontFamily.tooltip"),disabled:c,items:n,editor:i}}}}}});exports.DEFAULT_FONT_FAMILY_LIST=m.DEFAULT_FONT_FAMILY_LIST;exports.FontFamily=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const y=require("./index-CSvnpArE.cjs"),m=require("./index-Dz3YxLE7.cjs"),o=require("react/jsx-runtime"),F=require("react"),h=require("./ActionMenuButton-D96eTByd.cjs"),s=require("./RichTextEditor-ymQlnG9m.cjs"),x=y.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:i})=>i().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function M(t){var r,f,d;const{t:i,lang:u}=m.useLocale(),e=F.useMemo(()=>{var a;const n=(a=t==null?void 0:t.items)==null?void 0:a.find(l=>l.isActive());return n&&!n.default?{...n}:{title:t.tooltip,font:i("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>t.editor.chain().focus().unsetFontFamily().run()}},[i,u,t]);return o.jsxs(s.DropdownMenu,{children:[o.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:o.jsx(h.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:((r=e==null?void 0:e.font)==null?void 0:r.length)>7?`${(f=e==null?void 0:e.font)==null?void 0:f.slice(0,6)}...`:e==null?void 0:e.font,tooltip:t==null?void 0:t.tooltip})}),o.jsx(s.DropdownMenuContent,{className:"richtext-w-full",children:(d=t==null?void 0:t.items)==null?void 0:d.map((n,c)=>{const a=n.font===i("editor.fontFamily.default.tooltip")?{}:{fontFamily:n.font};return o.jsxs(F.Fragment,{children:[o.jsx(s.DropdownMenuCheckboxItem,{checked:(e==null?void 0:e.font)===n.font,onClick:n.action,children:o.jsx("div",{className:"richtext-ml-1 richtext-h-full",style:a,children:n.font})}),n.font===i("editor.fontFamily.default.tooltip")&&o.jsx(s.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const b=x.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),fontFamilyList:m.DEFAULT_FONT_FAMILY_LIST,button({editor:i,extension:u,t:e}){var a;const{extensions:r=[]}=i.extensionManager??[],f=s.ensureNameValueOptions(((a=u==null?void 0:u.options)==null?void 0:a.fontFamilyList)||[]),d=r.find(l=>l.name==="base-kit"),n=f.map(l=>({action:()=>{i.chain().focus().setFontFamily(l.value).run()},isActive:()=>i.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!i.can().setFontFamily(l.value),title:l.name,font:l.value}));d&&d.options.textStyle!==!1&&n.unshift({action:()=>i.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:e("editor.fontFamily.default.tooltip"),title:e("editor.fontFamily.tooltip")});const c=n.filter(l=>l.disabled).length===n.length;return{component:M,componentProps:{tooltip:e("editor.fontFamily.tooltip"),disabled:c,items:n,editor:i}}}}}});exports.DEFAULT_FONT_FAMILY_LIST=m.DEFAULT_FONT_FAMILY_LIST;exports.FontFamily=b;