@ecsplico/editor 0.0.0-stage → 2.0.0
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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +232 -2
- package/dist/code/CodeSurface.d.ts +24 -0
- package/dist/code/CodeSurface.js +57 -0
- package/dist/code/CodeSurface.js.map +1 -0
- package/dist/code/CodeSurface.vue.d.ts +29 -0
- package/dist/code/CodeSurface2.js +75 -0
- package/dist/code/CodeSurface2.js.map +1 -0
- package/dist/code/chrome-theme.js +76 -0
- package/dist/code/chrome-theme.js.map +1 -0
- package/dist/code/compartments.js +19 -0
- package/dist/code/compartments.js.map +1 -0
- package/dist/code/editor-factory.d.ts +41 -0
- package/dist/code/editor-factory.js +126 -0
- package/dist/code/editor-factory.js.map +1 -0
- package/dist/code/format-json.d.ts +27 -0
- package/dist/code/format-json.js +94 -0
- package/dist/code/format-json.js.map +1 -0
- package/dist/code/highlight-style.js +118 -0
- package/dist/code/highlight-style.js.map +1 -0
- package/dist/code/index.d.ts +6 -0
- package/dist/code/index.js +6 -0
- package/dist/code/jsonl-language.d.ts +6 -0
- package/dist/code/jsonl-language.js +33 -0
- package/dist/code/jsonl-language.js.map +1 -0
- package/dist/code/kind.d.ts +15 -0
- package/dist/code/kind.js +142 -0
- package/dist/code/kind.js.map +1 -0
- package/dist/code/lang-registry.d.ts +31 -0
- package/dist/code/lang-registry.js +54 -0
- package/dist/code/lang-registry.js.map +1 -0
- package/dist/code/react.d.ts +2 -0
- package/dist/code/react.js +1 -0
- package/dist/code/vue.d.ts +2 -0
- package/dist/code/vue.js +1 -0
- package/dist/core/abilities.d.ts +32 -0
- package/dist/core/abilities.js +160 -0
- package/dist/core/abilities.js.map +1 -0
- package/dist/core/block-convert.d.ts +59 -0
- package/dist/core/block-convert.js +164 -0
- package/dist/core/block-convert.js.map +1 -0
- package/dist/core/block-drag.d.ts +12 -0
- package/dist/core/block-drag.js +62 -0
- package/dist/core/block-drag.js.map +1 -0
- package/dist/core/block-flash.d.ts +19 -0
- package/dist/core/block-flash.js +66 -0
- package/dist/core/block-flash.js.map +1 -0
- package/dist/core/context.d.ts +63 -0
- package/dist/core/context.js +108 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/convert.d.ts +96 -0
- package/dist/core/convert.js +241 -0
- package/dist/core/convert.js.map +1 -0
- package/dist/core/core-feature.d.ts +17 -0
- package/dist/core/core-feature.js +100 -0
- package/dist/core/core-feature.js.map +1 -0
- package/dist/core/define-editor.d.ts +23 -0
- package/dist/core/define-editor.js +110 -0
- package/dist/core/define-editor.js.map +1 -0
- package/dist/core/doc-anchors.d.ts +67 -0
- package/dist/core/doc-anchors.js +112 -0
- package/dist/core/doc-anchors.js.map +1 -0
- package/dist/core/document-markdown.d.ts +13 -0
- package/dist/core/document-markdown.js +31 -0
- package/dist/core/document-markdown.js.map +1 -0
- package/dist/core/download.d.ts +5 -0
- package/dist/core/download.js +16 -0
- package/dist/core/download.js.map +1 -0
- package/dist/core/editor-ui.d.ts +45 -0
- package/dist/core/editor-ui.js +38 -0
- package/dist/core/editor-ui.js.map +1 -0
- package/dist/core/extension-points.d.ts +64 -0
- package/dist/core/feature-context.d.ts +32 -0
- package/dist/core/feature-context.js +46 -0
- package/dist/core/feature-context.js.map +1 -0
- package/dist/core/feature.d.ts +234 -0
- package/dist/core/feature.js +13 -0
- package/dist/core/feature.js.map +1 -0
- package/dist/core/fences.d.ts +16 -0
- package/dist/core/fences.js +105 -0
- package/dist/core/fences.js.map +1 -0
- package/dist/core/fetch-error.d.ts +5 -0
- package/dist/core/fetch-error.js +11 -0
- package/dist/core/fetch-error.js.map +1 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.js +27 -0
- package/dist/core/metadata-types.d.ts +27 -0
- package/dist/core/metadata-types.js +10 -0
- package/dist/core/metadata-types.js.map +1 -0
- package/dist/core/metadata.d.ts +39 -0
- package/dist/core/metadata.js +76 -0
- package/dist/core/metadata.js.map +1 -0
- package/dist/core/notify.d.ts +31 -0
- package/dist/core/notify.js +7 -0
- package/dist/core/notify.js.map +1 -0
- package/dist/core/pipeline.d.ts +52 -0
- package/dist/core/pipeline.js +78 -0
- package/dist/core/pipeline.js.map +1 -0
- package/dist/core/schema/abilities.d.ts +55 -0
- package/dist/core/schema/abilities.js +113 -0
- package/dist/core/schema/abilities.js.map +1 -0
- package/dist/core/schema/block-ids.d.ts +29 -0
- package/dist/core/schema/block-ids.js +134 -0
- package/dist/core/schema/block-ids.js.map +1 -0
- package/dist/core/schema/hex-color.d.ts +5 -0
- package/dist/core/schema/hex-color.js +7 -0
- package/dist/core/schema/hex-color.js.map +1 -0
- package/dist/core/schema/index.d.ts +21 -0
- package/dist/core/schema/index.js +33 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/schema/mark-flags.d.ts +12 -0
- package/dist/core/schema/node-flags.d.ts +23 -0
- package/dist/core/schema/node-flags.js +34 -0
- package/dist/core/schema/node-flags.js.map +1 -0
- package/dist/core/schema/opaque-fence.d.ts +11 -0
- package/dist/core/schema/opaque-fence.js +57 -0
- package/dist/core/schema/opaque-fence.js.map +1 -0
- package/dist/core/schema/strike.d.ts +4 -0
- package/dist/core/schema/strike.js +9 -0
- package/dist/core/schema/strike.js.map +1 -0
- package/dist/core/selection-range.d.ts +13 -0
- package/dist/core/selection-range.js +28 -0
- package/dist/core/selection-range.js.map +1 -0
- package/dist/core/slash.d.ts +24 -0
- package/dist/core/slash.js +60 -0
- package/dist/core/slash.js.map +1 -0
- package/dist/core/store.d.ts +22 -0
- package/dist/core/store.js +61 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/suggestion-popup.d.ts +63 -0
- package/dist/core/suggestion-popup.js +57 -0
- package/dist/core/suggestion-popup.js.map +1 -0
- package/dist/core/tag-name.js +11 -0
- package/dist/core/tag-name.js.map +1 -0
- package/dist/core/toolbar-items.d.ts +10 -0
- package/dist/core/toolbar-items.js +206 -0
- package/dist/core/toolbar-items.js.map +1 -0
- package/dist/core/toolbar.d.ts +74 -0
- package/dist/core/toolbar.js +45 -0
- package/dist/core/toolbar.js.map +1 -0
- package/dist/document/DocumentSurface.d.ts +38 -0
- package/dist/document/DocumentSurface.js +44 -0
- package/dist/document/DocumentSurface.js.map +1 -0
- package/dist/document/DocumentSurface.vue.d.ts +56 -0
- package/dist/document/DocumentSurface2.js +71 -0
- package/dist/document/DocumentSurface2.js.map +1 -0
- package/dist/document/react.d.ts +2 -0
- package/dist/document/react.js +1 -0
- package/dist/document/vue.d.ts +2 -0
- package/dist/document/vue.js +1 -0
- package/dist/features/ai/agent-op-review.d.ts +69 -0
- package/dist/features/ai/agent-op-review.js +182 -0
- package/dist/features/ai/agent-op-review.js.map +1 -0
- package/dist/features/ai/agent-ops.d.ts +15 -0
- package/dist/features/ai/agent-ops.js +228 -0
- package/dist/features/ai/agent-ops.js.map +1 -0
- package/dist/features/ai/ai-apply.d.ts +76 -0
- package/dist/features/ai/ai-apply.js +193 -0
- package/dist/features/ai/ai-apply.js.map +1 -0
- package/dist/features/ai/ai-menu.d.ts +38 -0
- package/dist/features/ai/ai-menu.js +20 -0
- package/dist/features/ai/ai-menu.js.map +1 -0
- package/dist/features/ai/ai-review.d.ts +136 -0
- package/dist/features/ai/ai-review.js +543 -0
- package/dist/features/ai/ai-review.js.map +1 -0
- package/dist/features/ai/ai-selection-highlight.d.ts +21 -0
- package/dist/features/ai/ai-selection-highlight.js +44 -0
- package/dist/features/ai/ai-selection-highlight.js.map +1 -0
- package/dist/features/ai/ai-sse.d.ts +28 -0
- package/dist/features/ai/ai-sse.js +82 -0
- package/dist/features/ai/ai-sse.js.map +1 -0
- package/dist/features/ai/assistant.d.ts +53 -0
- package/dist/features/ai/assistant.js +82 -0
- package/dist/features/ai/assistant.js.map +1 -0
- package/dist/features/ai/block-actions.d.ts +20 -0
- package/dist/features/ai/block-actions.js +55 -0
- package/dist/features/ai/block-actions.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.js +145 -0
- package/dist/features/ai/components/AiReviewBar.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.vue.d.ts +15 -0
- package/dist/features/ai/components/AiSelectionMenu.js +519 -0
- package/dist/features/ai/components/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +17 -0
- package/dist/features/ai/components/AiSidebar.js +378 -0
- package/dist/features/ai/components/AiSidebar.js.map +1 -0
- package/dist/features/ai/components/AiSidebar.vue.d.ts +26 -0
- package/dist/features/ai/components/DocumentChatAnswer.js +67 -0
- package/dist/features/ai/components/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/components/DocumentChatAnswer.vue.d.ts +13 -0
- package/dist/features/ai/components/DocumentChatOps.js +113 -0
- package/dist/features/ai/components/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/components/DocumentChatOps.vue.d.ts +27 -0
- package/dist/features/ai/components/ModelQuickSwitch.js +84 -0
- package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +23 -0
- package/dist/features/ai/components/SettingsAiTab.js +88 -0
- package/dist/features/ai/components/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/components/SettingsAiTab.vue.d.ts +6 -0
- package/dist/features/ai/components/SettingsModelProfiles.js +260 -0
- package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/components/SettingsModelProfiles.vue.d.ts +6 -0
- package/dist/features/ai/document-chat-model.d.ts +88 -0
- package/dist/features/ai/document-chat-model.js +190 -0
- package/dist/features/ai/document-chat-model.js.map +1 -0
- package/dist/features/ai/document-chat.d.ts +17 -0
- package/dist/features/ai/document-chat.js +112 -0
- package/dist/features/ai/document-chat.js.map +1 -0
- package/dist/features/ai/feature.d.ts +25 -0
- package/dist/features/ai/feature.js +89 -0
- package/dist/features/ai/feature.js.map +1 -0
- package/dist/features/ai/ghost-autocomplete.d.ts +47 -0
- package/dist/features/ai/ghost-autocomplete.js +204 -0
- package/dist/features/ai/ghost-autocomplete.js.map +1 -0
- package/dist/features/ai/index.d.ts +24 -0
- package/dist/features/ai/index.js +23 -0
- package/dist/features/ai/model-profiles.d.ts +36 -0
- package/dist/features/ai/model-profiles.js +111 -0
- package/dist/features/ai/model-profiles.js.map +1 -0
- package/dist/features/ai/preview-extensions.js +14 -0
- package/dist/features/ai/preview-extensions.js.map +1 -0
- package/dist/features/ai/protocol/agent-ops.d.ts +120 -0
- package/dist/features/ai/protocol/agent-ops.js +298 -0
- package/dist/features/ai/protocol/agent-ops.js.map +1 -0
- package/dist/features/ai/protocol/chat.d.ts +57 -0
- package/dist/features/ai/protocol/chat.js +146 -0
- package/dist/features/ai/protocol/chat.js.map +1 -0
- package/dist/features/ai/protocol/complete.d.ts +21 -0
- package/dist/features/ai/protocol/complete.js +81 -0
- package/dist/features/ai/protocol/complete.js.map +1 -0
- package/dist/features/ai/protocol/index.d.ts +7 -0
- package/dist/features/ai/protocol/index.js +7 -0
- package/dist/features/ai/protocol/models.d.ts +48 -0
- package/dist/features/ai/protocol/models.js +41 -0
- package/dist/features/ai/protocol/models.js.map +1 -0
- package/dist/features/ai/protocol/schemas.d.ts +36 -0
- package/dist/features/ai/protocol/schemas.js +40 -0
- package/dist/features/ai/protocol/schemas.js.map +1 -0
- package/dist/features/ai/protocol/tasks.d.ts +107 -0
- package/dist/features/ai/protocol/tasks.js +227 -0
- package/dist/features/ai/protocol/tasks.js.map +1 -0
- package/dist/features/ai/rate-limit.d.ts +9 -0
- package/dist/features/ai/rate-limit.js +20 -0
- package/dist/features/ai/rate-limit.js.map +1 -0
- package/dist/features/ai/react/AiReviewBar.d.ts +12 -0
- package/dist/features/ai/react/AiReviewBar.js +156 -0
- package/dist/features/ai/react/AiReviewBar.js.map +1 -0
- package/dist/features/ai/react/AiSelectionMenu.d.ts +14 -0
- package/dist/features/ai/react/AiSelectionMenu.js +513 -0
- package/dist/features/ai/react/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/react/AiSidebar.d.ts +19 -0
- package/dist/features/ai/react/AiSidebar.js +339 -0
- package/dist/features/ai/react/AiSidebar.js.map +1 -0
- package/dist/features/ai/react/DocumentChatAnswer.d.ts +10 -0
- package/dist/features/ai/react/DocumentChatAnswer.js +70 -0
- package/dist/features/ai/react/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/react/DocumentChatOps.d.ts +19 -0
- package/dist/features/ai/react/DocumentChatOps.js +111 -0
- package/dist/features/ai/react/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/react/ModelQuickSwitch.d.ts +19 -0
- package/dist/features/ai/react/ModelQuickSwitch.js +89 -0
- package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/react/SettingsAiTab.d.ts +5 -0
- package/dist/features/ai/react/SettingsAiTab.js +103 -0
- package/dist/features/ai/react/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/react/SettingsModelProfiles.d.ts +8 -0
- package/dist/features/ai/react/SettingsModelProfiles.js +318 -0
- package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/react/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/react/use-ai-assistant.js +36 -0
- package/dist/features/ai/react/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/react/use-document-chat.d.ts +32 -0
- package/dist/features/ai/react/use-document-chat.js +43 -0
- package/dist/features/ai/react/use-document-chat.js.map +1 -0
- package/dist/features/ai/react/use-model-profiles.d.ts +20 -0
- package/dist/features/ai/react/use-model-profiles.js +33 -0
- package/dist/features/ai/react/use-model-profiles.js.map +1 -0
- package/dist/features/ai/react.d.ts +23 -0
- package/dist/features/ai/react.js +28 -0
- package/dist/features/ai/react.js.map +1 -0
- package/dist/features/ai/sidebar-flow.d.ts +61 -0
- package/dist/features/ai/sidebar-flow.js +125 -0
- package/dist/features/ai/sidebar-flow.js.map +1 -0
- package/dist/features/ai/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/use-ai-assistant.js +39 -0
- package/dist/features/ai/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/use-document-chat.d.ts +33 -0
- package/dist/features/ai/use-document-chat.js +45 -0
- package/dist/features/ai/use-document-chat.js.map +1 -0
- package/dist/features/ai/use-model-profiles.d.ts +23 -0
- package/dist/features/ai/use-model-profiles.js +50 -0
- package/dist/features/ai/use-model-profiles.js.map +1 -0
- package/dist/features/ai/vue.d.ts +21 -0
- package/dist/features/ai/vue.js +28 -0
- package/dist/features/ai/vue.js.map +1 -0
- package/dist/features/authors/attribution.d.ts +36 -0
- package/dist/features/authors/attribution.js +94 -0
- package/dist/features/authors/attribution.js.map +1 -0
- package/dist/features/authors/author-color-styles.d.ts +12 -0
- package/dist/features/authors/author-color-styles.js +24 -0
- package/dist/features/authors/author-color-styles.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.js +50 -0
- package/dist/features/authors/components/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.vue.d.ts +11 -0
- package/dist/features/authors/components/AuthorColorsPanel.js +72 -0
- package/dist/features/authors/components/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsPanel.vue.d.ts +11 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js +49 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/components/SettingsAuthorsTab.vue.d.ts +6 -0
- package/dist/features/authors/feature.d.ts +22 -0
- package/dist/features/authors/feature.js +47 -0
- package/dist/features/authors/feature.js.map +1 -0
- package/dist/features/authors/index.d.ts +7 -0
- package/dist/features/authors/index.js +6 -0
- package/dist/features/authors/react/AuthorColorsButton.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsButton.js +41 -0
- package/dist/features/authors/react/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/react/AuthorColorsPanel.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsPanel.js +125 -0
- package/dist/features/authors/react/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/react/SettingsAuthorsTab.d.ts +5 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js +92 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/react.d.ts +11 -0
- package/dist/features/authors/react.js +16 -0
- package/dist/features/authors/react.js.map +1 -0
- package/dist/features/authors/schema.d.ts +22 -0
- package/dist/features/authors/schema.js +70 -0
- package/dist/features/authors/schema.js.map +1 -0
- package/dist/features/authors/vue.d.ts +10 -0
- package/dist/features/authors/vue.js +16 -0
- package/dist/features/authors/vue.js.map +1 -0
- package/dist/features/block-ui/block-actions.d.ts +17 -0
- package/dist/features/block-ui/block-actions.js +37 -0
- package/dist/features/block-ui/block-actions.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.vue.d.ts +25 -0
- package/dist/features/block-ui/components/BlockHandles.js +113 -0
- package/dist/features/block-ui/components/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.js +181 -0
- package/dist/features/block-ui/components/BlockUi.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.vue.d.ts +17 -0
- package/dist/features/block-ui/feature.d.ts +21 -0
- package/dist/features/block-ui/feature.js +23 -0
- package/dist/features/block-ui/feature.js.map +1 -0
- package/dist/features/block-ui/handle-geometry.js +52 -0
- package/dist/features/block-ui/handle-geometry.js.map +1 -0
- package/dist/features/block-ui/index.d.ts +3 -0
- package/dist/features/block-ui/index.js +3 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.d.ts +19 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/react/BlockHandles.d.ts +15 -0
- package/dist/features/block-ui/react/BlockHandles.js +104 -0
- package/dist/features/block-ui/react/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/react/BlockUi.d.ts +14 -0
- package/dist/features/block-ui/react/BlockUi.js +174 -0
- package/dist/features/block-ui/react/BlockUi.js.map +1 -0
- package/dist/features/block-ui/react.d.ts +11 -0
- package/dist/features/block-ui/react.js +13 -0
- package/dist/features/block-ui/react.js.map +1 -0
- package/dist/features/block-ui/vue.d.ts +9 -0
- package/dist/features/block-ui/vue.js +12 -0
- package/dist/features/block-ui/vue.js.map +1 -0
- package/dist/features/collab/anchor-resolver.d.ts +7 -0
- package/dist/features/collab/anchor-resolver.js +92 -0
- package/dist/features/collab/anchor-resolver.js.map +1 -0
- package/dist/features/collab/feature.d.ts +22 -0
- package/dist/features/collab/feature.js +36 -0
- package/dist/features/collab/feature.js.map +1 -0
- package/dist/features/collab/index.d.ts +3 -0
- package/dist/features/collab/index.js +3 -0
- package/dist/features/collab/react.d.ts +7 -0
- package/dist/features/collab/react.js +10 -0
- package/dist/features/collab/react.js.map +1 -0
- package/dist/features/collab/vue.d.ts +6 -0
- package/dist/features/collab/vue.js +37 -0
- package/dist/features/collab/vue.js.map +1 -0
- package/dist/features/comments/comments-plugin.d.ts +71 -0
- package/dist/features/comments/comments-plugin.js +185 -0
- package/dist/features/comments/comments-plugin.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.js +54 -0
- package/dist/features/comments/components/CommentBubble.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.vue.d.ts +14 -0
- package/dist/features/comments/components/CommentComposer.js +87 -0
- package/dist/features/comments/components/CommentComposer.js.map +1 -0
- package/dist/features/comments/components/CommentComposer.vue.d.ts +21 -0
- package/dist/features/comments/components/CommentThreadView.js +255 -0
- package/dist/features/comments/components/CommentThreadView.js.map +1 -0
- package/dist/features/comments/components/CommentThreadView.vue.d.ts +29 -0
- package/dist/features/comments/components/CommentsListMenu.js +134 -0
- package/dist/features/comments/components/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/components/CommentsListMenu.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsMargin.js +291 -0
- package/dist/features/comments/components/CommentsMargin.js.map +1 -0
- package/dist/features/comments/components/CommentsMargin.vue.d.ts +16 -0
- package/dist/features/comments/components/CommentsOverlay.js +39 -0
- package/dist/features/comments/components/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.js +124 -0
- package/dist/features/comments/components/CommentsPopover.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsToolbarButton.js +61 -0
- package/dist/features/comments/components/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.js +46 -0
- package/dist/features/comments/components/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.vue.d.ts +6 -0
- package/dist/features/comments/feature.d.ts +39 -0
- package/dist/features/comments/feature.js +128 -0
- package/dist/features/comments/feature.js.map +1 -0
- package/dist/features/comments/index.d.ts +6 -0
- package/dist/features/comments/index.js +6 -0
- package/dist/features/comments/model.d.ts +87 -0
- package/dist/features/comments/model.js +390 -0
- package/dist/features/comments/model.js.map +1 -0
- package/dist/features/comments/react/CommentAvatar.js +24 -0
- package/dist/features/comments/react/CommentAvatar.js.map +1 -0
- package/dist/features/comments/react/CommentBubble.d.ts +11 -0
- package/dist/features/comments/react/CommentBubble.js +43 -0
- package/dist/features/comments/react/CommentBubble.js.map +1 -0
- package/dist/features/comments/react/CommentComposer.d.ts +15 -0
- package/dist/features/comments/react/CommentComposer.js +69 -0
- package/dist/features/comments/react/CommentComposer.js.map +1 -0
- package/dist/features/comments/react/CommentThreadView.d.ts +24 -0
- package/dist/features/comments/react/CommentThreadView.js +249 -0
- package/dist/features/comments/react/CommentThreadView.js.map +1 -0
- package/dist/features/comments/react/CommentsListMenu.d.ts +8 -0
- package/dist/features/comments/react/CommentsListMenu.js +115 -0
- package/dist/features/comments/react/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/react/CommentsMargin.d.ts +16 -0
- package/dist/features/comments/react/CommentsMargin.js +294 -0
- package/dist/features/comments/react/CommentsMargin.js.map +1 -0
- package/dist/features/comments/react/CommentsOverlay.d.ts +11 -0
- package/dist/features/comments/react/CommentsOverlay.js +52 -0
- package/dist/features/comments/react/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/react/CommentsPopover.d.ts +15 -0
- package/dist/features/comments/react/CommentsPopover.js +107 -0
- package/dist/features/comments/react/CommentsPopover.js.map +1 -0
- package/dist/features/comments/react/CommentsToolbarButton.d.ts +12 -0
- package/dist/features/comments/react/CommentsToolbarButton.js +52 -0
- package/dist/features/comments/react/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/react/SettingsCommentsTab.d.ts +5 -0
- package/dist/features/comments/react/SettingsCommentsTab.js +77 -0
- package/dist/features/comments/react/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/react/use-comments.d.ts +17 -0
- package/dist/features/comments/react/use-comments.js +37 -0
- package/dist/features/comments/react/use-comments.js.map +1 -0
- package/dist/features/comments/react.d.ts +23 -0
- package/dist/features/comments/react.js +28 -0
- package/dist/features/comments/react.js.map +1 -0
- package/dist/features/comments/schema.d.ts +51 -0
- package/dist/features/comments/schema.js +41 -0
- package/dist/features/comments/schema.js.map +1 -0
- package/dist/features/comments/shortcuts.js +34 -0
- package/dist/features/comments/shortcuts.js.map +1 -0
- package/dist/features/comments/use-comments.d.ts +37 -0
- package/dist/features/comments/use-comments.js +45 -0
- package/dist/features/comments/use-comments.js.map +1 -0
- package/dist/features/comments/vue.d.ts +20 -0
- package/dist/features/comments/vue.js +28 -0
- package/dist/features/comments/vue.js.map +1 -0
- package/dist/features/composites/ai-brief.d.ts +31 -0
- package/dist/features/composites/ai-brief.js +56 -0
- package/dist/features/composites/ai-brief.js.map +1 -0
- package/dist/features/composites/anchors.d.ts +47 -0
- package/dist/features/composites/anchors.js +137 -0
- package/dist/features/composites/anchors.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.js +243 -0
- package/dist/features/composites/components/CompositeChrome.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeDetails.js +158 -0
- package/dist/features/composites/components/CompositeDetails.js.map +1 -0
- package/dist/features/composites/components/CompositeDetails.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeFieldEditor.js +114 -0
- package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +23 -0
- package/dist/features/composites/components/CompositeInspector.js +439 -0
- package/dist/features/composites/components/CompositeInspector.js.map +1 -0
- package/dist/features/composites/components/CompositeInspector.vue.d.ts +32 -0
- package/dist/features/composites/components/CompositeStatusMenu.js +51 -0
- package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/components/CompositeStatusMenu.vue.d.ts +28 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js +79 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +18 -0
- package/dist/features/composites/components/CompositeTable.js +348 -0
- package/dist/features/composites/components/CompositeTable.js.map +1 -0
- package/dist/features/composites/components/CompositeTable.vue.d.ts +15 -0
- package/dist/features/composites/components/CompositeTagsEditor.js +95 -0
- package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +13 -0
- package/dist/features/composites/components/CompositeView.js +46 -0
- package/dist/features/composites/components/CompositeView.js.map +1 -0
- package/dist/features/composites/components/CompositeView.vue.d.ts +96 -0
- package/dist/features/composites/components/SettingsEditingTab.js +119 -0
- package/dist/features/composites/components/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +11 -0
- package/dist/features/composites/convert.d.ts +24 -0
- package/dist/features/composites/convert.js +145 -0
- package/dist/features/composites/convert.js.map +1 -0
- package/dist/features/composites/editing-settings-keys.js +47 -0
- package/dist/features/composites/editing-settings-keys.js.map +1 -0
- package/dist/features/composites/feature.d.ts +30 -0
- package/dist/features/composites/feature.js +305 -0
- package/dist/features/composites/feature.js.map +1 -0
- package/dist/features/composites/fences.d.ts +20 -0
- package/dist/features/composites/fences.js +86 -0
- package/dist/features/composites/fences.js.map +1 -0
- package/dist/features/composites/heading-composites.d.ts +36 -0
- package/dist/features/composites/heading-composites.js +140 -0
- package/dist/features/composites/heading-composites.js.map +1 -0
- package/dist/features/composites/index.d.ts +20 -0
- package/dist/features/composites/index.js +20 -0
- package/dist/features/composites/kinds.d.ts +49 -0
- package/dist/features/composites/kinds.js +131 -0
- package/dist/features/composites/kinds.js.map +1 -0
- package/dist/features/composites/legacy.d.ts +8 -0
- package/dist/features/composites/legacy.js +25 -0
- package/dist/features/composites/legacy.js.map +1 -0
- package/dist/features/composites/markdown-export.d.ts +17 -0
- package/dist/features/composites/markdown-export.js +49 -0
- package/dist/features/composites/markdown-export.js.map +1 -0
- package/dist/features/composites/meta-display.js +46 -0
- package/dist/features/composites/meta-display.js.map +1 -0
- package/dist/features/composites/node-views.d.ts +17 -0
- package/dist/features/composites/node-views.js +18 -0
- package/dist/features/composites/node-views.js.map +1 -0
- package/dist/features/composites/nodes.d.ts +56 -0
- package/dist/features/composites/nodes.js +480 -0
- package/dist/features/composites/nodes.js.map +1 -0
- package/dist/features/composites/outline.d.ts +35 -0
- package/dist/features/composites/outline.js +69 -0
- package/dist/features/composites/outline.js.map +1 -0
- package/dist/features/composites/react/CompositeChrome.d.ts +16 -0
- package/dist/features/composites/react/CompositeChrome.js +234 -0
- package/dist/features/composites/react/CompositeChrome.js.map +1 -0
- package/dist/features/composites/react/CompositeDetails.d.ts +16 -0
- package/dist/features/composites/react/CompositeDetails.js +149 -0
- package/dist/features/composites/react/CompositeDetails.js.map +1 -0
- package/dist/features/composites/react/CompositeFieldEditor.d.ts +18 -0
- package/dist/features/composites/react/CompositeFieldEditor.js +131 -0
- package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeInspector.d.ts +23 -0
- package/dist/features/composites/react/CompositeInspector.js +506 -0
- package/dist/features/composites/react/CompositeInspector.js.map +1 -0
- package/dist/features/composites/react/CompositeStatusMenu.d.ts +15 -0
- package/dist/features/composites/react/CompositeStatusMenu.js +36 -0
- package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/react/CompositeSummaryEditor.d.ts +15 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js +85 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeTable.d.ts +11 -0
- package/dist/features/composites/react/CompositeTable.js +342 -0
- package/dist/features/composites/react/CompositeTable.js.map +1 -0
- package/dist/features/composites/react/CompositeTagsEditor.d.ts +10 -0
- package/dist/features/composites/react/CompositeTagsEditor.js +122 -0
- package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeView.d.ts +6 -0
- package/dist/features/composites/react/CompositeView.js +30 -0
- package/dist/features/composites/react/CompositeView.js.map +1 -0
- package/dist/features/composites/react/SettingsEditingTab.d.ts +8 -0
- package/dist/features/composites/react/SettingsEditingTab.js +153 -0
- package/dist/features/composites/react/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/react/use-composite-anchors.d.ts +17 -0
- package/dist/features/composites/react/use-composite-anchors.js +46 -0
- package/dist/features/composites/react/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/react/use-composite-rows.d.ts +11 -0
- package/dist/features/composites/react/use-composite-rows.js +26 -0
- package/dist/features/composites/react/use-composite-rows.js.map +1 -0
- package/dist/features/composites/react.d.ts +24 -0
- package/dist/features/composites/react.js +30 -0
- package/dist/features/composites/react.js.map +1 -0
- package/dist/features/composites/rows-model.d.ts +38 -0
- package/dist/features/composites/rows-model.js +92 -0
- package/dist/features/composites/rows-model.js.map +1 -0
- package/dist/features/composites/rows.d.ts +76 -0
- package/dist/features/composites/rows.js +159 -0
- package/dist/features/composites/rows.js.map +1 -0
- package/dist/features/composites/schema.d.ts +21 -0
- package/dist/features/composites/schema.js +26 -0
- package/dist/features/composites/schema.js.map +1 -0
- package/dist/features/composites/structure-mode.d.ts +11 -0
- package/dist/features/composites/structure-mode.js +16 -0
- package/dist/features/composites/structure-mode.js.map +1 -0
- package/dist/features/composites/structure.d.ts +19 -0
- package/dist/features/composites/structure.js +19 -0
- package/dist/features/composites/structure.js.map +1 -0
- package/dist/features/composites/table-model.js +117 -0
- package/dist/features/composites/table-model.js.map +1 -0
- package/dist/features/composites/tree-root.d.ts +11 -0
- package/dist/features/composites/tree-root.js +16 -0
- package/dist/features/composites/tree-root.js.map +1 -0
- package/dist/features/composites/use-composite-anchors.d.ts +18 -0
- package/dist/features/composites/use-composite-anchors.js +42 -0
- package/dist/features/composites/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/use-composite-rows.d.ts +25 -0
- package/dist/features/composites/use-composite-rows.js +28 -0
- package/dist/features/composites/use-composite-rows.js.map +1 -0
- package/dist/features/composites/vue.d.ts +23 -0
- package/dist/features/composites/vue.js +30 -0
- package/dist/features/composites/vue.js.map +1 -0
- package/dist/features/media/assets.d.ts +30 -0
- package/dist/features/media/assets.js +26 -0
- package/dist/features/media/assets.js.map +1 -0
- package/dist/features/media/audio-recorder.d.ts +25 -0
- package/dist/features/media/audio-recorder.js +123 -0
- package/dist/features/media/audio-recorder.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.js +152 -0
- package/dist/features/media/components/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.vue.d.ts +15 -0
- package/dist/features/media/components/AudioView.js +46 -0
- package/dist/features/media/components/AudioView.js.map +1 -0
- package/dist/features/media/components/FileView.js +73 -0
- package/dist/features/media/components/FileView.js.map +1 -0
- package/dist/features/media/components/VideoView.js +47 -0
- package/dist/features/media/components/VideoView.js.map +1 -0
- package/dist/features/media/feature.d.ts +22 -0
- package/dist/features/media/feature.js +101 -0
- package/dist/features/media/feature.js.map +1 -0
- package/dist/features/media/file-import.d.ts +21 -0
- package/dist/features/media/file-import.js +76 -0
- package/dist/features/media/file-import.js.map +1 -0
- package/dist/features/media/index.d.ts +7 -0
- package/dist/features/media/index.js +7 -0
- package/dist/features/media/node-views.d.ts +28 -0
- package/dist/features/media/node-views.js +28 -0
- package/dist/features/media/node-views.js.map +1 -0
- package/dist/features/media/react/AudioRecorderModal.d.ts +12 -0
- package/dist/features/media/react/AudioRecorderModal.js +147 -0
- package/dist/features/media/react/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/react/AudioView.js +32 -0
- package/dist/features/media/react/AudioView.js.map +1 -0
- package/dist/features/media/react/FileView.js +61 -0
- package/dist/features/media/react/FileView.js.map +1 -0
- package/dist/features/media/react/TitleField.js +30 -0
- package/dist/features/media/react/TitleField.js.map +1 -0
- package/dist/features/media/react/VideoView.js +33 -0
- package/dist/features/media/react/VideoView.js.map +1 -0
- package/dist/features/media/react/use-audio-recorder.d.ts +11 -0
- package/dist/features/media/react/use-audio-recorder.js +21 -0
- package/dist/features/media/react/use-audio-recorder.js.map +1 -0
- package/dist/features/media/react.d.ts +19 -0
- package/dist/features/media/react.js +37 -0
- package/dist/features/media/react.js.map +1 -0
- package/dist/features/media/schema.d.ts +59 -0
- package/dist/features/media/schema.js +194 -0
- package/dist/features/media/schema.js.map +1 -0
- package/dist/features/media/upload.d.ts +41 -0
- package/dist/features/media/upload.js +106 -0
- package/dist/features/media/upload.js.map +1 -0
- package/dist/features/media/use-audio-recorder.d.ts +12 -0
- package/dist/features/media/use-audio-recorder.js +21 -0
- package/dist/features/media/use-audio-recorder.js.map +1 -0
- package/dist/features/media/vue.d.ts +19 -0
- package/dist/features/media/vue.js +35 -0
- package/dist/features/media/vue.js.map +1 -0
- package/dist/features/mentions/index.d.ts +22 -0
- package/dist/features/mentions/index.js +34 -0
- package/dist/features/mentions/index.js.map +1 -0
- package/dist/features/mentions/mention-suggestion.d.ts +11 -0
- package/dist/features/mentions/mention-suggestion.js +34 -0
- package/dist/features/mentions/mention-suggestion.js.map +1 -0
- package/dist/features/mentions/mention-text.d.ts +18 -0
- package/dist/features/mentions/mention-text.js +75 -0
- package/dist/features/mentions/mention-text.js.map +1 -0
- package/dist/features/mentions/mention.d.ts +20 -0
- package/dist/features/mentions/mention.js +33 -0
- package/dist/features/mentions/mention.js.map +1 -0
- package/dist/features/mentions/metadata-defaults.d.ts +8 -0
- package/dist/features/mentions/metadata-defaults.js +30 -0
- package/dist/features/mentions/metadata-defaults.js.map +1 -0
- package/dist/features/mentions/normalize.d.ts +10 -0
- package/dist/features/mentions/normalize.js +31 -0
- package/dist/features/mentions/normalize.js.map +1 -0
- package/dist/features/mentions/schema.d.ts +10 -0
- package/dist/features/mentions/schema.js +10 -0
- package/dist/features/mentions/schema.js.map +1 -0
- package/dist/features/mentions/tag-suggestion.d.ts +11 -0
- package/dist/features/mentions/tag-suggestion.js +45 -0
- package/dist/features/mentions/tag-suggestion.js.map +1 -0
- package/dist/features/mentions/tag.d.ts +43 -0
- package/dist/features/mentions/tag.js +155 -0
- package/dist/features/mentions/tag.js.map +1 -0
- package/dist/features/tables/feature.d.ts +14 -0
- package/dist/features/tables/feature.js +100 -0
- package/dist/features/tables/feature.js.map +1 -0
- package/dist/features/tables/index.d.ts +3 -0
- package/dist/features/tables/index.js +3 -0
- package/dist/features/tables/schema.d.ts +6 -0
- package/dist/features/tables/schema.js +27 -0
- package/dist/features/tables/schema.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js +227 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.vue.d.ts +6 -0
- package/dist/features/themes/feature.d.ts +24 -0
- package/dist/features/themes/feature.js +25 -0
- package/dist/features/themes/feature.js.map +1 -0
- package/dist/features/themes/index.d.ts +6 -0
- package/dist/features/themes/index.js +6 -0
- package/dist/features/themes/react/SettingsAppearanceTab.d.ts +5 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js +221 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/react.d.ts +13 -0
- package/dist/features/themes/react.js +15 -0
- package/dist/features/themes/react.js.map +1 -0
- package/dist/features/themes/schema.d.ts +21 -0
- package/dist/features/themes/schema.js +16 -0
- package/dist/features/themes/schema.js.map +1 -0
- package/dist/features/themes/scope-css.d.ts +5 -0
- package/dist/features/themes/scope-css.js +142 -0
- package/dist/features/themes/scope-css.js.map +1 -0
- package/dist/features/themes/theme-runtime.d.ts +14 -0
- package/dist/features/themes/theme-runtime.js +147 -0
- package/dist/features/themes/theme-runtime.js.map +1 -0
- package/dist/features/themes/vue.d.ts +13 -0
- package/dist/features/themes/vue.js +29 -0
- package/dist/features/themes/vue.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.js +169 -0
- package/dist/features/transcript/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.vue.d.ts +96 -0
- package/dist/features/transcript/convert.d.ts +11 -0
- package/dist/features/transcript/convert.js +40 -0
- package/dist/features/transcript/convert.js.map +1 -0
- package/dist/features/transcript/feature.d.ts +25 -0
- package/dist/features/transcript/feature.js +59 -0
- package/dist/features/transcript/feature.js.map +1 -0
- package/dist/features/transcript/index.d.ts +7 -0
- package/dist/features/transcript/index.js +7 -0
- package/dist/features/transcript/react/TranscriptSegmentView.d.ts +6 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js +155 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/react.d.ts +9 -0
- package/dist/features/transcript/react.js +12 -0
- package/dist/features/transcript/react.js.map +1 -0
- package/dist/features/transcript/schema.d.ts +9 -0
- package/dist/features/transcript/schema.js +9 -0
- package/dist/features/transcript/schema.js.map +1 -0
- package/dist/features/transcript/segment-node.d.ts +21 -0
- package/dist/features/transcript/segment-node.js +113 -0
- package/dist/features/transcript/segment-node.js.map +1 -0
- package/dist/features/transcript/segment.d.ts +10 -0
- package/dist/features/transcript/segment.js +26 -0
- package/dist/features/transcript/segment.js.map +1 -0
- package/dist/features/transcript/speakers.d.ts +8 -0
- package/dist/features/transcript/speakers.js +22 -0
- package/dist/features/transcript/speakers.js.map +1 -0
- package/dist/features/transcript/vue.d.ts +8 -0
- package/dist/features/transcript/vue.js +12 -0
- package/dist/features/transcript/vue.js.map +1 -0
- package/dist/i18n/de/ai.js +168 -0
- package/dist/i18n/de/ai.js.map +1 -0
- package/dist/i18n/de/authors.js +21 -0
- package/dist/i18n/de/authors.js.map +1 -0
- package/dist/i18n/de/block.js +16 -0
- package/dist/i18n/de/block.js.map +1 -0
- package/dist/i18n/de/comments.js +35 -0
- package/dist/i18n/de/comments.js.map +1 -0
- package/dist/i18n/de/common.js +10 -0
- package/dist/i18n/de/common.js.map +1 -0
- package/dist/i18n/de/composites.js +147 -0
- package/dist/i18n/de/composites.js.map +1 -0
- package/dist/i18n/de/integrations.js +42 -0
- package/dist/i18n/de/integrations.js.map +1 -0
- package/dist/i18n/de/markdown.js +16 -0
- package/dist/i18n/de/markdown.js.map +1 -0
- package/dist/i18n/de/media.js +27 -0
- package/dist/i18n/de/media.js.map +1 -0
- package/dist/i18n/de/mentions.js +10 -0
- package/dist/i18n/de/mentions.js.map +1 -0
- package/dist/i18n/de/outline.js +9 -0
- package/dist/i18n/de/outline.js.map +1 -0
- package/dist/i18n/de/settings.js +12 -0
- package/dist/i18n/de/settings.js.map +1 -0
- package/dist/i18n/de/tables.js +15 -0
- package/dist/i18n/de/tables.js.map +1 -0
- package/dist/i18n/de/themes.js +26 -0
- package/dist/i18n/de/themes.js.map +1 -0
- package/dist/i18n/de/toolbar.js +22 -0
- package/dist/i18n/de/toolbar.js.map +1 -0
- package/dist/i18n/de/transcript.js +10 -0
- package/dist/i18n/de/transcript.js.map +1 -0
- package/dist/i18n/de/tree.js +31 -0
- package/dist/i18n/de/tree.js.map +1 -0
- package/dist/i18n/de.d.ts +502 -0
- package/dist/i18n/de.js +42 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/en/ai.js +168 -0
- package/dist/i18n/en/ai.js.map +1 -0
- package/dist/i18n/en/authors.js +21 -0
- package/dist/i18n/en/authors.js.map +1 -0
- package/dist/i18n/en/block.js +16 -0
- package/dist/i18n/en/block.js.map +1 -0
- package/dist/i18n/en/comments.js +35 -0
- package/dist/i18n/en/comments.js.map +1 -0
- package/dist/i18n/en/common.js +10 -0
- package/dist/i18n/en/common.js.map +1 -0
- package/dist/i18n/en/composites.js +145 -0
- package/dist/i18n/en/composites.js.map +1 -0
- package/dist/i18n/en/integrations.js +42 -0
- package/dist/i18n/en/integrations.js.map +1 -0
- package/dist/i18n/en/markdown.js +16 -0
- package/dist/i18n/en/markdown.js.map +1 -0
- package/dist/i18n/en/media.js +27 -0
- package/dist/i18n/en/media.js.map +1 -0
- package/dist/i18n/en/mentions.js +10 -0
- package/dist/i18n/en/mentions.js.map +1 -0
- package/dist/i18n/en/outline.js +9 -0
- package/dist/i18n/en/outline.js.map +1 -0
- package/dist/i18n/en/settings.js +12 -0
- package/dist/i18n/en/settings.js.map +1 -0
- package/dist/i18n/en/tables.js +15 -0
- package/dist/i18n/en/tables.js.map +1 -0
- package/dist/i18n/en/themes.js +26 -0
- package/dist/i18n/en/themes.js.map +1 -0
- package/dist/i18n/en/toolbar.js +22 -0
- package/dist/i18n/en/toolbar.js.map +1 -0
- package/dist/i18n/en/transcript.js +10 -0
- package/dist/i18n/en/transcript.js.map +1 -0
- package/dist/i18n/en/tree.js +31 -0
- package/dist/i18n/en/tree.js.map +1 -0
- package/dist/i18n/en.js +42 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.js +31 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +0 -0
- package/dist/integrations/composite-ai/composite-fill.d.ts +17 -0
- package/dist/integrations/composite-ai/composite-fill.js +129 -0
- package/dist/integrations/composite-ai/composite-fill.js.map +1 -0
- package/dist/integrations/composite-ai/composite-summary.d.ts +28 -0
- package/dist/integrations/composite-ai/composite-summary.js +143 -0
- package/dist/integrations/composite-ai/composite-summary.js.map +1 -0
- package/dist/integrations/composite-ai/document-transcribe.d.ts +14 -0
- package/dist/integrations/composite-ai/document-transcribe.js +89 -0
- package/dist/integrations/composite-ai/document-transcribe.js.map +1 -0
- package/dist/integrations/composite-ai/index.d.ts +22 -0
- package/dist/integrations/composite-ai/index.js +80 -0
- package/dist/integrations/composite-ai/index.js.map +1 -0
- package/dist/integrations/composite-media/index.d.ts +19 -0
- package/dist/integrations/composite-media/index.js +72 -0
- package/dist/integrations/composite-media/index.js.map +1 -0
- package/dist/integrations/transcript-ai/index.d.ts +16 -0
- package/dist/integrations/transcript-ai/index.js +63 -0
- package/dist/integrations/transcript-ai/index.js.map +1 -0
- package/dist/integrations/transcript-ai/protocol.d.ts +68 -0
- package/dist/integrations/transcript-ai/protocol.js +132 -0
- package/dist/integrations/transcript-ai/protocol.js.map +1 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +35 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js +169 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -0
- package/dist/markdown/MarkdownSurface.d.ts +25 -0
- package/dist/markdown/MarkdownSurface.js +93 -0
- package/dist/markdown/MarkdownSurface.js.map +1 -0
- package/dist/markdown/MarkdownSurface.vue.d.ts +76 -0
- package/dist/markdown/MarkdownSurface2.js +237 -0
- package/dist/markdown/MarkdownSurface2.js.map +1 -0
- package/dist/markdown/clipboard.d.ts +17 -0
- package/dist/markdown/clipboard.js +125 -0
- package/dist/markdown/clipboard.js.map +1 -0
- package/dist/markdown/document.d.ts +36 -0
- package/dist/markdown/document.js +100 -0
- package/dist/markdown/document.js.map +1 -0
- package/dist/markdown/frontmatter.d.ts +18 -0
- package/dist/markdown/frontmatter.js +32 -0
- package/dist/markdown/frontmatter.js.map +1 -0
- package/dist/markdown/index.d.ts +6 -0
- package/dist/markdown/index.js +6 -0
- package/dist/markdown/policy.d.ts +34 -0
- package/dist/markdown/policy.js +78 -0
- package/dist/markdown/policy.js.map +1 -0
- package/dist/markdown/react.d.ts +2 -0
- package/dist/markdown/react.js +1 -0
- package/dist/markdown/source-mode.d.ts +49 -0
- package/dist/markdown/source-mode.js +86 -0
- package/dist/markdown/source-mode.js.map +1 -0
- package/dist/markdown/vue.d.ts +2 -0
- package/dist/markdown/vue.js +1 -0
- package/dist/nuxt/module.d.ts +62 -0
- package/dist/nuxt/module.js +101 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/install-context.d.ts +16 -0
- package/dist/nuxt/runtime/install-context.js +25 -0
- package/dist/nuxt/runtime/install-context.js.map +1 -0
- package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/collab.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/collab.js +10 -0
- package/dist/nuxt/runtime/server/plugins/collab.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js +20 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].d.ts +5 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js +35 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js.map +1 -0
- package/dist/nuxt/runtime/server/utils/editor-route.d.ts +11 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js +49 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js.map +1 -0
- package/dist/outline/EditorOutline.js +124 -0
- package/dist/outline/EditorOutline.js.map +1 -0
- package/dist/outline/EditorOutline.vue.d.ts +15 -0
- package/dist/outline/heading-outline.d.ts +26 -0
- package/dist/outline/heading-outline.js +46 -0
- package/dist/outline/heading-outline.js.map +1 -0
- package/dist/outline/index.d.ts +2 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/react/EditorOutline.d.ts +12 -0
- package/dist/outline/react/EditorOutline.js +112 -0
- package/dist/outline/react/EditorOutline.js.map +1 -0
- package/dist/outline/react.d.ts +2 -0
- package/dist/outline/react.js +1 -0
- package/dist/outline/vue.d.ts +2 -0
- package/dist/outline/vue.js +1 -0
- package/dist/presets/advanced.d.ts +33 -0
- package/dist/presets/advanced.js +50 -0
- package/dist/presets/advanced.js.map +1 -0
- package/dist/presets/simple.d.ts +9 -0
- package/dist/presets/simple.js +12 -0
- package/dist/presets/simple.js.map +1 -0
- package/dist/react/AdvancedEditor.d.ts +23 -0
- package/dist/react/AdvancedEditor.js +24 -0
- package/dist/react/AdvancedEditor.js.map +1 -0
- package/dist/react/EditorSettingsModal.d.ts +14 -0
- package/dist/react/EditorSettingsModal.js +40 -0
- package/dist/react/EditorSettingsModal.js.map +1 -0
- package/dist/react/EditorSettingsPanel.d.ts +18 -0
- package/dist/react/EditorSettingsPanel.js +40 -0
- package/dist/react/EditorSettingsPanel.js.map +1 -0
- package/dist/react/EditorSurface.d.ts +61 -0
- package/dist/react/EditorSurface.js +277 -0
- package/dist/react/EditorSurface.js.map +1 -0
- package/dist/react/EditorToolbar.d.ts +15 -0
- package/dist/react/EditorToolbar.js +182 -0
- package/dist/react/EditorToolbar.js.map +1 -0
- package/dist/react/Icon.d.ts +13 -0
- package/dist/react/Icon.js +19 -0
- package/dist/react/Icon.js.map +1 -0
- package/dist/react/SettingsSection.d.ts +10 -0
- package/dist/react/SettingsSection.js +22 -0
- package/dist/react/SettingsSection.js.map +1 -0
- package/dist/react/SimpleEditor.d.ts +27 -0
- package/dist/react/SimpleEditor.js +22 -0
- package/dist/react/SimpleEditor.js.map +1 -0
- package/dist/react/advanced-preset.d.ts +11 -0
- package/dist/react/advanced-preset.js +31 -0
- package/dist/react/advanced-preset.js.map +1 -0
- package/dist/react/advanced.d.ts +4 -0
- package/dist/react/advanced.js +3 -0
- package/dist/react/context.d.ts +12 -0
- package/dist/react/context.js +21 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/editor-ui.d.ts +14 -0
- package/dist/react/editor-ui.js +20 -0
- package/dist/react/editor-ui.js.map +1 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.js +17 -0
- package/dist/react/notify.d.ts +6 -0
- package/dist/react/notify.js +25 -0
- package/dist/react/notify.js.map +1 -0
- package/dist/react/settings.d.ts +17 -0
- package/dist/react/settings.js +27 -0
- package/dist/react/settings.js.map +1 -0
- package/dist/react/simple.d.ts +2 -0
- package/dist/react/simple.js +1 -0
- package/dist/react/styles/advanced.css +18 -0
- package/dist/react/styles/themes-bridge.css +26 -0
- package/dist/react/styles/ui-vars.css +20 -0
- package/dist/react/suggestion-renderer.d.ts +12 -0
- package/dist/react/suggestion-renderer.js +90 -0
- package/dist/react/suggestion-renderer.js.map +1 -0
- package/dist/react/ui/alert.js +38 -0
- package/dist/react/ui/alert.js.map +1 -0
- package/dist/react/ui/avatar.js +24 -0
- package/dist/react/ui/avatar.js.map +1 -0
- package/dist/react/ui/badge.js +30 -0
- package/dist/react/ui/badge.js.map +1 -0
- package/dist/react/ui/button.js +50 -0
- package/dist/react/ui/button.js.map +1 -0
- package/dist/react/ui/collapsible.js +19 -0
- package/dist/react/ui/collapsible.js.map +1 -0
- package/dist/react/ui/command.js +47 -0
- package/dist/react/ui/command.js.map +1 -0
- package/dist/react/ui/dialog.js +88 -0
- package/dist/react/ui/dialog.js.map +1 -0
- package/dist/react/ui/dropdown-menu.js +70 -0
- package/dist/react/ui/dropdown-menu.js.map +1 -0
- package/dist/react/ui/input-group.js +57 -0
- package/dist/react/ui/input-group.js.map +1 -0
- package/dist/react/ui/input.js +16 -0
- package/dist/react/ui/input.js.map +1 -0
- package/dist/react/ui/label.js +17 -0
- package/dist/react/ui/label.js.map +1 -0
- package/dist/react/ui/popover.js +36 -0
- package/dist/react/ui/popover.js.map +1 -0
- package/dist/react/ui/radio-group.js +29 -0
- package/dist/react/ui/radio-group.js.map +1 -0
- package/dist/react/ui/select.js +88 -0
- package/dist/react/ui/select.js.map +1 -0
- package/dist/react/ui/separator.js +18 -0
- package/dist/react/ui/separator.js.map +1 -0
- package/dist/react/ui/switch.js +21 -0
- package/dist/react/ui/switch.js.map +1 -0
- package/dist/react/ui/table.js +44 -0
- package/dist/react/ui/table.js.map +1 -0
- package/dist/react/ui/tabs.js +41 -0
- package/dist/react/ui/tabs.js.map +1 -0
- package/dist/react/ui/textarea.js +15 -0
- package/dist/react/ui/textarea.js.map +1 -0
- package/dist/react/ui/tooltip.js +37 -0
- package/dist/react/ui/tooltip.js.map +1 -0
- package/dist/react/ui/utils.d.ts +5 -0
- package/dist/react/ui/utils.js +10 -0
- package/dist/react/ui/utils.js.map +1 -0
- package/dist/react/use-editor-i18n.d.ts +12 -0
- package/dist/react/use-editor-i18n.js +17 -0
- package/dist/react/use-editor-i18n.js.map +1 -0
- package/dist/react/use-notifier.d.ts +11 -0
- package/dist/react/use-notifier.js +25 -0
- package/dist/react/use-notifier.js.map +1 -0
- package/dist/react/use-store.d.ts +6 -0
- package/dist/react/use-store.js +10 -0
- package/dist/react/use-store.js.map +1 -0
- package/dist/schema/advanced.d.ts +14 -0
- package/dist/schema/advanced.js +43 -0
- package/dist/schema/advanced.js.map +1 -0
- package/dist/schema/simple.d.ts +10 -0
- package/dist/schema/simple.js +13 -0
- package/dist/schema/simple.js.map +1 -0
- package/dist/server/adapter.d.ts +101 -0
- package/dist/server/ai.d.ts +101 -0
- package/dist/server/ai.js +105 -0
- package/dist/server/ai.js.map +1 -0
- package/dist/server/collab-state.d.ts +16 -0
- package/dist/server/collab-state.js +43 -0
- package/dist/server/collab-state.js.map +1 -0
- package/dist/server/collab.d.ts +68 -0
- package/dist/server/collab.js +187 -0
- package/dist/server/collab.js.map +1 -0
- package/dist/server/errors.d.ts +17 -0
- package/dist/server/errors.js +26 -0
- package/dist/server/errors.js.map +1 -0
- package/dist/server/handlers/ai.d.ts +223 -0
- package/dist/server/handlers/ai.js +422 -0
- package/dist/server/handlers/ai.js.map +1 -0
- package/dist/server/handlers/context.d.ts +64 -0
- package/dist/server/handlers/context.js +85 -0
- package/dist/server/handlers/context.js.map +1 -0
- package/dist/server/handlers/editor.d.ts +107 -0
- package/dist/server/handlers/editor.js +241 -0
- package/dist/server/handlers/editor.js.map +1 -0
- package/dist/server/handlers/index.d.ts +4 -0
- package/dist/server/handlers/index.js +4 -0
- package/dist/server/host.d.ts +61 -0
- package/dist/server/host.js +105 -0
- package/dist/server/host.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +7 -0
- package/dist/server/node.d.ts +24 -0
- package/dist/server/node.js +54 -0
- package/dist/server/node.js.map +1 -0
- package/dist/server/rate-limit.d.ts +22 -0
- package/dist/server/rate-limit.js +34 -0
- package/dist/server/rate-limit.js.map +1 -0
- package/dist/settings/index.d.ts +110 -0
- package/dist/settings/index.js +114 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/values.d.ts +35 -0
- package/dist/settings/values.js +41 -0
- package/dist/settings/values.js.map +1 -0
- package/dist/styles/ai.css +77 -0
- package/dist/styles/authors.css +18 -0
- package/dist/styles/block-ui.css +16 -0
- package/dist/styles/collab.css +26 -0
- package/dist/styles/comments.css +11 -0
- package/dist/styles/composites.css +56 -0
- package/dist/styles/core.css +99 -0
- package/dist/styles/media.css +8 -0
- package/dist/styles/mentions.css +24 -0
- package/dist/styles/tables.css +25 -0
- package/dist/styles/themes.css +622 -0
- package/dist/styles/tokens.css +29 -0
- package/dist/styles/transcript.css +13 -0
- package/dist/tree/DocumentTree.js +595 -0
- package/dist/tree/DocumentTree.js.map +1 -0
- package/dist/tree/DocumentTree.vue.d.ts +36 -0
- package/dist/tree/folder-paths.js +11 -0
- package/dist/tree/folder-paths.js.map +1 -0
- package/dist/tree/index.d.ts +4 -0
- package/dist/tree/index.js +1 -0
- package/dist/tree/react/DocumentTree.d.ts +24 -0
- package/dist/tree/react/DocumentTree.js +579 -0
- package/dist/tree/react/DocumentTree.js.map +1 -0
- package/dist/tree/react/use-tree-view.d.ts +14 -0
- package/dist/tree/react/use-tree-view.js +21 -0
- package/dist/tree/react/use-tree-view.js.map +1 -0
- package/dist/tree/react.d.ts +3 -0
- package/dist/tree/react.js +3 -0
- package/dist/tree/store.d.ts +45 -0
- package/dist/tree/tree-items.js +221 -0
- package/dist/tree/tree-items.js.map +1 -0
- package/dist/tree/tree-view-model.d.ts +29 -0
- package/dist/tree/tree-view-model.js +71 -0
- package/dist/tree/tree-view-model.js.map +1 -0
- package/dist/tree/tree-view.d.ts +15 -0
- package/dist/tree/tree-view.js +21 -0
- package/dist/tree/tree-view.js.map +1 -0
- package/dist/tree/types.d.ts +23 -0
- package/dist/tree/types.js +0 -0
- package/dist/tree/vue.d.ts +3 -0
- package/dist/tree/vue.js +3 -0
- package/dist/vue/AdvancedEditor.js +100 -0
- package/dist/vue/AdvancedEditor.js.map +1 -0
- package/dist/vue/AdvancedEditor.vue.d.ts +71 -0
- package/dist/vue/SimpleEditor.js +61 -0
- package/dist/vue/SimpleEditor.js.map +1 -0
- package/dist/vue/SimpleEditor.vue.d.ts +36 -0
- package/dist/vue/advanced-preset.d.ts +13 -0
- package/dist/vue/advanced-preset.js +33 -0
- package/dist/vue/advanced-preset.js.map +1 -0
- package/dist/vue/advanced.d.ts +3 -0
- package/dist/vue/advanced.js +3 -0
- package/dist/vue/components/EditorSettingsModal.js +69 -0
- package/dist/vue/components/EditorSettingsModal.js.map +1 -0
- package/dist/vue/components/EditorSettingsModal.vue.d.ts +24 -0
- package/dist/vue/components/EditorSettingsPanel.js +58 -0
- package/dist/vue/components/EditorSettingsPanel.js.map +1 -0
- package/dist/vue/components/EditorSettingsPanel.vue.d.ts +29 -0
- package/dist/vue/components/EditorSurface.js +229 -0
- package/dist/vue/components/EditorSurface.js.map +1 -0
- package/dist/vue/components/EditorSurface.vue.d.ts +68 -0
- package/dist/vue/components/EditorToolbar.js +189 -0
- package/dist/vue/components/EditorToolbar.js.map +1 -0
- package/dist/vue/components/EditorToolbar.vue.d.ts +17 -0
- package/dist/vue/components/SettingsSection.js +26 -0
- package/dist/vue/components/SettingsSection.js.map +1 -0
- package/dist/vue/components/SettingsSection.vue.d.ts +21 -0
- package/dist/vue/components/SuggestionList.js +91 -0
- package/dist/vue/components/SuggestionList.js.map +1 -0
- package/dist/vue/components/SuggestionList.vue.d.ts +19 -0
- package/dist/vue/context.d.ts +24 -0
- package/dist/vue/context.js +42 -0
- package/dist/vue/context.js.map +1 -0
- package/dist/vue/index.d.ts +26 -0
- package/dist/vue/index.js +16 -0
- package/dist/vue/kit/index.d.ts +3 -0
- package/dist/vue/kit/index.js +1 -0
- package/dist/vue/kit/nuxt-ui.css +24 -0
- package/dist/vue/kit/nuxt-ui.d.ts +31 -0
- package/dist/vue/kit/nuxt-ui.js +101 -0
- package/dist/vue/kit/nuxt-ui.js.map +1 -0
- package/dist/vue/kit/types.d.ts +370 -0
- package/dist/vue/kit/use-ui-kit.d.ts +12 -0
- package/dist/vue/kit/use-ui-kit.js +17 -0
- package/dist/vue/kit/use-ui-kit.js.map +1 -0
- package/dist/vue/notify.d.ts +12 -0
- package/dist/vue/notify.js +27 -0
- package/dist/vue/notify.js.map +1 -0
- package/dist/vue/settings.d.ts +16 -0
- package/dist/vue/settings.js +64 -0
- package/dist/vue/settings.js.map +1 -0
- package/dist/vue/simple.d.ts +2 -0
- package/dist/vue/simple.js +1 -0
- package/dist/vue/store-ref.d.ts +20 -0
- package/dist/vue/store-ref.js +59 -0
- package/dist/vue/store-ref.js.map +1 -0
- package/dist/vue/suggestion-renderer.d.ts +6 -0
- package/dist/vue/suggestion-renderer.js +20 -0
- package/dist/vue/suggestion-renderer.js.map +1 -0
- package/dist/vue/use-editor-i18n.d.ts +12 -0
- package/dist/vue/use-editor-i18n.js +17 -0
- package/dist/vue/use-editor-i18n.js.map +1 -0
- package/dist/vue/use-editor-ui.d.ts +15 -0
- package/dist/vue/use-editor-ui.js +23 -0
- package/dist/vue/use-editor-ui.js.map +1 -0
- package/dist/vue/use-notifier.d.ts +11 -0
- package/dist/vue/use-notifier.js +19 -0
- package/dist/vue/use-notifier.js.map +1 -0
- package/docs/extending.md +538 -0
- package/docs/integration.md +537 -0
- package/docs/llms.md +375 -0
- package/docs/usage.md +1071 -0
- package/package.json +619 -4
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { conversionsOf } from "../../../core/pipeline.js";
|
|
2
|
+
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
3
|
+
import { cn } from "../../../react/ui/utils.js";
|
|
4
|
+
import { Icon } from "../../../react/Icon.js";
|
|
5
|
+
import { useStore } from "../../../react/use-store.js";
|
|
6
|
+
import { Button } from "../../../react/ui/button.js";
|
|
7
|
+
import { CHAT_LIMITS } from "../protocol/chat.js";
|
|
8
|
+
import { AI_LIMITS, blockTasks, withTaskHeading } from "../protocol/tasks.js";
|
|
9
|
+
import { selectionScope } from "../agent-ops.js";
|
|
10
|
+
import { createAiSidebarFlow } from "../sidebar-flow.js";
|
|
11
|
+
import { useNotifier } from "../../../react/use-notifier.js";
|
|
12
|
+
import { Alert, AlertTitle } from "../../../react/ui/alert.js";
|
|
13
|
+
import { Input } from "../../../react/ui/input.js";
|
|
14
|
+
import { Textarea } from "../../../react/ui/textarea.js";
|
|
15
|
+
import { ModelQuickSwitch } from "./ModelQuickSwitch.js";
|
|
16
|
+
import { useAiAssistant } from "./use-ai-assistant.js";
|
|
17
|
+
import { Badge } from "../../../react/ui/badge.js";
|
|
18
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../react/ui/tooltip.js";
|
|
19
|
+
import { DocumentChatAnswer } from "./DocumentChatAnswer.js";
|
|
20
|
+
import { DocumentChatOps } from "./DocumentChatOps.js";
|
|
21
|
+
import { useDocumentChat } from "./use-document-chat.js";
|
|
22
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
23
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { useEditorState } from "@tiptap/react";
|
|
25
|
+
//#region src/features/ai/react/AiSidebar.tsx
|
|
26
|
+
const quickActions = blockTasks().filter((task) => !task.caretMenu);
|
|
27
|
+
/**
|
|
28
|
+
* Docked AI sidebar „KI“: a plain `aside` the host places beside the editor (no overlay, no focus trap), so text can be
|
|
29
|
+
* selected and changes reviewed next to it. Document chat: questions about the open document, answers stream in with
|
|
30
|
+
* quote links; edit requests come back as operations shown in the in-document review, limited to the selected blocks
|
|
31
|
+
* while text is selected. Block generation: quick actions (`blockTasks()`) stream their result into the conversation,
|
|
32
|
+
* where „Übernehmen“ inserts it after the caret's block (or at the document's end) and „Verwerfen“ drops it.
|
|
33
|
+
* Unmounting ends both: hosts hide it with `open={false}` (or a class) so the conversation survives closing.
|
|
34
|
+
*/
|
|
35
|
+
function AiSidebar({ editor, open, onOpenChange, className }) {
|
|
36
|
+
const notify = useNotifier(editor);
|
|
37
|
+
const { t } = useEditorI18n();
|
|
38
|
+
const chat = useDocumentChat(editor);
|
|
39
|
+
const assistant = useAiAssistant(editor);
|
|
40
|
+
const { messages, ops, streaming, error } = chat;
|
|
41
|
+
const { status: generationStatus, output, error: generationError } = assistant;
|
|
42
|
+
const [question, setQuestion] = useState("");
|
|
43
|
+
const scroller = useRef(null);
|
|
44
|
+
const scope = useEditorState({
|
|
45
|
+
editor: editor ?? null,
|
|
46
|
+
selector: ({ editor: current }) => current && !current.isDestroyed ? selectionScope(current.state) : null
|
|
47
|
+
});
|
|
48
|
+
const providers = useMemo(() => editor ? conversionsOf(editor) : [], [editor]);
|
|
49
|
+
const latestEditor = useRef(editor);
|
|
50
|
+
latestEditor.current = editor;
|
|
51
|
+
const flow = useMemo(() => createAiSidebarFlow({
|
|
52
|
+
chat: chat.model,
|
|
53
|
+
assistant: assistant.model,
|
|
54
|
+
notify,
|
|
55
|
+
t,
|
|
56
|
+
editor: () => latestEditor.current
|
|
57
|
+
}), [
|
|
58
|
+
chat.model,
|
|
59
|
+
assistant.model,
|
|
60
|
+
notify,
|
|
61
|
+
t
|
|
62
|
+
]);
|
|
63
|
+
/** The task whose inline prompt field is open (tasks with `needsPrompt`, i.e. `generate`); null while closed. */
|
|
64
|
+
const [promptTask, setPromptTask] = useState(null);
|
|
65
|
+
const [prompt, setPrompt] = useState("");
|
|
66
|
+
/** The generation streaming right now (a turn in `messages`); null while none runs. */
|
|
67
|
+
const running = useStore(flow.running);
|
|
68
|
+
const busy = streaming || generationStatus === "streaming";
|
|
69
|
+
async function send() {
|
|
70
|
+
const text = question.trim();
|
|
71
|
+
if (!text || !flow.canRun()) return;
|
|
72
|
+
setQuestion("");
|
|
73
|
+
if (!await flow.send(text)) setQuestion((current) => current || text);
|
|
74
|
+
}
|
|
75
|
+
function clearSelection() {
|
|
76
|
+
if (editor) editor.commands.setTextSelection(editor.state.selection.to);
|
|
77
|
+
}
|
|
78
|
+
function onReveal(op) {
|
|
79
|
+
if (editor && !chat.reveal(editor, op)) notify({
|
|
80
|
+
title: t("ai.sidebar.revealMissing"),
|
|
81
|
+
kind: "warning",
|
|
82
|
+
icon: "i-lucide-search-x"
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function onKeydown(event) {
|
|
86
|
+
if (event.key !== "Enter" || event.shiftKey || event.nativeEvent.isComposing) return;
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
send();
|
|
89
|
+
}
|
|
90
|
+
/** Quick action chip: a task with a prompt opens (or closes) its inline prompt field, the others run right away. */
|
|
91
|
+
function pick(task) {
|
|
92
|
+
if (task.needsPrompt) setPromptTask((current) => current === task ? null : task);
|
|
93
|
+
else flow.generate(task);
|
|
94
|
+
}
|
|
95
|
+
async function submitPrompt() {
|
|
96
|
+
const task = promptTask;
|
|
97
|
+
const text = prompt.trim();
|
|
98
|
+
if (!task || !text || !flow.canRun()) return;
|
|
99
|
+
setPrompt("");
|
|
100
|
+
setPromptTask(null);
|
|
101
|
+
if (!await flow.generate(task, text)) {
|
|
102
|
+
setPrompt((current) => current || text);
|
|
103
|
+
setPromptTask((current) => current ?? task);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function onPromptKeydown(event) {
|
|
107
|
+
if (event.nativeEvent.isComposing) return;
|
|
108
|
+
if (event.key === "Escape") {
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
setPromptTask(null);
|
|
111
|
+
} else if (event.key === "Enter") {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
submitPrompt();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** The streamed result while `generation` runs, else its final Markdown. */
|
|
117
|
+
function generationMarkdown(generation) {
|
|
118
|
+
return generation === running ? output : generation.markdown;
|
|
119
|
+
}
|
|
120
|
+
const last = messages.at(-1);
|
|
121
|
+
const lastOps = last?.role === "assistant" ? last.ops?.length : void 0;
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
scroller.current?.scrollTo({ top: scroller.current.scrollHeight });
|
|
124
|
+
}, [
|
|
125
|
+
messages.length,
|
|
126
|
+
last?.content,
|
|
127
|
+
lastOps,
|
|
128
|
+
output
|
|
129
|
+
]);
|
|
130
|
+
useEffect(() => () => flow.end(), [flow]);
|
|
131
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("aside", {
|
|
132
|
+
className: cn("flex min-h-0 flex-col", className, open === false && "hidden"),
|
|
133
|
+
"aria-label": t("ai.sidebar.label"),
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ jsxs("div", {
|
|
136
|
+
className: "flex flex-col gap-2 border-b border-border p-3",
|
|
137
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
138
|
+
className: "flex items-center gap-2",
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx("h2", {
|
|
141
|
+
className: "font-semibold text-foreground",
|
|
142
|
+
children: t("ai.sidebar.title")
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ jsx(ModelQuickSwitch, {
|
|
145
|
+
slot: "generate",
|
|
146
|
+
size: "xs",
|
|
147
|
+
...editor && { editor },
|
|
148
|
+
className: "min-w-0 flex-1"
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
151
|
+
asChild: true,
|
|
152
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
153
|
+
size: "icon-sm",
|
|
154
|
+
variant: "ghost",
|
|
155
|
+
"aria-label": t("ai.sidebar.newConversation"),
|
|
156
|
+
disabled: !messages.length && !error && !generationError,
|
|
157
|
+
onClick: () => flow.newConversation(),
|
|
158
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-message-square-plus" })
|
|
159
|
+
})
|
|
160
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: t("ai.sidebar.newConversation") })] }),
|
|
161
|
+
/* @__PURE__ */ jsx(Button, {
|
|
162
|
+
size: "icon-sm",
|
|
163
|
+
variant: "ghost",
|
|
164
|
+
"aria-label": t("ai.sidebar.close"),
|
|
165
|
+
onClick: () => onOpenChange?.(false),
|
|
166
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-x" })
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
}), scope && /* @__PURE__ */ jsxs("div", {
|
|
170
|
+
className: "flex items-center gap-1",
|
|
171
|
+
children: [/* @__PURE__ */ jsxs(Badge, {
|
|
172
|
+
variant: "secondary",
|
|
173
|
+
className: "h-auto bg-primary/10 py-0.5 text-primary",
|
|
174
|
+
title: t("ai.sidebar.selection.title"),
|
|
175
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: "i-lucide-text-select" }), t(scope.blocks === 1 ? "ai.sidebar.selection.one" : "ai.sidebar.selection.other", { n: scope.blocks })]
|
|
176
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
177
|
+
size: "icon-xs",
|
|
178
|
+
variant: "ghost",
|
|
179
|
+
"aria-label": t("ai.sidebar.selection.clear"),
|
|
180
|
+
onClick: clearSelection,
|
|
181
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-x" })
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ jsxs("div", {
|
|
186
|
+
ref: scroller,
|
|
187
|
+
className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4",
|
|
188
|
+
children: [
|
|
189
|
+
!messages.length && /* @__PURE__ */ jsx("p", {
|
|
190
|
+
className: "text-sm text-muted-foreground",
|
|
191
|
+
children: t("ai.sidebar.intro")
|
|
192
|
+
}),
|
|
193
|
+
messages.map((message, index) => {
|
|
194
|
+
if (message.role === "user") return /* @__PURE__ */ jsx("div", {
|
|
195
|
+
className: "max-w-[85%] self-end whitespace-pre-wrap rounded-lg bg-muted px-3 py-2 text-sm",
|
|
196
|
+
children: message.content
|
|
197
|
+
}, index);
|
|
198
|
+
const { generation } = message;
|
|
199
|
+
if (generation) {
|
|
200
|
+
const markdown = generationMarkdown(generation);
|
|
201
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
202
|
+
className: "flex flex-col gap-2 rounded-lg border border-border p-3 text-sm",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ jsxs("div", {
|
|
205
|
+
className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground",
|
|
206
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: generation.task.icon }), /* @__PURE__ */ jsx("span", {
|
|
207
|
+
className: "truncate",
|
|
208
|
+
children: t(generation.task.labelKey)
|
|
209
|
+
})]
|
|
210
|
+
}),
|
|
211
|
+
generation.prompt && /* @__PURE__ */ jsx("p", {
|
|
212
|
+
className: "whitespace-pre-wrap text-xs text-muted-foreground",
|
|
213
|
+
children: generation.prompt
|
|
214
|
+
}),
|
|
215
|
+
markdown ? /* @__PURE__ */ jsx(DocumentChatAnswer, {
|
|
216
|
+
markdown: withTaskHeading(generation.task, markdown, t),
|
|
217
|
+
editor
|
|
218
|
+
}) : /* @__PURE__ */ jsx(Icon, {
|
|
219
|
+
name: "i-lucide-loader-circle",
|
|
220
|
+
className: "animate-spin text-muted-foreground"
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ jsx("div", {
|
|
223
|
+
className: "flex justify-end gap-2",
|
|
224
|
+
children: generation === running ? /* @__PURE__ */ jsxs(Button, {
|
|
225
|
+
size: "xs",
|
|
226
|
+
variant: "outline",
|
|
227
|
+
onClick: () => assistant.abort(),
|
|
228
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: "i-lucide-square" }), t("ai.sidebar.stop")]
|
|
229
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
230
|
+
size: "xs",
|
|
231
|
+
variant: "ghost",
|
|
232
|
+
onClick: () => flow.drop(generation),
|
|
233
|
+
children: t("ai.sidebar.discard")
|
|
234
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
235
|
+
size: "xs",
|
|
236
|
+
disabled: !editor || !generation.done,
|
|
237
|
+
onClick: () => flow.apply(generation),
|
|
238
|
+
children: t("ai.sidebar.apply")
|
|
239
|
+
})] })
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
}, index);
|
|
243
|
+
}
|
|
244
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
245
|
+
className: "text-sm",
|
|
246
|
+
children: [message.content && /* @__PURE__ */ jsx(DocumentChatAnswer, {
|
|
247
|
+
markdown: message.content,
|
|
248
|
+
editor
|
|
249
|
+
}), message.ops?.length || message.problems?.length ? /* @__PURE__ */ jsx(DocumentChatOps, {
|
|
250
|
+
ops: message.ops ?? [],
|
|
251
|
+
states: ops,
|
|
252
|
+
...message.problems && { problems: message.problems },
|
|
253
|
+
providers,
|
|
254
|
+
onDecide: (id, accept) => {
|
|
255
|
+
if (editor) chat.decide(editor, id, accept);
|
|
256
|
+
},
|
|
257
|
+
onReveal
|
|
258
|
+
}) : !message.content && /* @__PURE__ */ jsx(Icon, {
|
|
259
|
+
name: "i-lucide-loader-circle",
|
|
260
|
+
className: "animate-spin text-muted-foreground"
|
|
261
|
+
})]
|
|
262
|
+
}, index);
|
|
263
|
+
}),
|
|
264
|
+
error && /* @__PURE__ */ jsx(Alert, {
|
|
265
|
+
variant: "destructive",
|
|
266
|
+
children: /* @__PURE__ */ jsx(AlertTitle, { children: error })
|
|
267
|
+
}),
|
|
268
|
+
generationError && /* @__PURE__ */ jsx(Alert, {
|
|
269
|
+
variant: "destructive",
|
|
270
|
+
children: /* @__PURE__ */ jsx(AlertTitle, { children: generationError })
|
|
271
|
+
})
|
|
272
|
+
]
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ jsxs("div", {
|
|
275
|
+
className: "flex flex-col gap-2 border-t border-border p-3",
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ jsx("div", {
|
|
278
|
+
className: "flex flex-wrap gap-1",
|
|
279
|
+
role: "group",
|
|
280
|
+
"aria-label": t("ai.sidebar.generateGroup"),
|
|
281
|
+
children: quickActions.map((task) => /* @__PURE__ */ jsxs(Button, {
|
|
282
|
+
size: "xs",
|
|
283
|
+
variant: "secondary",
|
|
284
|
+
className: cn(promptTask === task && "text-primary ring-1 ring-primary/40"),
|
|
285
|
+
"aria-pressed": promptTask === task,
|
|
286
|
+
disabled: !editor || busy,
|
|
287
|
+
onClick: () => pick(task),
|
|
288
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: task.icon }), t(task.labelKey)]
|
|
289
|
+
}, task.id))
|
|
290
|
+
}),
|
|
291
|
+
promptTask && /* @__PURE__ */ jsxs("div", {
|
|
292
|
+
className: "flex items-center gap-1",
|
|
293
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
294
|
+
value: prompt,
|
|
295
|
+
autoFocus: true,
|
|
296
|
+
placeholder: promptTask.promptLabelKey && t(promptTask.promptLabelKey),
|
|
297
|
+
maxLength: AI_LIMITS.prompt,
|
|
298
|
+
"aria-label": promptTask.promptLabelKey && t(promptTask.promptLabelKey),
|
|
299
|
+
className: "min-w-0 flex-1",
|
|
300
|
+
onChange: (event) => setPrompt(event.target.value),
|
|
301
|
+
onKeyDown: onPromptKeydown
|
|
302
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
303
|
+
size: "sm",
|
|
304
|
+
disabled: !editor || busy || !prompt.trim(),
|
|
305
|
+
onClick: () => void submitPrompt(),
|
|
306
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: "i-lucide-sparkles" }), t("ai.sidebar.generate")]
|
|
307
|
+
})]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ jsx(Textarea, {
|
|
310
|
+
value: question,
|
|
311
|
+
placeholder: t("ai.sidebar.placeholder"),
|
|
312
|
+
rows: 2,
|
|
313
|
+
maxLength: CHAT_LIMITS.message,
|
|
314
|
+
className: "max-h-36 min-h-0 w-full",
|
|
315
|
+
"aria-label": t("ai.sidebar.messageLabel"),
|
|
316
|
+
onChange: (event) => setQuestion(event.target.value),
|
|
317
|
+
onKeyDown: onKeydown
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ jsx("div", {
|
|
320
|
+
className: "flex justify-end gap-2",
|
|
321
|
+
children: streaming ? /* @__PURE__ */ jsxs(Button, {
|
|
322
|
+
variant: "outline",
|
|
323
|
+
onClick: () => chat.abort(),
|
|
324
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: "i-lucide-square" }), t("ai.sidebar.stop")]
|
|
325
|
+
}) : /* @__PURE__ */ jsxs(Button, {
|
|
326
|
+
disabled: !editor || busy || !question.trim(),
|
|
327
|
+
onClick: () => void send(),
|
|
328
|
+
children: [/* @__PURE__ */ jsx(Icon, { name: "i-lucide-send" }), t("ai.sidebar.send")]
|
|
329
|
+
})
|
|
330
|
+
})
|
|
331
|
+
]
|
|
332
|
+
})
|
|
333
|
+
]
|
|
334
|
+
}) });
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
export { AiSidebar };
|
|
338
|
+
|
|
339
|
+
//# sourceMappingURL=AiSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiSidebar.js","names":[],"sources":["../../../../src/features/ai/react/AiSidebar.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { useEditorState } from '@tiptap/react'\nimport { type KeyboardEvent, useEffect, useMemo, useRef, useState } from 'react'\nimport { conversionsOf } from '../../../core'\nimport { Icon } from '../../../react/Icon'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport { useStore } from '../../../react/use-store'\nimport { Alert, AlertTitle } from '../../../react/ui/alert'\nimport { Badge } from '../../../react/ui/badge'\nimport { Button } from '../../../react/ui/button'\nimport { Input } from '../../../react/ui/input'\nimport { Textarea } from '../../../react/ui/textarea'\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../../react/ui/tooltip'\nimport { cn } from '../../../react/ui/utils'\nimport { selectionScope } from '../agent-ops'\nimport type { DocumentChatGeneration } from '../document-chat-model'\nimport { type AgentOp, AI_LIMITS, type AiTask, blockTasks, CHAT_LIMITS, withTaskHeading } from '../protocol'\nimport { createAiSidebarFlow } from '../sidebar-flow'\nimport { DocumentChatAnswer } from './DocumentChatAnswer'\nimport { DocumentChatOps } from './DocumentChatOps'\nimport { ModelQuickSwitch } from './ModelQuickSwitch'\nimport { useAiAssistant } from './use-ai-assistant'\nimport { useDocumentChat } from './use-document-chat'\nimport { useNotifier } from '../../../react/use-notifier'\n\n// Caret-only tasks (`continue`) stay in the AI menu at the caret, which knows where the text ends.\nconst quickActions = blockTasks().filter(task => !task.caretMenu)\n\n/**\n * Docked AI sidebar „KI“: a plain `aside` the host places beside the editor (no overlay, no focus trap), so text can be\n * selected and changes reviewed next to it. Document chat: questions about the open document, answers stream in with\n * quote links; edit requests come back as operations shown in the in-document review, limited to the selected blocks\n * while text is selected. Block generation: quick actions (`blockTasks()`) stream their result into the conversation,\n * where „Übernehmen“ inserts it after the caret's block (or at the document's end) and „Verwerfen“ drops it.\n * Unmounting ends both: hosts hide it with `open={false}` (or a class) so the conversation survives closing.\n */\nexport function AiSidebar({ editor, open, onOpenChange, className }: {\n editor: Editor | undefined\n /** Hides the sidebar (it stays mounted, so the conversation survives) while false. */\n open?: boolean\n onOpenChange?: (open: boolean) => void\n className?: string\n}) {\n const notify = useNotifier(editor)\n const { t } = useEditorI18n()\n const chat = useDocumentChat(editor)\n const assistant = useAiAssistant(editor)\n const { messages, ops, streaming, error } = chat\n const { status: generationStatus, output, error: generationError } = assistant\n const [question, setQuestion] = useState('')\n const scroller = useRef<HTMLDivElement>(null)\n // The scope follows every selection change of the editor.\n const scope = useEditorState({\n editor: editor ?? null,\n selector: ({ editor: current }) => current && !current.isDestroyed ? selectionScope(current.state) : null,\n })\n const providers = useMemo(() => editor ? conversionsOf(editor) : [], [editor])\n // The latest editor, for the flow's steps that continue after an await.\n const latestEditor = useRef(editor)\n latestEditor.current = editor\n const flow = useMemo(\n () => createAiSidebarFlow({ chat: chat.model, assistant: assistant.model, notify, t, editor: () => latestEditor.current }),\n [chat.model, assistant.model, notify, t],\n )\n\n /** The task whose inline prompt field is open (tasks with `needsPrompt`, i.e. `generate`); null while closed. */\n const [promptTask, setPromptTask] = useState<AiTask | null>(null)\n const [prompt, setPrompt] = useState('')\n /** The generation streaming right now (a turn in `messages`); null while none runs. */\n const running = useStore(flow.running)\n // One request at a time: a failed chat answer removes the last two turns, which must still be its own.\n const busy = streaming || generationStatus === 'streaming'\n\n async function send() {\n const text = question.trim()\n if (!text || !flow.canRun()) return\n setQuestion('')\n const answered = await flow.send(text)\n if (!answered) setQuestion(current => current || text)\n }\n\n function clearSelection() {\n if (editor) editor.commands.setTextSelection(editor.state.selection.to)\n }\n\n function onReveal(op: AgentOp) {\n if (editor && !chat.reveal(editor, op)) {\n notify({ title: t('ai.sidebar.revealMissing'), kind: 'warning', icon: 'i-lucide-search-x' })\n }\n }\n\n function onKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter' || event.shiftKey || event.nativeEvent.isComposing) return\n event.preventDefault()\n void send()\n }\n\n /** Quick action chip: a task with a prompt opens (or closes) its inline prompt field, the others run right away. */\n function pick(task: AiTask) {\n if (task.needsPrompt) setPromptTask(current => current === task ? null : task)\n else void flow.generate(task)\n }\n\n async function submitPrompt() {\n const task = promptTask\n const text = prompt.trim()\n if (!task || !text || !flow.canRun()) return\n setPrompt('')\n setPromptTask(null)\n const kept = await flow.generate(task, text)\n if (!kept) {\n setPrompt(current => current || text)\n setPromptTask(current => current ?? task)\n }\n }\n\n function onPromptKeydown(event: KeyboardEvent) {\n if (event.nativeEvent.isComposing) return\n if (event.key === 'Escape') {\n event.preventDefault()\n setPromptTask(null)\n }\n else if (event.key === 'Enter') {\n event.preventDefault()\n void submitPrompt()\n }\n }\n\n /** The streamed result while `generation` runs, else its final Markdown. */\n function generationMarkdown(generation: DocumentChatGeneration): string {\n return generation === running ? output : generation.markdown\n }\n\n // Follow the conversation while it grows (new messages, streamed answers and generations, proposed edits).\n const last = messages.at(-1)\n const lastOps = last?.role === 'assistant' ? last.ops?.length : undefined\n useEffect(() => {\n scroller.current?.scrollTo({ top: scroller.current.scrollHeight })\n }, [messages.length, last?.content, lastOps, output])\n\n // Unmounting ends both the generation and the chat request (the hooks abort theirs; this also releases the targets).\n useEffect(() => () => flow.end(), [flow])\n\n return (\n <TooltipProvider>\n <aside className={cn('flex min-h-0 flex-col', className, open === false && 'hidden')} aria-label={t('ai.sidebar.label')}>\n <div className=\"flex flex-col gap-2 border-b border-border p-3\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"font-semibold text-foreground\">{t('ai.sidebar.title')}</h2>\n <ModelQuickSwitch slot=\"generate\" size=\"xs\" {...(editor && { editor })} className=\"min-w-0 flex-1\" />\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n size=\"icon-sm\"\n variant=\"ghost\"\n aria-label={t('ai.sidebar.newConversation')}\n disabled={!messages.length && !error && !generationError}\n onClick={() => flow.newConversation()}\n >\n <Icon name=\"i-lucide-message-square-plus\" />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{t('ai.sidebar.newConversation')}</TooltipContent>\n </Tooltip>\n <Button size=\"icon-sm\" variant=\"ghost\" aria-label={t('ai.sidebar.close')} onClick={() => onOpenChange?.(false)}>\n <Icon name=\"i-lucide-x\" />\n </Button>\n </div>\n {scope && (\n <div className=\"flex items-center gap-1\">\n <Badge variant=\"secondary\" className=\"h-auto bg-primary/10 py-0.5 text-primary\" title={t('ai.sidebar.selection.title')}>\n <Icon name=\"i-lucide-text-select\" />\n {t(scope.blocks === 1 ? 'ai.sidebar.selection.one' : 'ai.sidebar.selection.other', { n: scope.blocks })}\n </Badge>\n <Button size=\"icon-xs\" variant=\"ghost\" aria-label={t('ai.sidebar.selection.clear')} onClick={clearSelection}>\n <Icon name=\"i-lucide-x\" />\n </Button>\n </div>\n )}\n </div>\n\n <div ref={scroller} className=\"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4\">\n {!messages.length && (\n <p className=\"text-sm text-muted-foreground\">\n {t('ai.sidebar.intro')}\n </p>\n )}\n {messages.map((message, index) => {\n if (message.role === 'user') {\n return (\n <div key={index} className=\"max-w-[85%] self-end whitespace-pre-wrap rounded-lg bg-muted px-3 py-2 text-sm\">\n {message.content}\n </div>\n )\n }\n const { generation } = message\n if (generation) {\n const markdown = generationMarkdown(generation)\n return (\n <div key={index} className=\"flex flex-col gap-2 rounded-lg border border-border p-3 text-sm\">\n <div className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n <Icon name={generation.task.icon} />\n <span className=\"truncate\">{t(generation.task.labelKey)}</span>\n </div>\n {generation.prompt && <p className=\"whitespace-pre-wrap text-xs text-muted-foreground\">{generation.prompt}</p>}\n {markdown\n ? <DocumentChatAnswer markdown={withTaskHeading(generation.task, markdown, t)} editor={editor} />\n : <Icon name=\"i-lucide-loader-circle\" className=\"animate-spin text-muted-foreground\" />}\n <div className=\"flex justify-end gap-2\">\n {generation === running\n ? (\n <Button size=\"xs\" variant=\"outline\" onClick={() => assistant.abort()}>\n <Icon name=\"i-lucide-square\" />\n {t('ai.sidebar.stop')}\n </Button>\n )\n : (\n <>\n <Button size=\"xs\" variant=\"ghost\" onClick={() => flow.drop(generation)}>{t('ai.sidebar.discard')}</Button>\n <Button size=\"xs\" disabled={!editor || !generation.done} onClick={() => flow.apply(generation)}>{t('ai.sidebar.apply')}</Button>\n </>\n )}\n </div>\n </div>\n )\n }\n return (\n <div key={index} className=\"text-sm\">\n {message.content && <DocumentChatAnswer markdown={message.content} editor={editor} />}\n {message.ops?.length || message.problems?.length\n ? (\n <DocumentChatOps\n ops={message.ops ?? []}\n states={ops}\n {...(message.problems && { problems: message.problems })}\n providers={providers}\n onDecide={(id, accept) => { if (editor) chat.decide(editor, id, accept) }}\n onReveal={onReveal}\n />\n )\n : !message.content && <Icon name=\"i-lucide-loader-circle\" className=\"animate-spin text-muted-foreground\" />}\n </div>\n )\n })}\n {error && <Alert variant=\"destructive\"><AlertTitle>{error}</AlertTitle></Alert>}\n {generationError && <Alert variant=\"destructive\"><AlertTitle>{generationError}</AlertTitle></Alert>}\n </div>\n\n <div className=\"flex flex-col gap-2 border-t border-border p-3\">\n <div className=\"flex flex-wrap gap-1\" role=\"group\" aria-label={t('ai.sidebar.generateGroup')}>\n {quickActions.map(task => (\n <Button\n key={task.id}\n size=\"xs\"\n variant=\"secondary\"\n className={cn(promptTask === task && 'text-primary ring-1 ring-primary/40')}\n aria-pressed={promptTask === task}\n disabled={!editor || busy}\n onClick={() => pick(task)}\n >\n <Icon name={task.icon} />\n {t(task.labelKey)}\n </Button>\n ))}\n </div>\n {promptTask && (\n <div className=\"flex items-center gap-1\">\n <Input\n value={prompt}\n autoFocus\n placeholder={promptTask.promptLabelKey && t(promptTask.promptLabelKey)}\n maxLength={AI_LIMITS.prompt}\n aria-label={promptTask.promptLabelKey && t(promptTask.promptLabelKey)}\n className=\"min-w-0 flex-1\"\n onChange={event => setPrompt(event.target.value)}\n onKeyDown={onPromptKeydown}\n />\n <Button size=\"sm\" disabled={!editor || busy || !prompt.trim()} onClick={() => void submitPrompt()}>\n <Icon name=\"i-lucide-sparkles\" />\n {t('ai.sidebar.generate')}\n </Button>\n </div>\n )}\n <Textarea\n value={question}\n placeholder={t('ai.sidebar.placeholder')}\n rows={2}\n maxLength={CHAT_LIMITS.message}\n className=\"max-h-36 min-h-0 w-full\"\n aria-label={t('ai.sidebar.messageLabel')}\n onChange={event => setQuestion(event.target.value)}\n onKeyDown={onKeydown}\n />\n <div className=\"flex justify-end gap-2\">\n {streaming\n ? (\n <Button variant=\"outline\" onClick={() => chat.abort()}>\n <Icon name=\"i-lucide-square\" />\n {t('ai.sidebar.stop')}\n </Button>\n )\n : (\n <Button disabled={!editor || busy || !question.trim()} onClick={() => void send()}>\n <Icon name=\"i-lucide-send\" />\n {t('ai.sidebar.send')}\n </Button>\n )}\n </div>\n </div>\n </aside>\n </TooltipProvider>\n )\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/features/ai/react/DocumentChatAnswer.d.ts
|
|
3
|
+
/** One chat answer, rendered read-only from Markdown; quote links reveal their block in `editor`. */
|
|
4
|
+
export declare function DocumentChatAnswer({ markdown, editor }: {
|
|
5
|
+
markdown: string;
|
|
6
|
+
/** The document editor the quotes link into. */
|
|
7
|
+
editor: Editor | undefined;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
//# sourceMappingURL=DocumentChatAnswer.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
2
|
+
import { citationBlockId } from "../protocol/chat.js";
|
|
3
|
+
import { documentChatAnswerContent } from "../document-chat.js";
|
|
4
|
+
import { useNotifier } from "../../../react/use-notifier.js";
|
|
5
|
+
import { previewExtensions } from "../preview-extensions.js";
|
|
6
|
+
import { useEffect, useRef, useState } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { EditorContent, useEditor } from "@tiptap/react";
|
|
9
|
+
//#region src/features/ai/react/DocumentChatAnswer.tsx
|
|
10
|
+
/** One chat answer, rendered read-only from Markdown; quote links reveal their block in `editor`. */
|
|
11
|
+
function DocumentChatAnswer({ markdown, editor }) {
|
|
12
|
+
const notify = useNotifier(editor);
|
|
13
|
+
const { t } = useEditorI18n();
|
|
14
|
+
const [extensions] = useState(() => previewExtensions(editor));
|
|
15
|
+
const view = useEditor({
|
|
16
|
+
editable: false,
|
|
17
|
+
extensions,
|
|
18
|
+
immediatelyRender: true,
|
|
19
|
+
shouldRerenderOnTransaction: false,
|
|
20
|
+
editorProps: { attributes: { class: "tiptap" } }
|
|
21
|
+
});
|
|
22
|
+
const latest = useRef({
|
|
23
|
+
view,
|
|
24
|
+
editor,
|
|
25
|
+
markdown
|
|
26
|
+
});
|
|
27
|
+
latest.current = {
|
|
28
|
+
view,
|
|
29
|
+
editor,
|
|
30
|
+
markdown
|
|
31
|
+
};
|
|
32
|
+
const timer = useRef(void 0);
|
|
33
|
+
function render() {
|
|
34
|
+
const { view: instance, editor: source, markdown: text } = latest.current;
|
|
35
|
+
if (!instance || instance.isDestroyed) return;
|
|
36
|
+
instance.commands.setContent(documentChatAnswerContent(source ?? instance, text, source?.state.doc), { emitUpdate: false });
|
|
37
|
+
}
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (timer.current) return;
|
|
40
|
+
timer.current = window.setTimeout(() => {
|
|
41
|
+
timer.current = void 0;
|
|
42
|
+
render();
|
|
43
|
+
}, 80);
|
|
44
|
+
}, [markdown]);
|
|
45
|
+
useEffect(render, [view]);
|
|
46
|
+
useEffect(() => () => {
|
|
47
|
+
clearTimeout(timer.current);
|
|
48
|
+
timer.current = void 0;
|
|
49
|
+
}, []);
|
|
50
|
+
function onClick(event) {
|
|
51
|
+
const link = event.target.closest("a");
|
|
52
|
+
const id = citationBlockId(link?.getAttribute("href"));
|
|
53
|
+
if (id === null) return;
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
if (!editor?.commands.revealBlock(id)) notify({
|
|
56
|
+
title: t("ai.sidebar.revealMissing"),
|
|
57
|
+
kind: "warning",
|
|
58
|
+
icon: "i-lucide-search-x"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: "document-chat-answer",
|
|
63
|
+
onClick,
|
|
64
|
+
children: view && /* @__PURE__ */ jsx(EditorContent, { editor: view })
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { DocumentChatAnswer };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=DocumentChatAnswer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentChatAnswer.js","names":[],"sources":["../../../../src/features/ai/react/DocumentChatAnswer.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { EditorContent, useEditor } from '@tiptap/react'\nimport { type MouseEvent, useEffect, useRef, useState } from 'react'\nimport { documentChatAnswerContent } from '../document-chat'\nimport { previewExtensions } from '../preview-extensions'\nimport { citationBlockId } from '../protocol'\nimport { useNotifier } from '../../../react/use-notifier'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\n\n/** One chat answer, rendered read-only from Markdown; quote links reveal their block in `editor`. */\nexport function DocumentChatAnswer({ markdown, editor }: {\n markdown: string\n /** The document editor the quotes link into. */\n editor: Editor | undefined\n}) {\n const notify = useNotifier(editor)\n const { t } = useEditorI18n()\n const [extensions] = useState(() => previewExtensions(editor))\n const view = useEditor({\n editable: false,\n extensions,\n immediatelyRender: true,\n shouldRerenderOnTransaction: false,\n editorProps: { attributes: { class: 'tiptap' } },\n })\n\n const latest = useRef({ view, editor, markdown })\n latest.current = { view, editor, markdown }\n const timer = useRef<number | undefined>(undefined)\n\n function render() {\n const { view: instance, editor: source, markdown: text } = latest.current\n if (!instance || instance.isDestroyed) return\n instance.commands.setContent(documentChatAnswerContent(source ?? instance, text, source?.state.doc), { emitUpdate: false })\n }\n\n // Streamed deltas: re-parse at most every 80 ms.\n useEffect(() => {\n if (timer.current) return\n timer.current = window.setTimeout(() => {\n timer.current = undefined\n render()\n }, 80)\n }, [markdown])\n useEffect(render, [view])\n useEffect(() => () => {\n clearTimeout(timer.current)\n // StrictMode runs the cleanup once right after mount; a stale id would block every later render.\n timer.current = undefined\n }, [])\n\n function onClick(event: MouseEvent) {\n const link = (event.target as HTMLElement).closest('a')\n const id = citationBlockId(link?.getAttribute('href'))\n if (id === null) return\n event.preventDefault()\n if (!editor?.commands.revealBlock(id)) {\n notify({ title: t('ai.sidebar.revealMissing'), kind: 'warning', icon: 'i-lucide-search-x' })\n }\n }\n\n return (\n <div className=\"document-chat-answer\" onClick={onClick}>\n {view && <EditorContent editor={view} />}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAUA,SAAgB,mBAAmB,EAAE,UAAU,UAI5C;CACD,MAAM,SAAS,YAAY,MAAM;CACjC,MAAM,EAAE,MAAM,cAAc;CAC5B,MAAM,CAAC,cAAc,eAAe,kBAAkB,MAAM,CAAC;CAC7D,MAAM,OAAO,UAAU;EACrB,UAAU;EACV;EACA,mBAAmB;EACnB,6BAA6B;EAC7B,aAAa,EAAE,YAAY,EAAE,OAAO,SAAS,EAAE;CACjD,CAAC;CAED,MAAM,SAAS,OAAO;EAAE;EAAM;EAAQ;CAAS,CAAC;CAChD,OAAO,UAAU;EAAE;EAAM;EAAQ;CAAS;CAC1C,MAAM,QAAQ,OAA2B,KAAA,CAAS;CAElD,SAAS,SAAS;EAChB,MAAM,EAAE,MAAM,UAAU,QAAQ,QAAQ,UAAU,SAAS,OAAO;EAClE,IAAI,CAAC,YAAY,SAAS,aAAa;EACvC,SAAS,SAAS,WAAW,0BAA0B,UAAU,UAAU,MAAM,QAAQ,MAAM,GAAG,GAAG,EAAE,YAAY,MAAM,CAAC;CAC5H;CAGA,gBAAgB;EACd,IAAI,MAAM,SAAS;EACnB,MAAM,UAAU,OAAO,iBAAiB;GACtC,MAAM,UAAU,KAAA;GAChB,OAAO;EACT,GAAG,EAAE;CACP,GAAG,CAAC,QAAQ,CAAC;CACb,UAAU,QAAQ,CAAC,IAAI,CAAC;CACxB,sBAAsB;EACpB,aAAa,MAAM,OAAO;EAE1B,MAAM,UAAU,KAAA;CAClB,GAAG,CAAC,CAAC;CAEL,SAAS,QAAQ,OAAmB;EAClC,MAAM,OAAQ,MAAM,OAAuB,QAAQ,GAAG;EACtD,MAAM,KAAK,gBAAgB,MAAM,aAAa,MAAM,CAAC;EACrD,IAAI,OAAO,MAAM;EACjB,MAAM,eAAe;EACrB,IAAI,CAAC,QAAQ,SAAS,YAAY,EAAE,GAClC,OAAO;GAAE,OAAO,EAAE,0BAA0B;GAAG,MAAM;GAAW,MAAM;EAAoB,CAAC;CAE/F;CAEA,OACE,oBAAC,OAAD;EAAK,WAAU;EAAgC;EAC5C,UAAA,QAAQ,oBAAC,eAAD,EAAe,QAAQ,KAAO,CAAA;CACpC,CAAA;AAET"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConversionProvider } from "../../../core/feature.js";
|
|
2
|
+
import "../../../core/index.js";
|
|
3
|
+
import { AgentOp, AgentOpProblem } from "../protocol/agent-ops.js";
|
|
4
|
+
import "../protocol/index.js";
|
|
5
|
+
import { AgentOpState } from "../agent-op-review.js";
|
|
6
|
+
//#region src/features/ai/react/DocumentChatOps.d.ts
|
|
7
|
+
/** The edit operations of one chat answer with their review state; open ones can be decided right here. */
|
|
8
|
+
export declare function DocumentChatOps({ ops, states, problems, providers, onDecide, onReveal }: {
|
|
9
|
+
ops: AgentOp[];
|
|
10
|
+
states: Readonly<Record<string, AgentOpState>>;
|
|
11
|
+
/** Operations the server dropped (invalid block IDs after the retries). */
|
|
12
|
+
problems?: AgentOpProblem[];
|
|
13
|
+
/** The editor's conversion providers, to name `convert` targets. */
|
|
14
|
+
providers: readonly ConversionProvider[];
|
|
15
|
+
onDecide: (id: string, accept: boolean) => void;
|
|
16
|
+
onReveal: (op: AgentOp) => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=DocumentChatOps.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { conversionLabel, parseConversionTarget } from "../../../core/block-convert.js";
|
|
2
|
+
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
3
|
+
import { cn } from "../../../react/ui/utils.js";
|
|
4
|
+
import { Icon } from "../../../react/Icon.js";
|
|
5
|
+
import { Button } from "../../../react/ui/button.js";
|
|
6
|
+
import { AGENT_OP_OUTCOME_KEYS } from "../agent-ops.js";
|
|
7
|
+
import { Alert, AlertDescription, AlertTitle } from "../../../react/ui/alert.js";
|
|
8
|
+
import { Badge } from "../../../react/ui/badge.js";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/features/ai/react/DocumentChatOps.tsx
|
|
11
|
+
const ICONS = {
|
|
12
|
+
add: "i-lucide-plus",
|
|
13
|
+
update: "i-lucide-pencil",
|
|
14
|
+
delete: "i-lucide-trash-2",
|
|
15
|
+
convert: "i-lucide-replace"
|
|
16
|
+
};
|
|
17
|
+
const BADGE_TONES = {
|
|
18
|
+
pending: "primary",
|
|
19
|
+
accepted: "success",
|
|
20
|
+
rejected: "neutral",
|
|
21
|
+
partial: "info",
|
|
22
|
+
invalid: "warning",
|
|
23
|
+
unchanged: "neutral",
|
|
24
|
+
missing: "warning",
|
|
25
|
+
overlap: "warning",
|
|
26
|
+
empty: "warning",
|
|
27
|
+
blocked: "warning"
|
|
28
|
+
};
|
|
29
|
+
/** The „subtle“ look of Nuxt UI's badge per color, on the vendored badge. */
|
|
30
|
+
const TONE_CLASS = {
|
|
31
|
+
primary: "bg-primary/10 text-primary",
|
|
32
|
+
success: "bg-green-500/10 text-green-600 dark:text-green-400",
|
|
33
|
+
neutral: "bg-muted text-muted-foreground",
|
|
34
|
+
warning: "bg-amber-500/10 text-amber-600 dark:text-amber-400",
|
|
35
|
+
info: "bg-sky-500/10 text-sky-600 dark:text-sky-400"
|
|
36
|
+
};
|
|
37
|
+
/** The edit operations of one chat answer with their review state; open ones can be decided right here. */
|
|
38
|
+
function DocumentChatOps({ ops, states, problems, providers, onDecide, onReveal }) {
|
|
39
|
+
const { t } = useEditorI18n();
|
|
40
|
+
function label(op, snippet) {
|
|
41
|
+
if (op.type === "add") return op.afterId === null ? t("ai.op.addAtStart") : t("ai.op.addAfter", { snippet });
|
|
42
|
+
if (op.type === "convert") {
|
|
43
|
+
const target = parseConversionTarget(providers, op.to);
|
|
44
|
+
return t("ai.op.convert", {
|
|
45
|
+
target: target ? conversionLabel(providers, target, t).label : op.to,
|
|
46
|
+
snippet
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return t(op.type === "update" ? "ai.op.update" : "ai.op.delete", { snippet });
|
|
50
|
+
}
|
|
51
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "mt-2 flex flex-col gap-1",
|
|
53
|
+
children: [ops.map((op) => {
|
|
54
|
+
const state = states[op.op];
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: "flex items-center gap-2 rounded-md border border-border px-2 py-1",
|
|
57
|
+
"data-agent-op": op.op,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
60
|
+
name: ICONS[op.type],
|
|
61
|
+
className: "text-muted-foreground"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
className: "min-w-0 flex-1 truncate text-left text-xs hover:underline",
|
|
66
|
+
title: "markdown" in op ? op.markdown : void 0,
|
|
67
|
+
onClick: () => onReveal(op),
|
|
68
|
+
children: label(op, state?.snippet ?? "")
|
|
69
|
+
}),
|
|
70
|
+
state && /* @__PURE__ */ jsx(Badge, {
|
|
71
|
+
variant: "secondary",
|
|
72
|
+
className: cn("h-auto py-px", TONE_CLASS[BADGE_TONES[state.outcome]]),
|
|
73
|
+
title: t(AGENT_OP_OUTCOME_KEYS[state.outcome].hover),
|
|
74
|
+
children: t(AGENT_OP_OUTCOME_KEYS[state.outcome].badge)
|
|
75
|
+
}),
|
|
76
|
+
state?.outcome === "pending" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
77
|
+
size: "icon-xs",
|
|
78
|
+
variant: "ghost",
|
|
79
|
+
"aria-label": t("ai.op.discard"),
|
|
80
|
+
onClick: () => onDecide(op.op, false),
|
|
81
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-x" })
|
|
82
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
83
|
+
size: "icon-xs",
|
|
84
|
+
variant: "ghost",
|
|
85
|
+
className: "text-green-600 dark:text-green-400",
|
|
86
|
+
"aria-label": t("ai.op.accept"),
|
|
87
|
+
onClick: () => onDecide(op.op, true),
|
|
88
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-check" })
|
|
89
|
+
})] })
|
|
90
|
+
]
|
|
91
|
+
}, op.op);
|
|
92
|
+
}), problems?.length ? /* @__PURE__ */ jsxs(Alert, {
|
|
93
|
+
className: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsx(Icon, { name: "i-lucide-triangle-alert" }),
|
|
96
|
+
/* @__PURE__ */ jsx(AlertTitle, {
|
|
97
|
+
className: "text-xs",
|
|
98
|
+
children: problems.length === 1 ? t("ai.op.problems.one") : t("ai.op.problems.other", { n: problems.length })
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ jsx(AlertDescription, {
|
|
101
|
+
className: "text-xs",
|
|
102
|
+
children: t("ai.op.problems.description")
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}) : null]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { DocumentChatOps };
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=DocumentChatOps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentChatOps.js","names":[],"sources":["../../../../src/features/ai/react/DocumentChatOps.tsx"],"sourcesContent":["import { type ConversionProvider, conversionLabel, parseConversionTarget } from '../../../core'\nimport { Icon } from '../../../react/Icon'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport { Alert, AlertDescription, AlertTitle } from '../../../react/ui/alert'\nimport { Badge } from '../../../react/ui/badge'\nimport { Button } from '../../../react/ui/button'\nimport { cn } from '../../../react/ui/utils'\nimport type { AgentOpState } from '../agent-op-review'\nimport { AGENT_OP_OUTCOME_KEYS } from '../agent-ops'\nimport type { AgentOp, AgentOpOutcome, AgentOpProblem } from '../protocol'\n\nconst ICONS: Record<AgentOp['type'], string> = { add: 'i-lucide-plus', update: 'i-lucide-pencil', delete: 'i-lucide-trash-2', convert: 'i-lucide-replace' }\n\ntype BadgeTone = 'primary' | 'success' | 'neutral' | 'warning' | 'info'\n\nconst BADGE_TONES: Record<AgentOpOutcome, BadgeTone> = {\n pending: 'primary',\n accepted: 'success',\n rejected: 'neutral',\n partial: 'info',\n invalid: 'warning',\n unchanged: 'neutral',\n missing: 'warning',\n overlap: 'warning',\n empty: 'warning',\n blocked: 'warning',\n}\n\n/** The „subtle“ look of Nuxt UI's badge per color, on the vendored badge. */\nconst TONE_CLASS: Record<BadgeTone, string> = {\n primary: 'bg-primary/10 text-primary',\n success: 'bg-green-500/10 text-green-600 dark:text-green-400',\n neutral: 'bg-muted text-muted-foreground',\n warning: 'bg-amber-500/10 text-amber-600 dark:text-amber-400',\n info: 'bg-sky-500/10 text-sky-600 dark:text-sky-400',\n}\n\n/** The edit operations of one chat answer with their review state; open ones can be decided right here. */\nexport function DocumentChatOps({ ops, states, problems, providers, onDecide, onReveal }: {\n ops: AgentOp[]\n states: Readonly<Record<string, AgentOpState>>\n /** Operations the server dropped (invalid block IDs after the retries). */\n problems?: AgentOpProblem[]\n /** The editor's conversion providers, to name `convert` targets. */\n providers: readonly ConversionProvider[]\n onDecide: (id: string, accept: boolean) => void\n onReveal: (op: AgentOp) => void\n}) {\n const { t } = useEditorI18n()\n\n function label(op: AgentOp, snippet: string): string {\n if (op.type === 'add') return op.afterId === null ? t('ai.op.addAtStart') : t('ai.op.addAfter', { snippet })\n if (op.type === 'convert') {\n const target = parseConversionTarget(providers, op.to)\n return t('ai.op.convert', { target: target ? conversionLabel(providers, target, t).label : op.to, snippet })\n }\n return t(op.type === 'update' ? 'ai.op.update' : 'ai.op.delete', { snippet })\n }\n\n return (\n <div className=\"mt-2 flex flex-col gap-1\">\n {ops.map((op) => {\n const state = states[op.op]\n return (\n <div key={op.op} className=\"flex items-center gap-2 rounded-md border border-border px-2 py-1\" data-agent-op={op.op}>\n <Icon name={ICONS[op.type]} className=\"text-muted-foreground\" />\n <button\n type=\"button\"\n className=\"min-w-0 flex-1 truncate text-left text-xs hover:underline\"\n title={'markdown' in op ? op.markdown : undefined}\n onClick={() => onReveal(op)}\n >\n {label(op, state?.snippet ?? '')}\n </button>\n {state && (\n <Badge variant=\"secondary\" className={cn('h-auto py-px', TONE_CLASS[BADGE_TONES[state.outcome]])} title={t(AGENT_OP_OUTCOME_KEYS[state.outcome].hover)}>\n {t(AGENT_OP_OUTCOME_KEYS[state.outcome].badge)}\n </Badge>\n )}\n {state?.outcome === 'pending' && (\n <>\n <Button size=\"icon-xs\" variant=\"ghost\" aria-label={t('ai.op.discard')} onClick={() => onDecide(op.op, false)}>\n <Icon name=\"i-lucide-x\" />\n </Button>\n <Button size=\"icon-xs\" variant=\"ghost\" className=\"text-green-600 dark:text-green-400\" aria-label={t('ai.op.accept')} onClick={() => onDecide(op.op, true)}>\n <Icon name=\"i-lucide-check\" />\n </Button>\n </>\n )}\n </div>\n )\n })}\n {problems?.length\n ? (\n <Alert className=\"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300\">\n <Icon name=\"i-lucide-triangle-alert\" />\n <AlertTitle className=\"text-xs\">{problems.length === 1 ? t('ai.op.problems.one') : t('ai.op.problems.other', { n: problems.length })}</AlertTitle>\n <AlertDescription className=\"text-xs\">{t('ai.op.problems.description')}</AlertDescription>\n </Alert>\n )\n : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAM,QAAyC;CAAE,KAAK;CAAiB,QAAQ;CAAmB,QAAQ;CAAoB,SAAS;AAAmB;AAI1J,MAAM,cAAiD;CACrD,SAAS;CACT,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;CACT,WAAW;CACX,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAGA,MAAM,aAAwC;CAC5C,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,MAAM;AACR;;AAGA,SAAgB,gBAAgB,EAAE,KAAK,QAAQ,UAAU,WAAW,UAAU,YAS3E;CACD,MAAM,EAAE,MAAM,cAAc;CAE5B,SAAS,MAAM,IAAa,SAAyB;EACnD,IAAI,GAAG,SAAS,OAAO,OAAO,GAAG,YAAY,OAAO,EAAE,kBAAkB,IAAI,EAAE,kBAAkB,EAAE,QAAQ,CAAC;EAC3G,IAAI,GAAG,SAAS,WAAW;GACzB,MAAM,SAAS,sBAAsB,WAAW,GAAG,EAAE;GACrD,OAAO,EAAE,iBAAiB;IAAE,QAAQ,SAAS,gBAAgB,WAAW,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAG;IAAI;GAAQ,CAAC;EAC7G;EACA,OAAO,EAAE,GAAG,SAAS,WAAW,iBAAiB,gBAAgB,EAAE,QAAQ,CAAC;CAC9E;CAEA,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,IAAI,KAAK,OAAO;GACf,MAAM,QAAQ,OAAO,GAAG;GACxB,OACE,qBAAC,OAAD;IAAiB,WAAU;IAAoE,iBAAe,GAAG;IAAjH,UAAA;KACE,oBAAC,MAAD;MAAM,MAAM,MAAM,GAAG;MAAO,WAAU;KAAyB,CAAA;KAC/D,oBAAC,UAAD;MACE,MAAK;MACL,WAAU;MACV,OAAO,cAAc,KAAK,GAAG,WAAW,KAAA;MACxC,eAAe,SAAS,EAAE;MAEzB,UAAA,MAAM,IAAI,OAAO,WAAW,EAAE;KACzB,CAAA;KACP,SACC,oBAAC,OAAD;MAAO,SAAQ;MAAY,WAAW,GAAG,gBAAgB,WAAW,YAAY,MAAM,SAAS;MAAG,OAAO,EAAE,sBAAsB,MAAM,QAAQ,CAAC,KAAK;MAClJ,UAAA,EAAE,sBAAsB,MAAM,QAAQ,CAAC,KAAK;KACxC,CAAA;KAER,OAAO,YAAY,aAClB,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;MAAQ,MAAK;MAAU,SAAQ;MAAQ,cAAY,EAAE,eAAe;MAAG,eAAe,SAAS,GAAG,IAAI,KAAK;MACzG,UAAA,oBAAC,MAAD,EAAM,MAAK,aAAc,CAAA;KACnB,CAAA,GACR,oBAAC,QAAD;MAAQ,MAAK;MAAU,SAAQ;MAAQ,WAAU;MAAqC,cAAY,EAAE,cAAc;MAAG,eAAe,SAAS,GAAG,IAAI,IAAI;MACtJ,UAAA,oBAAC,MAAD,EAAM,MAAK,iBAAkB,CAAA;KACvB,CAAA,CACR,EAAA,CAAA;IAED;GAzBK,GAAA,GAAG,EAyBR;EAET,CAAC,GACA,UAAU,SAEL,qBAAC,OAAD;GAAO,WAAU;GAAjB,UAAA;IACE,oBAAC,MAAD,EAAM,MAAK,0BAA2B,CAAA;IACtC,oBAAC,YAAD;KAAY,WAAU;KAAW,UAAA,SAAS,WAAW,IAAI,EAAE,oBAAoB,IAAI,EAAE,wBAAwB,EAAE,GAAG,SAAS,OAAO,CAAC;IAAc,CAAA;IACjJ,oBAAC,kBAAD;KAAkB,WAAU;KAAW,UAAA,EAAE,4BAA4B;IAAoB,CAAA;GACpF;EAET,CAAA,IAAA,IACD;;AAET"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModelSlot } from "../../../settings/values.js";
|
|
2
|
+
import "../../../settings/index.js";
|
|
3
|
+
import { Editor } from "@tiptap/core";
|
|
4
|
+
//#region src/features/ai/react/ModelQuickSwitch.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Model profile an AI slot runs on. A quick switch *is* the slot setting (`settings.ai.slots[slot]`): the choice applies
|
|
7
|
+
* to every feature of the slot, not just to the surrounding dialog. The trailing „Modelle verwalten…“ opens the
|
|
8
|
+
* settings on the „KI“ tab. Inside an editor surface the chrome comes from its context; mounted beside one, pass its
|
|
9
|
+
* `editor`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ModelQuickSwitch({ slot, size, editor, className }: {
|
|
12
|
+
slot: ModelSlot;
|
|
13
|
+
size?: 'xs' | 'sm';
|
|
14
|
+
/** The editor whose settings modal „Modelle verwalten…“ opens, when not mounted inside its editor surface. */
|
|
15
|
+
editor?: Editor;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=ModelQuickSwitch.d.ts.map
|