@ecsplico/editor 0.0.0-stage → 1.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/LICENSE +21 -0
- package/README.md +233 -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 +11 -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 +503 -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 +11 -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 +68 -0
- package/dist/nuxt/module.js +103 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/install-context.d.ts +17 -0
- package/dist/nuxt/runtime/install-context.js +26 -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/plugins/editor-context-primevue.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 +41 -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/primevue/Alert.js +49 -0
- package/dist/vue/kit/primevue/Alert.js.map +1 -0
- package/dist/vue/kit/primevue/Avatar.js +54 -0
- package/dist/vue/kit/primevue/Avatar.js.map +1 -0
- package/dist/vue/kit/primevue/Badge.js +41 -0
- package/dist/vue/kit/primevue/Badge.js.map +1 -0
- package/dist/vue/kit/primevue/Button.js +112 -0
- package/dist/vue/kit/primevue/Button.js.map +1 -0
- package/dist/vue/kit/primevue/Chip.js +38 -0
- package/dist/vue/kit/primevue/Chip.js.map +1 -0
- package/dist/vue/kit/primevue/DropdownMenu.js +98 -0
- package/dist/vue/kit/primevue/DropdownMenu.js.map +1 -0
- package/dist/vue/kit/primevue/FieldGroup.js +22 -0
- package/dist/vue/kit/primevue/FieldGroup.js.map +1 -0
- package/dist/vue/kit/primevue/FormField.js +56 -0
- package/dist/vue/kit/primevue/FormField.js.map +1 -0
- package/dist/vue/kit/primevue/Icon.js +23 -0
- package/dist/vue/kit/primevue/Icon.js.map +1 -0
- package/dist/vue/kit/primevue/Input.js +96 -0
- package/dist/vue/kit/primevue/Input.js.map +1 -0
- package/dist/vue/kit/primevue/InputMenu.js +122 -0
- package/dist/vue/kit/primevue/InputMenu.js.map +1 -0
- package/dist/vue/kit/primevue/Modal.js +59 -0
- package/dist/vue/kit/primevue/Modal.js.map +1 -0
- package/dist/vue/kit/primevue/Popover.js +135 -0
- package/dist/vue/kit/primevue/Popover.js.map +1 -0
- package/dist/vue/kit/primevue/RadioGroup.js +58 -0
- package/dist/vue/kit/primevue/RadioGroup.js.map +1 -0
- package/dist/vue/kit/primevue/Select.js +68 -0
- package/dist/vue/kit/primevue/Select.js.map +1 -0
- package/dist/vue/kit/primevue/SelectMenu.js +94 -0
- package/dist/vue/kit/primevue/SelectMenu.js.map +1 -0
- package/dist/vue/kit/primevue/Separator.js +16 -0
- package/dist/vue/kit/primevue/Separator.js.map +1 -0
- package/dist/vue/kit/primevue/Switch.js +46 -0
- package/dist/vue/kit/primevue/Switch.js.map +1 -0
- package/dist/vue/kit/primevue/Table.js +54 -0
- package/dist/vue/kit/primevue/Table.js.map +1 -0
- package/dist/vue/kit/primevue/Tabs.js +49 -0
- package/dist/vue/kit/primevue/Tabs.js.map +1 -0
- package/dist/vue/kit/primevue/Textarea.js +55 -0
- package/dist/vue/kit/primevue/Textarea.js.map +1 -0
- package/dist/vue/kit/primevue/Tooltip.js +43 -0
- package/dist/vue/kit/primevue/Tooltip.js.map +1 -0
- package/dist/vue/kit/primevue/Tree.js +75 -0
- package/dist/vue/kit/primevue/Tree.js.map +1 -0
- package/dist/vue/kit/primevue/select-options.js +55 -0
- package/dist/vue/kit/primevue/select-options.js.map +1 -0
- package/dist/vue/kit/primevue/shared.js +49 -0
- package/dist/vue/kit/primevue/shared.js.map +1 -0
- package/dist/vue/kit/primevue/trigger.js +25 -0
- package/dist/vue/kit/primevue/trigger.js.map +1 -0
- package/dist/vue/kit/primevue.css +86 -0
- package/dist/vue/kit/primevue.d.ts +33 -0
- package/dist/vue/kit/primevue.js +96 -0
- package/dist/vue/kit/primevue.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 +634 -4
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import "../../core/schema/block-ids.js";
|
|
2
|
+
import { parseBlocks, structureBlocks } from "../../core/pipeline.js";
|
|
3
|
+
import { anchorResolverOf, captureRange, docAnchorsKey, resolveRange } from "../../core/doc-anchors.js";
|
|
4
|
+
import { inlineReplacement, replaceRangeWithBlocks } from "./ai-apply.js";
|
|
5
|
+
import { Extension } from "@tiptap/core";
|
|
6
|
+
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
7
|
+
import { DOMSerializer, Fragment } from "@tiptap/pm/model";
|
|
8
|
+
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
9
|
+
import { closeHistory } from "@tiptap/pm/history";
|
|
10
|
+
//#region src/features/ai/ai-review.ts
|
|
11
|
+
const aiReviewKey = new PluginKey("aiReview");
|
|
12
|
+
/** LCS table cells per textblock diff; beyond, the differing middle becomes one hunk. */
|
|
13
|
+
const MAX_DIFF_CELLS = 4e6;
|
|
14
|
+
/** Words, whitespace runs, single other characters (punctuation). */
|
|
15
|
+
const TOKEN = /\s+|[\p{L}\p{N}_]+|[^\s\p{L}\p{N}_]/gu;
|
|
16
|
+
/** Callbacks of running reviews, per editor view. */
|
|
17
|
+
const reviews = /* @__PURE__ */ new WeakMap();
|
|
18
|
+
let reviewCount = 0;
|
|
19
|
+
/**
|
|
20
|
+
* In-document review of AI rewrites: the difference between a range and its proposed replacement shows as local
|
|
21
|
+
* decorations only (red strike = deletion, green widget = insertion), so collaborators never see unaccepted text.
|
|
22
|
+
* Accepting writes the accepted hunks in one transaction (one undo step); rejecting only drops decorations.
|
|
23
|
+
* Client-only, not part of `schemaExtensions()`. Driven by `startAiReview`, `acceptAiReview`, `rejectAiReview`;
|
|
24
|
+
* AiReviewBar shows the controls.
|
|
25
|
+
*/
|
|
26
|
+
const AiReview = Extension.create({
|
|
27
|
+
name: "aiReview",
|
|
28
|
+
addProseMirrorPlugins() {
|
|
29
|
+
return [new Plugin({
|
|
30
|
+
key: aiReviewKey,
|
|
31
|
+
state: {
|
|
32
|
+
init: () => ({
|
|
33
|
+
hunks: [],
|
|
34
|
+
active: null,
|
|
35
|
+
log: [],
|
|
36
|
+
logEnd: 0,
|
|
37
|
+
decorations: DecorationSet.empty
|
|
38
|
+
}),
|
|
39
|
+
apply: applyReview
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
decorations: (state) => aiReviewKey.getState(state)?.decorations,
|
|
43
|
+
handleDOMEvents: { mousedown(view, event) {
|
|
44
|
+
const review = aiReviewKey.getState(view.state);
|
|
45
|
+
if (!review?.hunks.length) return false;
|
|
46
|
+
const id = (event.target instanceof Element ? event.target : event.target?.parentElement)?.closest("[data-ai-hunk]")?.getAttribute("data-ai-hunk") ?? null;
|
|
47
|
+
if (id !== review.active) setActiveAiReviewHunk(view, id);
|
|
48
|
+
return false;
|
|
49
|
+
} }
|
|
50
|
+
},
|
|
51
|
+
view(view) {
|
|
52
|
+
let seen = aiReviewKey.getState(view.state).logEnd;
|
|
53
|
+
return {
|
|
54
|
+
update(_view, prevState) {
|
|
55
|
+
const review = aiReviewKey.getState(view.state);
|
|
56
|
+
if (review.logEnd !== seen) {
|
|
57
|
+
const count = review.logEnd - seen;
|
|
58
|
+
seen = review.logEnd;
|
|
59
|
+
const anchors = docAnchorsKey.getState(view.state);
|
|
60
|
+
const kept = new Set(review.hunks.map((h) => h.anchor.id));
|
|
61
|
+
const stale = aiReviewKey.getState(prevState).hunks.filter((h) => !kept.has(h.anchor.id) && anchors?.has(h.anchor.id)).map((h) => h.anchor.id);
|
|
62
|
+
queueMicrotask(() => {
|
|
63
|
+
if (stale.length && !view.isDestroyed) view.dispatch(view.state.tr.setMeta(docAnchorsKey, { remove: stale }).setMeta("addToHistory", false));
|
|
64
|
+
report(view, review.log.slice(-Math.min(count, review.log.length)));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
destroy() {
|
|
69
|
+
reviews.delete(view);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
})];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Opens a review of `changes` (independent, non-overlapping ranges; several reviews may be pending at once). A
|
|
78
|
+
* replacement becomes word-level hunks per textblock when the result has the range's block structure, otherwise one
|
|
79
|
+
* block-level hunk; an insertion or deletion is one hunk. Changes that cannot be reviewed are returned as `skipped`.
|
|
80
|
+
*/
|
|
81
|
+
function startAiReview(editor, changes, options = {}) {
|
|
82
|
+
const { state, view } = editor;
|
|
83
|
+
const pending = aiReviewKey.getState(state);
|
|
84
|
+
if (!pending) throw new Error("startAiReview needs the AiReview extension");
|
|
85
|
+
const reviewId = `ai-review-${++reviewCount}`;
|
|
86
|
+
const hunks = [];
|
|
87
|
+
const skipped = [];
|
|
88
|
+
const taken = pending.hunks.map(({ from, to, kind }) => ({
|
|
89
|
+
from,
|
|
90
|
+
to,
|
|
91
|
+
point: kind === "insert"
|
|
92
|
+
}));
|
|
93
|
+
const collides = (range) => taken.some((t) => {
|
|
94
|
+
if (t.point && range.point) return false;
|
|
95
|
+
if (t.point) return range.from < t.from && t.from < range.to;
|
|
96
|
+
if (range.point) return t.from < range.from && range.from < t.to;
|
|
97
|
+
return t.from <= range.to && range.from <= t.to;
|
|
98
|
+
});
|
|
99
|
+
const tallies = /* @__PURE__ */ new Map();
|
|
100
|
+
for (const change of changes) {
|
|
101
|
+
const point = change.kind === "insert";
|
|
102
|
+
const resolved = resolveRange(state, change.kind === "insert" ? change.at : change.range);
|
|
103
|
+
if (!resolved || (point ? resolved.from !== resolved.to : resolved.from >= resolved.to)) {
|
|
104
|
+
skipped.push({
|
|
105
|
+
id: change.id,
|
|
106
|
+
reason: "missing"
|
|
107
|
+
});
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const range = {
|
|
111
|
+
...resolved,
|
|
112
|
+
point
|
|
113
|
+
};
|
|
114
|
+
if (collides(range)) {
|
|
115
|
+
skipped.push({
|
|
116
|
+
id: change.id,
|
|
117
|
+
reason: "overlap"
|
|
118
|
+
});
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const planned = change.kind === "insert" ? planInsert(editor, range.from, change.markdown) : change.kind === "delete" ? planDelete(state.doc, range.from, range.to) : change.kind === "blocks" ? [{
|
|
122
|
+
kind: "block",
|
|
123
|
+
from: range.from,
|
|
124
|
+
to: range.to,
|
|
125
|
+
insert: change.blocks
|
|
126
|
+
}] : planChange(editor, range.from, range.to, change.markdown);
|
|
127
|
+
if (typeof planned === "string") {
|
|
128
|
+
skipped.push({
|
|
129
|
+
id: change.id,
|
|
130
|
+
reason: planned
|
|
131
|
+
});
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
taken.push(range);
|
|
135
|
+
tallies.set(change.id, {
|
|
136
|
+
accepted: 0,
|
|
137
|
+
rejected: 0,
|
|
138
|
+
invalid: 0
|
|
139
|
+
});
|
|
140
|
+
for (const { kind, from, to, insert } of planned) {
|
|
141
|
+
const base = {
|
|
142
|
+
id: `${reviewId}-${hunks.length}`,
|
|
143
|
+
reviewId,
|
|
144
|
+
changeId: change.id,
|
|
145
|
+
from,
|
|
146
|
+
to,
|
|
147
|
+
insert,
|
|
148
|
+
anchor: captureRange(editor, {
|
|
149
|
+
from,
|
|
150
|
+
to
|
|
151
|
+
}, { startInside: from !== to })
|
|
152
|
+
};
|
|
153
|
+
if (kind === "block") {
|
|
154
|
+
hunks.push({
|
|
155
|
+
...base,
|
|
156
|
+
kind,
|
|
157
|
+
original: state.doc.textBetween(from, to, "\n", "")
|
|
158
|
+
});
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (kind === "insert") {
|
|
162
|
+
hunks.push({
|
|
163
|
+
...base,
|
|
164
|
+
kind
|
|
165
|
+
});
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (kind === "delete") {
|
|
169
|
+
hunks.push({
|
|
170
|
+
...base,
|
|
171
|
+
kind,
|
|
172
|
+
original: state.doc.nodeAt(from)
|
|
173
|
+
});
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
const $from = state.doc.resolve(from);
|
|
177
|
+
hunks.push({
|
|
178
|
+
...base,
|
|
179
|
+
kind,
|
|
180
|
+
original: $from.parent.content.cut($from.parentOffset, $from.parentOffset + to - from)
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const handle = {
|
|
185
|
+
id: reviewId,
|
|
186
|
+
hunks: hunks.length,
|
|
187
|
+
skipped,
|
|
188
|
+
cancel: () => {
|
|
189
|
+
const open = aiReviewKey.getState(editor.state)?.hunks.filter((h) => h.reviewId === reviewId).map((h) => h.id);
|
|
190
|
+
if (open?.length) rejectAiReview(editor, open);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
if (!hunks.length) return handle;
|
|
194
|
+
let entries = reviews.get(view);
|
|
195
|
+
if (!entries) reviews.set(view, entries = /* @__PURE__ */ new Map());
|
|
196
|
+
entries.set(reviewId, {
|
|
197
|
+
options,
|
|
198
|
+
total: hunks.length,
|
|
199
|
+
decided: 0,
|
|
200
|
+
tallies
|
|
201
|
+
});
|
|
202
|
+
dispatchMeta(view, {
|
|
203
|
+
type: "add",
|
|
204
|
+
hunks
|
|
205
|
+
});
|
|
206
|
+
return handle;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Writes the pending hunks `ids` (all when omitted) in one transaction — one undo step of its own: y-undo (collaborative)
|
|
210
|
+
* or prosemirror-history (standalone) would merge it with typing around it within their grouping delay, so the event is
|
|
211
|
+
* closed before and after.
|
|
212
|
+
*/
|
|
213
|
+
function acceptAiReview(editor, ids) {
|
|
214
|
+
const chosen = aiReviewKey.getState(editor.state)?.hunks.filter((h) => !ids || ids.includes(h.id)) ?? [];
|
|
215
|
+
if (!chosen.length) return;
|
|
216
|
+
const tr = editor.state.tr;
|
|
217
|
+
for (const hunk of [...chosen].reverse().sort((a, b) => b.from - a.from || b.to - a.to)) if (hunk.kind === "block") replaceRangeWithBlocks(tr, hunk.from, hunk.to, hunk.insert);
|
|
218
|
+
else tr.replaceWith(hunk.from, hunk.to, hunk.insert);
|
|
219
|
+
tr.setMeta(aiReviewKey, {
|
|
220
|
+
type: "decide",
|
|
221
|
+
ids: chosen.map((h) => h.id),
|
|
222
|
+
outcome: "accepted"
|
|
223
|
+
});
|
|
224
|
+
tr.setMeta(docAnchorsKey, { remove: chosen.map((h) => h.anchor.id) });
|
|
225
|
+
const resolver = anchorResolverOf(editor);
|
|
226
|
+
const collaborative = resolver?.stopUndoCapture(editor.state) ?? false;
|
|
227
|
+
editor.view.dispatch(closeHistory(tr));
|
|
228
|
+
resolver?.stopUndoCapture(editor.state);
|
|
229
|
+
if (!collaborative) editor.view.dispatch(closeHistory(editor.state.tr));
|
|
230
|
+
}
|
|
231
|
+
/** Drops the pending hunks `ids` (all when omitted); the document and undo history stay untouched. */
|
|
232
|
+
function rejectAiReview(editor, ids) {
|
|
233
|
+
const chosen = aiReviewKey.getState(editor.state)?.hunks.filter((h) => !ids || ids.includes(h.id)) ?? [];
|
|
234
|
+
if (!chosen.length) return;
|
|
235
|
+
const meta = {
|
|
236
|
+
type: "decide",
|
|
237
|
+
ids: chosen.map((h) => h.id),
|
|
238
|
+
outcome: "rejected"
|
|
239
|
+
};
|
|
240
|
+
editor.view.dispatch(editor.state.tr.setMeta(aiReviewKey, meta).setMeta(docAnchorsKey, { remove: chosen.map((h) => h.anchor.id) }).setMeta("addToHistory", false));
|
|
241
|
+
}
|
|
242
|
+
/** Shows the controls of hunk `id` (null hides them). */
|
|
243
|
+
function setActiveAiReviewHunk(view, id) {
|
|
244
|
+
dispatchMeta(view, {
|
|
245
|
+
type: "activate",
|
|
246
|
+
id
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function dispatchMeta(view, meta) {
|
|
250
|
+
view.dispatch(view.state.tr.setMeta(aiReviewKey, meta).setMeta("addToHistory", false));
|
|
251
|
+
}
|
|
252
|
+
function applyReview(tr, value, _oldState, newState) {
|
|
253
|
+
const meta = tr.getMeta(aiReviewKey);
|
|
254
|
+
if (!meta && (!tr.docChanged || !value.hunks.length)) return value;
|
|
255
|
+
let hunks = value.hunks;
|
|
256
|
+
if (tr.docChanged) hunks = hunks.map((hunk) => ({
|
|
257
|
+
...hunk,
|
|
258
|
+
...resolveRange(newState, hunk.anchor) ?? {
|
|
259
|
+
from: -1,
|
|
260
|
+
to: -1
|
|
261
|
+
}
|
|
262
|
+
}));
|
|
263
|
+
const decided = [];
|
|
264
|
+
const decide = (hunk, outcome) => {
|
|
265
|
+
decided.push({
|
|
266
|
+
reviewId: hunk.reviewId,
|
|
267
|
+
changeId: hunk.changeId,
|
|
268
|
+
hunkId: hunk.id,
|
|
269
|
+
outcome
|
|
270
|
+
});
|
|
271
|
+
};
|
|
272
|
+
if (meta?.type === "add") hunks = [...hunks, ...meta.hunks].sort((a, b) => a.from - b.from || a.to - b.to);
|
|
273
|
+
if (meta?.type === "decide") {
|
|
274
|
+
const ids = new Set(meta.ids);
|
|
275
|
+
hunks = hunks.filter((hunk) => {
|
|
276
|
+
if (!ids.has(hunk.id)) return true;
|
|
277
|
+
decide(hunk, meta.outcome);
|
|
278
|
+
return false;
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
if (tr.docChanged) hunks = hunks.filter((hunk) => {
|
|
282
|
+
if (isIntact(newState.doc, hunk)) return true;
|
|
283
|
+
decide(hunk, "invalid");
|
|
284
|
+
return false;
|
|
285
|
+
});
|
|
286
|
+
let active = meta?.type === "activate" ? meta.id : value.active;
|
|
287
|
+
if (active && !hunks.some((h) => h.id === active)) active = null;
|
|
288
|
+
return {
|
|
289
|
+
hunks,
|
|
290
|
+
active,
|
|
291
|
+
log: decided.length ? [...value.log, ...decided].slice(-500) : value.log,
|
|
292
|
+
logEnd: value.logEnd + decided.length,
|
|
293
|
+
decorations: renderDecorations(newState, hunks, active)
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
/** Whether the document still holds the hunk's original content at its positions. */
|
|
297
|
+
function isIntact(doc, hunk) {
|
|
298
|
+
if (hunk.from < 0 || hunk.from > hunk.to || hunk.to > doc.content.size) return false;
|
|
299
|
+
if (hunk.kind === "block") return hunk.from < hunk.to && doc.textBetween(hunk.from, hunk.to, "\n", "") === hunk.original;
|
|
300
|
+
if (hunk.kind === "delete") return hunk.to - hunk.from === hunk.original.nodeSize && !!doc.nodeAt(hunk.from)?.eq(hunk.original);
|
|
301
|
+
if (hunk.kind === "insert") {
|
|
302
|
+
const $at = doc.resolve(hunk.from);
|
|
303
|
+
return hunk.from === hunk.to && !$at.parent.inlineContent && $at.parent.canReplace($at.index(), $at.index(), hunk.insert);
|
|
304
|
+
}
|
|
305
|
+
const $from = doc.resolve(hunk.from);
|
|
306
|
+
const $to = doc.resolve(hunk.to);
|
|
307
|
+
return $from.sameParent($to) && $from.parent.inlineContent && $from.parent.content.cut($from.parentOffset, $to.parentOffset).eq(hunk.original);
|
|
308
|
+
}
|
|
309
|
+
function renderDecorations(state, hunks, active) {
|
|
310
|
+
if (!hunks.length) return DecorationSet.empty;
|
|
311
|
+
const serializer = DOMSerializer.fromSchema(state.schema);
|
|
312
|
+
const decorations = [];
|
|
313
|
+
for (const hunk of hunks) {
|
|
314
|
+
const activeClass = hunk.id === active ? " is-active" : "";
|
|
315
|
+
if (hunk.kind === "delete") {
|
|
316
|
+
decorations.push(Decoration.node(hunk.from, hunk.to, {
|
|
317
|
+
"class": `ai-review-del-block${activeClass}`,
|
|
318
|
+
"data-ai-hunk": hunk.id
|
|
319
|
+
}));
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
if (hunk.from < hunk.to) decorations.push(Decoration.inline(hunk.from, hunk.to, {
|
|
323
|
+
"class": `ai-review-del${activeClass}`,
|
|
324
|
+
"data-ai-hunk": hunk.id
|
|
325
|
+
}));
|
|
326
|
+
if (!hunk.insert.size) continue;
|
|
327
|
+
const $to = state.doc.resolve(hunk.to);
|
|
328
|
+
const block = hunk.kind === "block" || hunk.kind === "insert";
|
|
329
|
+
const pos = hunk.kind === "block" && $to.depth > 0 ? $to.after(1) : hunk.to;
|
|
330
|
+
decorations.push(Decoration.widget(pos, () => {
|
|
331
|
+
const dom = document.createElement(block ? "div" : "span");
|
|
332
|
+
dom.className = `${block ? "ai-review-ins-block" : "ai-review-ins"}${activeClass}`;
|
|
333
|
+
dom.setAttribute("data-ai-hunk", hunk.id);
|
|
334
|
+
dom.contentEditable = "false";
|
|
335
|
+
dom.append(serializer.serializeFragment(hunk.insert));
|
|
336
|
+
return dom;
|
|
337
|
+
}, {
|
|
338
|
+
key: `${hunk.id}${activeClass}`,
|
|
339
|
+
side: -1,
|
|
340
|
+
ignoreSelection: true
|
|
341
|
+
}));
|
|
342
|
+
}
|
|
343
|
+
return DecorationSet.create(state.doc, decorations);
|
|
344
|
+
}
|
|
345
|
+
/** Reports decisions to their reviews' callbacks; a review whose hunks are all decided ends. */
|
|
346
|
+
function report(view, decisions) {
|
|
347
|
+
const entries = reviews.get(view);
|
|
348
|
+
if (!entries) return;
|
|
349
|
+
const byReview = /* @__PURE__ */ new Map();
|
|
350
|
+
for (const decision of decisions) byReview.set(decision.reviewId, [...byReview.get(decision.reviewId) ?? [], decision]);
|
|
351
|
+
for (const [reviewId, batch] of byReview) {
|
|
352
|
+
const entry = entries.get(reviewId);
|
|
353
|
+
if (!entry) continue;
|
|
354
|
+
for (const decision of batch) entry.tallies.get(decision.changeId)[decision.outcome]++;
|
|
355
|
+
entry.decided += batch.length;
|
|
356
|
+
entry.options.onDecision?.(batch);
|
|
357
|
+
if (entry.decided < entry.total) continue;
|
|
358
|
+
entries.delete(reviewId);
|
|
359
|
+
entry.options.onDone?.([...entry.tallies].map(([id, tally]) => {
|
|
360
|
+
const kinds = Object.keys(tally).filter((outcome) => tally[outcome] > 0);
|
|
361
|
+
return {
|
|
362
|
+
id,
|
|
363
|
+
outcome: kinds.length === 1 ? kinds[0] : "partial",
|
|
364
|
+
...tally
|
|
365
|
+
};
|
|
366
|
+
}));
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/** The hunks turning [from, to] into the parsed `markdown`. */
|
|
370
|
+
function planChange(editor, from, to, markdown) {
|
|
371
|
+
const { doc, schema } = editor.state;
|
|
372
|
+
const result = parseBlocks(editor, markdown);
|
|
373
|
+
if (!result.blocks.length) return "empty";
|
|
374
|
+
const $from = doc.resolve(from);
|
|
375
|
+
const $to = doc.resolve(to);
|
|
376
|
+
const blocks = Fragment.fromArray(result.blocks.map((block) => schema.nodeFromJSON(block)));
|
|
377
|
+
const inline = inlineReplacement($from, $to, result);
|
|
378
|
+
const inlineContent = inline && Fragment.fromArray(inline.map((node) => schema.nodeFromJSON(node)));
|
|
379
|
+
const planned = inlineContent && $from.parent.type.validContent(inlineContent) ? diffInline($from.parent.content.cut($from.parentOffset, $to.parentOffset), inlineContent, from) : inline ? null : diffTextblocks(doc, from, to, blocks);
|
|
380
|
+
if (planned) return planned.length ? planned : "unchanged";
|
|
381
|
+
return [{
|
|
382
|
+
kind: "block",
|
|
383
|
+
from,
|
|
384
|
+
to,
|
|
385
|
+
insert: blocks
|
|
386
|
+
}];
|
|
387
|
+
}
|
|
388
|
+
/** The hunk inserting `markdown` as blocks in the preferred structure (`structureBlocks` of the parsed result) at `pos` (between blocks). */
|
|
389
|
+
function planInsert(editor, pos, markdown) {
|
|
390
|
+
const { doc, schema } = editor.state;
|
|
391
|
+
const blocks = structureBlocks(editor, parseBlocks(editor, markdown).blocks);
|
|
392
|
+
if (!blocks.length) return "empty";
|
|
393
|
+
const $pos = doc.resolve(pos);
|
|
394
|
+
if ($pos.parent.inlineContent) return "missing";
|
|
395
|
+
let insert = Fragment.fromArray(blocks.map((block) => schema.nodeFromJSON(block)));
|
|
396
|
+
const fits = (content) => $pos.parent.canReplace($pos.index(), $pos.index(), content);
|
|
397
|
+
if (!fits(insert) && insert.childCount === 1 && insert.firstChild.type === $pos.parent.type) insert = insert.firstChild.content;
|
|
398
|
+
return fits(insert) ? [{
|
|
399
|
+
kind: "insert",
|
|
400
|
+
from: pos,
|
|
401
|
+
to: pos,
|
|
402
|
+
insert
|
|
403
|
+
}] : "missing";
|
|
404
|
+
}
|
|
405
|
+
/** The hunk deleting [from, to], which must be exactly one node. */
|
|
406
|
+
function planDelete(doc, from, to) {
|
|
407
|
+
const node = doc.nodeAt(from);
|
|
408
|
+
return node && from + node.nodeSize === to ? [{
|
|
409
|
+
kind: "delete",
|
|
410
|
+
from,
|
|
411
|
+
to,
|
|
412
|
+
insert: Fragment.empty
|
|
413
|
+
}] : "missing";
|
|
414
|
+
}
|
|
415
|
+
/** Word diffs per textblock when the result has the range's textblocks (types, attributes, nesting); else null. */
|
|
416
|
+
function diffTextblocks(doc, from, to, blocks) {
|
|
417
|
+
const originals = [];
|
|
418
|
+
const results = [];
|
|
419
|
+
if (!flattenTextblocks(doc.cut(from, to), "", originals) || !flattenTextblocks(doc.type.create(null, blocks), "", results)) return null;
|
|
420
|
+
if (originals.length !== results.length || originals.some((original, i) => original.path !== results[i].path)) return null;
|
|
421
|
+
const ranges = [];
|
|
422
|
+
doc.nodesBetween(from, to, (node, pos) => {
|
|
423
|
+
if (!node.isTextblock) return true;
|
|
424
|
+
ranges.push({
|
|
425
|
+
from: Math.max(from, pos + 1),
|
|
426
|
+
to: Math.min(to, pos + node.nodeSize - 1)
|
|
427
|
+
});
|
|
428
|
+
return false;
|
|
429
|
+
});
|
|
430
|
+
if (ranges.length !== results.length) return null;
|
|
431
|
+
return ranges.flatMap((range, i) => {
|
|
432
|
+
const $from = doc.resolve(range.from);
|
|
433
|
+
return diffInline($from.parent.content.cut($from.parentOffset, $from.parentOffset + range.to - range.from), results[i].node.content, range.from);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/** Collects `node`'s textblocks with their ancestry (types and attributes but block IDs); false for other leaf blocks (images, rules). */
|
|
437
|
+
function flattenTextblocks(node, path, out) {
|
|
438
|
+
let ok = true;
|
|
439
|
+
node.forEach((child) => {
|
|
440
|
+
if (!ok) return;
|
|
441
|
+
const attrs = Object.entries(child.attrs).filter(([name]) => name !== "id");
|
|
442
|
+
const childPath = `${path}/${child.type.name}${JSON.stringify(attrs)}`;
|
|
443
|
+
if (child.isTextblock) out.push({
|
|
444
|
+
path: childPath,
|
|
445
|
+
node: child
|
|
446
|
+
});
|
|
447
|
+
else if (child.isLeaf) ok = false;
|
|
448
|
+
else ok = flattenTextblocks(child, childPath, out);
|
|
449
|
+
});
|
|
450
|
+
return ok;
|
|
451
|
+
}
|
|
452
|
+
/** Words, whitespace and punctuation with their marks; inline nodes (chips, breaks) are one token each. */
|
|
453
|
+
function tokenize(content) {
|
|
454
|
+
const tokens = [];
|
|
455
|
+
content.forEach((node) => {
|
|
456
|
+
if (!node.isText) {
|
|
457
|
+
tokens.push({
|
|
458
|
+
key: JSON.stringify(node.toJSON()),
|
|
459
|
+
node,
|
|
460
|
+
whitespace: false
|
|
461
|
+
});
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
const marks = JSON.stringify(node.marks.map((mark) => mark.toJSON()));
|
|
465
|
+
for (const match of node.text.matchAll(TOKEN)) tokens.push({
|
|
466
|
+
key: marks + match[0],
|
|
467
|
+
node: node.cut(match.index, match.index + match[0].length),
|
|
468
|
+
whitespace: !match[0].trim()
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
return tokens;
|
|
472
|
+
}
|
|
473
|
+
/** Word-level hunks turning `original` (inline content starting at document position `base`) into `result`. */
|
|
474
|
+
function diffInline(original, result, base) {
|
|
475
|
+
const a = tokenize(original);
|
|
476
|
+
const b = tokenize(result);
|
|
477
|
+
const offsets = [base];
|
|
478
|
+
for (const token of a) offsets.push(offsets.at(-1) + token.node.nodeSize);
|
|
479
|
+
return diffTokens(a, b).map((span) => ({
|
|
480
|
+
kind: "inline",
|
|
481
|
+
from: offsets[span.aFrom],
|
|
482
|
+
to: offsets[span.aTo],
|
|
483
|
+
insert: Fragment.fromArray(b.slice(span.bFrom, span.bTo).map((token) => token.node))
|
|
484
|
+
}));
|
|
485
|
+
}
|
|
486
|
+
/** Differing spans of two token lists (LCS); spans only whitespace apart merge, so a rewritten phrase is one hunk. */
|
|
487
|
+
function diffTokens(a, b) {
|
|
488
|
+
let start = 0;
|
|
489
|
+
while (start < a.length && start < b.length && a[start].key === b[start].key) start++;
|
|
490
|
+
let endA = a.length;
|
|
491
|
+
let endB = b.length;
|
|
492
|
+
while (endA > start && endB > start && a[endA - 1].key === b[endB - 1].key) {
|
|
493
|
+
endA--;
|
|
494
|
+
endB--;
|
|
495
|
+
}
|
|
496
|
+
const n = endA - start;
|
|
497
|
+
const m = endB - start;
|
|
498
|
+
if (!n && !m) return [];
|
|
499
|
+
if (!n || !m || n * m > MAX_DIFF_CELLS) return [{
|
|
500
|
+
aFrom: start,
|
|
501
|
+
aTo: endA,
|
|
502
|
+
bFrom: start,
|
|
503
|
+
bTo: endB
|
|
504
|
+
}];
|
|
505
|
+
const w = m + 1;
|
|
506
|
+
const lcs = new Uint32Array((n + 1) * w);
|
|
507
|
+
for (let i = n - 1; i >= 0; i--) for (let j = m - 1; j >= 0; j--) lcs[i * w + j] = a[start + i].key === b[start + j].key ? lcs[(i + 1) * w + j + 1] + 1 : Math.max(lcs[(i + 1) * w + j], lcs[i * w + j + 1]);
|
|
508
|
+
const spans = [];
|
|
509
|
+
let open = null;
|
|
510
|
+
let i = 0;
|
|
511
|
+
let j = 0;
|
|
512
|
+
while (i < n || j < m) {
|
|
513
|
+
if (i < n && j < m && a[start + i].key === b[start + j].key) {
|
|
514
|
+
if (open) spans.push(open);
|
|
515
|
+
open = null;
|
|
516
|
+
i++;
|
|
517
|
+
j++;
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
open ??= {
|
|
521
|
+
aFrom: start + i,
|
|
522
|
+
aTo: start + i,
|
|
523
|
+
bFrom: start + j,
|
|
524
|
+
bTo: start + j
|
|
525
|
+
};
|
|
526
|
+
if (j < m && (i === n || lcs[i * w + j + 1] >= lcs[(i + 1) * w + j])) open.bTo = start + ++j;
|
|
527
|
+
else open.aTo = start + ++i;
|
|
528
|
+
}
|
|
529
|
+
if (open) spans.push(open);
|
|
530
|
+
const merged = [];
|
|
531
|
+
for (const span of spans) {
|
|
532
|
+
const previous = merged.at(-1);
|
|
533
|
+
if (previous && a.slice(previous.aTo, span.aFrom).every((token) => token.whitespace)) {
|
|
534
|
+
previous.aTo = span.aTo;
|
|
535
|
+
previous.bTo = span.bTo;
|
|
536
|
+
} else merged.push({ ...span });
|
|
537
|
+
}
|
|
538
|
+
return merged;
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
export { AiReview, acceptAiReview, aiReviewKey, rejectAiReview, setActiveAiReviewHunk, startAiReview };
|
|
542
|
+
|
|
543
|
+
//# sourceMappingURL=ai-review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-review.js","names":[],"sources":["../../../src/features/ai/ai-review.ts"],"sourcesContent":["import { type Editor, Extension } from '@tiptap/core'\nimport { closeHistory } from '@tiptap/pm/history'\nimport { DOMSerializer, Fragment, type Node as PMNode } from '@tiptap/pm/model'\nimport { type EditorState, Plugin, PluginKey, type Transaction } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet, type EditorView } from '@tiptap/pm/view'\nimport { anchorResolverOf, captureRange, type DocAnchor, docAnchorsKey, type DocAnchorsMeta, parseBlocks, resolveRange, structureBlocks } from '../../core'\nimport { BLOCK_ID_ATTR } from '../../core/schema'\nimport { inlineReplacement, replaceRangeWithBlocks } from './ai-apply'\n\n/**\n * A proposed change; `id` is the caller's. 'replace' (default): `markdown` (the model's result) replaces the captured\n * `range`. 'blocks': ready-made `blocks` (a block conversion) replace `range` as one block hunk. 'insert': `markdown`\n * as blocks at `at`, a collapsed range between blocks (e.g. after a block). 'delete': `range` covers exactly one\n * block, which is removed.\n */\nexport type AiReviewChange =\n | { id: string, kind?: 'replace', range: DocAnchor, markdown: string }\n | { id: string, kind: 'blocks', range: DocAnchor, blocks: Fragment }\n | { id: string, kind: 'insert', at: DocAnchor, markdown: string }\n | { id: string, kind: 'delete', range: DocAnchor }\n\n/** Why a change got no review: range gone, result identical, range overlaps a pending review, or empty result. */\nexport type AiReviewSkipReason = 'missing' | 'unchanged' | 'overlap' | 'empty'\n\nexport type AiReviewOutcome = 'accepted' | 'rejected' | 'invalid'\n\n/** One decided hunk; 'invalid': dropped because the original text changed underneath. */\nexport interface AiReviewDecision { reviewId: string, changeId: string, hunkId: string, outcome: AiReviewOutcome }\n\n/** Per change of a finished review: hunk counts, and 'partial' when its hunks were decided differently. */\nexport interface AiReviewChangeSummary { id: string, outcome: AiReviewOutcome | 'partial', accepted: number, rejected: number, invalid: number }\n\nexport interface AiReviewOptions {\n /** Decisions as they happen, batched per transaction. */\n onDecision?: (decisions: AiReviewDecision[]) => void\n /** Once every hunk of the review is decided. */\n onDone?: (summary: AiReviewChangeSummary[]) => void\n}\n\n/** `hunks === 0`: no review started (every change skipped). */\nexport interface AiReviewHandle {\n id: string\n hunks: number\n skipped: { id: string, reason: AiReviewSkipReason }[]\n /** Rejects the review's pending hunks. */\n cancel: () => void\n}\n\n/**\n * One reviewable difference: [from, to] of the document replaced by `insert` on accept.\n * 'inline': a word-level change inside one textblock (`original` = its inline content);\n * 'block': the whole range replaced by blocks, since the result's structure differs (`original` = its text);\n * 'insert': blocks inserted at the collapsed position `from === to` between blocks;\n * 'delete': the one block [from, to] removed (`original` = that block, `insert` empty).\n */\nexport type AiReviewHunk = {\n id: string\n reviewId: string\n changeId: string\n from: number\n to: number\n insert: Fragment\n /**\n * Edit-surviving [from, to] (DocAnchors), released when the hunk is decided. Bound to the range's own first and\n * last characters, so text inserted at a boundary (here or remotely) stays outside.\n */\n anchor: DocAnchor\n} & ({ kind: 'inline', original: Fragment } | { kind: 'block', original: string } | { kind: 'insert' } | { kind: 'delete', original: PMNode })\n\nexport interface AiReviewState {\n /** Pending hunks, in document order. */\n hunks: readonly AiReviewHunk[]\n /** The clicked hunk, whose accept/reject controls are shown. */\n active: string | null\n /** The latest decisions (oldest first); `logEnd` counts all decisions ever made. */\n log: readonly AiReviewDecision[]\n logEnd: number\n decorations: DecorationSet\n}\n\ntype ReviewMeta =\n | { type: 'add', hunks: AiReviewHunk[] }\n | { type: 'decide', ids: string[], outcome: 'accepted' | 'rejected' }\n | { type: 'activate', id: string | null }\n\ninterface ReviewEntry {\n options: AiReviewOptions\n total: number\n decided: number\n tallies: Map<string, Record<AiReviewOutcome, number>>\n}\n\nexport const aiReviewKey = new PluginKey<AiReviewState>('aiReview')\n\nconst LOG_LIMIT = 500\n/** LCS table cells per textblock diff; beyond, the differing middle becomes one hunk. */\nconst MAX_DIFF_CELLS = 4_000_000\n/** Words, whitespace runs, single other characters (punctuation). */\nconst TOKEN = /\\s+|[\\p{L}\\p{N}_]+|[^\\s\\p{L}\\p{N}_]/gu\n\n/** Callbacks of running reviews, per editor view. */\nconst reviews = new WeakMap<EditorView, Map<string, ReviewEntry>>()\nlet reviewCount = 0\n\n/**\n * In-document review of AI rewrites: the difference between a range and its proposed replacement shows as local\n * decorations only (red strike = deletion, green widget = insertion), so collaborators never see unaccepted text.\n * Accepting writes the accepted hunks in one transaction (one undo step); rejecting only drops decorations.\n * Client-only, not part of `schemaExtensions()`. Driven by `startAiReview`, `acceptAiReview`, `rejectAiReview`;\n * AiReviewBar shows the controls.\n */\nexport const AiReview = Extension.create({\n name: 'aiReview',\n\n addProseMirrorPlugins() {\n return [\n new Plugin<AiReviewState>({\n key: aiReviewKey,\n state: {\n init: () => ({ hunks: [], active: null, log: [], logEnd: 0, decorations: DecorationSet.empty }),\n apply: applyReview,\n },\n props: {\n decorations: state => aiReviewKey.getState(state)?.decorations,\n handleDOMEvents: {\n // A click on a change shows its controls; a click elsewhere hides them.\n mousedown(view, event) {\n const review = aiReviewKey.getState(view.state)\n if (!review?.hunks.length) return false\n const target = event.target instanceof Element ? event.target : (event.target as Node | null)?.parentElement\n const id = target?.closest('[data-ai-hunk]')?.getAttribute('data-ai-hunk') ?? null\n if (id !== review.active) setActiveAiReviewHunk(view, id)\n return false\n },\n },\n },\n view(view) {\n let seen = aiReviewKey.getState(view.state)!.logEnd\n return {\n update(_view, prevState) {\n const review = aiReviewKey.getState(view.state)!\n if (review.logEnd !== seen) {\n const count = review.logEnd - seen\n seen = review.logEnd\n // Hunks dropped as invalid keep their anchors (decided ones release them in their transaction).\n const anchors = docAnchorsKey.getState(view.state)\n const kept = new Set(review.hunks.map(h => h.anchor.id))\n const stale = aiReviewKey.getState(prevState)!.hunks\n .filter(h => !kept.has(h.anchor.id) && anchors?.has(h.anchor.id))\n .map(h => h.anchor.id)\n // Callbacks may dispatch: not during this update.\n queueMicrotask(() => {\n if (stale.length && !view.isDestroyed) {\n view.dispatch(view.state.tr.setMeta(docAnchorsKey, { remove: stale } satisfies DocAnchorsMeta).setMeta('addToHistory', false))\n }\n report(view, review.log.slice(-Math.min(count, review.log.length)))\n })\n }\n },\n destroy() {\n reviews.delete(view)\n },\n }\n },\n }),\n ]\n },\n})\n\n/**\n * Opens a review of `changes` (independent, non-overlapping ranges; several reviews may be pending at once). A\n * replacement becomes word-level hunks per textblock when the result has the range's block structure, otherwise one\n * block-level hunk; an insertion or deletion is one hunk. Changes that cannot be reviewed are returned as `skipped`.\n */\nexport function startAiReview(editor: Editor, changes: readonly AiReviewChange[], options: AiReviewOptions = {}): AiReviewHandle {\n const { state, view } = editor\n const pending = aiReviewKey.getState(state)\n if (!pending) throw new Error('startAiReview needs the AiReview extension')\n const reviewId = `ai-review-${++reviewCount}`\n const hunks: AiReviewHunk[] = []\n const skipped: AiReviewHandle['skipped'] = []\n // Insertion points only collide with a range strictly around them, so a block can be deleted or rewritten and\n // content inserted after it, and several insertions can stack at one position; ranges collide when they touch.\n const taken: { from: number, to: number, point: boolean }[] = pending.hunks.map(({ from, to, kind }) => ({ from, to, point: kind === 'insert' }))\n const collides = (range: { from: number, to: number, point: boolean }) => taken.some((t) => {\n if (t.point && range.point) return false\n if (t.point) return range.from < t.from && t.from < range.to\n if (range.point) return t.from < range.from && range.from < t.to\n return t.from <= range.to && range.from <= t.to\n })\n const tallies: ReviewEntry['tallies'] = new Map()\n\n for (const change of changes) {\n const point = change.kind === 'insert'\n const resolved = resolveRange(state, change.kind === 'insert' ? change.at : change.range)\n if (!resolved || (point ? resolved.from !== resolved.to : resolved.from >= resolved.to)) {\n skipped.push({ id: change.id, reason: 'missing' })\n continue\n }\n const range = { ...resolved, point }\n if (collides(range)) {\n skipped.push({ id: change.id, reason: 'overlap' })\n continue\n }\n const planned: PlannedHunk[] | AiReviewSkipReason = change.kind === 'insert'\n ? planInsert(editor, range.from, change.markdown)\n : change.kind === 'delete'\n ? planDelete(state.doc, range.from, range.to)\n : change.kind === 'blocks'\n ? [{ kind: 'block', from: range.from, to: range.to, insert: change.blocks }]\n : planChange(editor, range.from, range.to, change.markdown)\n if (typeof planned === 'string') {\n skipped.push({ id: change.id, reason: planned })\n continue\n }\n taken.push(range)\n tallies.set(change.id, { accepted: 0, rejected: 0, invalid: 0 })\n for (const { kind, from, to, insert } of planned) {\n const base = { id: `${reviewId}-${hunks.length}`, reviewId, changeId: change.id, from, to, insert, anchor: captureRange(editor, { from, to }, { startInside: from !== to }) }\n if (kind === 'block') {\n hunks.push({ ...base, kind, original: state.doc.textBetween(from, to, '\\n', '\\uFFFC') })\n continue\n }\n if (kind === 'insert') {\n hunks.push({ ...base, kind })\n continue\n }\n if (kind === 'delete') {\n hunks.push({ ...base, kind, original: state.doc.nodeAt(from)! })\n continue\n }\n const $from = state.doc.resolve(from)\n hunks.push({ ...base, kind, original: $from.parent.content.cut($from.parentOffset, $from.parentOffset + to - from) })\n }\n }\n\n const handle: AiReviewHandle = {\n id: reviewId,\n hunks: hunks.length,\n skipped,\n cancel: () => {\n const open = aiReviewKey.getState(editor.state)?.hunks.filter(h => h.reviewId === reviewId).map(h => h.id)\n if (open?.length) rejectAiReview(editor, open)\n },\n }\n if (!hunks.length) return handle\n let entries = reviews.get(view)\n if (!entries) reviews.set(view, entries = new Map())\n entries.set(reviewId, { options, total: hunks.length, decided: 0, tallies })\n dispatchMeta(view, { type: 'add', hunks })\n return handle\n}\n\n/**\n * Writes the pending hunks `ids` (all when omitted) in one transaction — one undo step of its own: y-undo (collaborative)\n * or prosemirror-history (standalone) would merge it with typing around it within their grouping delay, so the event is\n * closed before and after.\n */\nexport function acceptAiReview(editor: Editor, ids?: readonly string[]): void {\n const chosen = aiReviewKey.getState(editor.state)?.hunks.filter(h => !ids || ids.includes(h.id)) ?? []\n if (!chosen.length) return\n const tr = editor.state.tr\n // Back to front: earlier positions stay valid. At one position the range starting there goes first, then the\n // insertions in reverse (pending hunks are in document order, ties in the order they were proposed), so each lands\n // before the ones after it.\n for (const hunk of [...chosen].reverse().sort((a, b) => b.from - a.from || b.to - a.to)) {\n if (hunk.kind === 'block') replaceRangeWithBlocks(tr, hunk.from, hunk.to, hunk.insert)\n else tr.replaceWith(hunk.from, hunk.to, hunk.insert)\n }\n tr.setMeta(aiReviewKey, { type: 'decide', ids: chosen.map(h => h.id), outcome: 'accepted' } satisfies ReviewMeta)\n tr.setMeta(docAnchorsKey, { remove: chosen.map(h => h.anchor.id) } satisfies DocAnchorsMeta)\n // The collaboration feature's anchor resolver stops its Yjs undo capturing; without one (or without an undo manager)\n // prosemirror-history is the history and gets the closing transactions.\n const resolver = anchorResolverOf(editor)\n const collaborative = resolver?.stopUndoCapture(editor.state) ?? false\n editor.view.dispatch(closeHistory(tr))\n resolver?.stopUndoCapture(editor.state)\n // prosemirror-history: an empty transaction that closes the event, so typing right after starts a new one.\n if (!collaborative) editor.view.dispatch(closeHistory(editor.state.tr))\n}\n\n/** Drops the pending hunks `ids` (all when omitted); the document and undo history stay untouched. */\nexport function rejectAiReview(editor: Editor, ids?: readonly string[]): void {\n const chosen = aiReviewKey.getState(editor.state)?.hunks.filter(h => !ids || ids.includes(h.id)) ?? []\n if (!chosen.length) return\n const meta: ReviewMeta = { type: 'decide', ids: chosen.map(h => h.id), outcome: 'rejected' }\n editor.view.dispatch(editor.state.tr\n .setMeta(aiReviewKey, meta)\n .setMeta(docAnchorsKey, { remove: chosen.map(h => h.anchor.id) } satisfies DocAnchorsMeta)\n .setMeta('addToHistory', false))\n}\n\n/** Shows the controls of hunk `id` (null hides them). */\nexport function setActiveAiReviewHunk(view: EditorView, id: string | null): void {\n dispatchMeta(view, { type: 'activate', id })\n}\n\nfunction dispatchMeta(view: EditorView, meta: ReviewMeta): void {\n view.dispatch(view.state.tr.setMeta(aiReviewKey, meta).setMeta('addToHistory', false))\n}\n\nfunction applyReview(tr: Transaction, value: AiReviewState, _oldState: EditorState, newState: EditorState): AiReviewState {\n const meta = tr.getMeta(aiReviewKey) as ReviewMeta | undefined\n if (!meta && (!tr.docChanged || !value.hunks.length)) return value\n\n let hunks = value.hunks\n // DocAnchors (higher priority, so already applied in `newState`) maps local changes and re-resolves remote ones.\n if (tr.docChanged) hunks = hunks.map(hunk => ({ ...hunk, ...(resolveRange(newState, hunk.anchor) ?? { from: -1, to: -1 }) }))\n\n const decided: AiReviewDecision[] = []\n const decide = (hunk: AiReviewHunk, outcome: AiReviewOutcome) => {\n decided.push({ reviewId: hunk.reviewId, changeId: hunk.changeId, hunkId: hunk.id, outcome })\n }\n if (meta?.type === 'add') hunks = [...hunks, ...meta.hunks].sort((a, b) => a.from - b.from || a.to - b.to)\n if (meta?.type === 'decide') {\n const ids = new Set(meta.ids)\n hunks = hunks.filter((hunk) => {\n if (!ids.has(hunk.id)) return true\n decide(hunk, meta.outcome)\n return false\n })\n }\n if (tr.docChanged) {\n hunks = hunks.filter((hunk) => {\n if (isIntact(newState.doc, hunk)) return true\n decide(hunk, 'invalid')\n return false\n })\n }\n\n let active = meta?.type === 'activate' ? meta.id : value.active\n if (active && !hunks.some(h => h.id === active)) active = null\n return {\n hunks,\n active,\n log: decided.length ? [...value.log, ...decided].slice(-LOG_LIMIT) : value.log,\n logEnd: value.logEnd + decided.length,\n decorations: renderDecorations(newState, hunks, active),\n }\n}\n\n/** Whether the document still holds the hunk's original content at its positions. */\nfunction isIntact(doc: PMNode, hunk: AiReviewHunk): boolean {\n if (hunk.from < 0 || hunk.from > hunk.to || hunk.to > doc.content.size) return false\n if (hunk.kind === 'block') return hunk.from < hunk.to && doc.textBetween(hunk.from, hunk.to, '\\n', '\\uFFFC') === hunk.original\n if (hunk.kind === 'delete') return hunk.to - hunk.from === hunk.original.nodeSize && !!doc.nodeAt(hunk.from)?.eq(hunk.original)\n if (hunk.kind === 'insert') {\n const $at = doc.resolve(hunk.from)\n return hunk.from === hunk.to && !$at.parent.inlineContent && $at.parent.canReplace($at.index(), $at.index(), hunk.insert)\n }\n const $from = doc.resolve(hunk.from)\n const $to = doc.resolve(hunk.to)\n return $from.sameParent($to) && $from.parent.inlineContent\n && $from.parent.content.cut($from.parentOffset, $to.parentOffset).eq(hunk.original)\n}\n\nfunction renderDecorations(state: EditorState, hunks: readonly AiReviewHunk[], active: string | null): DecorationSet {\n if (!hunks.length) return DecorationSet.empty\n const serializer = DOMSerializer.fromSchema(state.schema)\n const decorations: Decoration[] = []\n for (const hunk of hunks) {\n const activeClass = hunk.id === active ? ' is-active' : ''\n if (hunk.kind === 'delete') {\n decorations.push(Decoration.node(hunk.from, hunk.to, { 'class': `ai-review-del-block${activeClass}`, 'data-ai-hunk': hunk.id }))\n continue\n }\n if (hunk.from < hunk.to) {\n decorations.push(Decoration.inline(hunk.from, hunk.to, { 'class': `ai-review-del${activeClass}`, 'data-ai-hunk': hunk.id }))\n }\n if (!hunk.insert.size) continue\n // Replacing blocks go below the top-level block the range ends in; inserted blocks at their position; inline\n // insertions right after the deleted text.\n const $to = state.doc.resolve(hunk.to)\n const block = hunk.kind === 'block' || hunk.kind === 'insert'\n const pos = hunk.kind === 'block' && $to.depth > 0 ? $to.after(1) : hunk.to\n decorations.push(Decoration.widget(pos, () => {\n const dom = document.createElement(block ? 'div' : 'span')\n dom.className = `${block ? 'ai-review-ins-block' : 'ai-review-ins'}${activeClass}`\n dom.setAttribute('data-ai-hunk', hunk.id)\n dom.contentEditable = 'false'\n dom.append(serializer.serializeFragment(hunk.insert))\n return dom\n }, { key: `${hunk.id}${activeClass}`, side: -1, ignoreSelection: true }))\n }\n return DecorationSet.create(state.doc, decorations)\n}\n\n/** Reports decisions to their reviews' callbacks; a review whose hunks are all decided ends. */\nfunction report(view: EditorView, decisions: readonly AiReviewDecision[]): void {\n const entries = reviews.get(view)\n if (!entries) return\n const byReview = new Map<string, AiReviewDecision[]>()\n for (const decision of decisions) byReview.set(decision.reviewId, [...byReview.get(decision.reviewId) ?? [], decision])\n for (const [reviewId, batch] of byReview) {\n const entry = entries.get(reviewId)\n if (!entry) continue\n for (const decision of batch) entry.tallies.get(decision.changeId)![decision.outcome]++\n entry.decided += batch.length\n entry.options.onDecision?.(batch)\n if (entry.decided < entry.total) continue\n entries.delete(reviewId)\n entry.options.onDone?.([...entry.tallies].map(([id, tally]) => {\n const kinds = (Object.keys(tally) as AiReviewOutcome[]).filter(outcome => tally[outcome] > 0)\n return { id, outcome: kinds.length === 1 ? kinds[0]! : 'partial', ...tally }\n }))\n }\n}\n\ntype PlannedHunk = Pick<AiReviewHunk, 'kind' | 'from' | 'to' | 'insert'>\n\n/** The hunks turning [from, to] into the parsed `markdown`. */\nfunction planChange(editor: Editor, from: number, to: number, markdown: string): PlannedHunk[] | AiReviewSkipReason {\n const { doc, schema } = editor.state\n const result = parseBlocks(editor, markdown)\n if (!result.blocks.length) return 'empty'\n const $from = doc.resolve(from)\n const $to = doc.resolve(to)\n const blocks = Fragment.fromArray(result.blocks.map(block => schema.nodeFromJSON(block)))\n\n const inline = inlineReplacement($from, $to, result)\n const inlineContent = inline && Fragment.fromArray(inline.map(node => schema.nodeFromJSON(node)))\n const planned = inlineContent && $from.parent.type.validContent(inlineContent)\n ? diffInline($from.parent.content.cut($from.parentOffset, $to.parentOffset), inlineContent, from)\n : inline ? null : diffTextblocks(doc, from, to, blocks)\n if (planned) return planned.length ? planned : 'unchanged'\n return [{ kind: 'block', from, to, insert: blocks }]\n}\n\n/** The hunk inserting `markdown` as blocks in the preferred structure (`structureBlocks` of the parsed result) at `pos` (between blocks). */\nfunction planInsert(editor: Editor, pos: number, markdown: string): PlannedHunk[] | AiReviewSkipReason {\n const { doc, schema } = editor.state\n const blocks = structureBlocks(editor, parseBlocks(editor, markdown).blocks)\n if (!blocks.length) return 'empty'\n const $pos = doc.resolve(pos)\n if ($pos.parent.inlineContent) return 'missing'\n let insert = Fragment.fromArray(blocks.map(block => schema.nodeFromJSON(block)))\n const fits = (content: Fragment) => $pos.parent.canReplace($pos.index(), $pos.index(), content)\n // A list (or quote) inserted into a list (quote) of the same type contributes its items.\n if (!fits(insert) && insert.childCount === 1 && insert.firstChild!.type === $pos.parent.type) insert = insert.firstChild!.content\n return fits(insert) ? [{ kind: 'insert', from: pos, to: pos, insert }] : 'missing'\n}\n\n/** The hunk deleting [from, to], which must be exactly one node. */\nfunction planDelete(doc: PMNode, from: number, to: number): PlannedHunk[] | AiReviewSkipReason {\n const node = doc.nodeAt(from)\n return node && from + node.nodeSize === to ? [{ kind: 'delete', from, to, insert: Fragment.empty }] : 'missing'\n}\n\n/** Word diffs per textblock when the result has the range's textblocks (types, attributes, nesting); else null. */\nfunction diffTextblocks(doc: PMNode, from: number, to: number, blocks: Fragment): PlannedHunk[] | null {\n const originals: { path: string, node: PMNode }[] = []\n const results: { path: string, node: PMNode }[] = []\n if (!flattenTextblocks(doc.cut(from, to), '', originals) || !flattenTextblocks(doc.type.create(null, blocks), '', results)) return null\n if (originals.length !== results.length || originals.some((original, i) => original.path !== results[i]!.path)) return null\n\n const ranges: { from: number, to: number }[] = []\n doc.nodesBetween(from, to, (node, pos) => {\n if (!node.isTextblock) return true\n ranges.push({ from: Math.max(from, pos + 1), to: Math.min(to, pos + node.nodeSize - 1) })\n return false\n })\n if (ranges.length !== results.length) return null\n return ranges.flatMap((range, i) => {\n const $from = doc.resolve(range.from)\n const original = $from.parent.content.cut($from.parentOffset, $from.parentOffset + range.to - range.from)\n return diffInline(original, results[i]!.node.content, range.from)\n })\n}\n\n/** Collects `node`'s textblocks with their ancestry (types and attributes but block IDs); false for other leaf blocks (images, rules). */\nfunction flattenTextblocks(node: PMNode, path: string, out: { path: string, node: PMNode }[]): boolean {\n let ok = true\n node.forEach((child) => {\n if (!ok) return\n const attrs = Object.entries(child.attrs).filter(([name]) => name !== BLOCK_ID_ATTR)\n const childPath = `${path}/${child.type.name}${JSON.stringify(attrs)}`\n if (child.isTextblock) out.push({ path: childPath, node: child })\n else if (child.isLeaf) ok = false\n else ok = flattenTextblocks(child, childPath, out)\n })\n return ok\n}\n\ninterface Token { key: string, node: PMNode, whitespace: boolean }\n\n/** Words, whitespace and punctuation with their marks; inline nodes (chips, breaks) are one token each. */\nfunction tokenize(content: Fragment): Token[] {\n const tokens: Token[] = []\n content.forEach((node) => {\n if (!node.isText) {\n tokens.push({ key: JSON.stringify(node.toJSON()), node, whitespace: false })\n return\n }\n const marks = JSON.stringify(node.marks.map(mark => mark.toJSON()))\n for (const match of node.text!.matchAll(TOKEN)) {\n tokens.push({ key: marks + match[0], node: node.cut(match.index, match.index + match[0].length), whitespace: !match[0].trim() })\n }\n })\n return tokens\n}\n\n/** Word-level hunks turning `original` (inline content starting at document position `base`) into `result`. */\nfunction diffInline(original: Fragment, result: Fragment, base: number): PlannedHunk[] {\n const a = tokenize(original)\n const b = tokenize(result)\n const offsets = [base]\n for (const token of a) offsets.push(offsets.at(-1)! + token.node.nodeSize)\n return diffTokens(a, b).map(span => ({\n kind: 'inline',\n from: offsets[span.aFrom]!,\n to: offsets[span.aTo]!,\n insert: Fragment.fromArray(b.slice(span.bFrom, span.bTo).map(token => token.node)),\n }))\n}\n\ninterface Span { aFrom: number, aTo: number, bFrom: number, bTo: number }\n\n/** Differing spans of two token lists (LCS); spans only whitespace apart merge, so a rewritten phrase is one hunk. */\nfunction diffTokens(a: Token[], b: Token[]): Span[] {\n let start = 0\n while (start < a.length && start < b.length && a[start]!.key === b[start]!.key) start++\n let endA = a.length\n let endB = b.length\n while (endA > start && endB > start && a[endA - 1]!.key === b[endB - 1]!.key) {\n endA--\n endB--\n }\n const n = endA - start\n const m = endB - start\n if (!n && !m) return []\n if (!n || !m || n * m > MAX_DIFF_CELLS) return [{ aFrom: start, aTo: endA, bFrom: start, bTo: endB }]\n\n // lcs[i * w + j]: LCS length of a[start + i..] and b[start + j..].\n const w = m + 1\n const lcs = new Uint32Array((n + 1) * w)\n for (let i = n - 1; i >= 0; i--) {\n for (let j = m - 1; j >= 0; j--) {\n lcs[i * w + j] = a[start + i]!.key === b[start + j]!.key\n ? lcs[(i + 1) * w + j + 1]! + 1\n : Math.max(lcs[(i + 1) * w + j]!, lcs[i * w + j + 1]!)\n }\n }\n\n const spans: Span[] = []\n let open: Span | null = null\n let i = 0\n let j = 0\n while (i < n || j < m) {\n if (i < n && j < m && a[start + i]!.key === b[start + j]!.key) {\n if (open) spans.push(open)\n open = null\n i++\n j++\n continue\n }\n open ??= { aFrom: start + i, aTo: start + i, bFrom: start + j, bTo: start + j }\n if (j < m && (i === n || lcs[i * w + j + 1]! >= lcs[(i + 1) * w + j]!)) open.bTo = start + ++j\n else open.aTo = start + ++i\n }\n if (open) spans.push(open)\n\n const merged: Span[] = []\n for (const span of spans) {\n const previous = merged.at(-1)\n if (previous && a.slice(previous.aTo, span.aFrom).every(token => token.whitespace)) {\n previous.aTo = span.aTo\n previous.bTo = span.bTo\n }\n else merged.push({ ...span })\n }\n return merged\n}\n"],"mappings":";;;;;;;;;;AA4FA,MAAa,cAAc,IAAI,UAAyB,UAAU;;AAIlE,MAAM,iBAAiB;;AAEvB,MAAM,QAAQ;;AAGd,MAAM,0BAAU,IAAI,QAA8C;AAClE,IAAI,cAAc;;;;;;;;AASlB,MAAa,WAAW,UAAU,OAAO;CACvC,MAAM;CAEN,wBAAwB;EACtB,OAAO,CACL,IAAI,OAAsB;GACxB,KAAK;GACL,OAAO;IACL,aAAa;KAAE,OAAO,CAAC;KAAG,QAAQ;KAAM,KAAK,CAAC;KAAG,QAAQ;KAAG,aAAa,cAAc;IAAM;IAC7F,OAAO;GACT;GACA,OAAO;IACL,cAAa,UAAS,YAAY,SAAS,KAAK,CAAC,EAAE;IACnD,iBAAiB,EAEf,UAAU,MAAM,OAAO;KACrB,MAAM,SAAS,YAAY,SAAS,KAAK,KAAK;KAC9C,IAAI,CAAC,QAAQ,MAAM,QAAQ,OAAO;KAElC,MAAM,MADS,MAAM,kBAAkB,UAAU,MAAM,SAAU,MAAM,QAAwB,cAAA,EAC5E,QAAQ,gBAAgB,CAAC,EAAE,aAAa,cAAc,KAAK;KAC9E,IAAI,OAAO,OAAO,QAAQ,sBAAsB,MAAM,EAAE;KACxD,OAAO;IACT,EACF;GACF;GACA,KAAK,MAAM;IACT,IAAI,OAAO,YAAY,SAAS,KAAK,KAAK,CAAC,CAAE;IAC7C,OAAO;KACL,OAAO,OAAO,WAAW;MACvB,MAAM,SAAS,YAAY,SAAS,KAAK,KAAK;MAC9C,IAAI,OAAO,WAAW,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,KAAK,IAAI,KAAK,IAAI,KAAM,KAAK,MAAM,QAAQ,EAAE;OACxF,KAAK,MAAM,QAAQ,EAAE;CAC5B;CACA,IAAI,MAAM,MAAM,KAAK,IAAI;CAEzB,MAAM,SAAiB,CAAC;CACxB,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,WAAW,OAAO,GAAG,EAAE;EAC7B,IAAI,YAAY,EAAE,MAAM,SAAS,KAAK,KAAK,KAAK,CAAC,CAAC,OAAM,UAAS,MAAM,UAAU,GAAG;GAClF,SAAS,MAAM,KAAK;GACpB,SAAS,MAAM,KAAK;EACtB,OACK,OAAO,KAAK,EAAE,GAAG,KAAK,CAAC;CAC9B;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DocAnchor } from "../../core/doc-anchors.js";
|
|
2
|
+
import "../../core/index.js";
|
|
3
|
+
import { Editor, Extension } from "@tiptap/core";
|
|
4
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
5
|
+
//#region src/features/ai/ai-selection-highlight.d.ts
|
|
6
|
+
/** The highlighted range (DocAnchors resolves its current positions). */
|
|
7
|
+
export interface AiHighlight {
|
|
8
|
+
anchor: DocAnchor;
|
|
9
|
+
}
|
|
10
|
+
export declare const aiSelectionHighlightKey: PluginKey<AiHighlight | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Keeps the text an AI selection action works on visibly highlighted while its menu is open, after focus left the
|
|
13
|
+
* editor. A local inline decoration — never part of the document, so collaborators never see it.
|
|
14
|
+
* Client-only: not part of `schemaExtensions()`. Driven by `showAiSelectionHighlight` / `hideAiSelectionHighlight`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AiSelectionHighlight: Extension<any, any>;
|
|
17
|
+
/** Highlights the captured `anchor`. */
|
|
18
|
+
export declare function showAiSelectionHighlight(editor: Editor, anchor: DocAnchor): void;
|
|
19
|
+
export declare function hideAiSelectionHighlight(editor: Editor): void;
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=ai-selection-highlight.d.ts.map
|