@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,22 @@
|
|
|
1
|
+
interface SubagentToolProps {
|
|
2
|
+
toolState: string;
|
|
3
|
+
input?: Record<string, any>;
|
|
4
|
+
status?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
skillName?: string;
|
|
8
|
+
agentName?: string;
|
|
9
|
+
step?: Record<string, any>;
|
|
10
|
+
result?: Record<string, any>;
|
|
11
|
+
agent?: Record<string, any>;
|
|
12
|
+
openCanvasView?: (options: {
|
|
13
|
+
type: string;
|
|
14
|
+
id: string;
|
|
15
|
+
versionId?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
contentJson?: Record<string, any> | null;
|
|
19
|
+
}) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function SubagentTool({ toolState, input, status, skillName, agentName, step, result, agent, openCanvasView }: SubagentToolProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type Command = 'view' | 'create' | 'str_replace' | 'insert' | 'replace_range' | 'search';
|
|
2
|
+
interface TextEditorToolResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
lineCount?: number;
|
|
6
|
+
content?: string;
|
|
7
|
+
}
|
|
8
|
+
interface TextEditorToolProps {
|
|
9
|
+
command?: Command;
|
|
10
|
+
path?: string;
|
|
11
|
+
fileText?: string;
|
|
12
|
+
oldStr?: string;
|
|
13
|
+
newStr?: string;
|
|
14
|
+
insertLine?: number;
|
|
15
|
+
viewRange?: [number, number] | null;
|
|
16
|
+
query?: string;
|
|
17
|
+
state?: 'input-available' | 'input-streaming' | 'output-available' | 'output-error' | string;
|
|
18
|
+
result?: TextEditorToolResult | null;
|
|
19
|
+
errorText?: string;
|
|
20
|
+
onOpen?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function TextEditorTool({ command, path, fileText, oldStr, newStr, insertLine, viewRange, query, state, result, errorText, onOpen }: TextEditorToolProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface WorkCanvasProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
state?: 'input-available' | 'input-streaming' | 'output-available' | string;
|
|
7
|
+
type?: string;
|
|
8
|
+
showUseButton?: boolean;
|
|
9
|
+
onOpen?: () => void;
|
|
10
|
+
onUseResult?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function WorkCanvas({ title, description, content, state, showUseButton, type, onOpen, onUseResult }: WorkCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type DocyAssistantProps } from './types';
|
|
3
|
+
export declare const DocyAssistant: ({ ref, open, onOpenChange, supportWebSearch, supportThinking, supportFiles, supportDocumentSearch, supportDeepResearch, supportMultiModels, supportWorkCanvas, apiEndpoint, title: titleProp, description: descriptionProp, placeholder: placeholderProp, logo, footerText: footerTextProp, variant, renderMode, enableSidebar, enableNavDropdown, enableVoice, enableMicrophone, tenantAiAgentId, deploymentId, onMessageSend, onVoiceStart, onVoiceEnd, className, defaultFullscreen, hideExpand, agentSelectorUrl, baseAgentSelectorUrl, onAgentChange, ...props }: DocyAssistantProps & {
|
|
4
|
+
ref?: RefObject<HTMLDivElement | null>;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useAssistantApi } from './use-assistant-api';
|
|
2
|
+
export { useDeploymentData } from './use-deployment-data';
|
|
3
|
+
export { type ProjectState, useProjectState } from './use-project-state';
|
|
4
|
+
export { type SessionState, useSessionState } from './use-session-state';
|
|
5
|
+
export { useSpeechRecognition } from './use-speech-recognition';
|
|
6
|
+
export { createInitialUIState, type UIState, useUIState } from './use-ui-state';
|
|
7
|
+
export { useWorksState, type WorksState } from './use-works-state';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type AssistantSession, type Project, type Work } from '../types';
|
|
2
|
+
interface UseAssistantApiProps {
|
|
3
|
+
tenantAiAgentId: string;
|
|
4
|
+
deploymentId?: string;
|
|
5
|
+
logo?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
t: (key: string) => string;
|
|
8
|
+
}
|
|
9
|
+
interface UseAssistantApiReturn {
|
|
10
|
+
agentDetails: {
|
|
11
|
+
logo?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
welcomeMessage?: string;
|
|
14
|
+
} | null;
|
|
15
|
+
isLoadingAgentDetails: boolean;
|
|
16
|
+
fetchThreads: () => Promise<AssistantSession[]>;
|
|
17
|
+
fetchProjectThreads: (projectId: string) => Promise<AssistantSession[]>;
|
|
18
|
+
loadThreadMessages: (threadId: string) => Promise<any[]>;
|
|
19
|
+
createThread: (params: {
|
|
20
|
+
subject: string;
|
|
21
|
+
bodyText: string;
|
|
22
|
+
senderName: string;
|
|
23
|
+
projectId?: string | null;
|
|
24
|
+
}) => Promise<any>;
|
|
25
|
+
fetchProjects: () => Promise<Project[]>;
|
|
26
|
+
createProject: (params: {
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
instructions?: string;
|
|
30
|
+
userId?: string;
|
|
31
|
+
}) => Promise<Project | null>;
|
|
32
|
+
updateProject: (projectId: string, params: {
|
|
33
|
+
name?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
instructions?: string;
|
|
36
|
+
}) => Promise<boolean>;
|
|
37
|
+
deleteProject: (projectId: string) => Promise<boolean>;
|
|
38
|
+
fetchWorks: () => Promise<Work[]>;
|
|
39
|
+
fetchProjectWorks: (projectId: string) => Promise<Work[]>;
|
|
40
|
+
updateSession: (sessionId: string, subject: string) => Promise<boolean>;
|
|
41
|
+
deleteSession: (sessionId: string) => Promise<boolean>;
|
|
42
|
+
}
|
|
43
|
+
export declare function useAssistantApi({ tenantAiAgentId, deploymentId, logo, title, t }: UseAssistantApiProps): UseAssistantApiReturn;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Agent, type McpServer, type Model } from '../types';
|
|
2
|
+
export type { Agent, McpServer, Model };
|
|
3
|
+
export interface AgentCapabilities {
|
|
4
|
+
supportWebSearch: boolean;
|
|
5
|
+
supportDocumentSearch: boolean;
|
|
6
|
+
supportDeepResearch: boolean;
|
|
7
|
+
supportThinking: boolean;
|
|
8
|
+
supportWorkCanvas: boolean;
|
|
9
|
+
supportFiles: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface UseDeploymentDataResult {
|
|
12
|
+
models: Model[];
|
|
13
|
+
agents: Agent[];
|
|
14
|
+
selectedModel: Model | null;
|
|
15
|
+
setSelectedModel: (model: Model | null) => void;
|
|
16
|
+
showMultiModels: boolean;
|
|
17
|
+
selectedAgent: Agent | null;
|
|
18
|
+
setSelectedAgent: (agent: Agent | null) => void;
|
|
19
|
+
showAgents: boolean;
|
|
20
|
+
agentAvatar?: string;
|
|
21
|
+
mcpServers: McpServer[];
|
|
22
|
+
activeMcpServers: Record<string, boolean>;
|
|
23
|
+
toggleMcpServer: (id: string, active: boolean) => void;
|
|
24
|
+
capabilities: AgentCapabilities | null;
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
error: Error | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Hook to fetch deployment data (models and agents)
|
|
30
|
+
*/
|
|
31
|
+
export declare function useDeploymentData(deploymentIdOrAgentId?: string, supportMultiModels?: boolean, isBaseAgent?: boolean): UseDeploymentDataResult;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type AssistantSession, type Project, type Work } from '../types';
|
|
2
|
+
export interface ProjectState {
|
|
3
|
+
view: 'list' | 'create' | 'conversation';
|
|
4
|
+
selectedProject: Project | null;
|
|
5
|
+
projectContext: {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
message: string;
|
|
9
|
+
} | null;
|
|
10
|
+
projects: Project[];
|
|
11
|
+
projectsLoaded: boolean;
|
|
12
|
+
projectThreads: Record<string, AssistantSession[]>;
|
|
13
|
+
projectWorks: Record<string, Work[]>;
|
|
14
|
+
isEditing: boolean;
|
|
15
|
+
isSaving: boolean;
|
|
16
|
+
isDeleting: boolean;
|
|
17
|
+
isDeleteDialogOpen: boolean;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
form: {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
isCreating: boolean;
|
|
25
|
+
isEditingInstructions: boolean;
|
|
26
|
+
instructions: string;
|
|
27
|
+
isSavingInstructions: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function useProjectState(): {
|
|
30
|
+
state: ProjectState;
|
|
31
|
+
actions: {
|
|
32
|
+
setView: (view: "list" | "create" | "conversation") => void;
|
|
33
|
+
selectProject: (project: Project | null) => void;
|
|
34
|
+
setContext: (context: {
|
|
35
|
+
name: string;
|
|
36
|
+
id: string;
|
|
37
|
+
message: string;
|
|
38
|
+
} | null) => void;
|
|
39
|
+
setProjects: (projects: Project[]) => void;
|
|
40
|
+
setProjectsLoaded: (loaded: boolean) => void;
|
|
41
|
+
setProjectThreads: (projectId: string, threads: AssistantSession[]) => void;
|
|
42
|
+
setProjectWorks: (projectId: string, works: Work[]) => void;
|
|
43
|
+
startEditing: () => void;
|
|
44
|
+
stopEditing: () => void;
|
|
45
|
+
setSaving: (saving: boolean) => void;
|
|
46
|
+
setDeleting: (deleting: boolean) => void;
|
|
47
|
+
setDeleteDialogOpen: (open: boolean) => void;
|
|
48
|
+
setName: (name: string) => void;
|
|
49
|
+
setDescription: (description: string) => void;
|
|
50
|
+
setForm: (form: {
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
}) => void;
|
|
54
|
+
setCreating: (creating: boolean) => void;
|
|
55
|
+
startEditingInstructions: () => void;
|
|
56
|
+
stopEditingInstructions: () => void;
|
|
57
|
+
setInstructions: (instructions: string) => void;
|
|
58
|
+
setSavingInstructions: (saving: boolean) => void;
|
|
59
|
+
addProject: (project: Project) => void;
|
|
60
|
+
updateProject: (project: Project) => void;
|
|
61
|
+
removeProject: (id: string) => void;
|
|
62
|
+
reset: () => void;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type AssistantSession } from '../types';
|
|
2
|
+
export interface SessionState {
|
|
3
|
+
sessions: AssistantSession[];
|
|
4
|
+
selectedSessionId: string | null;
|
|
5
|
+
selectedSession: AssistantSession | null;
|
|
6
|
+
isEditing: boolean;
|
|
7
|
+
isDeleting: boolean;
|
|
8
|
+
isDeleteDialogOpen: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
isSaving: boolean;
|
|
11
|
+
searchQuery: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function useSessionState(): {
|
|
14
|
+
state: SessionState;
|
|
15
|
+
actions: {
|
|
16
|
+
setSessions: (sessions: AssistantSession[]) => void;
|
|
17
|
+
selectSessionId: (id: string | null) => void;
|
|
18
|
+
selectSession: (session: AssistantSession | null) => void;
|
|
19
|
+
startEditing: () => void;
|
|
20
|
+
stopEditing: () => void;
|
|
21
|
+
setDeleting: (deleting: boolean) => void;
|
|
22
|
+
setDeleteDialogOpen: (open: boolean) => void;
|
|
23
|
+
setName: (name: string) => void;
|
|
24
|
+
setSaving: (saving: boolean) => void;
|
|
25
|
+
setSearchQuery: (query: string) => void;
|
|
26
|
+
addSession: (session: AssistantSession) => void;
|
|
27
|
+
updateSession: (session: AssistantSession) => void;
|
|
28
|
+
removeSession: (id: string) => void;
|
|
29
|
+
reset: () => void;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type SpeechRecognitionInstance } from '../types';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
SpeechRecognition: new () => SpeechRecognitionInstance;
|
|
5
|
+
webkitSpeechRecognition: new () => SpeechRecognitionInstance;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface UseSpeechRecognitionOptions {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
language?: string;
|
|
11
|
+
onTranscript?: (transcript: string) => void;
|
|
12
|
+
onStart?: () => void;
|
|
13
|
+
onEnd?: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface UseSpeechRecognitionReturn {
|
|
16
|
+
isRecording: boolean;
|
|
17
|
+
recognition: SpeechRecognitionInstance | null;
|
|
18
|
+
handleMicrophoneClick: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Hook for speech recognition functionality
|
|
22
|
+
* Handles browser speech recognition API with callbacks for transcripts
|
|
23
|
+
*/
|
|
24
|
+
export declare function useSpeechRecognition({ enabled, language, onTranscript, onStart, onEnd }: UseSpeechRecognitionOptions): UseSpeechRecognitionReturn;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface UIState {
|
|
2
|
+
activeTab: number;
|
|
3
|
+
isDocked: boolean;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
currentRenderMode: 'modal' | 'inline' | 'sidebar';
|
|
6
|
+
isSidebarOpen: boolean;
|
|
7
|
+
isRightSidebarOpen: boolean;
|
|
8
|
+
rightSidebarView: 'list' | 'detail';
|
|
9
|
+
isRecording: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function createInitialUIState(variant?: string, renderMode?: 'modal' | 'inline' | 'sidebar'): UIState;
|
|
12
|
+
export declare function useUIState(variant?: string, renderMode?: 'modal' | 'inline' | 'sidebar'): {
|
|
13
|
+
state: UIState;
|
|
14
|
+
actions: {
|
|
15
|
+
setActiveTab: (tab: number) => void;
|
|
16
|
+
setDocked: (docked: boolean) => void;
|
|
17
|
+
setExpanded: (expanded: boolean) => void;
|
|
18
|
+
setRenderMode: (mode: "modal" | "inline" | "sidebar") => void;
|
|
19
|
+
setSidebarOpen: (open: boolean) => void;
|
|
20
|
+
setRightSidebarOpen: (open: boolean) => void;
|
|
21
|
+
setRightSidebarView: (view: "list" | "detail") => void;
|
|
22
|
+
setRecording: (recording: boolean) => void;
|
|
23
|
+
toggleSidebar: () => void;
|
|
24
|
+
toggleRightSidebar: () => void;
|
|
25
|
+
toggleDocked: () => void;
|
|
26
|
+
toggleExpanded: () => void;
|
|
27
|
+
reset: (resetVariant?: string, resetRenderMode?: "modal" | "inline" | "sidebar") => void;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Work } from '../types';
|
|
2
|
+
export interface WorksState {
|
|
3
|
+
works: Work[];
|
|
4
|
+
searchQuery: string;
|
|
5
|
+
tabValue: string;
|
|
6
|
+
selectedWork: Work | null;
|
|
7
|
+
detailViewWork: Work | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function useWorksState(): {
|
|
10
|
+
state: WorksState;
|
|
11
|
+
actions: {
|
|
12
|
+
setWorks: (works: Work[]) => void;
|
|
13
|
+
setSearchQuery: (query: string) => void;
|
|
14
|
+
setTabValue: (value: string) => void;
|
|
15
|
+
selectWork: (work: Work | null) => void;
|
|
16
|
+
setDetailViewWork: (work: Work | null) => void;
|
|
17
|
+
addWork: (work: Work) => void;
|
|
18
|
+
updateWork: (work: Work) => void;
|
|
19
|
+
removeWork: (id: string) => void;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type AssistantTranslations, type DeepPartial, type I18nContextValue, type Locale } from './types';
|
|
3
|
+
export declare const AssistantI18nContext: import("react").Context<I18nContextValue | null>;
|
|
4
|
+
export interface AssistantI18nProviderProps {
|
|
5
|
+
locale?: Locale;
|
|
6
|
+
apiUrl?: string;
|
|
7
|
+
translations?: DeepPartial<AssistantTranslations>;
|
|
8
|
+
disableApi?: boolean;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function AssistantI18nProvider({ locale: initialLocale, apiUrl, translations: customTranslations, disableApi, children }: AssistantI18nProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { AssistantI18nProviderProps } from './context';
|
|
2
|
+
export { AssistantI18nContext, AssistantI18nProvider } from './context';
|
|
3
|
+
export { default as assistantDe } from './locales/de.json';
|
|
4
|
+
export { default as assistantEl } from './locales/el.json';
|
|
5
|
+
export { default as assistantEn } from './locales/en.json';
|
|
6
|
+
export { default as assistantEs } from './locales/es.json';
|
|
7
|
+
export { default as assistantFr } from './locales/fr.json';
|
|
8
|
+
export { default as assistantIt } from './locales/it.json';
|
|
9
|
+
export { default as assistantPt } from './locales/pt.json';
|
|
10
|
+
export { default as assistantSl } from './locales/sl.json';
|
|
11
|
+
export { default as assistantTr } from './locales/tr.json';
|
|
12
|
+
export type { AssistantTranslations, DeepPartial, I18nConfig, I18nContextValue, Locale } from './types';
|
|
13
|
+
export { useAssistantTranslation } from './use-translation';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type en from './locales/en.json';
|
|
2
|
+
export type Locale = 'de' | 'el' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'sl' | 'tr';
|
|
3
|
+
export type AssistantTranslations = typeof en;
|
|
4
|
+
export type DeepPartial<T> = {
|
|
5
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
6
|
+
};
|
|
7
|
+
export interface I18nConfig {
|
|
8
|
+
locale: Locale;
|
|
9
|
+
apiUrl?: string;
|
|
10
|
+
translations?: DeepPartial<AssistantTranslations>;
|
|
11
|
+
disableApi?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface I18nContextValue {
|
|
14
|
+
locale: Locale;
|
|
15
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
16
|
+
setLocale: (locale: Locale) => void;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DocyAssistant } from './docy-assistant';
|
|
2
|
+
export { type AssistantConfig, AssistantProvider, type AssistantUser, useAssistantConfig } from './lib/assistant-config';
|
|
3
|
+
export { AssistantI18nProvider, useAssistantTranslation } from './i18n';
|
|
4
|
+
export type { Project, Work, WorkTypes } from './types';
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { DefaultChatTransport, lastAssistantMessageIsCompleteWithToolCalls } fro
|
|
|
12
12
|
import { PilcrowIcon, Heading1Icon, Heading2Icon, Heading3Icon, SquareIcon, ListIcon, ListOrderedIcon, ChevronDownIcon, Code2Icon, QuoteIcon, LightbulbIcon, Columns3Icon, GripVertical, FileUpIcon, TableIcon, ImageIcon, FilmIcon, AudioLinesIcon, TableOfContentsIcon, RadicalIcon, RectangleVerticalIcon, CalendarIcon, PlusIcon, FileCodeIcon, MinusIcon, ChevronRightIcon, ListTree, PenToolIcon, Link2Icon, FilesIcon, Link, Text, ExternalLink, Unlink, Bold, Italic, Underline, Strikethrough, Code2, MoreHorizontal, ArrowLeftIcon, ArrowRightIcon, Minus, Plus, CircleArrowDown, Minimize2, Trash2, FileUp, Check, Copy, CornerDownLeftIcon, PencilLineIcon, MessageSquareTextIcon, MessagesSquareIcon, ArrowUpIcon, CheckIcon, CaptionsIcon, ZoomInIcon, CircleArrowDownIcon, MoveUpRightIcon, MoreHorizontalIcon, CheckCircle2, FileText, Loader2, XIcon, CornerUpLeftIcon, AlbumIcon, FeatherIcon, ListMinusIcon, ListPlusIcon, ListEnd, Wand, LanguagesIcon, BadgeHelpIcon, X, PenLineIcon, SearchIcon, MusicIcon, CompassIcon, SmileIcon, LeafIcon, ClockIcon, AppleIcon, FlagIcon, StarIcon, DeleteIcon, AlignLeft, AlignCenter, AlignRight, Eye, Pencil, PlusCircle, HelpCircle, Maximize2, Download, FileSpreadsheet, ChevronDown, Search, Globe, CheckCircle, FolderOpen, User, ArrowRight, MapPin, CalendarClock, List, RefreshCw, FilePlus, RotateCcw, AlertTriangle, XCircle, AlertCircle, PencilIcon, TrashIcon, ArrowUpDown, ArrowDownToLine, PenLine, RefreshCwIcon, PaintRoller, MessageSquareText, ArrowLeft, PanelLeft, Edit, RefreshCcw, Code, Brain, Star, Trash, FolderInput, Archive, MessageSquare, NotebookText, CirclePlus, MoreVertical, Sparkles, SlidersHorizontal, FileSearch, Microscope, Ruler, Mic, AudioLines, BrainCircuit, File as File$1, Plug, Inbox, Menu, ChevronRight, LayoutDashboard, Table2, WandSparklesIcon, ArrowUpToLineIcon, BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, HighlighterIcon, Undo2Icon, Redo2Icon, ArrowDownToLineIcon, AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifyIcon, ListOrdered, ListTodoIcon, ListCollapseIcon, Table, Grid3x3Icon, Combine, Ungroup, ArrowUp, ArrowDown, Trash2Icon, LinkIcon, WrapText, OutdentIcon, IndentIcon, EyeIcon, PenIcon } from 'lucide-react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import { AsyncTokenManager, RestApiClient } from '@docyrus/api-client';
|
|
15
|
+
import { TooltipProvider, Tooltip as Tooltip$2, TooltipTrigger as TooltipTrigger$1, TooltipContent as TooltipContent$1 } from '@docyrus/ui-pro-shared/components/tooltip';
|
|
15
16
|
import { Message, AIMessageAvatar, MessageContent, MessageActions, AIConversation, AIConversationContent, MessageResponse, AIConversationScrollButton, MessageAction, Tool, ToolHeader, ToolContent, ToolInput, ToolOutput, CodeBlock, CodeBlockCopyButton, resolveToolIcon, Artifact, ArtifactHeader, ArtifactTitle, ArtifactClose, ArtifactContent, PromptInput, PromptInputTextarea, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputSubmit, usePromptInputAttachments } from '@docyrus/ui-pro-shared/ai';
|
|
16
17
|
import { Sources, SourcesTrigger, SourcesContent, Source } from '@docyrus/ui-pro-shared/ai-elements/sources';
|
|
17
18
|
import { Card } from '@docyrus/ui-pro-shared/components/card';
|
|
@@ -101,7 +102,6 @@ import { createPortal } from 'react-dom';
|
|
|
101
102
|
import { Avatar as Avatar$1, AvatarImage as AvatarImage$1, AvatarFallback as AvatarFallback$1 } from '@docyrus/ui-pro-shared/components/avatar';
|
|
102
103
|
import { ScrollArea } from '@docyrus/ui-pro-shared/components/scroll-area';
|
|
103
104
|
import { Badge } from '@docyrus/ui-pro-shared/components/badge';
|
|
104
|
-
import { Tooltip as Tooltip$2, TooltipTrigger as TooltipTrigger$1, TooltipContent as TooltipContent$1 } from '@docyrus/ui-pro-shared/components/tooltip';
|
|
105
105
|
import { Reasoning, ReasoningTrigger, ReasoningContent } from '@docyrus/ui-pro-shared/ai-elements/reasoning';
|
|
106
106
|
import { Spinner as Spinner$1 } from '@docyrus/ui-pro-shared/components/spinner';
|
|
107
107
|
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
|
@@ -2463,10 +2463,10 @@ function useAssistantTranslation() {
|
|
|
2463
2463
|
var AssistantConfigContext = createContext(null);
|
|
2464
2464
|
function AssistantProvider({ config: config3, children }) {
|
|
2465
2465
|
const value = useMemo(() => config3, [config3]);
|
|
2466
|
-
return /* @__PURE__ */
|
|
2466
|
+
return /* @__PURE__ */ jsx(AssistantConfigContext, { value, children: /* @__PURE__ */ jsxs(TooltipProvider, { children: [
|
|
2467
2467
|
/* @__PURE__ */ jsx(AssistantI18nProvider, { children }),
|
|
2468
2468
|
/* @__PURE__ */ jsx(Toaster, {})
|
|
2469
|
-
] });
|
|
2469
|
+
] }) });
|
|
2470
2470
|
}
|
|
2471
2471
|
function useAssistantConfig() {
|
|
2472
2472
|
const config3 = use(AssistantConfigContext);
|
|
@@ -6702,7 +6702,7 @@ var useMounted = () => {
|
|
|
6702
6702
|
() => false
|
|
6703
6703
|
);
|
|
6704
6704
|
};
|
|
6705
|
-
function
|
|
6705
|
+
function TooltipProvider2({
|
|
6706
6706
|
delayDuration = 200,
|
|
6707
6707
|
disableHoverableContent = true,
|
|
6708
6708
|
skipDelayDuration = 0,
|
|
@@ -6750,7 +6750,7 @@ function withTooltip(Component2) {
|
|
|
6750
6750
|
const isMounted = useMounted();
|
|
6751
6751
|
const component = /* @__PURE__ */ jsx(Component2, { ...props });
|
|
6752
6752
|
if (tooltip && isMounted) {
|
|
6753
|
-
return /* @__PURE__ */ jsx(
|
|
6753
|
+
return /* @__PURE__ */ jsx(TooltipProvider2, { children: /* @__PURE__ */ jsxs(Tooltip, { ...tooltipProps, children: [
|
|
6754
6754
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, ...tooltipTriggerProps, children: component }),
|
|
6755
6755
|
/* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(TooltipContent, { ...tooltipContentProps, children: [
|
|
6756
6756
|
tooltip,
|
|
@@ -8538,7 +8538,7 @@ function CommentCreateForm({
|
|
|
8538
8538
|
}
|
|
8539
8539
|
const commentsNodeEntry = editor.getApi(CommentPlugin).comment.nodes({ at: [], isDraft: true });
|
|
8540
8540
|
if (commentsNodeEntry.length === 0) return;
|
|
8541
|
-
const documentContent = commentsNodeEntry.map(([node]) => node.text).join("");
|
|
8541
|
+
const documentContent = commentsNodeEntry.map(([node]) => node.text ?? "").join("");
|
|
8542
8542
|
const _discussionId = nanoid();
|
|
8543
8543
|
const newDiscussion = {
|
|
8544
8544
|
id: _discussionId,
|
|
@@ -8559,7 +8559,7 @@ function CommentCreateForm({
|
|
|
8559
8559
|
};
|
|
8560
8560
|
editor.setOption(discussionPlugin, "discussions", [...discussions, newDiscussion]);
|
|
8561
8561
|
const { id } = newDiscussion;
|
|
8562
|
-
commentsNodeEntry.forEach(([
|
|
8562
|
+
commentsNodeEntry.forEach(([, path]) => {
|
|
8563
8563
|
editor.tf.setNodes(
|
|
8564
8564
|
{
|
|
8565
8565
|
[getCommentKey(id)]: true
|
|
@@ -9364,7 +9364,7 @@ var BlockCommentsContent = ({
|
|
|
9364
9364
|
editor.tf.unsetNodes(getDraftCommentKey(), {
|
|
9365
9365
|
at: [],
|
|
9366
9366
|
mode: "lowest",
|
|
9367
|
-
match: (n) => n[getDraftCommentKey()]
|
|
9367
|
+
match: (n) => Boolean(n[getDraftCommentKey()])
|
|
9368
9368
|
});
|
|
9369
9369
|
}
|
|
9370
9370
|
setOpen(_open_);
|
|
@@ -10462,7 +10462,7 @@ function withTooltip2(Component2) {
|
|
|
10462
10462
|
}, []);
|
|
10463
10463
|
const component = /* @__PURE__ */ jsx(Component2, { ...props });
|
|
10464
10464
|
if (tooltip && mounted) {
|
|
10465
|
-
return /* @__PURE__ */ jsx(
|
|
10465
|
+
return /* @__PURE__ */ jsx(TooltipProvider2, { children: /* @__PURE__ */ jsxs(Tooltip, { ...tooltipProps, children: [
|
|
10466
10466
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, ...tooltipTriggerProps, children: component }),
|
|
10467
10467
|
/* @__PURE__ */ jsx(TooltipContent2, { ...tooltipContentProps, children: tooltip })
|
|
10468
10468
|
] }) });
|
|
@@ -11207,8 +11207,8 @@ function TurnIntoMenuItem() {
|
|
|
11207
11207
|
getProp: (node) => getBlockType(node)
|
|
11208
11208
|
});
|
|
11209
11209
|
const handleTurnInto = (value2) => {
|
|
11210
|
-
editor.getApi(BlockSelectionPlugin).blockSelection.getNodes().forEach((
|
|
11211
|
-
setBlockType(editor, value2, { at:
|
|
11210
|
+
editor.getApi(BlockSelectionPlugin).blockSelection.getNodes().forEach((entry) => {
|
|
11211
|
+
setBlockType(editor, value2, { at: entry[1] });
|
|
11212
11212
|
});
|
|
11213
11213
|
editor.getApi(BlockSelectionPlugin).blockSelection.focus();
|
|
11214
11214
|
};
|
|
@@ -11976,12 +11976,7 @@ cva(
|
|
|
11976
11976
|
}
|
|
11977
11977
|
}
|
|
11978
11978
|
);
|
|
11979
|
-
var
|
|
11980
|
-
DialogProvider,
|
|
11981
|
-
useDialogSet,
|
|
11982
|
-
useDialogStore,
|
|
11983
|
-
useDialogValue
|
|
11984
|
-
} = createAtomStore(
|
|
11979
|
+
var dialogAtomStore = createAtomStore(
|
|
11985
11980
|
{
|
|
11986
11981
|
desktopVariant: "modal",
|
|
11987
11982
|
dismissible: true,
|
|
@@ -11990,10 +11985,12 @@ var {
|
|
|
11990
11985
|
},
|
|
11991
11986
|
{ name: "dialog" }
|
|
11992
11987
|
);
|
|
11993
|
-
var {
|
|
11988
|
+
var { DialogProvider, useDialogSet, useDialogStore, useDialogValue } = dialogAtomStore;
|
|
11989
|
+
var dialogContentAtomStore = createAtomStore(
|
|
11994
11990
|
{ fixed: false },
|
|
11995
11991
|
{ name: "dialogContent" }
|
|
11996
11992
|
);
|
|
11993
|
+
var { DialogContentProvider, useDialogContentValue } = dialogContentAtomStore;
|
|
11997
11994
|
Drawer.Trigger;
|
|
11998
11995
|
Drawer.Portal;
|
|
11999
11996
|
Drawer.Close;
|
|
@@ -12666,7 +12663,7 @@ var DragHandle = memo(({
|
|
|
12666
12663
|
if (e.button !== 0 || e.shiftKey) return;
|
|
12667
12664
|
const blockSelection = editor.getApi(BlockSelectionPlugin).blockSelection.getNodes({ sort: true });
|
|
12668
12665
|
let selectionNodes = blockSelection.length > 0 ? blockSelection : editor.api.blocks({ mode: "highest" });
|
|
12669
|
-
if (!selectionNodes.some((
|
|
12666
|
+
if (!selectionNodes.some((entry) => entry[0].id === element.id)) {
|
|
12670
12667
|
selectionNodes = [[element, editor.api.findPath(element)]];
|
|
12671
12668
|
}
|
|
12672
12669
|
const blocks = expandListItemsWithChildren(
|
|
@@ -12688,7 +12685,7 @@ var DragHandle = memo(({
|
|
|
12688
12685
|
if (isDragging) return;
|
|
12689
12686
|
const blockSelection = editor.getApi(BlockSelectionPlugin).blockSelection.getNodes({ sort: true });
|
|
12690
12687
|
let selectedBlocks = blockSelection.length > 0 ? blockSelection : editor.api.blocks({ mode: "highest" });
|
|
12691
|
-
if (!selectedBlocks.some((
|
|
12688
|
+
if (!selectedBlocks.some((entry) => entry[0].id === element.id)) {
|
|
12692
12689
|
selectedBlocks = [[element, editor.api.findPath(element)]];
|
|
12693
12690
|
}
|
|
12694
12691
|
const processedBlocks = expandListItemsWithChildren(
|