@collabchron/notiq 1.1.10 → 1.1.11

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 (412) hide show
  1. package/README.md +281 -259
  2. package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +12 -0
  3. package/dist/AIDialog-2WZUFWSC.mjs +325 -0
  4. package/dist/AudioComponent-CKLMLB5T.mjs +278 -0
  5. package/dist/CodeActionMenuPlugin-MRKY67ED.mjs +14 -0
  6. package/dist/CollaborationPlugin-TIZOQBUT.mjs +405 -0
  7. package/dist/CollaboratorsBar-TMKBOBJI.mjs +20 -0
  8. package/dist/CommentsPlugin-5M4RD6YO.mjs +19 -0
  9. package/dist/DynamicBlockComponent-2LOADZUX.mjs +221 -0
  10. package/dist/{EquationComponent-CB6DFIHV.mjs → EquationComponent-4NFG55NQ.mjs} +82 -46
  11. package/dist/ExcalidrawComponent-SIMURTCA.mjs +662 -0
  12. package/dist/ExcalidrawPlugin-2SGPIQ6U.mjs +14 -0
  13. package/dist/ExportPlugin-OKZOLBGS.mjs +42 -0
  14. package/dist/FileComponent-Y56MX5QD.mjs +200 -0
  15. package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +12 -0
  16. package/dist/FloatingTextFormatToolbarPlugin-SO5VON7Q.mjs +45 -0
  17. package/dist/HintComponet-ET7M2Q7S.mjs +288 -0
  18. package/dist/InlineCopilotPlugin-PNS5Y6OO.mjs +360 -0
  19. package/dist/{InlineImageComponent-UWIUWBHI.mjs → InlineImageComponent-FVTA4LXZ.mjs} +129 -99
  20. package/dist/MobileToolbar-JKP2MLQJ.mjs +984 -0
  21. package/dist/SlashCommand-2TNOOUBM.mjs +39 -0
  22. package/dist/StoryBuilderComponent-WQSNFPMM.mjs +816 -0
  23. package/dist/{TableCellActionMenuPlugin-PGK2K3VG.mjs → TableCellActionMenuPlugin-YWBA64J7.mjs} +328 -157
  24. package/dist/{TableHoverActionsPlugin-GJVE6VRW.mjs → TableHoverActionsPlugin-2EIXHEXN.mjs} +43 -36
  25. package/dist/{TemplatePlugin-ZD3QEVTI.mjs → TemplatePlugin-HNTPEXBB.mjs} +2 -2
  26. package/dist/ToolbarPlugin-IIAOU4P5.mjs +35 -0
  27. package/dist/VersionHistoryPlugin-23MAZB4G.mjs +371 -0
  28. package/dist/babel-RJXDAKDM.mjs +7287 -0
  29. package/dist/background-color-OZJCBYCT.mjs +425 -0
  30. package/dist/block-format-MTSIXWID.mjs +14 -0
  31. package/dist/chunk-2KESP7OU.mjs +809 -0
  32. package/dist/chunk-3AHNLIME.mjs +1701 -0
  33. package/dist/{chunk-GK35L7UY.mjs → chunk-3IILA3IP.mjs} +1 -1
  34. package/dist/chunk-3JN6QEJR.mjs +31 -0
  35. package/dist/{chunk-5BAKY5KN.mjs → chunk-43Z4Z2KD.mjs} +5 -8
  36. package/dist/{chunk-GXYD4VZM.mjs → chunk-4DVIYZVB.mjs} +1 -1
  37. package/dist/{chunk-7NZAPJ4G.mjs → chunk-4FFTOZGJ.mjs} +4 -3
  38. package/dist/chunk-4UMUPCDK.mjs +68 -0
  39. package/dist/{chunk-POGRR73N.mjs → chunk-5NRAXWYA.mjs} +4 -3
  40. package/dist/{chunk-PZSUSXQG.mjs → chunk-6D6QLRYR.mjs} +2 -2
  41. package/dist/chunk-6SRMKQSD.mjs +682 -0
  42. package/dist/{chunk-3CPBODXA.mjs → chunk-6UVNHT3T.mjs} +7 -27
  43. package/dist/{chunk-G53GLEAY.mjs → chunk-7QRJVZQY.mjs} +47 -22
  44. package/dist/chunk-ACV47ZKE.mjs +201 -0
  45. package/dist/{chunk-FSM26655.mjs → chunk-AMXRQ2TK.mjs} +4 -4
  46. package/dist/chunk-AYNKORDO.mjs +6 -0
  47. package/dist/{chunk-YUDCJRJM.mjs → chunk-BGV62GC2.mjs} +3 -2
  48. package/dist/{chunk-TCYK7DM7.mjs → chunk-CDAMHK63.mjs} +4 -3
  49. package/dist/{chunk-QHIQKMVN.mjs → chunk-D3IOUQFR.mjs} +125 -111
  50. package/dist/chunk-EEBA6OAH.mjs +59 -0
  51. package/dist/{chunk-YKC3SO4Z.mjs → chunk-EIZMKFHF.mjs} +1 -1
  52. package/dist/{chunk-4EXYCTGJ.mjs → chunk-EVPWKNE4.mjs} +3 -3
  53. package/dist/{chunk-K36V4SIW.mjs → chunk-FMJ7DGWP.mjs} +23 -20
  54. package/dist/{chunk-RBWZGXPF.mjs → chunk-FYLRS4BG.mjs} +5 -5
  55. package/dist/{chunk-N3WN46VL.mjs → chunk-GYYLZ3MQ.mjs} +23 -22
  56. package/dist/{chunk-WDG7J2DY.mjs → chunk-H3P47YXJ.mjs} +30 -19
  57. package/dist/chunk-HOZ4QRFV.mjs +536 -0
  58. package/dist/{chunk-5QSNIVIG.mjs → chunk-IAFCQV3Z.mjs} +94 -78
  59. package/dist/{chunk-64Z3FI7T.mjs → chunk-IIVB6JNE.mjs} +5 -4
  60. package/dist/chunk-IU2N42JJ.mjs +1763 -0
  61. package/dist/chunk-IUOUIDEQ.mjs +70 -0
  62. package/dist/chunk-J6ZUY5BY.mjs +202 -0
  63. package/dist/{chunk-YHPNOWFH.mjs → chunk-JHXDLYEV.mjs} +1 -1
  64. package/dist/{chunk-ZB5LZQKC.mjs → chunk-K5OAFEVY.mjs} +1 -1
  65. package/dist/chunk-KDA7ZYMJ.mjs +431 -0
  66. package/dist/{chunk-3JVFG7ER.mjs → chunk-KNW2CGIP.mjs} +7 -64
  67. package/dist/{chunk-4HBCVSE6.mjs → chunk-KXRLARGI.mjs} +1 -1
  68. package/dist/chunk-LAUAYRPC.mjs +944 -0
  69. package/dist/chunk-LLCP7NVE.mjs +449 -0
  70. package/dist/chunk-LU2XWLOE.mjs +219 -0
  71. package/dist/chunk-MPTE332I.mjs +787 -0
  72. package/dist/{chunk-456TN7IM.mjs → chunk-MTQZWJHR.mjs} +17 -16
  73. package/dist/{chunk-LGG4IUIA.mjs → chunk-MW6MAUY3.mjs} +2 -2
  74. package/dist/chunk-N3WTT2U6.mjs +21 -0
  75. package/dist/{chunk-GZPNVR7L.mjs → chunk-N6ILV6NF.mjs} +7 -6
  76. package/dist/{chunk-QEIFVK5M.mjs → chunk-NBE6FF6L.mjs} +4 -4
  77. package/dist/{chunk-BIU7WTLX.mjs → chunk-OE5JRLCN.mjs} +21 -18
  78. package/dist/chunk-OXWTZV3U.mjs +174 -0
  79. package/dist/{chunk-Z4EWP7BI.mjs → chunk-PD5K4AGP.mjs} +22 -23
  80. package/dist/chunk-PFH63ZU4.mjs +33 -0
  81. package/dist/chunk-PHRVYPVM.mjs +808 -0
  82. package/dist/chunk-R7WFRENU.mjs +262 -0
  83. package/dist/{chunk-4VWFVWYP.mjs → chunk-RAVYEEIC.mjs} +1 -1
  84. package/dist/chunk-RJQTA6HG.mjs +358 -0
  85. package/dist/{chunk-7VUMHWWL.mjs → chunk-SAOJHVPE.mjs} +5 -4
  86. package/dist/chunk-TC3IISJZ.mjs +408 -0
  87. package/dist/chunk-VGAX6YEY.mjs +399 -0
  88. package/dist/chunk-W6GAJXUS.mjs +334 -0
  89. package/dist/{chunk-U47ABU5Z.mjs → chunk-W6VQSFE5.mjs} +2 -2
  90. package/dist/chunk-WYCFGRFJ.mjs +118 -0
  91. package/dist/chunk-XAVQAXOJ.mjs +419 -0
  92. package/dist/chunk-XYDBUQ6Z.mjs +1978 -0
  93. package/dist/chunk-XYMXGU4T.mjs +129 -0
  94. package/dist/chunk-XYT6XM5S.mjs +496 -0
  95. package/dist/{chunk-HJPPNHYM.mjs → chunk-XZXGYNTY.mjs} +4 -3
  96. package/dist/{chunk-4GFXER7R.mjs → chunk-YDDBQZ77.mjs} +141 -89
  97. package/dist/{chunk-2FNEAMSP.mjs → chunk-YE7M2VKR.mjs} +52 -47
  98. package/dist/{chunk-3G37YKTV.mjs → chunk-YR2DD74C.mjs} +9 -8
  99. package/dist/{chunk-4MEDW3T6.mjs → chunk-YTLUQJE2.mjs} +5 -4
  100. package/dist/{chunk-DSFQHA7I.mjs → chunk-Z6JAFF55.mjs} +118 -295
  101. package/dist/chunk-ZFV2HGD3.mjs +143 -0
  102. package/dist/{chunk-77UA6HYR.mjs → chunk-ZKZ7MLSS.mjs} +1 -1
  103. package/dist/color-23323E3B.mjs +13 -0
  104. package/dist/components/canvas/CanvasMode.d.ts +18 -0
  105. package/dist/components/editor/Core.d.ts +6 -0
  106. package/dist/components/editor/index.d.ts +27 -0
  107. package/dist/components/editor/lexical-on-change.d.ts +1 -0
  108. package/dist/components/editor/nodes/AudioNode/AudioComponent.d.ts +15 -0
  109. package/dist/components/editor/nodes/AudioNode/index.d.ts +36 -0
  110. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleContainerNode.d.ts +22 -0
  111. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleContentNode.d.ts +18 -0
  112. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleTitleNode.d.ts +19 -0
  113. package/dist/components/editor/nodes/DynamicBlockNode/DynamicBlockComponent.d.ts +7 -0
  114. package/dist/components/editor/nodes/DynamicBlockNode/DynamicBlockNode.d.ts +49 -0
  115. package/dist/components/editor/nodes/EquationNode/EquationComponent.d.ts +16 -0
  116. package/dist/components/editor/nodes/EquationNode/EquationNode.d.ts +33 -0
  117. package/dist/components/editor/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +15 -0
  118. package/dist/components/editor/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +57 -0
  119. package/dist/components/editor/nodes/ExcalidrawNode/ImageResizer.d.ts +24 -0
  120. package/dist/components/editor/nodes/ExcalidrawNode/index.d.ts +39 -0
  121. package/dist/components/editor/nodes/FigmaNode/FigmaNode.d.ts +27 -0
  122. package/dist/components/editor/nodes/FileNode/FileComponent.d.ts +16 -0
  123. package/dist/components/editor/nodes/FileNode/index.d.ts +39 -0
  124. package/dist/components/editor/nodes/Hint/HintComponet.d.ts +20 -0
  125. package/dist/components/editor/nodes/Hint/index.d.ts +33 -0
  126. package/dist/components/editor/nodes/ImageNode/index.d.ts +62 -0
  127. package/dist/components/editor/nodes/InlineImageNode/InlineImageComponent.d.ts +25 -0
  128. package/dist/components/editor/nodes/InlineImageNode/InlineImageNode.d.ts +66 -0
  129. package/dist/components/editor/nodes/LayoutNode/LayoutContainerNode.d.ts +31 -0
  130. package/dist/components/editor/nodes/LayoutNode/LayoutItemNode.d.ts +21 -0
  131. package/dist/components/editor/nodes/PollNode/index.d.ts +34 -0
  132. package/dist/components/editor/nodes/Stepper/index.d.ts +66 -0
  133. package/dist/components/editor/nodes/StoryBuilderNode/StoryBuilderComponent.d.ts +10 -0
  134. package/dist/components/editor/nodes/StoryBuilderNode/StoryBuilderNode.d.ts +59 -0
  135. package/dist/components/editor/nodes/TweetNode/index.d.ts +21 -0
  136. package/dist/components/editor/nodes/index.d.ts +4 -0
  137. package/dist/components/editor/plugins/AICommandBarPlugin/index.d.ts +7 -0
  138. package/dist/components/editor/plugins/AudioPlugin/index.d.ts +1 -0
  139. package/dist/components/editor/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  140. package/dist/components/editor/plugins/AutoLinkPlugin/index.d.ts +1 -0
  141. package/dist/components/editor/plugins/CodeActionMenuPlugin/components/CopyButton.d.ts +8 -0
  142. package/dist/components/editor/plugins/CodeActionMenuPlugin/components/PrettierButton.d.ts +9 -0
  143. package/dist/components/editor/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  144. package/dist/components/editor/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  145. package/dist/components/editor/plugins/CodeHighlightPlugin/index.d.ts +11 -0
  146. package/dist/components/editor/plugins/CollaborationPlugin/CollaboratorsBar.d.ts +9 -0
  147. package/dist/components/editor/plugins/CollaborationPlugin/index.d.ts +8 -0
  148. package/dist/components/editor/plugins/CollapsiblePlugin/index.d.ts +4 -0
  149. package/dist/components/editor/plugins/CommentsPlugin/CommentThreadItem.d.ts +7 -0
  150. package/dist/components/editor/plugins/CommentsPlugin/CommentsSidebar.d.ts +2 -0
  151. package/dist/components/editor/plugins/CommentsPlugin/MentionsAutocomplete.d.ts +22 -0
  152. package/dist/components/editor/plugins/CommentsPlugin/NewCommentDialog.d.ts +2 -0
  153. package/dist/components/editor/plugins/CommentsPlugin/index.d.ts +5 -0
  154. package/dist/components/editor/plugins/ContentAnalyticsPlugin/index.d.ts +1 -0
  155. package/dist/components/editor/plugins/DragDropPastePlugin/index.d.ts +1 -0
  156. package/dist/components/editor/plugins/DraggableBlockPlugin/index.d.ts +5 -0
  157. package/dist/components/editor/plugins/DynamicBlockPlugin/index.d.ts +7 -0
  158. package/dist/components/editor/plugins/EquationsPlugin/index.d.ts +20 -0
  159. package/dist/components/editor/plugins/ExcalidrawPlugin/index.d.ts +5 -0
  160. package/dist/components/editor/plugins/ExportPlugin/ImportExportModal.d.ts +9 -0
  161. package/dist/components/editor/plugins/ExportPlugin/index.d.ts +28 -0
  162. package/dist/components/editor/plugins/FigmaPlugin/index.d.ts +11 -0
  163. package/dist/components/editor/plugins/FilePlugin/index.d.ts +1 -0
  164. package/dist/components/editor/plugins/FloatingLinkEditorPlugin/index.d.ts +6 -0
  165. package/dist/components/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +6 -0
  166. package/dist/components/editor/plugins/ImagesPlugin/index.d.ts +14 -0
  167. package/dist/components/editor/plugins/InlineCopilotPlugin/index.d.ts +32 -0
  168. package/dist/components/editor/plugins/InlineImagePlugin/index.d.ts +16 -0
  169. package/dist/components/editor/plugins/LayoutPlugin/index.d.ts +14 -0
  170. package/dist/components/editor/plugins/LinkPlugin/index.d.ts +13 -0
  171. package/dist/components/editor/plugins/LinkWithMetaData/index.d.ts +46 -0
  172. package/dist/components/editor/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  173. package/dist/components/editor/plugins/MarkdownTransformers/index.d.ts +12 -0
  174. package/dist/components/editor/plugins/PollPlugin/index.d.ts +4 -0
  175. package/dist/components/editor/plugins/ShortcutsPlugin/index.d.ts +13 -0
  176. package/dist/components/editor/plugins/ShortcutsPlugin/shortcuts.d.ts +58 -0
  177. package/dist/components/editor/plugins/SlashCommand/index.d.ts +25 -0
  178. package/dist/components/editor/plugins/SpeechToTextPlugin/index.d.ts +5 -0
  179. package/dist/components/editor/plugins/StoryBuilderPlugin/index.d.ts +7 -0
  180. package/dist/components/editor/plugins/TabFocusPlugin/index.d.ts +1 -0
  181. package/dist/components/editor/plugins/TableCellActionMenuPlugin/index.d.ts +5 -0
  182. package/dist/components/editor/plugins/TableCellResizer/index.d.ts +2 -0
  183. package/dist/components/editor/plugins/TableHoverActionsPlugin/index.d.ts +4 -0
  184. package/dist/components/editor/plugins/TablePlugin/index.d.ts +27 -0
  185. package/dist/components/editor/plugins/TemplatePlugin/TemplateDialog.d.ts +1 -0
  186. package/dist/components/editor/plugins/TemplatePlugin/index.d.ts +3 -0
  187. package/dist/components/editor/plugins/ToolbarPlugin/MobileToolbar.d.ts +10 -0
  188. package/dist/components/editor/plugins/ToolbarPlugin/index.d.ts +11 -0
  189. package/dist/components/editor/plugins/TwitterPlugin/index.d.ts +4 -0
  190. package/dist/components/editor/plugins/VersionHistoryPlugin/NameVersionModal.d.ts +2 -0
  191. package/dist/components/editor/plugins/VersionHistoryPlugin/VersionHistoryDrawer.d.ts +2 -0
  192. package/dist/components/editor/plugins/VersionHistoryPlugin/index.d.ts +2 -0
  193. package/dist/components/editor/plugins/YouTubeNode/index.d.ts +22 -0
  194. package/dist/components/editor/plugins/YouTubePlugin/index.d.ts +11 -0
  195. package/dist/components/editor/templates/data.d.ts +7 -0
  196. package/dist/components/editor/themes/editor-theme.d.ts +3 -0
  197. package/dist/components/editor/utils/ai.d.ts +27 -0
  198. package/dist/components/editor/utils/canUseDOM.d.ts +8 -0
  199. package/dist/components/editor/utils/codeLanguages.d.ts +3 -0
  200. package/dist/components/editor/utils/diffUtils.d.ts +10 -0
  201. package/dist/components/editor/utils/editorFormatting.d.ts +26 -0
  202. package/dist/components/editor/utils/environment.d.ts +17 -0
  203. package/dist/components/editor/utils/extract-data.d.ts +8 -0
  204. package/dist/components/editor/utils/getAllLexicalChildren.d.ts +6 -0
  205. package/dist/components/editor/utils/getDOMRangeRect.d.ts +8 -0
  206. package/dist/components/editor/utils/getSelectedNode.d.ts +2 -0
  207. package/dist/components/editor/utils/gif.d.ts +7 -0
  208. package/dist/components/editor/utils/importUtils.d.ts +27 -0
  209. package/dist/components/editor/utils/invariant.d.ts +1 -0
  210. package/dist/components/editor/utils/markdownTransformers.d.ts +20 -0
  211. package/dist/components/editor/utils/setFloatingElemPosition.d.ts +1 -0
  212. package/dist/components/editor/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  213. package/dist/components/editor/utils/setNodePlaceholderFromSelection/getNodePlaceholder.d.ts +2 -0
  214. package/dist/components/editor/utils/setNodePlaceholderFromSelection/setNodePlaceholderFromSelection.d.ts +2 -0
  215. package/dist/components/editor/utils/setNodePlaceholderFromSelection/setPlaceholderOnSelection.d.ts +5 -0
  216. package/dist/components/editor/utils/url.d.ts +11 -0
  217. package/dist/components/editor/utils/useLayoutEffect.d.ts +3 -0
  218. package/dist/components/providers/AIContext.d.ts +21 -0
  219. package/dist/components/providers/CollabContext.d.ts +92 -0
  220. package/dist/components/providers/CommentsContext.d.ts +48 -0
  221. package/dist/components/providers/QueryProvider.d.ts +5 -0
  222. package/dist/components/providers/SharedHistoryContext.d.ts +11 -0
  223. package/dist/components/providers/ToolbarContext.d.ts +61 -0
  224. package/dist/components/providers/UploadContext.d.ts +29 -0
  225. package/dist/components/providers/VersionHistoryContext.d.ts +33 -0
  226. package/dist/components/providers/theme-provider.d.ts +3 -0
  227. package/dist/components/theme/ModeToggle.d.ts +2 -0
  228. package/dist/components/ui/ContentEditable.d.ts +15 -0
  229. package/dist/components/ui/FileInput.d.ts +16 -0
  230. package/dist/components/ui/Modal.d.ts +15 -0
  231. package/dist/components/ui/Select.d.ts +14 -0
  232. package/dist/components/ui/TextInput.d.ts +19 -0
  233. package/dist/components/ui/accordion.d.ts +7 -0
  234. package/dist/components/ui/ai/AIDialog.d.ts +9 -0
  235. package/dist/components/ui/ai/ai-button.d.ts +5 -0
  236. package/dist/components/ui/ai/border.d.ts +8 -0
  237. package/dist/components/ui/ai/placeholder-input-vanish.d.ts +6 -0
  238. package/dist/components/ui/badge.d.ts +9 -0
  239. package/dist/components/ui/button.d.ts +12 -0
  240. package/dist/components/ui/card.d.ts +8 -0
  241. package/dist/components/ui/checkbox.d.ts +4 -0
  242. package/dist/components/ui/command.d.ts +80 -0
  243. package/dist/components/ui/dialog/Dialog.d.ts +16 -0
  244. package/dist/components/ui/dialog.d.ts +19 -0
  245. package/dist/components/ui/drop-downs/background-color.d.ts +12 -0
  246. package/dist/components/ui/drop-downs/block-format.d.ts +25 -0
  247. package/dist/components/ui/drop-downs/code.d.ts +6 -0
  248. package/dist/components/ui/drop-downs/codeTheme.d.ts +8 -0
  249. package/dist/components/ui/drop-downs/color.d.ts +12 -0
  250. package/dist/components/ui/drop-downs/font-size.d.ts +10 -0
  251. package/dist/components/ui/drop-downs/font.d.ts +11 -0
  252. package/dist/components/ui/drop-downs/index.d.ts +24 -0
  253. package/dist/components/ui/drop-downs/insert-node.d.ts +6 -0
  254. package/dist/components/ui/drop-downs/table-dropdown.d.ts +10 -0
  255. package/dist/components/ui/drop-downs/text-align.d.ts +8 -0
  256. package/dist/components/ui/drop-downs/text-format.d.ts +11 -0
  257. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  258. package/dist/components/ui/equation/EquationEditor.d.ts +14 -0
  259. package/dist/components/ui/equation/KatexEquationAlterer.d.ts +14 -0
  260. package/dist/components/ui/equation/KatexRenderer.d.ts +13 -0
  261. package/dist/components/ui/excalidraw/ExcalidrawModal.d.ts +48 -0
  262. package/dist/components/ui/excalidraw/Modal.d.ts +16 -0
  263. package/dist/components/ui/hover-card.d.ts +6 -0
  264. package/dist/components/ui/icons/brand-icons.d.ts +5 -0
  265. package/dist/components/ui/image/error-image.d.ts +2 -0
  266. package/dist/components/ui/image/file-upload.d.ts +8 -0
  267. package/dist/components/ui/image/image-resizer.d.ts +10 -0
  268. package/dist/components/ui/image/image-toolbar.d.ts +8 -0
  269. package/dist/components/ui/image/index.d.ts +16 -0
  270. package/dist/components/ui/image/lazy-image.d.ts +10 -0
  271. package/dist/components/ui/image/lazy-video.d.ts +11 -0
  272. package/dist/components/ui/input.d.ts +3 -0
  273. package/dist/components/ui/label.d.ts +5 -0
  274. package/dist/components/ui/models/custom-dialog.d.ts +58 -0
  275. package/dist/components/ui/models/insert-audio.d.ts +7 -0
  276. package/dist/components/ui/models/insert-file.d.ts +7 -0
  277. package/dist/components/ui/models/insert-gif.d.ts +7 -0
  278. package/dist/components/ui/models/insert-image.d.ts +6 -0
  279. package/dist/components/ui/models/insert-poll.d.ts +5 -0
  280. package/dist/components/ui/models/insert-table.d.ts +6 -0
  281. package/dist/components/ui/models/use-model.d.ts +6 -0
  282. package/dist/components/ui/poll/poll-component.d.ts +8 -0
  283. package/dist/components/ui/popover.d.ts +7 -0
  284. package/dist/components/ui/progress.d.ts +4 -0
  285. package/dist/components/ui/scroll-area.d.ts +5 -0
  286. package/dist/components/ui/separator.d.ts +4 -0
  287. package/dist/components/ui/skeleton.d.ts +2 -0
  288. package/dist/components/ui/sonner.d.ts +4 -0
  289. package/dist/components/ui/stepper/step.d.ts +11 -0
  290. package/dist/components/ui/stepper/stepper.d.ts +6 -0
  291. package/dist/components/ui/tabs.d.ts +7 -0
  292. package/dist/components/ui/textarea.d.ts +3 -0
  293. package/dist/components/ui/toggle.d.ts +14 -0
  294. package/dist/components/ui/tooltip.d.ts +7 -0
  295. package/dist/components/ui/write/text-format-floating.d.ts +27 -0
  296. package/dist/components/ui/write/text-format-floting-toolbar.d.ts +26 -0
  297. package/dist/core/chain.d.ts +4 -0
  298. package/dist/core/editor.d.ts +42 -0
  299. package/dist/core/extension.d.ts +20 -0
  300. package/dist/core/extensions/blocks-kit.d.ts +14 -0
  301. package/dist/core/extensions/copilot-and-collab.d.ts +10 -0
  302. package/dist/core/extensions/nodes-and-marks.d.ts +36 -0
  303. package/dist/core/index.d.ts +9 -0
  304. package/dist/core/react/BubbleMenu.d.ts +13 -0
  305. package/dist/core/react/FloatingMenu.d.ts +12 -0
  306. package/dist/core/react/NotiqContent.d.ts +11 -0
  307. package/dist/core/react/NotiqEditor.d.ts +29 -0
  308. package/dist/core/react/context.d.ts +15 -0
  309. package/dist/core/react/index.d.ts +8 -0
  310. package/dist/core/react/useNotiq.d.ts +16 -0
  311. package/dist/core/types.d.ts +88 -0
  312. package/dist/core.d.ts +1 -0
  313. package/dist/core.js +67719 -0
  314. package/dist/core.mjs +132 -0
  315. package/dist/estree-QRALCFII.mjs +5029 -0
  316. package/dist/font-IJKFR4BM.mjs +12 -0
  317. package/dist/font-size-GTL6UVQL.mjs +15 -0
  318. package/dist/hooks/instructions-messages.d.ts +11 -0
  319. package/dist/hooks/use-mobile.d.ts +1 -0
  320. package/dist/hooks/useModal.d.ts +12 -0
  321. package/dist/hooks/useReport.d.ts +8 -0
  322. package/dist/hooks/useResizeObservert.d.ts +1 -0
  323. package/dist/html-CE2S5FIJ.mjs +3185 -0
  324. package/dist/{image-2PJIAYAT.mjs → image-TPW7PZZK.mjs} +360 -325
  325. package/dist/index.d.ts +13 -145
  326. package/dist/index.js +61780 -44629
  327. package/dist/index.mjs +1157 -736
  328. package/dist/insert-audio-C66RZRKY.mjs +180 -0
  329. package/dist/insert-file-3DTGRO7W.mjs +190 -0
  330. package/dist/insert-gif-FIMCCBAI.mjs +112 -0
  331. package/dist/insert-image-CZV6HWQZ.mjs +348 -0
  332. package/dist/insert-node-MA3FXEYN.mjs +245 -0
  333. package/dist/insert-poll-6BCIFY5G.mjs +36 -0
  334. package/dist/insert-table-ZRJP6X52.mjs +70 -0
  335. package/dist/lib/edgestore.d.ts +2 -0
  336. package/dist/lib/index.d.ts +0 -0
  337. package/dist/lib/pinecone-client.d.ts +3 -0
  338. package/dist/lib/utils.d.ts +2 -0
  339. package/dist/markdown-GMCB4RDA.mjs +6753 -0
  340. package/dist/{poll-component-2R4MDLHS.mjs → poll-component-VHMM5KKZ.mjs} +126 -95
  341. package/dist/{postcss-ONF3VDIM.mjs → postcss-GH4QXSB5.mjs} +1879 -1697
  342. package/dist/react.d.ts +1 -0
  343. package/dist/react.js +67651 -0
  344. package/dist/react.mjs +61 -0
  345. package/dist/standalone-A6VDOPCZ.mjs +2506 -0
  346. package/dist/stepper-4AO5XMO7.mjs +356 -0
  347. package/dist/styles/notiq.css +2 -2
  348. package/dist/styles/tailwind-plugin.d.ts +4 -0
  349. package/dist/table-dropdown-4VCRSQB6.mjs +391 -0
  350. package/dist/{text-align-VLECWO4H.mjs → text-align-CSDLJUDA.mjs} +24 -21
  351. package/dist/text-format-6L5N3CHZ.mjs +15 -0
  352. package/dist/typescript-CGC67LRI.mjs +13392 -0
  353. package/dist/utils/docSerialization.d.ts +10 -0
  354. package/dist/utils/emoji-list.d.ts +27 -0
  355. package/dist/utils/getDOMRangeRect.d.ts +8 -0
  356. package/dist/utils/getSelectedNode.d.ts +2 -0
  357. package/dist/utils/getThemeSelector.d.ts +9 -0
  358. package/dist/utils/html.d.ts +9 -0
  359. package/dist/utils/htmlExport.d.ts +9 -0
  360. package/dist/utils/isMobileWidth.d.ts +7 -0
  361. package/dist/utils/joinClasses.d.ts +8 -0
  362. package/dist/utils/setFloatingElemPosition.d.ts +1 -0
  363. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  364. package/dist/utils/swipe.d.ts +11 -0
  365. package/dist/utils/url.d.ts +9 -0
  366. package/package.json +128 -105
  367. package/src/styles/notiq.css +1315 -1150
  368. package/dist/CodeActionMenuPlugin-EINOY4U4.mjs +0 -15
  369. package/dist/DynamicBlockComponent-NRQJ4WW4.mjs +0 -161
  370. package/dist/ExcalidrawComponent-LUZJNFWV.mjs +0 -528
  371. package/dist/ExcalidrawPlugin-HC2L43YG.mjs +0 -14
  372. package/dist/ExportPlugin-V2RLM63S.mjs +0 -11
  373. package/dist/FloatingLinkEditorPlugin-TRTCMSP4.mjs +0 -12
  374. package/dist/FloatingTextFormatToolbarPlugin-ENECEZSX.mjs +0 -30
  375. package/dist/HintComponet-BRL6EAMS.mjs +0 -217
  376. package/dist/MobileToolbar-BOOZAMQE.mjs +0 -268
  377. package/dist/SlashCommand-FHEWHFZU.mjs +0 -28
  378. package/dist/StoryBuilderComponent-JGDBM5JU.mjs +0 -562
  379. package/dist/ToolbarPlugin-2VP7FDWD.mjs +0 -1547
  380. package/dist/babel-JZ2EV6AX.mjs +0 -7233
  381. package/dist/background-color-XZTYLGO2.mjs +0 -362
  382. package/dist/block-format-YJCV2DIY.mjs +0 -15
  383. package/dist/chunk-77KXU36M.mjs +0 -64
  384. package/dist/chunk-AMMKBSST.mjs +0 -1256
  385. package/dist/chunk-EGMI62PP.mjs +0 -83
  386. package/dist/chunk-JXDPPUJI.mjs +0 -52
  387. package/dist/chunk-KJ6AJ44Q.mjs +0 -128
  388. package/dist/chunk-NOJDE3CE.mjs +0 -1906
  389. package/dist/chunk-NZXC6FGU.mjs +0 -214
  390. package/dist/chunk-PBD6LMLC.mjs +0 -366
  391. package/dist/chunk-TTHQCW5F.mjs +0 -47
  392. package/dist/chunk-V2NIZOSQ.mjs +0 -538
  393. package/dist/chunk-WAK5JGNJ.mjs +0 -315
  394. package/dist/chunk-YMBXLRW5.mjs +0 -374
  395. package/dist/chunk-YPHOEJ46.mjs +0 -64
  396. package/dist/chunk-ZJRKATOJ.mjs +0 -65
  397. package/dist/color-BPKOPQKN.mjs +0 -12
  398. package/dist/estree-XC56IUFX.mjs +0 -4414
  399. package/dist/font-FEZ3GKSF.mjs +0 -13
  400. package/dist/font-size-EK775WRH.mjs +0 -15
  401. package/dist/html-S3ACX7NI.mjs +0 -2738
  402. package/dist/index.d.mts +0 -145
  403. package/dist/insert-gif-SAIDYURE.mjs +0 -100
  404. package/dist/insert-image-U3RJN3OW.mjs +0 -259
  405. package/dist/insert-node-WXW4ZER4.mjs +0 -201
  406. package/dist/insert-poll-HCPM7MO6.mjs +0 -33
  407. package/dist/insert-table-24XYUS2W.mjs +0 -66
  408. package/dist/markdown-SNVBOSRA.mjs +0 -3487
  409. package/dist/standalone-EOIALU3M.mjs +0 -2373
  410. package/dist/stepper-JDEE26TX.mjs +0 -304
  411. package/dist/text-format-BG5WOOPZ.mjs +0 -16
  412. package/dist/typescript-AMPI6OVS.mjs +0 -13135
@@ -1,17 +1,15 @@
1
- import {
2
- DropDown
3
- } from "./chunk-EGMI62PP.mjs";
4
- import "./chunk-KJ6AJ44Q.mjs";
5
- import "./chunk-64Z3FI7T.mjs";
6
1
  import {
7
2
  useModal
8
- } from "./chunk-5QSNIVIG.mjs";
9
- import "./chunk-WDG7J2DY.mjs";
10
- import "./chunk-BIU7WTLX.mjs";
11
- import "./chunk-YHPNOWFH.mjs";
3
+ } from "./chunk-IAFCQV3Z.mjs";
4
+ import {
5
+ Popover,
6
+ PopoverContent,
7
+ PopoverTrigger
8
+ } from "./chunk-IIVB6JNE.mjs";
9
+ import "./chunk-JHXDLYEV.mjs";
12
10
  import {
13
11
  init_react_shim
14
- } from "./chunk-77KXU36M.mjs";
12
+ } from "./chunk-WYCFGRFJ.mjs";
15
13
 
16
14
  // src/components/editor/plugins/TableCellActionMenuPlugin/index.tsx
17
15
  init_react_shim();
@@ -50,32 +48,26 @@ import {
50
48
  getDOMSelection,
51
49
  SELECTION_CHANGE_COMMAND
52
50
  } from "lexical";
53
- import * as React2 from "react";
51
+ import * as React from "react";
54
52
  import { useCallback, useEffect, useRef, useState } from "react";
55
53
  import { createPortal } from "react-dom";
56
-
57
- // src/components/editor/utils/invariant.ts
58
- init_react_shim();
59
- function invariant(cond, message) {
60
- if (cond) {
61
- return;
62
- }
63
- throw new Error(
64
- "Internal Lexical error: invariant() is meant to be replaced at compile time. There is no runtime version. Error: " + message
65
- );
66
- }
67
-
68
- // src/components/editor/plugins/TableCellActionMenuPlugin/index.tsx
69
54
  import {
70
- Menu,
55
+ ArrowDown,
56
+ ArrowLeft,
57
+ ArrowRight,
58
+ ArrowUp,
71
59
  Merge,
72
60
  PaintBucket,
73
61
  Split,
74
62
  Table,
63
+ Table as TableIcon,
75
64
  TableColumnsSplit,
76
65
  TableRowsSplit,
77
- Trash
66
+ Trash,
67
+ Trash2,
68
+ X
78
69
  } from "lucide-react";
70
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
79
71
  function computeSelectionCount(selection) {
80
72
  const selectionShape = selection.getShape();
81
73
  return {
@@ -84,12 +76,16 @@ function computeSelectionCount(selection) {
84
76
  };
85
77
  }
86
78
  function $canUnmerge() {
87
- const selection = $getSelection();
88
- if ($isRangeSelection(selection) && !selection.isCollapsed() || $isTableSelection(selection) && !selection.anchor.is(selection.focus) || !$isRangeSelection(selection) && !$isTableSelection(selection)) {
79
+ try {
80
+ const selection = $getSelection();
81
+ if ($isRangeSelection(selection) && !selection.isCollapsed() || $isTableSelection(selection) && !selection.anchor.is(selection.focus) || !$isRangeSelection(selection) && !$isTableSelection(selection)) {
82
+ return false;
83
+ }
84
+ const [cell] = $getNodeTriplet(selection.anchor);
85
+ return cell ? cell.__colSpan > 1 || cell.__rowSpan > 1 : false;
86
+ } catch (e) {
89
87
  return false;
90
88
  }
91
- const [cell] = $getNodeTriplet(selection.anchor);
92
- return cell.__colSpan > 1 || cell.__rowSpan > 1;
93
89
  }
94
90
  function $cellContainsEmptyParagraph(cell) {
95
91
  if (cell.getChildrenSize() !== 1) {
@@ -112,16 +108,24 @@ function $selectLastDescendant(node) {
112
108
  }
113
109
  }
114
110
  function currentCellBackgroundColor(editor) {
115
- return editor.getEditorState().read(() => {
116
- const selection = $getSelection();
117
- if ($isRangeSelection(selection) || $isTableSelection(selection)) {
118
- const [cell] = $getNodeTriplet(selection.anchor);
119
- if ($isTableCellNode(cell)) {
120
- return cell.getBackgroundColor();
111
+ try {
112
+ return editor.getEditorState().read(() => {
113
+ try {
114
+ const selection = $getSelection();
115
+ if ($isRangeSelection(selection) || $isTableSelection(selection)) {
116
+ const [cell] = $getNodeTriplet(selection.anchor);
117
+ if ($isTableCellNode(cell)) {
118
+ return cell.getBackgroundColor();
119
+ }
120
+ }
121
+ } catch (e) {
122
+ return null;
121
123
  }
122
- }
124
+ return null;
125
+ });
126
+ } catch (e) {
123
127
  return null;
124
- });
128
+ }
125
129
  }
126
130
  function TableActionMenu({
127
131
  tableCellNode: _tableCellNode,
@@ -196,21 +200,22 @@ function TableActionMenu({
196
200
  const clearTableSelection = useCallback(() => {
197
201
  editor.update(() => {
198
202
  if (tableCellNode.isAttached()) {
199
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
200
- const tableElement = getTableElement(
201
- tableNode,
202
- editor.getElementByKey(tableNode.getKey())
203
- );
204
- invariant(
205
- tableElement !== null,
206
- "TableActionMenu: Expected to find tableElement in DOM"
207
- );
208
- const tableObserver = getTableObserverFromTableElement(tableElement);
209
- if (tableObserver !== null) {
210
- tableObserver.$clearHighlight();
203
+ try {
204
+ const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
205
+ const tableElement = getTableElement(
206
+ tableNode,
207
+ editor.getElementByKey(tableNode.getKey())
208
+ );
209
+ if (tableElement !== null) {
210
+ const tableObserver = getTableObserverFromTableElement(tableElement);
211
+ if (tableObserver !== null) {
212
+ tableObserver.$clearHighlight();
213
+ }
214
+ }
215
+ tableNode.markDirty();
216
+ updateTableCellNode(tableCellNode.getLatest());
217
+ } catch (e) {
211
218
  }
212
- tableNode.markDirty();
213
- updateTableCellNode(tableCellNode.getLatest());
214
219
  }
215
220
  const rootNode = $getRoot();
216
221
  rootNode.selectStart();
@@ -284,8 +289,13 @@ function TableActionMenu({
284
289
  }, [editor]);
285
290
  const deleteTableAtSelection = useCallback(() => {
286
291
  editor.update(() => {
287
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
288
- tableNode.remove();
292
+ try {
293
+ if (tableCellNode.isAttached()) {
294
+ const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
295
+ tableNode.remove();
296
+ }
297
+ } catch (e) {
298
+ }
289
299
  clearTableSelection();
290
300
  });
291
301
  }, [editor, tableCellNode, clearTableSelection]);
@@ -360,27 +370,36 @@ function TableActionMenu({
360
370
  const handleCellBackgroundColor = useCallback(
361
371
  (value) => {
362
372
  editor.update(() => {
363
- const selection = $getSelection();
364
- if ($isRangeSelection(selection) || $isTableSelection(selection)) {
365
- const [cell] = $getNodeTriplet(selection.anchor);
366
- if ($isTableCellNode(cell)) {
367
- cell.setBackgroundColor(value);
368
- }
369
- if ($isTableSelection(selection)) {
370
- const nodes = selection.getNodes();
371
- for (let i = 0; i < nodes.length; i++) {
372
- const node = nodes[i];
373
- if ($isTableCellNode(node)) {
374
- node.setBackgroundColor(value);
373
+ try {
374
+ const selection = $getSelection();
375
+ if ($isRangeSelection(selection) || $isTableSelection(selection)) {
376
+ const [cell] = $getNodeTriplet(selection.anchor);
377
+ if ($isTableCellNode(cell)) {
378
+ cell.setBackgroundColor(value);
379
+ }
380
+ if ($isTableSelection(selection)) {
381
+ const nodes = selection.getNodes();
382
+ for (let i = 0; i < nodes.length; i++) {
383
+ const node = nodes[i];
384
+ if ($isTableCellNode(node)) {
385
+ node.setBackgroundColor(value);
386
+ }
375
387
  }
376
388
  }
389
+ } else if (tableCellNode && tableCellNode.isAttached()) {
390
+ tableCellNode.setBackgroundColor(value);
391
+ }
392
+ } catch (e) {
393
+ if (tableCellNode && tableCellNode.isAttached()) {
394
+ tableCellNode.setBackgroundColor(value);
377
395
  }
378
396
  }
379
397
  });
398
+ setBackgroundColor(value);
380
399
  },
381
- [editor]
400
+ [editor, tableCellNode]
382
401
  );
383
- const commands = React2.useMemo(
402
+ const commands = React.useMemo(
384
403
  () => [
385
404
  {
386
405
  label: "Background",
@@ -388,7 +407,7 @@ function TableActionMenu({
388
407
  showModal(
389
408
  "Background",
390
409
  "Select color",
391
- (onClose) => /* @__PURE__ */ React2.createElement(
410
+ (onClose) => /* @__PURE__ */ jsx(
392
411
  Compact,
393
412
  {
394
413
  style: { background: "transparent", width: "100%" },
@@ -402,50 +421,50 @@ function TableActionMenu({
402
421
  true
403
422
  );
404
423
  },
405
- icon: /* @__PURE__ */ React2.createElement(PaintBucket, null),
424
+ icon: /* @__PURE__ */ jsx(PaintBucket, {}),
406
425
  style: { backgroundColor: `${currentCellBackgroundColor(editor)}` }
407
426
  },
408
427
  {
409
428
  label: "Insert Row Above",
410
429
  func: () => insertTableRowAtSelection(false),
411
- icon: /* @__PURE__ */ React2.createElement(TableRowsSplit, null)
430
+ icon: /* @__PURE__ */ jsx(TableRowsSplit, {})
412
431
  },
413
432
  {
414
433
  label: "Insert Row Below",
415
434
  func: () => insertTableRowAtSelection(true),
416
- icon: /* @__PURE__ */ React2.createElement(TableRowsSplit, null)
435
+ icon: /* @__PURE__ */ jsx(TableRowsSplit, {})
417
436
  },
418
437
  {
419
438
  label: "Insert Column Left",
420
439
  func: () => insertTableColumnAtSelection(false),
421
- icon: /* @__PURE__ */ React2.createElement(TableColumnsSplit, null)
440
+ icon: /* @__PURE__ */ jsx(TableColumnsSplit, {})
422
441
  },
423
442
  {
424
443
  label: "Insert Column Right",
425
444
  func: () => insertTableColumnAtSelection(true),
426
- icon: /* @__PURE__ */ React2.createElement(TableColumnsSplit, null)
445
+ icon: /* @__PURE__ */ jsx(TableColumnsSplit, {})
427
446
  },
428
- { label: "Delete Row", func: deleteTableRowAtSelection, icon: /* @__PURE__ */ React2.createElement(Trash, null) },
447
+ { label: "Delete Row", func: deleteTableRowAtSelection, icon: /* @__PURE__ */ jsx(Trash, {}) },
429
448
  {
430
449
  label: "Delete Column",
431
450
  func: deleteTableColumnAtSelection,
432
- icon: /* @__PURE__ */ React2.createElement(Trash, null)
451
+ icon: /* @__PURE__ */ jsx(Trash, {})
433
452
  },
434
- { label: "Delete Table", func: deleteTableAtSelection, icon: /* @__PURE__ */ React2.createElement(Trash, null) },
453
+ { label: "Delete Table", func: deleteTableAtSelection, icon: /* @__PURE__ */ jsx(Trash, {}) },
435
454
  {
436
455
  label: "Toggle Row Header",
437
456
  func: toggleTableRowIsHeader,
438
- icon: /* @__PURE__ */ React2.createElement(Table, null)
457
+ icon: /* @__PURE__ */ jsx(Table, {})
439
458
  },
440
459
  {
441
460
  label: "Toggle Column Header",
442
461
  func: toggleTableColumnIsHeader,
443
- icon: /* @__PURE__ */ React2.createElement(Table, null)
462
+ icon: /* @__PURE__ */ jsx(Table, {})
444
463
  },
445
- { label: "Toggle Striping", func: toggleRowStriping, icon: /* @__PURE__ */ React2.createElement(Table, null) }
464
+ { label: "Toggle Striping", func: toggleRowStriping, icon: /* @__PURE__ */ jsx(Table, {}) }
446
465
  ],
447
466
  [
448
- currentCellBackgroundColor(editor),
467
+ backgroundColor,
449
468
  canMergeCells,
450
469
  canUnmergeCell,
451
470
  insertTableRowAtSelection,
@@ -468,33 +487,170 @@ function TableActionMenu({
468
487
  commands.push({
469
488
  label: "Merge Cells",
470
489
  func: mergeTableCellsAtSelection,
471
- icon: /* @__PURE__ */ React2.createElement(Merge, null)
490
+ icon: /* @__PURE__ */ jsx(Merge, {})
472
491
  });
473
492
  } else if (canUnmergeCell) {
474
493
  commands.push({
475
494
  label: "Unmerge Cells",
476
495
  func: unmergeTableCellsAtSelection,
477
- icon: /* @__PURE__ */ React2.createElement(Split, null)
496
+ icon: /* @__PURE__ */ jsx(Split, {})
478
497
  });
479
498
  }
480
499
  }
481
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
482
- DropDown,
483
- {
484
- values: commands,
485
- TriggerLabel: /* @__PURE__ */ React2.createElement(Menu, { className: "w-4 h-4 " }),
486
- TriggerClassName: {
487
- height: "24px",
488
- padding: "0px 4px",
489
- position: "absolute",
490
- top: 0,
491
- right: "10px"
492
- },
493
- ShowChevronsUpDown: false,
494
- triggerVariants: "ghost",
495
- disabled: false
496
- }
497
- ), model);
500
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 bg-white/95 dark:bg-zinc-900/95 border border-zinc-200 dark:border-zinc-700/80 rounded-xl px-2 py-1 shadow-xl backdrop-blur-md text-zinc-700 dark:text-zinc-300", children: [
501
+ /* @__PURE__ */ jsxs(Popover, { modal: false, children: [
502
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
503
+ "button",
504
+ {
505
+ type: "button",
506
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
507
+ title: "Cell background color",
508
+ children: /* @__PURE__ */ jsx(PaintBucket, { className: "w-4 h-4" })
509
+ }
510
+ ) }),
511
+ /* @__PURE__ */ jsxs(
512
+ PopoverContent,
513
+ {
514
+ side: "top",
515
+ align: "center",
516
+ sideOffset: 8,
517
+ className: "p-2.5 bg-white dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-xl shadow-2xl w-44 z-50 text-zinc-900 dark:text-zinc-100",
518
+ children: [
519
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider block mb-2", children: "Cell Color" }),
520
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-1.5", children: [
521
+ { label: "Clear", color: "" },
522
+ { label: "Zinc", color: "#18181b" },
523
+ { label: "Emerald", color: "#064e3b" },
524
+ { label: "Indigo", color: "#312e81" },
525
+ { label: "Rose", color: "#881337" },
526
+ { label: "Amber", color: "#78350f" },
527
+ { label: "Cyan", color: "#164e63" },
528
+ { label: "Violet", color: "#4c1d95" }
529
+ ].map((swatch) => /* @__PURE__ */ jsx(
530
+ "button",
531
+ {
532
+ type: "button",
533
+ title: swatch.label,
534
+ onClick: () => handleCellBackgroundColor(swatch.color),
535
+ className: "w-7 h-7 rounded border border-zinc-200 dark:border-zinc-700 hover:scale-110 transition-transform relative flex items-center justify-center",
536
+ style: { backgroundColor: swatch.color || "transparent" },
537
+ children: !swatch.color && /* @__PURE__ */ jsx("span", { className: "w-3.5 h-[1.5px] bg-red-500 rotate-45 block" })
538
+ },
539
+ swatch.label
540
+ )) })
541
+ ]
542
+ }
543
+ )
544
+ ] }),
545
+ /* @__PURE__ */ jsx(
546
+ "button",
547
+ {
548
+ type: "button",
549
+ onClick: toggleTableRowIsHeader,
550
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
551
+ title: "Toggle header row",
552
+ children: /* @__PURE__ */ jsx(TableIcon, { className: "w-4 h-4" })
553
+ }
554
+ ),
555
+ /* @__PURE__ */ jsx(
556
+ "button",
557
+ {
558
+ type: "button",
559
+ onClick: deleteTableAtSelection,
560
+ className: "p-1.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-950/50 text-zinc-500 dark:text-zinc-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",
561
+ title: "Delete table",
562
+ children: /* @__PURE__ */ jsx(Trash2, { className: "w-4 h-4" })
563
+ }
564
+ ),
565
+ /* @__PURE__ */ jsx("div", { className: "w-[1px] h-4 bg-zinc-200 dark:bg-zinc-700/80 mx-1" }),
566
+ /* @__PURE__ */ jsx(
567
+ "button",
568
+ {
569
+ type: "button",
570
+ onClick: () => insertTableRowAtSelection(false),
571
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
572
+ title: "Insert row above",
573
+ children: /* @__PURE__ */ jsx(ArrowUp, { className: "w-4 h-4" })
574
+ }
575
+ ),
576
+ /* @__PURE__ */ jsx(
577
+ "button",
578
+ {
579
+ type: "button",
580
+ onClick: () => insertTableRowAtSelection(true),
581
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
582
+ title: "Insert row below",
583
+ children: /* @__PURE__ */ jsx(ArrowDown, { className: "w-4 h-4" })
584
+ }
585
+ ),
586
+ /* @__PURE__ */ jsx(
587
+ "button",
588
+ {
589
+ type: "button",
590
+ onClick: deleteTableRowAtSelection,
591
+ className: "p-1.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-950/50 text-zinc-500 dark:text-zinc-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",
592
+ title: "Delete row",
593
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
594
+ }
595
+ ),
596
+ /* @__PURE__ */ jsx("div", { className: "w-[1px] h-4 bg-zinc-200 dark:bg-zinc-700/80 mx-1" }),
597
+ /* @__PURE__ */ jsx(
598
+ "button",
599
+ {
600
+ type: "button",
601
+ onClick: () => insertTableColumnAtSelection(false),
602
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
603
+ title: "Insert column left",
604
+ children: /* @__PURE__ */ jsx(ArrowLeft, { className: "w-4 h-4" })
605
+ }
606
+ ),
607
+ /* @__PURE__ */ jsx(
608
+ "button",
609
+ {
610
+ type: "button",
611
+ onClick: () => insertTableColumnAtSelection(true),
612
+ className: "p-1.5 rounded-lg hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-300 hover:text-zinc-950 dark:hover:text-white transition-colors",
613
+ title: "Insert column right",
614
+ children: /* @__PURE__ */ jsx(ArrowRight, { className: "w-4 h-4" })
615
+ }
616
+ ),
617
+ /* @__PURE__ */ jsx(
618
+ "button",
619
+ {
620
+ type: "button",
621
+ onClick: deleteTableColumnAtSelection,
622
+ className: "p-1.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-950/50 text-zinc-500 dark:text-zinc-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",
623
+ title: "Delete column",
624
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
625
+ }
626
+ ),
627
+ canMergeCells && /* @__PURE__ */ jsxs(Fragment, { children: [
628
+ /* @__PURE__ */ jsx("div", { className: "w-[1px] h-4 bg-zinc-700/80 mx-1" }),
629
+ /* @__PURE__ */ jsx(
630
+ "button",
631
+ {
632
+ type: "button",
633
+ onClick: mergeTableCellsAtSelection,
634
+ className: "p-1.5 rounded-lg hover:bg-zinc-800 text-zinc-300 hover:text-white transition-colors",
635
+ title: "Merge selected cells",
636
+ children: /* @__PURE__ */ jsx(Merge, { className: "w-4 h-4 text-emerald-400" })
637
+ }
638
+ )
639
+ ] }),
640
+ canUnmergeCell && /* @__PURE__ */ jsxs(Fragment, { children: [
641
+ /* @__PURE__ */ jsx("div", { className: "w-[1px] h-4 bg-zinc-700/80 mx-1" }),
642
+ /* @__PURE__ */ jsx(
643
+ "button",
644
+ {
645
+ type: "button",
646
+ onClick: unmergeTableCellsAtSelection,
647
+ className: "p-1.5 rounded-lg hover:bg-zinc-800 text-zinc-300 hover:text-white transition-colors",
648
+ title: "Unmerge cells",
649
+ children: /* @__PURE__ */ jsx(Split, { className: "w-4 h-4 text-emerald-400" })
650
+ }
651
+ )
652
+ ] })
653
+ ] });
498
654
  }
499
655
  function TableCellActionMenuContainer({
500
656
  anchorElem,
@@ -516,8 +672,8 @@ function TableCellActionMenuContainer({
516
672
  }
517
673
  function disable() {
518
674
  if (menu) {
519
- menu.classList.remove("table-cell-action-button-container--active");
520
- menu.classList.add("table-cell-action-button-container--inactive");
675
+ menu.style.display = "none";
676
+ menu.style.opacity = "0";
521
677
  }
522
678
  setTableMenuCellNode(null);
523
679
  }
@@ -527,6 +683,7 @@ function TableCellActionMenuContainer({
527
683
  const rootElement = editor.getRootElement();
528
684
  let tableObserver = null;
529
685
  let tableCellParentNodeDOM = null;
686
+ let activeTableCellNode = null;
530
687
  if ($isRangeSelection(selection) && rootElement !== null && nativeSelection !== null && rootElement.contains(nativeSelection.anchorNode)) {
531
688
  const tableCellNodeFromSelection = $getTableCellNodeFromLexicalNode(
532
689
  selection.anchor.getNode()
@@ -540,59 +697,73 @@ function TableCellActionMenuContainer({
540
697
  if (tableCellParentNodeDOM == null || !tableCellNodeFromSelection.isAttached()) {
541
698
  return disable();
542
699
  }
543
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(
544
- tableCellNodeFromSelection
545
- );
546
- const tableElement = getTableElement(
547
- tableNode,
548
- editor.getElementByKey(tableNode.getKey())
549
- );
550
- invariant(
551
- tableElement !== null,
552
- "TableActionMenu: Expected to find tableElement in DOM"
553
- );
554
- tableObserver = getTableObserverFromTableElement(tableElement);
555
- setTableMenuCellNode(tableCellNodeFromSelection);
700
+ try {
701
+ const tableNode = $getTableNodeFromLexicalNodeOrThrow(
702
+ tableCellNodeFromSelection
703
+ );
704
+ const tableElement = getTableElement(
705
+ tableNode,
706
+ editor.getElementByKey(tableNode.getKey())
707
+ );
708
+ if (tableElement === null) {
709
+ return disable();
710
+ }
711
+ tableObserver = getTableObserverFromTableElement(tableElement);
712
+ activeTableCellNode = tableCellNodeFromSelection;
713
+ setTableMenuCellNode(tableCellNodeFromSelection);
714
+ } catch (e) {
715
+ return disable();
716
+ }
556
717
  } else if ($isTableSelection(selection)) {
557
- const anchorNode = $getTableCellNodeFromLexicalNode(
558
- selection.anchor.getNode()
559
- );
560
- invariant(
561
- $isTableCellNode(anchorNode),
562
- "TableSelection anchorNode must be a TableCellNode"
563
- );
564
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(anchorNode);
565
- const tableElement = getTableElement(
566
- tableNode,
567
- editor.getElementByKey(tableNode.getKey())
568
- );
569
- invariant(
570
- tableElement !== null,
571
- "TableActionMenu: Expected to find tableElement in DOM"
572
- );
573
- tableObserver = getTableObserverFromTableElement(tableElement);
574
- tableCellParentNodeDOM = editor.getElementByKey(anchorNode.getKey());
718
+ try {
719
+ const anchorNode = $getTableCellNodeFromLexicalNode(
720
+ selection.anchor.getNode()
721
+ );
722
+ if (!$isTableCellNode(anchorNode)) {
723
+ return disable();
724
+ }
725
+ const tableNode = $getTableNodeFromLexicalNodeOrThrow(anchorNode);
726
+ const tableElement = getTableElement(
727
+ tableNode,
728
+ editor.getElementByKey(tableNode.getKey())
729
+ );
730
+ if (tableElement === null) {
731
+ return disable();
732
+ }
733
+ tableObserver = getTableObserverFromTableElement(tableElement);
734
+ tableCellParentNodeDOM = editor.getElementByKey(anchorNode.getKey());
735
+ activeTableCellNode = anchorNode;
736
+ setTableMenuCellNode(anchorNode);
737
+ } catch (e) {
738
+ return disable();
739
+ }
575
740
  } else if (!activeElement) {
576
741
  return disable();
577
742
  }
578
- if (tableObserver === null || tableCellParentNodeDOM === null) {
743
+ if (tableObserver === null || tableCellParentNodeDOM === null || activeTableCellNode === null) {
579
744
  return disable();
580
745
  }
581
746
  const enabled = !tableObserver || !tableObserver.isSelecting;
582
- menu.classList.toggle(
583
- "table-cell-action-button-container--active",
584
- enabled
585
- );
586
- menu.classList.toggle(
587
- "table-cell-action-button-container--inactive",
588
- !enabled
589
- );
590
747
  if (enabled) {
748
+ menu.style.display = "block";
749
+ menu.style.opacity = "1";
591
750
  const tableCellRect = tableCellParentNodeDOM.getBoundingClientRect();
592
751
  const anchorRect = anchorElem.getBoundingClientRect();
593
- const top = tableCellRect.top - anchorRect.top;
594
- const left = tableCellRect.right - anchorRect.left;
752
+ let targetRect = tableCellRect;
753
+ try {
754
+ const tableNode = $getTableNodeFromLexicalNodeOrThrow(activeTableCellNode);
755
+ const tableDOM = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
756
+ if (tableDOM) {
757
+ targetRect = tableDOM.getBoundingClientRect();
758
+ }
759
+ } catch (e) {
760
+ }
761
+ const top = Math.max(8, targetRect.top - anchorRect.top - 46);
762
+ const left = Math.max(16, targetRect.left - anchorRect.left + targetRect.width / 2 - 160);
595
763
  menu.style.transform = `translate(${left}px, ${top}px)`;
764
+ } else {
765
+ menu.style.display = "none";
766
+ menu.style.opacity = "0";
596
767
  }
597
768
  }, [editor, anchorElem]);
598
769
  useEffect(() => {
@@ -630,20 +801,20 @@ function TableCellActionMenuContainer({
630
801
  useEffect(() => {
631
802
  prevTableCellDOM.current = tableCellNode;
632
803
  }, [prevTableCellDOM, tableCellNode]);
633
- return /* @__PURE__ */ React2.createElement(
804
+ return /* @__PURE__ */ jsx(
634
805
  "div",
635
806
  {
636
- className: " absolute top-1 left-1 will-change-transform",
637
- ref: menuButtonRef
638
- },
639
- tableCellNode != null && /* @__PURE__ */ React2.createElement(
640
- TableActionMenu,
641
- {
642
- contextRef: menuRootRef,
643
- tableCellNode,
644
- cellMerge
645
- }
646
- )
807
+ className: "absolute top-1 left-1 will-change-transform z-40 transition-opacity duration-150",
808
+ ref: menuButtonRef,
809
+ children: tableCellNode != null && /* @__PURE__ */ jsx(
810
+ TableActionMenu,
811
+ {
812
+ contextRef: menuRootRef,
813
+ tableCellNode,
814
+ cellMerge
815
+ }
816
+ )
817
+ }
647
818
  );
648
819
  }
649
820
  function TableActionMenuPlugin({
@@ -652,7 +823,7 @@ function TableActionMenuPlugin({
652
823
  }) {
653
824
  const isEditable = useLexicalEditable();
654
825
  return createPortal(
655
- isEditable ? /* @__PURE__ */ React2.createElement(
826
+ isEditable ? /* @__PURE__ */ jsx(
656
827
  TableCellActionMenuContainer,
657
828
  {
658
829
  anchorElem,