@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.
- 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 -1150
- 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/chunk-V2NIZOSQ.mjs
DELETED
|
@@ -1,538 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Command,
|
|
3
|
-
CommandEmpty,
|
|
4
|
-
CommandInput,
|
|
5
|
-
CommandItem,
|
|
6
|
-
CommandList,
|
|
7
|
-
CommandShortcut
|
|
8
|
-
} from "./chunk-KJ6AJ44Q.mjs";
|
|
9
|
-
import {
|
|
10
|
-
INSERT_DYNAMIC_BLOCK_COMMAND,
|
|
11
|
-
INSERT_STORY_BUILDER_COMMAND,
|
|
12
|
-
InsertEquationDialog,
|
|
13
|
-
InsertInlineImageDialog,
|
|
14
|
-
createDefaultDynamicBlock
|
|
15
|
-
} from "./chunk-DSFQHA7I.mjs";
|
|
16
|
-
import {
|
|
17
|
-
INSERT_POLL_COMMAND
|
|
18
|
-
} from "./chunk-U47ABU5Z.mjs";
|
|
19
|
-
import {
|
|
20
|
-
AutoEmbedDialog,
|
|
21
|
-
FigmaEmbedConfig,
|
|
22
|
-
INSERT_COLLAPSIBLE_COMMAND,
|
|
23
|
-
INSERT_LAYOUT_COMMAND,
|
|
24
|
-
TwitterEmbedConfig,
|
|
25
|
-
YoutubeEmbedConfig
|
|
26
|
-
} from "./chunk-AMMKBSST.mjs";
|
|
27
|
-
import {
|
|
28
|
-
useModal
|
|
29
|
-
} from "./chunk-5QSNIVIG.mjs";
|
|
30
|
-
import {
|
|
31
|
-
INSERT_IMAGE_COMMAND
|
|
32
|
-
} from "./chunk-LGG4IUIA.mjs";
|
|
33
|
-
import {
|
|
34
|
-
INSERT_STEPPER_COMMAND,
|
|
35
|
-
initialEditorState
|
|
36
|
-
} from "./chunk-NZXC6FGU.mjs";
|
|
37
|
-
import {
|
|
38
|
-
SHORTCUTS
|
|
39
|
-
} from "./chunk-ZB5LZQKC.mjs";
|
|
40
|
-
import {
|
|
41
|
-
Skeleton
|
|
42
|
-
} from "./chunk-QEIFVK5M.mjs";
|
|
43
|
-
import {
|
|
44
|
-
INSERT_HINT_COMMAND
|
|
45
|
-
} from "./chunk-G53GLEAY.mjs";
|
|
46
|
-
import {
|
|
47
|
-
cn
|
|
48
|
-
} from "./chunk-YHPNOWFH.mjs";
|
|
49
|
-
import {
|
|
50
|
-
init_react_shim
|
|
51
|
-
} from "./chunk-77KXU36M.mjs";
|
|
52
|
-
|
|
53
|
-
// src/components/editor/plugins/SlashCommand/index.tsx
|
|
54
|
-
init_react_shim();
|
|
55
|
-
import { $createCodeNode } from "@lexical/code";
|
|
56
|
-
import {
|
|
57
|
-
INSERT_CHECK_LIST_COMMAND,
|
|
58
|
-
INSERT_ORDERED_LIST_COMMAND,
|
|
59
|
-
INSERT_UNORDERED_LIST_COMMAND
|
|
60
|
-
} from "@lexical/list";
|
|
61
|
-
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
62
|
-
import { INSERT_HORIZONTAL_RULE_COMMAND } from "@lexical/react/LexicalHorizontalRuleNode";
|
|
63
|
-
import {
|
|
64
|
-
LexicalTypeaheadMenuPlugin,
|
|
65
|
-
MenuOption,
|
|
66
|
-
useBasicTypeaheadTriggerMatch
|
|
67
|
-
} from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
68
|
-
import { $createHeadingNode, $createQuoteNode } from "@lexical/rich-text";
|
|
69
|
-
import { $setBlocksType } from "@lexical/selection";
|
|
70
|
-
import { INSERT_TABLE_COMMAND } from "@lexical/table";
|
|
71
|
-
import {
|
|
72
|
-
$createParagraphNode,
|
|
73
|
-
$getSelection,
|
|
74
|
-
$isRangeSelection,
|
|
75
|
-
createEditor
|
|
76
|
-
} from "lexical";
|
|
77
|
-
import { useCallback, useMemo, useState } from "react";
|
|
78
|
-
import * as React from "react";
|
|
79
|
-
import * as ReactDOM from "react-dom";
|
|
80
|
-
import {
|
|
81
|
-
Code2,
|
|
82
|
-
Columns2,
|
|
83
|
-
Columns3,
|
|
84
|
-
Columns4,
|
|
85
|
-
ImageIcon,
|
|
86
|
-
ImagePlayIcon,
|
|
87
|
-
ListCheck,
|
|
88
|
-
OctagonX,
|
|
89
|
-
Pilcrow,
|
|
90
|
-
QuoteIcon,
|
|
91
|
-
SquarePenIcon,
|
|
92
|
-
StepForward,
|
|
93
|
-
Twitter,
|
|
94
|
-
Youtube,
|
|
95
|
-
Figma,
|
|
96
|
-
Heading1,
|
|
97
|
-
Heading2,
|
|
98
|
-
Heading3,
|
|
99
|
-
Minus,
|
|
100
|
-
List,
|
|
101
|
-
ListOrdered,
|
|
102
|
-
Table,
|
|
103
|
-
SigmaIcon,
|
|
104
|
-
GitBranch,
|
|
105
|
-
Zap
|
|
106
|
-
} from "lucide-react";
|
|
107
|
-
var InsertGif = React.lazy(() => import("./insert-gif-SAIDYURE.mjs"));
|
|
108
|
-
var InsertImageDialog = React.lazy(
|
|
109
|
-
() => import("./insert-image-U3RJN3OW.mjs").then((module) => ({
|
|
110
|
-
default: module.InsertImageDialog
|
|
111
|
-
}))
|
|
112
|
-
);
|
|
113
|
-
var ComponentPickerOption = class extends MenuOption {
|
|
114
|
-
constructor(title, options) {
|
|
115
|
-
super(title);
|
|
116
|
-
this.title = title;
|
|
117
|
-
this.keywords = options.keywords || [];
|
|
118
|
-
this.icon = options.icon;
|
|
119
|
-
this.keyboardShortcut = options.keyboardShortcut;
|
|
120
|
-
this.onSelect = options.onSelect.bind(this);
|
|
121
|
-
this.desc = options.desc;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
function getDynamicOptions(editor, queryString) {
|
|
125
|
-
const options = [];
|
|
126
|
-
if (queryString == null) {
|
|
127
|
-
return options;
|
|
128
|
-
}
|
|
129
|
-
const tableMatch = queryString.match(/^([1-9]\d?)(?:x([1-9]\d?)?)?$/);
|
|
130
|
-
if (tableMatch !== null) {
|
|
131
|
-
const rows = tableMatch[1];
|
|
132
|
-
const colOptions = tableMatch[2] ? [tableMatch[2]] : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(String);
|
|
133
|
-
options.push(
|
|
134
|
-
...colOptions.map(
|
|
135
|
-
(columns) => new ComponentPickerOption(`${rows}x${columns} Table`, {
|
|
136
|
-
icon: /* @__PURE__ */ React.createElement("i", { className: "icon table" }),
|
|
137
|
-
keywords: ["table"],
|
|
138
|
-
onSelect: () => editor.dispatchCommand(INSERT_TABLE_COMMAND, { columns, rows })
|
|
139
|
-
})
|
|
140
|
-
)
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
return options;
|
|
144
|
-
}
|
|
145
|
-
function getBaseOptions(editor, showModal) {
|
|
146
|
-
return [
|
|
147
|
-
new ComponentPickerOption("Paragraph", {
|
|
148
|
-
icon: /* @__PURE__ */ React.createElement(Pilcrow, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
149
|
-
keywords: ["normal", "paragraph", "p", "text"],
|
|
150
|
-
onSelect: () => editor.update(() => {
|
|
151
|
-
const selection = $getSelection();
|
|
152
|
-
if ($isRangeSelection(selection)) {
|
|
153
|
-
$setBlocksType(selection, () => $createParagraphNode());
|
|
154
|
-
}
|
|
155
|
-
}),
|
|
156
|
-
desc: "Just start writing with plain text"
|
|
157
|
-
}),
|
|
158
|
-
...[1, 2, 3].map(
|
|
159
|
-
(n) => new ComponentPickerOption(`Heading ${n}`, {
|
|
160
|
-
icon: n === 1 ? /* @__PURE__ */ React.createElement(Heading1, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }) : n === 2 ? /* @__PURE__ */ React.createElement(Heading2, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }) : /* @__PURE__ */ React.createElement(Heading3, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
161
|
-
keywords: ["heading", "header", `h${n}`],
|
|
162
|
-
keyboardShortcut: n === 1 ? SHORTCUTS.HEADING1 : n === 2 ? SHORTCUTS.HEADING2 : SHORTCUTS.HEADING3,
|
|
163
|
-
onSelect: () => editor.update(() => {
|
|
164
|
-
const selection = $getSelection();
|
|
165
|
-
if ($isRangeSelection(selection)) {
|
|
166
|
-
$setBlocksType(selection, () => $createHeadingNode(`h${n}`));
|
|
167
|
-
}
|
|
168
|
-
}),
|
|
169
|
-
desc: `${n == 1 ? "Big section heading" : n == 2 ? "Meduim section heading." : "Small section heading"}`
|
|
170
|
-
})
|
|
171
|
-
),
|
|
172
|
-
new ComponentPickerOption("Table", {
|
|
173
|
-
icon: /* @__PURE__ */ React.createElement(Table, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
174
|
-
keywords: ["table", "grid", "spreadsheet", "rows", "columns"],
|
|
175
|
-
desc: "Add simple table content to your blog.",
|
|
176
|
-
onSelect: () => editor.dispatchCommand(INSERT_TABLE_COMMAND, {
|
|
177
|
-
rows: "4",
|
|
178
|
-
columns: "4"
|
|
179
|
-
})
|
|
180
|
-
}),
|
|
181
|
-
new ComponentPickerOption("Hint", {
|
|
182
|
-
icon: /* @__PURE__ */ React.createElement(OctagonX, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
183
|
-
keywords: [
|
|
184
|
-
"Hint",
|
|
185
|
-
"note",
|
|
186
|
-
"info",
|
|
187
|
-
"alert",
|
|
188
|
-
"alert",
|
|
189
|
-
"success",
|
|
190
|
-
"warning",
|
|
191
|
-
"error"
|
|
192
|
-
],
|
|
193
|
-
desc: "Add a hint to your content.",
|
|
194
|
-
onSelect: () => editor.dispatchCommand(INSERT_HINT_COMMAND, "hint")
|
|
195
|
-
}),
|
|
196
|
-
new ComponentPickerOption("Numbered List", {
|
|
197
|
-
icon: /* @__PURE__ */ React.createElement(ListOrdered, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
198
|
-
keywords: ["numbered list", "ordered list", "ol"],
|
|
199
|
-
desc: "Create list with number",
|
|
200
|
-
keyboardShortcut: SHORTCUTS.NUMBERED_LIST,
|
|
201
|
-
onSelect: () => editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, void 0)
|
|
202
|
-
}),
|
|
203
|
-
new ComponentPickerOption("Bulleted List", {
|
|
204
|
-
icon: /* @__PURE__ */ React.createElement(List, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
205
|
-
keywords: ["bulleted list", "unordered list", "ul"],
|
|
206
|
-
desc: "Create list with Bulleted",
|
|
207
|
-
keyboardShortcut: SHORTCUTS.BULLET_LIST,
|
|
208
|
-
onSelect: () => editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, void 0)
|
|
209
|
-
}),
|
|
210
|
-
new ComponentPickerOption("Check List", {
|
|
211
|
-
icon: /* @__PURE__ */ React.createElement(ListCheck, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
212
|
-
keywords: ["check list", "todo list"],
|
|
213
|
-
desc: "Track tasks with to-do list.",
|
|
214
|
-
keyboardShortcut: SHORTCUTS.CHECK_LIST,
|
|
215
|
-
onSelect: () => editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, void 0)
|
|
216
|
-
}),
|
|
217
|
-
new ComponentPickerOption("Quote", {
|
|
218
|
-
icon: /* @__PURE__ */ React.createElement(QuoteIcon, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
219
|
-
keywords: ["block quote"],
|
|
220
|
-
desc: "Capture Quote",
|
|
221
|
-
keyboardShortcut: SHORTCUTS.QUOTE,
|
|
222
|
-
onSelect: () => editor.update(() => {
|
|
223
|
-
const selection = $getSelection();
|
|
224
|
-
if ($isRangeSelection(selection)) {
|
|
225
|
-
$setBlocksType(selection, () => $createQuoteNode());
|
|
226
|
-
}
|
|
227
|
-
})
|
|
228
|
-
}),
|
|
229
|
-
new ComponentPickerOption("Poll", {
|
|
230
|
-
icon: /* @__PURE__ */ React.createElement(SquarePenIcon, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
231
|
-
keywords: ["poll", "vote", "survey"],
|
|
232
|
-
desc: "Add poll to take people votes.",
|
|
233
|
-
onSelect: () => editor.dispatchCommand(INSERT_POLL_COMMAND, "Type the Question")
|
|
234
|
-
}),
|
|
235
|
-
new ComponentPickerOption("Code", {
|
|
236
|
-
icon: /* @__PURE__ */ React.createElement(Code2, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
237
|
-
keywords: ["javascript", "python", "js", "codeblock"],
|
|
238
|
-
desc: "Add block of code.",
|
|
239
|
-
keyboardShortcut: SHORTCUTS.CODE_BLOCK,
|
|
240
|
-
onSelect: () => editor.update(() => {
|
|
241
|
-
const selection = $getSelection();
|
|
242
|
-
if ($isRangeSelection(selection)) {
|
|
243
|
-
if (selection.isCollapsed()) {
|
|
244
|
-
$setBlocksType(selection, () => $createCodeNode());
|
|
245
|
-
} else {
|
|
246
|
-
const textContent = selection.getTextContent();
|
|
247
|
-
const codeNode = $createCodeNode();
|
|
248
|
-
selection.insertNodes([codeNode]);
|
|
249
|
-
selection.insertRawText(textContent);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
})
|
|
253
|
-
}),
|
|
254
|
-
new ComponentPickerOption("Divider", {
|
|
255
|
-
icon: /* @__PURE__ */ React.createElement(Minus, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
256
|
-
keywords: ["horizontal rule", "divider", "hr"],
|
|
257
|
-
desc: "Visually divide blocks",
|
|
258
|
-
onSelect: () => editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, void 0)
|
|
259
|
-
}),
|
|
260
|
-
new ComponentPickerOption("Youtube", {
|
|
261
|
-
icon: /* @__PURE__ */ React.createElement(Youtube, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
262
|
-
keywords: ["Youtube", "youtube", "video"],
|
|
263
|
-
desc: "Embedded YouTube videos ",
|
|
264
|
-
onSelect: () => {
|
|
265
|
-
showModal(
|
|
266
|
-
"Youtube",
|
|
267
|
-
"Insert a URL to embed a live preview. Works with YouTube",
|
|
268
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
269
|
-
AutoEmbedDialog,
|
|
270
|
-
{
|
|
271
|
-
embedConfig: YoutubeEmbedConfig,
|
|
272
|
-
onClose
|
|
273
|
-
}
|
|
274
|
-
),
|
|
275
|
-
true
|
|
276
|
-
);
|
|
277
|
-
}
|
|
278
|
-
}),
|
|
279
|
-
new ComponentPickerOption("Figma", {
|
|
280
|
-
icon: /* @__PURE__ */ React.createElement(Figma, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
281
|
-
keywords: ["figma", "figma.com", "ui"],
|
|
282
|
-
desc: "Embedded Figma File ",
|
|
283
|
-
onSelect: () => {
|
|
284
|
-
showModal(
|
|
285
|
-
"Figma",
|
|
286
|
-
"Insert a URL to embed a live preview. Works with Figma",
|
|
287
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
288
|
-
AutoEmbedDialog,
|
|
289
|
-
{
|
|
290
|
-
embedConfig: FigmaEmbedConfig,
|
|
291
|
-
onClose
|
|
292
|
-
}
|
|
293
|
-
),
|
|
294
|
-
true
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
}),
|
|
298
|
-
new ComponentPickerOption("Twitter", {
|
|
299
|
-
icon: /* @__PURE__ */ React.createElement(Twitter, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
300
|
-
keywords: ["Twitter", "tweet", "x", "twitter"],
|
|
301
|
-
desc: "Embedded Tweets ",
|
|
302
|
-
onSelect: () => {
|
|
303
|
-
showModal(
|
|
304
|
-
"Twitter tweet",
|
|
305
|
-
"Insert a URL to embed a live preview. Works with Twitter",
|
|
306
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
307
|
-
AutoEmbedDialog,
|
|
308
|
-
{
|
|
309
|
-
embedConfig: TwitterEmbedConfig,
|
|
310
|
-
onClose
|
|
311
|
-
}
|
|
312
|
-
),
|
|
313
|
-
true
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
}),
|
|
317
|
-
new ComponentPickerOption("Image", {
|
|
318
|
-
icon: /* @__PURE__ */ React.createElement(ImageIcon, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
319
|
-
keywords: ["image", "photo", "picture", "file", "img"],
|
|
320
|
-
desc: "Upload or embed with a link",
|
|
321
|
-
onSelect: () => showModal(
|
|
322
|
-
"Insert Image",
|
|
323
|
-
"Please select an image to upload.",
|
|
324
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
325
|
-
React.Suspense,
|
|
326
|
-
{
|
|
327
|
-
fallback: /* @__PURE__ */ React.createElement(Skeleton, { className: "mx-2 w-[350px] h-[350px]" })
|
|
328
|
-
},
|
|
329
|
-
/* @__PURE__ */ React.createElement(InsertImageDialog, { activeEditor: editor, onClose })
|
|
330
|
-
),
|
|
331
|
-
true
|
|
332
|
-
)
|
|
333
|
-
}),
|
|
334
|
-
new ComponentPickerOption("Inline Image", {
|
|
335
|
-
icon: /* @__PURE__ */ React.createElement(ImageIcon, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
336
|
-
keywords: ["image", "photo", "picture", "file", "img"],
|
|
337
|
-
desc: "Upload or embed with a link",
|
|
338
|
-
onSelect: () => showModal(
|
|
339
|
-
"Insert Image",
|
|
340
|
-
"Please select an image to upload.",
|
|
341
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
342
|
-
React.Suspense,
|
|
343
|
-
{
|
|
344
|
-
fallback: /* @__PURE__ */ React.createElement(Skeleton, { className: "mx-2 w-[350px] h-[350px]" })
|
|
345
|
-
},
|
|
346
|
-
/* @__PURE__ */ React.createElement(
|
|
347
|
-
InsertInlineImageDialog,
|
|
348
|
-
{
|
|
349
|
-
activeEditor: editor,
|
|
350
|
-
onClose
|
|
351
|
-
}
|
|
352
|
-
)
|
|
353
|
-
),
|
|
354
|
-
true
|
|
355
|
-
)
|
|
356
|
-
}),
|
|
357
|
-
new ComponentPickerOption("Equation", {
|
|
358
|
-
icon: /* @__PURE__ */ React.createElement(SigmaIcon, { className: "w-4 h-4" }),
|
|
359
|
-
keywords: ["equation", "latex", "math"],
|
|
360
|
-
onSelect: () => showModal(
|
|
361
|
-
"Insert Equation",
|
|
362
|
-
"Insert mathematical equations using LaTeX syntax.",
|
|
363
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
364
|
-
React.Suspense,
|
|
365
|
-
{
|
|
366
|
-
fallback: /* @__PURE__ */ React.createElement(Skeleton, { className: "mx-2 w-[350px] h-[350px]" })
|
|
367
|
-
},
|
|
368
|
-
/* @__PURE__ */ React.createElement(
|
|
369
|
-
InsertEquationDialog,
|
|
370
|
-
{
|
|
371
|
-
activeEditor: editor,
|
|
372
|
-
onClose
|
|
373
|
-
}
|
|
374
|
-
)
|
|
375
|
-
),
|
|
376
|
-
true
|
|
377
|
-
)
|
|
378
|
-
}),
|
|
379
|
-
new ComponentPickerOption("Collapsible", {
|
|
380
|
-
icon: /* @__PURE__ */ React.createElement(StepForward, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
381
|
-
keywords: ["collapse", "collapsible", "toggle"],
|
|
382
|
-
desc: "Toggles can hide and show content inside.",
|
|
383
|
-
onSelect: () => editor.dispatchCommand(INSERT_COLLAPSIBLE_COMMAND, void 0)
|
|
384
|
-
}),
|
|
385
|
-
new ComponentPickerOption("2 columns", {
|
|
386
|
-
icon: /* @__PURE__ */ React.createElement(Columns2, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
387
|
-
keywords: ["columns", "flex", "row", "layout", "grid"],
|
|
388
|
-
desc: "Dvide your content into 2 container.",
|
|
389
|
-
onSelect: () => editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr")
|
|
390
|
-
}),
|
|
391
|
-
new ComponentPickerOption("3 columns", {
|
|
392
|
-
icon: /* @__PURE__ */ React.createElement(Columns3, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
393
|
-
keywords: ["3columns", "3", "flex", "row", "layout", "grid"],
|
|
394
|
-
desc: "Dvide your content into 3 container.",
|
|
395
|
-
onSelect: () => editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr")
|
|
396
|
-
}),
|
|
397
|
-
new ComponentPickerOption("Stepper", {
|
|
398
|
-
icon: /* @__PURE__ */ React.createElement("svg", { className: "w-9 h-9 max-sm:h-5 max-sm:w-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, /* @__PURE__ */ React.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("path", { d: "m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "M5 6a3 3 0 0 1 6 0v2a3 3 0 0 1-6 0zm3-1a1 1 0 0 0-1 1v2a1 1 0 0 0 2 0V6a1 1 0 0 0-1-1m9.707-.707a1 1 0 0 0-1.414 0L13.465 7.12a1 1 0 0 0 1.414 1.415L16 7.414V20a1 1 0 1 0 2 0V7.414l1.121 1.122a1 1 0 1 0 1.415-1.415zM5 15a3 3 0 0 1 5.995-.176l.005.186c0 .408-.039.799-.107 1.171c-.264 1.433-.964 2.58-1.57 3.352c-.307.39-.598.694-.815.904c-.124.12-.25.238-.385.345a1 1 0 0 1-1.34-1.479L7.118 19l.224-.228A7 7 0 0 0 7.971 18A3 3 0 0 1 5 15m3-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2" }))),
|
|
399
|
-
keywords: ["stpper", "step", "lines", "routes", "docs", "number"],
|
|
400
|
-
desc: "Stepper with descriptions for each step.",
|
|
401
|
-
onSelect: () => {
|
|
402
|
-
const newEditor = createEditor();
|
|
403
|
-
const parsedEditorState = newEditor.parseEditorState(
|
|
404
|
-
JSON.stringify(initialEditorState)
|
|
405
|
-
);
|
|
406
|
-
newEditor.setEditorState(parsedEditorState);
|
|
407
|
-
const newStep = {
|
|
408
|
-
id: 0,
|
|
409
|
-
title: `New step 0`,
|
|
410
|
-
content: newEditor
|
|
411
|
-
};
|
|
412
|
-
editor.dispatchCommand(INSERT_STEPPER_COMMAND, [newStep]);
|
|
413
|
-
}
|
|
414
|
-
}),
|
|
415
|
-
new ComponentPickerOption("Gifs", {
|
|
416
|
-
icon: /* @__PURE__ */ React.createElement(ImagePlayIcon, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
417
|
-
keywords: ["gif", "gifs", "videos", "short video"],
|
|
418
|
-
desc: "Insert a GIF video",
|
|
419
|
-
onSelect: () => {
|
|
420
|
-
showModal(
|
|
421
|
-
"Insert GIF",
|
|
422
|
-
"Please select a GIF to upload.",
|
|
423
|
-
(onClose) => /* @__PURE__ */ React.createElement(
|
|
424
|
-
React.Suspense,
|
|
425
|
-
{
|
|
426
|
-
fallback: /* @__PURE__ */ React.createElement(Skeleton, { className: "mx-2 w-[400px] h-[400px]" })
|
|
427
|
-
},
|
|
428
|
-
/* @__PURE__ */ React.createElement(
|
|
429
|
-
InsertGif,
|
|
430
|
-
{
|
|
431
|
-
insertGifOnClick: (payload) => {
|
|
432
|
-
editor.dispatchCommand(INSERT_IMAGE_COMMAND, payload);
|
|
433
|
-
},
|
|
434
|
-
onClose
|
|
435
|
-
}
|
|
436
|
-
)
|
|
437
|
-
),
|
|
438
|
-
true
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
}),
|
|
442
|
-
new ComponentPickerOption("Interactive Story", {
|
|
443
|
-
icon: /* @__PURE__ */ React.createElement(GitBranch, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
444
|
-
keywords: ["story", "interactive", "branching", "narrative", "choose", "adventure"],
|
|
445
|
-
desc: "Create branching narratives with reader choices",
|
|
446
|
-
onSelect: () => editor.dispatchCommand(INSERT_STORY_BUILDER_COMMAND, {
|
|
447
|
-
nodes: [],
|
|
448
|
-
currentNodeId: "",
|
|
449
|
-
title: "Interactive Story"
|
|
450
|
-
})
|
|
451
|
-
}),
|
|
452
|
-
new ComponentPickerOption("Dynamic Block", {
|
|
453
|
-
icon: /* @__PURE__ */ React.createElement(Zap, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
454
|
-
keywords: ["dynamic", "interactive", "content", "block", "trigger", "animation", "responsive"],
|
|
455
|
-
desc: "Create interactive content that responds to user actions",
|
|
456
|
-
onSelect: () => editor.dispatchCommand(INSERT_DYNAMIC_BLOCK_COMMAND, createDefaultDynamicBlock())
|
|
457
|
-
}),
|
|
458
|
-
new ComponentPickerOption("4 columns", {
|
|
459
|
-
icon: /* @__PURE__ */ React.createElement(Columns4, { className: "w-9 h-9 max-sm:h-5 max-sm:w-5" }),
|
|
460
|
-
keywords: ["4columns", "4", "flex", "row", "layout", "grid"],
|
|
461
|
-
desc: "Dvide your content into 4 container.",
|
|
462
|
-
onSelect: () => editor.dispatchCommand(INSERT_LAYOUT_COMMAND, "1fr 1fr 1fr 1fr")
|
|
463
|
-
})
|
|
464
|
-
];
|
|
465
|
-
}
|
|
466
|
-
function SlashCommand() {
|
|
467
|
-
const [editor] = useLexicalComposerContext();
|
|
468
|
-
const [Modal, showModal] = useModal();
|
|
469
|
-
const [queryString, setQueryString] = useState(null);
|
|
470
|
-
const checkForTriggerMatch = useBasicTypeaheadTriggerMatch("/", {
|
|
471
|
-
minLength: 0
|
|
472
|
-
});
|
|
473
|
-
const options = useMemo(() => {
|
|
474
|
-
const baseOptions = getBaseOptions(editor, showModal);
|
|
475
|
-
if (!queryString) {
|
|
476
|
-
return baseOptions;
|
|
477
|
-
}
|
|
478
|
-
const regex = new RegExp(queryString, "i");
|
|
479
|
-
return [
|
|
480
|
-
...getDynamicOptions(editor, queryString),
|
|
481
|
-
...baseOptions.filter(
|
|
482
|
-
(option) => regex.test(option.title) || option.keywords.some((keyword) => regex.test(keyword))
|
|
483
|
-
)
|
|
484
|
-
];
|
|
485
|
-
}, [editor, queryString]);
|
|
486
|
-
const onSelectOption = useCallback(
|
|
487
|
-
(selectedOption, nodeToRemove, closeMenu, matchingString) => {
|
|
488
|
-
editor.update(() => {
|
|
489
|
-
nodeToRemove == null ? void 0 : nodeToRemove.remove();
|
|
490
|
-
selectedOption.onSelect(matchingString);
|
|
491
|
-
closeMenu();
|
|
492
|
-
});
|
|
493
|
-
},
|
|
494
|
-
[editor, showModal]
|
|
495
|
-
);
|
|
496
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
497
|
-
LexicalTypeaheadMenuPlugin,
|
|
498
|
-
{
|
|
499
|
-
onQueryChange: setQueryString,
|
|
500
|
-
onSelectOption,
|
|
501
|
-
triggerFn: checkForTriggerMatch,
|
|
502
|
-
options,
|
|
503
|
-
menuRenderFn: (anchorElementRef, { selectedIndex, selectOptionAndCleanUp, setHighlightedIndex }) => anchorElementRef.current && options.length ? ReactDOM.createPortal(
|
|
504
|
-
/* @__PURE__ */ React.createElement(
|
|
505
|
-
"div",
|
|
506
|
-
{
|
|
507
|
-
id: "toolbar",
|
|
508
|
-
className: "overflow-x-hidden z-[100] relative max-w-[300px] max-sm:w-[200px] w-[300px] max-h-[300px] h-fit border rounded-sm bg-white/80 dark:bg-[#020b19]/95 shadow-sm shadow-muted-foreground/20"
|
|
509
|
-
},
|
|
510
|
-
/* @__PURE__ */ React.createElement(Command, null, /* @__PURE__ */ React.createElement(CommandInput, { placeholder: "Type a command" }), /* @__PURE__ */ React.createElement(CommandList, null, /* @__PURE__ */ React.createElement(CommandEmpty, null, "No results found."), options.map((option, i) => /* @__PURE__ */ React.createElement(
|
|
511
|
-
CommandItem,
|
|
512
|
-
{
|
|
513
|
-
ref: option.ref,
|
|
514
|
-
className: cn(
|
|
515
|
-
selectedIndex === i ? "bg-gray-200 dark:bg-gray-700" : "hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer rounded-sm gap-x-2 relative h-full border-0 transition-colors items-start"
|
|
516
|
-
),
|
|
517
|
-
onSelect: () => {
|
|
518
|
-
setHighlightedIndex(i);
|
|
519
|
-
selectOptionAndCleanUp(option);
|
|
520
|
-
},
|
|
521
|
-
onMouseEnter: () => {
|
|
522
|
-
setHighlightedIndex(i);
|
|
523
|
-
},
|
|
524
|
-
key: option.key
|
|
525
|
-
},
|
|
526
|
-
/* @__PURE__ */ React.createElement("div", { className: "p-4 h-full bg-gray-400/60 dark:bg-gray-300/10 rounded-sm" }, option.icon),
|
|
527
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex flex-row justify-between items-center" }, /* @__PURE__ */ React.createElement("div", { className: "flex justify-center items-start flex-col" }, /* @__PURE__ */ React.createElement("div", null, option.title), /* @__PURE__ */ React.createElement("span", { className: "text-sm text-muted-foreground break-words" }, option.desc)), option.keyboardShortcut && /* @__PURE__ */ React.createElement(CommandShortcut, { className: "absolute top-1 right-2" }, option.keyboardShortcut))
|
|
528
|
-
))))
|
|
529
|
-
),
|
|
530
|
-
anchorElementRef.current
|
|
531
|
-
) : null
|
|
532
|
-
}
|
|
533
|
-
), Modal);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
export {
|
|
537
|
-
SlashCommand
|
|
538
|
-
};
|