@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare const BaseTableKit: (import("platejs").SlatePlugin<import("platejs").PluginConfig<"table", {
|
|
2
|
+
_cellIndices: Record<string, {
|
|
3
|
+
col: number;
|
|
4
|
+
row: number;
|
|
5
|
+
}>;
|
|
6
|
+
selectedCells: import("platejs").TElement[] | null;
|
|
7
|
+
selectedTables: import("platejs").TElement[] | null;
|
|
8
|
+
disableExpandOnInsert?: boolean;
|
|
9
|
+
disableMarginLeft?: boolean;
|
|
10
|
+
disableMerge?: boolean;
|
|
11
|
+
enableUnsetSingleColSize?: boolean;
|
|
12
|
+
initialTableWidth?: number;
|
|
13
|
+
minColumnWidth?: number;
|
|
14
|
+
}, {
|
|
15
|
+
create: {
|
|
16
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@platejs/table").GetEmptyTableNodeOptions) => import("platejs").TTableElement>;
|
|
17
|
+
tableCell: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { children, header, row }?: import("@platejs/table").CreateCellOptions) => {
|
|
18
|
+
children: import("platejs").Descendant[];
|
|
19
|
+
type: string;
|
|
20
|
+
}>;
|
|
21
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, ...cellOptions }?: import("@platejs/table").GetEmptyRowNodeOptions) => {
|
|
22
|
+
children: {
|
|
23
|
+
children: import("platejs").Descendant[];
|
|
24
|
+
type: string;
|
|
25
|
+
}[];
|
|
26
|
+
type: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
table: {
|
|
30
|
+
getCellBorders: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, defaultBorder, element }: {
|
|
31
|
+
element: import("platejs").TTableCellElement;
|
|
32
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
33
|
+
defaultBorder?: import("platejs").TTableCellBorder;
|
|
34
|
+
}) => import("@platejs/table").BorderStylesDefault>;
|
|
35
|
+
getCellSize: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, colSizes, element, rowSize }: {
|
|
36
|
+
element: import("platejs").TTableCellElement;
|
|
37
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
38
|
+
colSizes?: number[];
|
|
39
|
+
rowSize?: number;
|
|
40
|
+
}) => {
|
|
41
|
+
minHeight: number | undefined;
|
|
42
|
+
width: number;
|
|
43
|
+
}>;
|
|
44
|
+
getColSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
45
|
+
getRowSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
46
|
+
getCellChildren: (cell: import("platejs").TTableCellElement) => import("platejs").Descendant[];
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
insert: {
|
|
50
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount }?: import("@platejs/table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("platejs").InsertNodesOptions) => void>;
|
|
51
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
52
|
+
at?: import("platejs").Path;
|
|
53
|
+
before?: boolean;
|
|
54
|
+
fromCell?: import("platejs").Path;
|
|
55
|
+
header?: boolean;
|
|
56
|
+
select?: boolean;
|
|
57
|
+
}) => void>;
|
|
58
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
59
|
+
at?: import("platejs").Path;
|
|
60
|
+
before?: boolean;
|
|
61
|
+
fromRow?: import("platejs").Path;
|
|
62
|
+
header?: boolean;
|
|
63
|
+
select?: boolean;
|
|
64
|
+
}) => void>;
|
|
65
|
+
};
|
|
66
|
+
remove: {
|
|
67
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
68
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
69
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
70
|
+
};
|
|
71
|
+
table: {
|
|
72
|
+
merge: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
73
|
+
split: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
cellIndices?: (id: string) => import("@platejs/table").CellIndices;
|
|
77
|
+
}>> | import("platejs").SlatePlugin<import("platejs").PluginConfig<"tr", {}, {}, {}, {}>> | import("platejs").SlatePlugin<import("platejs").PluginConfig<"td", {}, {}, {}, {}>> | import("platejs").SlatePlugin<import("platejs").PluginConfig<"th", {}, {}, {}, {}>>)[];
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export declare const TableKit: (import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"table", {
|
|
2
|
+
_cellIndices: Record<string, {
|
|
3
|
+
col: number;
|
|
4
|
+
row: number;
|
|
5
|
+
}>;
|
|
6
|
+
selectedCells: import("platejs").TElement[] | null;
|
|
7
|
+
selectedTables: import("platejs").TElement[] | null;
|
|
8
|
+
disableExpandOnInsert?: boolean;
|
|
9
|
+
disableMarginLeft?: boolean;
|
|
10
|
+
disableMerge?: boolean;
|
|
11
|
+
enableUnsetSingleColSize?: boolean;
|
|
12
|
+
initialTableWidth?: number;
|
|
13
|
+
minColumnWidth?: number;
|
|
14
|
+
}, {
|
|
15
|
+
create: {
|
|
16
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@platejs/table").GetEmptyTableNodeOptions) => import("platejs").TTableElement>;
|
|
17
|
+
tableCell: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { children, header, row }?: import("@platejs/table").CreateCellOptions) => {
|
|
18
|
+
children: import("platejs").Descendant[];
|
|
19
|
+
type: string;
|
|
20
|
+
}>;
|
|
21
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, ...cellOptions }?: import("@platejs/table").GetEmptyRowNodeOptions) => {
|
|
22
|
+
children: {
|
|
23
|
+
children: import("platejs").Descendant[];
|
|
24
|
+
type: string;
|
|
25
|
+
}[];
|
|
26
|
+
type: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
table: {
|
|
30
|
+
getCellBorders: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, defaultBorder, element }: {
|
|
31
|
+
element: import("platejs").TTableCellElement;
|
|
32
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
33
|
+
defaultBorder?: import("platejs").TTableCellBorder;
|
|
34
|
+
}) => import("@platejs/table").BorderStylesDefault>;
|
|
35
|
+
getCellSize: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, colSizes, element, rowSize }: {
|
|
36
|
+
element: import("platejs").TTableCellElement;
|
|
37
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
38
|
+
colSizes?: number[];
|
|
39
|
+
rowSize?: number;
|
|
40
|
+
}) => {
|
|
41
|
+
minHeight: number | undefined;
|
|
42
|
+
width: number;
|
|
43
|
+
}>;
|
|
44
|
+
getColSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
45
|
+
getRowSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
46
|
+
getCellChildren: (cell: import("platejs").TTableCellElement) => import("platejs").Descendant[];
|
|
47
|
+
};
|
|
48
|
+
} & {
|
|
49
|
+
create: {
|
|
50
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount, ...cellOptions }?: import("@platejs/table").GetEmptyTableNodeOptions) => import("platejs").TTableElement>;
|
|
51
|
+
tableCell: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { children, header, row }?: import("@platejs/table").CreateCellOptions) => {
|
|
52
|
+
children: import("platejs").Descendant[];
|
|
53
|
+
type: string;
|
|
54
|
+
}>;
|
|
55
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, ...cellOptions }?: import("@platejs/table").GetEmptyRowNodeOptions) => {
|
|
56
|
+
children: {
|
|
57
|
+
children: import("platejs").Descendant[];
|
|
58
|
+
type: string;
|
|
59
|
+
}[];
|
|
60
|
+
type: string;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
table: {
|
|
64
|
+
getCellBorders: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, defaultBorder, element }: {
|
|
65
|
+
element: import("platejs").TTableCellElement;
|
|
66
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
67
|
+
defaultBorder?: import("platejs").TTableCellBorder;
|
|
68
|
+
}) => import("@platejs/table").BorderStylesDefault>;
|
|
69
|
+
getCellSize: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { cellIndices, colSizes, element, rowSize }: {
|
|
70
|
+
element: import("platejs").TTableCellElement;
|
|
71
|
+
cellIndices?: import("@platejs/table").CellIndices;
|
|
72
|
+
colSizes?: number[];
|
|
73
|
+
rowSize?: number;
|
|
74
|
+
}) => {
|
|
75
|
+
minHeight: number | undefined;
|
|
76
|
+
width: number;
|
|
77
|
+
}>;
|
|
78
|
+
getColSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
79
|
+
getRowSpan: (cellElem: import("platejs").TTableCellElement) => number;
|
|
80
|
+
getCellChildren: (cell: import("platejs").TTableCellElement) => import("platejs").Descendant[];
|
|
81
|
+
};
|
|
82
|
+
}, {
|
|
83
|
+
insert: {
|
|
84
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount }?: import("@platejs/table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("platejs").InsertNodesOptions) => void>;
|
|
85
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
86
|
+
at?: import("platejs").Path;
|
|
87
|
+
before?: boolean;
|
|
88
|
+
fromCell?: import("platejs").Path;
|
|
89
|
+
header?: boolean;
|
|
90
|
+
select?: boolean;
|
|
91
|
+
}) => void>;
|
|
92
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
93
|
+
at?: import("platejs").Path;
|
|
94
|
+
before?: boolean;
|
|
95
|
+
fromRow?: import("platejs").Path;
|
|
96
|
+
header?: boolean;
|
|
97
|
+
select?: boolean;
|
|
98
|
+
}) => void>;
|
|
99
|
+
};
|
|
100
|
+
remove: {
|
|
101
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
102
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
103
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
104
|
+
};
|
|
105
|
+
table: {
|
|
106
|
+
merge: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
107
|
+
split: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
108
|
+
};
|
|
109
|
+
} & {
|
|
110
|
+
insert: {
|
|
111
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, { colCount, header, rowCount }?: import("@platejs/table").GetEmptyTableNodeOptions, { select: shouldSelect, ...options }?: import("platejs").InsertNodesOptions) => void>;
|
|
112
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
113
|
+
at?: import("platejs").Path;
|
|
114
|
+
before?: boolean;
|
|
115
|
+
fromCell?: import("platejs").Path;
|
|
116
|
+
header?: boolean;
|
|
117
|
+
select?: boolean;
|
|
118
|
+
}) => void>;
|
|
119
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor, options?: {
|
|
120
|
+
at?: import("platejs").Path;
|
|
121
|
+
before?: boolean;
|
|
122
|
+
fromRow?: import("platejs").Path;
|
|
123
|
+
header?: boolean;
|
|
124
|
+
select?: boolean;
|
|
125
|
+
}) => void>;
|
|
126
|
+
};
|
|
127
|
+
remove: {
|
|
128
|
+
table: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
129
|
+
tableColumn: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
130
|
+
tableRow: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
131
|
+
};
|
|
132
|
+
table: {
|
|
133
|
+
merge: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
134
|
+
split: import("platejs").OmitFirst<(editor: import("platejs").SlateEditor) => void>;
|
|
135
|
+
};
|
|
136
|
+
}, {
|
|
137
|
+
cellIndices?: (id: string) => import("@platejs/table").CellIndices;
|
|
138
|
+
}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"tr", {}, {}, {}, {}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"td", {}, {}, {}, {}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"th", {}, {}, {}, {}>>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BaseTocKit: import("platejs").SlatePlugin<import("@platejs/toc").TocConfig>[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const BaseToggleKit: import("platejs").SlatePlugin<import("platejs").PluginConfig<"toggle", {
|
|
2
|
+
openIds?: Set<string>;
|
|
3
|
+
}, {
|
|
4
|
+
toggle: {
|
|
5
|
+
toggleIds: (ids: string[], force?: boolean | null) => void;
|
|
6
|
+
};
|
|
7
|
+
} & Record<"toggle", {
|
|
8
|
+
toggleIds: (ids: string[], force?: boolean | null) => void;
|
|
9
|
+
}>, {}, {
|
|
10
|
+
isOpen?: (toggleId: string) => boolean;
|
|
11
|
+
someClosed?: (toggleIds: string[]) => boolean;
|
|
12
|
+
}>>[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const ToggleKit: (import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"indent", {
|
|
2
|
+
indentMax?: number;
|
|
3
|
+
offset?: number;
|
|
4
|
+
unit?: string;
|
|
5
|
+
}, {}, {}, {}>> | import("platejs/react").PlatePlugin<import("platejs").PluginConfig<"toggle", {
|
|
6
|
+
openIds?: Set<string>;
|
|
7
|
+
} & {
|
|
8
|
+
toggleIndex?: ReturnType<(elements: import("platejs").Value) => Map<string, string[]>>;
|
|
9
|
+
}, {
|
|
10
|
+
toggle: {
|
|
11
|
+
toggleIds: (ids: string[], force?: boolean | null) => void;
|
|
12
|
+
};
|
|
13
|
+
}, {}, {
|
|
14
|
+
isOpen?: (toggleId: string) => boolean;
|
|
15
|
+
someClosed?: (toggleIds: string[]) => boolean;
|
|
16
|
+
}>>)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PlateEditor } from 'platejs/react';
|
|
2
|
+
import { type Path, type TElement } from 'platejs';
|
|
3
|
+
export declare const insertBlock: (editor: PlateEditor, type: string) => void;
|
|
4
|
+
export declare const insertInlineElement: (editor: PlateEditor, type: string) => void;
|
|
5
|
+
export declare const setBlockType: (editor: PlateEditor, type: string, { at }?: {
|
|
6
|
+
at?: Path;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare const getBlockType: (block: TElement) => string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type UseChatHelpers } from '@ai-sdk/react';
|
|
2
|
+
import { type UIMessage } from 'ai';
|
|
3
|
+
export type Chat = UseChatHelpers<ChatMessage>;
|
|
4
|
+
export type ChatMessage = UIMessage<{}, MessageDataPart>;
|
|
5
|
+
export type MessageDataPart = {
|
|
6
|
+
toolName: ToolName;
|
|
7
|
+
comment?: TComment;
|
|
8
|
+
table?: TTableCellUpdate;
|
|
9
|
+
};
|
|
10
|
+
export type TComment = {
|
|
11
|
+
comment: {
|
|
12
|
+
blockId: string;
|
|
13
|
+
comment: string;
|
|
14
|
+
content: string;
|
|
15
|
+
} | null;
|
|
16
|
+
status: 'finished' | 'streaming';
|
|
17
|
+
};
|
|
18
|
+
export type TTableCellUpdate = {
|
|
19
|
+
cell: {
|
|
20
|
+
content: string;
|
|
21
|
+
id: string;
|
|
22
|
+
} | null;
|
|
23
|
+
status: 'finished' | 'streaming';
|
|
24
|
+
};
|
|
25
|
+
export type ToolName = 'comment' | 'edit' | 'generate';
|
|
26
|
+
export declare const useChat: () => UseChatHelpers<ChatMessage>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsTouchDevice(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLockScroll(lock: boolean, selector?: string): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook that returns a boolean value indicating whether the component
|
|
3
|
+
* is mounted (client-side) or not. Useful for preventing hydration mismatches
|
|
4
|
+
* when rendering different content on server vs client.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useMounted: () => boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect, type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Determines the appropriate effect hook to use based on the environment. If
|
|
4
|
+
* the code is running on the client-side (browser), it uses the
|
|
5
|
+
* `useLayoutEffect` hook, otherwise, it uses the `useEffect` hook.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
8
|
+
export declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: AddEventListenerOptions | boolean): void;
|
|
9
|
+
export declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: undefined, options?: AddEventListenerOptions | boolean): void;
|
|
10
|
+
export declare function useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLDivElement>(eventName: K, handler: (event: HTMLElementEventMap[K]) => void, element: RefObject<T>, options?: AddEventListenerOptions | boolean): void;
|
|
11
|
+
export declare function useEventListener<K extends keyof DocumentEventMap>(eventName: K, handler: (event: DocumentEventMap[K]) => void, element: RefObject<Document>, options?: AddEventListenerOptions | boolean): void;
|
|
12
|
+
type Handler = (event: MouseEvent) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Attaches an event listener to detect clicks that occur outside a given
|
|
15
|
+
* element.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useOnClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler?: Handler, mouseEvent?: "mousedown" | "mouseup") => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface UploadedFile {
|
|
2
|
+
key: string;
|
|
3
|
+
appUrl: string;
|
|
4
|
+
name: string;
|
|
5
|
+
size: number;
|
|
6
|
+
type: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
interface UseUploadFileProps {
|
|
10
|
+
defaultUploadedFiles?: UploadedFile[];
|
|
11
|
+
onUploadComplete?: (file: UploadedFile) => void;
|
|
12
|
+
onUploadError?: (error: unknown) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useUploadFile({ onUploadComplete, onUploadError }?: UseUploadFileProps): {
|
|
15
|
+
isUploading: boolean;
|
|
16
|
+
progress: number;
|
|
17
|
+
uploadedFile: UploadedFile | undefined;
|
|
18
|
+
uploadFile: (file: File) => Promise<UploadedFile | undefined>;
|
|
19
|
+
uploadingFile: File | undefined;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Locale, type PlateEditorTranslations } from './types';
|
|
3
|
+
interface PlateEditorI18nContextValue {
|
|
4
|
+
locale: Locale;
|
|
5
|
+
translations: PlateEditorTranslations;
|
|
6
|
+
}
|
|
7
|
+
export declare function PlateEditorI18nProvider({ children, locale }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
locale?: Locale;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function usePlateEditorI18n(): PlateEditorI18nContextValue;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type Locale = 'de' | 'el' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'sl' | 'tr';
|
|
2
|
+
export interface PlateEditorTranslations {
|
|
3
|
+
toolbar: {
|
|
4
|
+
bold: string;
|
|
5
|
+
italic: string;
|
|
6
|
+
underline: string;
|
|
7
|
+
strikethrough: string;
|
|
8
|
+
code: string;
|
|
9
|
+
heading1: string;
|
|
10
|
+
heading2: string;
|
|
11
|
+
heading3: string;
|
|
12
|
+
bulletList: string;
|
|
13
|
+
numberedList: string;
|
|
14
|
+
todoList: string;
|
|
15
|
+
blockquote: string;
|
|
16
|
+
codeBlock: string;
|
|
17
|
+
table: string;
|
|
18
|
+
image: string;
|
|
19
|
+
link: string;
|
|
20
|
+
align_left: string;
|
|
21
|
+
align_center: string;
|
|
22
|
+
align_right: string;
|
|
23
|
+
undo: string;
|
|
24
|
+
redo: string;
|
|
25
|
+
};
|
|
26
|
+
slash: {
|
|
27
|
+
placeholder: string;
|
|
28
|
+
noResults: string;
|
|
29
|
+
groups: {
|
|
30
|
+
basic: string;
|
|
31
|
+
media: string;
|
|
32
|
+
advanced: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
ai: {
|
|
36
|
+
placeholder: string;
|
|
37
|
+
generating: string;
|
|
38
|
+
improve: string;
|
|
39
|
+
simplify: string;
|
|
40
|
+
expand: string;
|
|
41
|
+
summarize: string;
|
|
42
|
+
translate: string;
|
|
43
|
+
fixGrammar: string;
|
|
44
|
+
};
|
|
45
|
+
media: {
|
|
46
|
+
upload: string;
|
|
47
|
+
embedLink: string;
|
|
48
|
+
maxSize: string;
|
|
49
|
+
uploadImage: string;
|
|
50
|
+
uploadVideo: string;
|
|
51
|
+
uploadAudio: string;
|
|
52
|
+
uploadFile: string;
|
|
53
|
+
};
|
|
54
|
+
placeholder: {
|
|
55
|
+
paragraph: string;
|
|
56
|
+
heading: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { PlateEditor } from './editor/plate-editor';
|
|
2
|
+
export type { PlateEditorProps, PlateEditorHandle } from './editor/plate-editor';
|
|
3
|
+
export { EditorKit, useEditor } from './editor/editor-kit';
|
|
4
|
+
export type { MyEditor } from './editor/editor-kit';
|
|
5
|
+
export { insertBlock, setBlockType, getBlockType } from './editor/transforms';
|
|
6
|
+
export type { Value } from 'platejs';
|
|
7
|
+
export type { MyBlockElement, MyBlockquoteElement, MyCodeBlockElement, MyCodeLineElement, MyH1Element, MyH2Element, MyH3Element, MyHrElement, MyImageElement, MyLinkElement, MyMentionElement, MyNestableBlock, MyParagraphElement, MyTableCellElement, MyTableElement, MyTableRowElement, MyTextBlockElement, MyToggleElement, MyValue, RichText } from './editor/plate-types';
|
|
8
|
+
export { Editor, EditorContainer } from './plate-ui/editor';
|
|
9
|
+
export type { EditorProps } from './plate-ui/editor';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Output to Plate.js Value Converter
|
|
3
|
+
*
|
|
4
|
+
* Converts AI structured output (conforming to plate-editor-openai-schema.json)
|
|
5
|
+
* to Plate.js document format (Value array).
|
|
6
|
+
*
|
|
7
|
+
* Since the AI schema is designed to directly match Plate.js element structure,
|
|
8
|
+
* the conversion is primarily validation and pass-through with cleanup of null values.
|
|
9
|
+
*/
|
|
10
|
+
/** AI structured output root shape */
|
|
11
|
+
export interface AIDocumentOutput {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
assumptions?: string[] | null;
|
|
15
|
+
warnings?: string[] | null;
|
|
16
|
+
document: PlateBlockElement[];
|
|
17
|
+
}
|
|
18
|
+
/** Supported block element types */
|
|
19
|
+
type PlateBlockType = 'p' | 'h1' | 'h2' | 'h3' | 'blockquote' | 'code_block' | 'table' | 'callout' | 'toggle' | 'column_group' | 'img' | 'video' | 'audio' | 'media_embed' | 'equation' | 'hr' | 'toc';
|
|
20
|
+
/** Generic block element from AI output */
|
|
21
|
+
interface PlateBlockElement {
|
|
22
|
+
type: PlateBlockType;
|
|
23
|
+
children: unknown[];
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Convert AI structured output to Plate.js Value (document array).
|
|
28
|
+
*
|
|
29
|
+
* The AI output document array already matches Plate.js format, so this
|
|
30
|
+
* function validates the structure and cleans up null/undefined values
|
|
31
|
+
* that the AI might produce from optional schema fields.
|
|
32
|
+
*
|
|
33
|
+
* @param output - AI structured output conforming to the schema
|
|
34
|
+
* @returns Plate.js Value array ready to be used as editor content
|
|
35
|
+
*/
|
|
36
|
+
export declare function aiOutputToPlate(output: AIDocumentOutput): unknown[];
|
|
37
|
+
/**
|
|
38
|
+
* Validate that an unknown value conforms to the AIDocumentOutput structure.
|
|
39
|
+
*
|
|
40
|
+
* @param output - Unknown value to validate
|
|
41
|
+
* @returns Type predicate indicating valid AIDocumentOutput
|
|
42
|
+
*/
|
|
43
|
+
export declare function isValidPlateOutput(output: unknown): output is AIDocumentOutput;
|
|
44
|
+
/**
|
|
45
|
+
* Extract metadata from AI output (title, description, assumptions, warnings).
|
|
46
|
+
* Useful for displaying document info in the UI without parsing the full document.
|
|
47
|
+
*
|
|
48
|
+
* @param output - AI structured output
|
|
49
|
+
* @returns Metadata object
|
|
50
|
+
*/
|
|
51
|
+
export declare function extractMetadata(output: AIDocumentOutput): {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
assumptions: string[];
|
|
55
|
+
warnings: string[];
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const downloadFile: (url: string, filename: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AIMenu(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type PlateElementProps, type PlateTextProps } from 'platejs/react';
|
|
2
|
+
export declare function AILeaf(props: PlateTextProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function AIAnchorElement(props: PlateElementProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ElementRef, type HTMLAttributes, type RefObject } from 'react';
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
|
|
3
|
+
declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: import("react").FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: {
|
|
7
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay> & {
|
|
8
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Overlay> | null>;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogContent: {
|
|
13
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
|
|
14
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Content> | null>;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
declare const AlertDialogHeader: {
|
|
19
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const AlertDialogFooter: {
|
|
23
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
declare const AlertDialogTitle: {
|
|
27
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> & {
|
|
28
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Title> | null>;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
declare const AlertDialogDescription: {
|
|
33
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> & {
|
|
34
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Description> | null>;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
declare const AlertDialogAction: {
|
|
39
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
|
|
40
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Action> | null>;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
declare const AlertDialogCancel: {
|
|
45
|
+
({ ref, className, ...props }: ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> & {
|
|
46
|
+
ref?: RefObject<ElementRef<typeof AlertDialogPrimitive.Cancel> | null>;
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
displayName: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar, AvatarFallback, AvatarImage } from '@docyrus/ui-pro-shared/avatar';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from './button';
|
|
3
|
+
export declare function BlockContextMenu({ children }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
6
|
+
export declare function BlockActionButton({ className, defaultStyles, ...props }: Partial<ButtonProps> & {
|
|
7
|
+
defaultStyles?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|