reactjs-tiptap-editor 0.3.21 → 0.3.22

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 (222) hide show
  1. package/lib/{ActionMenuButton-BTFBZyG2.cjs → ActionMenuButton-B81uYOvt.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DXwnYZhJ.js → ActionMenuButton-CtcDNq-L.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +41 -41
  5. package/lib/Attachment.d.ts +41 -41
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +41 -41
  9. package/lib/Blockquote.d.ts +41 -41
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +41 -41
  13. package/lib/Bold.d.ts +41 -41
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +41 -41
  17. package/lib/BulletList.d.ts +41 -41
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +41 -41
  21. package/lib/Clear.d.ts +41 -41
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +41 -41
  25. package/lib/Code.d.ts +41 -41
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +41 -41
  29. package/lib/CodeBlock.d.ts +41 -41
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +41 -41
  33. package/lib/CodeView.d.ts +41 -41
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +41 -41
  37. package/lib/Color.d.ts +41 -41
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +41 -41
  40. package/lib/Document.d.ts +41 -41
  41. package/lib/{Drawer-CVuwyG50.js → Drawer-BI_9XSqI.js} +1 -1
  42. package/lib/{Drawer-BrHHs2E9.cjs → Drawer-CHGZ5D6j.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +41 -41
  45. package/lib/Drawer.d.ts +41 -41
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +41 -41
  49. package/lib/Emoji.d.ts +41 -41
  50. package/lib/Emoji.js +116 -109
  51. package/lib/{Excalidraw-frMX4K62.js → Excalidraw-AIzEaOzF.js} +1 -1
  52. package/lib/{Excalidraw-Be_GDV4Q.cjs → Excalidraw-DOJiMnFl.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +41 -41
  55. package/lib/Excalidraw.d.ts +41 -41
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +41 -41
  59. package/lib/ExportPdf.d.ts +41 -41
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +41 -41
  63. package/lib/ExportWord.d.ts +41 -41
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +41 -41
  67. package/lib/FontFamily.d.ts +41 -41
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +41 -41
  71. package/lib/FontSize.d.ts +41 -41
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +41 -41
  75. package/lib/FormatPainter.d.ts +41 -41
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +41 -41
  79. package/lib/Heading.d.ts +41 -41
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +41 -41
  83. package/lib/Highlight.d.ts +41 -41
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +41 -41
  87. package/lib/History.d.ts +41 -41
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +41 -41
  91. package/lib/HorizontalRule.d.ts +41 -41
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +41 -41
  95. package/lib/Iframe.d.ts +41 -41
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +41 -41
  99. package/lib/Image.d.ts +41 -41
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +41 -41
  103. package/lib/ImageGif.d.ts +41 -41
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +41 -41
  107. package/lib/ImportWord.d.ts +41 -41
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +41 -41
  111. package/lib/Indent.d.ts +41 -41
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +41 -41
  115. package/lib/Italic.d.ts +41 -41
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +41 -41
  119. package/lib/Katex.d.ts +41 -41
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +41 -41
  123. package/lib/LineHeight.d.ts +41 -41
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +41 -41
  127. package/lib/Link.d.ts +41 -41
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +41 -41
  130. package/lib/ListItem.d.ts +41 -41
  131. package/lib/Mention.d.cts +41 -41
  132. package/lib/Mention.d.ts +41 -41
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +41 -41
  135. package/lib/Mermaid.d.ts +41 -41
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +41 -41
  139. package/lib/MoreMark.d.ts +41 -41
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +41 -41
  143. package/lib/MultiColumn.d.ts +41 -41
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +41 -41
  147. package/lib/OrderedList.d.ts +41 -41
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-DjTnd5Uu.js → RichTextEditor-CtxIf8pq.js} +5 -2
  150. package/lib/{RichTextEditor-CAxwVWUE.cjs → RichTextEditor-DtxJlApT.cjs} +5 -2
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +41 -41
  153. package/lib/SearchAndReplace.d.ts +41 -41
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +41 -41
  156. package/lib/Selection.d.ts +41 -41
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +41 -41
  159. package/lib/SlashCommand.d.ts +41 -41
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +41 -41
  163. package/lib/Strike.d.ts +41 -41
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +41 -41
  167. package/lib/SubAndSuperScript.d.ts +41 -41
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +41 -41
  171. package/lib/Table.d.ts +41 -41
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +41 -41
  175. package/lib/TableOfContent.d.ts +41 -41
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +41 -41
  179. package/lib/TaskList.d.ts +41 -41
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +41 -41
  183. package/lib/TextAlign.d.ts +41 -41
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +41 -41
  187. package/lib/TextBubble.d.ts +41 -41
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +41 -41
  191. package/lib/TextDirection.d.ts +41 -41
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +41 -41
  195. package/lib/TextUnderline.d.ts +41 -41
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +41 -41
  198. package/lib/TrailingNode.d.ts +41 -41
  199. package/lib/{Twitter-dRxbZOad.js → Twitter-CJIud-WM.js} +1 -1
  200. package/lib/{Twitter-V0OzBT_E.cjs → Twitter-DBA28WG3.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +41 -41
  203. package/lib/Twitter.d.ts +41 -41
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +41 -41
  207. package/lib/Video.d.ts +41 -41
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +41 -41
  211. package/lib/bubble-extra.d.ts +41 -41
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +41 -41
  215. package/lib/index.d.ts +41 -41
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +41 -41
  218. package/lib/locale-bundle.d.ts +41 -41
  219. package/lib/style.css +1 -1
  220. package/lib/{textarea-BsJTSgT-.cjs → textarea-9iN67tad.cjs} +1 -1
  221. package/lib/{textarea-6c8drwXJ.js → textarea-BhTw-eGz.js} +1 -1
  222. package/package.json +2 -2
package/lib/Emoji.js CHANGED
@@ -1,26 +1,26 @@
1
- import { a as f, N as k } from "./index-DI9T3iLd.js";
2
- import { c as y, a as x } from "./dom-dataset-Di3tIRrR.js";
3
- import { S as v } from "./index-CbQQFj2T.js";
4
- import j from "tippy.js";
5
- import { jsx as i, jsxs as l, Fragment as z } from "react/jsx-runtime";
6
- import { useCallback as q, forwardRef as E, useRef as N, useState as P, useEffect as u, useImperativeHandle as C } from "react";
7
- import { d as m, A as R, P as S, m as I, n as A } from "./RichTextEditor-DjTnd5Uu.js";
1
+ import { a as k, N as y } from "./index-DI9T3iLd.js";
2
+ import { c as x, a as v } from "./dom-dataset-Di3tIRrR.js";
3
+ import { S as j } from "./index-CbQQFj2T.js";
4
+ import z from "tippy.js";
5
+ import { jsx as n, jsxs as l, Fragment as q } from "react/jsx-runtime";
6
+ import { useCallback as E, useState as g, forwardRef as N, useRef as P, useEffect as u, useImperativeHandle as C } from "react";
7
+ import { d as m, A as I, P as R, m as S, n as O } from "./RichTextEditor-CtxIf8pq.js";
8
8
  import { EmojiPicker as _ } from "frimousse";
9
- import { SearchIcon as H, LoaderIcon as T } from "lucide-react";
10
- import L from "scroll-into-view-if-needed";
11
- import { u as O } from "./index-Tj3Ci7xM.js";
9
+ import { SearchIcon as A, LoaderIcon as H } from "lucide-react";
10
+ import T from "scroll-into-view-if-needed";
11
+ import { u as L } from "./index-Tj3Ci7xM.js";
12
12
  function $({
13
13
  className: e,
14
14
  ...a
15
15
  }) {
16
- return /* @__PURE__ */ i(
16
+ return /* @__PURE__ */ n(
17
17
  _.Root,
18
18
  {
19
+ "data-slot": "emoji-picker",
19
20
  className: m(
20
- "richtext-bg-popover richtext-text-popover-foreground richtext-isolate richtext-flex richtext-h-full richtext-w-fit richtext-flex-col richtext-overflow-hidden richtext-rounded-md",
21
+ "!richtext-bg-popover !richtext-text-popover-foreground !richtext-isolate !richtext-flex richtext-h-full !richtext-w-fit !richtext-flex-col !richtext-overflow-hidden !richtext-rounded-md",
21
22
  e
22
23
  ),
23
- "data-slot": "emoji-picker",
24
24
  ...a
25
25
  }
26
26
  );
@@ -32,14 +32,14 @@ function K({
32
32
  return /* @__PURE__ */ l(
33
33
  "div",
34
34
  {
35
- className: m("richtext-flex richtext-h-9 richtext-items-center richtext-gap-2 richtext-border-b richtext-px-3", e),
35
+ className: m("!richtext-flex !richtext-h-9 !richtext-items-center !richtext-gap-2 !richtext-border-b !richtext-px-3", e),
36
36
  "data-slot": "emoji-picker-search-wrapper",
37
37
  children: [
38
- /* @__PURE__ */ i(H, { className: "richtext-size-4 richtext-shrink-0 richtext-opacity-50" }),
39
- /* @__PURE__ */ i(
38
+ /* @__PURE__ */ n(A, { className: "!richtext-size-4 !richtext-shrink-0 !richtext-opacity-50" }),
39
+ /* @__PURE__ */ n(
40
40
  _.Search,
41
41
  {
42
- className: "richtext-outline-hidden placeholder:richtext-text-muted-foreground richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md richtext-bg-transparent richtext-py-3 richtext-text-sm disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
42
+ className: "!richtext-outline-hidden !richtext-flex !richtext-h-10 !richtext-w-full !richtext-rounded-md !richtext-bg-transparent !richtext-py-3 !richtext-text-sm placeholder:!richtext-text-muted-foreground disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50",
43
43
  "data-slot": "emoji-picker-search",
44
44
  ...a
45
45
  }
@@ -49,172 +49,179 @@ function K({
49
49
  );
50
50
  }
51
51
  function D({ children: e, ...a }) {
52
- return /* @__PURE__ */ i("div", { ...a, className: "richtext-scroll-my-1 richtext-px-1", "data-slot": "emoji-picker-row", children: e });
52
+ return /* @__PURE__ */ n(
53
+ "div",
54
+ {
55
+ ...a,
56
+ className: "!richtext-scroll-my-1 !richtext-px-1",
57
+ "data-slot": "emoji-picker-row",
58
+ children: e
59
+ }
60
+ );
53
61
  }
54
62
  function M({
55
63
  emoji: e,
56
64
  className: a,
57
- ...o
65
+ ...i
58
66
  }) {
59
- return /* @__PURE__ */ i(
67
+ return /* @__PURE__ */ n(
60
68
  "button",
61
69
  {
62
- ...o,
70
+ ...i,
71
+ "data-slot": "emoji-picker-emoji",
63
72
  className: m(
64
- "data-[active]:richtext-bg-accent richtext-flex richtext-size-7 richtext-items-center richtext-justify-center richtext-rounded-sm richtext-text-base",
73
+ "data-[active]:!richtext-bg-accent !richtext-flex !richtext-size-7 !richtext-items-center !richtext-justify-center !richtext-rounded-sm !richtext-text-base",
65
74
  a
66
75
  ),
67
- "data-slot": "emoji-picker-emoji",
68
76
  children: e.emoji
69
77
  }
70
78
  );
71
79
  }
72
- function W({
80
+ function F({
73
81
  category: e,
74
82
  ...a
75
83
  }) {
76
- return /* @__PURE__ */ i(
84
+ return /* @__PURE__ */ n(
77
85
  "div",
78
86
  {
79
87
  ...a,
80
- className: "richtext-bg-popover richtext-text-muted-foreground richtext-px-3 richtext-pb-2 richtext-pt-3.5 richtext-text-xs richtext-leading-none",
88
+ className: "!richtext-bg-popover !richtext-px-3 !richtext-pb-2 !richtext-pt-3.5 !richtext-text-xs !richtext-leading-none !richtext-text-muted-foreground",
81
89
  "data-slot": "emoji-picker-category-header",
82
90
  children: e.label
83
91
  }
84
92
  );
85
93
  }
86
- function F({
94
+ function U({
87
95
  className: e,
88
96
  ...a
89
97
  }) {
90
98
  return /* @__PURE__ */ l(
91
99
  _.Viewport,
92
100
  {
93
- className: m("richtext-outline-hidden richtext-relative richtext-flex-1", e),
101
+ className: m("!richtext-outline-hidden !richtext-relative !richtext-flex-1", e),
94
102
  "data-slot": "emoji-picker-viewport",
95
103
  ...a,
96
104
  children: [
97
- /* @__PURE__ */ i(
105
+ /* @__PURE__ */ n(
98
106
  _.Loading,
99
107
  {
100
- className: "richtext-absolute richtext-inset-0 richtext-flex richtext-items-center richtext-justify-center richtext-text-muted-foreground",
108
+ className: "!richtext-absolute !richtext-inset-0 !richtext-flex !richtext-items-center !richtext-justify-center !richtext-text-muted-foreground",
101
109
  "data-slot": "emoji-picker-loading",
102
- children: /* @__PURE__ */ i(T, { className: "richtext-size-4 richtext-animate-spin" })
110
+ children: /* @__PURE__ */ n(H, { className: "!richtext-size-4 !richtext-animate-spin" })
103
111
  }
104
112
  ),
105
- /* @__PURE__ */ i(
113
+ /* @__PURE__ */ n(
106
114
  _.Empty,
107
115
  {
108
- className: "richtext-absolute richtext-inset-0 richtext-flex richtext-items-center richtext-justify-center richtext-text-muted-foreground richtext-text-sm",
116
+ className: "!richtext-absolute !richtext-inset-0 !richtext-flex !richtext-items-center !richtext-justify-center !richtext-text-sm !richtext-text-muted-foreground",
109
117
  "data-slot": "emoji-picker-empty",
110
118
  children: "No emoji found."
111
119
  }
112
120
  ),
113
- /* @__PURE__ */ i(
121
+ /* @__PURE__ */ n(
114
122
  _.List,
115
123
  {
116
- className: "richtext-select-none richtext-pb-1",
124
+ className: "!richtext-select-none !richtext-pb-1",
125
+ "data-slot": "emoji-picker-list",
117
126
  components: {
118
127
  Row: D,
119
128
  Emoji: M,
120
- CategoryHeader: W
121
- },
122
- "data-slot": "emoji-picker-list"
129
+ CategoryHeader: F
130
+ }
123
131
  }
124
132
  )
125
133
  ]
126
134
  }
127
135
  );
128
136
  }
129
- function U({
137
+ function V({
130
138
  className: e,
131
139
  ...a
132
140
  }) {
133
- return /* @__PURE__ */ i(
141
+ return /* @__PURE__ */ n(
134
142
  "div",
135
143
  {
144
+ "data-slot": "emoji-picker-footer",
136
145
  className: m(
137
- "richtext-max-w-(--frimousse-viewport-width) richtext-flex richtext-w-full richtext-min-w-0 richtext-items-center richtext-gap-1 richtext-border-t richtext-p-2",
146
+ "!richtext-max-w-(--frimousse-viewport-width) !richtext-flex !richtext-w-full !richtext-min-w-0 !richtext-items-center !richtext-gap-1 !richtext-border-t !richtext-p-2",
138
147
  e
139
148
  ),
140
- "data-slot": "emoji-picker-footer",
141
149
  ...a,
142
- children: /* @__PURE__ */ i(_.ActiveEmoji, { children: ({ emoji: o }) => o ? /* @__PURE__ */ l(z, { children: [
143
- /* @__PURE__ */ i("div", { className: "richtext-flex richtext-size-7 richtext-flex-none richtext-items-center richtext-justify-center richtext-text-lg", children: o.emoji }),
144
- /* @__PURE__ */ i("span", { className: "richtext-text-secondary-foreground richtext-truncate richtext-text-xs", children: o.label })
145
- ] }) : /* @__PURE__ */ i("span", { className: "richtext-text-muted-foreground richtext-ml-1.5 richtext-flex richtext-h-7 richtext-items-center richtext-truncate richtext-text-xs", children: "Select an emoji…" }) })
150
+ children: /* @__PURE__ */ n(_.ActiveEmoji, { children: ({ emoji: i }) => i ? /* @__PURE__ */ l(q, { children: [
151
+ /* @__PURE__ */ n("div", { className: "!richtext-flex !richtext-size-7 !richtext-flex-none !richtext-items-center !richtext-justify-center !richtext-text-lg", children: i.emoji }),
152
+ /* @__PURE__ */ n("span", { className: "!richtext-truncate !richtext-text-xs !richtext-text-secondary-foreground", children: i.label })
153
+ ] }) : /* @__PURE__ */ n("span", { className: "!richtext-ml-1.5 !richtext-flex !richtext-h-7 !richtext-items-center !richtext-truncate !richtext-text-xs !richtext-text-muted-foreground", children: "Select an emoji…" }) })
146
154
  }
147
155
  );
148
156
  }
149
- function V({ onSelectEmoji: e, children: a }) {
150
- return /* @__PURE__ */ l(S, { modal: !0, children: [
151
- /* @__PURE__ */ i(I, { asChild: !0, children: a }),
152
- /* @__PURE__ */ i(
153
- A,
154
- {
155
- align: "start",
156
- className: "richtext-size-full richtext-p-2",
157
- hideWhenDetached: !0,
158
- side: "bottom",
159
- children: /* @__PURE__ */ l(
157
+ function W({ onSelectEmoji: e, children: a }) {
158
+ const [i, o] = g(!1);
159
+ return /* @__PURE__ */ l(
160
+ R,
161
+ {
162
+ onOpenChange: o,
163
+ open: i,
164
+ children: [
165
+ /* @__PURE__ */ n(S, { asChild: !0, children: a }),
166
+ /* @__PURE__ */ n(O, { className: "!richtext-w-fit !richtext-p-0", children: /* @__PURE__ */ l(
160
167
  $,
161
168
  {
162
169
  className: "!richtext-h-[342px]",
163
- onEmojiSelect: ({ emoji: o }) => {
164
- e(o);
170
+ onEmojiSelect: ({ emoji: t }) => {
171
+ o(!1), e(t);
165
172
  },
166
173
  children: [
167
- /* @__PURE__ */ i(K, {}),
168
- /* @__PURE__ */ i(F, {}),
169
- /* @__PURE__ */ i(U, {})
174
+ /* @__PURE__ */ n(K, {}),
175
+ /* @__PURE__ */ n(U, {}),
176
+ /* @__PURE__ */ n(V, {})
170
177
  ]
171
178
  }
172
- )
173
- }
174
- )
175
- ] });
179
+ ) })
180
+ ]
181
+ }
182
+ );
176
183
  }
177
- function B({ editor: e, icon: a, ...o }) {
178
- const n = q(
184
+ function B({ editor: e, icon: a, ...i }) {
185
+ const o = E(
179
186
  (t) => {
180
187
  const { selection: d } = e.state, { $anchor: h } = d;
181
188
  return e.chain().insertContentAt(h.pos, t).run();
182
189
  },
183
190
  [e]
184
191
  );
185
- return /* @__PURE__ */ i(V, { onSelectEmoji: n, children: /* @__PURE__ */ i(
186
- R,
192
+ return /* @__PURE__ */ n(W, { onSelectEmoji: o, children: /* @__PURE__ */ n(
193
+ I,
187
194
  {
188
195
  icon: a,
189
- tooltip: o == null ? void 0 : o.tooltip
196
+ tooltip: i == null ? void 0 : i.tooltip
190
197
  }
191
198
  ) });
192
199
  }
193
- const g = E((e, a) => {
194
- const o = N(null), [n, t] = P(0), { t: d } = O(), h = (r) => {
200
+ const p = N((e, a) => {
201
+ const i = P(null), [o, t] = g(0), { t: d } = L(), h = (r) => {
195
202
  const s = e.items[r];
196
203
  s && e.command(s);
197
- }, p = () => {
198
- t((n + e.items.length - 1) % e.items.length);
199
204
  }, b = () => {
200
- t((n + 1) % e.items.length);
205
+ t((o + e.items.length - 1) % e.items.length);
201
206
  }, w = () => {
202
- h(n);
207
+ t((o + 1) % e.items.length);
208
+ }, f = () => {
209
+ h(o);
203
210
  };
204
211
  return u(() => t(0), [e.items]), u(() => {
205
- if (Number.isNaN(n + 1))
212
+ if (Number.isNaN(o + 1))
206
213
  return;
207
- const r = o.current.querySelector(`span:nth-of-type(${n + 1})`);
208
- r && L(r, { behavior: "smooth", scrollMode: "if-needed" });
209
- }, [n]), C(a, () => ({
210
- onKeyDown: ({ event: r }) => r.key === "ArrowUp" ? (p(), !0) : r.key === "ArrowDown" ? (b(), !0) : r.key === "Enter" ? (w(), !0) : !1
211
- })), /* @__PURE__ */ i("div", { className: "richtext-max-h-[320px] richtext-w-[200px] richtext-overflow-y-auto richtext-overflow-x-hidden richtext-rounded-sm !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ i("div", { ref: o, children: e.items.length > 0 ? e.items.map((r, s) => /* @__PURE__ */ l(
214
+ const r = i.current.querySelector(`span:nth-of-type(${o + 1})`);
215
+ r && T(r, { behavior: "smooth", scrollMode: "if-needed" });
216
+ }, [o]), C(a, () => ({
217
+ onKeyDown: ({ event: r }) => r.key === "ArrowUp" ? (b(), !0) : r.key === "ArrowDown" ? (w(), !0) : r.key === "Enter" ? (f(), !0) : !1
218
+ })), /* @__PURE__ */ n("div", { className: "richtext-max-h-[320px] richtext-w-[200px] richtext-overflow-y-auto richtext-overflow-x-hidden richtext-rounded-sm !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ n("div", { ref: i, children: e.items.length > 0 ? e.items.map((r, s) => /* @__PURE__ */ l(
212
219
  "span",
213
220
  {
214
- className: y(" richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors hover:richtext-bg-accent focus:richtext-bg-accent focus:richtext-text-accent-foreground", s === n ? "bg-accent" : ""),
221
+ className: x(" richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors hover:richtext-bg-accent focus:richtext-bg-accent focus:richtext-text-accent-foreground", s === o ? "bg-accent" : ""),
215
222
  onClick: () => h(s),
216
223
  children: [
217
- r.fallbackImage ? /* @__PURE__ */ i(
224
+ r.fallbackImage ? /* @__PURE__ */ n(
218
225
  "img",
219
226
  {
220
227
  className: "richtext-size-[1em]",
@@ -227,9 +234,9 @@ const g = E((e, a) => {
227
234
  ]
228
235
  },
229
236
  `emoji-list-code-${s}`
230
- )) : /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors", children: /* @__PURE__ */ i("span", { children: d("no_result_found") }) }) }) });
237
+ )) : /* @__PURE__ */ n("div", { className: "richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors", children: /* @__PURE__ */ n("span", { children: d("no_result_found") }) }) }) });
231
238
  });
232
- g.displayName = "EmojiList";
239
+ p.displayName = "EmojiList";
233
240
  const c = {
234
241
  100: "💯",
235
242
  1234: "🔢",
@@ -2070,8 +2077,8 @@ const c = {
2070
2077
  scotland: "🏴󠁧󠁢󠁳󠁣󠁴󠁿",
2071
2078
  wales: "🏴󠁧󠁢󠁷󠁬󠁳󠁿"
2072
2079
  }, le = Object.keys(c).reduce((e, a) => {
2073
- const o = c[a];
2074
- return e[o] = a, e;
2080
+ const i = c[a];
2081
+ return e[i] = a, e;
2075
2082
  }, {}), G = Object.keys(c).map((e) => e);
2076
2083
  Object.keys(c).map((e) => c[e]);
2077
2084
  function X(e) {
@@ -2080,7 +2087,7 @@ function X(e) {
2080
2087
  emoji: c[a]
2081
2088
  }));
2082
2089
  }
2083
- const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2090
+ const Y = 200, J = new k("emoji"), ce = /* @__PURE__ */ y.create({
2084
2091
  name: "emoji",
2085
2092
  content: "text*",
2086
2093
  priority: Y,
@@ -2092,11 +2099,11 @@ const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2092
2099
  suggestion: {
2093
2100
  char: ":",
2094
2101
  pluginKey: J,
2095
- command: ({ editor: a, range: o, props: n }) => {
2096
- a.chain().focus().insertContentAt(o, `${n.emoji} `).run();
2102
+ command: ({ editor: a, range: i, props: o }) => {
2103
+ a.chain().focus().insertContentAt(i, `${o.emoji} `).run();
2097
2104
  }
2098
2105
  },
2099
- button: ({ editor: a, t: o }) => ({
2106
+ button: ({ editor: a, t: i }) => ({
2100
2107
  component: B,
2101
2108
  componentProps: {
2102
2109
  editor: a,
@@ -2105,7 +2112,7 @@ const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2105
2112
  isActive: () => !1,
2106
2113
  disabled: !1,
2107
2114
  icon: "EmojiIcon",
2108
- tooltip: o("editor.emoji.tooltip")
2115
+ tooltip: i("editor.emoji.tooltip")
2109
2116
  }
2110
2117
  })
2111
2118
  };
@@ -2117,7 +2124,7 @@ const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2117
2124
  },
2118
2125
  addProseMirrorPlugins() {
2119
2126
  return [
2120
- v({
2127
+ j({
2121
2128
  editor: this.editor,
2122
2129
  ...this.options.suggestion
2123
2130
  })
@@ -2127,14 +2134,14 @@ const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2127
2134
  suggestion: {
2128
2135
  items: ({ query: e }) => X(e),
2129
2136
  render: () => {
2130
- let e, a, o;
2137
+ let e, a, i;
2131
2138
  return {
2132
- onStart: (n) => {
2133
- o = n.editor.isEditable, o && (e = new x(g, {
2134
- props: n,
2135
- editor: n.editor
2136
- }), a = j("body", {
2137
- getReferenceClientRect: n.clientRect,
2139
+ onStart: (o) => {
2140
+ i = o.editor.isEditable, i && (e = new v(p, {
2141
+ props: o,
2142
+ editor: o.editor
2143
+ }), a = z("body", {
2144
+ getReferenceClientRect: o.clientRect,
2138
2145
  appendTo: () => document.body,
2139
2146
  content: e.element,
2140
2147
  showOnCreate: !0,
@@ -2143,18 +2150,18 @@ const Y = 200, J = new f("emoji"), ce = /* @__PURE__ */ k.create({
2143
2150
  placement: "bottom-start"
2144
2151
  }));
2145
2152
  },
2146
- onUpdate(n) {
2147
- o && (e.updateProps(n), a[0].setProps({
2148
- getReferenceClientRect: n.clientRect
2153
+ onUpdate(o) {
2154
+ i && (e.updateProps(o), a[0].setProps({
2155
+ getReferenceClientRect: o.clientRect
2149
2156
  }));
2150
2157
  },
2151
- onKeyDown(n) {
2158
+ onKeyDown(o) {
2152
2159
  var t;
2153
- if (o)
2154
- return n.event.key === "Escape" ? (a[0].hide(), !0) : (t = e.ref) == null ? void 0 : t.onKeyDown(n);
2160
+ if (i)
2161
+ return o.event.key === "Escape" ? (a[0].hide(), !0) : (t = e.ref) == null ? void 0 : t.onKeyDown(o);
2155
2162
  },
2156
2163
  onExit() {
2157
- o && (a[0].destroy(), e.destroy());
2164
+ i && (a[0].destroy(), e.destroy());
2158
2165
  }
2159
2166
  };
2160
2167
  }
@@ -2,7 +2,7 @@ import { N as Z, n as k, m as z } from "./index-DI9T3iLd.js";
2
2
  import { N as P, c as C, R as j, n as V, g as y } from "./dom-dataset-Di3tIRrR.js";
3
3
  import { jsxs as w, jsx as n } from "react/jsx-runtime";
4
4
  import { useMemo as B, useState as o, useCallback as f, useEffect as A, useRef as U } from "react";
5
- import { w as $, x as F, A as M, y as X, z as G, F as K, B as Y, K as q } from "./RichTextEditor-DjTnd5Uu.js";
5
+ import { w as $, x as F, A as M, y as X, z as G, F as K, B as Y, K as q } from "./RichTextEditor-CtxIf8pq.js";
6
6
  import { n as J } from "./index-Tj3Ci7xM.js";
7
7
  import { Resizable as Q } from "re-resizable";
8
8
  let I;
@@ -1 +1 @@
1
- "use strict";var W=Object.create;var N=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var P=(e,n,i,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Z(n))!z.call(e,o)&&o!==i&&N(e,o,{get:()=>n[o],enumerable:!(l=H(n,o))||l.enumerable});return e};var y=(e,n,i)=>(i=e!=null?W(q(e)):{},P(n||!e||!e.__esModule?N(i,"default",{value:e,enumerable:!0}):i,e));const _=require("./index-ByRfqzMr.cjs"),x=require("./dom-dataset-Byuf1YmW.cjs"),r=require("react/jsx-runtime"),a=require("react"),u=require("./RichTextEditor-CAxwVWUE.cjs"),B=require("./index-C19MB4Al.cjs"),V=require("re-resizable");let L;function D(){try{return L||(L=B.mitt()),L}catch{throw new Error("Error EventEmitter")}}const M="OPEN_EXCALIDRAW_SETTING_MODAL";function $(e,n){D().on(e,n)}function U(e,n){D().off(e,n)}function X(e){D().emit(M,e)}const F=({editor:e})=>{const n=a.useMemo(()=>{var t;return((t=e.extensionManager.extensions.find(s=>s.name==="excalidraw"))==null?void 0:t.options)||{}},[e]),[i,l]=a.useState(null),[o,d]=a.useState({}),[f,m]=a.useState({elements:[],appState:{isLoading:!1},files:null}),[g,h]=a.useState(!1),[p,E]=a.useState(!0),[c,A]=a.useState(null),S=a.useCallback(t=>{t&&import("@excalidraw/excalidraw").then(s=>{l(s.Excalidraw)}).catch(A).finally(()=>E(!1))},[E]),j=a.useCallback(t=>{setTimeout(()=>{t.refresh()})},[]),b=a.useCallback((t,s,w)=>{d({elements:t,appState:{isLoading:!1},files:w})},[]),T=a.useCallback(()=>{if(!i){h(!1);return}e.chain().focus().setExcalidraw({data:o}).run(),h(!1)},[i,e,o,h]);return a.useEffect(()=>{const t=s=>{(s==null?void 0:s.editor)===e&&(h(!0),s&&m(s.data))};return $(M,t),()=>{U(M,t)}},[e,h]),a.useEffect(()=>{!p&&i&&g&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},400)},[p,i,g]),r.jsxs(u.Dialog,{onOpenChange:h,open:g,children:[r.jsx(u.DialogTrigger,{asChild:!0,children:r.jsx(u.ActionButton,{action:()=>h(!0),icon:"Excalidraw",tooltip:"Excalidraw"})}),r.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[r.jsx(u.DialogTitle,{children:"Excalidraw"}),r.jsxs("div",{style:{height:"100%",borderWidth:1},children:[p&&r.jsx("p",{children:"Loading..."}),c&&r.jsx("p",{children:c&&c.message||"Error"}),r.jsx("div",{ref:S,style:{width:"100%",height:600},children:!p&&!c&&i?r.jsx(i,{initialData:f,langCode:"en",onChange:b,ref:j,...n.excalidrawProps}):null})]}),r.jsx(u.DialogFooter,{children:r.jsx(u.Button,{onClick:T,type:"button",children:"Save changes"})})]})]})},G="_wrap_15k3c_1",Y="_renderWrap_15k3c_7",J="_handlerWrap_15k3c_30",v={wrap:G,renderWrap:Y,handlerWrap:J},K=10,Q=200,C=15,O={width:"100%",height:"100%",maxWidth:"100%"};function ee({editor:e,node:n,updateAttributes:i}){const l=a.useRef(null),o=e.isActive(k.name),{data:d,width:f,height:m}=n.attrs,[g,h]=a.useState(null),[p,E]=a.useState(!0),[c,A]=a.useState(null),[S,j]=a.useState(100),b=a.useCallback(t=>()=>{j(s=>u.clamp(t==="minus"?s-C:s+C,K,Q))},[]);a.useEffect(()=>{let t=!1;return import("@excalidraw/excalidraw").then(s=>{t||(l.current=s.exportToSvg)}).catch(s=>!t&&A(s)).finally(()=>!t&&E(!1)),()=>{t=!0}},[d]),a.useEffect(()=>{let t=!1;return(async()=>{if(!l.current||t||p||c||!d)return;const w=await l.current(d);t||(w.setAttribute("width","100%"),w.setAttribute("height","100%"),w.setAttribute("display","block"),h(w))})(),()=>{t=!0}},[d,p,c]);const T=t=>{i({width:t.width,height:t.height})};return r.jsx(x.NodeViewWrapper,{className:x.clsx(v.wrap,o&&v.isActive),children:r.jsx(V.Resizable,{size:{width:Number.parseInt(f),height:Number.parseInt(m)},onResizeStop:(t,s,w,I)=>{T({width:Number.parseInt(f)+I.width,height:Number.parseInt(m)+I.height})},children:r.jsxs("div",{className:x.clsx(v.renderWrap,"render-wrapper"),style:{...O,overflow:"hidden"},children:[c&&r.jsx("div",{style:O,children:r.jsx("p",{children:c.message||c})}),p&&r.jsx("p",{children:"Loading..."}),!p&&!c&&g&&r.jsx("div",{dangerouslySetInnerHTML:{__html:(g==null?void 0:g.outerHTML)??""},style:{height:"100%",maxHeight:"100%",padding:24,overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",transform:`scale(${S/100})`,transition:"all ease-in-out .3s"}}),r.jsxs("div",{className:v.handlerWrap,children:[r.jsx(u.ActionButton,{action:b("minus"),icon:"ZoomOut",tooltip:"Zoom Out"}),r.jsx(u.ActionButton,{action:b("plus"),icon:"ZoomIn",tooltip:"Zoom In"})]})]})})})}const R={elements:[]},k=_.Node.create({name:"excalidraw",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addAttributes(){return{defaultShowPicker:{default:!1},createUser:{default:null},width:{default:"100%",parseHTML:x.getDatasetAttribute("width")},height:{default:240,parseHTML:x.getDatasetAttribute("height")},data:{default:R,parseHTML:x.getDatasetAttribute("data",!0)}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"excalidraw"},excalidrawProps:{},button:({editor:n})=>({component:F,componentProps:{editor:n}})}},parseHTML(){return[{tag:"div[class=excalidraw]"}]},renderHTML({HTMLAttributes:e,node:n}){return["div",_.mergeAttributes(this.options.HTMLAttributes,e,x.nodeAttrsToDataset(n))]},addCommands(){return{setExcalidraw:e=>({tr:n,commands:i,chain:l})=>{var o,d,f;return e=e||{},e.data=e.data||R,((f=(d=(o=n.selection)==null?void 0:o.node)==null?void 0:d.type)==null?void 0:f.name)==this.name?i.updateAttributes(this.name,e):l().insertContent({type:this.name,attrs:e}).run()}}},addNodeView(){return x.ReactNodeViewRenderer(ee)},addInputRules(){return[_.nodeInputRule({find:/^\$excalidraw\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]}});exports.Excalidraw=k;exports.triggerOpenExcalidrawSettingModal=X;
1
+ "use strict";var W=Object.create;var N=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var P=(e,n,i,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Z(n))!z.call(e,o)&&o!==i&&N(e,o,{get:()=>n[o],enumerable:!(l=H(n,o))||l.enumerable});return e};var y=(e,n,i)=>(i=e!=null?W(q(e)):{},P(n||!e||!e.__esModule?N(i,"default",{value:e,enumerable:!0}):i,e));const _=require("./index-ByRfqzMr.cjs"),x=require("./dom-dataset-Byuf1YmW.cjs"),r=require("react/jsx-runtime"),a=require("react"),u=require("./RichTextEditor-DtxJlApT.cjs"),B=require("./index-C19MB4Al.cjs"),V=require("re-resizable");let L;function D(){try{return L||(L=B.mitt()),L}catch{throw new Error("Error EventEmitter")}}const M="OPEN_EXCALIDRAW_SETTING_MODAL";function $(e,n){D().on(e,n)}function U(e,n){D().off(e,n)}function X(e){D().emit(M,e)}const F=({editor:e})=>{const n=a.useMemo(()=>{var t;return((t=e.extensionManager.extensions.find(s=>s.name==="excalidraw"))==null?void 0:t.options)||{}},[e]),[i,l]=a.useState(null),[o,d]=a.useState({}),[f,m]=a.useState({elements:[],appState:{isLoading:!1},files:null}),[g,h]=a.useState(!1),[p,E]=a.useState(!0),[c,A]=a.useState(null),S=a.useCallback(t=>{t&&import("@excalidraw/excalidraw").then(s=>{l(s.Excalidraw)}).catch(A).finally(()=>E(!1))},[E]),j=a.useCallback(t=>{setTimeout(()=>{t.refresh()})},[]),b=a.useCallback((t,s,w)=>{d({elements:t,appState:{isLoading:!1},files:w})},[]),T=a.useCallback(()=>{if(!i){h(!1);return}e.chain().focus().setExcalidraw({data:o}).run(),h(!1)},[i,e,o,h]);return a.useEffect(()=>{const t=s=>{(s==null?void 0:s.editor)===e&&(h(!0),s&&m(s.data))};return $(M,t),()=>{U(M,t)}},[e,h]),a.useEffect(()=>{!p&&i&&g&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},400)},[p,i,g]),r.jsxs(u.Dialog,{onOpenChange:h,open:g,children:[r.jsx(u.DialogTrigger,{asChild:!0,children:r.jsx(u.ActionButton,{action:()=>h(!0),icon:"Excalidraw",tooltip:"Excalidraw"})}),r.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[r.jsx(u.DialogTitle,{children:"Excalidraw"}),r.jsxs("div",{style:{height:"100%",borderWidth:1},children:[p&&r.jsx("p",{children:"Loading..."}),c&&r.jsx("p",{children:c&&c.message||"Error"}),r.jsx("div",{ref:S,style:{width:"100%",height:600},children:!p&&!c&&i?r.jsx(i,{initialData:f,langCode:"en",onChange:b,ref:j,...n.excalidrawProps}):null})]}),r.jsx(u.DialogFooter,{children:r.jsx(u.Button,{onClick:T,type:"button",children:"Save changes"})})]})]})},G="_wrap_15k3c_1",Y="_renderWrap_15k3c_7",J="_handlerWrap_15k3c_30",v={wrap:G,renderWrap:Y,handlerWrap:J},K=10,Q=200,C=15,O={width:"100%",height:"100%",maxWidth:"100%"};function ee({editor:e,node:n,updateAttributes:i}){const l=a.useRef(null),o=e.isActive(k.name),{data:d,width:f,height:m}=n.attrs,[g,h]=a.useState(null),[p,E]=a.useState(!0),[c,A]=a.useState(null),[S,j]=a.useState(100),b=a.useCallback(t=>()=>{j(s=>u.clamp(t==="minus"?s-C:s+C,K,Q))},[]);a.useEffect(()=>{let t=!1;return import("@excalidraw/excalidraw").then(s=>{t||(l.current=s.exportToSvg)}).catch(s=>!t&&A(s)).finally(()=>!t&&E(!1)),()=>{t=!0}},[d]),a.useEffect(()=>{let t=!1;return(async()=>{if(!l.current||t||p||c||!d)return;const w=await l.current(d);t||(w.setAttribute("width","100%"),w.setAttribute("height","100%"),w.setAttribute("display","block"),h(w))})(),()=>{t=!0}},[d,p,c]);const T=t=>{i({width:t.width,height:t.height})};return r.jsx(x.NodeViewWrapper,{className:x.clsx(v.wrap,o&&v.isActive),children:r.jsx(V.Resizable,{size:{width:Number.parseInt(f),height:Number.parseInt(m)},onResizeStop:(t,s,w,I)=>{T({width:Number.parseInt(f)+I.width,height:Number.parseInt(m)+I.height})},children:r.jsxs("div",{className:x.clsx(v.renderWrap,"render-wrapper"),style:{...O,overflow:"hidden"},children:[c&&r.jsx("div",{style:O,children:r.jsx("p",{children:c.message||c})}),p&&r.jsx("p",{children:"Loading..."}),!p&&!c&&g&&r.jsx("div",{dangerouslySetInnerHTML:{__html:(g==null?void 0:g.outerHTML)??""},style:{height:"100%",maxHeight:"100%",padding:24,overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",transform:`scale(${S/100})`,transition:"all ease-in-out .3s"}}),r.jsxs("div",{className:v.handlerWrap,children:[r.jsx(u.ActionButton,{action:b("minus"),icon:"ZoomOut",tooltip:"Zoom Out"}),r.jsx(u.ActionButton,{action:b("plus"),icon:"ZoomIn",tooltip:"Zoom In"})]})]})})})}const R={elements:[]},k=_.Node.create({name:"excalidraw",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addAttributes(){return{defaultShowPicker:{default:!1},createUser:{default:null},width:{default:"100%",parseHTML:x.getDatasetAttribute("width")},height:{default:240,parseHTML:x.getDatasetAttribute("height")},data:{default:R,parseHTML:x.getDatasetAttribute("data",!0)}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"excalidraw"},excalidrawProps:{},button:({editor:n})=>({component:F,componentProps:{editor:n}})}},parseHTML(){return[{tag:"div[class=excalidraw]"}]},renderHTML({HTMLAttributes:e,node:n}){return["div",_.mergeAttributes(this.options.HTMLAttributes,e,x.nodeAttrsToDataset(n))]},addCommands(){return{setExcalidraw:e=>({tr:n,commands:i,chain:l})=>{var o,d,f;return e=e||{},e.data=e.data||R,((f=(d=(o=n.selection)==null?void 0:o.node)==null?void 0:d.type)==null?void 0:f.name)==this.name?i.updateAttributes(this.name,e):l().insertContent({type:this.name,attrs:e}).run()}}},addNodeView(){return x.ReactNodeViewRenderer(ee)},addInputRules(){return[_.nodeInputRule({find:/^\$excalidraw\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]}});exports.Excalidraw=k;exports.triggerOpenExcalidrawSettingModal=X;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-ByRfqzMr.cjs");require("./dom-dataset-Byuf1YmW.cjs");const e=require("./Excalidraw-Be_GDV4Q.cjs");exports.Excalidraw=e.Excalidraw;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-ByRfqzMr.cjs");require("./dom-dataset-Byuf1YmW.cjs");const e=require("./Excalidraw-DOJiMnFl.cjs");exports.Excalidraw=e.Excalidraw;
@@ -45,11 +45,9 @@ declare module '@tiptap/core' {
45
45
 
46
46
  declare module '@tiptap/core' {
47
47
  interface Commands<ReturnType> {
48
- emoji: {
49
- setEmoji: (emoji: {
50
- name: string;
51
- emoji: string;
52
- }) => ReturnType;
48
+ drawer: {
49
+ setDrawer: (options: any, replace?: any) => ReturnType;
50
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
53
51
  };
54
52
  }
55
53
  }
@@ -57,9 +55,11 @@ declare module '@tiptap/core' {
57
55
 
58
56
  declare module '@tiptap/core' {
59
57
  interface Commands<ReturnType> {
60
- drawer: {
61
- setDrawer: (options: any, replace?: any) => ReturnType;
62
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
58
+ emoji: {
59
+ setEmoji: (emoji: {
60
+ name: string;
61
+ emoji: string;
62
+ }) => ReturnType;
63
63
  };
64
64
  }
65
65
  }
@@ -110,6 +110,21 @@ declare module '@tiptap/core' {
110
110
  }
111
111
 
112
112
 
113
+ declare module '@tiptap/core' {
114
+ interface Commands<ReturnType> {
115
+ iframe: {
116
+ /**
117
+ * Add an iframe
118
+ */
119
+ setIframe: (options: {
120
+ src: string;
121
+ service: string;
122
+ }) => ReturnType;
123
+ };
124
+ }
125
+ }
126
+
127
+
113
128
  declare module '@tiptap/core' {
114
129
  interface Commands<ReturnType> {
115
130
  imageUpload: {
@@ -130,21 +145,6 @@ declare module '@tiptap/core' {
130
145
  }
131
146
 
132
147
 
133
- declare module '@tiptap/core' {
134
- interface Commands<ReturnType> {
135
- iframe: {
136
- /**
137
- * Add an iframe
138
- */
139
- setIframe: (options: {
140
- src: string;
141
- service: string;
142
- }) => ReturnType;
143
- };
144
- }
145
- }
146
-
147
-
148
148
  declare module '@tiptap/core' {
149
149
  interface Commands<ReturnType> {
150
150
  imageGifUpload: {
@@ -183,9 +183,8 @@ declare module '@tiptap/core' {
183
183
 
184
184
  declare module '@tiptap/core' {
185
185
  interface Commands<ReturnType> {
186
- lineHeight: {
187
- setLineHeight: (lineHeight: string) => ReturnType;
188
- unsetLineHeight: () => ReturnType;
186
+ katex: {
187
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
189
188
  };
190
189
  }
191
190
  }
@@ -193,8 +192,9 @@ declare module '@tiptap/core' {
193
192
 
194
193
  declare module '@tiptap/core' {
195
194
  interface Commands<ReturnType> {
196
- katex: {
197
- setKatex: (arg?: IKatexAttrs) => ReturnType;
195
+ lineHeight: {
196
+ setLineHeight: (lineHeight: string) => ReturnType;
197
+ unsetLineHeight: () => ReturnType;
198
198
  };
199
199
  }
200
200
  }
@@ -251,14 +251,15 @@ declare module '@tiptap/core' {
251
251
 
252
252
  declare module '@tiptap/core' {
253
253
  interface Commands<ReturnType> {
254
- twitter: {
254
+ video: {
255
255
  /**
256
- * Insert a tweet
257
- * @param options The tweet attributes
258
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
256
+ * Add an video
259
257
  */
260
- setTweet: (options: SetTweetOptions) => ReturnType;
261
- updateTweet: (options: SetTweetOptions) => ReturnType;
258
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
259
+ /**
260
+ * Update an video
261
+ */
262
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
262
263
  };
263
264
  }
264
265
  }
@@ -266,15 +267,14 @@ declare module '@tiptap/core' {
266
267
 
267
268
  declare module '@tiptap/core' {
268
269
  interface Commands<ReturnType> {
269
- video: {
270
- /**
271
- * Add an video
272
- */
273
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
270
+ twitter: {
274
271
  /**
275
- * Update an video
272
+ * Insert a tweet
273
+ * @param options The tweet attributes
274
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
276
275
  */
277
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
276
+ setTweet: (options: SetTweetOptions) => ReturnType;
277
+ updateTweet: (options: SetTweetOptions) => ReturnType;
278
278
  };
279
279
  }
280
280
  }