reactjs-tiptap-editor 0.3.31 → 0.4.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 (275) hide show
  1. package/README.md +8 -2
  2. package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
  3. package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
  4. package/lib/Attachment.cjs +2 -2
  5. package/lib/Attachment.d.cts +39 -43
  6. package/lib/Attachment.d.ts +39 -43
  7. package/lib/Attachment.js +7 -6
  8. package/lib/BaseKit.cjs +3 -0
  9. package/lib/BaseKit.d.cts +481 -0
  10. package/lib/BaseKit.d.ts +481 -0
  11. package/lib/BaseKit.js +132 -0
  12. package/lib/Blockquote.cjs +5 -1
  13. package/lib/Blockquote.d.cts +39 -43
  14. package/lib/Blockquote.d.ts +39 -43
  15. package/lib/Blockquote.js +33 -17
  16. package/lib/Bold.cjs +1 -1
  17. package/lib/Bold.d.cts +39 -43
  18. package/lib/Bold.d.ts +39 -43
  19. package/lib/Bold.js +23 -16
  20. package/lib/BulletList.cjs +1 -1
  21. package/lib/BulletList.d.cts +40 -44
  22. package/lib/BulletList.d.ts +40 -44
  23. package/lib/BulletList.js +11 -57
  24. package/lib/Clear.cjs +1 -1
  25. package/lib/Clear.d.cts +39 -43
  26. package/lib/Clear.d.ts +39 -43
  27. package/lib/Clear.js +4 -2
  28. package/lib/Code.cjs +1 -1
  29. package/lib/Code.d.cts +39 -43
  30. package/lib/Code.d.ts +39 -43
  31. package/lib/Code.js +29 -25
  32. package/lib/CodeBlock.cjs +2 -2
  33. package/lib/CodeBlock.d.cts +39 -43
  34. package/lib/CodeBlock.d.ts +39 -43
  35. package/lib/CodeBlock.js +3 -3
  36. package/lib/CodeView.cjs +1 -1
  37. package/lib/CodeView.d.cts +39 -43
  38. package/lib/CodeView.d.ts +39 -43
  39. package/lib/CodeView.js +3 -2
  40. package/lib/Color.cjs +1 -1
  41. package/lib/Color.d.cts +40 -44
  42. package/lib/Color.d.ts +40 -44
  43. package/lib/Color.js +42 -74
  44. package/lib/Document.cjs +1 -1
  45. package/lib/Document.d.cts +39 -43
  46. package/lib/Document.d.ts +39 -43
  47. package/lib/Document.js +4 -8
  48. package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
  49. package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
  50. package/lib/Drawer.cjs +1 -1
  51. package/lib/Drawer.d.cts +39 -43
  52. package/lib/Drawer.d.ts +39 -43
  53. package/lib/Drawer.js +4 -4
  54. package/lib/Emoji.cjs +1 -1
  55. package/lib/Emoji.d.cts +42 -44
  56. package/lib/Emoji.d.ts +42 -44
  57. package/lib/Emoji.js +19793 -182
  58. package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
  59. package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
  60. package/lib/Excalidraw.cjs +1 -1
  61. package/lib/Excalidraw.d.cts +39 -43
  62. package/lib/Excalidraw.d.ts +39 -43
  63. package/lib/Excalidraw.js +3 -3
  64. package/lib/ExportPdf.cjs +1 -1
  65. package/lib/ExportPdf.d.cts +39 -43
  66. package/lib/ExportPdf.d.ts +39 -43
  67. package/lib/ExportPdf.js +4 -2
  68. package/lib/ExportWord.cjs +1 -1
  69. package/lib/ExportWord.d.cts +39 -43
  70. package/lib/ExportWord.d.ts +39 -43
  71. package/lib/ExportWord.js +22 -51
  72. package/lib/FontFamily.cjs +1 -1
  73. package/lib/FontFamily.d.cts +40 -44
  74. package/lib/FontFamily.d.ts +40 -44
  75. package/lib/FontFamily.js +44 -73
  76. package/lib/FontSize.cjs +1 -1
  77. package/lib/FontSize.d.cts +39 -43
  78. package/lib/FontSize.d.ts +39 -43
  79. package/lib/FontSize.js +7 -5
  80. package/lib/FormatPainter.cjs +1 -1
  81. package/lib/FormatPainter.d.cts +39 -43
  82. package/lib/FormatPainter.d.ts +39 -43
  83. package/lib/FormatPainter.js +4 -2
  84. package/lib/Heading.cjs +1 -1
  85. package/lib/Heading.d.cts +39 -43
  86. package/lib/Heading.d.ts +39 -43
  87. package/lib/Heading.js +71 -60
  88. package/lib/Highlight.cjs +1 -1
  89. package/lib/Highlight.d.cts +39 -43
  90. package/lib/Highlight.d.ts +39 -43
  91. package/lib/Highlight.js +5 -4
  92. package/lib/History.cjs +1 -1
  93. package/lib/History.d.cts +41 -45
  94. package/lib/History.d.ts +41 -45
  95. package/lib/History.js +39 -403
  96. package/lib/HorizontalRule.cjs +1 -1
  97. package/lib/HorizontalRule.d.cts +39 -43
  98. package/lib/HorizontalRule.d.ts +39 -43
  99. package/lib/HorizontalRule.js +16 -65
  100. package/lib/Iframe.cjs +1 -1
  101. package/lib/Iframe.d.cts +39 -43
  102. package/lib/Iframe.d.ts +39 -43
  103. package/lib/Iframe.js +4 -4
  104. package/lib/Image.cjs +1 -1
  105. package/lib/Image.d.cts +39 -43
  106. package/lib/Image.d.ts +39 -43
  107. package/lib/Image.js +3 -3
  108. package/lib/ImageGif.cjs +1 -1
  109. package/lib/ImageGif.d.cts +39 -43
  110. package/lib/ImageGif.d.ts +39 -43
  111. package/lib/ImageGif.js +5 -5
  112. package/lib/ImportWord.cjs +72 -72
  113. package/lib/ImportWord.d.cts +39 -43
  114. package/lib/ImportWord.d.ts +39 -43
  115. package/lib/ImportWord.js +5652 -5615
  116. package/lib/Indent.cjs +1 -1
  117. package/lib/Indent.d.cts +39 -43
  118. package/lib/Indent.d.ts +39 -43
  119. package/lib/Indent.js +4 -2
  120. package/lib/Italic.cjs +1 -1
  121. package/lib/Italic.d.cts +39 -43
  122. package/lib/Italic.d.ts +39 -43
  123. package/lib/Italic.js +20 -14
  124. package/lib/Katex.cjs +1 -1
  125. package/lib/Katex.d.cts +39 -43
  126. package/lib/Katex.d.ts +39 -43
  127. package/lib/Katex.js +12 -12
  128. package/lib/LineHeight.cjs +1 -1
  129. package/lib/LineHeight.d.cts +39 -43
  130. package/lib/LineHeight.d.ts +39 -43
  131. package/lib/LineHeight.js +5 -3
  132. package/lib/Link.cjs +1 -1
  133. package/lib/Link.d.cts +39 -43
  134. package/lib/Link.d.ts +39 -43
  135. package/lib/Link.js +4 -4
  136. package/lib/ListItem.cjs +1 -1
  137. package/lib/ListItem.d.cts +44 -44
  138. package/lib/ListItem.d.ts +44 -44
  139. package/lib/ListItem.js +4 -30
  140. package/lib/Mention.cjs +1 -1
  141. package/lib/Mention.d.cts +39 -43
  142. package/lib/Mention.d.ts +39 -43
  143. package/lib/Mention.js +161 -132
  144. package/lib/Mermaid.cjs +2 -2
  145. package/lib/Mermaid.d.cts +39 -43
  146. package/lib/Mermaid.d.ts +39 -43
  147. package/lib/Mermaid.js +50 -48
  148. package/lib/MoreMark.cjs +1 -1
  149. package/lib/MoreMark.d.cts +39 -43
  150. package/lib/MoreMark.d.ts +39 -43
  151. package/lib/MoreMark.js +5 -3
  152. package/lib/MultiColumn.cjs +1 -1
  153. package/lib/MultiColumn.d.cts +39 -43
  154. package/lib/MultiColumn.d.ts +39 -43
  155. package/lib/MultiColumn.js +2 -2
  156. package/lib/OrderedList.cjs +1 -1
  157. package/lib/OrderedList.d.cts +40 -44
  158. package/lib/OrderedList.d.ts +40 -44
  159. package/lib/OrderedList.js +11 -75
  160. package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
  161. package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
  162. package/lib/SearchAndReplace.cjs +1 -1
  163. package/lib/SearchAndReplace.d.cts +52 -126
  164. package/lib/SearchAndReplace.d.ts +52 -126
  165. package/lib/SearchAndReplace.js +204 -192
  166. package/lib/Selection.cjs +1 -1
  167. package/lib/Selection.d.cts +39 -43
  168. package/lib/Selection.d.ts +39 -43
  169. package/lib/Selection.js +1 -1
  170. package/lib/SlashCommand.cjs +1 -1
  171. package/lib/SlashCommand.d.cts +39 -43
  172. package/lib/SlashCommand.d.ts +39 -43
  173. package/lib/SlashCommand.js +177 -222
  174. package/lib/Strike.cjs +1 -1
  175. package/lib/Strike.d.cts +39 -43
  176. package/lib/Strike.d.ts +39 -43
  177. package/lib/Strike.js +20 -14
  178. package/lib/SubAndSuperScript.cjs +1 -1
  179. package/lib/SubAndSuperScript.d.cts +39 -43
  180. package/lib/SubAndSuperScript.d.ts +39 -43
  181. package/lib/SubAndSuperScript.js +5 -3
  182. package/lib/Table.cjs +8 -10
  183. package/lib/Table.d.cts +42 -46
  184. package/lib/Table.d.ts +42 -46
  185. package/lib/Table.js +382 -2022
  186. package/lib/TableOfContent.cjs +1 -1
  187. package/lib/TableOfContent.d.cts +39 -43
  188. package/lib/TableOfContent.d.ts +39 -43
  189. package/lib/TableOfContent.js +5 -5
  190. package/lib/TaskList.cjs +1 -1
  191. package/lib/TaskList.d.cts +41 -45
  192. package/lib/TaskList.d.ts +41 -45
  193. package/lib/TaskList.js +12 -154
  194. package/lib/TextAlign.cjs +1 -1
  195. package/lib/TextAlign.d.cts +39 -43
  196. package/lib/TextAlign.d.ts +39 -43
  197. package/lib/TextAlign.js +11 -9
  198. package/lib/TextBubble.cjs +1 -1
  199. package/lib/TextBubble.d.cts +39 -43
  200. package/lib/TextBubble.d.ts +39 -43
  201. package/lib/TextBubble.js +5 -3
  202. package/lib/TextDirection.cjs +1 -1
  203. package/lib/TextDirection.d.cts +39 -43
  204. package/lib/TextDirection.d.ts +39 -43
  205. package/lib/TextDirection.js +2 -3
  206. package/lib/TextUnderline.cjs +1 -1
  207. package/lib/TextUnderline.d.cts +39 -43
  208. package/lib/TextUnderline.d.ts +39 -43
  209. package/lib/TextUnderline.js +40 -12
  210. package/lib/TrailingNode.cjs +1 -1
  211. package/lib/TrailingNode.d.cts +39 -43
  212. package/lib/TrailingNode.d.ts +39 -43
  213. package/lib/TrailingNode.js +1 -1
  214. package/lib/Twitter-BFULyqdR.js +1628 -0
  215. package/lib/Twitter-Cutpkh3h.cjs +1 -0
  216. package/lib/Twitter.cjs +1 -1
  217. package/lib/Twitter.d.cts +39 -43
  218. package/lib/Twitter.d.ts +39 -43
  219. package/lib/Twitter.js +3 -3
  220. package/lib/Video.cjs +1 -1
  221. package/lib/Video.d.cts +39 -43
  222. package/lib/Video.d.ts +39 -43
  223. package/lib/Video.js +3 -3
  224. package/lib/bubble-extra.cjs +2 -2
  225. package/lib/bubble-extra.d.cts +39 -43
  226. package/lib/bubble-extra.d.ts +39 -43
  227. package/lib/bubble-extra.js +200 -192
  228. package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
  229. package/lib/dom-dataset-lYeH6gfI.js +2361 -0
  230. package/lib/index-5iBZLua9.cjs +12 -0
  231. package/lib/index-6D1J-A-o.cjs +1 -0
  232. package/lib/index-B96Cclrj.cjs +3 -0
  233. package/lib/index-BBz7Nmv9.js +55 -0
  234. package/lib/index-BeCTd5v2.cjs +1 -0
  235. package/lib/index-ByurDDMv.js +237 -0
  236. package/lib/index-CUogRI7j.cjs +1 -0
  237. package/lib/index-Ch6dBBad.js +709 -0
  238. package/lib/index-DF2Lp4HZ.cjs +100 -0
  239. package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
  240. package/lib/index-Dbvi-Bvh.cjs +1 -0
  241. package/lib/index-DpCrt7xs.cjs +1 -0
  242. package/lib/index-DsAX1Vq8.cjs +1 -0
  243. package/lib/index-Dy4DlW9o.js +12 -0
  244. package/lib/index-J3jHHZ4d.js +200 -0
  245. package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
  246. package/lib/index-VvXaaKe3.js +898 -0
  247. package/lib/index-kbO3iWqL.js +13432 -0
  248. package/lib/index.cjs +1 -2
  249. package/lib/index.d.cts +40 -243
  250. package/lib/index.d.ts +40 -243
  251. package/lib/index.js +2 -588
  252. package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
  253. package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
  254. package/lib/locale-bundle.cjs +1 -1
  255. package/lib/locale-bundle.d.cts +39 -43
  256. package/lib/locale-bundle.d.ts +39 -43
  257. package/lib/locale-bundle.js +1 -1
  258. package/lib/style.css +1 -1
  259. package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
  260. package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
  261. package/package.json +76 -70
  262. package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
  263. package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
  264. package/lib/Twitter-99ivY5qv.js +0 -1744
  265. package/lib/Twitter-BvfvUtNT.cjs +0 -17
  266. package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
  267. package/lib/dom-dataset-Di3tIRrR.js +0 -1031
  268. package/lib/index-BI-IcZcN.cjs +0 -1
  269. package/lib/index-ByRfqzMr.cjs +0 -89
  270. package/lib/index-C1fzuXpN.js +0 -46
  271. package/lib/index-CbQQFj2T.js +0 -133
  272. package/lib/index-DI9T3iLd.js +0 -12354
  273. package/lib/index-D_A0TBRA.cjs +0 -1
  274. package/lib/index-DclQSrIx.cjs +0 -1
  275. package/lib/index-Z4b9rzn-.cjs +0 -1
@@ -1,30 +1,29 @@
1
- import { jsxs as b, jsx as t, Fragment as v } from "react/jsx-runtime";
2
- import { useState as y, useRef as L, useCallback as w, useEffect as T, useMemo as W, Fragment as G } from "react";
3
- import { B as z } from "./dom-dataset-Di3tIRrR.js";
4
- import { w as Z, x as J, A as S, y as Q, z as X, F as Y, B as H, G as ee, O as D, a1 as ce, a2 as te, a3 as R, a4 as se, a5 as le } from "./RichTextEditor-KP2Rgcqe.js";
1
+ import { jsxs as p, jsx as t, Fragment as v } from "react/jsx-runtime";
2
+ import { useState as y, useRef as O, useCallback as w, useEffect as k, useMemo as D, Fragment as G } from "react";
3
+ import { t as Z, u as J, A as S, v as Q, w as X, x as Y, B as R, y as ee, K as W, aj as ae, ak as P, al as te, am as U, an as se, ao as le } from "./RichTextEditor-DGcKEUGr.js";
5
4
  import { Mermaid as j } from "./Mermaid.js";
6
5
  import { s as re, i as ne } from "./shortId-WJVkrvml.js";
7
- import { T as ie } from "./textarea-CktfkXNe.js";
8
- import { u as O } from "./index-CsK90iVd.js";
9
- import { E as I, t as de } from "./Excalidraw-CG498239.js";
10
- import { T as K, F as he } from "./Twitter-99ivY5qv.js";
6
+ import { T as ie } from "./textarea-aPtytkDx.js";
7
+ import { u as z } from "./index-LmrOdnen.js";
8
+ import { E as N, t as de } from "./Excalidraw-CVWz2Vyn.js";
9
+ import { T as K, F as he } from "./Twitter-BFULyqdR.js";
11
10
  import ue from "katex";
12
11
  import { HelpCircle as me, Pencil as xe, Trash2 as fe } from "lucide-react";
13
- import { Katex as P } from "./Katex.js";
14
- import { C as pe, D as _ } from "./Drawer-BHkje8ys.js";
15
- import { Editor as ge, makeDropdownToolbar as be } from "easydrawer";
12
+ import { Katex as A } from "./Katex.js";
13
+ import { C as ge, D as _ } from "./Drawer-CaAfmqNo.js";
14
+ import { Editor as be, makeDropdownToolbar as pe } from "easydrawer";
16
15
  const q = `graph TB
17
- a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
18
- const { alt: a, align: n } = s, [r, i] = y(decodeURIComponent(a ?? q)), [l, h] = y(""), [m, x] = y(!1), p = L(null), [f, M] = y(null), k = o == null ? void 0 : o.options.upload, A = w(
19
- (g) => {
20
- g && import("mermaid").then((B) => {
16
+ a-->b`, we = ({ editor: e, attrs: a, extension: o }) => {
17
+ const { alt: s, align: n } = a, [r, i] = y(decodeURIComponent(s ?? q)), [l, h] = y(""), [m, x] = y(!1), g = O(null), [f, M] = y(null), T = o == null ? void 0 : o.options.upload, L = w(
18
+ (b) => {
19
+ b && import("mermaid").then((B) => {
21
20
  M(B.default);
22
21
  });
23
22
  },
24
23
  []
25
- ), E = async (g) => {
24
+ ), I = async (b) => {
26
25
  try {
27
- const { svg: B } = await f.render("mermaid-svg", g);
26
+ const { svg: B } = await f.render("mermaid-svg", b);
28
27
  h(B);
29
28
  } catch {
30
29
  h("");
@@ -36,13 +35,13 @@ a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
36
35
  // fontFamily:'',
37
36
  fontSize: 12,
38
37
  theme: "base"
39
- }), E(r);
38
+ }), I(r);
40
39
  };
41
- return T(() => {
40
+ return k(() => {
42
41
  f && m && $();
43
- }, [f, m]), T(() => {
44
- f && m && E(r);
45
- }, [f, r]), /* @__PURE__ */ b(
42
+ }, [f, m]), k(() => {
43
+ f && m && I(r);
44
+ }, [f, r]), /* @__PURE__ */ p(
46
45
  Z,
47
46
  {
48
47
  onOpenChange: x,
@@ -56,21 +55,21 @@ a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
56
55
  tooltip: "Edit Mermaid"
57
56
  }
58
57
  ) }),
59
- /* @__PURE__ */ b(Q, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
58
+ /* @__PURE__ */ p(Q, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
60
59
  /* @__PURE__ */ t(X, { children: "Edit Mermaid" }),
61
60
  /* @__PURE__ */ t(
62
61
  "div",
63
62
  {
64
- ref: A,
63
+ ref: L,
65
64
  style: { height: "100%", border: "1px solid hsl(var(--border))" },
66
- children: /* @__PURE__ */ b("div", { className: "richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]", children: [
65
+ children: /* @__PURE__ */ p("div", { className: "richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]", children: [
67
66
  /* @__PURE__ */ t(
68
67
  ie,
69
68
  {
70
69
  autoFocus: !0,
71
70
  className: "richtext-flex-1",
72
71
  defaultValue: q,
73
- onChange: (g) => i(g.target.value),
72
+ onChange: (b) => i(b.target.value),
74
73
  placeholder: "Text",
75
74
  required: !0,
76
75
  rows: 10,
@@ -85,7 +84,7 @@ a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
85
84
  {
86
85
  className: "richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",
87
86
  dangerouslySetInnerHTML: { __html: l },
88
- ref: p,
87
+ ref: g,
89
88
  style: { height: "100%", border: "1px solid hsl(var(--border))", minHeight: 500, background: "#fff" }
90
89
  }
91
90
  )
@@ -93,16 +92,16 @@ a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
93
92
  }
94
93
  ),
95
94
  /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
96
- H,
95
+ R,
97
96
  {
98
97
  onClick: async () => {
99
98
  if (r !== "") {
100
99
  if (r) {
101
- const g = p.current.querySelector("svg"), { width: B, height: V } = g.getBoundingClientRect(), u = `mermaid-${re()}.svg`;
102
- let c = ne(g.outerHTML);
103
- if (k) {
100
+ const b = g.current.querySelector("svg"), { width: B, height: V } = b.getBoundingClientRect(), u = `mermaid-${re()}.svg`;
101
+ let c = ne(b.outerHTML);
102
+ if (T) {
104
103
  const d = ee(c, u);
105
- c = await k(d);
104
+ c = await T(d);
106
105
  }
107
106
  e == null || e.chain().focus().setMermaid(
108
107
  {
@@ -127,70 +126,63 @@ a-->b`, we = ({ editor: e, attrs: s, extension: o }) => {
127
126
  }
128
127
  );
129
128
  };
130
- function oe(e, s) {
131
- const [o, a] = y(void 0);
132
- return T(() => {
129
+ function oe(e, a) {
130
+ const [o, s] = y(void 0);
131
+ return k(() => {
133
132
  const n = () => {
134
- const r = e.extensionManager.extensions.find((i) => i.name === s);
135
- r && a(r);
133
+ const r = e.extensionManager.extensions.find((i) => i.name === a);
134
+ r && s(r);
136
135
  };
137
136
  return e.on("selectionUpdate", n), e.on("transaction", n), () => {
138
137
  e.off("selectionUpdate", n), e.off("transaction", n);
139
138
  };
140
- }, [e, s]), o;
139
+ }, [e, a]), o;
141
140
  }
142
- const ve = {
143
- maxWidth: "auto",
144
- zIndex: 20,
145
- appendTo: "parent",
146
- moveTransition: "transform 0.1s ease-out"
147
- };
148
- function ye({ item: e, disabled: s, editor: o }) {
141
+ function ve({ item: e, disabled: a, editor: o }) {
149
142
  var n;
150
- const a = e.component;
151
- return a ? /* @__PURE__ */ t(G, { children: e.type === "divider" ? /* @__PURE__ */ t(
143
+ const s = e.component;
144
+ return s ? /* @__PURE__ */ t(G, { children: e.type === "divider" ? /* @__PURE__ */ t(
152
145
  te,
153
146
  {
154
147
  className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
155
148
  orientation: "vertical"
156
149
  }
157
150
  ) : /* @__PURE__ */ t(
158
- a,
151
+ s,
159
152
  {
160
153
  ...e.componentProps,
161
- disabled: s || ((n = e == null ? void 0 : e.componentProps) == null ? void 0 : n.disabled),
154
+ disabled: a || ((n = e == null ? void 0 : e.componentProps) == null ? void 0 : n.disabled),
162
155
  editor: o
163
156
  }
164
157
  ) }) : /* @__PURE__ */ t(v, {});
165
158
  }
166
- function Se(e) {
159
+ function ye(e) {
167
160
  return e.type.name === "mermaid";
168
161
  }
169
- function Ve(e) {
170
- const { lang: s } = O(), o = D(e.editor, j.name), a = oe(e.editor, j.name), n = ({ editor: i }) => {
162
+ function Re(e) {
163
+ const { lang: a } = z(), o = W(e.editor, j.name), s = oe(e.editor, j.name), n = ({ editor: i }) => {
171
164
  const { selection: l } = i.view.state, { $from: h, to: m } = l;
172
165
  let x = !1;
173
- return i.view.state.doc.nodesBetween(h.pos, m, (p) => {
174
- if (Se(p))
166
+ return i.view.state.doc.nodesBetween(h.pos, m, (g) => {
167
+ if (ye(g))
175
168
  return x = !0, !1;
176
169
  }), x;
177
- }, r = W(() => e.disabled ? [] : ce(e.editor), [e.disabled, e.editor, s]);
170
+ }, r = D(() => e.disabled ? [] : ae(e.editor), [e.disabled, e.editor, a]);
178
171
  return /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(
179
- z,
172
+ P,
180
173
  {
181
174
  editor: e == null ? void 0 : e.editor,
182
175
  shouldShow: n,
183
- tippyOptions: ve,
184
176
  children: r != null && r.length ? /* @__PURE__ */ t("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ t("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: r == null ? void 0 : r.map((i, l) => i.type === "edit" && (o != null && o.src) ? /* @__PURE__ */ t(
185
177
  we,
186
178
  {
187
179
  attrs: o,
188
180
  editor: e.editor,
189
- extension: a
181
+ extension: s
190
182
  },
191
183
  `bubbleMenu-mermaid-${l}`
192
184
  ) : /* @__PURE__ */ t(
193
- ye,
185
+ ve,
194
186
  {
195
187
  disabled: e.disabled,
196
188
  editor: e.editor,
@@ -202,105 +194,123 @@ function Ve(e) {
202
194
  ) });
203
195
  }
204
196
  const C = /* @__PURE__ */ new Map();
205
- function Ce(e) {
206
- const s = e.options.element;
207
- C.has("width") || C.set("width", s.clientWidth), C.has("width") && C.get("width") <= 0 && C.set("width", s.clientWidth);
208
- const o = { attributes: !0, childList: !0, subtree: !0 }, a = function() {
209
- C.set("width", s.clientWidth);
210
- }, n = new MutationObserver(a);
211
- return n.observe(s, o), e.on("destroy", () => {
197
+ function Se(e) {
198
+ const a = e.options.element;
199
+ C.has("width") || C.set("width", a.clientWidth), C.has("width") && C.get("width") <= 0 && C.set("width", a.clientWidth);
200
+ const o = { attributes: !0, childList: !0, subtree: !0 }, s = function() {
201
+ C.set("width", a.clientWidth);
202
+ }, n = new MutationObserver(s);
203
+ return n.observe(a, o), e.on("destroy", () => {
212
204
  n.disconnect();
213
205
  }), { width: C.get("width") };
214
206
  }
215
- function je({ editor: e }) {
216
- const { t: s } = O(), { width: o } = Ce(e), a = D(e, I.name, {
207
+ function Ue({ editor: e }) {
208
+ const { t: a } = z(), { width: o } = Se(e), s = W(e, N.name, {
217
209
  defaultShowPicker: !1,
218
210
  createUser: "",
219
211
  width: 0,
220
212
  height: 0
221
- }), { defaultShowPicker: n, createUser: r, width: i, height: l } = a, h = w(
213
+ }), { defaultShowPicker: n, createUser: r, width: i, height: l } = s, h = w(
222
214
  (f) => {
223
- e.chain().updateAttributes(I.name, f).setNodeSelection(e.state.selection.from).focus().run();
215
+ e.chain().updateAttributes(N.name, f).setNodeSelection(e.state.selection.from).focus().run();
224
216
  },
225
217
  [e]
226
218
  ), m = w(() => {
227
- de({ ...a, editor: e });
228
- }, [e, a]), x = w(() => e.isActive(I.name), [e]), p = w(() => R(I.name, e), [e]);
229
- return T(() => {
230
- n && (m(), e.chain().updateAttributes(I.name, { defaultShowPicker: !1 }).focus().run());
219
+ de({ ...s, editor: e });
220
+ }, [e, s]), x = w(() => e.isActive(N.name), [e]), g = w(() => U(N.name, e), [e]);
221
+ return k(() => {
222
+ n && (m(), e.chain().updateAttributes(N.name, { defaultShowPicker: !1 }).focus().run());
231
223
  }, [r, n, e, m]), /* @__PURE__ */ t(
232
- z,
224
+ P,
233
225
  {
234
226
  className: "bubble-menu",
235
227
  editor: e,
236
228
  pluginKey: "excalidraw-bubble-menu",
237
229
  shouldShow: x,
238
- tippyOptions: {
239
- popperOptions: {
240
- modifiers: [{ name: "flip", enabled: !1 }]
241
- },
230
+ options: {
231
+ // popperOptions: {
232
+ // modifiers: [{ name: 'flip', enabled: false }],
233
+ // },
234
+ // offset: [-2, 16],
242
235
  placement: "bottom-start",
243
- offset: [-2, 16],
244
- zIndex: 9999
236
+ offset: {
237
+ alignmentAxis: 6,
238
+ crossAxis: 6
239
+ }
240
+ // zIndex: 9999,
245
241
  // onHidden: () => {
246
242
  // toggleVisible(false)
247
243
  // },
248
244
  },
249
- children: /* @__PURE__ */ b("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: [
245
+ children: /* @__PURE__ */ p("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: [
250
246
  /* @__PURE__ */ t(
251
247
  S,
252
248
  {
253
- icon: "Pencil",
254
249
  action: m,
255
- tooltip: s("editor.edit")
250
+ icon: "Pencil",
251
+ tooltip: a("editor.edit")
256
252
  }
257
253
  ),
258
- /* @__PURE__ */ t(se, { width: i, maxWidth: o, height: l, onOk: h, children: /* @__PURE__ */ t(
259
- S,
254
+ /* @__PURE__ */ t(
255
+ se,
260
256
  {
261
- icon: "Settings",
262
- tooltip: s("editor.settings")
257
+ height: l,
258
+ maxWidth: o,
259
+ onOk: h,
260
+ width: i,
261
+ children: /* @__PURE__ */ t(
262
+ S,
263
+ {
264
+ icon: "Settings",
265
+ tooltip: a("editor.settings")
266
+ }
267
+ )
263
268
  }
264
- ) }),
269
+ ),
265
270
  /* @__PURE__ */ t(
266
271
  S,
267
272
  {
273
+ action: g,
268
274
  icon: "Trash2",
269
- action: p,
270
- tooltip: s("editor.delete")
275
+ tooltip: a("editor.delete")
271
276
  }
272
277
  )
273
278
  ] })
274
279
  }
275
280
  );
276
281
  }
277
- function Ke({ editor: e, disabled: s }) {
278
- const [o, a] = y(!1), { t: n } = O(), r = w(({ editor: h }) => h.isActive(K.name), []), i = (h) => {
279
- e.commands.updateTweet({ src: h }), a(!1);
280
- }, l = w(() => R(K.name, e), [e]);
282
+ function He({ editor: e, disabled: a }) {
283
+ const [o, s] = y(!1), { t: n } = z(), r = w(({ editor: h }) => h.isActive(K.name), []), i = (h) => {
284
+ e.commands.updateTweet({ src: h }), s(!1);
285
+ }, l = w(() => U(K.name, e), [e]);
281
286
  return /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(
282
- z,
287
+ P,
283
288
  {
284
289
  editor: e,
285
290
  shouldShow: r,
286
- tippyOptions: {
287
- popperOptions: {
288
- modifiers: [{ name: "flip", enabled: !1 }]
289
- },
291
+ options: {
292
+ // popperOptions: {
293
+ // modifiers: [{ name: 'flip', enabled: false }],
294
+ // },
295
+ // placement: 'bottom-start',
296
+ // offset: [-2, 16],
297
+ // zIndex: 9999,
298
+ // onHidden: () => {
299
+ // setShowEdit(false);
300
+ // },
290
301
  placement: "bottom-start",
291
- offset: [-2, 16],
292
- zIndex: 9999,
293
- onHidden: () => {
294
- a(!1);
302
+ offset: {
303
+ alignmentAxis: 6,
304
+ crossAxis: 6
295
305
  }
296
306
  },
297
- children: s ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t(v, { children: o ? /* @__PURE__ */ t(
307
+ children: a ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t(v, { children: o ? /* @__PURE__ */ t(
298
308
  he,
299
309
  {
300
310
  editor: e,
301
311
  onSetLink: i
302
312
  }
303
- ) : /* @__PURE__ */ t("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */ b("div", { className: "richtext-flex richtext-flex-nowrap", children: [
313
+ ) : /* @__PURE__ */ t("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-nowrap", children: [
304
314
  /* @__PURE__ */ t(
305
315
  S,
306
316
  {
@@ -308,7 +318,7 @@ function Ke({ editor: e, disabled: s }) {
308
318
  tooltip: n("editor.link.edit.tooltip"),
309
319
  tooltipOptions: { sideOffset: 15 },
310
320
  action: () => {
311
- a(!0);
321
+ s(!0);
312
322
  }
313
323
  }
314
324
  ),
@@ -325,25 +335,25 @@ function Ke({ editor: e, disabled: s }) {
325
335
  }
326
336
  ) });
327
337
  }
328
- function _e({ editor: e, ...s }) {
329
- const o = D(e, P.name, {
338
+ function Ve({ editor: e, ...a }) {
339
+ const o = W(e, A.name, {
330
340
  text: "",
331
341
  defaultShowPicker: !1
332
- }), { text: a, defaultShowPicker: n } = o, [r, i] = y(""), [l, h] = y(!1), m = w(() => e.isActive(P.name), [e]), x = w(() => R(P.name, e), [e]), p = w(() => {
342
+ }), { text: s, defaultShowPicker: n } = o, [r, i] = y(""), [l, h] = y(!1), m = w(() => e.isActive(A.name), [e]), x = w(() => U(A.name, e), [e]), g = w(() => {
333
343
  e.chain().focus().setKatex({ text: r }).run(), h(!1);
334
344
  }, [e, r]);
335
- T(() => {
336
- n && (h(!0), e.chain().updateAttributes(P.name, { defaultShowPicker: !1 }).focus().run());
337
- }, [e, n, h]), T(() => {
338
- l && i(a || "");
345
+ k(() => {
346
+ n && (h(!0), e.chain().updateAttributes(A.name, { defaultShowPicker: !1 }).focus().run());
347
+ }, [e, n, h]), k(() => {
348
+ l && i(s || "");
339
349
  }, [l]);
340
- const f = W(() => {
350
+ const f = D(() => {
341
351
  try {
342
352
  return ue.renderToString(`${r}`);
343
353
  } catch {
344
354
  return r;
345
355
  }
346
- }, [r]), M = W(
356
+ }, [r]), M = D(
347
357
  () => `${r}`.trim() ? /* @__PURE__ */ t(
348
358
  "span",
349
359
  {
@@ -354,29 +364,34 @@ function _e({ editor: e, ...s }) {
354
364
  [r, f]
355
365
  );
356
366
  return /* @__PURE__ */ t(
357
- z,
367
+ P,
358
368
  {
359
369
  editor: e,
360
370
  pluginKey: "Katex-bubble-menu",
361
371
  shouldShow: m,
362
- tippyOptions: {
363
- popperOptions: {
364
- modifiers: [{ name: "flip", enabled: !1 }]
365
- },
372
+ options: {
373
+ // popperOptions: {
374
+ // modifiers: [{ name: 'flip', enabled: false }],
375
+ // },
376
+ // placement: 'bottom-start',
377
+ // offset: [-2, 16],
378
+ // zIndex: 9999,
379
+ // onHidden: () => {
380
+ // toggleVisible(false);
381
+ // },
366
382
  placement: "bottom-start",
367
- offset: [-2, 16],
368
- zIndex: 9999,
369
- onHidden: () => {
370
- h(!1);
383
+ offset: {
384
+ alignmentAxis: 6,
385
+ crossAxis: 6
371
386
  }
372
387
  },
373
- children: s != null && s.disabled ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t("div", { className: "richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: l ? /* @__PURE__ */ b(v, { children: [
388
+ children: a != null && a.disabled ? /* @__PURE__ */ t(v, {}) : /* @__PURE__ */ t("div", { className: "richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: l ? /* @__PURE__ */ p(v, { children: [
374
389
  /* @__PURE__ */ t(
375
390
  ie,
376
391
  {
377
392
  autoFocus: !0,
378
- defaultValue: a,
379
- onChange: (k) => i(k.target.value),
393
+ defaultValue: s,
394
+ onChange: (T) => i(T.target.value),
380
395
  placeholder: "Formula text",
381
396
  rows: 3,
382
397
  style: { marginBottom: 8 },
@@ -384,12 +399,12 @@ function _e({ editor: e, ...s }) {
384
399
  }
385
400
  ),
386
401
  M && /* @__PURE__ */ t("div", { className: "richtext-my-[10px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]", children: M }),
387
- /* @__PURE__ */ b("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
402
+ /* @__PURE__ */ p("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
388
403
  /* @__PURE__ */ t(
389
- H,
404
+ R,
390
405
  {
391
406
  className: "richtext-flex-1",
392
- onClick: p,
407
+ onClick: g,
393
408
  children: "Submit"
394
409
  }
395
410
  ),
@@ -403,7 +418,7 @@ function _e({ editor: e, ...s }) {
403
418
  }
404
419
  )
405
420
  ] })
406
- ] }) : /* @__PURE__ */ b("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
421
+ ] }) : /* @__PURE__ */ p("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
407
422
  /* @__PURE__ */ t(
408
423
  S,
409
424
  {
@@ -424,29 +439,29 @@ function _e({ editor: e, ...s }) {
424
439
  }
425
440
  );
426
441
  }
427
- let N = !1;
428
- function Te({ editor: e, attrs: s, extension: o }) {
429
- const [a, n] = y(!1), r = L(null), i = L(null), { alt: l, align: h } = s, m = o == null ? void 0 : o.options.upload, x = () => {
442
+ let E = !1;
443
+ function Ce({ editor: e, attrs: a, extension: o }) {
444
+ const [s, n] = y(!1), r = O(null), i = O(null), { alt: l, align: h } = a, m = o == null ? void 0 : o.options.upload, x = () => {
430
445
  (async () => {
431
446
  const c = document.querySelector("#easydrawer");
432
- c && (r.current = new ge(c, {
447
+ c && (r.current = new be(c, {
433
448
  wheelEventsEnabled: !1,
434
449
  disableZoom: !0
435
- }), i.current = be(r.current), i.current.addDefaultToolWidgets(), r.current.loadFromSVG(decodeURIComponent(l)));
450
+ }), i.current = pe(r.current), i.current.addDefaultToolWidgets(), r.current.loadFromSVG(decodeURIComponent(l)));
436
451
  })();
437
452
  };
438
- T(() => {
439
- a && setTimeout(() => {
453
+ k(() => {
454
+ s && setTimeout(() => {
440
455
  x();
441
456
  }, 200);
442
- }, [a]);
443
- const p = async () => {
457
+ }, [s]);
458
+ const g = async () => {
444
459
  if (r.current) {
445
460
  const u = r.current.toSVG(), c = u.outerHTML, d = `drawer-${re()}.svg`;
446
461
  let F = ne(u.outerHTML);
447
462
  if (m) {
448
- const ae = ee(F, d);
449
- F = await m(ae);
463
+ const ce = ee(F, d);
464
+ F = await m(ce);
450
465
  }
451
466
  e == null || e.chain().focus().setDrawer(
452
467
  {
@@ -466,35 +481,35 @@ function Te({ editor: e, attrs: s, extension: o }) {
466
481
  }, M = (u) => {
467
482
  const c = r.current.toolController.getPrimaryTools()[2], d = i.current.getWidgetById("pen-1");
468
483
  c && d && (c.setThickness(u), d.serializeState());
469
- }, k = (u) => {
484
+ }, T = (u) => {
470
485
  const c = r.current.toolController.getPrimaryTools()[3], d = i.current.getWidgetById("pen-2");
471
486
  c && d && (c.setColor(u), d.serializeState());
472
- }, A = (u) => {
487
+ }, L = (u) => {
473
488
  const c = i.current.getWidgetById("shape");
474
489
  c && c.setShapeType(u);
475
- }, E = (u) => {
490
+ }, I = (u) => {
476
491
  const c = r.current.toolController.getPrimaryTools()[5], d = i.current.getWidgetById("shape");
477
492
  c && d && (c.setColor(u), d.serializeState());
478
493
  }, $ = (u) => {
479
494
  const c = r.current.toolController.getPrimaryTools()[5], d = i.current.getWidgetById("shape");
480
495
  c && d && (c.setThickness(u), d.serializeState());
481
- }, U = (u) => {
496
+ }, H = (u) => {
482
497
  const c = r.current.toolController.getPrimaryTools()[5], d = i.current.getWidgetById("shape");
483
498
  c && d && (c.setBorderColor(u), d.serializeState());
484
- }, g = () => {
485
- if (N) {
499
+ }, b = () => {
500
+ if (E) {
486
501
  for (; r.current.history.redoStackSize > 0; )
487
502
  r.current.history.redo();
488
- N = !1;
503
+ E = !1;
489
504
  return;
490
505
  }
491
506
  r.current.history.undo();
492
507
  };
493
- return /* @__PURE__ */ b(
508
+ return /* @__PURE__ */ p(
494
509
  Z,
495
510
  {
496
511
  onOpenChange: n,
497
- open: a,
512
+ open: s,
498
513
  children: [
499
514
  /* @__PURE__ */ t(J, { asChild: !0, children: /* @__PURE__ */ t(
500
515
  S,
@@ -504,9 +519,9 @@ function Te({ editor: e, attrs: s, extension: o }) {
504
519
  tooltip: "Edit Drawer"
505
520
  }
506
521
  ) }),
507
- /* @__PURE__ */ b(Q, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
522
+ /* @__PURE__ */ p(Q, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
508
523
  /* @__PURE__ */ t(X, { children: "Edit Drawer" }),
509
- /* @__PURE__ */ b("div", { style: { height: "100%", borderWidth: 1, background: "white", position: "relative" }, children: [
524
+ /* @__PURE__ */ p("div", { style: { height: "100%", borderWidth: 1, background: "white", position: "relative" }, children: [
510
525
  /* @__PURE__ */ t(
511
526
  "div",
512
527
  {
@@ -515,34 +530,34 @@ function Te({ editor: e, attrs: s, extension: o }) {
515
530
  }
516
531
  ),
517
532
  /* @__PURE__ */ t(
518
- pe,
533
+ ge,
519
534
  {
520
- changeBorderColorShape: U,
521
- changeColorShape: E,
522
- changeShape: A,
535
+ changeBorderColorShape: H,
536
+ changeColorShape: I,
537
+ changeShape: L,
523
538
  onClear: () => {
524
- if (!N) {
539
+ if (!E) {
525
540
  for (; r.current.history.undoStackSize > 0; )
526
- g();
527
- N = !0;
541
+ b();
542
+ E = !0;
528
543
  }
529
544
  },
530
545
  onRedo: () => {
531
- N || r.current.history.redo();
546
+ E || r.current.history.redo();
532
547
  },
533
548
  onThicknessChange: $,
534
- onUndo: g,
549
+ onUndo: b,
535
550
  refEditor: r,
536
- setColorHighlight: k,
551
+ setColorHighlight: T,
537
552
  setColorPen: f,
538
553
  setThicknessPen: M
539
554
  }
540
555
  )
541
556
  ] }),
542
557
  /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t(
543
- H,
558
+ R,
544
559
  {
545
- onClick: p,
560
+ onClick: g,
546
561
  type: "button",
547
562
  children: "Save changes"
548
563
  }
@@ -552,54 +567,47 @@ function Te({ editor: e, attrs: s, extension: o }) {
552
567
  }
553
568
  );
554
569
  }
555
- const Me = {
556
- maxWidth: "auto",
557
- zIndex: 20,
558
- appendTo: "parent",
559
- moveTransition: "transform 0.1s ease-out"
560
- };
561
- function ke({ item: e, disabled: s, editor: o }) {
570
+ function ke({ item: e, disabled: a, editor: o }) {
562
571
  var n;
563
- const a = e.component;
564
- return a ? /* @__PURE__ */ t(G, { children: e.type === "divider" ? /* @__PURE__ */ t(
572
+ const s = e.component;
573
+ return s ? /* @__PURE__ */ t(G, { children: e.type === "divider" ? /* @__PURE__ */ t(
565
574
  te,
566
575
  {
567
576
  className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
568
577
  orientation: "vertical"
569
578
  }
570
579
  ) : /* @__PURE__ */ t(
571
- a,
580
+ s,
572
581
  {
573
582
  ...e.componentProps,
574
- disabled: s || ((n = e == null ? void 0 : e.componentProps) == null ? void 0 : n.disabled),
583
+ disabled: a || ((n = e == null ? void 0 : e.componentProps) == null ? void 0 : n.disabled),
575
584
  editor: o
576
585
  }
577
586
  ) }) : /* @__PURE__ */ t(v, {});
578
587
  }
579
- function Be(e) {
588
+ function Me(e) {
580
589
  return e.type.name === "drawer";
581
590
  }
582
- function qe(e) {
583
- const { lang: s } = O(), o = D(e.editor, _.name), a = oe(e.editor, _.name), n = ({ editor: i }) => {
591
+ function je(e) {
592
+ const { lang: a } = z(), o = W(e.editor, _.name), s = oe(e.editor, _.name), n = ({ editor: i }) => {
584
593
  const { selection: l } = i.view.state, { $from: h, to: m } = l;
585
594
  let x = !1;
586
- return i.view.state.doc.nodesBetween(h.pos, m, (p) => {
587
- if (Be(p))
595
+ return i.view.state.doc.nodesBetween(h.pos, m, (g) => {
596
+ if (Me(g))
588
597
  return x = !0, !1;
589
598
  }), x;
590
- }, r = W(() => e.disabled ? [] : le(e.editor), [e.disabled, e.editor, s]);
599
+ }, r = D(() => e.disabled ? [] : le(e.editor), [e.disabled, e.editor, a]);
591
600
  return /* @__PURE__ */ t(
592
- z,
601
+ P,
593
602
  {
594
603
  editor: e == null ? void 0 : e.editor,
595
604
  shouldShow: n,
596
- tippyOptions: Me,
597
605
  children: r != null && r.length ? /* @__PURE__ */ t("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ t("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: r == null ? void 0 : r.map((i, l) => i.type === "edit" && (o != null && o.src) ? /* @__PURE__ */ t(
598
- Te,
606
+ Ce,
599
607
  {
600
608
  attrs: o,
601
609
  editor: e.editor,
602
- extension: a
610
+ extension: s
603
611
  },
604
612
  `bubbleMenu-drawer-${l}`
605
613
  ) : /* @__PURE__ */ t(
@@ -615,9 +623,9 @@ function qe(e) {
615
623
  );
616
624
  }
617
625
  export {
618
- qe as BubbleMenuDrawer,
619
- je as BubbleMenuExcalidraw,
620
- _e as BubbleMenuKatex,
621
- Ve as BubbleMenuMermaid,
622
- Ke as BubbleMenuTwitter
626
+ je as BubbleMenuDrawer,
627
+ Ue as BubbleMenuExcalidraw,
628
+ Ve as BubbleMenuKatex,
629
+ Re as BubbleMenuMermaid,
630
+ He as BubbleMenuTwitter
623
631
  };