@collabchron/notiq 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -259
- package/dist/AICommandBarPlugin-TADJ3X2Y.mjs +12 -0
- package/dist/AIDialog-RHRYHSVN.mjs +325 -0
- package/dist/AudioComponent-CKLMLB5T.mjs +278 -0
- package/dist/CodeActionMenuPlugin-FGH6HZLL.mjs +14 -0
- package/dist/CollaborationPlugin-TIZOQBUT.mjs +405 -0
- package/dist/CollaboratorsBar-AMPIAUOY.mjs +20 -0
- package/dist/CommentsPlugin-SDJJTUGK.mjs +19 -0
- package/dist/DynamicBlockComponent-2LOADZUX.mjs +221 -0
- package/dist/{EquationComponent-CB6DFIHV.mjs → EquationComponent-4NFG55NQ.mjs} +82 -46
- package/dist/ExcalidrawComponent-BMSYIPP6.mjs +662 -0
- package/dist/ExcalidrawPlugin-QLPGJPSX.mjs +14 -0
- package/dist/ExportPlugin-MJHYKQZJ.mjs +43 -0
- package/dist/FileComponent-Y56MX5QD.mjs +200 -0
- package/dist/FloatingLinkEditorPlugin-MABB34L7.mjs +12 -0
- package/dist/FloatingTextFormatToolbarPlugin-BXCPN3KD.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-KV5DX4ED.mjs +982 -0
- package/dist/SlashCommand-SPR7G5EI.mjs +39 -0
- package/dist/StoryBuilderComponent-JN4ZPZOW.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-F52PVNXU.mjs +823 -0
- package/dist/VersionHistoryPlugin-YWGCREKA.mjs +371 -0
- package/dist/babel-RJXDAKDM.mjs +7287 -0
- package/dist/background-color-RW5JYLMG.mjs +425 -0
- package/dist/block-format-TODFREE2.mjs +14 -0
- package/dist/{chunk-RBWZGXPF.mjs → chunk-22ZIL6NH.mjs} +5 -5
- package/dist/{chunk-DSFQHA7I.mjs → chunk-2LNT36RL.mjs} +118 -295
- package/dist/chunk-37LC44W3.mjs +2677 -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-5D4JF3ZZ.mjs +624 -0
- package/dist/{chunk-POGRR73N.mjs → chunk-5NRAXWYA.mjs} +4 -3
- package/dist/{chunk-PZSUSXQG.mjs → chunk-6D6QLRYR.mjs} +2 -2
- package/dist/chunk-6FQFPPLG.mjs +785 -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-YUDCJRJM.mjs → chunk-BGV62GC2.mjs} +3 -2
- package/dist/{chunk-2FNEAMSP.mjs → chunk-C4JWLBYN.mjs} +50 -45
- package/dist/{chunk-TCYK7DM7.mjs → chunk-CDAMHK63.mjs} +4 -3
- package/dist/chunk-CLRSETYQ.mjs +431 -0
- 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-N3WN46VL.mjs → chunk-ELBTVBTS.mjs} +23 -22
- package/dist/chunk-ENH2IOHI.mjs +1828 -0
- package/dist/{chunk-4EXYCTGJ.mjs → chunk-EVPWKNE4.mjs} +3 -3
- package/dist/{chunk-LGG4IUIA.mjs → chunk-FO7M3X2B.mjs} +2 -2
- 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-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-3JVFG7ER.mjs → chunk-KNW2CGIP.mjs} +7 -64
- package/dist/{chunk-4HBCVSE6.mjs → chunk-KXRLARGI.mjs} +1 -1
- package/dist/{chunk-4GFXER7R.mjs → chunk-LBGM4VVZ.mjs} +141 -89
- package/dist/chunk-LLGVCM7M.mjs +809 -0
- package/dist/chunk-LU2XWLOE.mjs +219 -0
- package/dist/chunk-LVRJM45C.mjs +171 -0
- package/dist/{chunk-K36V4SIW.mjs → chunk-MSAO3YFB.mjs} +21 -18
- package/dist/chunk-N3KDPSRI.mjs +496 -0
- 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-HJPPNHYM.mjs → chunk-QNIY45SF.mjs} +4 -3
- 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-456TN7IM.mjs → chunk-SYUCM5G5.mjs} +15 -14
- package/dist/{chunk-4MEDW3T6.mjs → chunk-T2UBAZ66.mjs} +5 -4
- package/dist/chunk-TC3IISJZ.mjs +408 -0
- package/dist/chunk-VGAX6YEY.mjs +399 -0
- package/dist/chunk-VNDDDXGH.mjs +682 -0
- package/dist/{chunk-U47ABU5Z.mjs → chunk-W6VQSFE5.mjs} +2 -2
- package/dist/chunk-WUVIQCX7.mjs +944 -0
- package/dist/chunk-WYCFGRFJ.mjs +118 -0
- package/dist/chunk-XNJNT6PC.mjs +1701 -0
- package/dist/chunk-XYLTLGY5.mjs +775 -0
- package/dist/chunk-XYMXGU4T.mjs +129 -0
- package/dist/{chunk-3G37YKTV.mjs → chunk-YR2DD74C.mjs} +9 -8
- package/dist/chunk-ZFV2HGD3.mjs +143 -0
- package/dist/{chunk-77UA6HYR.mjs → chunk-ZKZ7MLSS.mjs} +1 -1
- package/dist/chunk-ZYJ7KABY.mjs +419 -0
- package/dist/color-S55XFDYQ.mjs +13 -0
- package/dist/components/canvas/CanvasMode.d.ts +18 -0
- package/dist/components/editor/Core.d.ts +19 -0
- package/dist/components/editor/index.d.ts +38 -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 +10 -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 +89 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +74458 -0
- package/dist/core.mjs +138 -0
- package/dist/estree-QRALCFII.mjs +5029 -0
- package/dist/font-IJKFR4BM.mjs +12 -0
- package/dist/font-size-3HMJHKO2.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-QPB2CVXP.mjs} +359 -324
- package/dist/index.d.ts +13 -145
- package/dist/index.js +61491 -44350
- package/dist/index.mjs +466 -1569
- package/dist/insert-audio-I3PD6JFS.mjs +180 -0
- package/dist/insert-file-PHR7XL4V.mjs +190 -0
- package/dist/insert-gif-R5ZO4JHC.mjs +112 -0
- package/dist/insert-image-PLBZELHK.mjs +348 -0
- package/dist/insert-node-DGCZBGKG.mjs +243 -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 +73860 -0
- package/dist/react.mjs +66 -0
- package/dist/standalone-A6VDOPCZ.mjs +2506 -0
- package/dist/stepper-KNITDVLG.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-TEB4S52S.mjs} +22 -19
- package/dist/text-format-T3IY7FBI.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,325 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ExtractData,
|
|
4
|
+
getSelectedText,
|
|
5
|
+
insertText
|
|
6
|
+
} from "./chunk-ZYJ7KABY.mjs";
|
|
7
|
+
import "./chunk-4DVIYZVB.mjs";
|
|
8
|
+
import "./chunk-LLGVCM7M.mjs";
|
|
9
|
+
import "./chunk-VGAX6YEY.mjs";
|
|
10
|
+
import "./chunk-N6ILV6NF.mjs";
|
|
11
|
+
import "./chunk-XYMXGU4T.mjs";
|
|
12
|
+
import "./chunk-ZFV2HGD3.mjs";
|
|
13
|
+
import "./chunk-NBE6FF6L.mjs";
|
|
14
|
+
import "./chunk-ELBTVBTS.mjs";
|
|
15
|
+
import {
|
|
16
|
+
Input
|
|
17
|
+
} from "./chunk-5NRAXWYA.mjs";
|
|
18
|
+
import "./chunk-QNIY45SF.mjs";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-OE5JRLCN.mjs";
|
|
22
|
+
import "./chunk-KNW2CGIP.mjs";
|
|
23
|
+
import "./chunk-7QRJVZQY.mjs";
|
|
24
|
+
import {
|
|
25
|
+
cn
|
|
26
|
+
} from "./chunk-JHXDLYEV.mjs";
|
|
27
|
+
import {
|
|
28
|
+
init_react_shim
|
|
29
|
+
} from "./chunk-WYCFGRFJ.mjs";
|
|
30
|
+
|
|
31
|
+
// src/components/ui/ai/AIDialog.tsx
|
|
32
|
+
init_react_shim();
|
|
33
|
+
import { useState } from "react";
|
|
34
|
+
import { useCompletion } from "@ai-sdk/react";
|
|
35
|
+
import ReactMarkdown from "react-markdown";
|
|
36
|
+
import {
|
|
37
|
+
Sparkles,
|
|
38
|
+
Send,
|
|
39
|
+
Loader2,
|
|
40
|
+
Copy,
|
|
41
|
+
Check,
|
|
42
|
+
FilePlus,
|
|
43
|
+
RotateCcw,
|
|
44
|
+
Settings2,
|
|
45
|
+
Key
|
|
46
|
+
} from "lucide-react";
|
|
47
|
+
import { toast } from "sonner";
|
|
48
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
49
|
+
var PROMPT_SUGGESTIONS = [
|
|
50
|
+
{ label: "\u{1F4A1} Brainstorm ideas", prompt: "Brainstorm 5 innovative ideas for this project with brief rationales." },
|
|
51
|
+
{ label: "\u{1F4DD} Write intro", prompt: "Write an engaging, authoritative introduction outlining the problem and solution." },
|
|
52
|
+
{ label: "\u{1F5FA}\uFE0F Step-by-step guide", prompt: "Create a step-by-step roadmap with actionable milestones.", action: "Steps" },
|
|
53
|
+
{ label: "\u{1F4CA} Comparison table", prompt: "Generate a markdown comparison table analyzing key tradeoffs." },
|
|
54
|
+
{ label: "\u26A1 Summarize draft", prompt: "Summarize the primary takeaways and next steps in crisp bullet points.", action: "Summarize" }
|
|
55
|
+
];
|
|
56
|
+
function AIDialog({ editor, onClose, defaultAction = "default" }) {
|
|
57
|
+
const [prompt, setPrompt] = useState("");
|
|
58
|
+
const [action, setAction] = useState(defaultAction);
|
|
59
|
+
const [copied, setCopied] = useState(false);
|
|
60
|
+
const [showSettings, setShowSettings] = useState(false);
|
|
61
|
+
const [selectedProvider, setSelectedProvider] = useState(() => {
|
|
62
|
+
if (typeof window !== "undefined") {
|
|
63
|
+
return localStorage.getItem("notiq_ai_provider") || "auto";
|
|
64
|
+
}
|
|
65
|
+
return "auto";
|
|
66
|
+
});
|
|
67
|
+
const [apiKey, setApiKey] = useState(() => {
|
|
68
|
+
if (typeof window !== "undefined") {
|
|
69
|
+
return localStorage.getItem("notiq_ai_api_key") || "";
|
|
70
|
+
}
|
|
71
|
+
return "";
|
|
72
|
+
});
|
|
73
|
+
const { completion, isLoading, complete, setCompletion } = useCompletion({
|
|
74
|
+
api: "/api/ai",
|
|
75
|
+
streamProtocol: "text",
|
|
76
|
+
onError: (err) => {
|
|
77
|
+
toast.error(err.message || "Failed to generate AI response.");
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
const handleSaveSettings = () => {
|
|
81
|
+
if (typeof window !== "undefined") {
|
|
82
|
+
localStorage.setItem("notiq_ai_provider", selectedProvider);
|
|
83
|
+
localStorage.setItem("notiq_ai_api_key", apiKey);
|
|
84
|
+
}
|
|
85
|
+
setShowSettings(false);
|
|
86
|
+
toast.success("AI preferences saved.");
|
|
87
|
+
};
|
|
88
|
+
const handleGenerate = async (customPrompt, customAction) => {
|
|
89
|
+
const activePrompt = customPrompt !== void 0 ? customPrompt : prompt;
|
|
90
|
+
const activeAction = customAction !== void 0 ? customAction : action;
|
|
91
|
+
if (!activePrompt.trim() && activeAction === "default") {
|
|
92
|
+
toast.error("Please enter a prompt or instruction.");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
const docContext = ExtractData(editor);
|
|
97
|
+
const selectedText = getSelectedText(editor, 40);
|
|
98
|
+
await complete(activePrompt, {
|
|
99
|
+
body: {
|
|
100
|
+
action: activeAction,
|
|
101
|
+
prompt: activePrompt || selectedText,
|
|
102
|
+
context: docContext,
|
|
103
|
+
modelProvider: selectedProvider !== "auto" ? selectedProvider : void 0,
|
|
104
|
+
apiKey: apiKey.trim() || void 0
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (e) {
|
|
108
|
+
toast.error("Generation encountered an issue.");
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const handleInsert = () => {
|
|
112
|
+
if (!completion) return;
|
|
113
|
+
insertText(completion, editor);
|
|
114
|
+
toast.success("Inserted AI content into document.");
|
|
115
|
+
onClose();
|
|
116
|
+
};
|
|
117
|
+
const handleCopy = () => {
|
|
118
|
+
if (!completion) return;
|
|
119
|
+
navigator.clipboard.writeText(completion).then(() => {
|
|
120
|
+
setCopied(true);
|
|
121
|
+
toast.success("Copied to clipboard!");
|
|
122
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-[520px] max-h-[80vh] w-full max-w-[620px] bg-background text-foreground select-none", children: [
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 border-b border-border/60", children: [
|
|
127
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-md bg-purple-500/10 text-purple-600 dark:text-purple-400 flex items-center justify-center", children: /* @__PURE__ */ jsx(Sparkles, { className: "h-3.5 w-3.5" }) }),
|
|
129
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
130
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold leading-none", children: "Notiq AI Assistant" }),
|
|
131
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: selectedProvider === "auto" ? "Smart Engine (Zero-Config)" : `${selectedProvider.toUpperCase()} Cloud` })
|
|
132
|
+
] })
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
type: "button",
|
|
138
|
+
onClick: () => setShowSettings(!showSettings),
|
|
139
|
+
className: cn(
|
|
140
|
+
"p-1.5 rounded-md hover:bg-muted transition-colors text-muted-foreground",
|
|
141
|
+
showSettings && "bg-muted text-foreground"
|
|
142
|
+
),
|
|
143
|
+
title: "AI Settings & API Keys",
|
|
144
|
+
children: /* @__PURE__ */ jsx(Settings2, { className: "h-4 w-4" })
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }),
|
|
148
|
+
showSettings && /* @__PURE__ */ jsxs("div", { className: "p-3 bg-muted/40 border-b border-border/60 space-y-2.5 text-xs animate-in slide-in-from-top-2 duration-150", children: [
|
|
149
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
150
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: "Model & API Key Configuration" }),
|
|
151
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", onClick: handleSaveSettings, className: "h-6 text-xs px-2", children: "Save" })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
155
|
+
/* @__PURE__ */ jsx("label", { className: "text-[11px] text-muted-foreground block mb-1", children: "Provider" }),
|
|
156
|
+
/* @__PURE__ */ jsxs(
|
|
157
|
+
"select",
|
|
158
|
+
{
|
|
159
|
+
value: selectedProvider,
|
|
160
|
+
onChange: (e) => {
|
|
161
|
+
setSelectedProvider(e.target.value);
|
|
162
|
+
if (typeof window !== "undefined") {
|
|
163
|
+
localStorage.setItem("notiq_ai_provider", e.target.value);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
className: "w-full h-7 rounded border border-border bg-background px-2 text-xs",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsx("option", { value: "auto", children: "Auto (Smart Engine)" }),
|
|
169
|
+
/* @__PURE__ */ jsx("option", { value: "google", children: "Google Gemini (Gemini 3.8 Flash)" }),
|
|
170
|
+
/* @__PURE__ */ jsx("option", { value: "openai", children: "OpenAI (GPT-4o mini)" }),
|
|
171
|
+
/* @__PURE__ */ jsx("option", { value: "groq", children: "Groq (Ultra-Fast - Recommended)" })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
177
|
+
/* @__PURE__ */ jsx("label", { className: "text-[11px] text-muted-foreground block mb-1", children: "Custom API Key" }),
|
|
178
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
179
|
+
/* @__PURE__ */ jsx(
|
|
180
|
+
Input,
|
|
181
|
+
{
|
|
182
|
+
type: "password",
|
|
183
|
+
value: apiKey,
|
|
184
|
+
onChange: (e) => {
|
|
185
|
+
setApiKey(e.target.value);
|
|
186
|
+
if (typeof window !== "undefined") {
|
|
187
|
+
localStorage.setItem("notiq_ai_api_key", e.target.value);
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
placeholder: "Optional (uses env if empty)",
|
|
191
|
+
className: "h-7 text-xs font-mono pr-6"
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ jsx(Key, { className: "h-3 w-3 absolute right-2 top-2 text-muted-foreground/60" })
|
|
195
|
+
] })
|
|
196
|
+
] })
|
|
197
|
+
] })
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-4 space-y-3 font-sans text-xs", children: completion ? /* @__PURE__ */ jsx("div", { className: "prose prose-xs dark:prose-invert max-w-none leading-relaxed break-words", children: /* @__PURE__ */ jsx(ReactMarkdown, { children: completion }) }) : isLoading ? /* @__PURE__ */ jsxs("div", { className: "h-full flex flex-col items-center justify-center text-center space-y-3 py-6", children: [
|
|
200
|
+
/* @__PURE__ */ jsx(Loader2, { className: "h-7 w-7 text-purple-500 animate-spin" }),
|
|
201
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: "Generating response..." }),
|
|
202
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: "Streaming content from Notiq AI engine" })
|
|
203
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "h-full flex flex-col items-center justify-center text-center text-muted-foreground space-y-3 py-6", children: [
|
|
204
|
+
/* @__PURE__ */ jsx("div", { className: "h-10 w-10 rounded-full bg-purple-500/10 flex items-center justify-center text-purple-500", children: /* @__PURE__ */ jsx(Sparkles, { className: "h-5 w-5" }) }),
|
|
205
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1 max-w-sm", children: [
|
|
206
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium text-foreground text-sm", children: "How can Notiq AI help you?" }),
|
|
207
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: "Ask a question, generate an outline, expand sections, or pick a quick template below." })
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-1.5 max-w-md pt-2", children: PROMPT_SUGGESTIONS.map((item) => /* @__PURE__ */ jsx(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
type: "button",
|
|
213
|
+
onClick: () => {
|
|
214
|
+
setPrompt(item.prompt);
|
|
215
|
+
if (item.action) setAction(item.action);
|
|
216
|
+
handleGenerate(item.prompt, item.action || "default");
|
|
217
|
+
},
|
|
218
|
+
className: "px-2.5 py-1 rounded-full bg-muted/60 hover:bg-muted text-[11px] text-muted-foreground hover:text-foreground transition-all border border-border/50 hover:border-purple-500/40",
|
|
219
|
+
children: item.label
|
|
220
|
+
},
|
|
221
|
+
item.label
|
|
222
|
+
)) })
|
|
223
|
+
] }) }),
|
|
224
|
+
/* @__PURE__ */ jsxs("div", { className: "p-3 border-t border-border/60 bg-muted/20 space-y-2", children: [
|
|
225
|
+
/* @__PURE__ */ jsxs(
|
|
226
|
+
"form",
|
|
227
|
+
{
|
|
228
|
+
onSubmit: (e) => {
|
|
229
|
+
e.preventDefault();
|
|
230
|
+
handleGenerate();
|
|
231
|
+
},
|
|
232
|
+
className: "flex items-center gap-2",
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsx("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx(
|
|
235
|
+
Input,
|
|
236
|
+
{
|
|
237
|
+
value: prompt,
|
|
238
|
+
onChange: (e) => setPrompt(e.target.value),
|
|
239
|
+
placeholder: "Ask AI to write, outline, edit, or explain...",
|
|
240
|
+
disabled: isLoading,
|
|
241
|
+
className: "h-9 text-xs pr-8",
|
|
242
|
+
autoFocus: true
|
|
243
|
+
}
|
|
244
|
+
) }),
|
|
245
|
+
/* @__PURE__ */ jsxs(
|
|
246
|
+
Button,
|
|
247
|
+
{
|
|
248
|
+
type: "submit",
|
|
249
|
+
size: "sm",
|
|
250
|
+
disabled: isLoading || !prompt.trim(),
|
|
251
|
+
className: "h-9 px-3 gap-1.5 text-xs bg-purple-600 hover:bg-purple-700 text-white",
|
|
252
|
+
children: [
|
|
253
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Send, { className: "h-3.5 w-3.5" }),
|
|
254
|
+
/* @__PURE__ */ jsx("span", { children: "Generate" })
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
),
|
|
261
|
+
completion && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pt-1", children: [
|
|
262
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
263
|
+
/* @__PURE__ */ jsxs(
|
|
264
|
+
Button,
|
|
265
|
+
{
|
|
266
|
+
type: "button",
|
|
267
|
+
variant: "outline",
|
|
268
|
+
size: "sm",
|
|
269
|
+
onClick: () => handleGenerate(),
|
|
270
|
+
disabled: isLoading,
|
|
271
|
+
className: "h-7 px-2 text-xs gap-1",
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "h-3 w-3" }),
|
|
274
|
+
/* @__PURE__ */ jsx("span", { children: "Retry" })
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
/* @__PURE__ */ jsxs(
|
|
279
|
+
Button,
|
|
280
|
+
{
|
|
281
|
+
type: "button",
|
|
282
|
+
variant: "outline",
|
|
283
|
+
size: "sm",
|
|
284
|
+
onClick: handleCopy,
|
|
285
|
+
className: "h-7 px-2 text-xs gap-1",
|
|
286
|
+
children: [
|
|
287
|
+
copied ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-emerald-500" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3" }),
|
|
288
|
+
/* @__PURE__ */ jsx("span", { children: copied ? "Copied" : "Copy" })
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
] }),
|
|
293
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
294
|
+
/* @__PURE__ */ jsx(
|
|
295
|
+
Button,
|
|
296
|
+
{
|
|
297
|
+
type: "button",
|
|
298
|
+
variant: "ghost",
|
|
299
|
+
size: "sm",
|
|
300
|
+
onClick: onClose,
|
|
301
|
+
className: "h-7 px-2.5 text-xs text-muted-foreground",
|
|
302
|
+
children: "Cancel"
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
/* @__PURE__ */ jsxs(
|
|
306
|
+
Button,
|
|
307
|
+
{
|
|
308
|
+
type: "button",
|
|
309
|
+
size: "sm",
|
|
310
|
+
onClick: handleInsert,
|
|
311
|
+
className: "h-7 px-3 text-xs gap-1 bg-primary text-primary-foreground",
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ jsx(FilePlus, { className: "h-3 w-3" }),
|
|
314
|
+
/* @__PURE__ */ jsx("span", { children: "Insert into doc" })
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
)
|
|
318
|
+
] })
|
|
319
|
+
] })
|
|
320
|
+
] })
|
|
321
|
+
] });
|
|
322
|
+
}
|
|
323
|
+
export {
|
|
324
|
+
AIDialog as default
|
|
325
|
+
};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
$isAudioNode
|
|
4
|
+
} from "./chunk-XYMXGU4T.mjs";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-JHXDLYEV.mjs";
|
|
8
|
+
import {
|
|
9
|
+
init_react_shim
|
|
10
|
+
} from "./chunk-WYCFGRFJ.mjs";
|
|
11
|
+
|
|
12
|
+
// src/components/editor/nodes/AudioNode/AudioComponent.tsx
|
|
13
|
+
init_react_shim();
|
|
14
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
15
|
+
import { BlockWithAlignableContents } from "@lexical/react/LexicalBlockWithAlignableContents";
|
|
16
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
17
|
+
import { $getNodeByKey } from "lexical";
|
|
18
|
+
import {
|
|
19
|
+
Play,
|
|
20
|
+
Pause,
|
|
21
|
+
Volume2,
|
|
22
|
+
VolumeX,
|
|
23
|
+
RotateCcw,
|
|
24
|
+
Music,
|
|
25
|
+
Download,
|
|
26
|
+
Trash2
|
|
27
|
+
} from "lucide-react";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
function formatDuration(seconds) {
|
|
30
|
+
if (isNaN(seconds) || seconds < 0) return "0:00";
|
|
31
|
+
const mins = Math.floor(seconds / 60);
|
|
32
|
+
const secs = Math.floor(seconds % 60);
|
|
33
|
+
return `${mins}:${secs < 10 ? "0" : ""}${secs}`;
|
|
34
|
+
}
|
|
35
|
+
function AudioComponent({
|
|
36
|
+
className,
|
|
37
|
+
format,
|
|
38
|
+
nodeKey,
|
|
39
|
+
src,
|
|
40
|
+
title: initialTitle,
|
|
41
|
+
author: initialAuthor
|
|
42
|
+
}) {
|
|
43
|
+
const [editor] = useLexicalComposerContext();
|
|
44
|
+
const audioRef = useRef(null);
|
|
45
|
+
const [isPlaying, setIsPlaying] = useState(false);
|
|
46
|
+
const [currentTime, setCurrentTime] = useState(0);
|
|
47
|
+
const [duration, setDuration] = useState(0);
|
|
48
|
+
const [isMuted, setIsMuted] = useState(false);
|
|
49
|
+
const [playbackRate, setPlaybackRate] = useState(1);
|
|
50
|
+
const [title, setTitle] = useState(initialTitle || "Audio Track");
|
|
51
|
+
const [author, setAuthor] = useState(initialAuthor || "Audio Clip");
|
|
52
|
+
const [isEditingTitle, setIsEditingTitle] = useState(false);
|
|
53
|
+
const handleTitleBlur = useCallback(() => {
|
|
54
|
+
setIsEditingTitle(false);
|
|
55
|
+
editor.update(() => {
|
|
56
|
+
const node = $getNodeByKey(nodeKey);
|
|
57
|
+
if ($isAudioNode(node)) {
|
|
58
|
+
node.setTitle(title);
|
|
59
|
+
node.setAuthor(author);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}, [editor, nodeKey, title, author]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const audio = audioRef.current;
|
|
65
|
+
if (!audio) return;
|
|
66
|
+
const handleTimeUpdate = () => setCurrentTime(audio.currentTime);
|
|
67
|
+
const handleLoadedMetadata = () => {
|
|
68
|
+
if (audio.duration && !isNaN(audio.duration)) {
|
|
69
|
+
setDuration(audio.duration);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const handleEnded = () => {
|
|
73
|
+
setIsPlaying(false);
|
|
74
|
+
setCurrentTime(0);
|
|
75
|
+
};
|
|
76
|
+
audio.addEventListener("timeupdate", handleTimeUpdate);
|
|
77
|
+
audio.addEventListener("loadedmetadata", handleLoadedMetadata);
|
|
78
|
+
audio.addEventListener("ended", handleEnded);
|
|
79
|
+
return () => {
|
|
80
|
+
audio.removeEventListener("timeupdate", handleTimeUpdate);
|
|
81
|
+
audio.removeEventListener("loadedmetadata", handleLoadedMetadata);
|
|
82
|
+
audio.removeEventListener("ended", handleEnded);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
const togglePlay = () => {
|
|
86
|
+
const audio = audioRef.current;
|
|
87
|
+
if (!audio) return;
|
|
88
|
+
if (isPlaying) {
|
|
89
|
+
audio.pause();
|
|
90
|
+
setIsPlaying(false);
|
|
91
|
+
} else {
|
|
92
|
+
audio.play().catch(() => {
|
|
93
|
+
});
|
|
94
|
+
setIsPlaying(true);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const handleSeek = (e) => {
|
|
98
|
+
const audio = audioRef.current;
|
|
99
|
+
if (!audio) return;
|
|
100
|
+
const newTime = parseFloat(e.target.value);
|
|
101
|
+
audio.currentTime = newTime;
|
|
102
|
+
setCurrentTime(newTime);
|
|
103
|
+
};
|
|
104
|
+
const toggleMute = () => {
|
|
105
|
+
const audio = audioRef.current;
|
|
106
|
+
if (!audio) return;
|
|
107
|
+
audio.muted = !isMuted;
|
|
108
|
+
setIsMuted(!isMuted);
|
|
109
|
+
};
|
|
110
|
+
const cycleSpeed = () => {
|
|
111
|
+
const audio = audioRef.current;
|
|
112
|
+
if (!audio) return;
|
|
113
|
+
const speeds = [1, 1.25, 1.5, 2];
|
|
114
|
+
const nextSpeed = speeds[(speeds.indexOf(playbackRate) + 1) % speeds.length];
|
|
115
|
+
audio.playbackRate = nextSpeed;
|
|
116
|
+
setPlaybackRate(nextSpeed);
|
|
117
|
+
};
|
|
118
|
+
const restartAudio = () => {
|
|
119
|
+
const audio = audioRef.current;
|
|
120
|
+
if (!audio) return;
|
|
121
|
+
audio.currentTime = 0;
|
|
122
|
+
setCurrentTime(0);
|
|
123
|
+
audio.play().catch(() => {
|
|
124
|
+
});
|
|
125
|
+
setIsPlaying(true);
|
|
126
|
+
};
|
|
127
|
+
const handleDelete = () => {
|
|
128
|
+
editor.update(() => {
|
|
129
|
+
const node = $getNodeByKey(nodeKey);
|
|
130
|
+
if (node) {
|
|
131
|
+
node.remove();
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
const progressPercent = duration > 0 ? currentTime / duration * 100 : 0;
|
|
136
|
+
return /* @__PURE__ */ jsx(BlockWithAlignableContents, { className, format, nodeKey, children: /* @__PURE__ */ jsxs("div", { className: "relative my-4 w-full max-w-2xl rounded-2xl border border-border/80 bg-card/95 p-4 shadow-sm hover:shadow-md transition-all select-none group", children: [
|
|
137
|
+
/* @__PURE__ */ jsx("audio", { ref: audioRef, src, preload: "metadata" }),
|
|
138
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 pb-3 border-b border-border/50", children: [
|
|
139
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
140
|
+
/* @__PURE__ */ jsx(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
className: cn(
|
|
144
|
+
"relative flex h-10 w-10 shrink-0 items-center justify-center rounded-xl transition-all duration-300",
|
|
145
|
+
isPlaying ? "bg-primary text-primary-foreground shadow-md scale-105" : "bg-muted text-muted-foreground"
|
|
146
|
+
),
|
|
147
|
+
children: /* @__PURE__ */ jsx(Music, { className: cn("h-5 w-5", isPlaying && "animate-pulse") })
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0", children: isEditingTitle ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
"input",
|
|
153
|
+
{
|
|
154
|
+
type: "text",
|
|
155
|
+
value: title,
|
|
156
|
+
onChange: (e) => setTitle(e.target.value),
|
|
157
|
+
onBlur: handleTitleBlur,
|
|
158
|
+
onKeyDown: (e) => e.key === "Enter" && handleTitleBlur(),
|
|
159
|
+
autoFocus: true,
|
|
160
|
+
className: "h-6 rounded border border-primary/50 bg-background px-1.5 text-xs font-semibold focus:outline-none"
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
/* @__PURE__ */ jsx(
|
|
164
|
+
"input",
|
|
165
|
+
{
|
|
166
|
+
type: "text",
|
|
167
|
+
value: author,
|
|
168
|
+
onChange: (e) => setAuthor(e.target.value),
|
|
169
|
+
onBlur: handleTitleBlur,
|
|
170
|
+
onKeyDown: (e) => e.key === "Enter" && handleTitleBlur(),
|
|
171
|
+
className: "h-6 rounded border border-border bg-background px-1.5 text-[11px] text-muted-foreground focus:outline-none"
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }) : /* @__PURE__ */ jsxs(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
onDoubleClick: () => setIsEditingTitle(true),
|
|
178
|
+
className: "cursor-pointer group/title",
|
|
179
|
+
title: "Double click to edit title",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-foreground group-hover/title:text-primary transition-colors", children: title }),
|
|
182
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-[11px] text-muted-foreground", children: author })
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
) })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 opacity-80 group-hover:opacity-100 transition-opacity", children: [
|
|
188
|
+
/* @__PURE__ */ jsxs(
|
|
189
|
+
"button",
|
|
190
|
+
{
|
|
191
|
+
type: "button",
|
|
192
|
+
onClick: cycleSpeed,
|
|
193
|
+
className: "rounded-md px-1.5 py-0.5 text-[11px] font-semibold text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
194
|
+
title: "Playback speed",
|
|
195
|
+
children: [
|
|
196
|
+
playbackRate,
|
|
197
|
+
"x"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
/* @__PURE__ */ jsx(
|
|
202
|
+
"button",
|
|
203
|
+
{
|
|
204
|
+
type: "button",
|
|
205
|
+
onClick: toggleMute,
|
|
206
|
+
className: "rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
207
|
+
title: isMuted ? "Unmute" : "Mute",
|
|
208
|
+
children: isMuted ? /* @__PURE__ */ jsx(VolumeX, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Volume2, { className: "h-4 w-4" })
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
"a",
|
|
213
|
+
{
|
|
214
|
+
href: src,
|
|
215
|
+
download: title || "audio",
|
|
216
|
+
target: "_blank",
|
|
217
|
+
rel: "noreferrer",
|
|
218
|
+
className: "rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
219
|
+
title: "Download or open audio file",
|
|
220
|
+
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
"button",
|
|
225
|
+
{
|
|
226
|
+
type: "button",
|
|
227
|
+
onClick: handleDelete,
|
|
228
|
+
className: "rounded-md p-1.5 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors",
|
|
229
|
+
title: "Delete audio player",
|
|
230
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
] })
|
|
234
|
+
] }),
|
|
235
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pt-3", children: [
|
|
236
|
+
/* @__PURE__ */ jsx(
|
|
237
|
+
"button",
|
|
238
|
+
{
|
|
239
|
+
type: "button",
|
|
240
|
+
onClick: togglePlay,
|
|
241
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-sm hover:scale-105 active:scale-95 transition-all",
|
|
242
|
+
"aria-label": isPlaying ? "Pause audio" : "Play audio",
|
|
243
|
+
children: isPlaying ? /* @__PURE__ */ jsx(Pause, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Play, { className: "h-4 w-4 ml-0.5" })
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ jsx(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
type: "button",
|
|
250
|
+
onClick: restartAudio,
|
|
251
|
+
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
|
|
252
|
+
title: "Restart",
|
|
253
|
+
children: /* @__PURE__ */ jsx(RotateCcw, { className: "h-3.5 w-3.5" })
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
/* @__PURE__ */ jsx("div", { className: "relative flex-1 flex items-center group/track", children: /* @__PURE__ */ jsx(
|
|
257
|
+
"input",
|
|
258
|
+
{
|
|
259
|
+
type: "range",
|
|
260
|
+
min: 0,
|
|
261
|
+
max: duration || 100,
|
|
262
|
+
step: 0.1,
|
|
263
|
+
value: currentTime,
|
|
264
|
+
onChange: handleSeek,
|
|
265
|
+
className: "w-full h-2 rounded-lg bg-muted appearance-none cursor-pointer accent-primary"
|
|
266
|
+
}
|
|
267
|
+
) }),
|
|
268
|
+
/* @__PURE__ */ jsxs("div", { className: "shrink-0 font-mono text-[11px] text-muted-foreground", children: [
|
|
269
|
+
formatDuration(currentTime),
|
|
270
|
+
" / ",
|
|
271
|
+
formatDuration(duration)
|
|
272
|
+
] })
|
|
273
|
+
] })
|
|
274
|
+
] }) });
|
|
275
|
+
}
|
|
276
|
+
export {
|
|
277
|
+
AudioComponent as default
|
|
278
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeActionMenuPlugin
|
|
3
|
+
} from "./chunk-N3KDPSRI.mjs";
|
|
4
|
+
import "./chunk-EEBA6OAH.mjs";
|
|
5
|
+
import "./chunk-3IILA3IP.mjs";
|
|
6
|
+
import "./chunk-LU2XWLOE.mjs";
|
|
7
|
+
import "./chunk-H3P47YXJ.mjs";
|
|
8
|
+
import "./chunk-OE5JRLCN.mjs";
|
|
9
|
+
import "./chunk-IIVB6JNE.mjs";
|
|
10
|
+
import "./chunk-JHXDLYEV.mjs";
|
|
11
|
+
import "./chunk-WYCFGRFJ.mjs";
|
|
12
|
+
export {
|
|
13
|
+
CodeActionMenuPlugin as default
|
|
14
|
+
};
|