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