@collabchron/notiq 1.1.10 → 1.1.12

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 (411) hide show
  1. package/README.md +281 -259
  2. package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +12 -0
  3. package/dist/AIDialog-RHRYHSVN.mjs +325 -0
  4. package/dist/AudioComponent-CKLMLB5T.mjs +278 -0
  5. package/dist/CodeActionMenuPlugin-FGH6HZLL.mjs +14 -0
  6. package/dist/CollaborationPlugin-TIZOQBUT.mjs +405 -0
  7. package/dist/CollaboratorsBar-AMPIAUOY.mjs +20 -0
  8. package/dist/CommentsPlugin-SDJJTUGK.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-BMSYIPP6.mjs +662 -0
  12. package/dist/ExcalidrawPlugin-QLPGJPSX.mjs +14 -0
  13. package/dist/ExportPlugin-MJHYKQZJ.mjs +43 -0
  14. package/dist/FileComponent-Y56MX5QD.mjs +200 -0
  15. package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +12 -0
  16. package/dist/FloatingTextFormatToolbarPlugin-BXCPN3KD.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-KV5DX4ED.mjs +982 -0
  21. package/dist/SlashCommand-SPR7G5EI.mjs +39 -0
  22. package/dist/StoryBuilderComponent-JN4ZPZOW.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-F52PVNXU.mjs +823 -0
  27. package/dist/VersionHistoryPlugin-YWGCREKA.mjs +371 -0
  28. package/dist/babel-RJXDAKDM.mjs +7287 -0
  29. package/dist/background-color-RW5JYLMG.mjs +425 -0
  30. package/dist/block-format-TODFREE2.mjs +14 -0
  31. package/dist/{chunk-RBWZGXPF.mjs → chunk-22ZIL6NH.mjs} +5 -5
  32. package/dist/{chunk-DSFQHA7I.mjs → chunk-2LNT36RL.mjs} +118 -295
  33. package/dist/chunk-37LC44W3.mjs +2677 -0
  34. package/dist/{chunk-GK35L7UY.mjs → chunk-3IILA3IP.mjs} +1 -1
  35. package/dist/chunk-3JN6QEJR.mjs +31 -0
  36. package/dist/{chunk-5BAKY5KN.mjs → chunk-43Z4Z2KD.mjs} +5 -8
  37. package/dist/{chunk-GXYD4VZM.mjs → chunk-4DVIYZVB.mjs} +1 -1
  38. package/dist/{chunk-7NZAPJ4G.mjs → chunk-4FFTOZGJ.mjs} +4 -3
  39. package/dist/chunk-4UMUPCDK.mjs +68 -0
  40. package/dist/chunk-5D4JF3ZZ.mjs +624 -0
  41. package/dist/{chunk-POGRR73N.mjs → chunk-5NRAXWYA.mjs} +4 -3
  42. package/dist/{chunk-PZSUSXQG.mjs → chunk-6D6QLRYR.mjs} +2 -2
  43. package/dist/chunk-6FQFPPLG.mjs +785 -0
  44. package/dist/{chunk-3CPBODXA.mjs → chunk-6UVNHT3T.mjs} +7 -27
  45. package/dist/{chunk-G53GLEAY.mjs → chunk-7QRJVZQY.mjs} +47 -22
  46. package/dist/chunk-ACV47ZKE.mjs +201 -0
  47. package/dist/{chunk-FSM26655.mjs → chunk-AMXRQ2TK.mjs} +4 -4
  48. package/dist/{chunk-YUDCJRJM.mjs → chunk-BGV62GC2.mjs} +3 -2
  49. package/dist/{chunk-2FNEAMSP.mjs → chunk-C4JWLBYN.mjs} +50 -45
  50. package/dist/{chunk-TCYK7DM7.mjs → chunk-CDAMHK63.mjs} +4 -3
  51. package/dist/chunk-CLRSETYQ.mjs +431 -0
  52. package/dist/{chunk-QHIQKMVN.mjs → chunk-D3IOUQFR.mjs} +125 -111
  53. package/dist/chunk-EEBA6OAH.mjs +59 -0
  54. package/dist/{chunk-YKC3SO4Z.mjs → chunk-EIZMKFHF.mjs} +1 -1
  55. package/dist/{chunk-N3WN46VL.mjs → chunk-ELBTVBTS.mjs} +23 -22
  56. package/dist/chunk-ENH2IOHI.mjs +1828 -0
  57. package/dist/{chunk-4EXYCTGJ.mjs → chunk-EVPWKNE4.mjs} +3 -3
  58. package/dist/{chunk-LGG4IUIA.mjs → chunk-FO7M3X2B.mjs} +2 -2
  59. package/dist/{chunk-WDG7J2DY.mjs → chunk-H3P47YXJ.mjs} +30 -19
  60. package/dist/chunk-HOZ4QRFV.mjs +536 -0
  61. package/dist/{chunk-5QSNIVIG.mjs → chunk-IAFCQV3Z.mjs} +94 -78
  62. package/dist/{chunk-64Z3FI7T.mjs → chunk-IIVB6JNE.mjs} +5 -4
  63. package/dist/chunk-IUOUIDEQ.mjs +70 -0
  64. package/dist/chunk-J6ZUY5BY.mjs +202 -0
  65. package/dist/{chunk-YHPNOWFH.mjs → chunk-JHXDLYEV.mjs} +1 -1
  66. package/dist/{chunk-ZB5LZQKC.mjs → chunk-K5OAFEVY.mjs} +1 -1
  67. package/dist/{chunk-3JVFG7ER.mjs → chunk-KNW2CGIP.mjs} +7 -64
  68. package/dist/{chunk-4HBCVSE6.mjs → chunk-KXRLARGI.mjs} +1 -1
  69. package/dist/{chunk-4GFXER7R.mjs → chunk-LBGM4VVZ.mjs} +141 -89
  70. package/dist/chunk-LLGVCM7M.mjs +809 -0
  71. package/dist/chunk-LU2XWLOE.mjs +219 -0
  72. package/dist/chunk-LVRJM45C.mjs +171 -0
  73. package/dist/{chunk-K36V4SIW.mjs → chunk-MSAO3YFB.mjs} +21 -18
  74. package/dist/chunk-N3KDPSRI.mjs +496 -0
  75. package/dist/chunk-N3WTT2U6.mjs +21 -0
  76. package/dist/{chunk-GZPNVR7L.mjs → chunk-N6ILV6NF.mjs} +7 -6
  77. package/dist/{chunk-QEIFVK5M.mjs → chunk-NBE6FF6L.mjs} +4 -4
  78. package/dist/{chunk-BIU7WTLX.mjs → chunk-OE5JRLCN.mjs} +21 -18
  79. package/dist/chunk-OXWTZV3U.mjs +174 -0
  80. package/dist/{chunk-Z4EWP7BI.mjs → chunk-PD5K4AGP.mjs} +22 -23
  81. package/dist/chunk-PFH63ZU4.mjs +33 -0
  82. package/dist/{chunk-HJPPNHYM.mjs → chunk-QNIY45SF.mjs} +4 -3
  83. package/dist/chunk-R7WFRENU.mjs +262 -0
  84. package/dist/{chunk-4VWFVWYP.mjs → chunk-RAVYEEIC.mjs} +1 -1
  85. package/dist/chunk-RJQTA6HG.mjs +358 -0
  86. package/dist/{chunk-7VUMHWWL.mjs → chunk-SAOJHVPE.mjs} +5 -4
  87. package/dist/{chunk-456TN7IM.mjs → chunk-SYUCM5G5.mjs} +15 -14
  88. package/dist/{chunk-4MEDW3T6.mjs → chunk-T2UBAZ66.mjs} +5 -4
  89. package/dist/chunk-TC3IISJZ.mjs +408 -0
  90. package/dist/chunk-VGAX6YEY.mjs +399 -0
  91. package/dist/chunk-VNDDDXGH.mjs +682 -0
  92. package/dist/{chunk-U47ABU5Z.mjs → chunk-W6VQSFE5.mjs} +2 -2
  93. package/dist/chunk-WUVIQCX7.mjs +944 -0
  94. package/dist/chunk-WYCFGRFJ.mjs +118 -0
  95. package/dist/chunk-XNJNT6PC.mjs +1701 -0
  96. package/dist/chunk-XYLTLGY5.mjs +775 -0
  97. package/dist/chunk-XYMXGU4T.mjs +129 -0
  98. package/dist/{chunk-3G37YKTV.mjs → chunk-YR2DD74C.mjs} +9 -8
  99. package/dist/chunk-ZFV2HGD3.mjs +143 -0
  100. package/dist/{chunk-77UA6HYR.mjs → chunk-ZKZ7MLSS.mjs} +1 -1
  101. package/dist/chunk-ZYJ7KABY.mjs +419 -0
  102. package/dist/color-S55XFDYQ.mjs +13 -0
  103. package/dist/components/canvas/CanvasMode.d.ts +18 -0
  104. package/dist/components/editor/Core.d.ts +19 -0
  105. package/dist/components/editor/index.d.ts +38 -0
  106. package/dist/components/editor/lexical-on-change.d.ts +1 -0
  107. package/dist/components/editor/nodes/AudioNode/AudioComponent.d.ts +15 -0
  108. package/dist/components/editor/nodes/AudioNode/index.d.ts +36 -0
  109. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleContainerNode.d.ts +22 -0
  110. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleContentNode.d.ts +18 -0
  111. package/dist/components/editor/nodes/CollapsibleNode/CollapsibleTitleNode.d.ts +19 -0
  112. package/dist/components/editor/nodes/DynamicBlockNode/DynamicBlockComponent.d.ts +7 -0
  113. package/dist/components/editor/nodes/DynamicBlockNode/DynamicBlockNode.d.ts +49 -0
  114. package/dist/components/editor/nodes/EquationNode/EquationComponent.d.ts +16 -0
  115. package/dist/components/editor/nodes/EquationNode/EquationNode.d.ts +33 -0
  116. package/dist/components/editor/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +15 -0
  117. package/dist/components/editor/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +57 -0
  118. package/dist/components/editor/nodes/ExcalidrawNode/ImageResizer.d.ts +24 -0
  119. package/dist/components/editor/nodes/ExcalidrawNode/index.d.ts +39 -0
  120. package/dist/components/editor/nodes/FigmaNode/FigmaNode.d.ts +27 -0
  121. package/dist/components/editor/nodes/FileNode/FileComponent.d.ts +16 -0
  122. package/dist/components/editor/nodes/FileNode/index.d.ts +39 -0
  123. package/dist/components/editor/nodes/Hint/HintComponet.d.ts +20 -0
  124. package/dist/components/editor/nodes/Hint/index.d.ts +33 -0
  125. package/dist/components/editor/nodes/ImageNode/index.d.ts +62 -0
  126. package/dist/components/editor/nodes/InlineImageNode/InlineImageComponent.d.ts +25 -0
  127. package/dist/components/editor/nodes/InlineImageNode/InlineImageNode.d.ts +66 -0
  128. package/dist/components/editor/nodes/LayoutNode/LayoutContainerNode.d.ts +31 -0
  129. package/dist/components/editor/nodes/LayoutNode/LayoutItemNode.d.ts +21 -0
  130. package/dist/components/editor/nodes/PollNode/index.d.ts +34 -0
  131. package/dist/components/editor/nodes/Stepper/index.d.ts +66 -0
  132. package/dist/components/editor/nodes/StoryBuilderNode/StoryBuilderComponent.d.ts +10 -0
  133. package/dist/components/editor/nodes/StoryBuilderNode/StoryBuilderNode.d.ts +59 -0
  134. package/dist/components/editor/nodes/TweetNode/index.d.ts +21 -0
  135. package/dist/components/editor/nodes/index.d.ts +4 -0
  136. package/dist/components/editor/plugins/AICommandBarPlugin/index.d.ts +7 -0
  137. package/dist/components/editor/plugins/AudioPlugin/index.d.ts +1 -0
  138. package/dist/components/editor/plugins/AutoEmbedPlugin/index.d.ts +19 -0
  139. package/dist/components/editor/plugins/AutoLinkPlugin/index.d.ts +1 -0
  140. package/dist/components/editor/plugins/CodeActionMenuPlugin/components/CopyButton.d.ts +8 -0
  141. package/dist/components/editor/plugins/CodeActionMenuPlugin/components/PrettierButton.d.ts +9 -0
  142. package/dist/components/editor/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
  143. package/dist/components/editor/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  144. package/dist/components/editor/plugins/CodeHighlightPlugin/index.d.ts +11 -0
  145. package/dist/components/editor/plugins/CollaborationPlugin/CollaboratorsBar.d.ts +9 -0
  146. package/dist/components/editor/plugins/CollaborationPlugin/index.d.ts +8 -0
  147. package/dist/components/editor/plugins/CollapsiblePlugin/index.d.ts +4 -0
  148. package/dist/components/editor/plugins/CommentsPlugin/CommentThreadItem.d.ts +7 -0
  149. package/dist/components/editor/plugins/CommentsPlugin/CommentsSidebar.d.ts +2 -0
  150. package/dist/components/editor/plugins/CommentsPlugin/MentionsAutocomplete.d.ts +22 -0
  151. package/dist/components/editor/plugins/CommentsPlugin/NewCommentDialog.d.ts +2 -0
  152. package/dist/components/editor/plugins/CommentsPlugin/index.d.ts +5 -0
  153. package/dist/components/editor/plugins/ContentAnalyticsPlugin/index.d.ts +1 -0
  154. package/dist/components/editor/plugins/DragDropPastePlugin/index.d.ts +1 -0
  155. package/dist/components/editor/plugins/DraggableBlockPlugin/index.d.ts +5 -0
  156. package/dist/components/editor/plugins/DynamicBlockPlugin/index.d.ts +7 -0
  157. package/dist/components/editor/plugins/EquationsPlugin/index.d.ts +20 -0
  158. package/dist/components/editor/plugins/ExcalidrawPlugin/index.d.ts +5 -0
  159. package/dist/components/editor/plugins/ExportPlugin/ImportExportModal.d.ts +9 -0
  160. package/dist/components/editor/plugins/ExportPlugin/index.d.ts +28 -0
  161. package/dist/components/editor/plugins/FigmaPlugin/index.d.ts +11 -0
  162. package/dist/components/editor/plugins/FilePlugin/index.d.ts +1 -0
  163. package/dist/components/editor/plugins/FloatingLinkEditorPlugin/index.d.ts +6 -0
  164. package/dist/components/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +6 -0
  165. package/dist/components/editor/plugins/ImagesPlugin/index.d.ts +14 -0
  166. package/dist/components/editor/plugins/InlineCopilotPlugin/index.d.ts +32 -0
  167. package/dist/components/editor/plugins/InlineImagePlugin/index.d.ts +16 -0
  168. package/dist/components/editor/plugins/LayoutPlugin/index.d.ts +14 -0
  169. package/dist/components/editor/plugins/LinkPlugin/index.d.ts +13 -0
  170. package/dist/components/editor/plugins/LinkWithMetaData/index.d.ts +46 -0
  171. package/dist/components/editor/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
  172. package/dist/components/editor/plugins/MarkdownTransformers/index.d.ts +12 -0
  173. package/dist/components/editor/plugins/PollPlugin/index.d.ts +4 -0
  174. package/dist/components/editor/plugins/ShortcutsPlugin/index.d.ts +13 -0
  175. package/dist/components/editor/plugins/ShortcutsPlugin/shortcuts.d.ts +58 -0
  176. package/dist/components/editor/plugins/SlashCommand/index.d.ts +25 -0
  177. package/dist/components/editor/plugins/SpeechToTextPlugin/index.d.ts +5 -0
  178. package/dist/components/editor/plugins/StoryBuilderPlugin/index.d.ts +7 -0
  179. package/dist/components/editor/plugins/TabFocusPlugin/index.d.ts +1 -0
  180. package/dist/components/editor/plugins/TableCellActionMenuPlugin/index.d.ts +5 -0
  181. package/dist/components/editor/plugins/TableCellResizer/index.d.ts +2 -0
  182. package/dist/components/editor/plugins/TableHoverActionsPlugin/index.d.ts +4 -0
  183. package/dist/components/editor/plugins/TablePlugin/index.d.ts +27 -0
  184. package/dist/components/editor/plugins/TemplatePlugin/TemplateDialog.d.ts +1 -0
  185. package/dist/components/editor/plugins/TemplatePlugin/index.d.ts +3 -0
  186. package/dist/components/editor/plugins/ToolbarPlugin/MobileToolbar.d.ts +10 -0
  187. package/dist/components/editor/plugins/ToolbarPlugin/index.d.ts +11 -0
  188. package/dist/components/editor/plugins/TwitterPlugin/index.d.ts +4 -0
  189. package/dist/components/editor/plugins/VersionHistoryPlugin/NameVersionModal.d.ts +2 -0
  190. package/dist/components/editor/plugins/VersionHistoryPlugin/VersionHistoryDrawer.d.ts +2 -0
  191. package/dist/components/editor/plugins/VersionHistoryPlugin/index.d.ts +2 -0
  192. package/dist/components/editor/plugins/YouTubeNode/index.d.ts +22 -0
  193. package/dist/components/editor/plugins/YouTubePlugin/index.d.ts +11 -0
  194. package/dist/components/editor/templates/data.d.ts +7 -0
  195. package/dist/components/editor/themes/editor-theme.d.ts +3 -0
  196. package/dist/components/editor/utils/ai.d.ts +27 -0
  197. package/dist/components/editor/utils/canUseDOM.d.ts +8 -0
  198. package/dist/components/editor/utils/codeLanguages.d.ts +3 -0
  199. package/dist/components/editor/utils/diffUtils.d.ts +10 -0
  200. package/dist/components/editor/utils/editorFormatting.d.ts +26 -0
  201. package/dist/components/editor/utils/environment.d.ts +17 -0
  202. package/dist/components/editor/utils/extract-data.d.ts +8 -0
  203. package/dist/components/editor/utils/getAllLexicalChildren.d.ts +6 -0
  204. package/dist/components/editor/utils/getDOMRangeRect.d.ts +8 -0
  205. package/dist/components/editor/utils/getSelectedNode.d.ts +2 -0
  206. package/dist/components/editor/utils/gif.d.ts +7 -0
  207. package/dist/components/editor/utils/importUtils.d.ts +27 -0
  208. package/dist/components/editor/utils/invariant.d.ts +1 -0
  209. package/dist/components/editor/utils/markdownTransformers.d.ts +20 -0
  210. package/dist/components/editor/utils/setFloatingElemPosition.d.ts +1 -0
  211. package/dist/components/editor/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  212. package/dist/components/editor/utils/setNodePlaceholderFromSelection/getNodePlaceholder.d.ts +2 -0
  213. package/dist/components/editor/utils/setNodePlaceholderFromSelection/setNodePlaceholderFromSelection.d.ts +2 -0
  214. package/dist/components/editor/utils/setNodePlaceholderFromSelection/setPlaceholderOnSelection.d.ts +5 -0
  215. package/dist/components/editor/utils/url.d.ts +11 -0
  216. package/dist/components/editor/utils/useLayoutEffect.d.ts +3 -0
  217. package/dist/components/providers/AIContext.d.ts +21 -0
  218. package/dist/components/providers/CollabContext.d.ts +92 -0
  219. package/dist/components/providers/CommentsContext.d.ts +48 -0
  220. package/dist/components/providers/QueryProvider.d.ts +5 -0
  221. package/dist/components/providers/SharedHistoryContext.d.ts +11 -0
  222. package/dist/components/providers/ToolbarContext.d.ts +61 -0
  223. package/dist/components/providers/UploadContext.d.ts +29 -0
  224. package/dist/components/providers/VersionHistoryContext.d.ts +33 -0
  225. package/dist/components/providers/theme-provider.d.ts +3 -0
  226. package/dist/components/theme/ModeToggle.d.ts +2 -0
  227. package/dist/components/ui/ContentEditable.d.ts +15 -0
  228. package/dist/components/ui/FileInput.d.ts +16 -0
  229. package/dist/components/ui/Modal.d.ts +15 -0
  230. package/dist/components/ui/Select.d.ts +14 -0
  231. package/dist/components/ui/TextInput.d.ts +19 -0
  232. package/dist/components/ui/accordion.d.ts +7 -0
  233. package/dist/components/ui/ai/AIDialog.d.ts +9 -0
  234. package/dist/components/ui/ai/ai-button.d.ts +5 -0
  235. package/dist/components/ui/ai/border.d.ts +8 -0
  236. package/dist/components/ui/ai/placeholder-input-vanish.d.ts +6 -0
  237. package/dist/components/ui/badge.d.ts +9 -0
  238. package/dist/components/ui/button.d.ts +12 -0
  239. package/dist/components/ui/card.d.ts +8 -0
  240. package/dist/components/ui/checkbox.d.ts +4 -0
  241. package/dist/components/ui/command.d.ts +80 -0
  242. package/dist/components/ui/dialog/Dialog.d.ts +16 -0
  243. package/dist/components/ui/dialog.d.ts +19 -0
  244. package/dist/components/ui/drop-downs/background-color.d.ts +12 -0
  245. package/dist/components/ui/drop-downs/block-format.d.ts +25 -0
  246. package/dist/components/ui/drop-downs/code.d.ts +6 -0
  247. package/dist/components/ui/drop-downs/codeTheme.d.ts +8 -0
  248. package/dist/components/ui/drop-downs/color.d.ts +12 -0
  249. package/dist/components/ui/drop-downs/font-size.d.ts +10 -0
  250. package/dist/components/ui/drop-downs/font.d.ts +11 -0
  251. package/dist/components/ui/drop-downs/index.d.ts +24 -0
  252. package/dist/components/ui/drop-downs/insert-node.d.ts +6 -0
  253. package/dist/components/ui/drop-downs/table-dropdown.d.ts +10 -0
  254. package/dist/components/ui/drop-downs/text-align.d.ts +8 -0
  255. package/dist/components/ui/drop-downs/text-format.d.ts +11 -0
  256. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  257. package/dist/components/ui/equation/EquationEditor.d.ts +14 -0
  258. package/dist/components/ui/equation/KatexEquationAlterer.d.ts +14 -0
  259. package/dist/components/ui/equation/KatexRenderer.d.ts +13 -0
  260. package/dist/components/ui/excalidraw/ExcalidrawModal.d.ts +48 -0
  261. package/dist/components/ui/excalidraw/Modal.d.ts +16 -0
  262. package/dist/components/ui/hover-card.d.ts +6 -0
  263. package/dist/components/ui/icons/brand-icons.d.ts +5 -0
  264. package/dist/components/ui/image/error-image.d.ts +2 -0
  265. package/dist/components/ui/image/file-upload.d.ts +8 -0
  266. package/dist/components/ui/image/image-resizer.d.ts +10 -0
  267. package/dist/components/ui/image/image-toolbar.d.ts +8 -0
  268. package/dist/components/ui/image/index.d.ts +16 -0
  269. package/dist/components/ui/image/lazy-image.d.ts +10 -0
  270. package/dist/components/ui/image/lazy-video.d.ts +11 -0
  271. package/dist/components/ui/input.d.ts +3 -0
  272. package/dist/components/ui/label.d.ts +5 -0
  273. package/dist/components/ui/models/custom-dialog.d.ts +58 -0
  274. package/dist/components/ui/models/insert-audio.d.ts +7 -0
  275. package/dist/components/ui/models/insert-file.d.ts +7 -0
  276. package/dist/components/ui/models/insert-gif.d.ts +7 -0
  277. package/dist/components/ui/models/insert-image.d.ts +6 -0
  278. package/dist/components/ui/models/insert-poll.d.ts +5 -0
  279. package/dist/components/ui/models/insert-table.d.ts +6 -0
  280. package/dist/components/ui/models/use-model.d.ts +6 -0
  281. package/dist/components/ui/poll/poll-component.d.ts +8 -0
  282. package/dist/components/ui/popover.d.ts +7 -0
  283. package/dist/components/ui/progress.d.ts +4 -0
  284. package/dist/components/ui/scroll-area.d.ts +5 -0
  285. package/dist/components/ui/separator.d.ts +4 -0
  286. package/dist/components/ui/skeleton.d.ts +2 -0
  287. package/dist/components/ui/sonner.d.ts +4 -0
  288. package/dist/components/ui/stepper/step.d.ts +11 -0
  289. package/dist/components/ui/stepper/stepper.d.ts +6 -0
  290. package/dist/components/ui/tabs.d.ts +7 -0
  291. package/dist/components/ui/textarea.d.ts +3 -0
  292. package/dist/components/ui/toggle.d.ts +14 -0
  293. package/dist/components/ui/tooltip.d.ts +7 -0
  294. package/dist/components/ui/write/text-format-floating.d.ts +27 -0
  295. package/dist/components/ui/write/text-format-floting-toolbar.d.ts +26 -0
  296. package/dist/core/chain.d.ts +4 -0
  297. package/dist/core/editor.d.ts +42 -0
  298. package/dist/core/extension.d.ts +20 -0
  299. package/dist/core/extensions/blocks-kit.d.ts +14 -0
  300. package/dist/core/extensions/copilot-and-collab.d.ts +10 -0
  301. package/dist/core/extensions/nodes-and-marks.d.ts +36 -0
  302. package/dist/core/index.d.ts +10 -0
  303. package/dist/core/react/BubbleMenu.d.ts +13 -0
  304. package/dist/core/react/FloatingMenu.d.ts +12 -0
  305. package/dist/core/react/NotiqContent.d.ts +11 -0
  306. package/dist/core/react/NotiqEditor.d.ts +29 -0
  307. package/dist/core/react/context.d.ts +15 -0
  308. package/dist/core/react/index.d.ts +8 -0
  309. package/dist/core/react/useNotiq.d.ts +16 -0
  310. package/dist/core/types.d.ts +89 -0
  311. package/dist/core.d.ts +1 -0
  312. package/dist/core.js +74458 -0
  313. package/dist/core.mjs +138 -0
  314. package/dist/estree-QRALCFII.mjs +5029 -0
  315. package/dist/font-IJKFR4BM.mjs +12 -0
  316. package/dist/font-size-3HMJHKO2.mjs +15 -0
  317. package/dist/hooks/instructions-messages.d.ts +11 -0
  318. package/dist/hooks/use-mobile.d.ts +1 -0
  319. package/dist/hooks/useModal.d.ts +12 -0
  320. package/dist/hooks/useReport.d.ts +8 -0
  321. package/dist/hooks/useResizeObservert.d.ts +1 -0
  322. package/dist/html-CE2S5FIJ.mjs +3185 -0
  323. package/dist/{image-2PJIAYAT.mjs → image-QPB2CVXP.mjs} +359 -324
  324. package/dist/index.d.ts +13 -145
  325. package/dist/index.js +61491 -44350
  326. package/dist/index.mjs +466 -1569
  327. package/dist/insert-audio-I3PD6JFS.mjs +180 -0
  328. package/dist/insert-file-PHR7XL4V.mjs +190 -0
  329. package/dist/insert-gif-R5ZO4JHC.mjs +112 -0
  330. package/dist/insert-image-PLBZELHK.mjs +348 -0
  331. package/dist/insert-node-DGCZBGKG.mjs +243 -0
  332. package/dist/insert-poll-6BCIFY5G.mjs +36 -0
  333. package/dist/insert-table-ZRJP6X52.mjs +70 -0
  334. package/dist/lib/edgestore.d.ts +2 -0
  335. package/dist/lib/index.d.ts +0 -0
  336. package/dist/lib/pinecone-client.d.ts +3 -0
  337. package/dist/lib/utils.d.ts +2 -0
  338. package/dist/markdown-GMCB4RDA.mjs +6753 -0
  339. package/dist/{poll-component-2R4MDLHS.mjs → poll-component-VHMM5KKZ.mjs} +126 -95
  340. package/dist/{postcss-ONF3VDIM.mjs → postcss-GH4QXSB5.mjs} +1879 -1697
  341. package/dist/react.d.ts +1 -0
  342. package/dist/react.js +73860 -0
  343. package/dist/react.mjs +66 -0
  344. package/dist/standalone-A6VDOPCZ.mjs +2506 -0
  345. package/dist/stepper-KNITDVLG.mjs +356 -0
  346. package/dist/styles/notiq.css +2 -2
  347. package/dist/styles/tailwind-plugin.d.ts +4 -0
  348. package/dist/table-dropdown-4VCRSQB6.mjs +391 -0
  349. package/dist/{text-align-VLECWO4H.mjs → text-align-TEB4S52S.mjs} +22 -19
  350. package/dist/text-format-T3IY7FBI.mjs +15 -0
  351. package/dist/typescript-CGC67LRI.mjs +13392 -0
  352. package/dist/utils/docSerialization.d.ts +10 -0
  353. package/dist/utils/emoji-list.d.ts +27 -0
  354. package/dist/utils/getDOMRangeRect.d.ts +8 -0
  355. package/dist/utils/getSelectedNode.d.ts +2 -0
  356. package/dist/utils/getThemeSelector.d.ts +9 -0
  357. package/dist/utils/html.d.ts +9 -0
  358. package/dist/utils/htmlExport.d.ts +9 -0
  359. package/dist/utils/isMobileWidth.d.ts +7 -0
  360. package/dist/utils/joinClasses.d.ts +8 -0
  361. package/dist/utils/setFloatingElemPosition.d.ts +1 -0
  362. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  363. package/dist/utils/swipe.d.ts +11 -0
  364. package/dist/utils/url.d.ts +9 -0
  365. package/package.json +128 -105
  366. package/src/styles/notiq.css +1315 -1150
  367. package/dist/CodeActionMenuPlugin-EINOY4U4.mjs +0 -15
  368. package/dist/DynamicBlockComponent-NRQJ4WW4.mjs +0 -161
  369. package/dist/ExcalidrawComponent-LUZJNFWV.mjs +0 -528
  370. package/dist/ExcalidrawPlugin-HC2L43YG.mjs +0 -14
  371. package/dist/ExportPlugin-V2RLM63S.mjs +0 -11
  372. package/dist/FloatingLinkEditorPlugin-TRTCMSP4.mjs +0 -12
  373. package/dist/FloatingTextFormatToolbarPlugin-ENECEZSX.mjs +0 -30
  374. package/dist/HintComponet-BRL6EAMS.mjs +0 -217
  375. package/dist/MobileToolbar-BOOZAMQE.mjs +0 -268
  376. package/dist/SlashCommand-FHEWHFZU.mjs +0 -28
  377. package/dist/StoryBuilderComponent-JGDBM5JU.mjs +0 -562
  378. package/dist/ToolbarPlugin-2VP7FDWD.mjs +0 -1547
  379. package/dist/babel-JZ2EV6AX.mjs +0 -7233
  380. package/dist/background-color-XZTYLGO2.mjs +0 -362
  381. package/dist/block-format-YJCV2DIY.mjs +0 -15
  382. package/dist/chunk-77KXU36M.mjs +0 -64
  383. package/dist/chunk-AMMKBSST.mjs +0 -1256
  384. package/dist/chunk-EGMI62PP.mjs +0 -83
  385. package/dist/chunk-JXDPPUJI.mjs +0 -52
  386. package/dist/chunk-KJ6AJ44Q.mjs +0 -128
  387. package/dist/chunk-NOJDE3CE.mjs +0 -1906
  388. package/dist/chunk-NZXC6FGU.mjs +0 -214
  389. package/dist/chunk-PBD6LMLC.mjs +0 -366
  390. package/dist/chunk-TTHQCW5F.mjs +0 -47
  391. package/dist/chunk-V2NIZOSQ.mjs +0 -538
  392. package/dist/chunk-WAK5JGNJ.mjs +0 -315
  393. package/dist/chunk-YMBXLRW5.mjs +0 -374
  394. package/dist/chunk-YPHOEJ46.mjs +0 -64
  395. package/dist/chunk-ZJRKATOJ.mjs +0 -65
  396. package/dist/color-BPKOPQKN.mjs +0 -12
  397. package/dist/estree-XC56IUFX.mjs +0 -4414
  398. package/dist/font-FEZ3GKSF.mjs +0 -13
  399. package/dist/font-size-EK775WRH.mjs +0 -15
  400. package/dist/html-S3ACX7NI.mjs +0 -2738
  401. package/dist/index.d.mts +0 -145
  402. package/dist/insert-gif-SAIDYURE.mjs +0 -100
  403. package/dist/insert-image-U3RJN3OW.mjs +0 -259
  404. package/dist/insert-node-WXW4ZER4.mjs +0 -201
  405. package/dist/insert-poll-HCPM7MO6.mjs +0 -33
  406. package/dist/insert-table-24XYUS2W.mjs +0 -66
  407. package/dist/markdown-SNVBOSRA.mjs +0 -3487
  408. package/dist/standalone-EOIALU3M.mjs +0 -2373
  409. package/dist/stepper-JDEE26TX.mjs +0 -304
  410. package/dist/text-format-BG5WOOPZ.mjs +0 -16
  411. package/dist/typescript-AMPI6OVS.mjs +0 -13135
@@ -0,0 +1,982 @@
1
+ "use client";
2
+ import {
3
+ INSERT_EXCALIDRAW_COMMAND
4
+ } from "./chunk-22ZIL6NH.mjs";
5
+ import {
6
+ INSERT_COMMENT_COMMAND
7
+ } from "./chunk-WUVIQCX7.mjs";
8
+ import "./chunk-3JN6QEJR.mjs";
9
+ import "./chunk-6UVNHT3T.mjs";
10
+ import {
11
+ SPEECH_TO_TEXT_COMMAND,
12
+ SUPPORT_SPEECH_RECOGNITION
13
+ } from "./chunk-ZKZ7MLSS.mjs";
14
+ import {
15
+ AutoEmbedDialog,
16
+ INSERT_LAYOUT_COMMAND,
17
+ Youtube,
18
+ YoutubeEmbedConfig
19
+ } from "./chunk-XYLTLGY5.mjs";
20
+ import {
21
+ useModal
22
+ } from "./chunk-IAFCQV3Z.mjs";
23
+ import "./chunk-VGAX6YEY.mjs";
24
+ import "./chunk-OXWTZV3U.mjs";
25
+ import "./chunk-R7WFRENU.mjs";
26
+ import "./chunk-RJQTA6HG.mjs";
27
+ import {
28
+ Skeleton
29
+ } from "./chunk-NBE6FF6L.mjs";
30
+ import "./chunk-5NRAXWYA.mjs";
31
+ import {
32
+ sanitizeUrl
33
+ } from "./chunk-RAVYEEIC.mjs";
34
+ import "./chunk-TC3IISJZ.mjs";
35
+ import "./chunk-H3P47YXJ.mjs";
36
+ import "./chunk-QNIY45SF.mjs";
37
+ import "./chunk-OE5JRLCN.mjs";
38
+ import {
39
+ INSERT_HINT_COMMAND
40
+ } from "./chunk-7QRJVZQY.mjs";
41
+ import {
42
+ cn
43
+ } from "./chunk-JHXDLYEV.mjs";
44
+ import {
45
+ init_react_shim
46
+ } from "./chunk-WYCFGRFJ.mjs";
47
+
48
+ // src/components/editor/plugins/ToolbarPlugin/MobileToolbar.tsx
49
+ init_react_shim();
50
+ import { useEffect, useState, useMemo, lazy, Suspense, useCallback, useRef } from "react";
51
+ import {
52
+ $getSelection,
53
+ $isRangeSelection,
54
+ FORMAT_TEXT_COMMAND,
55
+ FORMAT_ELEMENT_COMMAND,
56
+ REDO_COMMAND,
57
+ UNDO_COMMAND
58
+ } from "lexical";
59
+ import {
60
+ Bold,
61
+ Italic,
62
+ Underline,
63
+ Strikethrough,
64
+ Undo2,
65
+ Redo2,
66
+ Heading1,
67
+ Heading2,
68
+ Heading3,
69
+ Type,
70
+ List,
71
+ ListOrdered,
72
+ Link as LinkIcon,
73
+ Code,
74
+ Quote,
75
+ CheckSquare,
76
+ AlignLeft,
77
+ AlignCenter,
78
+ AlignRight,
79
+ Mic,
80
+ Plus,
81
+ Image,
82
+ FileAudio,
83
+ FileText,
84
+ Table,
85
+ SquarePenIcon,
86
+ DraftingCompassIcon,
87
+ AlertCircle,
88
+ FlipHorizontal2,
89
+ Columns2,
90
+ ChevronDown,
91
+ Palette,
92
+ Sparkles,
93
+ Eraser,
94
+ MessageSquarePlus,
95
+ ArrowDownUp
96
+ } from "lucide-react";
97
+ import { TOGGLE_LINK_COMMAND } from "@lexical/link";
98
+ import {
99
+ INSERT_ORDERED_LIST_COMMAND,
100
+ INSERT_UNORDERED_LIST_COMMAND,
101
+ INSERT_CHECK_LIST_COMMAND
102
+ } from "@lexical/list";
103
+ import { $createHeadingNode, $createQuoteNode } from "@lexical/rich-text";
104
+ import { $setBlocksType, $patchStyleText } from "@lexical/selection";
105
+ import { INSERT_HORIZONTAL_RULE_COMMAND } from "@lexical/react/LexicalHorizontalRuleNode";
106
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
107
+ var InsertImageDialog = lazy(
108
+ () => import("./insert-image-PLBZELHK.mjs").then((m) => ({ default: m.InsertImageDialog }))
109
+ );
110
+ var InsertAudioDialog = lazy(
111
+ () => import("./insert-audio-I3PD6JFS.mjs").then((m) => ({ default: m.InsertAudioDialog }))
112
+ );
113
+ var InsertFileDialog = lazy(
114
+ () => import("./insert-file-PHR7XL4V.mjs").then((m) => ({ default: m.InsertFileDialog }))
115
+ );
116
+ var InsertTableBody = lazy(
117
+ () => import("./insert-table-ZRJP6X52.mjs").then((m) => ({ default: m.InsertTable }))
118
+ );
119
+ var InsertPoll = lazy(
120
+ () => import("./insert-poll-6BCIFY5G.mjs").then((m) => ({ default: m.InsertPoll }))
121
+ );
122
+ var TEXT_COLORS = [
123
+ { label: "Default", color: "inherit", bg: "bg-foreground" },
124
+ { label: "Blue", color: "#2563eb", bg: "bg-blue-600" },
125
+ { label: "Purple", color: "#7c3aed", bg: "bg-purple-600" },
126
+ { label: "Emerald", color: "#059669", bg: "bg-emerald-600" },
127
+ { label: "Amber", color: "#d97706", bg: "bg-amber-600" },
128
+ { label: "Rose", color: "#e11d48", bg: "bg-rose-600" }
129
+ ];
130
+ var HIGHLIGHT_COLORS = [
131
+ { label: "None", color: "transparent", border: "border-border" },
132
+ { label: "Yellow", color: "#fef08a", bg: "bg-yellow-200" },
133
+ { label: "Green", color: "#bbf7d0", bg: "bg-green-200" },
134
+ { label: "Blue", color: "#bfdbfe", bg: "bg-blue-200" },
135
+ { label: "Pink", color: "#fbcfe8", bg: "bg-pink-200" },
136
+ { label: "Orange", color: "#fed7aa", bg: "bg-orange-200" }
137
+ ];
138
+ function MobileToolbar({
139
+ editor,
140
+ activeEditor,
141
+ toolbarState,
142
+ setIsLinkEditMode,
143
+ isVisible,
144
+ toolbarConfig
145
+ }) {
146
+ const [activeTab, setActiveTab] = useState("format");
147
+ const [isKeyboardOpen, setIsKeyboardOpen] = useState(false);
148
+ const [bottomOffset, setBottomOffset] = useState(0);
149
+ const [isSpeechActive, setIsSpeechActive] = useState(false);
150
+ const [isExpanded, setIsExpanded] = useState(false);
151
+ const [insertCategory, setInsertCategory] = useState("all");
152
+ const [modal, showModal] = useModal();
153
+ const targetEditor = activeEditor || editor;
154
+ useEffect(() => {
155
+ if (isVisible || isKeyboardOpen) {
156
+ setIsExpanded(true);
157
+ }
158
+ }, [isVisible, isKeyboardOpen]);
159
+ const scrollContainerRef = useRef(null);
160
+ const [canScrollLeft, setCanScrollLeft] = useState(false);
161
+ const [canScrollRight, setCanScrollRight] = useState(true);
162
+ const checkScrollAffordance = useCallback(() => {
163
+ const el = scrollContainerRef.current;
164
+ if (!el) return;
165
+ setCanScrollLeft(el.scrollLeft > 4);
166
+ setCanScrollRight(el.scrollLeft < el.scrollWidth - el.clientWidth - 4);
167
+ }, []);
168
+ useEffect(() => {
169
+ checkScrollAffordance();
170
+ }, [activeTab, checkScrollAffordance]);
171
+ useEffect(() => {
172
+ const visualViewport = window.visualViewport;
173
+ if (!visualViewport) return;
174
+ const handleResize = () => {
175
+ const windowHeight = window.innerHeight;
176
+ const viewportHeight = visualViewport.height;
177
+ const offsetTop = visualViewport.offsetTop;
178
+ const viewportBottom = offsetTop + viewportHeight;
179
+ const diff = windowHeight - viewportBottom;
180
+ setBottomOffset(Math.max(0, Math.min(diff, windowHeight * 0.55)));
181
+ const keyboardIsOpen = viewportHeight < windowHeight * 0.82;
182
+ setIsKeyboardOpen(keyboardIsOpen);
183
+ if (keyboardIsOpen) {
184
+ setIsExpanded(true);
185
+ }
186
+ };
187
+ visualViewport.addEventListener("resize", handleResize);
188
+ visualViewport.addEventListener("scroll", handleResize);
189
+ handleResize();
190
+ return () => {
191
+ visualViewport.removeEventListener("resize", handleResize);
192
+ visualViewport.removeEventListener("scroll", handleResize);
193
+ };
194
+ }, []);
195
+ const handleOpenDock = useCallback(
196
+ (e) => {
197
+ if (e) {
198
+ e.preventDefault();
199
+ e.stopPropagation();
200
+ }
201
+ setIsExpanded(true);
202
+ try {
203
+ targetEditor.focus();
204
+ } catch (e2) {
205
+ }
206
+ },
207
+ [targetEditor]
208
+ );
209
+ const handleCloseDock = useCallback((e) => {
210
+ if (e) {
211
+ e.preventDefault();
212
+ e.stopPropagation();
213
+ }
214
+ setIsExpanded(false);
215
+ }, []);
216
+ const shouldShow = isExpanded;
217
+ const formatHeading = (level) => {
218
+ targetEditor.update(() => {
219
+ const selection = $getSelection();
220
+ if ($isRangeSelection(selection)) {
221
+ $setBlocksType(selection, () => $createHeadingNode(level));
222
+ }
223
+ });
224
+ };
225
+ const formatQuote = () => {
226
+ targetEditor.update(() => {
227
+ const selection = $getSelection();
228
+ if ($isRangeSelection(selection)) {
229
+ $setBlocksType(selection, () => $createQuoteNode());
230
+ }
231
+ });
232
+ };
233
+ const applyColor = (color) => {
234
+ targetEditor.update(() => {
235
+ const selection = $getSelection();
236
+ if ($isRangeSelection(selection)) {
237
+ $patchStyleText(selection, { color: color === "inherit" ? "" : color });
238
+ }
239
+ });
240
+ };
241
+ const applyHighlight = (bgColor) => {
242
+ targetEditor.update(() => {
243
+ const selection = $getSelection();
244
+ if ($isRangeSelection(selection)) {
245
+ $patchStyleText(selection, {
246
+ "background-color": bgColor === "transparent" ? "" : bgColor
247
+ });
248
+ }
249
+ });
250
+ };
251
+ const toggleSpeech = () => {
252
+ if (!SUPPORT_SPEECH_RECOGNITION) return;
253
+ const next = !isSpeechActive;
254
+ setIsSpeechActive(next);
255
+ targetEditor.dispatchCommand(SPEECH_TO_TEXT_COMMAND, next);
256
+ };
257
+ const handleInsertLink = () => {
258
+ if (!toolbarState.isLink) {
259
+ setIsLinkEditMode(true);
260
+ targetEditor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl("https://"));
261
+ } else {
262
+ setIsLinkEditMode(false);
263
+ targetEditor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
264
+ }
265
+ };
266
+ const INSERT_BLOCKS = useMemo(
267
+ () => [
268
+ {
269
+ id: "image",
270
+ category: "media",
271
+ label: "Image",
272
+ desc: "Upload photo or web URL",
273
+ icon: Image,
274
+ color: "text-blue-500 bg-blue-500/10 dark:bg-blue-500/20",
275
+ action: () => {
276
+ showModal(
277
+ "Insert Image",
278
+ "Upload an image from your device or paste a URL.",
279
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-48 rounded-xl" }), children: /* @__PURE__ */ jsx(InsertImageDialog, { activeEditor: targetEditor, onClose }) }),
280
+ true
281
+ );
282
+ }
283
+ },
284
+ {
285
+ id: "audio",
286
+ category: "media",
287
+ label: "Audio Track",
288
+ desc: "Interactive player with speed controls",
289
+ icon: FileAudio,
290
+ color: "text-emerald-500 bg-emerald-500/10 dark:bg-emerald-500/20",
291
+ action: () => {
292
+ showModal(
293
+ "Insert Audio Player",
294
+ "Attach an audio clip, voice memo, or music track.",
295
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-48 rounded-xl" }), children: /* @__PURE__ */ jsx(InsertAudioDialog, { activeEditor: targetEditor, onClose }) }),
296
+ true
297
+ );
298
+ }
299
+ },
300
+ {
301
+ id: "file",
302
+ category: "media",
303
+ label: "Document File",
304
+ desc: "PDF, Word, Excel, ZIP or code file",
305
+ icon: FileText,
306
+ color: "text-amber-500 bg-amber-500/10 dark:bg-amber-500/20",
307
+ action: () => {
308
+ showModal(
309
+ "Attach Document",
310
+ "Upload a document or document archive to download.",
311
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-48 rounded-xl" }), children: /* @__PURE__ */ jsx(InsertFileDialog, { activeEditor: targetEditor, onClose }) }),
312
+ true
313
+ );
314
+ }
315
+ },
316
+ {
317
+ id: "youtube",
318
+ category: "media",
319
+ label: "YouTube Video",
320
+ desc: "Embed streaming video player",
321
+ icon: Youtube,
322
+ color: "text-red-500 bg-red-500/10 dark:bg-red-500/20",
323
+ action: () => {
324
+ showModal(
325
+ "Embed YouTube Video",
326
+ "Paste a YouTube video URL to embed it in the page.",
327
+ (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: YoutubeEmbedConfig, onClose }),
328
+ true
329
+ );
330
+ }
331
+ },
332
+ {
333
+ id: "table",
334
+ category: "blocks",
335
+ label: "Data Table",
336
+ desc: "Configurable rows and columns",
337
+ icon: Table,
338
+ color: "text-purple-500 bg-purple-500/10 dark:bg-purple-500/20",
339
+ action: () => {
340
+ showModal(
341
+ "Insert Table",
342
+ "Choose rows and columns for your data table.",
343
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-32 rounded-xl" }), children: /* @__PURE__ */ jsx(InsertTableBody, { activeEditor: targetEditor, onClose }) }),
344
+ true
345
+ );
346
+ }
347
+ },
348
+ {
349
+ id: "poll",
350
+ category: "blocks",
351
+ label: "Voting Poll",
352
+ desc: "Interactive multi-choice question",
353
+ icon: SquarePenIcon,
354
+ color: "text-rose-500 bg-rose-500/10 dark:bg-rose-500/20",
355
+ action: () => {
356
+ showModal(
357
+ "Create Poll",
358
+ "Add a voting poll with customizable choices.",
359
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-32 rounded-xl" }), children: /* @__PURE__ */ jsx(InsertPoll, { activeEditor: targetEditor, onClose }) }),
360
+ true
361
+ );
362
+ }
363
+ },
364
+ {
365
+ id: "excalidraw",
366
+ category: "blocks",
367
+ label: "Sketch Canvas",
368
+ desc: "Hand-drawn diagram and whiteboard",
369
+ icon: DraftingCompassIcon,
370
+ color: "text-orange-500 bg-orange-500/10 dark:bg-orange-500/20",
371
+ action: () => {
372
+ targetEditor.dispatchCommand(INSERT_EXCALIDRAW_COMMAND, void 0);
373
+ }
374
+ },
375
+ {
376
+ id: "hint",
377
+ category: "blocks",
378
+ label: "Callout Card",
379
+ desc: "Colored highlight note or tip",
380
+ icon: AlertCircle,
381
+ color: "text-indigo-500 bg-indigo-500/10 dark:bg-indigo-500/20",
382
+ action: () => {
383
+ targetEditor.dispatchCommand(INSERT_HINT_COMMAND, "info");
384
+ }
385
+ },
386
+ {
387
+ id: "columns",
388
+ category: "blocks",
389
+ label: "2 Columns",
390
+ desc: "Side-by-side content container",
391
+ icon: Columns2,
392
+ color: "text-teal-500 bg-teal-500/10 dark:bg-teal-500/20",
393
+ action: () => {
394
+ targetEditor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr");
395
+ }
396
+ },
397
+ {
398
+ id: "hr",
399
+ category: "blocks",
400
+ label: "Divider",
401
+ desc: "Clean horizontal separator line",
402
+ icon: FlipHorizontal2,
403
+ color: "text-slate-500 bg-slate-500/10 dark:bg-slate-500/20",
404
+ action: () => {
405
+ targetEditor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, void 0);
406
+ }
407
+ }
408
+ ],
409
+ [targetEditor, showModal]
410
+ );
411
+ const filteredBlocks = useMemo(() => {
412
+ if (insertCategory === "all") return INSERT_BLOCKS;
413
+ return INSERT_BLOCKS.filter((b) => b.category === insertCategory);
414
+ }, [INSERT_BLOCKS, insertCategory]);
415
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
416
+ modal,
417
+ !shouldShow && /* @__PURE__ */ jsx("div", { className: "fixed bottom-5 right-4 z-40 md:hidden animate-in fade-in zoom-in-95 duration-200", children: /* @__PURE__ */ jsxs(
418
+ "button",
419
+ {
420
+ type: "button",
421
+ onClick: handleOpenDock,
422
+ className: "flex items-center gap-2 px-4 py-2.5 rounded-full bg-primary text-primary-foreground shadow-2xl shadow-primary/40 text-xs font-semibold active:scale-95 transition-all touch-manipulation border border-primary/20 backdrop-blur-md cursor-pointer",
423
+ "aria-label": "Open formatting dock",
424
+ children: [
425
+ /* @__PURE__ */ jsx(Sparkles, { className: "w-3.5 h-3.5 text-amber-300 animate-pulse" }),
426
+ /* @__PURE__ */ jsx("span", { children: "Format & Insert" })
427
+ ]
428
+ }
429
+ ) }),
430
+ /* @__PURE__ */ jsx(
431
+ "div",
432
+ {
433
+ className: cn(
434
+ "fixed left-0 right-0 w-full z-50 md:hidden transition-transform duration-300 ease-out",
435
+ shouldShow ? "translate-y-0" : "translate-y-[120%] pointer-events-none"
436
+ ),
437
+ style: {
438
+ bottom: `${bottomOffset}px`
439
+ },
440
+ children: /* @__PURE__ */ jsxs(
441
+ "div",
442
+ {
443
+ className: cn(
444
+ "w-full bg-background/95 dark:bg-zinc-950/95 backdrop-blur-2xl border-t border-border/80 shadow-2xl pointer-events-auto rounded-t-2xl",
445
+ "pb-[max(0.5rem,env(safe-area-inset-bottom))]",
446
+ toolbarConfig == null ? void 0 : toolbarConfig.mobileClassName
447
+ ),
448
+ onMouseDown: (e) => {
449
+ if (e.target instanceof Element && e.target.tagName !== "INPUT") {
450
+ e.preventDefault();
451
+ }
452
+ },
453
+ children: [
454
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2 pb-1", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 rounded-full bg-muted-foreground/25" }) }),
455
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 pb-1.5 border-b border-border/50 text-xs", children: [
456
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 bg-muted/50 p-0.5 rounded-xl border border-border/40", children: [
457
+ /* @__PURE__ */ jsxs(
458
+ "button",
459
+ {
460
+ type: "button",
461
+ onClick: () => setActiveTab("format"),
462
+ className: cn(
463
+ "flex items-center gap-1 px-2.5 py-1 rounded-lg font-medium transition-all text-xs touch-manipulation",
464
+ activeTab === "format" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
465
+ ),
466
+ children: [
467
+ /* @__PURE__ */ jsx(Type, { className: "w-3.5 h-3.5" }),
468
+ /* @__PURE__ */ jsx("span", { children: "Format" })
469
+ ]
470
+ }
471
+ ),
472
+ /* @__PURE__ */ jsxs(
473
+ "button",
474
+ {
475
+ type: "button",
476
+ onClick: () => setActiveTab("insert"),
477
+ className: cn(
478
+ "flex items-center gap-1 px-2.5 py-1 rounded-lg font-medium transition-all text-xs touch-manipulation",
479
+ activeTab === "insert" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
480
+ ),
481
+ children: [
482
+ /* @__PURE__ */ jsx(Plus, { className: "w-3.5 h-3.5" }),
483
+ /* @__PURE__ */ jsx("span", { children: "Insert" })
484
+ ]
485
+ }
486
+ ),
487
+ /* @__PURE__ */ jsxs(
488
+ "button",
489
+ {
490
+ type: "button",
491
+ onClick: () => setActiveTab("style"),
492
+ className: cn(
493
+ "flex items-center gap-1 px-2.5 py-1 rounded-lg font-medium transition-all text-xs touch-manipulation",
494
+ activeTab === "style" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
495
+ ),
496
+ children: [
497
+ /* @__PURE__ */ jsx(Palette, { className: "w-3.5 h-3.5" }),
498
+ /* @__PURE__ */ jsx("span", { children: "Style" })
499
+ ]
500
+ }
501
+ )
502
+ ] }),
503
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
504
+ SUPPORT_SPEECH_RECOGNITION && /* @__PURE__ */ jsxs(
505
+ "button",
506
+ {
507
+ type: "button",
508
+ onClick: toggleSpeech,
509
+ className: cn(
510
+ "flex items-center gap-1 px-2 py-1 rounded-lg text-[11px] font-medium transition-all touch-manipulation",
511
+ isSpeechActive ? "bg-rose-500 text-white animate-pulse" : "text-muted-foreground hover:bg-muted"
512
+ ),
513
+ title: "Speech to Text",
514
+ "aria-label": "Toggle voice typing",
515
+ children: [
516
+ /* @__PURE__ */ jsx(Mic, { className: "w-3.5 h-3.5" }),
517
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: isSpeechActive ? "Listening..." : "Dictate" })
518
+ ]
519
+ }
520
+ ),
521
+ /* @__PURE__ */ jsx(
522
+ "button",
523
+ {
524
+ type: "button",
525
+ onClick: handleCloseDock,
526
+ className: "p-1.5 rounded-lg text-muted-foreground hover:bg-muted active:scale-95 transition-colors touch-manipulation cursor-pointer",
527
+ "aria-label": "Dismiss mobile toolbar",
528
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4" })
529
+ }
530
+ )
531
+ ] })
532
+ ] }),
533
+ activeTab === "format" && /* @__PURE__ */ jsxs("div", { className: "relative w-full", children: [
534
+ /* @__PURE__ */ jsx(
535
+ "div",
536
+ {
537
+ className: cn(
538
+ "pointer-events-none absolute left-0 top-0 bottom-0 w-5 bg-gradient-to-r from-background to-transparent z-10 transition-opacity duration-200",
539
+ canScrollLeft ? "opacity-100" : "opacity-0"
540
+ )
541
+ }
542
+ ),
543
+ /* @__PURE__ */ jsx(
544
+ "div",
545
+ {
546
+ className: cn(
547
+ "pointer-events-none absolute right-0 top-0 bottom-0 w-5 bg-gradient-to-l from-background to-transparent z-10 transition-opacity duration-200",
548
+ canScrollRight ? "opacity-100" : "opacity-0"
549
+ )
550
+ }
551
+ ),
552
+ /* @__PURE__ */ jsxs(
553
+ "div",
554
+ {
555
+ ref: scrollContainerRef,
556
+ onScroll: checkScrollAffordance,
557
+ className: "flex items-center gap-1.5 px-3 py-2 overflow-x-auto no-scrollbar scroll-smooth w-full",
558
+ children: [
559
+ /* @__PURE__ */ jsx(
560
+ "button",
561
+ {
562
+ type: "button",
563
+ disabled: !toolbarState.canUndo,
564
+ onClick: (e) => {
565
+ e.preventDefault();
566
+ targetEditor.dispatchCommand(UNDO_COMMAND, void 0);
567
+ },
568
+ className: cn(
569
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all touch-manipulation",
570
+ toolbarState.canUndo ? "text-foreground hover:bg-muted active:scale-95" : "text-muted-foreground/30 cursor-not-allowed"
571
+ ),
572
+ "aria-label": "Undo",
573
+ children: /* @__PURE__ */ jsx(Undo2, { className: "w-4 h-4" })
574
+ }
575
+ ),
576
+ /* @__PURE__ */ jsx(
577
+ "button",
578
+ {
579
+ type: "button",
580
+ disabled: !toolbarState.canRedo,
581
+ onClick: (e) => {
582
+ e.preventDefault();
583
+ targetEditor.dispatchCommand(REDO_COMMAND, void 0);
584
+ },
585
+ className: cn(
586
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all touch-manipulation",
587
+ toolbarState.canRedo ? "text-foreground hover:bg-muted active:scale-95" : "text-muted-foreground/30 cursor-not-allowed"
588
+ ),
589
+ "aria-label": "Redo",
590
+ children: /* @__PURE__ */ jsx(Redo2, { className: "w-4 h-4" })
591
+ }
592
+ ),
593
+ /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border/60 mx-0.5 flex-shrink-0" }),
594
+ /* @__PURE__ */ jsx(
595
+ "button",
596
+ {
597
+ type: "button",
598
+ onClick: (e) => {
599
+ e.preventDefault();
600
+ targetEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold");
601
+ },
602
+ className: cn(
603
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
604
+ toolbarState.isBold ? "bg-primary text-primary-foreground font-bold shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
605
+ ),
606
+ "aria-label": "Bold",
607
+ children: /* @__PURE__ */ jsx(Bold, { className: "w-4 h-4 stroke-[2.5]" })
608
+ }
609
+ ),
610
+ /* @__PURE__ */ jsx(
611
+ "button",
612
+ {
613
+ type: "button",
614
+ onClick: (e) => {
615
+ e.preventDefault();
616
+ targetEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic");
617
+ },
618
+ className: cn(
619
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
620
+ toolbarState.isItalic ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
621
+ ),
622
+ "aria-label": "Italic",
623
+ children: /* @__PURE__ */ jsx(Italic, { className: "w-4 h-4 stroke-[2.5]" })
624
+ }
625
+ ),
626
+ /* @__PURE__ */ jsx(
627
+ "button",
628
+ {
629
+ type: "button",
630
+ onClick: (e) => {
631
+ e.preventDefault();
632
+ targetEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "underline");
633
+ },
634
+ className: cn(
635
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
636
+ toolbarState.isUnderline ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
637
+ ),
638
+ "aria-label": "Underline",
639
+ children: /* @__PURE__ */ jsx(Underline, { className: "w-4 h-4 stroke-[2.5]" })
640
+ }
641
+ ),
642
+ /* @__PURE__ */ jsx(
643
+ "button",
644
+ {
645
+ type: "button",
646
+ onClick: (e) => {
647
+ e.preventDefault();
648
+ targetEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "strikethrough");
649
+ },
650
+ className: cn(
651
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
652
+ toolbarState.isStrikethrough ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
653
+ ),
654
+ "aria-label": "Strikethrough",
655
+ children: /* @__PURE__ */ jsx(Strikethrough, { className: "w-4 h-4 stroke-[2.5]" })
656
+ }
657
+ ),
658
+ /* @__PURE__ */ jsx(
659
+ "button",
660
+ {
661
+ type: "button",
662
+ onClick: (e) => {
663
+ e.preventDefault();
664
+ targetEditor.dispatchCommand(FORMAT_TEXT_COMMAND, "code");
665
+ },
666
+ className: cn(
667
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation font-mono",
668
+ toolbarState.isCode ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
669
+ ),
670
+ "aria-label": "Inline Code",
671
+ children: /* @__PURE__ */ jsx(Code, { className: "w-4 h-4 stroke-[2.5]" })
672
+ }
673
+ ),
674
+ /* @__PURE__ */ jsx(
675
+ "button",
676
+ {
677
+ type: "button",
678
+ onClick: (e) => {
679
+ e.preventDefault();
680
+ handleInsertLink();
681
+ },
682
+ className: cn(
683
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
684
+ toolbarState.isLink ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
685
+ ),
686
+ "aria-label": "Link",
687
+ children: /* @__PURE__ */ jsx(LinkIcon, { className: "w-4 h-4 stroke-[2.5]" })
688
+ }
689
+ ),
690
+ /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border/60 mx-0.5 flex-shrink-0" }),
691
+ /* @__PURE__ */ jsx(
692
+ "button",
693
+ {
694
+ type: "button",
695
+ onClick: (e) => {
696
+ e.preventDefault();
697
+ formatHeading("h1");
698
+ },
699
+ className: cn(
700
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
701
+ toolbarState.blockType === "h1" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20 font-bold" : "text-muted-foreground hover:bg-muted"
702
+ ),
703
+ "aria-label": "Heading 1",
704
+ children: /* @__PURE__ */ jsx(Heading1, { className: "w-4 h-4 stroke-[2.5]" })
705
+ }
706
+ ),
707
+ /* @__PURE__ */ jsx(
708
+ "button",
709
+ {
710
+ type: "button",
711
+ onClick: (e) => {
712
+ e.preventDefault();
713
+ formatHeading("h2");
714
+ },
715
+ className: cn(
716
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
717
+ toolbarState.blockType === "h2" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20 font-bold" : "text-muted-foreground hover:bg-muted"
718
+ ),
719
+ "aria-label": "Heading 2",
720
+ children: /* @__PURE__ */ jsx(Heading2, { className: "w-4 h-4 stroke-[2.5]" })
721
+ }
722
+ ),
723
+ /* @__PURE__ */ jsx(
724
+ "button",
725
+ {
726
+ type: "button",
727
+ onClick: (e) => {
728
+ e.preventDefault();
729
+ formatHeading("h3");
730
+ },
731
+ className: cn(
732
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
733
+ toolbarState.blockType === "h3" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20 font-bold" : "text-muted-foreground hover:bg-muted"
734
+ ),
735
+ "aria-label": "Heading 3",
736
+ children: /* @__PURE__ */ jsx(Heading3, { className: "w-4 h-4 stroke-[2.5]" })
737
+ }
738
+ ),
739
+ /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border/60 mx-0.5 flex-shrink-0" }),
740
+ /* @__PURE__ */ jsx(
741
+ "button",
742
+ {
743
+ type: "button",
744
+ onClick: (e) => {
745
+ e.preventDefault();
746
+ targetEditor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0);
747
+ },
748
+ className: cn(
749
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
750
+ toolbarState.blockType === "bullet" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
751
+ ),
752
+ "aria-label": "Bullet list",
753
+ children: /* @__PURE__ */ jsx(List, { className: "w-4 h-4 stroke-[2.5]" })
754
+ }
755
+ ),
756
+ /* @__PURE__ */ jsx(
757
+ "button",
758
+ {
759
+ type: "button",
760
+ onClick: (e) => {
761
+ e.preventDefault();
762
+ targetEditor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0);
763
+ },
764
+ className: cn(
765
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
766
+ toolbarState.blockType === "number" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
767
+ ),
768
+ "aria-label": "Numbered list",
769
+ children: /* @__PURE__ */ jsx(ListOrdered, { className: "w-4 h-4 stroke-[2.5]" })
770
+ }
771
+ ),
772
+ /* @__PURE__ */ jsx(
773
+ "button",
774
+ {
775
+ type: "button",
776
+ onClick: (e) => {
777
+ e.preventDefault();
778
+ targetEditor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0);
779
+ },
780
+ className: cn(
781
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
782
+ toolbarState.blockType === "check" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
783
+ ),
784
+ "aria-label": "Checklist",
785
+ children: /* @__PURE__ */ jsx(CheckSquare, { className: "w-4 h-4 stroke-[2.5]" })
786
+ }
787
+ ),
788
+ /* @__PURE__ */ jsx(
789
+ "button",
790
+ {
791
+ type: "button",
792
+ onClick: (e) => {
793
+ e.preventDefault();
794
+ formatQuote();
795
+ },
796
+ className: cn(
797
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
798
+ toolbarState.blockType === "quote" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
799
+ ),
800
+ "aria-label": "Quote",
801
+ children: /* @__PURE__ */ jsx(Quote, { className: "w-4 h-4 stroke-[2.5]" })
802
+ }
803
+ ),
804
+ /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border/60 mx-0.5 flex-shrink-0" }),
805
+ /* @__PURE__ */ jsx(
806
+ "button",
807
+ {
808
+ type: "button",
809
+ onClick: (e) => {
810
+ e.preventDefault();
811
+ targetEditor.dispatchCommand(FORMAT_ELEMENT_COMMAND, "left");
812
+ },
813
+ className: cn(
814
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
815
+ toolbarState.elementFormat === "left" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
816
+ ),
817
+ "aria-label": "Align left",
818
+ children: /* @__PURE__ */ jsx(AlignLeft, { className: "w-4 h-4 stroke-[2.5]" })
819
+ }
820
+ ),
821
+ /* @__PURE__ */ jsx(
822
+ "button",
823
+ {
824
+ type: "button",
825
+ onClick: (e) => {
826
+ e.preventDefault();
827
+ targetEditor.dispatchCommand(FORMAT_ELEMENT_COMMAND, "center");
828
+ },
829
+ className: cn(
830
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
831
+ toolbarState.elementFormat === "center" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
832
+ ),
833
+ "aria-label": "Align center",
834
+ children: /* @__PURE__ */ jsx(AlignCenter, { className: "w-4 h-4 stroke-[2.5]" })
835
+ }
836
+ ),
837
+ /* @__PURE__ */ jsx(
838
+ "button",
839
+ {
840
+ type: "button",
841
+ onClick: (e) => {
842
+ e.preventDefault();
843
+ targetEditor.dispatchCommand(FORMAT_ELEMENT_COMMAND, "right");
844
+ },
845
+ className: cn(
846
+ "flex items-center justify-center min-w-[36px] h-9 rounded-xl transition-all active:scale-95 touch-manipulation",
847
+ toolbarState.elementFormat === "right" ? "bg-primary text-primary-foreground shadow-md shadow-primary/20" : "text-muted-foreground hover:bg-muted"
848
+ ),
849
+ "aria-label": "Align right",
850
+ children: /* @__PURE__ */ jsx(AlignRight, { className: "w-4 h-4 stroke-[2.5]" })
851
+ }
852
+ ),
853
+ /* @__PURE__ */ jsx("div", { className: "w-px h-5 bg-border/60 mx-0.5 flex-shrink-0" }),
854
+ /* @__PURE__ */ jsx(
855
+ "button",
856
+ {
857
+ type: "button",
858
+ onClick: (e) => {
859
+ e.preventDefault();
860
+ targetEditor.dispatchCommand(INSERT_COMMENT_COMMAND, void 0);
861
+ },
862
+ className: "flex items-center justify-center min-w-[36px] h-9 rounded-xl text-muted-foreground hover:bg-muted active:scale-95 transition-all touch-manipulation",
863
+ "aria-label": "Add inline comment",
864
+ children: /* @__PURE__ */ jsx(MessageSquarePlus, { className: "w-4 h-4" })
865
+ }
866
+ ),
867
+ /* @__PURE__ */ jsx(
868
+ "button",
869
+ {
870
+ type: "button",
871
+ onClick: (e) => {
872
+ e.preventDefault();
873
+ if (typeof window !== "undefined") {
874
+ window.dispatchEvent(
875
+ new CustomEvent("notiq:open-import-export", {
876
+ detail: { defaultTab: "export" }
877
+ })
878
+ );
879
+ }
880
+ },
881
+ className: "flex items-center justify-center min-w-[36px] h-9 rounded-xl text-muted-foreground hover:bg-muted active:scale-95 transition-all touch-manipulation",
882
+ "aria-label": "Import & Export document",
883
+ title: "Import / Export",
884
+ children: /* @__PURE__ */ jsx(ArrowDownUp, { className: "w-4 h-4" })
885
+ }
886
+ )
887
+ ]
888
+ }
889
+ )
890
+ ] }),
891
+ activeTab === "insert" && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 space-y-2.5", children: [
892
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 pb-1 overflow-x-auto no-scrollbar", children: ["all", "media", "blocks"].map((cat) => /* @__PURE__ */ jsx(
893
+ "button",
894
+ {
895
+ type: "button",
896
+ onClick: () => setInsertCategory(cat),
897
+ className: cn(
898
+ "px-3 py-1 rounded-full text-xs font-medium capitalize transition-all touch-manipulation",
899
+ insertCategory === cat ? "bg-primary text-primary-foreground shadow-sm" : "bg-muted/60 text-muted-foreground hover:bg-muted"
900
+ ),
901
+ children: cat === "all" ? "All Blocks" : cat === "media" ? "Media & Files" : "Rich Blocks"
902
+ },
903
+ cat
904
+ )) }),
905
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 max-h-[42dvh] overflow-y-auto pr-0.5", children: filteredBlocks.map((block) => {
906
+ const Icon = block.icon;
907
+ return /* @__PURE__ */ jsxs(
908
+ "button",
909
+ {
910
+ type: "button",
911
+ onClick: (e) => {
912
+ e.preventDefault();
913
+ block.action();
914
+ },
915
+ className: "flex items-center gap-2.5 p-2.5 rounded-xl bg-card hover:bg-muted/70 active:scale-97 transition-all touch-manipulation border border-border/50 text-left shadow-sm",
916
+ children: [
917
+ /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-center w-9 h-9 rounded-xl flex-shrink-0", block.color), children: /* @__PURE__ */ jsx(Icon, { className: "w-4 h-4" }) }),
918
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
919
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold text-foreground truncate", children: block.label }),
920
+ /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground truncate leading-tight mt-0.5", children: block.desc })
921
+ ] })
922
+ ]
923
+ },
924
+ block.id
925
+ );
926
+ }) })
927
+ ] }),
928
+ activeTab === "style" && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2.5 space-y-3", children: [
929
+ /* @__PURE__ */ jsxs("div", { children: [
930
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5", children: "Text Color" }),
931
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-x-auto no-scrollbar", children: TEXT_COLORS.map((tc) => /* @__PURE__ */ jsxs(
932
+ "button",
933
+ {
934
+ type: "button",
935
+ onClick: () => applyColor(tc.color),
936
+ className: "flex flex-col items-center gap-1 min-w-[44px] py-1 rounded-lg hover:bg-muted active:scale-95 transition-all touch-manipulation",
937
+ children: [
938
+ /* @__PURE__ */ jsx(
939
+ "span",
940
+ {
941
+ className: cn("w-6 h-6 rounded-full border border-border/60 shadow-sm flex items-center justify-center", tc.bg)
942
+ }
943
+ ),
944
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground font-medium", children: tc.label })
945
+ ]
946
+ },
947
+ tc.label
948
+ )) })
949
+ ] }),
950
+ /* @__PURE__ */ jsxs("div", { children: [
951
+ /* @__PURE__ */ jsx("div", { className: "text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5", children: "Highlight Background" }),
952
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 overflow-x-auto no-scrollbar", children: HIGHLIGHT_COLORS.map((hc) => /* @__PURE__ */ jsxs(
953
+ "button",
954
+ {
955
+ type: "button",
956
+ onClick: () => applyHighlight(hc.color),
957
+ className: "flex flex-col items-center gap-1 min-w-[44px] py-1 rounded-lg hover:bg-muted active:scale-95 transition-all touch-manipulation",
958
+ children: [
959
+ /* @__PURE__ */ jsx(
960
+ "span",
961
+ {
962
+ className: cn("w-6 h-6 rounded-lg border shadow-sm flex items-center justify-center", hc.bg || "bg-transparent", hc.border),
963
+ children: hc.color === "transparent" && /* @__PURE__ */ jsx(Eraser, { className: "w-3 h-3 text-muted-foreground" })
964
+ }
965
+ ),
966
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground font-medium", children: hc.label })
967
+ ]
968
+ },
969
+ hc.label
970
+ )) })
971
+ ] })
972
+ ] })
973
+ ]
974
+ }
975
+ )
976
+ }
977
+ )
978
+ ] });
979
+ }
980
+ export {
981
+ MobileToolbar as default
982
+ };