@remarkablejames/editor 0.0.1

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 (456) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/lib/ActionMenuButton-B0EHT9CC.js +35 -0
  4. package/lib/ActionMenuButton-J1el_e6Z.cjs +1 -0
  5. package/lib/Attachment.cjs +19 -0
  6. package/lib/Attachment.js +273 -0
  7. package/lib/Blockquote.cjs +5 -0
  8. package/lib/Blockquote.js +107 -0
  9. package/lib/Bold.cjs +1 -0
  10. package/lib/Bold.js +123 -0
  11. package/lib/BulletList.cjs +1 -0
  12. package/lib/BulletList.js +53 -0
  13. package/lib/Callout.cjs +1 -0
  14. package/lib/Callout.js +225 -0
  15. package/lib/Clear.cjs +1 -0
  16. package/lib/Clear.js +49 -0
  17. package/lib/Code.cjs +1 -0
  18. package/lib/Code.js +100 -0
  19. package/lib/CodeBlock.cjs +44 -0
  20. package/lib/CodeBlock.js +4065 -0
  21. package/lib/CodeView.cjs +1 -0
  22. package/lib/CodeView.js +81 -0
  23. package/lib/Color.cjs +1 -0
  24. package/lib/Color.js +134 -0
  25. package/lib/Column.cjs +1 -0
  26. package/lib/Column.js +230 -0
  27. package/lib/Drawer-BCWVN-4l.js +1125 -0
  28. package/lib/Drawer-BTouEroZ.cjs +2 -0
  29. package/lib/Drawer.cjs +1 -0
  30. package/lib/Drawer.js +7 -0
  31. package/lib/Emoji.cjs +1 -0
  32. package/lib/Emoji.js +19888 -0
  33. package/lib/Excalidraw.cjs +1 -0
  34. package/lib/Excalidraw.js +276 -0
  35. package/lib/ExportPdf.cjs +39 -0
  36. package/lib/ExportPdf.js +142 -0
  37. package/lib/ExportWord.cjs +1 -0
  38. package/lib/ExportWord.js +107 -0
  39. package/lib/FontFamily.cjs +1 -0
  40. package/lib/FontFamily.js +84 -0
  41. package/lib/FontSize.cjs +1 -0
  42. package/lib/FontSize.js +106 -0
  43. package/lib/Heading.cjs +1 -0
  44. package/lib/Heading.js +167 -0
  45. package/lib/Highlight.cjs +1 -0
  46. package/lib/Highlight.js +203 -0
  47. package/lib/History.cjs +1 -0
  48. package/lib/History.js +990 -0
  49. package/lib/HorizontalRule.cjs +1 -0
  50. package/lib/HorizontalRule.js +118 -0
  51. package/lib/Iframe-BdgiWGml.js +416 -0
  52. package/lib/Iframe-BfBLILDA.cjs +1 -0
  53. package/lib/Iframe.cjs +1 -0
  54. package/lib/Iframe.js +7 -0
  55. package/lib/Image.cjs +1 -0
  56. package/lib/Image.js +6 -0
  57. package/lib/ImageGif.cjs +1 -0
  58. package/lib/ImageGif.js +400 -0
  59. package/lib/ImportWord.cjs +1 -0
  60. package/lib/ImportWord.js +145 -0
  61. package/lib/Indent-BpMcZKok.js +148 -0
  62. package/lib/Indent-Dvqz_WEn.cjs +1 -0
  63. package/lib/Indent.cjs +1 -0
  64. package/lib/Indent.js +6 -0
  65. package/lib/Italic.cjs +1 -0
  66. package/lib/Italic.js +123 -0
  67. package/lib/Katex-B8_uprkO.js +2753 -0
  68. package/lib/Katex-BQyeCeQ0.cjs +4 -0
  69. package/lib/Katex.cjs +1 -0
  70. package/lib/Katex.js +6 -0
  71. package/lib/LineHeight.cjs +1 -0
  72. package/lib/LineHeight.js +89 -0
  73. package/lib/Link.cjs +1 -0
  74. package/lib/Link.js +6 -0
  75. package/lib/LinkEditBlock-BX0fXXpF.js +1185 -0
  76. package/lib/LinkEditBlock-CIshn_8F.cjs +5 -0
  77. package/lib/Mention.cjs +1 -0
  78. package/lib/Mention.js +265 -0
  79. package/lib/Mermaid-0GiGVxn0.cjs +2 -0
  80. package/lib/Mermaid-D8bbIgAl.js +381 -0
  81. package/lib/Mermaid.cjs +1 -0
  82. package/lib/Mermaid.js +7 -0
  83. package/lib/MoreMark.cjs +1 -0
  84. package/lib/MoreMark.js +157 -0
  85. package/lib/OrderedList.cjs +1 -0
  86. package/lib/OrderedList.js +52 -0
  87. package/lib/SearchAndReplace.cjs +1 -0
  88. package/lib/SearchAndReplace.js +305 -0
  89. package/lib/SlashCommand.cjs +1 -0
  90. package/lib/SlashCommand.js +90 -0
  91. package/lib/SlashCommandNodeView-BcmtKbEE.js +249 -0
  92. package/lib/SlashCommandNodeView-rDJ7OjRd.cjs +1 -0
  93. package/lib/Strike.cjs +1 -0
  94. package/lib/Strike.js +112 -0
  95. package/lib/Table-BEhNBeuA.cjs +5 -0
  96. package/lib/Table-DbxuP5xh.js +1939 -0
  97. package/lib/Table.cjs +1 -0
  98. package/lib/Table.js +5 -0
  99. package/lib/TaskList.cjs +1 -0
  100. package/lib/TaskList.js +63 -0
  101. package/lib/TextAlign.cjs +1 -0
  102. package/lib/TextAlign.js +165 -0
  103. package/lib/TextDirection.cjs +1 -0
  104. package/lib/TextDirection.js +110 -0
  105. package/lib/TextUnderline.cjs +1 -0
  106. package/lib/TextUnderline.js +115 -0
  107. package/lib/Twitter-9I6BLNmg.js +1666 -0
  108. package/lib/Twitter-BuEBgpi9.cjs +1 -0
  109. package/lib/Twitter.cjs +1 -0
  110. package/lib/Twitter.js +6 -0
  111. package/lib/Video.cjs +1 -0
  112. package/lib/Video.js +7 -0
  113. package/lib/bubble.cjs +3 -0
  114. package/lib/bubble.d.ts +1 -0
  115. package/lib/bubble.js +9533 -0
  116. package/lib/clsx-CDyrfCnw.js +7391 -0
  117. package/lib/clsx-CXbNJWDD.cjs +54 -0
  118. package/lib/components/ActionButton.d.ts +23 -0
  119. package/lib/components/ActionMenuButton.d.ts +28 -0
  120. package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -0
  121. package/lib/components/Bubble/RichTextBubbleColumns.d.ts +1 -0
  122. package/lib/components/Bubble/RichTextBubbleDrawer.d.ts +1 -0
  123. package/lib/components/Bubble/RichTextBubbleExcalidraw.d.ts +1 -0
  124. package/lib/components/Bubble/RichTextBubbleIframe.d.ts +1 -0
  125. package/lib/components/Bubble/RichTextBubbleKatex.d.ts +1 -0
  126. package/lib/components/Bubble/RichTextBubbleLink.d.ts +6 -0
  127. package/lib/components/Bubble/RichTextBubbleMedia.d.ts +4 -0
  128. package/lib/components/Bubble/RichTextBubbleMenuDragHandle.d.ts +1 -0
  129. package/lib/components/Bubble/RichTextBubbleMermaid.d.ts +1 -0
  130. package/lib/components/Bubble/RichTextBubbleTable.d.ts +5 -0
  131. package/lib/components/Bubble/RichTextBubbleText.d.ts +5 -0
  132. package/lib/components/Bubble/RichTextBubbleTwitter.d.ts +1 -0
  133. package/lib/components/Bubble/formatBubble.d.ts +55 -0
  134. package/lib/components/Bubble/index.d.ts +13 -0
  135. package/lib/components/ColorPicker.d.ts +11 -0
  136. package/lib/components/ReactBus.d.ts +11 -0
  137. package/lib/components/RichTextProvider.d.ts +8 -0
  138. package/lib/components/SizeSetter/SizeSetter.d.ts +13 -0
  139. package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -0
  140. package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -0
  141. package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +5 -0
  142. package/lib/components/icons/Activity.d.ts +2 -0
  143. package/lib/components/icons/Animas.d.ts +2 -0
  144. package/lib/components/icons/AspectRatio.d.ts +2 -0
  145. package/lib/components/icons/Blockquote.d.ts +2 -0
  146. package/lib/components/icons/CodeView.d.ts +1 -0
  147. package/lib/components/icons/ColumnAddLeft.d.ts +1 -0
  148. package/lib/components/icons/ColumnAddRight.d.ts +1 -0
  149. package/lib/components/icons/DeleteColumn.d.ts +2 -0
  150. package/lib/components/icons/DeleteRow.d.ts +2 -0
  151. package/lib/components/icons/Direction.d.ts +1 -0
  152. package/lib/components/icons/Excalidraw.d.ts +1 -0
  153. package/lib/components/icons/ExportPdf.d.ts +1 -0
  154. package/lib/components/icons/ExportWord.d.ts +2 -0
  155. package/lib/components/icons/FileWordOutline.d.ts +2 -0
  156. package/lib/components/icons/Flag.d.ts +2 -0
  157. package/lib/components/icons/Food.d.ts +2 -0
  158. package/lib/components/icons/GIfIcon.d.ts +1 -0
  159. package/lib/components/icons/Html.d.ts +1 -0
  160. package/lib/components/icons/Icon.d.ts +8 -0
  161. package/lib/components/icons/IconColorFill.d.ts +5 -0
  162. package/lib/components/icons/IconHighlightFill.d.ts +3 -0
  163. package/lib/components/icons/ImportWord.d.ts +2 -0
  164. package/lib/components/icons/LeftToRight.d.ts +1 -0
  165. package/lib/components/icons/LineHeight.d.ts +2 -0
  166. package/lib/components/icons/MenuDown.d.ts +2 -0
  167. package/lib/components/icons/Mermaid.d.ts +1 -0
  168. package/lib/components/icons/NoFill.d.ts +1 -0
  169. package/lib/components/icons/Object.d.ts +2 -0
  170. package/lib/components/icons/RightToLeft.d.ts +1 -0
  171. package/lib/components/icons/SizeL.d.ts +2 -0
  172. package/lib/components/icons/SizeM.d.ts +2 -0
  173. package/lib/components/icons/SizeS.d.ts +2 -0
  174. package/lib/components/icons/Symbol.d.ts +2 -0
  175. package/lib/components/icons/Travel.d.ts +2 -0
  176. package/lib/components/icons/Twitter.d.ts +1 -0
  177. package/lib/components/icons/icons.d.ts +1 -0
  178. package/lib/components/icons/index.d.ts +12 -0
  179. package/lib/components/index.d.ts +6 -0
  180. package/lib/components/ui/button.d.ts +11 -0
  181. package/lib/components/ui/checkbox.d.ts +4 -0
  182. package/lib/components/ui/dialog.d.ts +19 -0
  183. package/lib/components/ui/dropdown-menu.d.ts +27 -0
  184. package/lib/components/ui/emoji-picker.d.ts +7 -0
  185. package/lib/components/ui/index.d.ts +15 -0
  186. package/lib/components/ui/input.d.ts +5 -0
  187. package/lib/components/ui/label.d.ts +5 -0
  188. package/lib/components/ui/popover.d.ts +6 -0
  189. package/lib/components/ui/select.d.ts +13 -0
  190. package/lib/components/ui/separator.d.ts +4 -0
  191. package/lib/components/ui/switch.d.ts +4 -0
  192. package/lib/components/ui/tabs.d.ts +7 -0
  193. package/lib/components/ui/textarea.d.ts +5 -0
  194. package/lib/components/ui/toast.d.ts +15 -0
  195. package/lib/components/ui/toaster.d.ts +1 -0
  196. package/lib/components/ui/toggle.d.ts +12 -0
  197. package/lib/components/ui/tooltip.d.ts +7 -0
  198. package/lib/components/ui/use-toast.d.ts +44 -0
  199. package/lib/constants/index.d.ts +47 -0
  200. package/lib/constants/resetCSS.d.ts +1 -0
  201. package/lib/delete-node-CosiBes5.cjs +1 -0
  202. package/lib/delete-node-eQHsyyhR.js +24 -0
  203. package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
  204. package/lib/dom-dataset-CIEeltF6.js +47 -0
  205. package/lib/dropdown-menu-Bs69ZBbO.js +143 -0
  206. package/lib/dropdown-menu-DjWlG2-J.cjs +1 -0
  207. package/lib/extensions/Attachment/Attachment.d.ts +15 -0
  208. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIcon.d.ts +1 -0
  209. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIconString.d.ts +1 -0
  210. package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -0
  211. package/lib/extensions/Attachment/components/RichTextAttachment.d.ts +1 -0
  212. package/lib/extensions/Attachment/index.d.ts +1 -0
  213. package/lib/extensions/Blockquote/Blockquote.d.ts +6 -0
  214. package/lib/extensions/Blockquote/components/RichTextBlockquote.d.ts +1 -0
  215. package/lib/extensions/Blockquote/index.d.ts +1 -0
  216. package/lib/extensions/Bold/Bold.d.ts +6 -0
  217. package/lib/extensions/Bold/components/RichTextBold.d.ts +1 -0
  218. package/lib/extensions/Bold/index.d.ts +1 -0
  219. package/lib/extensions/BulletList/BulletList.d.ts +6 -0
  220. package/lib/extensions/BulletList/components/RichTextBulletList.d.ts +1 -0
  221. package/lib/extensions/BulletList/index.d.ts +1 -0
  222. package/lib/extensions/Callout/Callout.d.ts +18 -0
  223. package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -0
  224. package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -0
  225. package/lib/extensions/Callout/index.d.ts +1 -0
  226. package/lib/extensions/Clear/Clear.d.ts +6 -0
  227. package/lib/extensions/Clear/components/RichTextClear.d.ts +1 -0
  228. package/lib/extensions/Clear/index.d.ts +1 -0
  229. package/lib/extensions/Code/Code.d.ts +6 -0
  230. package/lib/extensions/Code/components/RichTextCode.d.ts +1 -0
  231. package/lib/extensions/Code/index.d.ts +1 -0
  232. package/lib/extensions/CodeBlock/CodeBlock.d.ts +21 -0
  233. package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +1 -0
  234. package/lib/extensions/CodeBlock/components/RichTextCodeBlock.d.ts +1 -0
  235. package/lib/extensions/CodeBlock/index.d.ts +1 -0
  236. package/lib/extensions/CodeView/CodeView.d.ts +17 -0
  237. package/lib/extensions/CodeView/components/RichTextCodeView.d.ts +1 -0
  238. package/lib/extensions/CodeView/index.d.ts +1 -0
  239. package/lib/extensions/Color/Color.d.ts +22 -0
  240. package/lib/extensions/Color/components/RichTextColor.d.ts +1 -0
  241. package/lib/extensions/Color/index.d.ts +1 -0
  242. package/lib/extensions/Column/Column.d.ts +17 -0
  243. package/lib/extensions/Column/components/RichTextColumn.d.ts +1 -0
  244. package/lib/extensions/Column/index.d.ts +1 -0
  245. package/lib/extensions/Drawer/Drawer.d.ts +15 -0
  246. package/lib/extensions/Drawer/components/ControlDrawer/ControlDrawer.d.ts +2 -0
  247. package/lib/extensions/Drawer/components/ControlDrawer/icon.d.ts +28 -0
  248. package/lib/extensions/Drawer/components/EditDrawerBlock.d.ts +1 -0
  249. package/lib/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.d.ts +1 -0
  250. package/lib/extensions/Drawer/components/RichTextDrawer.d.ts +1 -0
  251. package/lib/extensions/Drawer/index.d.ts +1 -0
  252. package/lib/extensions/Emoji/Emoji.d.ts +5 -0
  253. package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +11 -0
  254. package/lib/extensions/Emoji/components/RichTextEmoji.d.ts +1 -0
  255. package/lib/extensions/Emoji/index.d.ts +1 -0
  256. package/lib/extensions/Excalidraw/Excalidraw.d.ts +17 -0
  257. package/lib/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.d.ts +2 -0
  258. package/lib/extensions/Excalidraw/components/RichTextExcalidraw.d.ts +1 -0
  259. package/lib/extensions/Excalidraw/index.d.ts +1 -0
  260. package/lib/extensions/ExportPdf/ExportPdf.d.ts +21 -0
  261. package/lib/extensions/ExportPdf/components/RichTextExportPdf.d.ts +1 -0
  262. package/lib/extensions/ExportPdf/index.d.ts +1 -0
  263. package/lib/extensions/ExportWord/ExportWord.d.ts +13 -0
  264. package/lib/extensions/ExportWord/components/RichTextExportWord.d.ts +1 -0
  265. package/lib/extensions/ExportWord/index.d.ts +1 -0
  266. package/lib/extensions/FontFamily/FontFamily.d.ts +10 -0
  267. package/lib/extensions/FontFamily/components/RichTextFontFamily.d.ts +15 -0
  268. package/lib/extensions/FontFamily/index.d.ts +1 -0
  269. package/lib/extensions/FontSize/FontSize.d.ts +32 -0
  270. package/lib/extensions/FontSize/components/RichTextFontSize.d.ts +12 -0
  271. package/lib/extensions/FontSize/index.d.ts +1 -0
  272. package/lib/extensions/Heading/Heading.d.ts +6 -0
  273. package/lib/extensions/Heading/components/RichTextHeading.d.ts +15 -0
  274. package/lib/extensions/Heading/index.d.ts +1 -0
  275. package/lib/extensions/Highlight/Highlight.d.ts +18 -0
  276. package/lib/extensions/Highlight/components/RichTextHighlight.d.ts +1 -0
  277. package/lib/extensions/Highlight/index.d.ts +1 -0
  278. package/lib/extensions/History/History.d.ts +6 -0
  279. package/lib/extensions/History/components/RichTextHistory.d.ts +2 -0
  280. package/lib/extensions/History/index.d.ts +1 -0
  281. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
  282. package/lib/extensions/HorizontalRule/components/RichTextHorizontalRule.d.ts +1 -0
  283. package/lib/extensions/HorizontalRule/index.d.ts +1 -0
  284. package/lib/extensions/Iframe/Iframe.d.ts +16 -0
  285. package/lib/extensions/Iframe/components/IframeNodeView.d.ts +2 -0
  286. package/lib/extensions/Iframe/components/RichTextIframe.d.ts +1 -0
  287. package/lib/extensions/Iframe/index.d.ts +1 -0
  288. package/lib/extensions/Iframe/utils.d.ts +9 -0
  289. package/lib/extensions/Image/Image.d.ts +64 -0
  290. package/lib/extensions/Image/components/ImageCropper.d.ts +1 -0
  291. package/lib/extensions/Image/components/ImageView.d.ts +2 -0
  292. package/lib/extensions/Image/components/RichTextImage.d.ts +1 -0
  293. package/lib/extensions/Image/index.d.ts +1 -0
  294. package/lib/extensions/ImageGif/ImageGif.d.ts +39 -0
  295. package/lib/extensions/ImageGif/components/ImageGifView.d.ts +2 -0
  296. package/lib/extensions/ImageGif/components/RichTextImageGif.d.ts +1 -0
  297. package/lib/extensions/ImageGif/components/services.d.ts +458 -0
  298. package/lib/extensions/ImageGif/index.d.ts +1 -0
  299. package/lib/extensions/ImportWord/ImportWord.d.ts +18 -0
  300. package/lib/extensions/ImportWord/components/RichTextImportWord.d.ts +1 -0
  301. package/lib/extensions/ImportWord/index.d.ts +1 -0
  302. package/lib/extensions/Indent/Indent.d.ts +23 -0
  303. package/lib/extensions/Indent/components/RichTextIndent.d.ts +1 -0
  304. package/lib/extensions/Indent/index.d.ts +1 -0
  305. package/lib/extensions/Italic/Italic.d.ts +6 -0
  306. package/lib/extensions/Italic/components/RichTextItalic.d.ts +1 -0
  307. package/lib/extensions/Italic/index.d.ts +1 -0
  308. package/lib/extensions/Katex/Katex.d.ts +17 -0
  309. package/lib/extensions/Katex/components/KatexWrapper.d.ts +1 -0
  310. package/lib/extensions/Katex/components/RichTextKatex.d.ts +1 -0
  311. package/lib/extensions/Katex/index.d.ts +1 -0
  312. package/lib/extensions/LineHeight/LineHeight.d.ts +7 -0
  313. package/lib/extensions/LineHeight/components/RichTextLightHeight.d.ts +1 -0
  314. package/lib/extensions/LineHeight/index.d.ts +1 -0
  315. package/lib/extensions/Link/Link.d.ts +6 -0
  316. package/lib/extensions/Link/components/LinkEditBlock.d.ts +9 -0
  317. package/lib/extensions/Link/components/LinkViewBlock.d.ts +8 -0
  318. package/lib/extensions/Link/components/RichTextLink.d.ts +1 -0
  319. package/lib/extensions/Link/index.d.ts +1 -0
  320. package/lib/extensions/Mention/Mention.d.ts +3 -0
  321. package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +16 -0
  322. package/lib/extensions/Mention/index.d.ts +1 -0
  323. package/lib/extensions/Mermaid/Mermaid.d.ts +27 -0
  324. package/lib/extensions/Mermaid/components/EditMermaidBlock.d.ts +9 -0
  325. package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +9 -0
  326. package/lib/extensions/Mermaid/components/RichTextMermaid.d.ts +1 -0
  327. package/lib/extensions/Mermaid/index.d.ts +1 -0
  328. package/lib/extensions/MoreMark/MoreMark.d.ts +20 -0
  329. package/lib/extensions/MoreMark/components/RichTextMoreMark.d.ts +14 -0
  330. package/lib/extensions/MoreMark/index.d.ts +1 -0
  331. package/lib/extensions/OrderedList/OrderedList.d.ts +6 -0
  332. package/lib/extensions/OrderedList/components/RichTextOrderedList.d.ts +1 -0
  333. package/lib/extensions/OrderedList/index.d.ts +1 -0
  334. package/lib/extensions/SearchAndReplace/SearchAndReplace.d.ts +36 -0
  335. package/lib/extensions/SearchAndReplace/components/RichTextSearchAndReplace.d.ts +1 -0
  336. package/lib/extensions/SearchAndReplace/index.d.ts +1 -0
  337. package/lib/extensions/SlashCommand/SlashCommand.d.ts +4 -0
  338. package/lib/extensions/SlashCommand/components/SlashCommandList.d.ts +6 -0
  339. package/lib/extensions/SlashCommand/components/SlashCommandNodeView.d.ts +3 -0
  340. package/lib/extensions/SlashCommand/index.d.ts +1 -0
  341. package/lib/extensions/SlashCommand/renderCommandListDefault.d.ts +7 -0
  342. package/lib/extensions/SlashCommand/types.d.ts +20 -0
  343. package/lib/extensions/Strike/Strike.d.ts +6 -0
  344. package/lib/extensions/Strike/components/RichTextStrike.d.ts +1 -0
  345. package/lib/extensions/Strike/index.d.ts +1 -0
  346. package/lib/extensions/Table/Table.d.ts +21 -0
  347. package/lib/extensions/Table/TableCellBackground.d.ts +14 -0
  348. package/lib/extensions/Table/components/CreateTablePopover.d.ts +7 -0
  349. package/lib/extensions/Table/components/RichTextTable.d.ts +1 -0
  350. package/lib/extensions/Table/index.d.ts +1 -0
  351. package/lib/extensions/TaskList/TaskList.d.ts +11 -0
  352. package/lib/extensions/TaskList/components/RichTextTaskList.d.ts +1 -0
  353. package/lib/extensions/TaskList/index.d.ts +1 -0
  354. package/lib/extensions/TextAlign/TextAlign.d.ts +17 -0
  355. package/lib/extensions/TextAlign/components/RichTextAlign.d.ts +14 -0
  356. package/lib/extensions/TextAlign/index.d.ts +1 -0
  357. package/lib/extensions/TextDirection/TextDirection.d.ts +5 -0
  358. package/lib/extensions/TextDirection/components/RichTextTextDirection.d.ts +15 -0
  359. package/lib/extensions/TextDirection/index.d.ts +1 -0
  360. package/lib/extensions/TextUnderline/TextUnderline.d.ts +6 -0
  361. package/lib/extensions/TextUnderline/components/RichTextUnderline.d.ts +1 -0
  362. package/lib/extensions/TextUnderline/index.d.ts +1 -0
  363. package/lib/extensions/Twitter/Twitter.d.ts +46 -0
  364. package/lib/extensions/Twitter/components/FormEditLinkTwitter.d.ts +6 -0
  365. package/lib/extensions/Twitter/components/NodeViewTweet.d.ts +8 -0
  366. package/lib/extensions/Twitter/components/RichTextTwitter.d.ts +1 -0
  367. package/lib/extensions/Twitter/index.d.ts +1 -0
  368. package/lib/extensions/Video/Video.d.ts +66 -0
  369. package/lib/extensions/Video/components/RichTextVideo.d.ts +1 -0
  370. package/lib/extensions/Video/index.d.ts +1 -0
  371. package/lib/hooks/useActive.d.ts +21 -0
  372. package/lib/hooks/useAttributes.d.ts +2 -0
  373. package/lib/hooks/useButtonProps.d.ts +1 -0
  374. package/lib/hooks/useCopy.d.ts +5 -0
  375. package/lib/hooks/useExtension.d.ts +1 -0
  376. package/lib/hooks/useLocalStorage.d.ts +13 -0
  377. package/lib/index-4Q5IhypJ.js +1349 -0
  378. package/lib/index-BCzvbrf5.cjs +12 -0
  379. package/lib/index-BG0kQamI.js +285 -0
  380. package/lib/index-C-tDsIKJ.js +1631 -0
  381. package/lib/index-C1WCZhyA.js +237 -0
  382. package/lib/index-CjhjjJsN.cjs +1 -0
  383. package/lib/index-Cs6cp0Y6.cjs +1 -0
  384. package/lib/index-CsSfYR30.js +1351 -0
  385. package/lib/index-D9oM__YW.cjs +1 -0
  386. package/lib/index-DjDf4BK8.js +707 -0
  387. package/lib/index-NsYff_Ni.cjs +1 -0
  388. package/lib/index-bVGIXhRg.cjs +1 -0
  389. package/lib/index-lj3VWExo.js +4883 -0
  390. package/lib/index-neeeY2o7.cjs +4 -0
  391. package/lib/index.cjs +115 -0
  392. package/lib/index.d.ts +2 -0
  393. package/lib/index.js +338 -0
  394. package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
  395. package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
  396. package/lib/lib/utils.d.ts +2 -0
  397. package/lib/locale-bundle.cjs +1 -0
  398. package/lib/locale-bundle.d.ts +1 -0
  399. package/lib/locale-bundle.js +11 -0
  400. package/lib/locales/en.d.ts +196 -0
  401. package/lib/locales/fi.d.ts +196 -0
  402. package/lib/locales/hu.d.ts +196 -0
  403. package/lib/locales/index.d.ts +1198 -0
  404. package/lib/locales/pt-br.d.ts +196 -0
  405. package/lib/locales/vi.d.ts +196 -0
  406. package/lib/locales/zh-cn.d.ts +196 -0
  407. package/lib/plugins/image-upload.d.ts +13 -0
  408. package/lib/popover-CPr9bHYn.js +24 -0
  409. package/lib/popover-D-hUKDYu.cjs +1 -0
  410. package/lib/renderNodeView-BJSrgyGj.js +28 -0
  411. package/lib/renderNodeView-DfLmGrgA.cjs +1 -0
  412. package/lib/select-C2KF4RNg.cjs +1 -0
  413. package/lib/select-CuE_HaQJ.js +120 -0
  414. package/lib/separator-CHzYNMVt.js +293 -0
  415. package/lib/separator-_gvUNba_.cjs +1 -0
  416. package/lib/store/EditorEditableReactive.d.ts +1 -0
  417. package/lib/store/ThemeColorReactive.d.ts +1 -0
  418. package/lib/store/commandList.d.ts +2 -0
  419. package/lib/store/editor.d.ts +21 -0
  420. package/lib/store/store.d.ts +3 -0
  421. package/lib/style.css +1 -0
  422. package/lib/textarea-DZj6EY-N.cjs +1 -0
  423. package/lib/textarea-gEoNp9CA.js +20 -0
  424. package/lib/theme/theme.d.ts +369 -0
  425. package/lib/theme.cjs +1 -0
  426. package/lib/theme.js +395 -0
  427. package/lib/types.d.ts +230 -0
  428. package/lib/updatePosition-Cjuj2E26.cjs +1 -0
  429. package/lib/updatePosition-e90ZrFWW.js +16 -0
  430. package/lib/utils/base64.d.ts +2 -0
  431. package/lib/utils/checkIsVideoUrl.d.ts +1 -0
  432. package/lib/utils/color.d.ts +7 -0
  433. package/lib/utils/columns.d.ts +14 -0
  434. package/lib/utils/customEvents/events.constant.d.ts +6 -0
  435. package/lib/utils/delete-node.d.ts +2 -0
  436. package/lib/utils/dom-dataset.d.ts +28 -0
  437. package/lib/utils/download.d.ts +1 -0
  438. package/lib/utils/dynamicCSS.d.ts +25 -0
  439. package/lib/utils/editor-container-size.d.ts +4 -0
  440. package/lib/utils/file.d.ts +30 -0
  441. package/lib/utils/getRenderContainer.d.ts +3 -0
  442. package/lib/utils/indent.d.ts +14 -0
  443. package/lib/utils/is-mobile.d.ts +19 -0
  444. package/lib/utils/json.d.ts +2 -0
  445. package/lib/utils/lru-cache.d.ts +31 -0
  446. package/lib/utils/mitt.d.ts +24 -0
  447. package/lib/utils/node.d.ts +15 -0
  448. package/lib/utils/pdf.d.ts +3 -0
  449. package/lib/utils/plateform.d.ts +11 -0
  450. package/lib/utils/renderNodeView.d.ts +6 -0
  451. package/lib/utils/shortId.d.ts +1 -0
  452. package/lib/utils/storage.d.ts +2 -0
  453. package/lib/utils/updatePosition.d.ts +1 -0
  454. package/lib/utils/utils.d.ts +20 -0
  455. package/lib/utils/validateFile.d.ts +16 -0
  456. package/package.json +845 -0
package/lib/Bold.js ADDED
@@ -0,0 +1,123 @@
1
+ import { M as _, e as a, f as i, m as y } from "./clsx-CDyrfCnw.js";
2
+ import { h as d } from "./jsx-runtime-CT7Pcg-t.js";
3
+ import { u as f, d as M, A as l } from "./index-lj3VWExo.js";
4
+ import { jsx as u, Fragment as v } from "react/jsx-runtime";
5
+ import "react";
6
+ import "./theme.js";
7
+ var B = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, k = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, b = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, A = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, R = _.create({
8
+ name: "bold",
9
+ addOptions() {
10
+ return {
11
+ HTMLAttributes: {}
12
+ };
13
+ },
14
+ parseHTML() {
15
+ return [
16
+ {
17
+ tag: "strong"
18
+ },
19
+ {
20
+ tag: "b",
21
+ getAttrs: (t) => t.style.fontWeight !== "normal" && null
22
+ },
23
+ {
24
+ style: "font-weight=400",
25
+ clearMark: (t) => t.type.name === this.name
26
+ },
27
+ {
28
+ style: "font-weight",
29
+ getAttrs: (t) => /^(bold(er)?|[5-9]\d{2,})$/.test(t) && null
30
+ }
31
+ ];
32
+ },
33
+ renderHTML({ HTMLAttributes: t }) {
34
+ return /* @__PURE__ */ d("strong", { ...y(this.options.HTMLAttributes, t), children: /* @__PURE__ */ d("slot", {}) });
35
+ },
36
+ markdownTokenName: "strong",
37
+ parseMarkdown: (t, e) => e.applyMark("bold", e.parseInline(t.tokens || [])),
38
+ renderMarkdown: (t, e) => `**${e.renderChildren(t)}**`,
39
+ addCommands() {
40
+ return {
41
+ setBold: () => ({ commands: t }) => t.setMark(this.name),
42
+ toggleBold: () => ({ commands: t }) => t.toggleMark(this.name),
43
+ unsetBold: () => ({ commands: t }) => t.unsetMark(this.name)
44
+ };
45
+ },
46
+ addKeyboardShortcuts() {
47
+ return {
48
+ "Mod-b": () => this.editor.commands.toggleBold(),
49
+ "Mod-B": () => this.editor.commands.toggleBold()
50
+ };
51
+ },
52
+ addInputRules() {
53
+ return [
54
+ i({
55
+ find: B,
56
+ type: this.type
57
+ }),
58
+ i({
59
+ find: b,
60
+ type: this.type
61
+ })
62
+ ];
63
+ },
64
+ addPasteRules() {
65
+ return [
66
+ a({
67
+ find: k,
68
+ type: this.type
69
+ }),
70
+ a({
71
+ find: A,
72
+ type: this.type
73
+ })
74
+ ];
75
+ }
76
+ });
77
+ function K() {
78
+ const t = f(x.name), {
79
+ icon: e = void 0,
80
+ tooltip: o = void 0,
81
+ shortcutKeys: r = void 0,
82
+ tooltipOptions: p = {},
83
+ action: n = void 0,
84
+ isActive: m = void 0
85
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: c, disabled: s, update: g } = M(m), h = () => {
86
+ s || n && (n(), g());
87
+ };
88
+ return t ? /* @__PURE__ */ u(
89
+ l,
90
+ {
91
+ action: h,
92
+ dataState: c,
93
+ disabled: s,
94
+ icon: e,
95
+ shortcutKeys: r,
96
+ tooltip: o,
97
+ tooltipOptions: p
98
+ }
99
+ ) : /* @__PURE__ */ u(v, {});
100
+ }
101
+ const x = /* @__PURE__ */ R.extend({
102
+ //@ts-expect-error
103
+ addOptions() {
104
+ var t;
105
+ return {
106
+ ...(t = this.parent) == null ? void 0 : t.call(this),
107
+ button: ({ editor: e, t: o, extension: r }) => ({
108
+ component: l,
109
+ componentProps: {
110
+ action: () => e.commands.toggleBold(),
111
+ isActive: () => e.isActive("bold"),
112
+ icon: "Bold",
113
+ shortcutKeys: r.options.shortcutKeys ?? ["mod", "B"],
114
+ tooltip: o("editor.bold.tooltip")
115
+ }
116
+ })
117
+ };
118
+ }
119
+ });
120
+ export {
121
+ x as Bold,
122
+ K as RichTextBold
123
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BCzvbrf5.cjs"),s=require("react/jsx-runtime"),n=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");function g(){const t=n.useButtonProps(l.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:r={},action:c=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:u,update:p}=n.useToggleActive(d),m=()=>{u||c&&(c(),p())};return t?s.jsx(n.ActionButton,{action:m,dataState:a,disabled:u,icon:e,shortcutKeys:o,tooltip:i,tooltipOptions:r}):s.jsx(s.Fragment,{})}const l=v.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:o})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:o.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:i("editor.bulletlist.tooltip")}})}}});exports.BulletList=l;exports.RichTextBulletList=g;
@@ -0,0 +1,53 @@
1
+ import { B as d } from "./index-DjDf4BK8.js";
2
+ import { jsx as c, Fragment as m } from "react/jsx-runtime";
3
+ import { u as f, d as v, A } from "./index-lj3VWExo.js";
4
+ import "react";
5
+ import "./theme.js";
6
+ function y() {
7
+ const t = f(B.name), {
8
+ icon: o = void 0,
9
+ tooltip: i = void 0,
10
+ shortcutKeys: s = void 0,
11
+ tooltipOptions: r = {},
12
+ action: e = void 0,
13
+ isActive: l = void 0
14
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: n, update: a } = v(l), p = () => {
15
+ n || e && (e(), a());
16
+ };
17
+ return t ? /* @__PURE__ */ c(
18
+ A,
19
+ {
20
+ action: p,
21
+ dataState: u,
22
+ disabled: n,
23
+ icon: o,
24
+ shortcutKeys: s,
25
+ tooltip: i,
26
+ tooltipOptions: r
27
+ }
28
+ ) : /* @__PURE__ */ c(m, {});
29
+ }
30
+ const B = /* @__PURE__ */ d.extend({
31
+ //@ts-expect-error
32
+ addOptions() {
33
+ var t;
34
+ return {
35
+ ...(t = this.parent) == null ? void 0 : t.call(this),
36
+ button: ({ editor: o, t: i, extension: s }) => ({
37
+ // component: ActionButton,
38
+ componentProps: {
39
+ action: () => o.commands.toggleBulletList(),
40
+ isActive: () => o.isActive("bulletList"),
41
+ disabled: !1,
42
+ shortcutKeys: s.options.shortcutKeys ?? ["shift", "mod", "8"],
43
+ icon: "List",
44
+ tooltip: i("editor.bulletlist.tooltip")
45
+ }
46
+ })
47
+ };
48
+ }
49
+ });
50
+ export {
51
+ B as BulletList,
52
+ y as RichTextBulletList
53
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./clsx-CXbNJWDD.cjs"),o=require("./index-D9oM__YW.cjs"),t=require("react/jsx-runtime"),x=require("react");require("./theme.cjs");const c=require("lucide-react"),s=require("./select-C2KF4RNg.cjs"),k=require("./index-bVGIXhRg.cjs"),j=[{value:"note",label:"Note",icon:c.Info,color:"#1f6feb",background:"#1f6feb1f"},{value:"tip",label:"Tip",icon:c.Lightbulb,color:"#238636",background:"#2386361f"},{value:"important",label:"Important",icon:c.AlertCircle,color:"#ab7df8",background:"#ab7df81f"},{value:"warning",label:"Warning",icon:c.TriangleAlert,color:"#d29922",background:"#d299221f"},{value:"caution",label:"Caution",icon:c.OctagonAlert,color:"#f85149",background:"#f851491f"}];function q({node:e}){const{type:l="note",title:r="",body:u=""}=e.attrs,d=(j.find(h=>h.value===l)||j[0]).icon;return t.jsx(a.NodeViewWrapper,{children:t.jsxs("div",{className:a.clsx("richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",{"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]":l==="note","richtext-bg-[#2386361f] richtext-border-[#238636]":l==="tip","richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]":l==="important","richtext-bg-[#d299221f] richtext-border-[#d29922]":l==="warning","richtext-bg-[#f851491f] richtext-border-[#f85149]":l==="caution"}),children:[t.jsxs("div",{className:a.clsx("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2",{"richtext-text-[#1f6feb]":l==="note","richtext-text-[#238636]":l==="tip","richtext-text-[#ab7df8]":l==="important","richtext-text-[#d29922]":l==="warning","richtext-text-[#f85149]":l==="caution"}),children:[t.jsx(d,{className:"richtext-size-5"}),t.jsx("span",{className:"richtext-font-semibold",children:r})]}),u&&t.jsx("p",{className:"richtext-pl-[28px]",children:u})]})})}const w=[{value:"note",label:"Note",icon:"Info"},{value:"tip",label:"Tip",icon:"Lightbulb"},{value:"important",label:"Important",icon:"AlertCircle"},{value:"warning",label:"Warning",icon:"TriangleAlert"},{value:"caution",label:"Caution",icon:"OctagonAlert"}];function M(){const{t:e}=k.useLocale(),l=o.useEditorInstance(),r=o.useButtonProps(C.name),[u,n]=x.useState(!1),[d,h]=x.useState("note"),[b,g]=x.useState(""),[f,v]=x.useState(""),{icon:y=void 0,tooltip:T=void 0,shortcutKeys:A=void 0,tooltipOptions:L={},isActive:N=void 0}=(r==null?void 0:r.componentProps)??{},{dataState:S,disabled:m}=o.useToggleActive(N),I=()=>{l&&(l.chain().focus().setCallout({type:d,title:b,body:f}).run(),n(!1),h("note"),g(""),v(""))},O=()=>{m||n(!0)};return r?t.jsxs(o.Dialog,{onOpenChange:n,open:u,children:[t.jsx(o.DialogTrigger,{asChild:!0,children:t.jsx(o.ActionButton,{action:O,dataState:S,disabled:m,icon:y,shortcutKeys:A,tooltip:T,tooltipOptions:L})}),t.jsxs(o.DialogContent,{children:[t.jsx(o.DialogTitle,{children:e("editor.callout.dialog.title")}),t.jsxs("div",{className:"richtext-space-y-4 richtext-py-4",children:[t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.type")}),t.jsxs(s.Select,{onValueChange:h,value:d,children:[t.jsx(s.SelectTrigger,{children:t.jsx(s.SelectValue,{placeholder:e("editor.callout.dialog.type.placeholder")})}),t.jsx(s.SelectContent,{children:w.map(i=>t.jsx(s.SelectItem,{value:i.value,children:e(`editor.callout.type.${i.value}`)},i.value))})]})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.title.label")}),t.jsx(o.Input,{onChange:i=>g(i.target.value),placeholder:e("editor.callout.dialog.title.placeholder"),value:b})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.body.label")}),t.jsx(o.Input,{onChange:i=>v(i.target.value),placeholder:e("editor.callout.dialog.body.placeholder"),value:f})]})]}),t.jsxs(o.DialogFooter,{children:[t.jsx(o.Button,{onClick:()=>n(!1),variant:"outline",children:e("editor.callout.dialog.button.cancel")}),t.jsx(o.Button,{onClick:I,children:e("editor.callout.dialog.button.apply")})]})]})]}):t.jsx(t.Fragment,{})}function p(e){return l=>l.getAttribute(e)}const C=a.Node3.create({name:"callout",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"callout"},button:({editor:l,t:r})=>({component:o.ActionButton,componentProps:{action:()=>!0,isActive:()=>l.isActive("callout"),disabled:!1,icon:"Callout",tooltip:r("editor.callout.tooltip")}})}},parseHTML(){return[{tag:"div.callout"}]},renderHTML({HTMLAttributes:e}){return["div",a.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addAttributes(){return{type:{default:"",parseHTML:p("type")},title:{default:"",parseHTML:p("title")},body:{default:"",parseHTML:p("body")}}},addCommands(){return{setCallout:e=>({chain:l})=>l().insertContent({type:this.name,attrs:e}).run()}},addNodeView(){return a.ReactNodeViewRenderer(q)}});exports.Callout=C;exports.RichTextCallout=M;
package/lib/Callout.js ADDED
@@ -0,0 +1,225 @@
1
+ import { h as D, j as x, N as H, k as M, m as B } from "./clsx-CDyrfCnw.js";
2
+ import { h as V, u as j, d as P, D as E, m as R, A as T, n as W, o as F, L as u, j as v, p as U, B as C } from "./index-lj3VWExo.js";
3
+ import { jsx as o, jsxs as l, Fragment as Y } from "react/jsx-runtime";
4
+ import { useState as s } from "react";
5
+ import "./theme.js";
6
+ import { Info as _, Lightbulb as $, AlertCircle as z, TriangleAlert as K, OctagonAlert as q } from "lucide-react";
7
+ import { S as G, a as J, b as Q, c as X, d as Z } from "./select-CuE_HaQJ.js";
8
+ import { u as tt } from "./index-4Q5IhypJ.js";
9
+ const y = [
10
+ {
11
+ value: "note",
12
+ label: "Note",
13
+ icon: _,
14
+ color: "#1f6feb",
15
+ background: "#1f6feb1f"
16
+ },
17
+ {
18
+ value: "tip",
19
+ label: "Tip",
20
+ icon: $,
21
+ color: "#238636",
22
+ background: "#2386361f"
23
+ },
24
+ {
25
+ value: "important",
26
+ label: "Important",
27
+ icon: z,
28
+ color: "#ab7df8",
29
+ background: "#ab7df81f"
30
+ },
31
+ {
32
+ value: "warning",
33
+ label: "Warning",
34
+ icon: K,
35
+ color: "#d29922",
36
+ background: "#d299221f"
37
+ },
38
+ {
39
+ value: "caution",
40
+ label: "Caution",
41
+ icon: q,
42
+ color: "#f85149",
43
+ background: "#f851491f"
44
+ }
45
+ ];
46
+ function et({ node: t }) {
47
+ const { type: e = "note", title: a = "", body: n = "" } = t.attrs, c = (y.find((d) => d.value === e) || y[0]).icon;
48
+ return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ l(
49
+ "div",
50
+ {
51
+ className: x(
52
+ "richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",
53
+ {
54
+ "richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]": e === "note",
55
+ "richtext-bg-[#2386361f] richtext-border-[#238636]": e === "tip",
56
+ "richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]": e === "important",
57
+ "richtext-bg-[#d299221f] richtext-border-[#d29922]": e === "warning",
58
+ "richtext-bg-[#f851491f] richtext-border-[#f85149]": e === "caution"
59
+ }
60
+ ),
61
+ children: [
62
+ /* @__PURE__ */ l(
63
+ "div",
64
+ {
65
+ className: x("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2", {
66
+ "richtext-text-[#1f6feb]": e === "note",
67
+ "richtext-text-[#238636]": e === "tip",
68
+ "richtext-text-[#ab7df8]": e === "important",
69
+ "richtext-text-[#d29922]": e === "warning",
70
+ "richtext-text-[#f85149]": e === "caution"
71
+ }),
72
+ children: [
73
+ /* @__PURE__ */ o(c, { className: "richtext-size-5" }),
74
+ /* @__PURE__ */ o("span", { className: "richtext-font-semibold", children: a })
75
+ ]
76
+ }
77
+ ),
78
+ n && /* @__PURE__ */ o("p", { className: "richtext-pl-[28px]", children: n })
79
+ ]
80
+ }
81
+ ) });
82
+ }
83
+ const ot = [
84
+ { value: "note", label: "Note", icon: "Info" },
85
+ { value: "tip", label: "Tip", icon: "Lightbulb" },
86
+ { value: "important", label: "Important", icon: "AlertCircle" },
87
+ { value: "warning", label: "Warning", icon: "TriangleAlert" },
88
+ { value: "caution", label: "Caution", icon: "OctagonAlert" }
89
+ ];
90
+ function ht() {
91
+ const { t } = tt(), e = V(), a = j(lt.name), [n, i] = s(!1), [c, d] = s("note"), [p, b] = s(""), [g, f] = s(""), {
92
+ icon: A = void 0,
93
+ tooltip: N = void 0,
94
+ shortcutKeys: L = void 0,
95
+ tooltipOptions: S = {},
96
+ isActive: k = void 0
97
+ } = (a == null ? void 0 : a.componentProps) ?? {}, { dataState: I, disabled: m } = P(k), w = () => {
98
+ e && (e.chain().focus().setCallout({ type: c, title: p, body: g }).run(), i(!1), d("note"), b(""), f(""));
99
+ }, O = () => {
100
+ m || i(!0);
101
+ };
102
+ return a ? /* @__PURE__ */ l(E, { onOpenChange: i, open: n, children: [
103
+ /* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(
104
+ T,
105
+ {
106
+ action: O,
107
+ dataState: I,
108
+ disabled: m,
109
+ icon: A,
110
+ shortcutKeys: L,
111
+ tooltip: N,
112
+ tooltipOptions: S
113
+ }
114
+ ) }),
115
+ /* @__PURE__ */ l(W, { children: [
116
+ /* @__PURE__ */ o(F, { children: t("editor.callout.dialog.title") }),
117
+ /* @__PURE__ */ l("div", { className: "richtext-space-y-4 richtext-py-4", children: [
118
+ /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
119
+ /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.type") }),
120
+ /* @__PURE__ */ l(G, { onValueChange: d, value: c, children: [
121
+ /* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(Q, { placeholder: t("editor.callout.dialog.type.placeholder") }) }),
122
+ /* @__PURE__ */ o(X, { children: ot.map((r) => /* @__PURE__ */ o(Z, { value: r.value, children: t(`editor.callout.type.${r.value}`) }, r.value)) })
123
+ ] })
124
+ ] }),
125
+ /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
126
+ /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.title.label") }),
127
+ /* @__PURE__ */ o(
128
+ v,
129
+ {
130
+ onChange: (r) => b(r.target.value),
131
+ placeholder: t("editor.callout.dialog.title.placeholder"),
132
+ value: p
133
+ }
134
+ )
135
+ ] }),
136
+ /* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
137
+ /* @__PURE__ */ o(u, { children: t("editor.callout.dialog.body.label") }),
138
+ /* @__PURE__ */ o(
139
+ v,
140
+ {
141
+ onChange: (r) => f(r.target.value),
142
+ placeholder: t("editor.callout.dialog.body.placeholder"),
143
+ value: g
144
+ }
145
+ )
146
+ ] })
147
+ ] }),
148
+ /* @__PURE__ */ l(U, { children: [
149
+ /* @__PURE__ */ o(C, { onClick: () => i(!1), variant: "outline", children: t("editor.callout.dialog.button.cancel") }),
150
+ /* @__PURE__ */ o(C, { onClick: w, children: t("editor.callout.dialog.button.apply") })
151
+ ] })
152
+ ] })
153
+ ] }) : /* @__PURE__ */ o(Y, {});
154
+ }
155
+ function h(t) {
156
+ return (e) => e.getAttribute(t);
157
+ }
158
+ const lt = /* @__PURE__ */ H.create({
159
+ name: "callout",
160
+ group: "block",
161
+ selectable: !0,
162
+ atom: !0,
163
+ draggable: !0,
164
+ inline: !1,
165
+ //@ts-expect-error
166
+ addOptions() {
167
+ var t;
168
+ return {
169
+ ...(t = this.parent) == null ? void 0 : t.call(this),
170
+ HTMLAttributes: {
171
+ class: "callout"
172
+ },
173
+ button: ({ editor: e, t: a }) => ({
174
+ component: T,
175
+ componentProps: {
176
+ action: () => !0,
177
+ isActive: () => e.isActive("callout"),
178
+ disabled: !1,
179
+ icon: "Callout",
180
+ tooltip: a("editor.callout.tooltip")
181
+ }
182
+ })
183
+ };
184
+ },
185
+ parseHTML() {
186
+ return [{ tag: "div.callout" }];
187
+ },
188
+ renderHTML({ HTMLAttributes: t }) {
189
+ return [
190
+ "div",
191
+ B(this.options && this.options.HTMLAttributes || {}, t)
192
+ ];
193
+ },
194
+ addAttributes() {
195
+ return {
196
+ type: {
197
+ default: "",
198
+ parseHTML: h("type")
199
+ },
200
+ title: {
201
+ default: "",
202
+ parseHTML: h("title")
203
+ },
204
+ body: {
205
+ default: "",
206
+ parseHTML: h("body")
207
+ }
208
+ };
209
+ },
210
+ addCommands() {
211
+ return {
212
+ setCallout: (t) => ({ chain: e }) => e().insertContent({
213
+ type: this.name,
214
+ attrs: t
215
+ }).run()
216
+ };
217
+ },
218
+ addNodeView() {
219
+ return M(et);
220
+ }
221
+ });
222
+ export {
223
+ lt as Callout,
224
+ ht as RichTextCallout
225
+ };
package/lib/Clear.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),i=require("./index-D9oM__YW.cjs");function v(){const t=i.useButtonProps(s.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:r=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:c}=i.useActive(l),d=()=>{c||r&&r()};return t?n.jsx(i.ActionButton,{action:d,disabled:c,icon:e,shortcutKeys:a,tooltip:o,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o})=>({componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:o("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=v;
package/lib/Clear.js ADDED
@@ -0,0 +1,49 @@
1
+ import { N as l } from "./clsx-CDyrfCnw.js";
2
+ import { jsx as r, Fragment as p } from "react/jsx-runtime";
3
+ import { u as d, e as m, A as f } from "./index-lj3VWExo.js";
4
+ function x() {
5
+ const o = d(v.name), {
6
+ icon: t = void 0,
7
+ tooltip: n = void 0,
8
+ shortcutKeys: s = void 0,
9
+ tooltipOptions: c = {},
10
+ action: i = void 0,
11
+ isActive: a = void 0
12
+ } = (o == null ? void 0 : o.componentProps) ?? {}, { disabled: e } = m(a), u = () => {
13
+ e || i && i();
14
+ };
15
+ return o ? /* @__PURE__ */ r(
16
+ f,
17
+ {
18
+ action: u,
19
+ disabled: e,
20
+ icon: t,
21
+ shortcutKeys: s,
22
+ tooltip: n,
23
+ tooltipOptions: c
24
+ }
25
+ ) : /* @__PURE__ */ r(p, {});
26
+ }
27
+ const v = /* @__PURE__ */ l.create({
28
+ name: "clear",
29
+ //@ts-expect-error
30
+ addOptions() {
31
+ var o;
32
+ return {
33
+ ...(o = this.parent) == null ? void 0 : o.call(this),
34
+ button: ({ editor: t, t: n }) => ({
35
+ // component: ActionButton,
36
+ componentProps: {
37
+ action: () => t.chain().focus().clearNodes().unsetAllMarks().run(),
38
+ isActive: () => t.can().chain().focus().clearNodes().unsetAllMarks().run(),
39
+ icon: "Eraser",
40
+ tooltip: n("editor.clear.tooltip")
41
+ }
42
+ })
43
+ };
44
+ }
45
+ });
46
+ export {
47
+ v as Clear,
48
+ x as RichTextClear
49
+ };
package/lib/Code.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),i=require("react/jsx-runtime"),s=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");var h=/(^|[^`])`([^`]+)`(?!`)$/,x=/(^|[^`])`([^`]+)`(?!`)/g,C=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:h,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:x,type:this.type})]}});function v(){const e=s.useButtonProps(u.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:d=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:a,update:m}=s.useToggleActive(p),g=()=>{a||d&&(d(),m())};return e?i.jsx(s.ActionButton,{action:g,dataState:l,disabled:a,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const u=C.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=u;exports.RichTextCode=v;
package/lib/Code.js ADDED
@@ -0,0 +1,100 @@
1
+ import { M as m, e as l, f as g, m as h } from "./clsx-CDyrfCnw.js";
2
+ import { jsx as a, Fragment as M } from "react/jsx-runtime";
3
+ import { u as v, d as C, A as f } from "./index-lj3VWExo.js";
4
+ import "react";
5
+ import "./theme.js";
6
+ var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
7
+ name: "code",
8
+ addOptions() {
9
+ return {
10
+ HTMLAttributes: {}
11
+ };
12
+ },
13
+ excludes: "_",
14
+ code: !0,
15
+ exitable: !0,
16
+ parseHTML() {
17
+ return [{ tag: "code" }];
18
+ },
19
+ renderHTML({ HTMLAttributes: t }) {
20
+ return ["code", h(this.options.HTMLAttributes, t), 0];
21
+ },
22
+ markdownTokenName: "codespan",
23
+ parseMarkdown: (t, e) => e.applyMark("code", [{ type: "text", text: t.text || "" }]),
24
+ renderMarkdown: (t, e) => t.content ? `\`${e.renderChildren(t.content)}\`` : "",
25
+ addCommands() {
26
+ return {
27
+ setCode: () => ({ commands: t }) => t.setMark(this.name),
28
+ toggleCode: () => ({ commands: t }) => t.toggleMark(this.name),
29
+ unsetCode: () => ({ commands: t }) => t.unsetMark(this.name)
30
+ };
31
+ },
32
+ addKeyboardShortcuts() {
33
+ return {
34
+ "Mod-e": () => this.editor.commands.toggleCode()
35
+ };
36
+ },
37
+ addInputRules() {
38
+ return [
39
+ g({
40
+ find: k,
41
+ type: this.type
42
+ })
43
+ ];
44
+ },
45
+ addPasteRules() {
46
+ return [
47
+ l({
48
+ find: x,
49
+ type: this.type
50
+ })
51
+ ];
52
+ }
53
+ });
54
+ function L() {
55
+ const t = v(A.name), {
56
+ icon: e = void 0,
57
+ tooltip: o = void 0,
58
+ shortcutKeys: r = void 0,
59
+ tooltipOptions: d = {},
60
+ action: n = void 0,
61
+ isActive: i = void 0
62
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: s, update: c } = C(i), p = () => {
63
+ s || n && (n(), c());
64
+ };
65
+ return t ? /* @__PURE__ */ a(
66
+ f,
67
+ {
68
+ action: p,
69
+ dataState: u,
70
+ disabled: s,
71
+ icon: e,
72
+ shortcutKeys: r,
73
+ tooltip: o,
74
+ tooltipOptions: d
75
+ }
76
+ ) : /* @__PURE__ */ a(M, {});
77
+ }
78
+ const A = /* @__PURE__ */ y.extend({
79
+ //@ts-expect-error
80
+ addOptions() {
81
+ var t;
82
+ return {
83
+ ...(t = this.parent) == null ? void 0 : t.call(this),
84
+ button: ({ editor: e, t: o, extension: r }) => ({
85
+ componentProps: {
86
+ action: () => e.commands.toggleCode(),
87
+ isActive: () => e.isActive("code"),
88
+ disabled: !e.can().toggleCode(),
89
+ icon: "Code",
90
+ shortcutKeys: r.options.shortcutKeys ?? ["mod", "E"],
91
+ tooltip: o("editor.code.tooltip")
92
+ }
93
+ })
94
+ };
95
+ }
96
+ });
97
+ export {
98
+ A as Code,
99
+ L as RichTextCode
100
+ };