@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
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useModal
|
|
3
|
+
} from "./chunk-IAFCQV3Z.mjs";
|
|
4
|
+
import {
|
|
5
|
+
$createFigmaNode,
|
|
6
|
+
$createTweetNode,
|
|
7
|
+
$createYouTubeNode,
|
|
8
|
+
FigmaNode,
|
|
9
|
+
TweetNode,
|
|
10
|
+
YouTubeNode
|
|
11
|
+
} from "./chunk-VGAX6YEY.mjs";
|
|
12
|
+
import {
|
|
13
|
+
Input
|
|
14
|
+
} from "./chunk-5NRAXWYA.mjs";
|
|
15
|
+
import {
|
|
16
|
+
Button
|
|
17
|
+
} from "./chunk-OE5JRLCN.mjs";
|
|
18
|
+
import {
|
|
19
|
+
__objRest,
|
|
20
|
+
__spreadProps,
|
|
21
|
+
__spreadValues,
|
|
22
|
+
init_react_shim
|
|
23
|
+
} from "./chunk-WYCFGRFJ.mjs";
|
|
24
|
+
|
|
25
|
+
// src/components/ui/icons/brand-icons.tsx
|
|
26
|
+
init_react_shim();
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
function Youtube(_a) {
|
|
29
|
+
var _b = _a, { className = "w-4 h-4" } = _b, props = __objRest(_b, ["className"]);
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
"svg",
|
|
32
|
+
__spreadProps(__spreadValues({
|
|
33
|
+
viewBox: "0 0 24 24",
|
|
34
|
+
width: "24",
|
|
35
|
+
height: "24",
|
|
36
|
+
stroke: "currentColor",
|
|
37
|
+
strokeWidth: "2",
|
|
38
|
+
fill: "none",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round",
|
|
41
|
+
className
|
|
42
|
+
}, props), {
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" }),
|
|
45
|
+
/* @__PURE__ */ jsx("polygon", { points: "10 15 15 12 10 9 10 15", fill: "currentColor" })
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function Twitter(_a) {
|
|
51
|
+
var _b = _a, { className = "w-4 h-4" } = _b, props = __objRest(_b, ["className"]);
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"svg",
|
|
54
|
+
__spreadProps(__spreadValues({
|
|
55
|
+
viewBox: "0 0 24 24",
|
|
56
|
+
width: "24",
|
|
57
|
+
height: "24",
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
strokeWidth: "2",
|
|
60
|
+
fill: "none",
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
strokeLinejoin: "round",
|
|
63
|
+
className
|
|
64
|
+
}, props), {
|
|
65
|
+
children: /* @__PURE__ */ jsx("path", { d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" })
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function Figma(_a) {
|
|
70
|
+
var _b = _a, { className = "w-4 h-4" } = _b, props = __objRest(_b, ["className"]);
|
|
71
|
+
return /* @__PURE__ */ jsxs(
|
|
72
|
+
"svg",
|
|
73
|
+
__spreadProps(__spreadValues({
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
width: "24",
|
|
76
|
+
height: "24",
|
|
77
|
+
stroke: "currentColor",
|
|
78
|
+
strokeWidth: "2",
|
|
79
|
+
fill: "none",
|
|
80
|
+
strokeLinecap: "round",
|
|
81
|
+
strokeLinejoin: "round",
|
|
82
|
+
className
|
|
83
|
+
}, props), {
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx("path", { d: "M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z" }),
|
|
86
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z" }),
|
|
87
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z" }),
|
|
88
|
+
/* @__PURE__ */ jsx("path", { d: "M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z" }),
|
|
89
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z" })
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// src/components/editor/plugins/AutoEmbedPlugin/index.tsx
|
|
96
|
+
init_react_shim();
|
|
97
|
+
import {
|
|
98
|
+
AutoEmbedOption,
|
|
99
|
+
LexicalAutoEmbedPlugin,
|
|
100
|
+
URL_MATCHER
|
|
101
|
+
} from "@lexical/react/LexicalAutoEmbedPlugin";
|
|
102
|
+
import { useLexicalComposerContext as useLexicalComposerContext4 } from "@lexical/react/LexicalComposerContext";
|
|
103
|
+
import { useMemo, useState } from "react";
|
|
104
|
+
import * as ReactDOM from "react-dom";
|
|
105
|
+
|
|
106
|
+
// src/components/editor/plugins/FigmaPlugin/index.tsx
|
|
107
|
+
init_react_shim();
|
|
108
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
109
|
+
import { $insertNodeToNearestRoot } from "@lexical/utils";
|
|
110
|
+
import { COMMAND_PRIORITY_EDITOR, createCommand } from "lexical";
|
|
111
|
+
import { useEffect } from "react";
|
|
112
|
+
var INSERT_FIGMA_COMMAND = createCommand(
|
|
113
|
+
"INSERT_FIGMA_COMMAND"
|
|
114
|
+
);
|
|
115
|
+
function FigmaPlugin() {
|
|
116
|
+
const [editor] = useLexicalComposerContext();
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (!editor.hasNodes([FigmaNode])) {
|
|
119
|
+
throw new Error("FigmaPlugin: FigmaNode not registered on editor");
|
|
120
|
+
}
|
|
121
|
+
return editor.registerCommand(
|
|
122
|
+
INSERT_FIGMA_COMMAND,
|
|
123
|
+
(payload) => {
|
|
124
|
+
const figmaNode = $createFigmaNode(payload);
|
|
125
|
+
$insertNodeToNearestRoot(figmaNode);
|
|
126
|
+
return true;
|
|
127
|
+
},
|
|
128
|
+
COMMAND_PRIORITY_EDITOR
|
|
129
|
+
);
|
|
130
|
+
}, [editor]);
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// src/components/editor/plugins/YouTubePlugin/index.ts
|
|
135
|
+
init_react_shim();
|
|
136
|
+
import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
|
|
137
|
+
import { $insertNodeToNearestRoot as $insertNodeToNearestRoot2 } from "@lexical/utils";
|
|
138
|
+
import { COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR2, createCommand as createCommand2 } from "lexical";
|
|
139
|
+
import { useEffect as useEffect2 } from "react";
|
|
140
|
+
var INSERT_YOUTUBE_COMMAND = createCommand2(
|
|
141
|
+
"INSERT_YOUTUBE_COMMAND"
|
|
142
|
+
);
|
|
143
|
+
function YouTubePlugin() {
|
|
144
|
+
const [editor] = useLexicalComposerContext2();
|
|
145
|
+
useEffect2(() => {
|
|
146
|
+
if (!editor.hasNodes([YouTubeNode])) {
|
|
147
|
+
throw new Error("YouTubePlugin: YouTubeNode not registered on editor");
|
|
148
|
+
}
|
|
149
|
+
return editor.registerCommand(
|
|
150
|
+
INSERT_YOUTUBE_COMMAND,
|
|
151
|
+
(payload) => {
|
|
152
|
+
const youTubeNode = $createYouTubeNode(payload);
|
|
153
|
+
$insertNodeToNearestRoot2(youTubeNode);
|
|
154
|
+
return true;
|
|
155
|
+
},
|
|
156
|
+
COMMAND_PRIORITY_EDITOR2
|
|
157
|
+
);
|
|
158
|
+
}, [editor]);
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// src/components/editor/plugins/TwitterPlugin/index.ts
|
|
163
|
+
init_react_shim();
|
|
164
|
+
import { useLexicalComposerContext as useLexicalComposerContext3 } from "@lexical/react/LexicalComposerContext";
|
|
165
|
+
import { $insertNodeToNearestRoot as $insertNodeToNearestRoot3 } from "@lexical/utils";
|
|
166
|
+
import { COMMAND_PRIORITY_EDITOR as COMMAND_PRIORITY_EDITOR3, createCommand as createCommand3 } from "lexical";
|
|
167
|
+
import { useEffect as useEffect3 } from "react";
|
|
168
|
+
var INSERT_TWEET_COMMAND = createCommand3(
|
|
169
|
+
"INSERT_TWEET_COMMAND"
|
|
170
|
+
);
|
|
171
|
+
function TwitterPlugin() {
|
|
172
|
+
const [editor] = useLexicalComposerContext3();
|
|
173
|
+
useEffect3(() => {
|
|
174
|
+
if (!editor.hasNodes([TweetNode])) {
|
|
175
|
+
throw new Error("TwitterPlugin: TweetNode not registered on editor");
|
|
176
|
+
}
|
|
177
|
+
return editor.registerCommand(
|
|
178
|
+
INSERT_TWEET_COMMAND,
|
|
179
|
+
(payload) => {
|
|
180
|
+
const tweetNode = $createTweetNode(payload);
|
|
181
|
+
$insertNodeToNearestRoot3(tweetNode);
|
|
182
|
+
return true;
|
|
183
|
+
},
|
|
184
|
+
COMMAND_PRIORITY_EDITOR3
|
|
185
|
+
);
|
|
186
|
+
}, [editor]);
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// src/components/editor/plugins/AutoEmbedPlugin/index.tsx
|
|
191
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
192
|
+
var YoutubeEmbedConfig = {
|
|
193
|
+
contentName: "Youtube Video",
|
|
194
|
+
exampleUrl: "https://www.youtube.com/watch?v=jNQXAC9IVRw",
|
|
195
|
+
// Icon for display.
|
|
196
|
+
icon: /* @__PURE__ */ jsx2(Youtube, { className: "h-4 w-4" }),
|
|
197
|
+
insertNode: (editor, result) => {
|
|
198
|
+
editor.dispatchCommand(INSERT_YOUTUBE_COMMAND, result.id);
|
|
199
|
+
},
|
|
200
|
+
keywords: ["youtube", "video"],
|
|
201
|
+
// Determine if a given URL is a match and return url data.
|
|
202
|
+
parseUrl: async (url) => {
|
|
203
|
+
const match = /^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/.exec(url);
|
|
204
|
+
const id = match ? (match == null ? void 0 : match[2].length) === 11 ? match[2] : null : null;
|
|
205
|
+
if (id != null) {
|
|
206
|
+
return {
|
|
207
|
+
id,
|
|
208
|
+
url
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
},
|
|
213
|
+
type: "youtube-video"
|
|
214
|
+
};
|
|
215
|
+
var TwitterEmbedConfig = {
|
|
216
|
+
// e.g. Tweet or Google Map.
|
|
217
|
+
contentName: "Tweet",
|
|
218
|
+
exampleUrl: "https://twitter.com/jack/status/20",
|
|
219
|
+
// Icon for display.
|
|
220
|
+
icon: /* @__PURE__ */ jsx2(Twitter, { className: "h-4 w-4" }),
|
|
221
|
+
// Create the Lexical embed node from the url data.
|
|
222
|
+
insertNode: (editor, result) => {
|
|
223
|
+
editor.dispatchCommand(INSERT_TWEET_COMMAND, result.id);
|
|
224
|
+
},
|
|
225
|
+
// For extra searching.
|
|
226
|
+
keywords: ["tweet", "twitter"],
|
|
227
|
+
// Determine if a given URL is a match and return url data.
|
|
228
|
+
parseUrl: (text) => {
|
|
229
|
+
const match = /^https:\/\/(twitter|x)\.com\/(#!\/)?(\w+)\/status(es)*\/(\d+)/.exec(
|
|
230
|
+
text
|
|
231
|
+
);
|
|
232
|
+
if (match != null) {
|
|
233
|
+
return {
|
|
234
|
+
id: match[5],
|
|
235
|
+
url: match[1]
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
},
|
|
240
|
+
type: "tweet"
|
|
241
|
+
};
|
|
242
|
+
var FigmaEmbedConfig = {
|
|
243
|
+
contentName: "Figma Document",
|
|
244
|
+
exampleUrl: "https://www.figma.com/file/LKQ4FJ4bTnCSjedbRpk931/Sample-File",
|
|
245
|
+
icon: /* @__PURE__ */ jsx2(Figma, { className: "h-4 w-4" }),
|
|
246
|
+
insertNode: (editor, result) => {
|
|
247
|
+
editor.dispatchCommand(INSERT_FIGMA_COMMAND, result.id);
|
|
248
|
+
},
|
|
249
|
+
keywords: ["figma", "figma.com", "mock-up"],
|
|
250
|
+
// Determine if a given URL is a match and return url data.
|
|
251
|
+
parseUrl: (text) => {
|
|
252
|
+
const match = /https:\/\/([\w.-]+\.)?figma.com\/(file|proto)\/([0-9a-zA-Z]{22,128})(?:\/.*)?$/.exec(
|
|
253
|
+
text
|
|
254
|
+
);
|
|
255
|
+
if (match != null) {
|
|
256
|
+
return {
|
|
257
|
+
id: match[3],
|
|
258
|
+
url: match[0]
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
return null;
|
|
262
|
+
},
|
|
263
|
+
type: "figma"
|
|
264
|
+
};
|
|
265
|
+
var EmbedConfigs = [
|
|
266
|
+
TwitterEmbedConfig,
|
|
267
|
+
YoutubeEmbedConfig,
|
|
268
|
+
FigmaEmbedConfig
|
|
269
|
+
];
|
|
270
|
+
function AutoEmbedMenuItem({
|
|
271
|
+
index,
|
|
272
|
+
isSelected,
|
|
273
|
+
onClick,
|
|
274
|
+
onMouseEnter,
|
|
275
|
+
option
|
|
276
|
+
}) {
|
|
277
|
+
let className = "item";
|
|
278
|
+
if (isSelected) {
|
|
279
|
+
className += " selected";
|
|
280
|
+
}
|
|
281
|
+
return /* @__PURE__ */ jsx2(
|
|
282
|
+
"li",
|
|
283
|
+
{
|
|
284
|
+
tabIndex: -1,
|
|
285
|
+
className,
|
|
286
|
+
ref: option.setRefElement,
|
|
287
|
+
role: "option",
|
|
288
|
+
"aria-selected": isSelected,
|
|
289
|
+
id: "typeahead-item-" + index,
|
|
290
|
+
onMouseEnter,
|
|
291
|
+
onClick,
|
|
292
|
+
children: /* @__PURE__ */ jsx2("span", { className: "text", children: option.title })
|
|
293
|
+
},
|
|
294
|
+
option.key
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
function AutoEmbedMenu({
|
|
298
|
+
options,
|
|
299
|
+
selectedItemIndex,
|
|
300
|
+
onOptionClick,
|
|
301
|
+
onOptionMouseEnter
|
|
302
|
+
}) {
|
|
303
|
+
return /* @__PURE__ */ jsx2("div", { className: "typeahead-popover", children: /* @__PURE__ */ jsx2("ul", { children: options.map((option, i) => /* @__PURE__ */ jsx2(
|
|
304
|
+
AutoEmbedMenuItem,
|
|
305
|
+
{
|
|
306
|
+
index: i,
|
|
307
|
+
isSelected: selectedItemIndex === i,
|
|
308
|
+
onClick: () => onOptionClick(option, i),
|
|
309
|
+
onMouseEnter: () => onOptionMouseEnter(i),
|
|
310
|
+
option
|
|
311
|
+
},
|
|
312
|
+
option.key
|
|
313
|
+
)) }) });
|
|
314
|
+
}
|
|
315
|
+
var debounce = (callback, delay) => {
|
|
316
|
+
let timeoutId;
|
|
317
|
+
return (text) => {
|
|
318
|
+
window.clearTimeout(timeoutId);
|
|
319
|
+
timeoutId = window.setTimeout(() => {
|
|
320
|
+
callback(text);
|
|
321
|
+
}, delay);
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
function AutoEmbedDialog({
|
|
325
|
+
embedConfig,
|
|
326
|
+
onClose
|
|
327
|
+
}) {
|
|
328
|
+
const [text, setText] = useState("");
|
|
329
|
+
const [editor] = useLexicalComposerContext4();
|
|
330
|
+
const [embedResult, setEmbedResult] = useState(null);
|
|
331
|
+
const validateText = useMemo(
|
|
332
|
+
() => debounce((inputText) => {
|
|
333
|
+
const urlMatch = URL_MATCHER.exec(inputText);
|
|
334
|
+
if (embedConfig != null && inputText != null && urlMatch != null) {
|
|
335
|
+
Promise.resolve(embedConfig.parseUrl(inputText)).then(
|
|
336
|
+
(parseResult) => {
|
|
337
|
+
setEmbedResult(parseResult);
|
|
338
|
+
}
|
|
339
|
+
);
|
|
340
|
+
} else if (embedResult != null) {
|
|
341
|
+
setEmbedResult(null);
|
|
342
|
+
}
|
|
343
|
+
}, 200),
|
|
344
|
+
[embedConfig, embedResult]
|
|
345
|
+
);
|
|
346
|
+
const onClick = () => {
|
|
347
|
+
if (embedResult != null) {
|
|
348
|
+
embedConfig.insertNode(editor, embedResult);
|
|
349
|
+
onClose();
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-center flex-col space-y-3", children: [
|
|
353
|
+
/* @__PURE__ */ jsx2("div", { children: /* @__PURE__ */ jsx2(
|
|
354
|
+
Input,
|
|
355
|
+
{
|
|
356
|
+
type: "text",
|
|
357
|
+
className: "Input__input",
|
|
358
|
+
placeholder: embedConfig.exampleUrl,
|
|
359
|
+
value: text,
|
|
360
|
+
"data-test-id": `${embedConfig.type}-embed-modal-url`,
|
|
361
|
+
onChange: (e) => {
|
|
362
|
+
const { value } = e.target;
|
|
363
|
+
setText(value);
|
|
364
|
+
validateText(value);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
) }),
|
|
368
|
+
/* @__PURE__ */ jsx2(
|
|
369
|
+
Button,
|
|
370
|
+
{
|
|
371
|
+
disabled: !embedResult,
|
|
372
|
+
onClick,
|
|
373
|
+
"data-test-id": `${embedConfig.type}-embed-modal-submit-btn`,
|
|
374
|
+
children: "Embed"
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
] });
|
|
378
|
+
}
|
|
379
|
+
function AutoEmbedPlugin() {
|
|
380
|
+
const [modal, showModal] = useModal();
|
|
381
|
+
const openEmbedModal = (embedConfig) => {
|
|
382
|
+
showModal(`Embed ${embedConfig.contentName}`, "type the url", (onClose) => /* @__PURE__ */ jsx2(AutoEmbedDialog, { embedConfig, onClose }));
|
|
383
|
+
};
|
|
384
|
+
const getMenuOptions = (activeEmbedConfig, embedFn, dismissFn) => {
|
|
385
|
+
return [
|
|
386
|
+
new AutoEmbedOption("Dismiss", {
|
|
387
|
+
onSelect: dismissFn
|
|
388
|
+
}),
|
|
389
|
+
new AutoEmbedOption(`Embed ${activeEmbedConfig.contentName}`, {
|
|
390
|
+
onSelect: embedFn
|
|
391
|
+
})
|
|
392
|
+
];
|
|
393
|
+
};
|
|
394
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
395
|
+
modal,
|
|
396
|
+
/* @__PURE__ */ jsx2(
|
|
397
|
+
LexicalAutoEmbedPlugin,
|
|
398
|
+
{
|
|
399
|
+
embedConfigs: EmbedConfigs,
|
|
400
|
+
onOpenEmbedModalForConfig: openEmbedModal,
|
|
401
|
+
getMenuOptions,
|
|
402
|
+
menuRenderFn: (anchorElementRef, { selectedIndex, options, selectOptionAndCleanUp, setHighlightedIndex }) => anchorElementRef.current ? ReactDOM.createPortal(
|
|
403
|
+
/* @__PURE__ */ jsx2(
|
|
404
|
+
"div",
|
|
405
|
+
{
|
|
406
|
+
className: "typeahead-popover flex items-center auto-embed-menu",
|
|
407
|
+
style: {
|
|
408
|
+
marginLeft: `${Math.max(
|
|
409
|
+
parseFloat(anchorElementRef.current.style.width) - 200,
|
|
410
|
+
0
|
|
411
|
+
)}px`,
|
|
412
|
+
width: 200
|
|
413
|
+
},
|
|
414
|
+
children: /* @__PURE__ */ jsx2(
|
|
415
|
+
AutoEmbedMenu,
|
|
416
|
+
{
|
|
417
|
+
options,
|
|
418
|
+
selectedItemIndex: selectedIndex,
|
|
419
|
+
onOptionClick: (option, index) => {
|
|
420
|
+
setHighlightedIndex(index);
|
|
421
|
+
selectOptionAndCleanUp(option);
|
|
422
|
+
},
|
|
423
|
+
onOptionMouseEnter: (index) => {
|
|
424
|
+
setHighlightedIndex(index);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
anchorElementRef.current
|
|
431
|
+
) : null
|
|
432
|
+
}
|
|
433
|
+
)
|
|
434
|
+
] });
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export {
|
|
438
|
+
Youtube,
|
|
439
|
+
Twitter,
|
|
440
|
+
Figma,
|
|
441
|
+
FigmaPlugin,
|
|
442
|
+
YouTubePlugin,
|
|
443
|
+
TwitterPlugin,
|
|
444
|
+
YoutubeEmbedConfig,
|
|
445
|
+
TwitterEmbedConfig,
|
|
446
|
+
FigmaEmbedConfig,
|
|
447
|
+
AutoEmbedDialog,
|
|
448
|
+
AutoEmbedPlugin
|
|
449
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-OE5JRLCN.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Popover,
|
|
6
|
+
PopoverContent,
|
|
7
|
+
PopoverTrigger
|
|
8
|
+
} from "./chunk-IIVB6JNE.mjs";
|
|
9
|
+
import {
|
|
10
|
+
cn
|
|
11
|
+
} from "./chunk-JHXDLYEV.mjs";
|
|
12
|
+
import {
|
|
13
|
+
__objRest,
|
|
14
|
+
__spreadValues,
|
|
15
|
+
init_react_shim
|
|
16
|
+
} from "./chunk-WYCFGRFJ.mjs";
|
|
17
|
+
|
|
18
|
+
// src/components/ui/drop-downs/index.tsx
|
|
19
|
+
init_react_shim();
|
|
20
|
+
import * as React2 from "react";
|
|
21
|
+
import { ChevronsUpDown } from "lucide-react";
|
|
22
|
+
|
|
23
|
+
// src/components/ui/command.tsx
|
|
24
|
+
init_react_shim();
|
|
25
|
+
import * as React from "react";
|
|
26
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
27
|
+
import { Search } from "lucide-react";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var Command = React.forwardRef((_a, ref) => {
|
|
30
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
CommandPrimitive,
|
|
33
|
+
__spreadValues({
|
|
34
|
+
ref,
|
|
35
|
+
className: cn(
|
|
36
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover dark:bg-[#020b19]/95 bg-white/90 text-popover-foreground",
|
|
37
|
+
className
|
|
38
|
+
)
|
|
39
|
+
}, props)
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
43
|
+
var CommandInput = React.forwardRef((_a, ref) => {
|
|
44
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
CommandPrimitive.Input,
|
|
49
|
+
__spreadValues({
|
|
50
|
+
ref,
|
|
51
|
+
className: cn(
|
|
52
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
|
+
className
|
|
54
|
+
)
|
|
55
|
+
}, props)
|
|
56
|
+
)
|
|
57
|
+
] });
|
|
58
|
+
});
|
|
59
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
60
|
+
var CommandList = React.forwardRef((_a, ref) => {
|
|
61
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
CommandPrimitive.List,
|
|
64
|
+
__spreadValues({
|
|
65
|
+
ref,
|
|
66
|
+
className: cn("max-h-[300px] overflow-y-auto scrollbar-none overflow-x-hidden", className)
|
|
67
|
+
}, props)
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
71
|
+
var CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
72
|
+
CommandPrimitive.Empty,
|
|
73
|
+
__spreadValues({
|
|
74
|
+
ref,
|
|
75
|
+
className: "py-6 text-center text-sm"
|
|
76
|
+
}, props)
|
|
77
|
+
));
|
|
78
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
79
|
+
var CommandGroup = React.forwardRef((_a, ref) => {
|
|
80
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
CommandPrimitive.Group,
|
|
83
|
+
__spreadValues({
|
|
84
|
+
ref,
|
|
85
|
+
className: cn(
|
|
86
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
87
|
+
className
|
|
88
|
+
)
|
|
89
|
+
}, props)
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
93
|
+
var CommandSeparator = React.forwardRef((_a, ref) => {
|
|
94
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
CommandPrimitive.Separator,
|
|
97
|
+
__spreadValues({
|
|
98
|
+
ref,
|
|
99
|
+
className: cn("-mx-1 h-px bg-border", className)
|
|
100
|
+
}, props)
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
104
|
+
var CommandItem = React.forwardRef((_a, ref) => {
|
|
105
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
106
|
+
return /* @__PURE__ */ jsx(
|
|
107
|
+
CommandPrimitive.Item,
|
|
108
|
+
__spreadValues({
|
|
109
|
+
ref,
|
|
110
|
+
className: cn(
|
|
111
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
112
|
+
className
|
|
113
|
+
)
|
|
114
|
+
}, props)
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
118
|
+
var CommandShortcut = (_a) => {
|
|
119
|
+
var _b = _a, {
|
|
120
|
+
className
|
|
121
|
+
} = _b, props = __objRest(_b, [
|
|
122
|
+
"className"
|
|
123
|
+
]);
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
125
|
+
"span",
|
|
126
|
+
__spreadValues({
|
|
127
|
+
className: cn(
|
|
128
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
129
|
+
className
|
|
130
|
+
)
|
|
131
|
+
}, props)
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
135
|
+
|
|
136
|
+
// src/components/ui/drop-downs/index.tsx
|
|
137
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
138
|
+
function DropDown({
|
|
139
|
+
className,
|
|
140
|
+
TriggerLabel,
|
|
141
|
+
TriggerClassName,
|
|
142
|
+
values,
|
|
143
|
+
disabled,
|
|
144
|
+
PopoverContentClassName,
|
|
145
|
+
triggerVariants = "outline",
|
|
146
|
+
ShowChevronsUpDown = true,
|
|
147
|
+
side = "bottom",
|
|
148
|
+
sideOffset = 5
|
|
149
|
+
}) {
|
|
150
|
+
const [value, setValue] = React2.useState("");
|
|
151
|
+
return /* @__PURE__ */ jsxs2(Popover, { modal: false, children: [
|
|
152
|
+
/* @__PURE__ */ jsx2(PopoverTrigger, { disabled, asChild: true, children: /* @__PURE__ */ jsxs2(
|
|
153
|
+
Button,
|
|
154
|
+
{
|
|
155
|
+
variant: triggerVariants,
|
|
156
|
+
role: "combobox",
|
|
157
|
+
size: "Toolbar",
|
|
158
|
+
style: TriggerClassName,
|
|
159
|
+
className,
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsx2("div", { className: "flex flex-row justify-center gap-x-3 items-center", children: TriggerLabel }),
|
|
162
|
+
ShowChevronsUpDown && /* @__PURE__ */ jsx2(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
) }),
|
|
166
|
+
/* @__PURE__ */ jsx2(
|
|
167
|
+
PopoverContent,
|
|
168
|
+
{
|
|
169
|
+
side,
|
|
170
|
+
sideOffset,
|
|
171
|
+
style: PopoverContentClassName,
|
|
172
|
+
className: "w-[200px] p-0 dropdown-portal",
|
|
173
|
+
children: /* @__PURE__ */ jsxs2(Command, { children: [
|
|
174
|
+
/* @__PURE__ */ jsx2(CommandInput, { placeholder: "Search..." }),
|
|
175
|
+
/* @__PURE__ */ jsxs2(CommandList, { children: [
|
|
176
|
+
/* @__PURE__ */ jsx2(CommandEmpty, { children: "No found." }),
|
|
177
|
+
/* @__PURE__ */ jsx2(CommandGroup, { children: values.map((framework) => /* @__PURE__ */ jsx2(
|
|
178
|
+
CommandItem,
|
|
179
|
+
{
|
|
180
|
+
value: framework.label,
|
|
181
|
+
style: framework.style,
|
|
182
|
+
className: cn(
|
|
183
|
+
"cursor-pointer",
|
|
184
|
+
value === framework.label && "bg-gray-300/10"
|
|
185
|
+
),
|
|
186
|
+
onSelect: (currentValue) => {
|
|
187
|
+
setValue(currentValue === value ? "" : currentValue);
|
|
188
|
+
if (framework.func) framework == null ? void 0 : framework.func();
|
|
189
|
+
},
|
|
190
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
191
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-4 flex-row", children: [
|
|
192
|
+
framework.icon,
|
|
193
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
194
|
+
framework.label,
|
|
195
|
+
/* @__PURE__ */ jsx2("span", { className: "text-sm text-muted-foreground", children: framework.desc })
|
|
196
|
+
] })
|
|
197
|
+
] }),
|
|
198
|
+
framework.shortcuts && /* @__PURE__ */ jsx2(CommandShortcut, { children: framework.shortcuts })
|
|
199
|
+
] })
|
|
200
|
+
},
|
|
201
|
+
framework.label
|
|
202
|
+
)) })
|
|
203
|
+
] })
|
|
204
|
+
] })
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] });
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export {
|
|
211
|
+
Command,
|
|
212
|
+
CommandInput,
|
|
213
|
+
CommandList,
|
|
214
|
+
CommandEmpty,
|
|
215
|
+
CommandGroup,
|
|
216
|
+
CommandSeparator,
|
|
217
|
+
CommandItem,
|
|
218
|
+
DropDown
|
|
219
|
+
};
|