@docyrus/ui-pro-ai-assistant 0.0.1 → 0.0.2
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/dist/chunk-VSTHZ22Q.js +165 -0
- package/dist/chunk-VSTHZ22Q.js.map +1 -0
- package/dist/components/assistant-animations.d.ts +12 -0
- package/dist/components/assistant-dialogs.d.ts +30 -0
- package/dist/components/code-view.d.ts +30 -0
- package/dist/components/create-agent-task.d.ts +9 -0
- package/dist/components/create-new-work-version.d.ts +7 -0
- package/dist/components/extract-web.d.ts +9 -0
- package/dist/components/forward-to-agent.d.ts +8 -0
- package/dist/components/generate-chart.d.ts +11 -0
- package/dist/components/generative-action-button.d.ts +11 -0
- package/dist/components/generative-tool.d.ts +61 -0
- package/dist/components/generative-ui-object.d.ts +26 -0
- package/dist/components/input-area.d.ts +49 -0
- package/dist/components/json-schema-layout.d.ts +6 -0
- package/dist/components/list-item-card.d.ts +17 -0
- package/dist/components/mermaid-diagram.d.ts +8 -0
- package/dist/components/preview-image.d.ts +16 -0
- package/dist/components/request-approval.d.ts +9 -0
- package/dist/components/request-user-input.d.ts +31 -0
- package/dist/components/search-web.d.ts +8 -0
- package/dist/components/sheet-command.d.ts +11 -0
- package/dist/components/shell-canvas.d.ts +16 -0
- package/dist/components/show-advanced-data-table.d.ts +34 -0
- package/dist/components/show-generated-content-options.d.ts +16 -0
- package/dist/components/show-people-cards.d.ts +8 -0
- package/dist/components/subagent-tool.d.ts +22 -0
- package/dist/components/text-editor-tool.d.ts +23 -0
- package/dist/components/work-canvas.d.ts +13 -0
- package/dist/components/work-card.d.ts +9 -0
- package/dist/docy-assistant.d.ts +5 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/use-assistant-api.d.ts +44 -0
- package/dist/hooks/use-deployment-data.d.ts +31 -0
- package/dist/hooks/use-project-state.d.ts +64 -0
- package/dist/hooks/use-session-state.d.ts +31 -0
- package/dist/hooks/use-speech-recognition.d.ts +25 -0
- package/dist/hooks/use-ui-state.d.ts +29 -0
- package/dist/hooks/use-works-state.d.ts +22 -0
- package/dist/i18n/context.d.ts +11 -0
- package/dist/i18n/index.d.ts +13 -0
- package/dist/i18n/types.d.ts +18 -0
- package/dist/i18n/use-translation.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -20
- package/dist/index.js.map +1 -1
- package/dist/internal/plate-editor/editor/auth-context.d.ts +6 -0
- package/dist/internal/plate-editor/editor/editor-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/editor-kit.d.ts +5 -0
- package/dist/internal/plate-editor/editor/plate-editor.d.ts +20 -0
- package/dist/internal/plate-editor/editor/plate-types.d.ts +70 -0
- package/dist/internal/plate-editor/editor/plugins/ai-kit.d.ts +98 -0
- package/dist/internal/plate-editor/editor/plugins/autoformat-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/basic-blocks-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/basic-blocks-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/basic-marks-base-kit.d.ts +17 -0
- package/dist/internal/plate-editor/editor/plugins/basic-marks-kit.d.ts +17 -0
- package/dist/internal/plate-editor/editor/plugins/basic-nodes-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/block-menu-kit.d.ts +165 -0
- package/dist/internal/plate-editor/editor/plugins/block-placeholder-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/block-selection-kit.d.ts +137 -0
- package/dist/internal/plate-editor/editor/plugins/callout-base-kit.d.ts +20 -0
- package/dist/internal/plate-editor/editor/plugins/callout-kit.d.ts +20 -0
- package/dist/internal/plate-editor/editor/plugins/code-block-base-kit.d.ts +7 -0
- package/dist/internal/plate-editor/editor/plugins/code-block-kit.d.ts +7 -0
- package/dist/internal/plate-editor/editor/plugins/column-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/column-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/comment-base-kit.d.ts +47 -0
- package/dist/internal/plate-editor/editor/plugins/comment-kit.d.ts +71 -0
- package/dist/internal/plate-editor/editor/plugins/copilot-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/cursor-overlay-kit.d.ts +11 -0
- package/dist/internal/plate-editor/editor/plugins/date-base-kit.d.ts +19 -0
- package/dist/internal/plate-editor/editor/plugins/date-kit.d.ts +19 -0
- package/dist/internal/plate-editor/editor/plugins/discussion-kit.d.ts +55 -0
- package/dist/internal/plate-editor/editor/plugins/dnd-kit.d.ts +20 -0
- package/dist/internal/plate-editor/editor/plugins/docx-export-kit.d.ts +19 -0
- package/dist/internal/plate-editor/editor/plugins/docx-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/emoji-kit.d.ts +5 -0
- package/dist/internal/plate-editor/editor/plugins/exit-break-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/floating-toolbar-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/font-base-kit.d.ts +13 -0
- package/dist/internal/plate-editor/editor/plugins/font-kit.d.ts +13 -0
- package/dist/internal/plate-editor/editor/plugins/indent-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/indent-kit.d.ts +5 -0
- package/dist/internal/plate-editor/editor/plugins/link-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/link-kit.d.ts +68 -0
- package/dist/internal/plate-editor/editor/plugins/list-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/list-kit.d.ts +8 -0
- package/dist/internal/plate-editor/editor/plugins/markdown-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/math-base-kit.d.ts +9 -0
- package/dist/internal/plate-editor/editor/plugins/math-kit.d.ts +9 -0
- package/dist/internal/plate-editor/editor/plugins/media-base-kit.d.ts +25 -0
- package/dist/internal/plate-editor/editor/plugins/media-kit.d.ts +38 -0
- package/dist/internal/plate-editor/editor/plugins/mention-base-kit.d.ts +11 -0
- package/dist/internal/plate-editor/editor/plugins/mention-kit.d.ts +11 -0
- package/dist/internal/plate-editor/editor/plugins/slash-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/suggestion-base-kit.d.ts +32 -0
- package/dist/internal/plate-editor/editor/plugins/suggestion-kit.d.ts +53 -0
- package/dist/internal/plate-editor/editor/plugins/table-base-kit.d.ts +77 -0
- package/dist/internal/plate-editor/editor/plugins/table-kit.d.ts +138 -0
- package/dist/internal/plate-editor/editor/plugins/toc-base-kit.d.ts +1 -0
- package/dist/internal/plate-editor/editor/plugins/toc-kit.d.ts +5 -0
- package/dist/internal/plate-editor/editor/plugins/toggle-base-kit.d.ts +12 -0
- package/dist/internal/plate-editor/editor/plugins/toggle-kit.d.ts +16 -0
- package/dist/internal/plate-editor/editor/transforms.d.ts +8 -0
- package/dist/internal/plate-editor/editor/use-chat.d.ts +26 -0
- package/dist/internal/plate-editor/hooks/index.d.ts +3 -0
- package/dist/internal/plate-editor/hooks/use-copy-to-clipboard.d.ts +6 -0
- package/dist/internal/plate-editor/hooks/use-is-touch-device.d.ts +1 -0
- package/dist/internal/plate-editor/hooks/use-lock-scroll.d.ts +1 -0
- package/dist/internal/plate-editor/hooks/use-media-query.d.ts +2 -0
- package/dist/internal/plate-editor/hooks/use-mounted.d.ts +6 -0
- package/dist/internal/plate-editor/hooks/use-on-click-outside.d.ts +18 -0
- package/dist/internal/plate-editor/hooks/use-upload-file.d.ts +21 -0
- package/dist/internal/plate-editor/i18n/context.d.ts +12 -0
- package/dist/internal/plate-editor/i18n/index.d.ts +3 -0
- package/dist/internal/plate-editor/i18n/types.d.ts +58 -0
- package/dist/internal/plate-editor/i18n/use-translation.d.ts +4 -0
- package/dist/internal/plate-editor/index.d.ts +9 -0
- package/dist/internal/plate-editor/lib/ai-output-converter.d.ts +57 -0
- package/dist/internal/plate-editor/lib/download-file.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/ai-chat-editor.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/ai-menu.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/ai-node.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/ai-toolbar-button.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/alert-dialog.d.ts +50 -0
- package/dist/internal/plate-editor/plate-ui/align-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/avatar.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/block-context-menu.d.ts +8 -0
- package/dist/internal/plate-editor/plate-ui/block-discussion.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/block-draggable.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/block-list-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/block-list.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/block-menu.d.ts +167 -0
- package/dist/internal/plate-editor/plate-ui/block-selection.d.ts +5 -0
- package/dist/internal/plate-editor/plate-ui/block-suggestion.d.ts +16 -0
- package/dist/internal/plate-editor/plate-ui/blockquote-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/blockquote-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/button.d.ts +40 -0
- package/dist/internal/plate-editor/plate-ui/calendar.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/callout-node-static.d.ts +6 -0
- package/dist/internal/plate-editor/plate-ui/callout-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/caption.d.ts +10 -0
- package/dist/internal/plate-editor/plate-ui/checkbox.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/code-block-node-static.d.ts +12 -0
- package/dist/internal/plate-editor/plate-ui/code-block-node.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/code-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/code-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/column-node-static.d.ts +12 -0
- package/dist/internal/plate-editor/plate-ui/column-node.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/command.d.ts +25 -0
- package/dist/internal/plate-editor/plate-ui/comment-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/comment-node.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/comment-toolbar-button.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/comment.d.ts +45 -0
- package/dist/internal/plate-editor/plate-ui/cursor-overlay.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/date-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/date-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/dialog.d.ts +52 -0
- package/dist/internal/plate-editor/plate-ui/dropdown-menu.d.ts +36 -0
- package/dist/internal/plate-editor/plate-ui/editor-static.d.ts +6 -0
- package/dist/internal/plate-editor/plate-ui/editor.d.ts +15 -0
- package/dist/internal/plate-editor/plate-ui/emoji-node.d.ts +7 -0
- package/dist/internal/plate-editor/plate-ui/emoji-toolbar-button.d.ts +20 -0
- package/dist/internal/plate-editor/plate-ui/equation-node-static.d.ts +14 -0
- package/dist/internal/plate-editor/plate-ui/equation-node.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/equation-toolbar-button.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/export-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/fixed-toolbar-buttons.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/fixed-toolbar.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/floating-discussion.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/floating-toolbar-buttons.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/floating-toolbar.d.ts +6 -0
- package/dist/internal/plate-editor/plate-ui/font-color-toolbar-button.d.ts +15 -0
- package/dist/internal/plate-editor/plate-ui/font-size-toolbar-button.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/ghost-text.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/heading-node-static.d.ts +7 -0
- package/dist/internal/plate-editor/plate-ui/heading-node.d.ts +11 -0
- package/dist/internal/plate-editor/plate-ui/highlight-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/highlight-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/history-toolbar-button.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/hover-card.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/hr-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/hr-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/import-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/indent-toolbar-button.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/inline-combobox.d.ts +37 -0
- package/dist/internal/plate-editor/plate-ui/input.d.ts +7 -0
- package/dist/internal/plate-editor/plate-ui/insert-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/label.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/line-height-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/link-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/link-node.d.ts +7 -0
- package/dist/internal/plate-editor/plate-ui/link-toolbar-button.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/link-toolbar.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/list-toolbar-button.d.ts +5 -0
- package/dist/internal/plate-editor/plate-ui/mark-toolbar-button.d.ts +6 -0
- package/dist/internal/plate-editor/plate-ui/media-audio-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-audio-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/media-embed-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/media-file-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-file-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/media-image-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-image-node.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-placeholder-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/media-preview-dialog.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/media-toolbar-button.d.ts +4 -0
- package/dist/internal/plate-editor/plate-ui/media-toolbar.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-upload-toast.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/media-video-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/media-video-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/mention-node-static.d.ts +5 -0
- package/dist/internal/plate-editor/plate-ui/mention-node.d.ts +11 -0
- package/dist/internal/plate-editor/plate-ui/menu.d.ts +103 -0
- package/dist/internal/plate-editor/plate-ui/mode-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/more-toolbar-button.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/paragraph-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/paragraph-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/popover.d.ts +11 -0
- package/dist/internal/plate-editor/plate-ui/progress.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/remote-cursor-overlay.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/resize-handle.d.ts +17 -0
- package/dist/internal/plate-editor/plate-ui/separator.d.ts +8 -0
- package/dist/internal/plate-editor/plate-ui/slash-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/spinner.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/suggestion-node-static.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/suggestion-node.d.ts +5 -0
- package/dist/internal/plate-editor/plate-ui/suggestion-toolbar-button.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/table-node-static.d.ts +8 -0
- package/dist/internal/plate-editor/plate-ui/table-node.d.ts +9 -0
- package/dist/internal/plate-editor/plate-ui/table-toolbar-button.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/tabs.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/textarea.d.ts +10 -0
- package/dist/internal/plate-editor/plate-ui/toc-node-static.d.ts +7 -0
- package/dist/internal/plate-editor/plate-ui/toc-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/toc-sidebar.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/toggle-node-static.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/toggle-node.d.ts +2 -0
- package/dist/internal/plate-editor/plate-ui/toggle-toolbar-button.d.ts +3 -0
- package/dist/internal/plate-editor/plate-ui/toggle.d.ts +1 -0
- package/dist/internal/plate-editor/plate-ui/toolbar.d.ts +39 -0
- package/dist/internal/plate-editor/plate-ui/tooltip.d.ts +19 -0
- package/dist/internal/plate-editor/plate-ui/turn-into-toolbar-button.d.ts +63 -0
- package/dist/internal/plate-editor/types/index.d.ts +1 -0
- package/dist/internal/plate-editor/vite.d.ts +4 -0
- package/dist/internal/sheets/components/univer-sheets.d.ts +61 -0
- package/dist/internal/sheets/i18n/context.d.ts +11 -0
- package/dist/internal/sheets/i18n/index.d.ts +13 -0
- package/dist/internal/sheets/i18n/types.d.ts +18 -0
- package/dist/internal/sheets/i18n/use-translation.d.ts +2 -0
- package/dist/internal/sheets/index.d.ts +5 -0
- package/dist/internal/sheets/types/index.d.ts +259 -0
- package/dist/internal/sheets/xlsx.d.ts +40 -0
- package/dist/lib/api-client.d.ts +17 -0
- package/dist/lib/assistant-api-actions.d.ts +57 -0
- package/dist/lib/assistant-config.d.ts +39 -0
- package/dist/lib/class-utils.d.ts +22 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/message-utils.d.ts +40 -0
- package/dist/types/index.d.ts +214 -0
- package/dist/views/assistant-view.d.ts +82 -0
- package/dist/views/canvas-app.d.ts +5 -0
- package/dist/views/canvas-code.d.ts +9 -0
- package/dist/views/canvas-deep-research.d.ts +8 -0
- package/dist/views/canvas-image.d.ts +13 -0
- package/dist/views/canvas-record-view.d.ts +10 -0
- package/dist/views/canvas-spreadsheet.d.ts +13 -0
- package/dist/views/canvas-text.d.ts +8 -0
- package/dist/views/canvas.d.ts +12 -0
- package/dist/views/chat-panel.d.ts +56 -0
- package/dist/views/index.d.ts +14 -0
- package/dist/views/memories-panel.d.ts +6 -0
- package/dist/views/message-list.d.ts +31 -0
- package/dist/views/project-detail.d.ts +31 -0
- package/dist/views/projects-panel.d.ts +15 -0
- package/dist/views/sessions-list.d.ts +15 -0
- package/dist/views/sidebar-content.d.ts +22 -0
- package/dist/views/work-detail.d.ts +9 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.js +55 -0
- package/dist/vite.js.map +1 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +3 -0
- package/dist/worker.js.map +1 -0
- package/package.json +12 -5
- package/src/internal/plate-editor/editor/editor-kit.tsx +1 -1
- package/src/internal/plate-editor/editor/plugins/ai-kit.tsx +1 -1
- package/src/internal/plate-editor/editor/plugins/comment-kit.tsx +2 -2
- package/src/internal/plate-editor/editor/plugins/copilot-kit.tsx +1 -1
- package/src/internal/plate-editor/editor/plugins/markdown-kit.tsx +1 -1
- package/src/internal/plate-editor/editor/transforms.ts +4 -4
- package/src/internal/plate-editor/plate-ui/ai-chat-editor.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/ai-menu.tsx +1 -1
- package/src/internal/plate-editor/plate-ui/ai-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/alert-dialog.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/align-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/block-context-menu.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/block-discussion.tsx +1 -1
- package/src/internal/plate-editor/plate-ui/block-draggable.tsx +9 -8
- package/src/internal/plate-editor/plate-ui/block-list-static.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/block-menu.tsx +3 -5
- package/src/internal/plate-editor/plate-ui/block-suggestion.tsx +6 -6
- package/src/internal/plate-editor/plate-ui/button.tsx +17 -6
- package/src/internal/plate-editor/plate-ui/caption.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/code-block-node.tsx +2 -4
- package/src/internal/plate-editor/plate-ui/command.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/comment.tsx +2 -2
- package/src/internal/plate-editor/plate-ui/date-node.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/dialog.tsx +33 -14
- package/src/internal/plate-editor/plate-ui/dropdown-menu.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/editor.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/export-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/fixed-toolbar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/floating-discussion.tsx +20 -20
- package/src/internal/plate-editor/plate-ui/floating-toolbar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/font-color-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/font-size-toolbar-button.tsx +1 -3
- package/src/internal/plate-editor/plate-ui/history-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/import-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/indent-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/input.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/insert-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/line-height-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/link-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/link-toolbar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/list-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/mark-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/media-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/media-toolbar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/menu.tsx +16 -9
- package/src/internal/plate-editor/plate-ui/mode-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/popover.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/remote-cursor-overlay.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/resize-handle.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/separator.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/slash-node.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/suggestion-node-static.tsx +1 -1
- package/src/internal/plate-editor/plate-ui/suggestion-node.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/table-node-static.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/table-node.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/table-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/textarea.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/toc-node-static.tsx +2 -2
- package/src/internal/plate-editor/plate-ui/toc-sidebar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/toggle-toolbar-button.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/toolbar.tsx +0 -2
- package/src/internal/plate-editor/plate-ui/tooltip.tsx +0 -1
- package/src/internal/plate-editor/plate-ui/turn-into-toolbar-button.tsx +0 -2
- package/src/lib/assistant-config.tsx +6 -2
- package/src/vite.ts +1 -221
- package/src/worker.ts +203 -0
|
@@ -344,13 +344,13 @@ const resolveOverlappingTop = (
|
|
|
344
344
|
const useCommentingNode = () => useEditorSelector((editor) => {
|
|
345
345
|
if (!editor?.api || !editor.selection || editor.api.isExpanded()) return;
|
|
346
346
|
|
|
347
|
-
return editor.api.node
|
|
348
|
-
match: n => TextApi.isText(n) && n[KEYS.comment] && n[getDraftCommentKey()]
|
|
349
|
-
})?.[0];
|
|
347
|
+
return (editor.api.node({
|
|
348
|
+
match: (n: TCommentText) => TextApi.isText(n) && n[KEYS.comment] && n[getDraftCommentKey()]
|
|
349
|
+
}) as NodeEntry<TCommentText> | undefined)?.[0];
|
|
350
350
|
}, []);
|
|
351
351
|
|
|
352
352
|
function FloatingDiscussionContent() {
|
|
353
|
-
const editorContainerRef = useEditorContainerRef()
|
|
353
|
+
const editorContainerRef = useEditorContainerRef() as RefObject<HTMLDivElement | null>;
|
|
354
354
|
const editor = useEditorRef();
|
|
355
355
|
const commentApi = editor.getApi(commentPlugin);
|
|
356
356
|
const suggestionApi = editor.getApi(suggestionPlugin);
|
|
@@ -382,22 +382,22 @@ function FloatingDiscussionContent() {
|
|
|
382
382
|
|
|
383
383
|
const allSuggestionNodes = suggestionApi.suggestion
|
|
384
384
|
.nodes({ at: [] })
|
|
385
|
-
.filter(([node]) => !node[getTransientSuggestionKey()]);
|
|
385
|
+
.filter(([node]: NodeEntry<TElement | TSuggestionText>) => !node[getTransientSuggestionKey()]);
|
|
386
386
|
|
|
387
|
-
const suggestionIds = new Set(
|
|
387
|
+
const suggestionIds = new Set<string>(
|
|
388
388
|
allSuggestionNodes
|
|
389
|
-
.flatMap(([node]) => {
|
|
389
|
+
.flatMap(([node]: NodeEntry<TElement | TSuggestionText>) => {
|
|
390
390
|
if (TextApi.isText(node)) {
|
|
391
391
|
const dataList = suggestionApi.suggestion.dataList(node);
|
|
392
392
|
const includeUpdate = dataList.some(
|
|
393
|
-
data => data.type === 'update'
|
|
393
|
+
(data: { type: string }) => data.type === 'update'
|
|
394
394
|
);
|
|
395
395
|
|
|
396
396
|
if (!includeUpdate) return suggestionApi.suggestion.nodeId(node);
|
|
397
397
|
|
|
398
398
|
return dataList
|
|
399
|
-
.filter(data => data.type === 'update')
|
|
400
|
-
.map(d => d.id);
|
|
399
|
+
.filter((data: { type: string }) => data.type === 'update')
|
|
400
|
+
.map((d: { id: string }) => d.id);
|
|
401
401
|
}
|
|
402
402
|
if (ElementApi.isElement(node)) {
|
|
403
403
|
return suggestionApi.suggestion.nodeId(node);
|
|
@@ -405,20 +405,20 @@ function FloatingDiscussionContent() {
|
|
|
405
405
|
|
|
406
406
|
return null;
|
|
407
407
|
})
|
|
408
|
-
.filter(
|
|
408
|
+
.filter((id: string | null): id is string => typeof id === 'string' && id.length > 0)
|
|
409
409
|
);
|
|
410
410
|
|
|
411
411
|
suggestionIds.forEach((id) => {
|
|
412
412
|
if (!id) return;
|
|
413
413
|
|
|
414
414
|
const entries = [
|
|
415
|
-
...editor.api.nodes
|
|
415
|
+
...editor.api.nodes({
|
|
416
416
|
at: [],
|
|
417
417
|
mode: 'all',
|
|
418
|
-
match: n => (n[KEYS.suggestion] && n[getSuggestionKey(id)])
|
|
418
|
+
match: (n: TElement | TSuggestionText) => (n[KEYS.suggestion] && n[getSuggestionKey(id)])
|
|
419
419
|
|| suggestionApi.suggestion.nodeId(n as TElement) === id
|
|
420
420
|
})
|
|
421
|
-
];
|
|
421
|
+
] as NodeEntry<TElement | TSuggestionText>[];
|
|
422
422
|
|
|
423
423
|
suggestionEntriesMap.current[id] = entries;
|
|
424
424
|
});
|
|
@@ -454,7 +454,7 @@ function FloatingDiscussionContent() {
|
|
|
454
454
|
|
|
455
455
|
const topDistance = getCommentTop(editor, {
|
|
456
456
|
node: commentLeaf,
|
|
457
|
-
relativeElement: editorContainerRef.current
|
|
457
|
+
relativeElement: editorContainerRef.current as HTMLDivElement
|
|
458
458
|
});
|
|
459
459
|
|
|
460
460
|
topRef.current[discussion.id] = topDistance;
|
|
@@ -465,7 +465,7 @@ function FloatingDiscussionContent() {
|
|
|
465
465
|
|
|
466
466
|
const topDistance = getCommentTop(editor, {
|
|
467
467
|
node: entries[0][0],
|
|
468
|
-
relativeElement: editorContainerRef.current
|
|
468
|
+
relativeElement: editorContainerRef.current as HTMLDivElement
|
|
469
469
|
});
|
|
470
470
|
|
|
471
471
|
topRef.current[id] = topDistance;
|
|
@@ -487,7 +487,7 @@ function FloatingDiscussionContent() {
|
|
|
487
487
|
|
|
488
488
|
const topDistance = getCommentTop(editor, {
|
|
489
489
|
node: commentingNode,
|
|
490
|
-
relativeElement: editorContainerRef.current
|
|
490
|
+
relativeElement: editorContainerRef.current as HTMLDivElement
|
|
491
491
|
});
|
|
492
492
|
|
|
493
493
|
topRef.current[getDraftCommentKey()] = topDistance;
|
|
@@ -561,7 +561,7 @@ function FloatingDiscussionContent() {
|
|
|
561
561
|
activeId,
|
|
562
562
|
getCommentTop(editor, {
|
|
563
563
|
node: activeNode?.[0] || activeSuggestionNode![0],
|
|
564
|
-
relativeElement: editorContainerRef.current
|
|
564
|
+
relativeElement: editorContainerRef.current as HTMLDivElement
|
|
565
565
|
})
|
|
566
566
|
);
|
|
567
567
|
|
|
@@ -696,7 +696,7 @@ function FloatingCommentsContent({
|
|
|
696
696
|
editor.setOption(suggestionPlugin, 'activeId', null);
|
|
697
697
|
const leaf = editor.api.node({
|
|
698
698
|
at: [],
|
|
699
|
-
match: n => TextApi.isText(n)
|
|
699
|
+
match: (n: TElement | TSuggestionText) => TextApi.isText(n)
|
|
700
700
|
&& n[KEYS.comment]
|
|
701
701
|
&& editor.getApi(commentPlugin).comment.nodeId(n) === id
|
|
702
702
|
});
|
|
@@ -944,7 +944,7 @@ const FloatingSuggestionContent = ({
|
|
|
944
944
|
|
|
945
945
|
const leaf = editor.api.node({
|
|
946
946
|
at: [],
|
|
947
|
-
match: n => n[KEYS.suggestion]
|
|
947
|
+
match: (n: TElement | TSuggestionText) => n[KEYS.suggestion]
|
|
948
948
|
&& editor.getApi(suggestionPlugin).suggestion.nodeId(n as any) === id
|
|
949
949
|
});
|
|
950
950
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
5
|
import { type TElement, KEYS } from 'platejs';
|
|
8
6
|
|
|
9
7
|
import { toUnitLess } from '@platejs/basic-styles';
|
|
@@ -60,7 +58,7 @@ export function FontSizeToolbarButton() {
|
|
|
60
58
|
return toUnitLess(fontSize as string);
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
const [block] = editor.api.block
|
|
61
|
+
const [block] = (editor.api.block() as [TElement, unknown] | undefined) || [];
|
|
64
62
|
|
|
65
63
|
if (!block?.type) return DEFAULT_FONT_SIZE;
|
|
66
64
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
5
|
import { LineHeightPlugin } from '@platejs/basic-styles/react';
|
|
8
6
|
import { CheckIcon, WrapText } from 'lucide-react';
|
|
9
7
|
import { useEditorRef, useSelectionFragmentProp } from 'platejs/react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
createContext, use, useEffect, useRef, useState, type ComponentProps, type
|
|
4
|
+
createContext, use, useEffect, useRef, useState, type ComponentProps, type ReactNode
|
|
5
5
|
} from 'react';
|
|
6
6
|
|
|
7
7
|
import * as Ariakit from '@ariakit/react';
|
|
@@ -147,7 +147,7 @@ const menuVariants = cva(
|
|
|
147
147
|
export type MenuContentProps = Ariakit.MenuProps
|
|
148
148
|
& VariantProps<typeof menuVariants> & {
|
|
149
149
|
animateZoom?: boolean;
|
|
150
|
-
onClickOutside?: (event: MouseEvent) => void;
|
|
150
|
+
onClickOutside?: (event: globalThis.MouseEvent) => void;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
export function MenuContent({
|
|
@@ -352,7 +352,7 @@ export function MenuItem({
|
|
|
352
352
|
return <Ariakit.MenuItem {...baseProps} />;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
const hideOnClick = (event
|
|
355
|
+
const hideOnClick: Ariakit.ComboboxItemProps['hideOnClick'] = (event) => {
|
|
356
356
|
const expandable = event.currentTarget.hasAttribute('aria-expanded');
|
|
357
357
|
|
|
358
358
|
if (expandable) return false;
|
|
@@ -485,11 +485,11 @@ export function filterMenuGroups(
|
|
|
485
485
|
}, []);
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
export function useComboboxValueState() {
|
|
488
|
+
export function useComboboxValueState(): readonly [string, (value: string) => void] {
|
|
489
489
|
const store = Ariakit.useComboboxContext();
|
|
490
490
|
const searchValue = store?.useState('value') ?? '';
|
|
491
491
|
|
|
492
|
-
return [searchValue, store!.setValue] as const;
|
|
492
|
+
return [searchValue, store!.setValue as (value: string) => void] as const;
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
export function useMenuSide() {
|
|
@@ -499,7 +499,11 @@ export function useMenuSide() {
|
|
|
499
499
|
return currentPlacement;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
export function useContextMenu(anchorRect: { x: number; y: number }) {
|
|
502
|
+
export function useContextMenu(anchorRect: { x: number; y: number }): {
|
|
503
|
+
store: any;
|
|
504
|
+
getAnchorRect: () => { x: number; y: number };
|
|
505
|
+
show: () => void;
|
|
506
|
+
} {
|
|
503
507
|
const menu = Ariakit.useMenuStore();
|
|
504
508
|
|
|
505
509
|
useEffect(() => {
|
|
@@ -509,7 +513,7 @@ export function useContextMenu(anchorRect: { x: number; y: number }) {
|
|
|
509
513
|
}, [anchorRect, menu]);
|
|
510
514
|
|
|
511
515
|
return {
|
|
512
|
-
store: menu,
|
|
516
|
+
store: menu as any,
|
|
513
517
|
getAnchorRect: () => anchorRect,
|
|
514
518
|
show: () => {
|
|
515
519
|
menu.show();
|
|
@@ -518,11 +522,14 @@ export function useContextMenu(anchorRect: { x: number; y: number }) {
|
|
|
518
522
|
};
|
|
519
523
|
}
|
|
520
524
|
|
|
521
|
-
export function useMenuStore() {
|
|
525
|
+
export function useMenuStore(): {
|
|
526
|
+
store: any;
|
|
527
|
+
show: (anchorElement: HTMLElement) => void;
|
|
528
|
+
} {
|
|
522
529
|
const menu = Ariakit.useMenuStore();
|
|
523
530
|
|
|
524
531
|
return {
|
|
525
|
-
store: menu,
|
|
532
|
+
store: menu as any,
|
|
526
533
|
show: (anchorElement: HTMLElement) => {
|
|
527
534
|
menu.setAnchorElement(anchorElement);
|
|
528
535
|
menu.show();
|
|
@@ -13,7 +13,7 @@ export function SuggestionLeafStatic(props: SlateLeafProps<TSuggestionText>) {
|
|
|
13
13
|
const dataList = editor
|
|
14
14
|
.getApi(BaseSuggestionPlugin)
|
|
15
15
|
.suggestion.dataList(leaf);
|
|
16
|
-
const hasRemove = dataList.some(data => data.type === 'remove');
|
|
16
|
+
const hasRemove = dataList.some((data: { type: string }) => data.type === 'remove');
|
|
17
17
|
const diffOperation = { type: hasRemove ? 'delete' : 'insert' } as const;
|
|
18
18
|
|
|
19
19
|
const Component = ({ delete: 'del', insert: 'ins', update: 'span' } as const)[
|
|
@@ -4,8 +4,6 @@ import {
|
|
|
4
4
|
useEffect, useState, type ComponentProps, type ComponentPropsWithoutRef, type ElementType, type ReactNode
|
|
5
5
|
} from 'react';
|
|
6
6
|
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
|
|
9
7
|
import { type VariantProps, cva } from 'class-variance-authority';
|
|
10
8
|
import { ChevronDown } from 'lucide-react';
|
|
11
9
|
import { Toolbar as ToolbarPrimitive, Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import { Toaster } from 'sonner';
|
|
8
8
|
|
|
9
|
+
import { TooltipProvider } from '@docyrus/ui-pro-shared/components/tooltip';
|
|
10
|
+
|
|
9
11
|
import { AssistantI18nProvider } from '../i18n';
|
|
10
12
|
|
|
11
13
|
// User interface for assistant
|
|
@@ -54,8 +56,10 @@ export function AssistantProvider({ config, children }: AssistantProviderProps)
|
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
58
|
<AssistantConfigContext value={value}>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
+
<TooltipProvider>
|
|
60
|
+
<AssistantI18nProvider>{children}</AssistantI18nProvider>
|
|
61
|
+
<Toaster />
|
|
62
|
+
</TooltipProvider>
|
|
59
63
|
</AssistantConfigContext>
|
|
60
64
|
);
|
|
61
65
|
}
|