@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
@@ -0,0 +1,348 @@
1
+ import {
2
+ Card,
3
+ CardContent
4
+ } from "./chunk-YR2DD74C.mjs";
5
+ import {
6
+ INSERT_IMAGE_COMMAND
7
+ } from "./chunk-MW6MAUY3.mjs";
8
+ import {
9
+ useUpload
10
+ } from "./chunk-N3WTT2U6.mjs";
11
+ import "./chunk-GYYLZ3MQ.mjs";
12
+ import {
13
+ Button
14
+ } from "./chunk-OE5JRLCN.mjs";
15
+ import {
16
+ cn
17
+ } from "./chunk-JHXDLYEV.mjs";
18
+ import {
19
+ __objRest,
20
+ __spreadProps,
21
+ __spreadValues,
22
+ init_react_shim
23
+ } from "./chunk-WYCFGRFJ.mjs";
24
+
25
+ // src/components/ui/models/insert-image.tsx
26
+ init_react_shim();
27
+ import { useEffect, useRef as useRef2 } from "react";
28
+
29
+ // src/components/ui/image/file-upload.tsx
30
+ init_react_shim();
31
+ import { useState, useRef } from "react";
32
+ import {
33
+ Upload,
34
+ Loader2,
35
+ X,
36
+ Image,
37
+ UploadCloudIcon,
38
+ Video
39
+ } from "lucide-react";
40
+ import { motion, AnimatePresence } from "framer-motion";
41
+
42
+ // src/components/ui/progress.tsx
43
+ init_react_shim();
44
+ import * as React from "react";
45
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
46
+ import { jsx } from "react/jsx-runtime";
47
+ var Progress = React.forwardRef((_a, ref) => {
48
+ var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
49
+ return /* @__PURE__ */ jsx(
50
+ ProgressPrimitive.Root,
51
+ __spreadProps(__spreadValues({
52
+ ref,
53
+ className: cn(
54
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
55
+ className
56
+ )
57
+ }, props), {
58
+ children: /* @__PURE__ */ jsx(
59
+ ProgressPrimitive.Indicator,
60
+ {
61
+ className: "h-full w-full flex-1 bg-primary transition-all",
62
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
63
+ }
64
+ )
65
+ })
66
+ );
67
+ });
68
+ Progress.displayName = ProgressPrimitive.Root.displayName;
69
+
70
+ // src/lib/edgestore.ts
71
+ init_react_shim();
72
+ import { createEdgeStoreProvider } from "@edgestore/react";
73
+ var { EdgeStoreProvider, useEdgeStore } = createEdgeStoreProvider();
74
+
75
+ // src/components/ui/image/file-upload.tsx
76
+ import { toast } from "sonner";
77
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
78
+ var readFileAsDataURL = (file) => {
79
+ return new Promise((resolve, reject) => {
80
+ const reader = new FileReader();
81
+ reader.onload = () => resolve(reader.result);
82
+ reader.onerror = reject;
83
+ reader.readAsDataURL(file);
84
+ });
85
+ };
86
+ var FileUploadZone = ({
87
+ InsertMedia
88
+ }) => {
89
+ const [draggedZone, setDraggedZone] = useState(null);
90
+ const [files, setFiles] = useState([]);
91
+ const [uploading, setUploading] = useState(false);
92
+ const [progress, setProgress] = useState(0);
93
+ const fileInputRef = useRef(null);
94
+ const { edgestore } = useEdgeStore();
95
+ const uploadConfig = useUpload();
96
+ const handleDragEnter = (index) => (e) => {
97
+ e.preventDefault();
98
+ setDraggedZone(index);
99
+ };
100
+ const handleDragLeave = (e) => {
101
+ e.preventDefault();
102
+ setDraggedZone(null);
103
+ };
104
+ const upload = async (newFiles) => {
105
+ setUploading(true);
106
+ setProgress(0);
107
+ let uploadedFiles = [];
108
+ for (let i = 0; i < newFiles.length; i++) {
109
+ const file = newFiles[i];
110
+ try {
111
+ let url = "";
112
+ if (uploadConfig == null ? void 0 : uploadConfig.uploadHandler) {
113
+ try {
114
+ const res = await uploadConfig.uploadHandler(file, (p) => {
115
+ setProgress(
116
+ Math.round(p / 100 * ((i + 1) / newFiles.length) * 100)
117
+ );
118
+ });
119
+ url = res.url;
120
+ } catch (handlerErr) {
121
+ console.warn("[Notiq] uploadHandler failed, falling back to local file:", handlerErr);
122
+ url = await readFileAsDataURL(file);
123
+ }
124
+ } else {
125
+ try {
126
+ const response = await edgestore.publicFiles.upload({
127
+ file,
128
+ onProgressChange: (progress2) => {
129
+ setProgress(
130
+ Math.round(progress2 / 100 * ((i + 1) / newFiles.length) * 100)
131
+ );
132
+ }
133
+ });
134
+ url = response.url;
135
+ } catch (edgeStoreErr) {
136
+ console.warn("[Notiq] EdgeStore unavailable, using offline local file storage:", edgeStoreErr);
137
+ url = await readFileAsDataURL(file);
138
+ toast.info(`Stored ${file.name} locally (offline mode)`);
139
+ }
140
+ }
141
+ if (url) {
142
+ uploadedFiles.push({ url, alt: file.name });
143
+ }
144
+ } catch (error) {
145
+ console.error(`Error uploading ${file.name}:`, error);
146
+ try {
147
+ const fallbackUrl = await readFileAsDataURL(file);
148
+ uploadedFiles.push({ url: fallbackUrl, alt: file.name });
149
+ toast.info(`Stored ${file.name} locally (offline mode)`);
150
+ } catch (e) {
151
+ }
152
+ }
153
+ }
154
+ setFiles((prevFiles) => [...prevFiles, ...uploadedFiles]);
155
+ setUploading(false);
156
+ setProgress(100);
157
+ };
158
+ const handleDrop = () => async (e) => {
159
+ e.preventDefault();
160
+ setDraggedZone(null);
161
+ const droppedFiles = Array.from(e.dataTransfer.files);
162
+ if (droppedFiles.length > 0) {
163
+ await upload(droppedFiles);
164
+ }
165
+ };
166
+ const handleFileSelect = async (e) => {
167
+ const selectedFiles = Array.from(e.target.files || []);
168
+ if (selectedFiles.length > 0) {
169
+ await upload(selectedFiles);
170
+ }
171
+ };
172
+ const removeFile = (index) => {
173
+ setFiles((prevFiles) => prevFiles.filter((_, i) => i !== index));
174
+ };
175
+ const zones = [
176
+ {
177
+ title: "Upload Images",
178
+ subtitle: "Drop images here",
179
+ icon: Image,
180
+ gradient: "from-purple-400 via-pink-500 to-red-500",
181
+ rotate: "-rotate-2"
182
+ },
183
+ {
184
+ title: "Upload Videos",
185
+ subtitle: "Drop videos here",
186
+ icon: Video,
187
+ gradient: "from-blue-400 via-teal-500 to-green-500",
188
+ rotate: ""
189
+ },
190
+ {
191
+ title: "Upload Files",
192
+ subtitle: "Drop files here",
193
+ icon: UploadCloudIcon,
194
+ gradient: "from-yellow-400 via-orange-500 to-red-500",
195
+ rotate: "rotate-3"
196
+ }
197
+ ];
198
+ return /* @__PURE__ */ jsx2(Card, { className: "mx-auto w-full bg-transparent border-none max-w-[300px] lg:max-w-[500px] overflow-hidden rounded-[1rem]", children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6 py-7 cursor:pointer", children: [
199
+ /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: zones.map((zone, index) => /* @__PURE__ */ jsx2("div", { className: `relative ${zone.rotate}`, children: /* @__PURE__ */ jsxs(
200
+ motion.div,
201
+ {
202
+ onDragEnter: handleDragEnter(index),
203
+ onDragOver: (e) => e.preventDefault(),
204
+ onDragLeave: handleDragLeave,
205
+ onDrop: handleDrop,
206
+ whileHover: { y: -4, scale: 1.02 },
207
+ whileTap: { scale: 0.98 },
208
+ className: "group relative h-full",
209
+ children: [
210
+ /* @__PURE__ */ jsx2(
211
+ "div",
212
+ {
213
+ className: `
214
+ absolute inset-0 -z-10 rounded-xl bg-gradient-to-br ${zone.gradient}
215
+ opacity-0 blur-md transition-opacity duration-300
216
+ ${draggedZone === index ? "opacity-70" : "group-hover:opacity-70"}
217
+ `
218
+ }
219
+ ),
220
+ /* @__PURE__ */ jsx2(Card, { className: "relative h-full rounded-[1rem] overflow-hidden border-2 border-dashed border-gray-200 dark:border-gray-800 transition-colors duration-300 group-hover:border-transparent", children: /* @__PURE__ */ jsxs(CardContent, { className: "flex h-full flex-col items-center justify-center p-6 text-center", children: [
221
+ /* @__PURE__ */ jsx2(
222
+ motion.div,
223
+ {
224
+ whileHover: { scale: 1.1, rotate: 10 },
225
+ className: "rounded-full bg-gray-100 dark:bg-gray-800 p-3 mb-4",
226
+ children: /* @__PURE__ */ jsx2(zone.icon, { className: "h-8 w-8 text-gray-500" })
227
+ }
228
+ ),
229
+ /* @__PURE__ */ jsx2("h3", { className: "mb-1 text-sm font-medium", children: zone.title }),
230
+ /* @__PURE__ */ jsx2("p", { className: "text-xs text-gray-500", children: zone.subtitle })
231
+ ] }) })
232
+ ]
233
+ }
234
+ ) }, index)) }),
235
+ (uploading || files.length > 0) && /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
236
+ /* @__PURE__ */ jsx2(Progress, { value: uploading ? progress : 100, className: "h-2 mb-2" }),
237
+ /* @__PURE__ */ jsx2("p", { className: "text-sm text-gray-500 mb-2", children: uploading ? `Uploading... ${progress}%` : `${files.length} file(s) uploaded` }),
238
+ /* @__PURE__ */ jsx2(AnimatePresence, { children: files.map((file, index) => /* @__PURE__ */ jsxs(
239
+ motion.div,
240
+ {
241
+ initial: { opacity: 0, y: -10 },
242
+ animate: { opacity: 1, y: 0 },
243
+ exit: { opacity: 0, y: -10 },
244
+ className: "flex items-center justify-between bg-gray-100 dark:bg-gray-800 rounded-[1rem] p-2 mb-2",
245
+ children: [
246
+ /* @__PURE__ */ jsx2("span", { className: "truncate max-w-[80%] text-sm text-gray-700 dark:text-gray-300 ml-2", children: file.alt }),
247
+ /* @__PURE__ */ jsx2(
248
+ Button,
249
+ {
250
+ variant: "ghost",
251
+ size: "icon",
252
+ onClick: () => removeFile(index),
253
+ className: "h-6 w-6 p-0 hover:bg-gray-200 dark:hover:bg-gray-700",
254
+ children: /* @__PURE__ */ jsx2(X, { className: "h-4 w-4" })
255
+ }
256
+ )
257
+ ]
258
+ },
259
+ `${file.alt}-${index}`
260
+ )) })
261
+ ] }),
262
+ /* @__PURE__ */ jsxs("div", { className: "text-center flex flex-col", children: [
263
+ /* @__PURE__ */ jsx2(
264
+ "input",
265
+ {
266
+ type: "file",
267
+ ref: fileInputRef,
268
+ onChange: handleFileSelect,
269
+ className: "hidden",
270
+ multiple: true
271
+ }
272
+ ),
273
+ /* @__PURE__ */ jsx2(
274
+ Button,
275
+ {
276
+ onClick: () => {
277
+ var _a;
278
+ return (_a = fileInputRef.current) == null ? void 0 : _a.click();
279
+ },
280
+ disabled: uploading,
281
+ className: "rounded-[1rem] mt-5",
282
+ children: uploading ? /* @__PURE__ */ jsxs(Fragment, { children: [
283
+ /* @__PURE__ */ jsx2(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
284
+ "Uploading..."
285
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
286
+ /* @__PURE__ */ jsx2(Upload, { className: "mr-2 h-4 w-4" }),
287
+ "Choose Files"
288
+ ] })
289
+ }
290
+ ),
291
+ files.length > 0 && /* @__PURE__ */ jsxs(
292
+ Button,
293
+ {
294
+ onClick: () => InsertMedia(files),
295
+ disabled: uploading,
296
+ className: "rounded-[1rem] mt-2",
297
+ children: [
298
+ "Insert the ",
299
+ files.length == 1 ? "image" : "images"
300
+ ]
301
+ }
302
+ )
303
+ ] })
304
+ ] }) });
305
+ };
306
+ var file_upload_default = FileUploadZone;
307
+
308
+ // src/components/ui/models/insert-image.tsx
309
+ import { jsx as jsx3 } from "react/jsx-runtime";
310
+ function InsertImageDialog({
311
+ activeEditor,
312
+ onClose
313
+ }) {
314
+ const hasModifier = useRef2(false);
315
+ useEffect(() => {
316
+ hasModifier.current = false;
317
+ const handler = (e) => {
318
+ hasModifier.current = e.altKey;
319
+ };
320
+ document.addEventListener("keydown", handler);
321
+ return () => {
322
+ document.removeEventListener("keydown", handler);
323
+ };
324
+ }, [activeEditor]);
325
+ const handleInsertImage = (payload) => {
326
+ activeEditor.dispatchCommand(INSERT_IMAGE_COMMAND, payload);
327
+ };
328
+ const InsertMedia = (files) => {
329
+ if (!files) {
330
+ return;
331
+ }
332
+ for (let index = 0; index < files.length; index++) {
333
+ console.log(files);
334
+ const payload = {
335
+ altText: files[index].alt || "image",
336
+ src: files[index].url
337
+ };
338
+ handleInsertImage(payload);
339
+ if (index === files.length - 1) {
340
+ onClose();
341
+ }
342
+ }
343
+ };
344
+ return /* @__PURE__ */ jsx3(file_upload_default, { InsertMedia });
345
+ }
346
+ export {
347
+ InsertImageDialog
348
+ };
@@ -0,0 +1,245 @@
1
+ import {
2
+ INSERT_EXCALIDRAW_COMMAND
3
+ } from "./chunk-FYLRS4BG.mjs";
4
+ import {
5
+ INSERT_COLLAPSIBLE_COMMAND
6
+ } from "./chunk-ACV47ZKE.mjs";
7
+ import {
8
+ AutoEmbedDialog,
9
+ Figma,
10
+ FigmaEmbedConfig,
11
+ Twitter,
12
+ TwitterEmbedConfig,
13
+ Youtube,
14
+ YoutubeEmbedConfig
15
+ } from "./chunk-LLCP7NVE.mjs";
16
+ import {
17
+ useModal
18
+ } from "./chunk-IAFCQV3Z.mjs";
19
+ import {
20
+ INSERT_IMAGE_COMMAND
21
+ } from "./chunk-MW6MAUY3.mjs";
22
+ import "./chunk-4DVIYZVB.mjs";
23
+ import {
24
+ INSERT_LAYOUT_COMMAND
25
+ } from "./chunk-W6GAJXUS.mjs";
26
+ import "./chunk-VGAX6YEY.mjs";
27
+ import {
28
+ DropDown
29
+ } from "./chunk-LU2XWLOE.mjs";
30
+ import "./chunk-5NRAXWYA.mjs";
31
+ import {
32
+ Skeleton
33
+ } from "./chunk-NBE6FF6L.mjs";
34
+ import "./chunk-GYYLZ3MQ.mjs";
35
+ import "./chunk-TC3IISJZ.mjs";
36
+ import "./chunk-XZXGYNTY.mjs";
37
+ import "./chunk-H3P47YXJ.mjs";
38
+ import "./chunk-OE5JRLCN.mjs";
39
+ import {
40
+ INSERT_HINT_COMMAND
41
+ } from "./chunk-7QRJVZQY.mjs";
42
+ import "./chunk-IIVB6JNE.mjs";
43
+ import "./chunk-JHXDLYEV.mjs";
44
+ import {
45
+ init_react_shim
46
+ } from "./chunk-WYCFGRFJ.mjs";
47
+
48
+ // src/components/ui/drop-downs/insert-node.tsx
49
+ init_react_shim();
50
+ import { useMemo, lazy, Suspense } from "react";
51
+ import { Columns2, Columns3, Columns4, DraftingCompassIcon, FileAudio, FileText, FlipHorizontal2, Image, ImagePlay, Lightbulb, Plus, SquareChevronRight, SquarePenIcon, Table } from "lucide-react";
52
+ import { INSERT_HORIZONTAL_RULE_COMMAND } from "@lexical/react/LexicalHorizontalRuleNode";
53
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
54
+ var InsertImageDialog = lazy(() => import("./insert-image-CZV6HWQZ.mjs").then((module) => ({ default: module.InsertImageDialog })));
55
+ var InsertGif = lazy(() => import("./insert-gif-FIMCCBAI.mjs"));
56
+ var InsertTableBody = lazy(() => import("./insert-table-ZRJP6X52.mjs").then((module) => ({ default: module.InsertTable })));
57
+ var InsertPoll = lazy(
58
+ () => import("./insert-poll-6BCIFY5G.mjs").then((module) => ({ default: module.InsertPoll }))
59
+ );
60
+ var InsertAudioDialog = lazy(
61
+ () => import("./insert-audio-C66RZRKY.mjs").then((module) => ({ default: module.InsertAudioDialog }))
62
+ );
63
+ var InsertFileDialog = lazy(
64
+ () => import("./insert-file-3DTGRO7W.mjs").then((module) => ({ default: module.InsertFileDialog }))
65
+ );
66
+ function InsertNode({
67
+ disabled,
68
+ editor
69
+ }) {
70
+ const [model, showModal] = useModal();
71
+ const insertGifOnClick = (payload) => {
72
+ editor.dispatchCommand(INSERT_IMAGE_COMMAND, payload);
73
+ };
74
+ const items = useMemo(
75
+ () => [
76
+ {
77
+ label: "Horizontal Rule",
78
+ icon: /* @__PURE__ */ jsx(FlipHorizontal2, { className: "w-4 h-4" }),
79
+ func: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, void 0)
80
+ },
81
+ {
82
+ label: "Image",
83
+ icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }),
84
+ func: () => {
85
+ showModal(
86
+ "Insert Image",
87
+ "Please select an image to upload.",
88
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[350px] h-[350px]" }), children: /* @__PURE__ */ jsx(InsertImageDialog, { activeEditor: editor, onClose }) }),
89
+ true
90
+ );
91
+ }
92
+ },
93
+ {
94
+ label: "Audio Player",
95
+ icon: /* @__PURE__ */ jsx(FileAudio, { className: "size-4 text-emerald-500" }),
96
+ func: () => {
97
+ showModal(
98
+ "Insert Audio",
99
+ "Upload an audio file or paste an audio URL.",
100
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[250px]" }), children: /* @__PURE__ */ jsx(InsertAudioDialog, { activeEditor: editor, onClose }) }),
101
+ true
102
+ );
103
+ }
104
+ },
105
+ {
106
+ label: "File Attachment",
107
+ icon: /* @__PURE__ */ jsx(FileText, { className: "size-4 text-blue-500" }),
108
+ func: () => {
109
+ showModal(
110
+ "Attach Document",
111
+ "Attach a file (PDF, Doc, Spreadsheet, Archive) to the document.",
112
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[250px]" }), children: /* @__PURE__ */ jsx(InsertFileDialog, { activeEditor: editor, onClose }) }),
113
+ true
114
+ );
115
+ }
116
+ },
117
+ {
118
+ label: "GIF",
119
+ icon: /* @__PURE__ */ jsx(ImagePlay, { className: "w-4 h-4" }),
120
+ func: () => {
121
+ showModal(
122
+ "Insert GIF",
123
+ "Please select a GIF to upload.",
124
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[400px]" }), children: /* @__PURE__ */ jsx(InsertGif, { insertGifOnClick, onClose }) }),
125
+ true
126
+ );
127
+ }
128
+ },
129
+ {
130
+ label: "Table",
131
+ icon: /* @__PURE__ */ jsx(Table, { className: "w-4 h-4" }),
132
+ func: () => {
133
+ showModal(
134
+ "Insert Table",
135
+ "Please configure your table.",
136
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[100px]" }), children: /* @__PURE__ */ jsx(InsertTableBody, { activeEditor: editor, onClose }) }),
137
+ true
138
+ );
139
+ }
140
+ },
141
+ {
142
+ label: "ExcaliDraw",
143
+ icon: /* @__PURE__ */ jsx(DraftingCompassIcon, { className: "w-4 h-4" }),
144
+ func: () => {
145
+ editor.dispatchCommand(INSERT_EXCALIDRAW_COMMAND, void 0);
146
+ }
147
+ },
148
+ {
149
+ label: "Poll",
150
+ icon: /* @__PURE__ */ jsx(SquarePenIcon, { className: "w-4 h-4" }),
151
+ func: () => {
152
+ showModal(
153
+ "Create Poll",
154
+ "Please type your question.",
155
+ (onClose) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "mx-2 w-[400px] h-[100px]" }), children: /* @__PURE__ */ jsx(InsertPoll, { activeEditor: editor, onClose }) }),
156
+ true
157
+ );
158
+ }
159
+ },
160
+ {
161
+ label: "2 columns (equal width)",
162
+ icon: /* @__PURE__ */ jsx(Columns2, { className: "w-4 h-4" }),
163
+ func: () => {
164
+ editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr");
165
+ }
166
+ },
167
+ {
168
+ label: "3 columns (equal width)",
169
+ icon: /* @__PURE__ */ jsx(Columns3, { className: "w-4 h-4" }),
170
+ func: () => {
171
+ editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr");
172
+ }
173
+ },
174
+ {
175
+ label: "4 columns (equal width)",
176
+ icon: /* @__PURE__ */ jsx(Columns4, { className: "w-4 h-4" }),
177
+ func: () => {
178
+ editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr 1fr");
179
+ }
180
+ },
181
+ {
182
+ label: "2 columns (25% - 75%)",
183
+ icon: /* @__PURE__ */ jsx(Columns2, { className: "w-4 h-4" }),
184
+ func: () => {
185
+ editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 3fr");
186
+ }
187
+ },
188
+ {
189
+ label: "Collapsible container",
190
+ icon: /* @__PURE__ */ jsx(SquareChevronRight, { className: "w-4 h-4" }),
191
+ func: () => {
192
+ editor.dispatchCommand(INSERT_COLLAPSIBLE_COMMAND, void 0);
193
+ }
194
+ },
195
+ {
196
+ label: "Twitter",
197
+ icon: /* @__PURE__ */ jsx(Twitter, { className: "w-4 h-4" }),
198
+ func: () => {
199
+ showModal("Twitter tweet", "Insert a URL to embed a live preview. Works with Twitter, Google Drive, Vimeo, and more.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: TwitterEmbedConfig, onClose }), true);
200
+ }
201
+ },
202
+ {
203
+ label: "Youtube",
204
+ icon: /* @__PURE__ */ jsx(Youtube, {}),
205
+ func: () => {
206
+ showModal("Youtube", "Insert a URL to embed a live preview. Works with YouTube, Google Drive, Vimeo, and more.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: YoutubeEmbedConfig, onClose }), true);
207
+ }
208
+ },
209
+ {
210
+ label: "Figma",
211
+ icon: /* @__PURE__ */ jsx(Figma, {}),
212
+ func: () => {
213
+ showModal("Figma", "Insert a URL to embed a live preview. Works with Figma.", (onClose) => /* @__PURE__ */ jsx(AutoEmbedDialog, { embedConfig: FigmaEmbedConfig, onClose }), true);
214
+ }
215
+ },
216
+ {
217
+ label: "Callout",
218
+ icon: /* @__PURE__ */ jsx(Lightbulb, { className: "h-4 w-4 text-emerald-500" }),
219
+ func: () => {
220
+ editor.dispatchCommand(INSERT_HINT_COMMAND, "tip");
221
+ }
222
+ }
223
+ ],
224
+ [editor, showModal]
225
+ );
226
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
227
+ /* @__PURE__ */ jsx(
228
+ DropDown,
229
+ {
230
+ values: items,
231
+ TriggerClassName: { width: "115px", border: "none" },
232
+ className: "cursor-pointer",
233
+ TriggerLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
234
+ /* @__PURE__ */ jsx(Plus, {}),
235
+ /* @__PURE__ */ jsx("span", { children: "Insert" })
236
+ ] }),
237
+ disabled
238
+ }
239
+ ),
240
+ model
241
+ ] });
242
+ }
243
+ export {
244
+ InsertNode as default
245
+ };
@@ -0,0 +1,36 @@
1
+ import {
2
+ INSERT_POLL_COMMAND
3
+ } from "./chunk-W6VQSFE5.mjs";
4
+ import "./chunk-N6ILV6NF.mjs";
5
+ import {
6
+ Input
7
+ } from "./chunk-5NRAXWYA.mjs";
8
+ import {
9
+ Button
10
+ } from "./chunk-OE5JRLCN.mjs";
11
+ import "./chunk-JHXDLYEV.mjs";
12
+ import {
13
+ init_react_shim
14
+ } from "./chunk-WYCFGRFJ.mjs";
15
+
16
+ // src/components/ui/models/insert-poll.tsx
17
+ init_react_shim();
18
+ import { useState } from "react";
19
+ import { jsx, jsxs } from "react/jsx-runtime";
20
+ function InsertPoll({
21
+ activeEditor,
22
+ onClose
23
+ }) {
24
+ const [question, setQuestion] = useState("");
25
+ const onClick = () => {
26
+ activeEditor.dispatchCommand(INSERT_POLL_COMMAND, question);
27
+ onClose();
28
+ };
29
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
30
+ /* @__PURE__ */ jsx(Input, { placeholder: "Question?", onChange: (e) => setQuestion(e.target.value), value: question }),
31
+ /* @__PURE__ */ jsx(Button, { disabled: question.trim() === "", onClick, children: "Confirm" })
32
+ ] });
33
+ }
34
+ export {
35
+ InsertPoll
36
+ };
@@ -0,0 +1,70 @@
1
+ import {
2
+ Input
3
+ } from "./chunk-5NRAXWYA.mjs";
4
+ import {
5
+ Button
6
+ } from "./chunk-OE5JRLCN.mjs";
7
+ import "./chunk-JHXDLYEV.mjs";
8
+ import {
9
+ init_react_shim
10
+ } from "./chunk-WYCFGRFJ.mjs";
11
+
12
+ // src/components/ui/models/insert-table.tsx
13
+ init_react_shim();
14
+ import { INSERT_TABLE_COMMAND } from "@lexical/table";
15
+ import { useEffect, useState } from "react";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function InsertTable({
18
+ activeEditor,
19
+ onClose
20
+ }) {
21
+ const [rows, setRows] = useState("5");
22
+ const [columns, setColumns] = useState("5");
23
+ const [isDisabled, setIsDisabled] = useState(true);
24
+ useEffect(() => {
25
+ const row = Number(rows);
26
+ const column = Number(columns);
27
+ if (row && row > 0 && row <= 500 && column && column > 0 && column <= 50) {
28
+ setIsDisabled(false);
29
+ } else {
30
+ setIsDisabled(true);
31
+ }
32
+ }, [rows, columns]);
33
+ const onClick = () => {
34
+ activeEditor.dispatchCommand(INSERT_TABLE_COMMAND, {
35
+ columns,
36
+ rows
37
+ });
38
+ onClose();
39
+ };
40
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-2 ", children: [
41
+ /* @__PURE__ */ jsx(
42
+ Input,
43
+ {
44
+ placeholder: "# of rows (1-500)",
45
+ onChange: (e) => {
46
+ setRows(e.target.value);
47
+ },
48
+ value: rows,
49
+ "data-test-id": "table-modal-rows",
50
+ type: "number"
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsx(
54
+ Input,
55
+ {
56
+ placeholder: "# of columns (1-50)",
57
+ onChange: (e) => {
58
+ setColumns(e.target.value);
59
+ },
60
+ value: columns,
61
+ "data-test-id": "table-modal-columns",
62
+ type: "number"
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsx(Button, { className: "w-full", disabled: isDisabled, onClick, children: "Confirm" })
66
+ ] });
67
+ }
68
+ export {
69
+ InsertTable
70
+ };
@@ -0,0 +1,2 @@
1
+ declare const EdgeStoreProvider: any, useEdgeStore: any;
2
+ export { EdgeStoreProvider, useEdgeStore };