@ecsplico/editor 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +232 -2
- package/dist/code/CodeSurface.d.ts +24 -0
- package/dist/code/CodeSurface.js +57 -0
- package/dist/code/CodeSurface.js.map +1 -0
- package/dist/code/CodeSurface.vue.d.ts +29 -0
- package/dist/code/CodeSurface2.js +75 -0
- package/dist/code/CodeSurface2.js.map +1 -0
- package/dist/code/chrome-theme.js +76 -0
- package/dist/code/chrome-theme.js.map +1 -0
- package/dist/code/compartments.js +19 -0
- package/dist/code/compartments.js.map +1 -0
- package/dist/code/editor-factory.d.ts +41 -0
- package/dist/code/editor-factory.js +126 -0
- package/dist/code/editor-factory.js.map +1 -0
- package/dist/code/format-json.d.ts +27 -0
- package/dist/code/format-json.js +94 -0
- package/dist/code/format-json.js.map +1 -0
- package/dist/code/highlight-style.js +118 -0
- package/dist/code/highlight-style.js.map +1 -0
- package/dist/code/index.d.ts +6 -0
- package/dist/code/index.js +6 -0
- package/dist/code/jsonl-language.d.ts +6 -0
- package/dist/code/jsonl-language.js +33 -0
- package/dist/code/jsonl-language.js.map +1 -0
- package/dist/code/kind.d.ts +15 -0
- package/dist/code/kind.js +142 -0
- package/dist/code/kind.js.map +1 -0
- package/dist/code/lang-registry.d.ts +31 -0
- package/dist/code/lang-registry.js +54 -0
- package/dist/code/lang-registry.js.map +1 -0
- package/dist/code/react.d.ts +2 -0
- package/dist/code/react.js +1 -0
- package/dist/code/vue.d.ts +2 -0
- package/dist/code/vue.js +1 -0
- package/dist/core/abilities.d.ts +32 -0
- package/dist/core/abilities.js +160 -0
- package/dist/core/abilities.js.map +1 -0
- package/dist/core/block-convert.d.ts +59 -0
- package/dist/core/block-convert.js +164 -0
- package/dist/core/block-convert.js.map +1 -0
- package/dist/core/block-drag.d.ts +12 -0
- package/dist/core/block-drag.js +62 -0
- package/dist/core/block-drag.js.map +1 -0
- package/dist/core/block-flash.d.ts +19 -0
- package/dist/core/block-flash.js +66 -0
- package/dist/core/block-flash.js.map +1 -0
- package/dist/core/context.d.ts +63 -0
- package/dist/core/context.js +108 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/convert.d.ts +96 -0
- package/dist/core/convert.js +241 -0
- package/dist/core/convert.js.map +1 -0
- package/dist/core/core-feature.d.ts +17 -0
- package/dist/core/core-feature.js +100 -0
- package/dist/core/core-feature.js.map +1 -0
- package/dist/core/define-editor.d.ts +23 -0
- package/dist/core/define-editor.js +110 -0
- package/dist/core/define-editor.js.map +1 -0
- package/dist/core/doc-anchors.d.ts +67 -0
- package/dist/core/doc-anchors.js +112 -0
- package/dist/core/doc-anchors.js.map +1 -0
- package/dist/core/document-markdown.d.ts +13 -0
- package/dist/core/document-markdown.js +31 -0
- package/dist/core/document-markdown.js.map +1 -0
- package/dist/core/download.d.ts +5 -0
- package/dist/core/download.js +16 -0
- package/dist/core/download.js.map +1 -0
- package/dist/core/editor-ui.d.ts +45 -0
- package/dist/core/editor-ui.js +38 -0
- package/dist/core/editor-ui.js.map +1 -0
- package/dist/core/extension-points.d.ts +64 -0
- package/dist/core/feature-context.d.ts +32 -0
- package/dist/core/feature-context.js +46 -0
- package/dist/core/feature-context.js.map +1 -0
- package/dist/core/feature.d.ts +234 -0
- package/dist/core/feature.js +13 -0
- package/dist/core/feature.js.map +1 -0
- package/dist/core/fences.d.ts +16 -0
- package/dist/core/fences.js +105 -0
- package/dist/core/fences.js.map +1 -0
- package/dist/core/fetch-error.d.ts +5 -0
- package/dist/core/fetch-error.js +11 -0
- package/dist/core/fetch-error.js.map +1 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.js +27 -0
- package/dist/core/metadata-types.d.ts +27 -0
- package/dist/core/metadata-types.js +10 -0
- package/dist/core/metadata-types.js.map +1 -0
- package/dist/core/metadata.d.ts +39 -0
- package/dist/core/metadata.js +76 -0
- package/dist/core/metadata.js.map +1 -0
- package/dist/core/notify.d.ts +31 -0
- package/dist/core/notify.js +7 -0
- package/dist/core/notify.js.map +1 -0
- package/dist/core/pipeline.d.ts +52 -0
- package/dist/core/pipeline.js +78 -0
- package/dist/core/pipeline.js.map +1 -0
- package/dist/core/schema/abilities.d.ts +55 -0
- package/dist/core/schema/abilities.js +113 -0
- package/dist/core/schema/abilities.js.map +1 -0
- package/dist/core/schema/block-ids.d.ts +29 -0
- package/dist/core/schema/block-ids.js +134 -0
- package/dist/core/schema/block-ids.js.map +1 -0
- package/dist/core/schema/hex-color.d.ts +5 -0
- package/dist/core/schema/hex-color.js +7 -0
- package/dist/core/schema/hex-color.js.map +1 -0
- package/dist/core/schema/index.d.ts +21 -0
- package/dist/core/schema/index.js +33 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/schema/mark-flags.d.ts +12 -0
- package/dist/core/schema/node-flags.d.ts +23 -0
- package/dist/core/schema/node-flags.js +34 -0
- package/dist/core/schema/node-flags.js.map +1 -0
- package/dist/core/schema/opaque-fence.d.ts +11 -0
- package/dist/core/schema/opaque-fence.js +57 -0
- package/dist/core/schema/opaque-fence.js.map +1 -0
- package/dist/core/schema/strike.d.ts +4 -0
- package/dist/core/schema/strike.js +9 -0
- package/dist/core/schema/strike.js.map +1 -0
- package/dist/core/selection-range.d.ts +13 -0
- package/dist/core/selection-range.js +28 -0
- package/dist/core/selection-range.js.map +1 -0
- package/dist/core/slash.d.ts +24 -0
- package/dist/core/slash.js +60 -0
- package/dist/core/slash.js.map +1 -0
- package/dist/core/store.d.ts +22 -0
- package/dist/core/store.js +61 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/suggestion-popup.d.ts +63 -0
- package/dist/core/suggestion-popup.js +57 -0
- package/dist/core/suggestion-popup.js.map +1 -0
- package/dist/core/tag-name.js +11 -0
- package/dist/core/tag-name.js.map +1 -0
- package/dist/core/toolbar-items.d.ts +10 -0
- package/dist/core/toolbar-items.js +206 -0
- package/dist/core/toolbar-items.js.map +1 -0
- package/dist/core/toolbar.d.ts +74 -0
- package/dist/core/toolbar.js +45 -0
- package/dist/core/toolbar.js.map +1 -0
- package/dist/document/DocumentSurface.d.ts +38 -0
- package/dist/document/DocumentSurface.js +44 -0
- package/dist/document/DocumentSurface.js.map +1 -0
- package/dist/document/DocumentSurface.vue.d.ts +56 -0
- package/dist/document/DocumentSurface2.js +71 -0
- package/dist/document/DocumentSurface2.js.map +1 -0
- package/dist/document/react.d.ts +2 -0
- package/dist/document/react.js +1 -0
- package/dist/document/vue.d.ts +2 -0
- package/dist/document/vue.js +1 -0
- package/dist/features/ai/agent-op-review.d.ts +69 -0
- package/dist/features/ai/agent-op-review.js +182 -0
- package/dist/features/ai/agent-op-review.js.map +1 -0
- package/dist/features/ai/agent-ops.d.ts +15 -0
- package/dist/features/ai/agent-ops.js +228 -0
- package/dist/features/ai/agent-ops.js.map +1 -0
- package/dist/features/ai/ai-apply.d.ts +76 -0
- package/dist/features/ai/ai-apply.js +193 -0
- package/dist/features/ai/ai-apply.js.map +1 -0
- package/dist/features/ai/ai-menu.d.ts +38 -0
- package/dist/features/ai/ai-menu.js +20 -0
- package/dist/features/ai/ai-menu.js.map +1 -0
- package/dist/features/ai/ai-review.d.ts +136 -0
- package/dist/features/ai/ai-review.js +543 -0
- package/dist/features/ai/ai-review.js.map +1 -0
- package/dist/features/ai/ai-selection-highlight.d.ts +21 -0
- package/dist/features/ai/ai-selection-highlight.js +44 -0
- package/dist/features/ai/ai-selection-highlight.js.map +1 -0
- package/dist/features/ai/ai-sse.d.ts +28 -0
- package/dist/features/ai/ai-sse.js +82 -0
- package/dist/features/ai/ai-sse.js.map +1 -0
- package/dist/features/ai/assistant.d.ts +53 -0
- package/dist/features/ai/assistant.js +82 -0
- package/dist/features/ai/assistant.js.map +1 -0
- package/dist/features/ai/block-actions.d.ts +20 -0
- package/dist/features/ai/block-actions.js +55 -0
- package/dist/features/ai/block-actions.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.js +145 -0
- package/dist/features/ai/components/AiReviewBar.js.map +1 -0
- package/dist/features/ai/components/AiReviewBar.vue.d.ts +15 -0
- package/dist/features/ai/components/AiSelectionMenu.js +519 -0
- package/dist/features/ai/components/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +17 -0
- package/dist/features/ai/components/AiSidebar.js +378 -0
- package/dist/features/ai/components/AiSidebar.js.map +1 -0
- package/dist/features/ai/components/AiSidebar.vue.d.ts +26 -0
- package/dist/features/ai/components/DocumentChatAnswer.js +67 -0
- package/dist/features/ai/components/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/components/DocumentChatAnswer.vue.d.ts +13 -0
- package/dist/features/ai/components/DocumentChatOps.js +113 -0
- package/dist/features/ai/components/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/components/DocumentChatOps.vue.d.ts +27 -0
- package/dist/features/ai/components/ModelQuickSwitch.js +84 -0
- package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +23 -0
- package/dist/features/ai/components/SettingsAiTab.js +88 -0
- package/dist/features/ai/components/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/components/SettingsAiTab.vue.d.ts +6 -0
- package/dist/features/ai/components/SettingsModelProfiles.js +260 -0
- package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/components/SettingsModelProfiles.vue.d.ts +6 -0
- package/dist/features/ai/document-chat-model.d.ts +88 -0
- package/dist/features/ai/document-chat-model.js +190 -0
- package/dist/features/ai/document-chat-model.js.map +1 -0
- package/dist/features/ai/document-chat.d.ts +17 -0
- package/dist/features/ai/document-chat.js +112 -0
- package/dist/features/ai/document-chat.js.map +1 -0
- package/dist/features/ai/feature.d.ts +25 -0
- package/dist/features/ai/feature.js +89 -0
- package/dist/features/ai/feature.js.map +1 -0
- package/dist/features/ai/ghost-autocomplete.d.ts +47 -0
- package/dist/features/ai/ghost-autocomplete.js +204 -0
- package/dist/features/ai/ghost-autocomplete.js.map +1 -0
- package/dist/features/ai/index.d.ts +24 -0
- package/dist/features/ai/index.js +23 -0
- package/dist/features/ai/model-profiles.d.ts +36 -0
- package/dist/features/ai/model-profiles.js +111 -0
- package/dist/features/ai/model-profiles.js.map +1 -0
- package/dist/features/ai/preview-extensions.js +14 -0
- package/dist/features/ai/preview-extensions.js.map +1 -0
- package/dist/features/ai/protocol/agent-ops.d.ts +120 -0
- package/dist/features/ai/protocol/agent-ops.js +298 -0
- package/dist/features/ai/protocol/agent-ops.js.map +1 -0
- package/dist/features/ai/protocol/chat.d.ts +57 -0
- package/dist/features/ai/protocol/chat.js +146 -0
- package/dist/features/ai/protocol/chat.js.map +1 -0
- package/dist/features/ai/protocol/complete.d.ts +21 -0
- package/dist/features/ai/protocol/complete.js +81 -0
- package/dist/features/ai/protocol/complete.js.map +1 -0
- package/dist/features/ai/protocol/index.d.ts +7 -0
- package/dist/features/ai/protocol/index.js +7 -0
- package/dist/features/ai/protocol/models.d.ts +48 -0
- package/dist/features/ai/protocol/models.js +41 -0
- package/dist/features/ai/protocol/models.js.map +1 -0
- package/dist/features/ai/protocol/schemas.d.ts +36 -0
- package/dist/features/ai/protocol/schemas.js +40 -0
- package/dist/features/ai/protocol/schemas.js.map +1 -0
- package/dist/features/ai/protocol/tasks.d.ts +107 -0
- package/dist/features/ai/protocol/tasks.js +227 -0
- package/dist/features/ai/protocol/tasks.js.map +1 -0
- package/dist/features/ai/rate-limit.d.ts +9 -0
- package/dist/features/ai/rate-limit.js +20 -0
- package/dist/features/ai/rate-limit.js.map +1 -0
- package/dist/features/ai/react/AiReviewBar.d.ts +12 -0
- package/dist/features/ai/react/AiReviewBar.js +156 -0
- package/dist/features/ai/react/AiReviewBar.js.map +1 -0
- package/dist/features/ai/react/AiSelectionMenu.d.ts +14 -0
- package/dist/features/ai/react/AiSelectionMenu.js +513 -0
- package/dist/features/ai/react/AiSelectionMenu.js.map +1 -0
- package/dist/features/ai/react/AiSidebar.d.ts +19 -0
- package/dist/features/ai/react/AiSidebar.js +339 -0
- package/dist/features/ai/react/AiSidebar.js.map +1 -0
- package/dist/features/ai/react/DocumentChatAnswer.d.ts +10 -0
- package/dist/features/ai/react/DocumentChatAnswer.js +70 -0
- package/dist/features/ai/react/DocumentChatAnswer.js.map +1 -0
- package/dist/features/ai/react/DocumentChatOps.d.ts +19 -0
- package/dist/features/ai/react/DocumentChatOps.js +111 -0
- package/dist/features/ai/react/DocumentChatOps.js.map +1 -0
- package/dist/features/ai/react/ModelQuickSwitch.d.ts +19 -0
- package/dist/features/ai/react/ModelQuickSwitch.js +89 -0
- package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -0
- package/dist/features/ai/react/SettingsAiTab.d.ts +5 -0
- package/dist/features/ai/react/SettingsAiTab.js +103 -0
- package/dist/features/ai/react/SettingsAiTab.js.map +1 -0
- package/dist/features/ai/react/SettingsModelProfiles.d.ts +8 -0
- package/dist/features/ai/react/SettingsModelProfiles.js +318 -0
- package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -0
- package/dist/features/ai/react/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/react/use-ai-assistant.js +36 -0
- package/dist/features/ai/react/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/react/use-document-chat.d.ts +32 -0
- package/dist/features/ai/react/use-document-chat.js +43 -0
- package/dist/features/ai/react/use-document-chat.js.map +1 -0
- package/dist/features/ai/react/use-model-profiles.d.ts +20 -0
- package/dist/features/ai/react/use-model-profiles.js +33 -0
- package/dist/features/ai/react/use-model-profiles.js.map +1 -0
- package/dist/features/ai/react.d.ts +23 -0
- package/dist/features/ai/react.js +28 -0
- package/dist/features/ai/react.js.map +1 -0
- package/dist/features/ai/sidebar-flow.d.ts +61 -0
- package/dist/features/ai/sidebar-flow.js +125 -0
- package/dist/features/ai/sidebar-flow.js.map +1 -0
- package/dist/features/ai/use-ai-assistant.d.ts +22 -0
- package/dist/features/ai/use-ai-assistant.js +39 -0
- package/dist/features/ai/use-ai-assistant.js.map +1 -0
- package/dist/features/ai/use-document-chat.d.ts +33 -0
- package/dist/features/ai/use-document-chat.js +45 -0
- package/dist/features/ai/use-document-chat.js.map +1 -0
- package/dist/features/ai/use-model-profiles.d.ts +23 -0
- package/dist/features/ai/use-model-profiles.js +50 -0
- package/dist/features/ai/use-model-profiles.js.map +1 -0
- package/dist/features/ai/vue.d.ts +21 -0
- package/dist/features/ai/vue.js +28 -0
- package/dist/features/ai/vue.js.map +1 -0
- package/dist/features/authors/attribution.d.ts +36 -0
- package/dist/features/authors/attribution.js +94 -0
- package/dist/features/authors/attribution.js.map +1 -0
- package/dist/features/authors/author-color-styles.d.ts +12 -0
- package/dist/features/authors/author-color-styles.js +24 -0
- package/dist/features/authors/author-color-styles.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.js +50 -0
- package/dist/features/authors/components/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsButton.vue.d.ts +11 -0
- package/dist/features/authors/components/AuthorColorsPanel.js +72 -0
- package/dist/features/authors/components/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/components/AuthorColorsPanel.vue.d.ts +11 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js +49 -0
- package/dist/features/authors/components/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/components/SettingsAuthorsTab.vue.d.ts +6 -0
- package/dist/features/authors/feature.d.ts +22 -0
- package/dist/features/authors/feature.js +47 -0
- package/dist/features/authors/feature.js.map +1 -0
- package/dist/features/authors/index.d.ts +7 -0
- package/dist/features/authors/index.js +6 -0
- package/dist/features/authors/react/AuthorColorsButton.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsButton.js +41 -0
- package/dist/features/authors/react/AuthorColorsButton.js.map +1 -0
- package/dist/features/authors/react/AuthorColorsPanel.d.ts +8 -0
- package/dist/features/authors/react/AuthorColorsPanel.js +125 -0
- package/dist/features/authors/react/AuthorColorsPanel.js.map +1 -0
- package/dist/features/authors/react/SettingsAuthorsTab.d.ts +5 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js +92 -0
- package/dist/features/authors/react/SettingsAuthorsTab.js.map +1 -0
- package/dist/features/authors/react.d.ts +11 -0
- package/dist/features/authors/react.js +16 -0
- package/dist/features/authors/react.js.map +1 -0
- package/dist/features/authors/schema.d.ts +22 -0
- package/dist/features/authors/schema.js +70 -0
- package/dist/features/authors/schema.js.map +1 -0
- package/dist/features/authors/vue.d.ts +10 -0
- package/dist/features/authors/vue.js +16 -0
- package/dist/features/authors/vue.js.map +1 -0
- package/dist/features/block-ui/block-actions.d.ts +17 -0
- package/dist/features/block-ui/block-actions.js +37 -0
- package/dist/features/block-ui/block-actions.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/components/BlockActionsOverlay.vue.d.ts +25 -0
- package/dist/features/block-ui/components/BlockHandles.js +113 -0
- package/dist/features/block-ui/components/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.js +181 -0
- package/dist/features/block-ui/components/BlockUi.js.map +1 -0
- package/dist/features/block-ui/components/BlockUi.vue.d.ts +17 -0
- package/dist/features/block-ui/feature.d.ts +21 -0
- package/dist/features/block-ui/feature.js +23 -0
- package/dist/features/block-ui/feature.js.map +1 -0
- package/dist/features/block-ui/handle-geometry.js +52 -0
- package/dist/features/block-ui/handle-geometry.js.map +1 -0
- package/dist/features/block-ui/index.d.ts +3 -0
- package/dist/features/block-ui/index.js +3 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.d.ts +19 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js +142 -0
- package/dist/features/block-ui/react/BlockActionsOverlay.js.map +1 -0
- package/dist/features/block-ui/react/BlockHandles.d.ts +15 -0
- package/dist/features/block-ui/react/BlockHandles.js +104 -0
- package/dist/features/block-ui/react/BlockHandles.js.map +1 -0
- package/dist/features/block-ui/react/BlockUi.d.ts +14 -0
- package/dist/features/block-ui/react/BlockUi.js +174 -0
- package/dist/features/block-ui/react/BlockUi.js.map +1 -0
- package/dist/features/block-ui/react.d.ts +11 -0
- package/dist/features/block-ui/react.js +13 -0
- package/dist/features/block-ui/react.js.map +1 -0
- package/dist/features/block-ui/vue.d.ts +9 -0
- package/dist/features/block-ui/vue.js +12 -0
- package/dist/features/block-ui/vue.js.map +1 -0
- package/dist/features/collab/anchor-resolver.d.ts +7 -0
- package/dist/features/collab/anchor-resolver.js +92 -0
- package/dist/features/collab/anchor-resolver.js.map +1 -0
- package/dist/features/collab/feature.d.ts +22 -0
- package/dist/features/collab/feature.js +36 -0
- package/dist/features/collab/feature.js.map +1 -0
- package/dist/features/collab/index.d.ts +3 -0
- package/dist/features/collab/index.js +3 -0
- package/dist/features/collab/react.d.ts +7 -0
- package/dist/features/collab/react.js +10 -0
- package/dist/features/collab/react.js.map +1 -0
- package/dist/features/collab/vue.d.ts +6 -0
- package/dist/features/collab/vue.js +37 -0
- package/dist/features/collab/vue.js.map +1 -0
- package/dist/features/comments/comments-plugin.d.ts +71 -0
- package/dist/features/comments/comments-plugin.js +185 -0
- package/dist/features/comments/comments-plugin.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.js +54 -0
- package/dist/features/comments/components/CommentBubble.js.map +1 -0
- package/dist/features/comments/components/CommentBubble.vue.d.ts +14 -0
- package/dist/features/comments/components/CommentComposer.js +87 -0
- package/dist/features/comments/components/CommentComposer.js.map +1 -0
- package/dist/features/comments/components/CommentComposer.vue.d.ts +21 -0
- package/dist/features/comments/components/CommentThreadView.js +255 -0
- package/dist/features/comments/components/CommentThreadView.js.map +1 -0
- package/dist/features/comments/components/CommentThreadView.vue.d.ts +29 -0
- package/dist/features/comments/components/CommentsListMenu.js +134 -0
- package/dist/features/comments/components/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/components/CommentsListMenu.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsMargin.js +291 -0
- package/dist/features/comments/components/CommentsMargin.js.map +1 -0
- package/dist/features/comments/components/CommentsMargin.vue.d.ts +16 -0
- package/dist/features/comments/components/CommentsOverlay.js +39 -0
- package/dist/features/comments/components/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.js +124 -0
- package/dist/features/comments/components/CommentsPopover.js.map +1 -0
- package/dist/features/comments/components/CommentsPopover.vue.d.ts +10 -0
- package/dist/features/comments/components/CommentsToolbarButton.js +61 -0
- package/dist/features/comments/components/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.js +46 -0
- package/dist/features/comments/components/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/components/SettingsCommentsTab.vue.d.ts +6 -0
- package/dist/features/comments/feature.d.ts +39 -0
- package/dist/features/comments/feature.js +128 -0
- package/dist/features/comments/feature.js.map +1 -0
- package/dist/features/comments/index.d.ts +6 -0
- package/dist/features/comments/index.js +6 -0
- package/dist/features/comments/model.d.ts +87 -0
- package/dist/features/comments/model.js +390 -0
- package/dist/features/comments/model.js.map +1 -0
- package/dist/features/comments/react/CommentAvatar.js +24 -0
- package/dist/features/comments/react/CommentAvatar.js.map +1 -0
- package/dist/features/comments/react/CommentBubble.d.ts +11 -0
- package/dist/features/comments/react/CommentBubble.js +43 -0
- package/dist/features/comments/react/CommentBubble.js.map +1 -0
- package/dist/features/comments/react/CommentComposer.d.ts +15 -0
- package/dist/features/comments/react/CommentComposer.js +69 -0
- package/dist/features/comments/react/CommentComposer.js.map +1 -0
- package/dist/features/comments/react/CommentThreadView.d.ts +24 -0
- package/dist/features/comments/react/CommentThreadView.js +249 -0
- package/dist/features/comments/react/CommentThreadView.js.map +1 -0
- package/dist/features/comments/react/CommentsListMenu.d.ts +8 -0
- package/dist/features/comments/react/CommentsListMenu.js +115 -0
- package/dist/features/comments/react/CommentsListMenu.js.map +1 -0
- package/dist/features/comments/react/CommentsMargin.d.ts +16 -0
- package/dist/features/comments/react/CommentsMargin.js +294 -0
- package/dist/features/comments/react/CommentsMargin.js.map +1 -0
- package/dist/features/comments/react/CommentsOverlay.d.ts +11 -0
- package/dist/features/comments/react/CommentsOverlay.js +52 -0
- package/dist/features/comments/react/CommentsOverlay.js.map +1 -0
- package/dist/features/comments/react/CommentsPopover.d.ts +15 -0
- package/dist/features/comments/react/CommentsPopover.js +107 -0
- package/dist/features/comments/react/CommentsPopover.js.map +1 -0
- package/dist/features/comments/react/CommentsToolbarButton.d.ts +12 -0
- package/dist/features/comments/react/CommentsToolbarButton.js +52 -0
- package/dist/features/comments/react/CommentsToolbarButton.js.map +1 -0
- package/dist/features/comments/react/SettingsCommentsTab.d.ts +5 -0
- package/dist/features/comments/react/SettingsCommentsTab.js +77 -0
- package/dist/features/comments/react/SettingsCommentsTab.js.map +1 -0
- package/dist/features/comments/react/use-comments.d.ts +17 -0
- package/dist/features/comments/react/use-comments.js +37 -0
- package/dist/features/comments/react/use-comments.js.map +1 -0
- package/dist/features/comments/react.d.ts +23 -0
- package/dist/features/comments/react.js +28 -0
- package/dist/features/comments/react.js.map +1 -0
- package/dist/features/comments/schema.d.ts +51 -0
- package/dist/features/comments/schema.js +41 -0
- package/dist/features/comments/schema.js.map +1 -0
- package/dist/features/comments/shortcuts.js +34 -0
- package/dist/features/comments/shortcuts.js.map +1 -0
- package/dist/features/comments/use-comments.d.ts +37 -0
- package/dist/features/comments/use-comments.js +45 -0
- package/dist/features/comments/use-comments.js.map +1 -0
- package/dist/features/comments/vue.d.ts +20 -0
- package/dist/features/comments/vue.js +28 -0
- package/dist/features/comments/vue.js.map +1 -0
- package/dist/features/composites/ai-brief.d.ts +31 -0
- package/dist/features/composites/ai-brief.js +56 -0
- package/dist/features/composites/ai-brief.js.map +1 -0
- package/dist/features/composites/anchors.d.ts +47 -0
- package/dist/features/composites/anchors.js +137 -0
- package/dist/features/composites/anchors.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.js +243 -0
- package/dist/features/composites/components/CompositeChrome.js.map +1 -0
- package/dist/features/composites/components/CompositeChrome.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeDetails.js +158 -0
- package/dist/features/composites/components/CompositeDetails.js.map +1 -0
- package/dist/features/composites/components/CompositeDetails.vue.d.ts +19 -0
- package/dist/features/composites/components/CompositeFieldEditor.js +114 -0
- package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +23 -0
- package/dist/features/composites/components/CompositeInspector.js +439 -0
- package/dist/features/composites/components/CompositeInspector.js.map +1 -0
- package/dist/features/composites/components/CompositeInspector.vue.d.ts +32 -0
- package/dist/features/composites/components/CompositeStatusMenu.js +51 -0
- package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/components/CompositeStatusMenu.vue.d.ts +28 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js +79 -0
- package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +18 -0
- package/dist/features/composites/components/CompositeTable.js +348 -0
- package/dist/features/composites/components/CompositeTable.js.map +1 -0
- package/dist/features/composites/components/CompositeTable.vue.d.ts +15 -0
- package/dist/features/composites/components/CompositeTagsEditor.js +95 -0
- package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +13 -0
- package/dist/features/composites/components/CompositeView.js +46 -0
- package/dist/features/composites/components/CompositeView.js.map +1 -0
- package/dist/features/composites/components/CompositeView.vue.d.ts +96 -0
- package/dist/features/composites/components/SettingsEditingTab.js +119 -0
- package/dist/features/composites/components/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +11 -0
- package/dist/features/composites/convert.d.ts +24 -0
- package/dist/features/composites/convert.js +145 -0
- package/dist/features/composites/convert.js.map +1 -0
- package/dist/features/composites/editing-settings-keys.js +47 -0
- package/dist/features/composites/editing-settings-keys.js.map +1 -0
- package/dist/features/composites/feature.d.ts +30 -0
- package/dist/features/composites/feature.js +305 -0
- package/dist/features/composites/feature.js.map +1 -0
- package/dist/features/composites/fences.d.ts +20 -0
- package/dist/features/composites/fences.js +86 -0
- package/dist/features/composites/fences.js.map +1 -0
- package/dist/features/composites/heading-composites.d.ts +36 -0
- package/dist/features/composites/heading-composites.js +140 -0
- package/dist/features/composites/heading-composites.js.map +1 -0
- package/dist/features/composites/index.d.ts +20 -0
- package/dist/features/composites/index.js +20 -0
- package/dist/features/composites/kinds.d.ts +49 -0
- package/dist/features/composites/kinds.js +131 -0
- package/dist/features/composites/kinds.js.map +1 -0
- package/dist/features/composites/legacy.d.ts +8 -0
- package/dist/features/composites/legacy.js +25 -0
- package/dist/features/composites/legacy.js.map +1 -0
- package/dist/features/composites/markdown-export.d.ts +17 -0
- package/dist/features/composites/markdown-export.js +49 -0
- package/dist/features/composites/markdown-export.js.map +1 -0
- package/dist/features/composites/meta-display.js +46 -0
- package/dist/features/composites/meta-display.js.map +1 -0
- package/dist/features/composites/node-views.d.ts +17 -0
- package/dist/features/composites/node-views.js +18 -0
- package/dist/features/composites/node-views.js.map +1 -0
- package/dist/features/composites/nodes.d.ts +56 -0
- package/dist/features/composites/nodes.js +480 -0
- package/dist/features/composites/nodes.js.map +1 -0
- package/dist/features/composites/outline.d.ts +35 -0
- package/dist/features/composites/outline.js +69 -0
- package/dist/features/composites/outline.js.map +1 -0
- package/dist/features/composites/react/CompositeChrome.d.ts +16 -0
- package/dist/features/composites/react/CompositeChrome.js +234 -0
- package/dist/features/composites/react/CompositeChrome.js.map +1 -0
- package/dist/features/composites/react/CompositeDetails.d.ts +16 -0
- package/dist/features/composites/react/CompositeDetails.js +149 -0
- package/dist/features/composites/react/CompositeDetails.js.map +1 -0
- package/dist/features/composites/react/CompositeFieldEditor.d.ts +18 -0
- package/dist/features/composites/react/CompositeFieldEditor.js +131 -0
- package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeInspector.d.ts +23 -0
- package/dist/features/composites/react/CompositeInspector.js +506 -0
- package/dist/features/composites/react/CompositeInspector.js.map +1 -0
- package/dist/features/composites/react/CompositeStatusMenu.d.ts +15 -0
- package/dist/features/composites/react/CompositeStatusMenu.js +36 -0
- package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -0
- package/dist/features/composites/react/CompositeSummaryEditor.d.ts +15 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js +85 -0
- package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeTable.d.ts +11 -0
- package/dist/features/composites/react/CompositeTable.js +342 -0
- package/dist/features/composites/react/CompositeTable.js.map +1 -0
- package/dist/features/composites/react/CompositeTagsEditor.d.ts +10 -0
- package/dist/features/composites/react/CompositeTagsEditor.js +122 -0
- package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -0
- package/dist/features/composites/react/CompositeView.d.ts +6 -0
- package/dist/features/composites/react/CompositeView.js +30 -0
- package/dist/features/composites/react/CompositeView.js.map +1 -0
- package/dist/features/composites/react/SettingsEditingTab.d.ts +8 -0
- package/dist/features/composites/react/SettingsEditingTab.js +153 -0
- package/dist/features/composites/react/SettingsEditingTab.js.map +1 -0
- package/dist/features/composites/react/use-composite-anchors.d.ts +17 -0
- package/dist/features/composites/react/use-composite-anchors.js +46 -0
- package/dist/features/composites/react/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/react/use-composite-rows.d.ts +11 -0
- package/dist/features/composites/react/use-composite-rows.js +26 -0
- package/dist/features/composites/react/use-composite-rows.js.map +1 -0
- package/dist/features/composites/react.d.ts +24 -0
- package/dist/features/composites/react.js +30 -0
- package/dist/features/composites/react.js.map +1 -0
- package/dist/features/composites/rows-model.d.ts +38 -0
- package/dist/features/composites/rows-model.js +92 -0
- package/dist/features/composites/rows-model.js.map +1 -0
- package/dist/features/composites/rows.d.ts +76 -0
- package/dist/features/composites/rows.js +159 -0
- package/dist/features/composites/rows.js.map +1 -0
- package/dist/features/composites/schema.d.ts +21 -0
- package/dist/features/composites/schema.js +26 -0
- package/dist/features/composites/schema.js.map +1 -0
- package/dist/features/composites/structure-mode.d.ts +11 -0
- package/dist/features/composites/structure-mode.js +16 -0
- package/dist/features/composites/structure-mode.js.map +1 -0
- package/dist/features/composites/structure.d.ts +19 -0
- package/dist/features/composites/structure.js +19 -0
- package/dist/features/composites/structure.js.map +1 -0
- package/dist/features/composites/table-model.js +117 -0
- package/dist/features/composites/table-model.js.map +1 -0
- package/dist/features/composites/tree-root.d.ts +11 -0
- package/dist/features/composites/tree-root.js +16 -0
- package/dist/features/composites/tree-root.js.map +1 -0
- package/dist/features/composites/use-composite-anchors.d.ts +18 -0
- package/dist/features/composites/use-composite-anchors.js +42 -0
- package/dist/features/composites/use-composite-anchors.js.map +1 -0
- package/dist/features/composites/use-composite-rows.d.ts +25 -0
- package/dist/features/composites/use-composite-rows.js +28 -0
- package/dist/features/composites/use-composite-rows.js.map +1 -0
- package/dist/features/composites/vue.d.ts +23 -0
- package/dist/features/composites/vue.js +30 -0
- package/dist/features/composites/vue.js.map +1 -0
- package/dist/features/media/assets.d.ts +30 -0
- package/dist/features/media/assets.js +26 -0
- package/dist/features/media/assets.js.map +1 -0
- package/dist/features/media/audio-recorder.d.ts +25 -0
- package/dist/features/media/audio-recorder.js +123 -0
- package/dist/features/media/audio-recorder.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.js +152 -0
- package/dist/features/media/components/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/components/AudioRecorderModal.vue.d.ts +15 -0
- package/dist/features/media/components/AudioView.js +46 -0
- package/dist/features/media/components/AudioView.js.map +1 -0
- package/dist/features/media/components/FileView.js +73 -0
- package/dist/features/media/components/FileView.js.map +1 -0
- package/dist/features/media/components/VideoView.js +47 -0
- package/dist/features/media/components/VideoView.js.map +1 -0
- package/dist/features/media/feature.d.ts +22 -0
- package/dist/features/media/feature.js +101 -0
- package/dist/features/media/feature.js.map +1 -0
- package/dist/features/media/file-import.d.ts +21 -0
- package/dist/features/media/file-import.js +76 -0
- package/dist/features/media/file-import.js.map +1 -0
- package/dist/features/media/index.d.ts +7 -0
- package/dist/features/media/index.js +7 -0
- package/dist/features/media/node-views.d.ts +28 -0
- package/dist/features/media/node-views.js +28 -0
- package/dist/features/media/node-views.js.map +1 -0
- package/dist/features/media/react/AudioRecorderModal.d.ts +12 -0
- package/dist/features/media/react/AudioRecorderModal.js +147 -0
- package/dist/features/media/react/AudioRecorderModal.js.map +1 -0
- package/dist/features/media/react/AudioView.js +32 -0
- package/dist/features/media/react/AudioView.js.map +1 -0
- package/dist/features/media/react/FileView.js +61 -0
- package/dist/features/media/react/FileView.js.map +1 -0
- package/dist/features/media/react/TitleField.js +30 -0
- package/dist/features/media/react/TitleField.js.map +1 -0
- package/dist/features/media/react/VideoView.js +33 -0
- package/dist/features/media/react/VideoView.js.map +1 -0
- package/dist/features/media/react/use-audio-recorder.d.ts +11 -0
- package/dist/features/media/react/use-audio-recorder.js +21 -0
- package/dist/features/media/react/use-audio-recorder.js.map +1 -0
- package/dist/features/media/react.d.ts +19 -0
- package/dist/features/media/react.js +37 -0
- package/dist/features/media/react.js.map +1 -0
- package/dist/features/media/schema.d.ts +59 -0
- package/dist/features/media/schema.js +194 -0
- package/dist/features/media/schema.js.map +1 -0
- package/dist/features/media/upload.d.ts +41 -0
- package/dist/features/media/upload.js +106 -0
- package/dist/features/media/upload.js.map +1 -0
- package/dist/features/media/use-audio-recorder.d.ts +12 -0
- package/dist/features/media/use-audio-recorder.js +21 -0
- package/dist/features/media/use-audio-recorder.js.map +1 -0
- package/dist/features/media/vue.d.ts +19 -0
- package/dist/features/media/vue.js +35 -0
- package/dist/features/media/vue.js.map +1 -0
- package/dist/features/mentions/index.d.ts +22 -0
- package/dist/features/mentions/index.js +34 -0
- package/dist/features/mentions/index.js.map +1 -0
- package/dist/features/mentions/mention-suggestion.d.ts +11 -0
- package/dist/features/mentions/mention-suggestion.js +34 -0
- package/dist/features/mentions/mention-suggestion.js.map +1 -0
- package/dist/features/mentions/mention-text.d.ts +18 -0
- package/dist/features/mentions/mention-text.js +75 -0
- package/dist/features/mentions/mention-text.js.map +1 -0
- package/dist/features/mentions/mention.d.ts +20 -0
- package/dist/features/mentions/mention.js +33 -0
- package/dist/features/mentions/mention.js.map +1 -0
- package/dist/features/mentions/metadata-defaults.d.ts +8 -0
- package/dist/features/mentions/metadata-defaults.js +30 -0
- package/dist/features/mentions/metadata-defaults.js.map +1 -0
- package/dist/features/mentions/normalize.d.ts +10 -0
- package/dist/features/mentions/normalize.js +31 -0
- package/dist/features/mentions/normalize.js.map +1 -0
- package/dist/features/mentions/schema.d.ts +10 -0
- package/dist/features/mentions/schema.js +10 -0
- package/dist/features/mentions/schema.js.map +1 -0
- package/dist/features/mentions/tag-suggestion.d.ts +11 -0
- package/dist/features/mentions/tag-suggestion.js +45 -0
- package/dist/features/mentions/tag-suggestion.js.map +1 -0
- package/dist/features/mentions/tag.d.ts +43 -0
- package/dist/features/mentions/tag.js +155 -0
- package/dist/features/mentions/tag.js.map +1 -0
- package/dist/features/tables/feature.d.ts +14 -0
- package/dist/features/tables/feature.js +100 -0
- package/dist/features/tables/feature.js.map +1 -0
- package/dist/features/tables/index.d.ts +3 -0
- package/dist/features/tables/index.js +3 -0
- package/dist/features/tables/schema.d.ts +6 -0
- package/dist/features/tables/schema.js +27 -0
- package/dist/features/tables/schema.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js +227 -0
- package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/components/SettingsAppearanceTab.vue.d.ts +6 -0
- package/dist/features/themes/feature.d.ts +24 -0
- package/dist/features/themes/feature.js +25 -0
- package/dist/features/themes/feature.js.map +1 -0
- package/dist/features/themes/index.d.ts +6 -0
- package/dist/features/themes/index.js +6 -0
- package/dist/features/themes/react/SettingsAppearanceTab.d.ts +5 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js +221 -0
- package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -0
- package/dist/features/themes/react.d.ts +13 -0
- package/dist/features/themes/react.js +15 -0
- package/dist/features/themes/react.js.map +1 -0
- package/dist/features/themes/schema.d.ts +21 -0
- package/dist/features/themes/schema.js +16 -0
- package/dist/features/themes/schema.js.map +1 -0
- package/dist/features/themes/scope-css.d.ts +5 -0
- package/dist/features/themes/scope-css.js +142 -0
- package/dist/features/themes/scope-css.js.map +1 -0
- package/dist/features/themes/theme-runtime.d.ts +14 -0
- package/dist/features/themes/theme-runtime.js +147 -0
- package/dist/features/themes/theme-runtime.js.map +1 -0
- package/dist/features/themes/vue.d.ts +13 -0
- package/dist/features/themes/vue.js +29 -0
- package/dist/features/themes/vue.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.js +169 -0
- package/dist/features/transcript/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/TranscriptSegmentView.vue.d.ts +96 -0
- package/dist/features/transcript/convert.d.ts +11 -0
- package/dist/features/transcript/convert.js +40 -0
- package/dist/features/transcript/convert.js.map +1 -0
- package/dist/features/transcript/feature.d.ts +25 -0
- package/dist/features/transcript/feature.js +59 -0
- package/dist/features/transcript/feature.js.map +1 -0
- package/dist/features/transcript/index.d.ts +7 -0
- package/dist/features/transcript/index.js +7 -0
- package/dist/features/transcript/react/TranscriptSegmentView.d.ts +6 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js +155 -0
- package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -0
- package/dist/features/transcript/react.d.ts +9 -0
- package/dist/features/transcript/react.js +12 -0
- package/dist/features/transcript/react.js.map +1 -0
- package/dist/features/transcript/schema.d.ts +9 -0
- package/dist/features/transcript/schema.js +9 -0
- package/dist/features/transcript/schema.js.map +1 -0
- package/dist/features/transcript/segment-node.d.ts +21 -0
- package/dist/features/transcript/segment-node.js +113 -0
- package/dist/features/transcript/segment-node.js.map +1 -0
- package/dist/features/transcript/segment.d.ts +10 -0
- package/dist/features/transcript/segment.js +26 -0
- package/dist/features/transcript/segment.js.map +1 -0
- package/dist/features/transcript/speakers.d.ts +8 -0
- package/dist/features/transcript/speakers.js +22 -0
- package/dist/features/transcript/speakers.js.map +1 -0
- package/dist/features/transcript/vue.d.ts +8 -0
- package/dist/features/transcript/vue.js +12 -0
- package/dist/features/transcript/vue.js.map +1 -0
- package/dist/i18n/de/ai.js +168 -0
- package/dist/i18n/de/ai.js.map +1 -0
- package/dist/i18n/de/authors.js +21 -0
- package/dist/i18n/de/authors.js.map +1 -0
- package/dist/i18n/de/block.js +16 -0
- package/dist/i18n/de/block.js.map +1 -0
- package/dist/i18n/de/comments.js +35 -0
- package/dist/i18n/de/comments.js.map +1 -0
- package/dist/i18n/de/common.js +10 -0
- package/dist/i18n/de/common.js.map +1 -0
- package/dist/i18n/de/composites.js +147 -0
- package/dist/i18n/de/composites.js.map +1 -0
- package/dist/i18n/de/integrations.js +42 -0
- package/dist/i18n/de/integrations.js.map +1 -0
- package/dist/i18n/de/markdown.js +16 -0
- package/dist/i18n/de/markdown.js.map +1 -0
- package/dist/i18n/de/media.js +27 -0
- package/dist/i18n/de/media.js.map +1 -0
- package/dist/i18n/de/mentions.js +10 -0
- package/dist/i18n/de/mentions.js.map +1 -0
- package/dist/i18n/de/outline.js +9 -0
- package/dist/i18n/de/outline.js.map +1 -0
- package/dist/i18n/de/settings.js +12 -0
- package/dist/i18n/de/settings.js.map +1 -0
- package/dist/i18n/de/tables.js +15 -0
- package/dist/i18n/de/tables.js.map +1 -0
- package/dist/i18n/de/themes.js +26 -0
- package/dist/i18n/de/themes.js.map +1 -0
- package/dist/i18n/de/toolbar.js +22 -0
- package/dist/i18n/de/toolbar.js.map +1 -0
- package/dist/i18n/de/transcript.js +10 -0
- package/dist/i18n/de/transcript.js.map +1 -0
- package/dist/i18n/de/tree.js +31 -0
- package/dist/i18n/de/tree.js.map +1 -0
- package/dist/i18n/de.d.ts +502 -0
- package/dist/i18n/de.js +42 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/en/ai.js +168 -0
- package/dist/i18n/en/ai.js.map +1 -0
- package/dist/i18n/en/authors.js +21 -0
- package/dist/i18n/en/authors.js.map +1 -0
- package/dist/i18n/en/block.js +16 -0
- package/dist/i18n/en/block.js.map +1 -0
- package/dist/i18n/en/comments.js +35 -0
- package/dist/i18n/en/comments.js.map +1 -0
- package/dist/i18n/en/common.js +10 -0
- package/dist/i18n/en/common.js.map +1 -0
- package/dist/i18n/en/composites.js +145 -0
- package/dist/i18n/en/composites.js.map +1 -0
- package/dist/i18n/en/integrations.js +42 -0
- package/dist/i18n/en/integrations.js.map +1 -0
- package/dist/i18n/en/markdown.js +16 -0
- package/dist/i18n/en/markdown.js.map +1 -0
- package/dist/i18n/en/media.js +27 -0
- package/dist/i18n/en/media.js.map +1 -0
- package/dist/i18n/en/mentions.js +10 -0
- package/dist/i18n/en/mentions.js.map +1 -0
- package/dist/i18n/en/outline.js +9 -0
- package/dist/i18n/en/outline.js.map +1 -0
- package/dist/i18n/en/settings.js +12 -0
- package/dist/i18n/en/settings.js.map +1 -0
- package/dist/i18n/en/tables.js +15 -0
- package/dist/i18n/en/tables.js.map +1 -0
- package/dist/i18n/en/themes.js +26 -0
- package/dist/i18n/en/themes.js.map +1 -0
- package/dist/i18n/en/toolbar.js +22 -0
- package/dist/i18n/en/toolbar.js.map +1 -0
- package/dist/i18n/en/transcript.js +10 -0
- package/dist/i18n/en/transcript.js.map +1 -0
- package/dist/i18n/en/tree.js +31 -0
- package/dist/i18n/en/tree.js.map +1 -0
- package/dist/i18n/en.js +42 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.js +31 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +0 -0
- package/dist/integrations/composite-ai/composite-fill.d.ts +17 -0
- package/dist/integrations/composite-ai/composite-fill.js +129 -0
- package/dist/integrations/composite-ai/composite-fill.js.map +1 -0
- package/dist/integrations/composite-ai/composite-summary.d.ts +28 -0
- package/dist/integrations/composite-ai/composite-summary.js +143 -0
- package/dist/integrations/composite-ai/composite-summary.js.map +1 -0
- package/dist/integrations/composite-ai/document-transcribe.d.ts +14 -0
- package/dist/integrations/composite-ai/document-transcribe.js +89 -0
- package/dist/integrations/composite-ai/document-transcribe.js.map +1 -0
- package/dist/integrations/composite-ai/index.d.ts +22 -0
- package/dist/integrations/composite-ai/index.js +80 -0
- package/dist/integrations/composite-ai/index.js.map +1 -0
- package/dist/integrations/composite-media/index.d.ts +19 -0
- package/dist/integrations/composite-media/index.js +72 -0
- package/dist/integrations/composite-media/index.js.map +1 -0
- package/dist/integrations/transcript-ai/index.d.ts +16 -0
- package/dist/integrations/transcript-ai/index.js +63 -0
- package/dist/integrations/transcript-ai/index.js.map +1 -0
- package/dist/integrations/transcript-ai/protocol.d.ts +68 -0
- package/dist/integrations/transcript-ai/protocol.js +132 -0
- package/dist/integrations/transcript-ai/protocol.js.map +1 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +35 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js +169 -0
- package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -0
- package/dist/markdown/MarkdownSurface.d.ts +25 -0
- package/dist/markdown/MarkdownSurface.js +93 -0
- package/dist/markdown/MarkdownSurface.js.map +1 -0
- package/dist/markdown/MarkdownSurface.vue.d.ts +76 -0
- package/dist/markdown/MarkdownSurface2.js +237 -0
- package/dist/markdown/MarkdownSurface2.js.map +1 -0
- package/dist/markdown/clipboard.d.ts +17 -0
- package/dist/markdown/clipboard.js +125 -0
- package/dist/markdown/clipboard.js.map +1 -0
- package/dist/markdown/document.d.ts +36 -0
- package/dist/markdown/document.js +100 -0
- package/dist/markdown/document.js.map +1 -0
- package/dist/markdown/frontmatter.d.ts +18 -0
- package/dist/markdown/frontmatter.js +32 -0
- package/dist/markdown/frontmatter.js.map +1 -0
- package/dist/markdown/index.d.ts +6 -0
- package/dist/markdown/index.js +6 -0
- package/dist/markdown/policy.d.ts +34 -0
- package/dist/markdown/policy.js +78 -0
- package/dist/markdown/policy.js.map +1 -0
- package/dist/markdown/react.d.ts +2 -0
- package/dist/markdown/react.js +1 -0
- package/dist/markdown/source-mode.d.ts +49 -0
- package/dist/markdown/source-mode.js +86 -0
- package/dist/markdown/source-mode.js.map +1 -0
- package/dist/markdown/vue.d.ts +2 -0
- package/dist/markdown/vue.js +1 -0
- package/dist/nuxt/module.d.ts +62 -0
- package/dist/nuxt/module.js +101 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/install-context.d.ts +16 -0
- package/dist/nuxt/runtime/install-context.js +25 -0
- package/dist/nuxt/runtime/install-context.js.map +1 -0
- package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/chat.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/complete.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/generate.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/models.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcribe.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js +8 -0
- package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/settings.put.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/tags.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.get.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/themes/index.post.js.map +1 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.d.ts +5 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js +8 -0
- package/dist/nuxt/runtime/server/api/editor/users.get.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/collab.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/collab.js +10 -0
- package/dist/nuxt/runtime/server/plugins/collab.js.map +1 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.d.ts +5 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js +20 -0
- package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].d.ts +5 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js +35 -0
- package/dist/nuxt/runtime/server/routes/collab/[id].js.map +1 -0
- package/dist/nuxt/runtime/server/utils/editor-route.d.ts +11 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js +49 -0
- package/dist/nuxt/runtime/server/utils/editor-route.js.map +1 -0
- package/dist/outline/EditorOutline.js +124 -0
- package/dist/outline/EditorOutline.js.map +1 -0
- package/dist/outline/EditorOutline.vue.d.ts +15 -0
- package/dist/outline/heading-outline.d.ts +26 -0
- package/dist/outline/heading-outline.js +46 -0
- package/dist/outline/heading-outline.js.map +1 -0
- package/dist/outline/index.d.ts +2 -0
- package/dist/outline/index.js +1 -0
- package/dist/outline/react/EditorOutline.d.ts +12 -0
- package/dist/outline/react/EditorOutline.js +112 -0
- package/dist/outline/react/EditorOutline.js.map +1 -0
- package/dist/outline/react.d.ts +2 -0
- package/dist/outline/react.js +1 -0
- package/dist/outline/vue.d.ts +2 -0
- package/dist/outline/vue.js +1 -0
- package/dist/presets/advanced.d.ts +33 -0
- package/dist/presets/advanced.js +50 -0
- package/dist/presets/advanced.js.map +1 -0
- package/dist/presets/simple.d.ts +9 -0
- package/dist/presets/simple.js +12 -0
- package/dist/presets/simple.js.map +1 -0
- package/dist/react/AdvancedEditor.d.ts +23 -0
- package/dist/react/AdvancedEditor.js +24 -0
- package/dist/react/AdvancedEditor.js.map +1 -0
- package/dist/react/EditorSettingsModal.d.ts +14 -0
- package/dist/react/EditorSettingsModal.js +40 -0
- package/dist/react/EditorSettingsModal.js.map +1 -0
- package/dist/react/EditorSettingsPanel.d.ts +18 -0
- package/dist/react/EditorSettingsPanel.js +40 -0
- package/dist/react/EditorSettingsPanel.js.map +1 -0
- package/dist/react/EditorSurface.d.ts +61 -0
- package/dist/react/EditorSurface.js +277 -0
- package/dist/react/EditorSurface.js.map +1 -0
- package/dist/react/EditorToolbar.d.ts +15 -0
- package/dist/react/EditorToolbar.js +182 -0
- package/dist/react/EditorToolbar.js.map +1 -0
- package/dist/react/Icon.d.ts +13 -0
- package/dist/react/Icon.js +19 -0
- package/dist/react/Icon.js.map +1 -0
- package/dist/react/SettingsSection.d.ts +10 -0
- package/dist/react/SettingsSection.js +22 -0
- package/dist/react/SettingsSection.js.map +1 -0
- package/dist/react/SimpleEditor.d.ts +27 -0
- package/dist/react/SimpleEditor.js +22 -0
- package/dist/react/SimpleEditor.js.map +1 -0
- package/dist/react/advanced-preset.d.ts +11 -0
- package/dist/react/advanced-preset.js +31 -0
- package/dist/react/advanced-preset.js.map +1 -0
- package/dist/react/advanced.d.ts +4 -0
- package/dist/react/advanced.js +3 -0
- package/dist/react/context.d.ts +12 -0
- package/dist/react/context.js +21 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/editor-ui.d.ts +14 -0
- package/dist/react/editor-ui.js +20 -0
- package/dist/react/editor-ui.js.map +1 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.js +17 -0
- package/dist/react/notify.d.ts +6 -0
- package/dist/react/notify.js +25 -0
- package/dist/react/notify.js.map +1 -0
- package/dist/react/settings.d.ts +17 -0
- package/dist/react/settings.js +27 -0
- package/dist/react/settings.js.map +1 -0
- package/dist/react/simple.d.ts +2 -0
- package/dist/react/simple.js +1 -0
- package/dist/react/styles/advanced.css +18 -0
- package/dist/react/styles/themes-bridge.css +26 -0
- package/dist/react/styles/ui-vars.css +20 -0
- package/dist/react/suggestion-renderer.d.ts +12 -0
- package/dist/react/suggestion-renderer.js +90 -0
- package/dist/react/suggestion-renderer.js.map +1 -0
- package/dist/react/ui/alert.js +38 -0
- package/dist/react/ui/alert.js.map +1 -0
- package/dist/react/ui/avatar.js +24 -0
- package/dist/react/ui/avatar.js.map +1 -0
- package/dist/react/ui/badge.js +30 -0
- package/dist/react/ui/badge.js.map +1 -0
- package/dist/react/ui/button.js +50 -0
- package/dist/react/ui/button.js.map +1 -0
- package/dist/react/ui/collapsible.js +19 -0
- package/dist/react/ui/collapsible.js.map +1 -0
- package/dist/react/ui/command.js +47 -0
- package/dist/react/ui/command.js.map +1 -0
- package/dist/react/ui/dialog.js +88 -0
- package/dist/react/ui/dialog.js.map +1 -0
- package/dist/react/ui/dropdown-menu.js +70 -0
- package/dist/react/ui/dropdown-menu.js.map +1 -0
- package/dist/react/ui/input-group.js +57 -0
- package/dist/react/ui/input-group.js.map +1 -0
- package/dist/react/ui/input.js +16 -0
- package/dist/react/ui/input.js.map +1 -0
- package/dist/react/ui/label.js +17 -0
- package/dist/react/ui/label.js.map +1 -0
- package/dist/react/ui/popover.js +36 -0
- package/dist/react/ui/popover.js.map +1 -0
- package/dist/react/ui/radio-group.js +29 -0
- package/dist/react/ui/radio-group.js.map +1 -0
- package/dist/react/ui/select.js +88 -0
- package/dist/react/ui/select.js.map +1 -0
- package/dist/react/ui/separator.js +18 -0
- package/dist/react/ui/separator.js.map +1 -0
- package/dist/react/ui/switch.js +21 -0
- package/dist/react/ui/switch.js.map +1 -0
- package/dist/react/ui/table.js +44 -0
- package/dist/react/ui/table.js.map +1 -0
- package/dist/react/ui/tabs.js +41 -0
- package/dist/react/ui/tabs.js.map +1 -0
- package/dist/react/ui/textarea.js +15 -0
- package/dist/react/ui/textarea.js.map +1 -0
- package/dist/react/ui/tooltip.js +37 -0
- package/dist/react/ui/tooltip.js.map +1 -0
- package/dist/react/ui/utils.d.ts +5 -0
- package/dist/react/ui/utils.js +10 -0
- package/dist/react/ui/utils.js.map +1 -0
- package/dist/react/use-editor-i18n.d.ts +12 -0
- package/dist/react/use-editor-i18n.js +17 -0
- package/dist/react/use-editor-i18n.js.map +1 -0
- package/dist/react/use-notifier.d.ts +11 -0
- package/dist/react/use-notifier.js +25 -0
- package/dist/react/use-notifier.js.map +1 -0
- package/dist/react/use-store.d.ts +6 -0
- package/dist/react/use-store.js +10 -0
- package/dist/react/use-store.js.map +1 -0
- package/dist/schema/advanced.d.ts +14 -0
- package/dist/schema/advanced.js +43 -0
- package/dist/schema/advanced.js.map +1 -0
- package/dist/schema/simple.d.ts +10 -0
- package/dist/schema/simple.js +13 -0
- package/dist/schema/simple.js.map +1 -0
- package/dist/server/adapter.d.ts +101 -0
- package/dist/server/ai.d.ts +101 -0
- package/dist/server/ai.js +105 -0
- package/dist/server/ai.js.map +1 -0
- package/dist/server/collab-state.d.ts +16 -0
- package/dist/server/collab-state.js +43 -0
- package/dist/server/collab-state.js.map +1 -0
- package/dist/server/collab.d.ts +68 -0
- package/dist/server/collab.js +187 -0
- package/dist/server/collab.js.map +1 -0
- package/dist/server/errors.d.ts +17 -0
- package/dist/server/errors.js +26 -0
- package/dist/server/errors.js.map +1 -0
- package/dist/server/handlers/ai.d.ts +223 -0
- package/dist/server/handlers/ai.js +422 -0
- package/dist/server/handlers/ai.js.map +1 -0
- package/dist/server/handlers/context.d.ts +64 -0
- package/dist/server/handlers/context.js +85 -0
- package/dist/server/handlers/context.js.map +1 -0
- package/dist/server/handlers/editor.d.ts +107 -0
- package/dist/server/handlers/editor.js +241 -0
- package/dist/server/handlers/editor.js.map +1 -0
- package/dist/server/handlers/index.d.ts +4 -0
- package/dist/server/handlers/index.js +4 -0
- package/dist/server/host.d.ts +61 -0
- package/dist/server/host.js +105 -0
- package/dist/server/host.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +7 -0
- package/dist/server/node.d.ts +24 -0
- package/dist/server/node.js +54 -0
- package/dist/server/node.js.map +1 -0
- package/dist/server/rate-limit.d.ts +22 -0
- package/dist/server/rate-limit.js +34 -0
- package/dist/server/rate-limit.js.map +1 -0
- package/dist/settings/index.d.ts +110 -0
- package/dist/settings/index.js +114 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/values.d.ts +35 -0
- package/dist/settings/values.js +41 -0
- package/dist/settings/values.js.map +1 -0
- package/dist/styles/ai.css +77 -0
- package/dist/styles/authors.css +18 -0
- package/dist/styles/block-ui.css +16 -0
- package/dist/styles/collab.css +26 -0
- package/dist/styles/comments.css +11 -0
- package/dist/styles/composites.css +56 -0
- package/dist/styles/core.css +99 -0
- package/dist/styles/media.css +8 -0
- package/dist/styles/mentions.css +24 -0
- package/dist/styles/tables.css +25 -0
- package/dist/styles/themes.css +622 -0
- package/dist/styles/tokens.css +29 -0
- package/dist/styles/transcript.css +13 -0
- package/dist/tree/DocumentTree.js +595 -0
- package/dist/tree/DocumentTree.js.map +1 -0
- package/dist/tree/DocumentTree.vue.d.ts +36 -0
- package/dist/tree/folder-paths.js +11 -0
- package/dist/tree/folder-paths.js.map +1 -0
- package/dist/tree/index.d.ts +4 -0
- package/dist/tree/index.js +1 -0
- package/dist/tree/react/DocumentTree.d.ts +24 -0
- package/dist/tree/react/DocumentTree.js +579 -0
- package/dist/tree/react/DocumentTree.js.map +1 -0
- package/dist/tree/react/use-tree-view.d.ts +14 -0
- package/dist/tree/react/use-tree-view.js +21 -0
- package/dist/tree/react/use-tree-view.js.map +1 -0
- package/dist/tree/react.d.ts +3 -0
- package/dist/tree/react.js +3 -0
- package/dist/tree/store.d.ts +45 -0
- package/dist/tree/tree-items.js +221 -0
- package/dist/tree/tree-items.js.map +1 -0
- package/dist/tree/tree-view-model.d.ts +29 -0
- package/dist/tree/tree-view-model.js +71 -0
- package/dist/tree/tree-view-model.js.map +1 -0
- package/dist/tree/tree-view.d.ts +15 -0
- package/dist/tree/tree-view.js +21 -0
- package/dist/tree/tree-view.js.map +1 -0
- package/dist/tree/types.d.ts +23 -0
- package/dist/tree/types.js +0 -0
- package/dist/tree/vue.d.ts +3 -0
- package/dist/tree/vue.js +3 -0
- package/dist/vue/AdvancedEditor.js +100 -0
- package/dist/vue/AdvancedEditor.js.map +1 -0
- package/dist/vue/AdvancedEditor.vue.d.ts +71 -0
- package/dist/vue/SimpleEditor.js +61 -0
- package/dist/vue/SimpleEditor.js.map +1 -0
- package/dist/vue/SimpleEditor.vue.d.ts +36 -0
- package/dist/vue/advanced-preset.d.ts +13 -0
- package/dist/vue/advanced-preset.js +33 -0
- package/dist/vue/advanced-preset.js.map +1 -0
- package/dist/vue/advanced.d.ts +3 -0
- package/dist/vue/advanced.js +3 -0
- package/dist/vue/components/EditorSettingsModal.js +69 -0
- package/dist/vue/components/EditorSettingsModal.js.map +1 -0
- package/dist/vue/components/EditorSettingsModal.vue.d.ts +24 -0
- package/dist/vue/components/EditorSettingsPanel.js +58 -0
- package/dist/vue/components/EditorSettingsPanel.js.map +1 -0
- package/dist/vue/components/EditorSettingsPanel.vue.d.ts +29 -0
- package/dist/vue/components/EditorSurface.js +229 -0
- package/dist/vue/components/EditorSurface.js.map +1 -0
- package/dist/vue/components/EditorSurface.vue.d.ts +68 -0
- package/dist/vue/components/EditorToolbar.js +189 -0
- package/dist/vue/components/EditorToolbar.js.map +1 -0
- package/dist/vue/components/EditorToolbar.vue.d.ts +17 -0
- package/dist/vue/components/SettingsSection.js +26 -0
- package/dist/vue/components/SettingsSection.js.map +1 -0
- package/dist/vue/components/SettingsSection.vue.d.ts +21 -0
- package/dist/vue/components/SuggestionList.js +91 -0
- package/dist/vue/components/SuggestionList.js.map +1 -0
- package/dist/vue/components/SuggestionList.vue.d.ts +19 -0
- package/dist/vue/context.d.ts +24 -0
- package/dist/vue/context.js +42 -0
- package/dist/vue/context.js.map +1 -0
- package/dist/vue/index.d.ts +26 -0
- package/dist/vue/index.js +16 -0
- package/dist/vue/kit/index.d.ts +3 -0
- package/dist/vue/kit/index.js +1 -0
- package/dist/vue/kit/nuxt-ui.css +24 -0
- package/dist/vue/kit/nuxt-ui.d.ts +31 -0
- package/dist/vue/kit/nuxt-ui.js +101 -0
- package/dist/vue/kit/nuxt-ui.js.map +1 -0
- package/dist/vue/kit/types.d.ts +370 -0
- package/dist/vue/kit/use-ui-kit.d.ts +12 -0
- package/dist/vue/kit/use-ui-kit.js +17 -0
- package/dist/vue/kit/use-ui-kit.js.map +1 -0
- package/dist/vue/notify.d.ts +12 -0
- package/dist/vue/notify.js +27 -0
- package/dist/vue/notify.js.map +1 -0
- package/dist/vue/settings.d.ts +16 -0
- package/dist/vue/settings.js +64 -0
- package/dist/vue/settings.js.map +1 -0
- package/dist/vue/simple.d.ts +2 -0
- package/dist/vue/simple.js +1 -0
- package/dist/vue/store-ref.d.ts +20 -0
- package/dist/vue/store-ref.js +59 -0
- package/dist/vue/store-ref.js.map +1 -0
- package/dist/vue/suggestion-renderer.d.ts +6 -0
- package/dist/vue/suggestion-renderer.js +20 -0
- package/dist/vue/suggestion-renderer.js.map +1 -0
- package/dist/vue/use-editor-i18n.d.ts +12 -0
- package/dist/vue/use-editor-i18n.js +17 -0
- package/dist/vue/use-editor-i18n.js.map +1 -0
- package/dist/vue/use-editor-ui.d.ts +15 -0
- package/dist/vue/use-editor-ui.js +23 -0
- package/dist/vue/use-editor-ui.js.map +1 -0
- package/dist/vue/use-notifier.d.ts +11 -0
- package/dist/vue/use-notifier.js +19 -0
- package/dist/vue/use-notifier.js.map +1 -0
- package/docs/extending.md +538 -0
- package/docs/integration.md +537 -0
- package/docs/llms.md +375 -0
- package/docs/usage.md +1071 -0
- package/package.json +619 -4
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
2
|
+
import { cn } from "../../../react/ui/utils.js";
|
|
3
|
+
import { Icon } from "../../../react/Icon.js";
|
|
4
|
+
import { useEditorSettings } from "../../../react/settings.js";
|
|
5
|
+
import { Button } from "../../../react/ui/button.js";
|
|
6
|
+
import { CommentComposer } from "./CommentComposer.js";
|
|
7
|
+
import { CommentAvatar } from "./CommentAvatar.js";
|
|
8
|
+
import { CommentThreadView } from "./CommentThreadView.js";
|
|
9
|
+
import { useComments } from "./use-comments.js";
|
|
10
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region src/features/comments/react/CommentsMargin.tsx
|
|
13
|
+
const GAP = 8;
|
|
14
|
+
const DRAFT = "__draft";
|
|
15
|
+
const excerpt = (text) => text.length > 60 ? `${text.slice(0, 60)}…` : text;
|
|
16
|
+
function sameTops(a, b) {
|
|
17
|
+
const keys = Object.keys(a);
|
|
18
|
+
return keys.length === Object.keys(b).length && keys.every((key) => a[key] === b[key]);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Comments margin („Randspalte“): a column the host places inside its scroll container right of the editor, so it
|
|
22
|
+
* scrolls with the text. Cards sit at the height of their text, the active thread is expanded; shown only while `open`
|
|
23
|
+
* and the user's comments layout is `margin`.
|
|
24
|
+
*/
|
|
25
|
+
function CommentsMargin({ editor, container, open = true }) {
|
|
26
|
+
const { settings } = useEditorSettings();
|
|
27
|
+
const { t } = useEditorI18n();
|
|
28
|
+
const enabled = settings.editing.commentsLayout === "margin";
|
|
29
|
+
const comments = useComments(enabled ? editor : void 0);
|
|
30
|
+
/** Draft and open threads with a text range, in document order. */
|
|
31
|
+
const positioned = useMemo(() => {
|
|
32
|
+
const items = [];
|
|
33
|
+
if (comments.draft) items.push({
|
|
34
|
+
key: DRAFT,
|
|
35
|
+
from: comments.draft.from,
|
|
36
|
+
thread: null
|
|
37
|
+
});
|
|
38
|
+
for (const thread of comments.open) {
|
|
39
|
+
const range = comments.ranges.get(thread.id);
|
|
40
|
+
if (range) items.push({
|
|
41
|
+
key: thread.id,
|
|
42
|
+
from: range.from,
|
|
43
|
+
thread
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return items.sort((a, b) => a.from - b.from);
|
|
47
|
+
}, [
|
|
48
|
+
comments.draft,
|
|
49
|
+
comments.open,
|
|
50
|
+
comments.ranges
|
|
51
|
+
]);
|
|
52
|
+
const orphans = useMemo(() => comments.open.filter((thread) => !comments.ranges.has(thread.id)), [comments.open, comments.ranges]);
|
|
53
|
+
const [showResolved, setShowResolved] = useState(false);
|
|
54
|
+
const [tops, setTops] = useState({});
|
|
55
|
+
const [resolvedTop, setResolvedTop] = useState(0);
|
|
56
|
+
const [minHeight, setMinHeight] = useState(0);
|
|
57
|
+
const [layout] = useState(() => ({
|
|
58
|
+
observer: null,
|
|
59
|
+
observed: /* @__PURE__ */ new WeakSet(),
|
|
60
|
+
cards: /* @__PURE__ */ new Map(),
|
|
61
|
+
frame: 0,
|
|
62
|
+
column: null,
|
|
63
|
+
resolvedSection: null
|
|
64
|
+
}));
|
|
65
|
+
const latest = useRef({
|
|
66
|
+
editor,
|
|
67
|
+
positioned,
|
|
68
|
+
orphans
|
|
69
|
+
});
|
|
70
|
+
latest.current = {
|
|
71
|
+
editor,
|
|
72
|
+
positioned,
|
|
73
|
+
orphans
|
|
74
|
+
};
|
|
75
|
+
const observe = useCallback((el) => {
|
|
76
|
+
if (!layout.observer || layout.observed.has(el)) return;
|
|
77
|
+
layout.observed.add(el);
|
|
78
|
+
layout.observer.observe(el);
|
|
79
|
+
}, [layout]);
|
|
80
|
+
const unobserve = useCallback((el) => {
|
|
81
|
+
layout.observer?.unobserve(el);
|
|
82
|
+
layout.observed.delete(el);
|
|
83
|
+
}, [layout]);
|
|
84
|
+
const relayout = useCallback(() => {
|
|
85
|
+
layout.frame = 0;
|
|
86
|
+
const { editor: instance, positioned: items, orphans: lost } = latest.current;
|
|
87
|
+
const col = layout.column;
|
|
88
|
+
if (!instance || instance.isDestroyed || !col || !col.getClientRects().length) return;
|
|
89
|
+
const live = /* @__PURE__ */ new Set([...items.map((i) => i.key), ...lost.map((t) => t.id)]);
|
|
90
|
+
for (const [key, el] of layout.cards) {
|
|
91
|
+
if (live.has(key)) continue;
|
|
92
|
+
unobserve(el);
|
|
93
|
+
layout.cards.delete(key);
|
|
94
|
+
}
|
|
95
|
+
const base = col.getBoundingClientRect().top;
|
|
96
|
+
const size = instance.state.doc.content.size;
|
|
97
|
+
const next = {};
|
|
98
|
+
let bottom = -8;
|
|
99
|
+
for (const item of items) {
|
|
100
|
+
let desired = bottom + GAP;
|
|
101
|
+
try {
|
|
102
|
+
desired = instance.view.coordsAtPos(Math.min(item.from, size)).top - base;
|
|
103
|
+
} catch {}
|
|
104
|
+
const top = Math.max(desired, bottom + GAP, 0);
|
|
105
|
+
next[item.key] = top;
|
|
106
|
+
bottom = top + (layout.cards.get(item.key)?.offsetHeight ?? 0);
|
|
107
|
+
}
|
|
108
|
+
for (const thread of lost) {
|
|
109
|
+
const top = bottom + GAP;
|
|
110
|
+
next[thread.id] = top;
|
|
111
|
+
bottom = top + (layout.cards.get(thread.id)?.offsetHeight ?? 0);
|
|
112
|
+
}
|
|
113
|
+
const nextResolvedTop = bottom < 0 ? 0 : bottom + 16;
|
|
114
|
+
setTops((previous) => sameTops(previous, next) ? previous : next);
|
|
115
|
+
setResolvedTop(nextResolvedTop);
|
|
116
|
+
setMinHeight(nextResolvedTop + (layout.resolvedSection?.offsetHeight ?? 0));
|
|
117
|
+
}, [layout, unobserve]);
|
|
118
|
+
const schedule = useCallback(() => {
|
|
119
|
+
if (layout.frame || typeof requestAnimationFrame === "undefined") return;
|
|
120
|
+
layout.frame = requestAnimationFrame(relayout);
|
|
121
|
+
}, [layout, relayout]);
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
124
|
+
layout.observer = new ResizeObserver(() => schedule());
|
|
125
|
+
layout.observed = /* @__PURE__ */ new WeakSet();
|
|
126
|
+
for (const el of layout.cards.values()) observe(el);
|
|
127
|
+
if (layout.column) observe(layout.column);
|
|
128
|
+
if (layout.resolvedSection) observe(layout.resolvedSection);
|
|
129
|
+
}
|
|
130
|
+
window.addEventListener("resize", schedule);
|
|
131
|
+
schedule();
|
|
132
|
+
return () => {
|
|
133
|
+
window.removeEventListener("resize", schedule);
|
|
134
|
+
layout.observer?.disconnect();
|
|
135
|
+
layout.observer = null;
|
|
136
|
+
if (layout.frame) cancelAnimationFrame(layout.frame);
|
|
137
|
+
layout.frame = 0;
|
|
138
|
+
};
|
|
139
|
+
}, [
|
|
140
|
+
layout,
|
|
141
|
+
observe,
|
|
142
|
+
schedule
|
|
143
|
+
]);
|
|
144
|
+
useEffect(() => {
|
|
145
|
+
if (!editor) return;
|
|
146
|
+
editor.on("transaction", schedule);
|
|
147
|
+
schedule();
|
|
148
|
+
return () => {
|
|
149
|
+
editor.off("transaction", schedule);
|
|
150
|
+
};
|
|
151
|
+
}, [editor, schedule]);
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (!container || !layout.observer) return;
|
|
154
|
+
layout.observer.observe(container);
|
|
155
|
+
return () => layout.observer?.unobserve(container);
|
|
156
|
+
}, [container, layout]);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
schedule();
|
|
159
|
+
}, [
|
|
160
|
+
positioned,
|
|
161
|
+
orphans,
|
|
162
|
+
comments.active,
|
|
163
|
+
comments.resolved.length,
|
|
164
|
+
showResolved,
|
|
165
|
+
enabled,
|
|
166
|
+
schedule
|
|
167
|
+
]);
|
|
168
|
+
const setColumn = useCallback((el) => {
|
|
169
|
+
if (layout.column) unobserve(layout.column);
|
|
170
|
+
layout.column = el;
|
|
171
|
+
if (el) observe(el);
|
|
172
|
+
schedule();
|
|
173
|
+
}, [
|
|
174
|
+
layout,
|
|
175
|
+
observe,
|
|
176
|
+
unobserve,
|
|
177
|
+
schedule
|
|
178
|
+
]);
|
|
179
|
+
const setResolvedSection = useCallback((el) => {
|
|
180
|
+
if (layout.resolvedSection) unobserve(layout.resolvedSection);
|
|
181
|
+
layout.resolvedSection = el;
|
|
182
|
+
if (el) observe(el);
|
|
183
|
+
schedule();
|
|
184
|
+
}, [
|
|
185
|
+
layout,
|
|
186
|
+
observe,
|
|
187
|
+
unobserve,
|
|
188
|
+
schedule
|
|
189
|
+
]);
|
|
190
|
+
const setCard = (key, el) => {
|
|
191
|
+
if (!el) return;
|
|
192
|
+
layout.cards.set(key, el);
|
|
193
|
+
observe(el);
|
|
194
|
+
};
|
|
195
|
+
/** Clicking a card activates (expands) it and reveals its text; clicks inside the already active card do nothing. */
|
|
196
|
+
function select(id) {
|
|
197
|
+
if (comments.active !== id) comments.activate(id, { reveal: true });
|
|
198
|
+
}
|
|
199
|
+
const cardStyle = (key) => ({ top: `${tops[key] ?? 0}px` });
|
|
200
|
+
return /* @__PURE__ */ jsx("div", {
|
|
201
|
+
ref: setColumn,
|
|
202
|
+
className: "relative w-[300px] shrink-0",
|
|
203
|
+
style: {
|
|
204
|
+
minHeight: `${minHeight}px`,
|
|
205
|
+
...open && enabled ? {} : { display: "none" }
|
|
206
|
+
},
|
|
207
|
+
"aria-label": t("comments.title"),
|
|
208
|
+
children: !comments.available ? /* @__PURE__ */ jsx("p", {
|
|
209
|
+
className: "p-3 text-sm text-muted-foreground",
|
|
210
|
+
children: t("comments.unavailable")
|
|
211
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
212
|
+
positioned.map((item) => /* @__PURE__ */ jsx("div", {
|
|
213
|
+
ref: (el) => setCard(item.key, el),
|
|
214
|
+
className: cn("absolute inset-x-0 transition-[top] duration-100", tops[item.key] === void 0 && "invisible"),
|
|
215
|
+
style: cardStyle(item.key),
|
|
216
|
+
children: !item.thread ? /* @__PURE__ */ jsx(CommentComposer, {
|
|
217
|
+
quote: comments.draftQuote,
|
|
218
|
+
className: "shadow-md",
|
|
219
|
+
onSubmit: (text) => {
|
|
220
|
+
comments.add(text);
|
|
221
|
+
},
|
|
222
|
+
onCancel: () => comments.cancelDraft()
|
|
223
|
+
}) : comments.active === item.thread.id ? /* @__PURE__ */ jsx(CommentThreadView, {
|
|
224
|
+
thread: item.thread,
|
|
225
|
+
user: comments.user,
|
|
226
|
+
active: true,
|
|
227
|
+
orphan: false,
|
|
228
|
+
comments,
|
|
229
|
+
className: "shadow-md",
|
|
230
|
+
onClick: () => select(item.thread.id)
|
|
231
|
+
}) : /* @__PURE__ */ jsxs("button", {
|
|
232
|
+
type: "button",
|
|
233
|
+
className: "flex w-full items-center gap-2 rounded-md border border-border bg-background px-2 py-1.5 text-left text-sm hover:bg-muted",
|
|
234
|
+
onClick: () => select(item.thread.id),
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsx(CommentAvatar, {
|
|
237
|
+
name: item.thread.author.name,
|
|
238
|
+
color: item.thread.author.color,
|
|
239
|
+
size: "2xs"
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ jsx("span", {
|
|
242
|
+
className: "shrink-0 font-medium",
|
|
243
|
+
children: item.thread.author.name
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ jsx("span", {
|
|
246
|
+
className: "min-w-0 flex-1 truncate text-muted-foreground",
|
|
247
|
+
children: excerpt(item.thread.text)
|
|
248
|
+
}),
|
|
249
|
+
item.thread.replies.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
250
|
+
className: "shrink-0 text-xs text-muted-foreground/70",
|
|
251
|
+
children: item.thread.replies.length
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
})
|
|
255
|
+
}, item.key)),
|
|
256
|
+
orphans.map((thread) => /* @__PURE__ */ jsx("div", {
|
|
257
|
+
ref: (el) => setCard(thread.id, el),
|
|
258
|
+
className: cn("absolute inset-x-0", tops[thread.id] === void 0 && "invisible"),
|
|
259
|
+
style: cardStyle(thread.id),
|
|
260
|
+
children: /* @__PURE__ */ jsx(CommentThreadView, {
|
|
261
|
+
thread,
|
|
262
|
+
user: comments.user,
|
|
263
|
+
active: comments.active === thread.id,
|
|
264
|
+
orphan: true,
|
|
265
|
+
comments,
|
|
266
|
+
onClick: () => select(thread.id)
|
|
267
|
+
})
|
|
268
|
+
}, thread.id)),
|
|
269
|
+
comments.resolved.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
270
|
+
ref: setResolvedSection,
|
|
271
|
+
className: "absolute inset-x-0 flex flex-col gap-2",
|
|
272
|
+
style: { top: `${resolvedTop}px` },
|
|
273
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
274
|
+
variant: "ghost",
|
|
275
|
+
size: "sm",
|
|
276
|
+
className: "self-start",
|
|
277
|
+
onClick: () => setShowResolved((value) => !value),
|
|
278
|
+
children: [t("comments.resolvedCount", { n: comments.resolved.length }), /* @__PURE__ */ jsx(Icon, { name: showResolved ? "i-lucide-chevron-up" : "i-lucide-chevron-down" })]
|
|
279
|
+
}), showResolved && comments.resolved.map((thread) => /* @__PURE__ */ jsx(CommentThreadView, {
|
|
280
|
+
thread,
|
|
281
|
+
user: comments.user,
|
|
282
|
+
active: comments.active === thread.id,
|
|
283
|
+
orphan: comments.isOrphan(thread.id),
|
|
284
|
+
comments,
|
|
285
|
+
onClick: () => select(thread.id)
|
|
286
|
+
}, thread.id))]
|
|
287
|
+
})
|
|
288
|
+
] })
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
//#endregion
|
|
292
|
+
export { CommentsMargin };
|
|
293
|
+
|
|
294
|
+
//# sourceMappingURL=CommentsMargin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsMargin.js","names":[],"sources":["../../../../src/features/comments/react/CommentsMargin.tsx"],"sourcesContent":["/**\n * Comments margin („Randspalte“): a 300px column the host places inside its scroll container right of the editor,\n * so it scrolls with the text. Cards sit absolutely at the height of their text (top-down in document order, pushed\n * down so they never overlap); the active thread is expanded, the others collapse to one line. The draft composer\n * takes part in the layout, orphaned threads stack after the positioned cards and resolved threads („Erledigt“)\n * sit at the bottom behind a toggle. Shown only while `open` (the host binds the surface's `commentsOpen` model) and the\n * user's comments layout is `margin`; the layout is recomputed whenever the column becomes visible again.\n */\nimport type { Editor } from '@tiptap/core'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { Icon } from '../../../react/Icon'\nimport { useEditorSettings } from '../../../react/settings'\nimport { Button } from '../../../react/ui/button'\nimport { cn } from '../../../react/ui/utils'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport type { CommentThread as Thread } from '../schema'\nimport { CommentAvatar } from './CommentAvatar'\nimport { CommentComposer } from './CommentComposer'\nimport { CommentThreadView } from './CommentThreadView'\nimport { useComments } from './use-comments'\n\nconst GAP = 8\nconst DRAFT = '__draft'\n\ninterface Item { key: string, from: number, thread: Thread | null }\n\nconst excerpt = (text: string) => text.length > 60 ? `${text.slice(0, 60)}…` : text\n\nfunction sameTops(a: Record<string, number>, b: Record<string, number>): boolean {\n const keys = Object.keys(a)\n return keys.length === Object.keys(b).length && keys.every(key => a[key] === b[key])\n}\n\n/**\n * Comments margin („Randspalte“): a column the host places inside its scroll container right of the editor, so it\n * scrolls with the text. Cards sit at the height of their text, the active thread is expanded; shown only while `open`\n * and the user's comments layout is `margin`.\n */\nexport function CommentsMargin({ editor, container, open = true }: {\n editor: Editor | undefined\n /** The editor's scroll container, which the column sits in: its size changes re-run the layout. */\n container: HTMLElement | null\n /** Whether the column is shown (the surface's `commentsOpen` model). */\n open?: boolean\n}) {\n const { settings } = useEditorSettings()\n const { t } = useEditorI18n()\n const enabled = settings.editing.commentsLayout === 'margin'\n // Idle (no Y.Doc observer) while another layout shows the comments.\n const comments = useComments(enabled ? editor : undefined)\n\n /** Draft and open threads with a text range, in document order. */\n const positioned = useMemo<Item[]>(() => {\n const items: Item[] = []\n if (comments.draft) items.push({ key: DRAFT, from: comments.draft.from, thread: null })\n for (const thread of comments.open) {\n const range = comments.ranges.get(thread.id)\n if (range) items.push({ key: thread.id, from: range.from, thread })\n }\n return items.sort((a, b) => a.from - b.from)\n }, [comments.draft, comments.open, comments.ranges])\n const orphans = useMemo(() => comments.open.filter(thread => !comments.ranges.has(thread.id)), [comments.open, comments.ranges])\n\n const [showResolved, setShowResolved] = useState(false)\n const [tops, setTops] = useState<Record<string, number>>({})\n const [resolvedTop, setResolvedTop] = useState(0)\n const [minHeight, setMinHeight] = useState(0)\n\n // Layout machinery that lives outside rendering: the observer, the pending frame, the cards by key.\n const [layout] = useState(() => ({\n observer: null as ResizeObserver | null,\n observed: new WeakSet<Element>(),\n cards: new Map<string, HTMLElement>(),\n frame: 0,\n column: null as HTMLElement | null,\n resolvedSection: null as HTMLElement | null,\n }))\n // What `relayout` reads: the latest render's values.\n const latest = useRef({ editor, positioned, orphans })\n latest.current = { editor, positioned, orphans }\n\n const observe = useCallback((el: Element) => {\n if (!layout.observer || layout.observed.has(el)) return\n layout.observed.add(el)\n layout.observer.observe(el)\n }, [layout])\n\n const unobserve = useCallback((el: Element) => {\n layout.observer?.unobserve(el)\n layout.observed.delete(el)\n }, [layout])\n\n const relayout = useCallback(() => {\n layout.frame = 0\n const { editor: instance, positioned: items, orphans: lost } = latest.current\n const col = layout.column\n // Hidden columns have no layout box; the column's own ResizeObserver re-runs this once shown.\n if (!instance || instance.isDestroyed || !col || !col.getClientRects().length) return\n const live = new Set([...items.map(i => i.key), ...lost.map(t => t.id)])\n for (const [key, el] of layout.cards) {\n if (live.has(key)) continue\n unobserve(el)\n layout.cards.delete(key)\n }\n\n const base = col.getBoundingClientRect().top\n const size = instance.state.doc.content.size\n const next: Record<string, number> = {}\n let bottom = -GAP\n for (const item of items) {\n let desired = bottom + GAP\n try {\n desired = instance.view.coordsAtPos(Math.min(item.from, size)).top - base\n }\n catch {\n // Position not rendered (yet): stack it below the previous card.\n }\n const top = Math.max(desired, bottom + GAP, 0)\n next[item.key] = top\n bottom = top + (layout.cards.get(item.key)?.offsetHeight ?? 0)\n }\n for (const thread of lost) {\n const top = bottom + GAP\n next[thread.id] = top\n bottom = top + (layout.cards.get(thread.id)?.offsetHeight ?? 0)\n }\n const nextResolvedTop = bottom < 0 ? 0 : bottom + 2 * GAP\n setTops(previous => sameTops(previous, next) ? previous : next)\n setResolvedTop(nextResolvedTop)\n setMinHeight(nextResolvedTop + (layout.resolvedSection?.offsetHeight ?? 0))\n }, [layout, unobserve])\n\n const schedule = useCallback(() => {\n if (layout.frame || typeof requestAnimationFrame === 'undefined') return\n layout.frame = requestAnimationFrame(relayout)\n }, [layout, relayout])\n\n // The observer and the window listener live while mounted; the elements already rendered are observed on creation.\n useEffect(() => {\n if (typeof ResizeObserver !== 'undefined') {\n layout.observer = new ResizeObserver(() => schedule())\n layout.observed = new WeakSet()\n for (const el of layout.cards.values()) observe(el)\n if (layout.column) observe(layout.column)\n if (layout.resolvedSection) observe(layout.resolvedSection)\n }\n window.addEventListener('resize', schedule)\n schedule()\n return () => {\n window.removeEventListener('resize', schedule)\n layout.observer?.disconnect()\n layout.observer = null\n if (layout.frame) cancelAnimationFrame(layout.frame)\n layout.frame = 0\n }\n }, [layout, observe, schedule])\n\n useEffect(() => {\n if (!editor) return\n editor.on('transaction', schedule)\n schedule()\n return () => { editor.off('transaction', schedule) }\n }, [editor, schedule])\n\n useEffect(() => {\n if (!container || !layout.observer) return\n layout.observer.observe(container)\n return () => layout.observer?.unobserve(container)\n }, [container, layout])\n\n // Cards appearing/disappearing or expanding: lay out once the DOM has them.\n useEffect(() => { schedule() }, [positioned, orphans, comments.active, comments.resolved.length, showResolved, enabled, schedule])\n\n // The column itself: its size flips between zero and real when the host toggles it.\n const setColumn = useCallback((el: HTMLElement | null) => {\n if (layout.column) unobserve(layout.column)\n layout.column = el\n if (el) observe(el)\n schedule()\n }, [layout, observe, unobserve, schedule])\n\n const setResolvedSection = useCallback((el: HTMLElement | null) => {\n if (layout.resolvedSection) unobserve(layout.resolvedSection)\n layout.resolvedSection = el\n if (el) observe(el)\n schedule()\n }, [layout, observe, unobserve, schedule])\n\n const setCard = (key: string, el: HTMLElement | null) => {\n if (!el) return\n layout.cards.set(key, el)\n observe(el)\n }\n\n /** Clicking a card activates (expands) it and reveals its text; clicks inside the already active card do nothing. */\n function select(id: string) {\n if (comments.active !== id) comments.activate(id, { reveal: true })\n }\n\n const cardStyle = (key: string) => ({ top: `${tops[key] ?? 0}px` })\n\n return (\n <div\n ref={setColumn}\n className=\"relative w-[300px] shrink-0\"\n style={{ minHeight: `${minHeight}px`, ...(open && enabled ? {} : { display: 'none' }) }}\n aria-label={t('comments.title')}\n >\n {!comments.available\n ? <p className=\"p-3 text-sm text-muted-foreground\">{t('comments.unavailable')}</p>\n : (\n <>\n {positioned.map(item => (\n <div\n key={item.key}\n ref={el => setCard(item.key, el)}\n className={cn('absolute inset-x-0 transition-[top] duration-100', tops[item.key] === undefined && 'invisible')}\n style={cardStyle(item.key)}\n >\n {!item.thread\n ? (\n <CommentComposer\n quote={comments.draftQuote}\n className=\"shadow-md\"\n onSubmit={(text) => { comments.add(text) }}\n onCancel={() => comments.cancelDraft()}\n />\n )\n : comments.active === item.thread.id\n ? (\n <CommentThreadView\n thread={item.thread}\n user={comments.user}\n active\n orphan={false}\n comments={comments}\n className=\"shadow-md\"\n onClick={() => select(item.thread!.id)}\n />\n )\n : (\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 rounded-md border border-border bg-background px-2 py-1.5 text-left text-sm hover:bg-muted\"\n onClick={() => select(item.thread!.id)}\n >\n <CommentAvatar name={item.thread.author.name} color={item.thread.author.color} size=\"2xs\" />\n <span className=\"shrink-0 font-medium\">{item.thread.author.name}</span>\n <span className=\"min-w-0 flex-1 truncate text-muted-foreground\">{excerpt(item.thread.text)}</span>\n {item.thread.replies.length > 0 && <span className=\"shrink-0 text-xs text-muted-foreground/70\">{item.thread.replies.length}</span>}\n </button>\n )}\n </div>\n ))}\n\n {orphans.map(thread => (\n <div\n key={thread.id}\n ref={el => setCard(thread.id, el)}\n className={cn('absolute inset-x-0', tops[thread.id] === undefined && 'invisible')}\n style={cardStyle(thread.id)}\n >\n <CommentThreadView\n thread={thread}\n user={comments.user}\n active={comments.active === thread.id}\n orphan\n comments={comments}\n onClick={() => select(thread.id)}\n />\n </div>\n ))}\n\n {comments.resolved.length > 0 && (\n <div ref={setResolvedSection} className=\"absolute inset-x-0 flex flex-col gap-2\" style={{ top: `${resolvedTop}px` }}>\n <Button variant=\"ghost\" size=\"sm\" className=\"self-start\" onClick={() => setShowResolved(value => !value)}>\n {t('comments.resolvedCount', { n: comments.resolved.length })}\n <Icon name={showResolved ? 'i-lucide-chevron-up' : 'i-lucide-chevron-down'} />\n </Button>\n {showResolved && comments.resolved.map(thread => (\n <CommentThreadView\n key={thread.id}\n thread={thread}\n user={comments.user}\n active={comments.active === thread.id}\n orphan={comments.isOrphan(thread.id)}\n comments={comments}\n onClick={() => select(thread.id)}\n />\n ))}\n </div>\n )}\n </>\n )}\n </div>\n )\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/features/comments/react/CommentsOverlay.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What the comments feature mounts beside the editor content: the selection bubble, the popover of the inline layout,
|
|
5
|
+
* and the layout glue below. The margin column itself (`CommentsMargin`) is placed by the host.
|
|
6
|
+
*/
|
|
7
|
+
export declare function CommentsOverlay({ editor }: {
|
|
8
|
+
editor: Editor;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
//# sourceMappingURL=CommentsOverlay.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useEditorSettings } from "../../../react/settings.js";
|
|
2
|
+
import { useEditorUi } from "../../../react/editor-ui.js";
|
|
3
|
+
import { cancelCommentDraft, commentsKey, setActiveComment } from "../comments-plugin.js";
|
|
4
|
+
import { CommentBubble } from "./CommentBubble.js";
|
|
5
|
+
import { CommentsPopover } from "./CommentsPopover.js";
|
|
6
|
+
import { useEffect, useRef } from "react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/features/comments/react/CommentsOverlay.tsx
|
|
9
|
+
/**
|
|
10
|
+
* What the comments feature mounts beside the editor content: the selection bubble, the popover of the inline layout,
|
|
11
|
+
* and the layout glue below. The margin column itself (`CommentsMargin`) is placed by the host.
|
|
12
|
+
*/
|
|
13
|
+
function CommentsOverlay({ editor }) {
|
|
14
|
+
const { settings } = useEditorSettings();
|
|
15
|
+
const ui = useEditorUi();
|
|
16
|
+
const layout = settings.editing.commentsLayout;
|
|
17
|
+
const latest = useRef({
|
|
18
|
+
layout,
|
|
19
|
+
ui
|
|
20
|
+
});
|
|
21
|
+
latest.current = {
|
|
22
|
+
layout,
|
|
23
|
+
ui
|
|
24
|
+
};
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
let previous = !editor.isDestroyed ? commentsKey.getState(editor.state)?.draft ?? null : null;
|
|
27
|
+
const onTransaction = () => {
|
|
28
|
+
const draft = !editor.isDestroyed ? commentsKey.getState(editor.state)?.draft ?? null : null;
|
|
29
|
+
if (draft === previous) return;
|
|
30
|
+
previous = draft;
|
|
31
|
+
const { layout: current, ui: chrome } = latest.current;
|
|
32
|
+
if (draft && current === "margin" && !chrome?.commentsOpen) chrome?.toggleComments();
|
|
33
|
+
};
|
|
34
|
+
editor.on("transaction", onTransaction);
|
|
35
|
+
return () => {
|
|
36
|
+
editor.off("transaction", onTransaction);
|
|
37
|
+
};
|
|
38
|
+
}, [editor]);
|
|
39
|
+
const switched = useRef(layout);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (switched.current === layout) return;
|
|
42
|
+
switched.current = layout;
|
|
43
|
+
if (editor.isDestroyed) return;
|
|
44
|
+
cancelCommentDraft(editor);
|
|
45
|
+
setActiveComment(editor, null);
|
|
46
|
+
}, [layout, editor]);
|
|
47
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CommentBubble, { editor }), /* @__PURE__ */ jsx(CommentsPopover, { editor })] });
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { CommentsOverlay };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=CommentsOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsOverlay.js","names":[],"sources":["../../../../src/features/comments/react/CommentsOverlay.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { useEffect, useRef } from 'react'\nimport { useEditorUi } from '../../../react/editor-ui'\nimport { useEditorSettings } from '../../../react/settings'\nimport { cancelCommentDraft, commentsKey, setActiveComment } from '../comments-plugin'\nimport { CommentBubble } from './CommentBubble'\nimport { CommentsPopover } from './CommentsPopover'\n\n/**\n * What the comments feature mounts beside the editor content: the selection bubble, the popover of the inline layout,\n * and the layout glue below. The margin column itself (`CommentsMargin`) is placed by the host.\n */\nexport function CommentsOverlay({ editor }: { editor: Editor }) {\n const { settings } = useEditorSettings()\n const ui = useEditorUi()\n const layout = settings.editing.commentsLayout\n\n // Starting a comment (the plugin's draft appears) opens the margin in the margin layout, so the composer is visible.\n const latest = useRef({ layout, ui })\n latest.current = { layout, ui }\n useEffect(() => {\n let previous = !editor.isDestroyed ? commentsKey.getState(editor.state)?.draft ?? null : null\n const onTransaction = () => {\n const draft = !editor.isDestroyed ? commentsKey.getState(editor.state)?.draft ?? null : null\n if (draft === previous) return\n previous = draft\n const { layout: current, ui: chrome } = latest.current\n if (draft && current === 'margin' && !chrome?.commentsOpen) chrome?.toggleComments()\n }\n editor.on('transaction', onTransaction)\n return () => { editor.off('transaction', onTransaction) }\n }, [editor])\n\n // A layout switch starts closed: otherwise the thread active in the margin opens the inline popover at once (over the\n // settings dialog the switch was made in), and vice versa.\n const switched = useRef(layout)\n useEffect(() => {\n if (switched.current === layout) return\n switched.current = layout\n if (editor.isDestroyed) return\n cancelCommentDraft(editor)\n setActiveComment(editor, null)\n }, [layout, editor])\n\n return (\n <>\n <CommentBubble editor={editor} />\n <CommentsPopover editor={editor} />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,gBAAgB,EAAE,UAA8B;CAC9D,MAAM,EAAE,aAAa,kBAAkB;CACvC,MAAM,KAAK,YAAY;CACvB,MAAM,SAAS,SAAS,QAAQ;CAGhC,MAAM,SAAS,OAAO;EAAE;EAAQ;CAAG,CAAC;CACpC,OAAO,UAAU;EAAE;EAAQ;CAAG;CAC9B,gBAAgB;EACd,IAAI,WAAW,CAAC,OAAO,cAAc,YAAY,SAAS,OAAO,KAAK,CAAC,EAAE,SAAS,OAAO;EACzF,MAAM,sBAAsB;GAC1B,MAAM,QAAQ,CAAC,OAAO,cAAc,YAAY,SAAS,OAAO,KAAK,CAAC,EAAE,SAAS,OAAO;GACxF,IAAI,UAAU,UAAU;GACxB,WAAW;GACX,MAAM,EAAE,QAAQ,SAAS,IAAI,WAAW,OAAO;GAC/C,IAAI,SAAS,YAAY,YAAY,CAAC,QAAQ,cAAc,QAAQ,eAAe;EACrF;EACA,OAAO,GAAG,eAAe,aAAa;EACtC,aAAa;GAAE,OAAO,IAAI,eAAe,aAAa;EAAE;CAC1D,GAAG,CAAC,MAAM,CAAC;CAIX,MAAM,WAAW,OAAO,MAAM;CAC9B,gBAAgB;EACd,IAAI,SAAS,YAAY,QAAQ;EACjC,SAAS,UAAU;EACnB,IAAI,OAAO,aAAa;EACxB,mBAAmB,MAAM;EACzB,iBAAiB,QAAQ,IAAI;CAC/B,GAAG,CAAC,QAAQ,MAAM,CAAC;CAEnB,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,eAAD,EAAuB,OAAS,CAAA,GAChC,oBAAC,iBAAD,EAAyB,OAAS,CAAA,CAClC,EAAA,CAAA;AAEN"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/features/comments/react/CommentsPopover.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Inline comments („Inline“ layout): the draft composer or the active thread in a compact popover at its text.
|
|
5
|
+
* Opens when a comment is started or highlighted text is clicked (another highlight switches the thread); a click
|
|
6
|
+
* outside or Esc in the popover closes it (cancels the draft / deactivates the thread). Esc in the editor is a binding
|
|
7
|
+
* of the comments feature (ProseMirror marks every Esc in the editor as handled). Orphaned
|
|
8
|
+
* threads (opened from the toolbar's `CommentsListMenu`) anchor at the top of the editor. Renders only when the
|
|
9
|
+
* user's comments layout is `inline`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CommentsPopover({ editor }: {
|
|
12
|
+
editor: Editor | undefined;
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=CommentsPopover.d.ts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { useEditorSettings } from "../../../react/settings.js";
|
|
2
|
+
import { Popover, PopoverAnchor, PopoverContent } from "../../../react/ui/popover.js";
|
|
3
|
+
import { CommentComposer } from "./CommentComposer.js";
|
|
4
|
+
import { CommentThreadView } from "./CommentThreadView.js";
|
|
5
|
+
import { useComments } from "./use-comments.js";
|
|
6
|
+
import { useRef, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/features/comments/react/CommentsPopover.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Inline comments („Inline“ layout): the draft composer or the active thread in a compact popover at its text.
|
|
11
|
+
* Opens when a comment is started or highlighted text is clicked (another highlight switches the thread); a click
|
|
12
|
+
* outside or Esc in the popover closes it (cancels the draft / deactivates the thread). Esc in the editor is a binding
|
|
13
|
+
* of the comments feature (ProseMirror marks every Esc in the editor as handled). Orphaned
|
|
14
|
+
* threads (opened from the toolbar's `CommentsListMenu`) anchor at the top of the editor. Renders only when the
|
|
15
|
+
* user's comments layout is `inline`.
|
|
16
|
+
*/
|
|
17
|
+
function CommentsPopover({ editor }) {
|
|
18
|
+
const { settings } = useEditorSettings();
|
|
19
|
+
const enabled = settings.editing.commentsLayout === "inline";
|
|
20
|
+
const comments = useComments(enabled ? editor : void 0);
|
|
21
|
+
const activeThread = comments.active ? comments.threads.find((t) => t.id === comments.active) ?? null : null;
|
|
22
|
+
const drafting = !!comments.draft;
|
|
23
|
+
const open = enabled && comments.available && (drafting || !!activeThread);
|
|
24
|
+
const latest = useRef({
|
|
25
|
+
editor,
|
|
26
|
+
comments
|
|
27
|
+
});
|
|
28
|
+
latest.current = {
|
|
29
|
+
editor,
|
|
30
|
+
comments
|
|
31
|
+
};
|
|
32
|
+
const [anchor] = useState(() => {
|
|
33
|
+
let anchorRect = new DOMRect();
|
|
34
|
+
/** The draft range, else the active thread's range; null for an orphan. */
|
|
35
|
+
const anchorRange = () => {
|
|
36
|
+
const { draft, active, ranges } = latest.current.comments;
|
|
37
|
+
if (draft) return draft;
|
|
38
|
+
return active ? ranges.get(active) ?? null : null;
|
|
39
|
+
};
|
|
40
|
+
return { current: {
|
|
41
|
+
getBoundingClientRect() {
|
|
42
|
+
const instance = latest.current.editor;
|
|
43
|
+
if (!instance || instance.isDestroyed) return anchorRect;
|
|
44
|
+
const { view } = instance;
|
|
45
|
+
const bounds = view.dom.getBoundingClientRect();
|
|
46
|
+
const range = anchorRange();
|
|
47
|
+
if (!range || range.from >= range.to || range.to > instance.state.doc.content.size) {
|
|
48
|
+
anchorRect = new DOMRect(bounds.left, bounds.top, Math.max(bounds.width, 1), 1);
|
|
49
|
+
return anchorRect;
|
|
50
|
+
}
|
|
51
|
+
const start = view.coordsAtPos(range.from, 1);
|
|
52
|
+
const end = view.coordsAtPos(range.to, -1);
|
|
53
|
+
const oneLine = end.top < start.bottom;
|
|
54
|
+
const left = oneLine ? start.left : bounds.left;
|
|
55
|
+
const right = oneLine ? end.right : bounds.right;
|
|
56
|
+
anchorRect = new DOMRect(left, start.top, Math.max(right - left, 1), end.bottom - start.top);
|
|
57
|
+
return anchorRect;
|
|
58
|
+
},
|
|
59
|
+
get contextElement() {
|
|
60
|
+
const instance = latest.current.editor;
|
|
61
|
+
return instance && !instance.isDestroyed ? instance.view.dom : void 0;
|
|
62
|
+
}
|
|
63
|
+
} };
|
|
64
|
+
});
|
|
65
|
+
if (!enabled) return null;
|
|
66
|
+
function close() {
|
|
67
|
+
if (drafting) comments.cancelDraft();
|
|
68
|
+
else comments.activate(null);
|
|
69
|
+
}
|
|
70
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
71
|
+
open,
|
|
72
|
+
onOpenChange: (value) => {
|
|
73
|
+
if (!value) close();
|
|
74
|
+
},
|
|
75
|
+
children: [/* @__PURE__ */ jsx(PopoverAnchor, { virtualRef: anchor }), /* @__PURE__ */ jsx(PopoverContent, {
|
|
76
|
+
side: "bottom",
|
|
77
|
+
align: "start",
|
|
78
|
+
sideOffset: 4,
|
|
79
|
+
updatePositionStrategy: "always",
|
|
80
|
+
className: "max-h-[60vh] w-72 max-w-[calc(100vw-2rem)] gap-0 overflow-auto p-2",
|
|
81
|
+
onInteractOutside: (event) => {
|
|
82
|
+
if (event.target instanceof Element && event.target.closest("[role=\"menu\"]")) event.preventDefault();
|
|
83
|
+
},
|
|
84
|
+
onOpenAutoFocus: (event) => {
|
|
85
|
+
if (!drafting) event.preventDefault();
|
|
86
|
+
},
|
|
87
|
+
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
88
|
+
children: drafting ? /* @__PURE__ */ jsx(CommentComposer, {
|
|
89
|
+
dense: true,
|
|
90
|
+
quote: comments.draftQuote,
|
|
91
|
+
onSubmit: (text) => comments.add(text),
|
|
92
|
+
onCancel: () => comments.cancelDraft()
|
|
93
|
+
}) : activeThread && /* @__PURE__ */ jsx(CommentThreadView, {
|
|
94
|
+
dense: true,
|
|
95
|
+
thread: activeThread,
|
|
96
|
+
user: comments.user,
|
|
97
|
+
active: true,
|
|
98
|
+
orphan: comments.isOrphan(activeThread.id),
|
|
99
|
+
comments
|
|
100
|
+
})
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { CommentsPopover };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=CommentsPopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsPopover.js","names":[],"sources":["../../../../src/features/comments/react/CommentsPopover.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { useRef, useState } from 'react'\nimport { useEditorSettings } from '../../../react/settings'\nimport { Popover, PopoverAnchor, PopoverContent } from '../../../react/ui/popover'\nimport { CommentComposer } from './CommentComposer'\nimport { CommentThreadView } from './CommentThreadView'\nimport { type CommentsApi, useComments } from './use-comments'\n\n/**\n * Inline comments („Inline“ layout): the draft composer or the active thread in a compact popover at its text.\n * Opens when a comment is started or highlighted text is clicked (another highlight switches the thread); a click\n * outside or Esc in the popover closes it (cancels the draft / deactivates the thread). Esc in the editor is a binding\n * of the comments feature (ProseMirror marks every Esc in the editor as handled). Orphaned\n * threads (opened from the toolbar's `CommentsListMenu`) anchor at the top of the editor. Renders only when the\n * user's comments layout is `inline`.\n */\nexport function CommentsPopover({ editor }: { editor: Editor | undefined }) {\n const { settings } = useEditorSettings()\n const enabled = settings.editing.commentsLayout === 'inline'\n // Idle (no Y.Doc observer) while another layout shows the comments.\n const comments = useComments(enabled ? editor : undefined)\n\n const activeThread = comments.active ? comments.threads.find(t => t.id === comments.active) ?? null : null\n const drafting = !!comments.draft\n const open = enabled && comments.available && (drafting || !!activeThread)\n\n // The virtual reference reads the latest editor and comments when the popover positions itself.\n const latest = useRef<{ editor: Editor | undefined, comments: CommentsApi }>({ editor, comments })\n latest.current = { editor, comments }\n const [anchor] = useState(() => {\n let anchorRect = new DOMRect()\n /** The draft range, else the active thread's range; null for an orphan. */\n const anchorRange = () => {\n const { draft, active, ranges } = latest.current.comments\n if (draft) return draft\n return active ? ranges.get(active) ?? null : null\n }\n /** Virtual reference: the anchor text (its first line's extent, or the editor's width when it spans lines). */\n const reference = {\n getBoundingClientRect(): DOMRect {\n const instance = latest.current.editor\n if (!instance || instance.isDestroyed) return anchorRect\n const { view } = instance\n const bounds = view.dom.getBoundingClientRect()\n const range = anchorRange()\n if (!range || range.from >= range.to || range.to > instance.state.doc.content.size) {\n anchorRect = new DOMRect(bounds.left, bounds.top, Math.max(bounds.width, 1), 1)\n return anchorRect\n }\n const start = view.coordsAtPos(range.from, 1)\n const end = view.coordsAtPos(range.to, -1)\n const oneLine = end.top < start.bottom\n const left = oneLine ? start.left : bounds.left\n const right = oneLine ? end.right : bounds.right\n anchorRect = new DOMRect(left, start.top, Math.max(right - left, 1), end.bottom - start.top)\n return anchorRect\n },\n get contextElement() {\n const instance = latest.current.editor\n return instance && !instance.isDestroyed ? instance.view.dom : undefined\n },\n }\n return { current: reference }\n })\n\n if (!enabled) return null\n\n function close() {\n if (drafting) comments.cancelDraft()\n else comments.activate(null)\n }\n\n return (\n <Popover open={open} onOpenChange={(value) => { if (!value) close() }}>\n <PopoverAnchor virtualRef={anchor} />\n <PopoverContent\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n updatePositionStrategy=\"always\"\n className=\"max-h-[60vh] w-72 max-w-[calc(100vw-2rem)] gap-0 overflow-auto p-2\"\n // Menus of the thread (dropdowns, portalled) count as inside, so choosing an action does not close the popover.\n onInteractOutside={(event) => {\n if (event.target instanceof Element && event.target.closest('[role=\"menu\"]')) event.preventDefault()\n }}\n // The active thread keeps the editor focused (clicks in the text activate it); the composer focuses itself.\n onOpenAutoFocus={(event) => { if (!drafting) event.preventDefault() }}\n onCloseAutoFocus={event => event.preventDefault()}\n >\n {drafting\n ? (\n <CommentComposer\n dense\n quote={comments.draftQuote}\n onSubmit={text => comments.add(text)}\n onCancel={() => comments.cancelDraft()}\n />\n )\n : activeThread && (\n <CommentThreadView\n dense\n thread={activeThread}\n user={comments.user}\n active\n orphan={comments.isOrphan(activeThread.id)}\n comments={comments}\n />\n )}\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/features/comments/react/CommentsToolbarButton.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Toolbar entry of the comments feature, by the user's layout: in `margin` the „Kommentare“ toggle of the margin
|
|
5
|
+
* column (Mod-Shift-m; disabled with an explanation without a collaborative document), in `inline` the
|
|
6
|
+
* `CommentsListMenu` with the number of open threads.
|
|
7
|
+
*/
|
|
8
|
+
export declare function CommentsToolbarButton({ editor }: {
|
|
9
|
+
editor: Editor | undefined;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=CommentsToolbarButton.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
2
|
+
import { cn } from "../../../react/ui/utils.js";
|
|
3
|
+
import { Icon } from "../../../react/Icon.js";
|
|
4
|
+
import { useEditorSettings } from "../../../react/settings.js";
|
|
5
|
+
import { Button } from "../../../react/ui/button.js";
|
|
6
|
+
import { useEditorUi } from "../../../react/editor-ui.js";
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../react/ui/tooltip.js";
|
|
8
|
+
import { useComments } from "./use-comments.js";
|
|
9
|
+
import { CommentsListMenu } from "./CommentsListMenu.js";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/features/comments/react/CommentsToolbarButton.tsx
|
|
12
|
+
/** The toggle's shortcut as shown in the tooltip (key names, not translated). */
|
|
13
|
+
const SHORTCUT = `${typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform) ? "⌘" : "Ctrl"}+⇧+M`;
|
|
14
|
+
/**
|
|
15
|
+
* Toolbar entry of the comments feature, by the user's layout: in `margin` the „Kommentare“ toggle of the margin
|
|
16
|
+
* column (Mod-Shift-m; disabled with an explanation without a collaborative document), in `inline` the
|
|
17
|
+
* `CommentsListMenu` with the number of open threads.
|
|
18
|
+
*/
|
|
19
|
+
function CommentsToolbarButton({ editor }) {
|
|
20
|
+
const { settings } = useEditorSettings();
|
|
21
|
+
const { t } = useEditorI18n();
|
|
22
|
+
const editorUi = useEditorUi(editor);
|
|
23
|
+
const comments = useComments(editor);
|
|
24
|
+
if (settings.editing.commentsLayout !== "margin") return /* @__PURE__ */ jsx(CommentsListMenu, { editor });
|
|
25
|
+
const { available } = comments;
|
|
26
|
+
const active = !!editorUi?.commentsOpen;
|
|
27
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
28
|
+
asChild: true,
|
|
29
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "inline-flex",
|
|
31
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
32
|
+
variant: "ghost",
|
|
33
|
+
size: "icon-sm",
|
|
34
|
+
"aria-label": t("comments.title"),
|
|
35
|
+
"aria-pressed": active,
|
|
36
|
+
disabled: !editorUi || !available,
|
|
37
|
+
className: cn(active && "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary"),
|
|
38
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
39
|
+
onClick: () => editorUi?.toggleComments(),
|
|
40
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "i-lucide-message-square-text" })
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
}), /* @__PURE__ */ jsxs(TooltipContent, { children: [available ? t("comments.title") : t("comments.unavailable"), available && /* @__PURE__ */ jsx("kbd", {
|
|
44
|
+
"data-slot": "kbd",
|
|
45
|
+
className: "rounded-sm bg-background/20 px-1 font-sans",
|
|
46
|
+
children: SHORTCUT
|
|
47
|
+
})] })] });
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { CommentsToolbarButton };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=CommentsToolbarButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsToolbarButton.js","names":[],"sources":["../../../../src/features/comments/react/CommentsToolbarButton.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { useEditorUi } from '../../../react/editor-ui'\nimport { Icon } from '../../../react/Icon'\nimport { useEditorSettings } from '../../../react/settings'\nimport { Button } from '../../../react/ui/button'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../../../react/ui/tooltip'\nimport { cn } from '../../../react/ui/utils'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport { CommentsListMenu } from './CommentsListMenu'\nimport { useComments } from './use-comments'\n\nconst isMac = typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(navigator.platform)\n/** The toggle's shortcut as shown in the tooltip (key names, not translated). */\nconst SHORTCUT = `${isMac ? '⌘' : 'Ctrl'}+⇧+M`\n\n/**\n * Toolbar entry of the comments feature, by the user's layout: in `margin` the „Kommentare“ toggle of the margin\n * column (Mod-Shift-m; disabled with an explanation without a collaborative document), in `inline` the\n * `CommentsListMenu` with the number of open threads.\n */\nexport function CommentsToolbarButton({ editor }: { editor: Editor | undefined }) {\n const { settings } = useEditorSettings()\n const { t } = useEditorI18n()\n // The toolbar sits beside the surface (outside its context): the chrome registered for `editor`.\n const editorUi = useEditorUi(editor)\n const comments = useComments(editor)\n\n if (settings.editing.commentsLayout !== 'margin') return <CommentsListMenu editor={editor} />\n\n // Without comments (the default model needs collaboration) the button is disabled and its tooltip says why.\n const { available } = comments\n const active = !!editorUi?.commentsOpen\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"inline-flex\">\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={t('comments.title')}\n aria-pressed={active}\n disabled={!editorUi || !available}\n className={cn(active && 'bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary')}\n onMouseDown={event => event.preventDefault()}\n onClick={() => editorUi?.toggleComments()}\n >\n <Icon name=\"i-lucide-message-square-text\" />\n </Button>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n {available ? t('comments.title') : t('comments.unavailable')}\n {available && <kbd data-slot=\"kbd\" className=\"rounded-sm bg-background/20 px-1 font-sans\">{SHORTCUT}</kbd>}\n </TooltipContent>\n </Tooltip>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,WAAW,GAFH,OAAO,cAAc,eAAe,kBAAkB,KAAK,UAAU,QAAQ,IAE/D,MAAM,OAAO;;;;;;AAOzC,SAAgB,sBAAsB,EAAE,UAA0C;CAChF,MAAM,EAAE,aAAa,kBAAkB;CACvC,MAAM,EAAE,MAAM,cAAc;CAE5B,MAAM,WAAW,YAAY,MAAM;CACnC,MAAM,WAAW,YAAY,MAAM;CAEnC,IAAI,SAAS,QAAQ,mBAAmB,UAAU,OAAO,oBAAC,kBAAD,EAA0B,OAAS,CAAA;CAG5F,MAAM,EAAE,cAAc;CACtB,MAAM,SAAS,CAAC,CAAC,UAAU;CAC3B,OACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EAAgB,SAAA;EACd,UAAA,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,QAAD;IACE,SAAQ;IACR,MAAK;IACL,cAAY,EAAE,gBAAgB;IAC9B,gBAAc;IACd,UAAU,CAAC,YAAY,CAAC;IACxB,WAAW,GAAG,UAAU,mEAAmE;IAC3F,cAAa,UAAS,MAAM,eAAe;IAC3C,eAAe,UAAU,eAAe;IAExC,UAAA,oBAAC,MAAD,EAAM,MAAK,+BAAgC,CAAA;GACrC,CAAA;EACJ,CAAA;CACQ,CAAA,GAChB,qBAAC,gBAAD,EAAA,UAAA,CACG,YAAY,EAAE,gBAAgB,IAAI,EAAE,sBAAsB,GAC1D,aAAa,oBAAC,OAAD;EAAK,aAAU;EAAM,WAAU;EAA8C,UAAA;CAAc,CAAA,CAC3F,EAAA,CAAA,CACT,EAAA,CAAA;AAEb"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/features/comments/react/SettingsCommentsTab.d.ts
|
|
2
|
+
/** „Kommentare“: where the comments of a shared document are shown. */
|
|
3
|
+
export declare function SettingsCommentsTab(): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
|
5
|
+
//# sourceMappingURL=SettingsCommentsTab.d.ts.map
|