@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 @@
|
|
|
1
|
+
{"version":3,"file":"define-editor.js","names":[],"sources":["../../src/core/define-editor.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { EditorContext } from './context'\nimport { type AiBlock, type AiBlockDataProvider, type AiContext, type AiContextKind, type BlockPipeline, type ConversionProvider, type EditorFeature, type EditorPreset, type SettingsTab, SINGLETON_PIPELINE_HOOKS } from './feature'\nimport { DEFAULT_BLOCK_PIPELINE } from './pipeline'\n\nconst FEATURE_SINGLETONS = ['anchorResolver', 'formatAiResult'] as const satisfies readonly (keyof EditorFeature)[]\n\nfunction fail(message: string): never {\n throw new Error(`@ecsplico/editor: defineEditor: ${message}`)\n}\n\n/**\n * Validates `features` and resolves their pipeline and conversion providers. Keeps the given order; neither\n * deduplicates nor installs missing dependencies. Throws on duplicate ids, a `requires` entry that is not installed\n * and a singleton hook (`parseMarkdown`, `segment`, `structure`, `wrapImport`, `migrateContent`, `anchorResolver`,\n * `formatAiResult`) contributed twice. `normalize` hooks chain left to right. `aiContext` contributions merge (`kinds` and `blocks`\n * concatenated in feature order, `structure` from one feature only); their conflicts surface when the merged `aiContext` reads the editor.\n * `aiBlockData` contributions are additive too: they run in parallel per block and their data concatenate in feature order.\n */\nexport function defineEditor<C = unknown>(config: { features: readonly EditorFeature<C>[] }): EditorPreset<C> {\n const features = Object.freeze([...config.features])\n const ids = new Set<string>()\n for (const feature of features) {\n if (ids.has(feature.id)) fail(`duplicate feature id \"${feature.id}\"`)\n ids.add(feature.id)\n }\n for (const feature of features) {\n for (const required of feature.requires ?? []) {\n if (!ids.has(required)) fail(`feature \"${feature.id}\" requires \"${required}\", which is not installed`)\n }\n }\n\n const owners = new Map<string, string>()\n const claim = (hook: string, feature: EditorFeature<C>) => {\n const owner = owners.get(hook)\n if (owner) fail(`features \"${owner}\" and \"${feature.id}\" both contribute the singleton hook \"${hook}\"`)\n owners.set(hook, feature.id)\n }\n const pipeline: BlockPipeline = { ...DEFAULT_BLOCK_PIPELINE }\n const normalizers: BlockPipeline['normalize'][] = []\n for (const feature of features) {\n for (const hook of FEATURE_SINGLETONS) if (feature[hook]) claim(hook, feature)\n const blocks = feature.blocks\n if (!blocks) continue\n if (blocks.normalize) normalizers.push(blocks.normalize)\n for (const hook of SINGLETON_PIPELINE_HOOKS) {\n const fn = blocks[hook]\n if (!fn) continue\n claim(hook, feature)\n Object.assign(pipeline, { [hook]: fn })\n }\n }\n if (normalizers.length) pipeline.normalize = (editor, blocks) => normalizers.reduce((current, normalize) => normalize(editor, current), blocks)\n\n const conversions: ConversionProvider[] = features.flatMap(feature => [...(feature.conversions ?? [])])\n const contexts = features.flatMap(feature => feature.aiContext ? [{ id: feature.id, read: feature.aiContext }] : [])\n const aiContext = contexts.length\n ? (editor: Editor): AiContext => {\n const merged: { kinds: AiContextKind[], blocks: AiBlock[], structure?: AiContext['structure'], owner?: string } = { kinds: [], blocks: [] }\n const blockIds = new Set<string>()\n for (const { id, read } of contexts) {\n const context = read(editor)\n merged.kinds.push(...(context.kinds ?? []))\n for (const block of context.blocks ?? []) {\n if (blockIds.has(block.id)) fail(`the AI block \"${block.id}\" is described by more than one feature`)\n blockIds.add(block.id)\n merged.blocks.push(block)\n }\n if (context.structure === undefined) continue\n if (merged.owner) fail(`features \"${merged.owner}\" and \"${id}\" both set aiContext.structure`)\n merged.owner = id\n merged.structure = context.structure\n }\n return { kinds: merged.kinds, blocks: merged.blocks, ...(merged.structure && { structure: merged.structure }) }\n }\n : undefined\n const dataProviders = features.flatMap(feature => feature.aiBlockData ? [feature.aiBlockData] : [])\n const aiBlockData: AiBlockDataProvider | undefined = dataProviders.length\n ? async request => (await Promise.all(dataProviders.map(provide => provide(request)))).flat()\n : undefined\n const formatAiResult = features.find(feature => feature.formatAiResult)?.formatAiResult\n return Object.freeze({\n features,\n pipeline: Object.freeze(pipeline),\n conversions: Object.freeze(conversions),\n ...(aiContext && { aiContext }),\n ...(aiBlockData && { aiBlockData }),\n ...(formatAiResult && { formatAiResult }),\n })\n}\n\n/**\n * The settings tabs the features of `preset` contribute for the app context `ctx` (labels in its language), in feature\n * order; none means there is no settings UI. Throws when two features contribute the same tab id.\n */\nexport function settingsTabsOf<C = unknown>(preset: EditorPreset<C>, ctx: EditorContext): readonly SettingsTab<C>[] {\n const owners = new Map<string, string>()\n return preset.features.flatMap((feature) => {\n const tabs = feature.settingsTabs?.(ctx) ?? []\n for (const tab of tabs) {\n const owner = owners.get(tab.id)\n if (owner) fail(`features \"${owner}\" and \"${feature.id}\" both contribute the settings tab \"${tab.id}\"`)\n owners.set(tab.id, feature.id)\n }\n return tabs\n })\n}\n\n/** Features of `preset` that fill the contribution `key`, in order. */\nexport function contributions<C, K extends keyof EditorFeature<C>>(preset: EditorPreset<C>, key: K): NonNullable<EditorFeature<C>[K]>[] {\n return preset.features.flatMap(feature => feature[key] ? [feature[key] as NonNullable<EditorFeature<C>[K]>] : [])\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { AnchorResolver } from "./feature.js";
|
|
2
|
+
import { Editor, Extension } from "@tiptap/core";
|
|
3
|
+
import { EditorState, PluginKey } from "@tiptap/pm/state";
|
|
4
|
+
//#region src/core/doc-anchors.d.ts
|
|
5
|
+
/** A document range captured with `captureRange`: survives local and remote (collaborative) edits until released. */
|
|
6
|
+
export interface DocAnchor {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
}
|
|
9
|
+
/** Current positions (-1 when gone) plus, with an `AnchorResolver`, its token for re-resolving after remote changes. */
|
|
10
|
+
interface AnchorEntry {
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
token: unknown | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const docAnchorsKey: PluginKey<ReadonlyMap<string, AnchorEntry>>;
|
|
16
|
+
export type DocAnchorsMeta = {
|
|
17
|
+
add: {
|
|
18
|
+
id: string;
|
|
19
|
+
from: number;
|
|
20
|
+
to: number;
|
|
21
|
+
startInside: boolean;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
remove: readonly string[];
|
|
25
|
+
};
|
|
26
|
+
export interface DocAnchorsOptions {
|
|
27
|
+
/** Position mapping that survives collaborative edits (see the collab feature); without one anchors only map through local transactions. */
|
|
28
|
+
resolver: AnchorResolver | null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Edit-surviving ranges for AI flows (selection menu, AI sidebar, reviews, chat ops): anchors map through local
|
|
32
|
+
* transactions and, with an `AnchorResolver`, re-resolve from its tokens on collaboration (y-sync) transactions, which
|
|
33
|
+
* replace the whole document. Client-only: not part of the Vue-free schema.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DocAnchors: Extension<DocAnchorsOptions, {
|
|
36
|
+
resolver: AnchorResolver | null;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Captures [from, to] of the current document. Both ends stick to the text before them; `startInside` binds a
|
|
40
|
+
* non-empty range's start to its own first character instead, so text inserted right before it stays outside.
|
|
41
|
+
* Release with `releaseRanges` when the flow ends.
|
|
42
|
+
*/
|
|
43
|
+
export declare function captureRange(editor: Editor, { from, to }: {
|
|
44
|
+
from: number;
|
|
45
|
+
to: number;
|
|
46
|
+
}, options?: {
|
|
47
|
+
startInside?: boolean;
|
|
48
|
+
}): DocAnchor;
|
|
49
|
+
/** Current positions of `anchor`, collapsed (`from === to`) when its content was deleted; null when unknown or gone. */
|
|
50
|
+
export declare function resolveRange(state: EditorState, anchor: DocAnchor): {
|
|
51
|
+
from: number;
|
|
52
|
+
to: number;
|
|
53
|
+
} | null;
|
|
54
|
+
/** Forgets `anchors` (unknown ones are ignored). */
|
|
55
|
+
export declare function releaseRanges(editor: Editor, anchors: readonly DocAnchor[]): void;
|
|
56
|
+
declare module '@tiptap/core' {
|
|
57
|
+
interface Storage {
|
|
58
|
+
docAnchors: {
|
|
59
|
+
resolver: AnchorResolver | null;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** The anchor resolver `editor` was created with; null without a collaboration-aware feature. */
|
|
64
|
+
export declare const anchorResolverOf: (editor: Editor) => AnchorResolver | null;
|
|
65
|
+
//#endregion
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=doc-anchors.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { newBlockId } from "./schema/block-ids.js";
|
|
2
|
+
import { Extension } from "@tiptap/core";
|
|
3
|
+
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
4
|
+
//#region src/core/doc-anchors.ts
|
|
5
|
+
const docAnchorsKey = new PluginKey("docAnchors");
|
|
6
|
+
/**
|
|
7
|
+
* Edit-surviving ranges for AI flows (selection menu, AI sidebar, reviews, chat ops): anchors map through local
|
|
8
|
+
* transactions and, with an `AnchorResolver`, re-resolve from its tokens on collaboration (y-sync) transactions, which
|
|
9
|
+
* replace the whole document. Client-only: not part of the Vue-free schema.
|
|
10
|
+
*/
|
|
11
|
+
const DocAnchors = Extension.create({
|
|
12
|
+
name: "docAnchors",
|
|
13
|
+
priority: 1e3,
|
|
14
|
+
addOptions: () => ({ resolver: null }),
|
|
15
|
+
addStorage() {
|
|
16
|
+
return { resolver: this.options.resolver };
|
|
17
|
+
},
|
|
18
|
+
addProseMirrorPlugins() {
|
|
19
|
+
const { resolver } = this.options;
|
|
20
|
+
return [new Plugin({
|
|
21
|
+
key: docAnchorsKey,
|
|
22
|
+
state: {
|
|
23
|
+
init: () => /* @__PURE__ */ new Map(),
|
|
24
|
+
apply(tr, value, _oldState, newState) {
|
|
25
|
+
const meta = tr.getMeta(docAnchorsKey);
|
|
26
|
+
if (!meta && (!tr.docChanged || !value.size)) return value;
|
|
27
|
+
let next = value;
|
|
28
|
+
if (tr.docChanged && value.size) {
|
|
29
|
+
const synced = resolver?.isYSync(tr) === true;
|
|
30
|
+
const mapped = /* @__PURE__ */ new Map();
|
|
31
|
+
for (const [id, entry] of value) {
|
|
32
|
+
if (synced && resolver && entry.token != null) {
|
|
33
|
+
mapped.set(id, {
|
|
34
|
+
...entry,
|
|
35
|
+
...resolver.resolve(newState, entry.token) ?? {
|
|
36
|
+
from: -1,
|
|
37
|
+
to: -1
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (entry.from < 0) {
|
|
43
|
+
mapped.set(id, entry);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const collapsed = entry.from === entry.to;
|
|
47
|
+
mapped.set(id, {
|
|
48
|
+
...entry,
|
|
49
|
+
from: tr.mapping.map(entry.from, collapsed ? -1 : 1),
|
|
50
|
+
to: tr.mapping.map(entry.to, -1)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
next = mapped;
|
|
54
|
+
}
|
|
55
|
+
if (meta && "add" in meta) {
|
|
56
|
+
const { id, from, to, startInside } = meta.add;
|
|
57
|
+
next = new Map(next).set(id, {
|
|
58
|
+
from,
|
|
59
|
+
to,
|
|
60
|
+
token: resolver?.capture(newState, {
|
|
61
|
+
from,
|
|
62
|
+
to
|
|
63
|
+
}, startInside) ?? null
|
|
64
|
+
});
|
|
65
|
+
} else if (meta && meta.remove.some((id) => next.has(id))) {
|
|
66
|
+
const kept = new Map(next);
|
|
67
|
+
for (const id of meta.remove) kept.delete(id);
|
|
68
|
+
next = kept;
|
|
69
|
+
}
|
|
70
|
+
return next;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
})];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Captures [from, to] of the current document. Both ends stick to the text before them; `startInside` binds a
|
|
78
|
+
* non-empty range's start to its own first character instead, so text inserted right before it stays outside.
|
|
79
|
+
* Release with `releaseRanges` when the flow ends.
|
|
80
|
+
*/
|
|
81
|
+
function captureRange(editor, { from, to }, options = {}) {
|
|
82
|
+
const id = newBlockId();
|
|
83
|
+
const meta = { add: {
|
|
84
|
+
id,
|
|
85
|
+
from,
|
|
86
|
+
to,
|
|
87
|
+
startInside: options.startInside ?? false
|
|
88
|
+
} };
|
|
89
|
+
editor.view.dispatch(editor.state.tr.setMeta(docAnchorsKey, meta).setMeta("addToHistory", false));
|
|
90
|
+
return { id };
|
|
91
|
+
}
|
|
92
|
+
/** Current positions of `anchor`, collapsed (`from === to`) when its content was deleted; null when unknown or gone. */
|
|
93
|
+
function resolveRange(state, anchor) {
|
|
94
|
+
const entry = docAnchorsKey.getState(state)?.get(anchor.id);
|
|
95
|
+
if (!entry || entry.from < 0 || entry.from > entry.to || entry.to > state.doc.content.size) return null;
|
|
96
|
+
return {
|
|
97
|
+
from: entry.from,
|
|
98
|
+
to: entry.to
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/** Forgets `anchors` (unknown ones are ignored). */
|
|
102
|
+
function releaseRanges(editor, anchors) {
|
|
103
|
+
if (editor.isDestroyed || !anchors.length) return;
|
|
104
|
+
const meta = { remove: anchors.map((a) => a.id) };
|
|
105
|
+
editor.view.dispatch(editor.state.tr.setMeta(docAnchorsKey, meta).setMeta("addToHistory", false));
|
|
106
|
+
}
|
|
107
|
+
/** The anchor resolver `editor` was created with; null without a collaboration-aware feature. */
|
|
108
|
+
const anchorResolverOf = (editor) => editor.storage.docAnchors?.resolver ?? null;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { DocAnchors, anchorResolverOf, captureRange, docAnchorsKey, releaseRanges, resolveRange };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=doc-anchors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-anchors.js","names":[],"sources":["../../src/core/doc-anchors.ts"],"sourcesContent":["import { type Editor, Extension } from '@tiptap/core'\nimport { type EditorState, Plugin, PluginKey } from '@tiptap/pm/state'\nimport type { AnchorResolver } from './feature'\nimport { newBlockId } from './schema/block-ids'\n\n/** A document range captured with `captureRange`: survives local and remote (collaborative) edits until released. */\nexport interface DocAnchor { readonly id: string }\n\n/** Current positions (-1 when gone) plus, with an `AnchorResolver`, its token for re-resolving after remote changes. */\ninterface AnchorEntry { from: number, to: number, token: unknown | null }\n\nexport const docAnchorsKey = new PluginKey<ReadonlyMap<string, AnchorEntry>>('docAnchors')\n\nexport type DocAnchorsMeta = { add: { id: string, from: number, to: number, startInside: boolean } } | { remove: readonly string[] }\n\nexport interface DocAnchorsOptions {\n /** Position mapping that survives collaborative edits (see the collab feature); without one anchors only map through local transactions. */\n resolver: AnchorResolver | null\n}\n\n/**\n * Edit-surviving ranges for AI flows (selection menu, AI sidebar, reviews, chat ops): anchors map through local\n * transactions and, with an `AnchorResolver`, re-resolve from its tokens on collaboration (y-sync) transactions, which\n * replace the whole document. Client-only: not part of the Vue-free schema.\n */\nexport const DocAnchors = Extension.create<DocAnchorsOptions, { resolver: AnchorResolver | null }>({\n name: 'docAnchors',\n priority: 1000,\n\n addOptions: () => ({ resolver: null }),\n\n addStorage() {\n return { resolver: this.options.resolver }\n },\n\n addProseMirrorPlugins() {\n const { resolver } = this.options\n return [\n new Plugin<ReadonlyMap<string, AnchorEntry>>({\n key: docAnchorsKey,\n state: {\n init: () => new Map(),\n apply(tr, value, _oldState, newState) {\n const meta = tr.getMeta(docAnchorsKey) as DocAnchorsMeta | undefined\n if (!meta && (!tr.docChanged || !value.size)) return value\n let next = value\n if (tr.docChanged && value.size) {\n const synced = resolver?.isYSync(tr) === true\n const mapped = new Map<string, AnchorEntry>()\n for (const [id, entry] of value) {\n if (synced && resolver && entry.token != null) {\n mapped.set(id, { ...entry, ...(resolver.resolve(newState, entry.token) ?? { from: -1, to: -1 }) })\n continue\n }\n if (entry.from < 0) {\n mapped.set(id, entry)\n continue\n }\n // Like the resolver's positions: text inserted at a boundary stays outside (a collapsed anchor keeps it after itself).\n const collapsed = entry.from === entry.to\n mapped.set(id, { ...entry, from: tr.mapping.map(entry.from, collapsed ? -1 : 1), to: tr.mapping.map(entry.to, -1) })\n }\n next = mapped\n }\n if (meta && 'add' in meta) {\n const { id, from, to, startInside } = meta.add\n next = new Map(next).set(id, { from, to, token: resolver?.capture(newState, { from, to }, startInside) ?? null })\n }\n else if (meta && meta.remove.some(id => next.has(id))) {\n const kept = new Map(next)\n for (const id of meta.remove) kept.delete(id)\n next = kept\n }\n return next\n },\n },\n }),\n ]\n },\n})\n\n/**\n * Captures [from, to] of the current document. Both ends stick to the text before them; `startInside` binds a\n * non-empty range's start to its own first character instead, so text inserted right before it stays outside.\n * Release with `releaseRanges` when the flow ends.\n */\nexport function captureRange(editor: Editor, { from, to }: { from: number, to: number }, options: { startInside?: boolean } = {}): DocAnchor {\n const id = newBlockId()\n const meta: DocAnchorsMeta = { add: { id, from, to, startInside: options.startInside ?? false } }\n editor.view.dispatch(editor.state.tr.setMeta(docAnchorsKey, meta).setMeta('addToHistory', false))\n return { id }\n}\n\n/** Current positions of `anchor`, collapsed (`from === to`) when its content was deleted; null when unknown or gone. */\nexport function resolveRange(state: EditorState, anchor: DocAnchor): { from: number, to: number } | null {\n const entry = docAnchorsKey.getState(state)?.get(anchor.id)\n if (!entry || entry.from < 0 || entry.from > entry.to || entry.to > state.doc.content.size) return null\n return { from: entry.from, to: entry.to }\n}\n\n/** Forgets `anchors` (unknown ones are ignored). */\nexport function releaseRanges(editor: Editor, anchors: readonly DocAnchor[]): void {\n if (editor.isDestroyed || !anchors.length) return\n const meta: DocAnchorsMeta = { remove: anchors.map(a => a.id) }\n editor.view.dispatch(editor.state.tr.setMeta(docAnchorsKey, meta).setMeta('addToHistory', false))\n}\n\ndeclare module '@tiptap/core' {\n interface Storage { docAnchors: { resolver: AnchorResolver | null } }\n}\n\n/** The anchor resolver `editor` was created with; null without a collaboration-aware feature. */\nexport const anchorResolverOf = (editor: Editor): AnchorResolver | null => editor.storage.docAnchors?.resolver ?? null\n"],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./schema/mark-flags.js";
|
|
2
|
+
//#region src/core/document-markdown.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `@tiptap/markdown`'s `Markdown` whose serializer ignores every mark that declares `markdownInvisible` (author and
|
|
5
|
+
* comment marks): `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat
|
|
6
|
+
* blocks, summaries, transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders
|
|
7
|
+
* marks without a handler as nothing, but they still split text runs, and its mark-boundary logic then closes and
|
|
8
|
+
* reopens the formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's
|
|
9
|
+
* letter inside). The document keeps the marks. Use it instead of `Markdown` in every editor of a preset.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DocumentMarkdown: import("@tiptap/core").Extension<import("@tiptap/markdown").MarkdownExtensionOptions, import("@tiptap/markdown").MarkdownExtensionStorage>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//# sourceMappingURL=document-markdown.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getExtensionField } from "@tiptap/core";
|
|
2
|
+
import { Markdown } from "@tiptap/markdown";
|
|
3
|
+
//#region src/core/document-markdown.ts
|
|
4
|
+
/** `json` without the marks named in `invisible` on any node; the runs they split become identically marked neighbours. */
|
|
5
|
+
function withoutMarks(json, invisible) {
|
|
6
|
+
return {
|
|
7
|
+
...json,
|
|
8
|
+
...json.marks && { marks: json.marks.filter((mark) => !invisible.has(mark.type)) },
|
|
9
|
+
...json.content && { content: json.content.map((child) => withoutMarks(child, invisible)) }
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `@tiptap/markdown`'s `Markdown` whose serializer ignores every mark that declares `markdownInvisible` (author and
|
|
14
|
+
* comment marks): `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat
|
|
15
|
+
* blocks, summaries, transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders
|
|
16
|
+
* marks without a handler as nothing, but they still split text runs, and its mark-boundary logic then closes and
|
|
17
|
+
* reopens the formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's
|
|
18
|
+
* letter inside). The document keeps the marks. Use it instead of `Markdown` in every editor of a preset.
|
|
19
|
+
*/
|
|
20
|
+
const DocumentMarkdown = Markdown.extend({ onBeforeCreate(event) {
|
|
21
|
+
this.parent?.(event);
|
|
22
|
+
const invisible = new Set(this.editor.extensionManager.extensions.filter((extension) => extension.type === "mark" && getExtensionField(extension, "markdownInvisible")).map((extension) => extension.name));
|
|
23
|
+
if (!invisible.size) return;
|
|
24
|
+
const manager = this.storage.manager;
|
|
25
|
+
const serialize = manager.serialize.bind(manager);
|
|
26
|
+
manager.serialize = (json) => serialize(json && withoutMarks(json, invisible));
|
|
27
|
+
} });
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DocumentMarkdown };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=document-markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-markdown.js","names":[],"sources":["../../src/core/document-markdown.ts"],"sourcesContent":["import { getExtensionField, type JSONContent } from '@tiptap/core'\nimport { Markdown } from '@tiptap/markdown'\nimport './schema/mark-flags'\n\n/** `json` without the marks named in `invisible` on any node; the runs they split become identically marked neighbours. */\nfunction withoutMarks(json: JSONContent, invisible: ReadonlySet<string>): JSONContent {\n return {\n ...json,\n ...(json.marks && { marks: json.marks.filter(mark => !invisible.has(mark.type)) }),\n ...(json.content && { content: json.content.map(child => withoutMarks(child, invisible)) }),\n }\n}\n\n/**\n * `@tiptap/markdown`'s `Markdown` whose serializer ignores every mark that declares `markdownInvisible` (author and\n * comment marks): `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat\n * blocks, summaries, transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders\n * marks without a handler as nothing, but they still split text runs, and its mark-boundary logic then closes and\n * reopens the formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's\n * letter inside). The document keeps the marks. Use it instead of `Markdown` in every editor of a preset.\n */\nexport const DocumentMarkdown = Markdown.extend({\n onBeforeCreate(event) {\n this.parent?.(event)\n const invisible = new Set(\n this.editor.extensionManager.extensions\n .filter(extension => extension.type === 'mark' && getExtensionField<boolean | undefined>(extension, 'markdownInvisible'))\n .map(extension => extension.name),\n )\n if (!invisible.size) return\n // `getMarkdown()` serializes through the same manager instance as `editor.markdown`.\n const manager = this.storage.manager\n const serialize = manager.serialize.bind(manager)\n manager.serialize = json => serialize(json && withoutMarks(json, invisible))\n },\n})\n"],"mappings":";;;;AAKA,SAAS,aAAa,MAAmB,WAA6C;CACpF,OAAO;EACL,GAAG;EACH,GAAI,KAAK,SAAS,EAAE,OAAO,KAAK,MAAM,QAAO,SAAQ,CAAC,UAAU,IAAI,KAAK,IAAI,CAAC,EAAE;EAChF,GAAI,KAAK,WAAW,EAAE,SAAS,KAAK,QAAQ,KAAI,UAAS,aAAa,OAAO,SAAS,CAAC,EAAE;CAC3F;AACF;;;;;;;;;AAUA,MAAa,mBAAmB,SAAS,OAAO,EAC9C,eAAe,OAAO;CACpB,KAAK,SAAS,KAAK;CACnB,MAAM,YAAY,IAAI,IACpB,KAAK,OAAO,iBAAiB,WAC1B,QAAO,cAAa,UAAU,SAAS,UAAU,kBAAuC,WAAW,mBAAmB,CAAC,CAAC,CACxH,KAAI,cAAa,UAAU,IAAI,CACpC;CACA,IAAI,CAAC,UAAU,MAAM;CAErB,MAAM,UAAU,KAAK,QAAQ;CAC7B,MAAM,YAAY,QAAQ,UAAU,KAAK,OAAO;CAChD,QAAQ,aAAY,SAAQ,UAAU,QAAQ,aAAa,MAAM,SAAS,CAAC;AAC7E,EACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/core/download.ts
|
|
2
|
+
/** Offers `text` as a file download named `filename`. */
|
|
3
|
+
function downloadText(filename, text, mime = "text/markdown;charset=utf-8") {
|
|
4
|
+
const url = URL.createObjectURL(new Blob([text], { type: mime }));
|
|
5
|
+
const link = document.createElement("a");
|
|
6
|
+
link.href = url;
|
|
7
|
+
link.download = filename;
|
|
8
|
+
document.body.appendChild(link);
|
|
9
|
+
link.click();
|
|
10
|
+
link.remove();
|
|
11
|
+
URL.revokeObjectURL(url);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { downloadText };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.js","names":[],"sources":["../../src/core/download.ts"],"sourcesContent":["/** Offers `text` as a file download named `filename`. */\nexport function downloadText(filename: string, text: string, mime = 'text/markdown;charset=utf-8'): void {\n const url = URL.createObjectURL(new Blob([text], { type: mime }))\n const link = document.createElement('a')\n link.href = url\n link.download = filename\n document.body.appendChild(link)\n link.click()\n link.remove()\n URL.revokeObjectURL(url)\n}\n"],"mappings":";;AACA,SAAgB,aAAa,UAAkB,MAAc,OAAO,+BAAqC;CACvG,MAAM,MAAM,IAAI,gBAAgB,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;CAChE,MAAM,OAAO,SAAS,cAAc,GAAG;CACvC,KAAK,OAAO;CACZ,KAAK,WAAW;CAChB,SAAS,KAAK,YAAY,IAAI;CAC9B,KAAK,MAAM;CACX,KAAK,OAAO;CACZ,IAAI,gBAAgB,GAAG;AACzB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BlockAction } from "./extension-points.js";
|
|
2
|
+
import { Notifier } from "./notify.js";
|
|
3
|
+
import { EditorContext } from "./context.js";
|
|
4
|
+
import { EditorPreset, FeatureContext } from "./feature.js";
|
|
5
|
+
import { Editor } from "@tiptap/core";
|
|
6
|
+
//#region src/core/editor-ui.d.ts
|
|
7
|
+
/** Editor chrome an `EditorSurface` owns, for the components around it. Settings tabs are the ids features contribute. */
|
|
8
|
+
export interface EditorUi {
|
|
9
|
+
/** Opens the settings UI, on `tab` when given (else on the tab shown last). */
|
|
10
|
+
openSettings: (tab?: string) => void;
|
|
11
|
+
/** Opens or closes the editor's AI sidebar (the surface's `sidebarOpen` model, which the host binds). */
|
|
12
|
+
toggleSidebar: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Opens or closes the editor's comments margin (the surface's `commentsOpen` model, which the host binds). Opening it
|
|
15
|
+
* closes the AI sidebar and vice versa.
|
|
16
|
+
*/
|
|
17
|
+
toggleComments: () => void;
|
|
18
|
+
/** Whether the comments margin is open (read-only; for toggles' active state). */
|
|
19
|
+
readonly commentsOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** What a mounted surface registers for its editor instance: the components beside it read it by `editor`. */
|
|
22
|
+
export interface EditorEntry {
|
|
23
|
+
ui: EditorUi;
|
|
24
|
+
preset: EditorPreset;
|
|
25
|
+
ctx: FeatureContext;
|
|
26
|
+
/** Features' block actions followed by the host's, for the overlay that renders them. */
|
|
27
|
+
blockActions: readonly BlockAction[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Makes `entry` reachable through `editorEntryOf(editor)` (and the framework layers' `useEditorUi(editor)`); returns the
|
|
31
|
+
* unregister function. The surface registers once its editor exists (before emitting `ready`) and unregisters on unmount.
|
|
32
|
+
* Pass the raw editor: framework proxies (e.g. Vue reactive wrappers) are different WeakMap keys.
|
|
33
|
+
*/
|
|
34
|
+
export declare function registerEditor(editor: Editor, entry: EditorEntry): () => void;
|
|
35
|
+
/** The surface entry registered for `editor` (the raw instance); undefined for an unregistered or missing editor. */
|
|
36
|
+
export declare function editorEntryOf(editor: Editor | undefined): EditorEntry | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The one notifier policy: a notice goes to the surface notifier of `editor` (`createEditor`/`EditorSurface` of the
|
|
39
|
+
* host) while it has one, else to the app context's. Both are resolved when a notice is shown (also `dismiss`), so a
|
|
40
|
+
* request that finishes after an await still reaches the current surface. Pass `editor` (the raw instance) and `app` as
|
|
41
|
+
* getters when they change over the notifier's life.
|
|
42
|
+
*/
|
|
43
|
+
export declare function notifierOf(editor: Editor | undefined | (() => Editor | undefined), app: Pick<EditorContext, 'notify'> | (() => Pick<EditorContext, 'notify'>)): Notifier;
|
|
44
|
+
//#endregion
|
|
45
|
+
//# sourceMappingURL=editor-ui.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/core/editor-ui.ts
|
|
2
|
+
/** Each mounted surface's entry by its Tiptap editor (raw, unproxied instance), for components outside its subtree. */
|
|
3
|
+
const entries = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
/**
|
|
5
|
+
* Makes `entry` reachable through `editorEntryOf(editor)` (and the framework layers' `useEditorUi(editor)`); returns the
|
|
6
|
+
* unregister function. The surface registers once its editor exists (before emitting `ready`) and unregisters on unmount.
|
|
7
|
+
* Pass the raw editor: framework proxies (e.g. Vue reactive wrappers) are different WeakMap keys.
|
|
8
|
+
*/
|
|
9
|
+
function registerEditor(editor, entry) {
|
|
10
|
+
entries.set(editor, entry);
|
|
11
|
+
return () => {
|
|
12
|
+
if (entries.get(editor) === entry) entries.delete(editor);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** The surface entry registered for `editor` (the raw instance); undefined for an unregistered or missing editor. */
|
|
16
|
+
function editorEntryOf(editor) {
|
|
17
|
+
return editor ? entries.get(editor) : void 0;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The one notifier policy: a notice goes to the surface notifier of `editor` (`createEditor`/`EditorSurface` of the
|
|
21
|
+
* host) while it has one, else to the app context's. Both are resolved when a notice is shown (also `dismiss`), so a
|
|
22
|
+
* request that finishes after an await still reaches the current surface. Pass `editor` (the raw instance) and `app` as
|
|
23
|
+
* getters when they change over the notifier's life.
|
|
24
|
+
*/
|
|
25
|
+
function notifierOf(editor, app) {
|
|
26
|
+
const resolve = () => {
|
|
27
|
+
return editorEntryOf(typeof editor === "function" ? editor() : editor)?.ctx.notify ?? (typeof app === "function" ? app() : app).notify;
|
|
28
|
+
};
|
|
29
|
+
const notify = (notice) => resolve()(notice);
|
|
30
|
+
notify.dismiss = (id) => {
|
|
31
|
+
resolve().dismiss?.(id);
|
|
32
|
+
};
|
|
33
|
+
return notify;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { editorEntryOf, notifierOf, registerEditor };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=editor-ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-ui.js","names":[],"sources":["../../src/core/editor-ui.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { EditorContext } from './context'\nimport type { EditorPreset, FeatureContext } from './feature'\nimport type { BlockAction } from './extension-points'\nimport type { Notifier } from './notify'\n\n/** Editor chrome an `EditorSurface` owns, for the components around it. Settings tabs are the ids features contribute. */\nexport interface EditorUi {\n /** Opens the settings UI, on `tab` when given (else on the tab shown last). */\n openSettings: (tab?: string) => void\n /** Opens or closes the editor's AI sidebar (the surface's `sidebarOpen` model, which the host binds). */\n toggleSidebar: () => void\n /**\n * Opens or closes the editor's comments margin (the surface's `commentsOpen` model, which the host binds). Opening it\n * closes the AI sidebar and vice versa.\n */\n toggleComments: () => void\n /** Whether the comments margin is open (read-only; for toggles' active state). */\n readonly commentsOpen: boolean\n}\n\n/** What a mounted surface registers for its editor instance: the components beside it read it by `editor`. */\nexport interface EditorEntry {\n ui: EditorUi\n preset: EditorPreset\n ctx: FeatureContext\n /** Features' block actions followed by the host's, for the overlay that renders them. */\n blockActions: readonly BlockAction[]\n}\n\n/** Each mounted surface's entry by its Tiptap editor (raw, unproxied instance), for components outside its subtree. */\nconst entries = new WeakMap<Editor, EditorEntry>()\n\n/**\n * Makes `entry` reachable through `editorEntryOf(editor)` (and the framework layers' `useEditorUi(editor)`); returns the\n * unregister function. The surface registers once its editor exists (before emitting `ready`) and unregisters on unmount.\n * Pass the raw editor: framework proxies (e.g. Vue reactive wrappers) are different WeakMap keys.\n */\nexport function registerEditor(editor: Editor, entry: EditorEntry): () => void {\n entries.set(editor, entry)\n return () => {\n if (entries.get(editor) === entry) entries.delete(editor)\n }\n}\n\n/** The surface entry registered for `editor` (the raw instance); undefined for an unregistered or missing editor. */\nexport function editorEntryOf(editor: Editor | undefined): EditorEntry | undefined {\n return editor ? entries.get(editor) : undefined\n}\n\n/**\n * The one notifier policy: a notice goes to the surface notifier of `editor` (`createEditor`/`EditorSurface` of the\n * host) while it has one, else to the app context's. Both are resolved when a notice is shown (also `dismiss`), so a\n * request that finishes after an await still reaches the current surface. Pass `editor` (the raw instance) and `app` as\n * getters when they change over the notifier's life.\n */\nexport function notifierOf(editor: Editor | undefined | (() => Editor | undefined), app: Pick<EditorContext, 'notify'> | (() => Pick<EditorContext, 'notify'>)): Notifier {\n const resolve = (): Notifier => {\n const instance = typeof editor === 'function' ? editor() : editor\n return editorEntryOf(instance)?.ctx.notify ?? (typeof app === 'function' ? app() : app).notify\n }\n const notify: Notifier = notice => resolve()(notice)\n notify.dismiss = (id) => { resolve().dismiss?.(id) }\n return notify\n}\n"],"mappings":";;AA+BA,MAAM,0BAAU,IAAI,QAA6B;;;;;;AAOjD,SAAgB,eAAe,QAAgB,OAAgC;CAC7E,QAAQ,IAAI,QAAQ,KAAK;CACzB,aAAa;EACX,IAAI,QAAQ,IAAI,MAAM,MAAM,OAAO,QAAQ,OAAO,MAAM;CAC1D;AACF;;AAGA,SAAgB,cAAc,QAAqD;CACjF,OAAO,SAAS,QAAQ,IAAI,MAAM,IAAI,KAAA;AACxC;;;;;;;AAQA,SAAgB,WAAW,QAAyD,KAAsF;CACxK,MAAM,gBAA0B;EAE9B,OAAO,cADU,OAAO,WAAW,aAAa,OAAO,IAAI,MAC9B,CAAC,EAAE,IAAI,WAAW,OAAO,QAAQ,aAAa,IAAI,IAAI,IAAA,CAAK;CAC1F;CACA,MAAM,UAAmB,WAAU,QAAQ,CAAC,CAAC,MAAM;CACnD,OAAO,WAAW,OAAO;EAAE,QAAQ,CAAC,CAAC,UAAU,EAAE;CAAE;CACnD,OAAO;AACT"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Ability, AbilityRuleSource } from "./schema/abilities.js";
|
|
2
|
+
import { MenuItem } from "./toolbar.js";
|
|
3
|
+
import { Editor } from "@tiptap/core";
|
|
4
|
+
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
5
|
+
//#region src/core/extension-points.d.ts
|
|
6
|
+
/** A block in the document: the node and the position right before it. */
|
|
7
|
+
export interface BlockTarget {
|
|
8
|
+
node: Node$1;
|
|
9
|
+
pos: number;
|
|
10
|
+
}
|
|
11
|
+
export interface BlockActionContext extends BlockTarget {
|
|
12
|
+
editor: Editor;
|
|
13
|
+
/** Abilities of the block itself (`abilitiesAt(editor, pos, node)`). */
|
|
14
|
+
abilities: ReadonlySet<Ability>;
|
|
15
|
+
}
|
|
16
|
+
interface BlockActionBase {
|
|
17
|
+
id: string;
|
|
18
|
+
/** Tooltip and aria-label. */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Iconify name, e.g. `i-lucide-copy`. */
|
|
21
|
+
icon: string;
|
|
22
|
+
/** Shown only on blocks that have this ability. */
|
|
23
|
+
ability: Ability;
|
|
24
|
+
/** Further condition; hidden when it returns false. */
|
|
25
|
+
isVisible?: (ctx: BlockActionContext) => boolean;
|
|
26
|
+
/** Position among the actions (ascending, stable); built-ins use their visual sequence, host actions follow them. */
|
|
27
|
+
order?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* An entry of the hover actions shown top-right of a block (`BlockActionsOverlay`); hosts add their own via `blockActions`.
|
|
31
|
+
* Either `run` on click, or `menu`: a dropdown of the items it returns (hidden when it returns none).
|
|
32
|
+
*/
|
|
33
|
+
export type BlockAction = BlockActionBase & ({
|
|
34
|
+
run: (ctx: BlockActionContext) => void;
|
|
35
|
+
menu?: never;
|
|
36
|
+
} | {
|
|
37
|
+
menu: (ctx: BlockActionContext) => MenuItem[];
|
|
38
|
+
run?: never;
|
|
39
|
+
});
|
|
40
|
+
/** A row of the `/` menu. */
|
|
41
|
+
export interface SlashCommandItem {
|
|
42
|
+
/** Typed after `/` (`/ai`); the query matches it or the label as prefix, case-insensitively. */
|
|
43
|
+
id: string;
|
|
44
|
+
label: string;
|
|
45
|
+
/** Iconify name, e.g. `i-lucide-sparkles`. */
|
|
46
|
+
icon: string;
|
|
47
|
+
/** Runs once the `/query` text is deleted; the caret is then in the (now empty) textblock. */
|
|
48
|
+
run: (editor: Editor) => void;
|
|
49
|
+
/** Listed only where the caret has this ability; always listed when unset. */
|
|
50
|
+
ability?: Ability;
|
|
51
|
+
}
|
|
52
|
+
export interface AbilitiesOptions {
|
|
53
|
+
/** Abilities at document root, before any node rule applies. */
|
|
54
|
+
root: readonly Ability[];
|
|
55
|
+
/**
|
|
56
|
+
* Rules per node type name; replace (not merge) the node's own `NodeConfig.abilities`. `configure()` deep-merges into
|
|
57
|
+
* `DEFAULT_ABILITY_RULES`: other types keep their default rule; for a type with an object default only the fields
|
|
58
|
+
* given (`grants`/`revokes`/`own`) replace the default's, a function rule replaces it whole.
|
|
59
|
+
*/
|
|
60
|
+
rules: Record<string, AbilityRuleSource>;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=extension-points.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbilitiesOptions, BlockAction, SlashCommandItem } from "./extension-points.js";
|
|
2
|
+
import { Notifier } from "./notify.js";
|
|
3
|
+
import { EditorContext } from "./context.js";
|
|
4
|
+
import { EditorUi } from "./editor-ui.js";
|
|
5
|
+
import { MetadataRegistry } from "./metadata.js";
|
|
6
|
+
import { CollaborationSession, EditorPreset, FeatureContext, UploadFn } from "./feature.js";
|
|
7
|
+
import { Editor } from "@tiptap/core";
|
|
8
|
+
//#region src/core/feature-context.d.ts
|
|
9
|
+
export interface FeatureContextOptions {
|
|
10
|
+
app: EditorContext;
|
|
11
|
+
preset: EditorPreset;
|
|
12
|
+
ui: EditorUi;
|
|
13
|
+
metadata: MetadataRegistry;
|
|
14
|
+
/** The surface's notice renderer (Nuxt UI toast, sonner). */
|
|
15
|
+
notify: Notifier;
|
|
16
|
+
getEditor: () => Editor | undefined;
|
|
17
|
+
documentId?: string;
|
|
18
|
+
upload?: UploadFn;
|
|
19
|
+
collaboration?: CollaborationSession;
|
|
20
|
+
abilities?: Partial<AbilitiesOptions>;
|
|
21
|
+
/** Host transformer of the `/` menu: receives the features' commands, returns the final list. */
|
|
22
|
+
slashCommands?: (defaults: SlashCommandItem[]) => SlashCommandItem[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The context of one mounted surface (see `FeatureContext`). Resolves the preset's anchor resolver and builds the `/`
|
|
26
|
+
* menu lazily (features' commands, then the host's transformer), once. Call it during component setup.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createFeatureContext(options: FeatureContextOptions): FeatureContext;
|
|
29
|
+
/** The features' block actions in `order` (stable), followed by the host's. */
|
|
30
|
+
export declare function blockActionsOf(preset: EditorPreset, ctx: FeatureContext, hostActions?: readonly BlockAction[]): BlockAction[];
|
|
31
|
+
//#endregion
|
|
32
|
+
//# sourceMappingURL=feature-context.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { contributions } from "./define-editor.js";
|
|
2
|
+
//#region src/core/feature-context.ts
|
|
3
|
+
const byOrder = (a, b) => (a.order ?? 0) - (b.order ?? 0);
|
|
4
|
+
/**
|
|
5
|
+
* The context of one mounted surface (see `FeatureContext`). Resolves the preset's anchor resolver and builds the `/`
|
|
6
|
+
* menu lazily (features' commands, then the host's transformer), once. Call it during component setup.
|
|
7
|
+
*/
|
|
8
|
+
function createFeatureContext(options) {
|
|
9
|
+
const { app, preset } = options;
|
|
10
|
+
let slash;
|
|
11
|
+
const ctx = {
|
|
12
|
+
app,
|
|
13
|
+
settings: app.settings,
|
|
14
|
+
metadata: options.metadata,
|
|
15
|
+
ui: options.ui,
|
|
16
|
+
notify: options.notify,
|
|
17
|
+
locale: app.locale,
|
|
18
|
+
t: app.t,
|
|
19
|
+
fetch: app.fetch,
|
|
20
|
+
ai: app.ai,
|
|
21
|
+
documentId: options.documentId,
|
|
22
|
+
upload: options.upload,
|
|
23
|
+
collaboration: options.collaboration,
|
|
24
|
+
anchorResolver: null,
|
|
25
|
+
abilities: options.abilities ?? {},
|
|
26
|
+
slashCommands: () => {
|
|
27
|
+
if (!slash) {
|
|
28
|
+
const defaults = contributions(preset, "slashCommands").flatMap((factory) => factory(ctx));
|
|
29
|
+
slash = options.slashCommands ? options.slashCommands(defaults) : defaults;
|
|
30
|
+
}
|
|
31
|
+
return slash;
|
|
32
|
+
},
|
|
33
|
+
getEditor: options.getEditor
|
|
34
|
+
};
|
|
35
|
+
ctx.anchorResolver = contributions(preset, "anchorResolver")[0]?.(ctx) ?? null;
|
|
36
|
+
for (const defaults of contributions(preset, "metadataDefaults")) ctx.metadata.defaults(defaults(ctx));
|
|
37
|
+
return ctx;
|
|
38
|
+
}
|
|
39
|
+
/** The features' block actions in `order` (stable), followed by the host's. */
|
|
40
|
+
function blockActionsOf(preset, ctx, hostActions = []) {
|
|
41
|
+
return [...contributions(preset, "blockActions").flatMap((factory) => factory(ctx)).sort(byOrder), ...hostActions];
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { blockActionsOf, createFeatureContext };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=feature-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-context.js","names":[],"sources":["../../src/core/feature-context.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { EditorContext } from './context'\nimport { contributions } from './define-editor'\nimport type { EditorUi } from './editor-ui'\nimport type { AbilitiesOptions, BlockAction, SlashCommandItem } from './extension-points'\nimport type { CollaborationSession, EditorPreset, FeatureContext, UploadFn } from './feature'\nimport type { MetadataRegistry } from './metadata'\nimport type { Notifier } from './notify'\n\nexport interface FeatureContextOptions {\n app: EditorContext\n preset: EditorPreset\n ui: EditorUi\n metadata: MetadataRegistry\n /** The surface's notice renderer (Nuxt UI toast, sonner). */\n notify: Notifier\n getEditor: () => Editor | undefined\n documentId?: string\n upload?: UploadFn\n collaboration?: CollaborationSession\n abilities?: Partial<AbilitiesOptions>\n /** Host transformer of the `/` menu: receives the features' commands, returns the final list. */\n slashCommands?: (defaults: SlashCommandItem[]) => SlashCommandItem[]\n}\n\nconst byOrder = <T extends { order?: number }>(a: T, b: T) => (a.order ?? 0) - (b.order ?? 0)\n\n/**\n * The context of one mounted surface (see `FeatureContext`). Resolves the preset's anchor resolver and builds the `/`\n * menu lazily (features' commands, then the host's transformer), once. Call it during component setup.\n */\nexport function createFeatureContext(options: FeatureContextOptions): FeatureContext {\n const { app, preset } = options\n let slash: SlashCommandItem[] | undefined\n const ctx: { -readonly [K in keyof FeatureContext]: FeatureContext[K] } = {\n app,\n settings: app.settings,\n metadata: options.metadata,\n ui: options.ui,\n notify: options.notify,\n locale: app.locale,\n t: app.t,\n fetch: app.fetch,\n ai: app.ai,\n documentId: options.documentId,\n upload: options.upload,\n collaboration: options.collaboration,\n anchorResolver: null,\n abilities: options.abilities ?? {},\n slashCommands: () => {\n if (!slash) {\n const defaults = contributions(preset, 'slashCommands').flatMap(factory => factory(ctx))\n slash = options.slashCommands ? options.slashCommands(defaults) : defaults\n }\n return slash\n },\n getEditor: options.getEditor,\n }\n ctx.anchorResolver = contributions(preset, 'anchorResolver')[0]?.(ctx) ?? null\n for (const defaults of contributions(preset, 'metadataDefaults')) ctx.metadata.defaults(defaults(ctx))\n return ctx\n}\n\n/** The features' block actions in `order` (stable), followed by the host's. */\nexport function blockActionsOf(preset: EditorPreset, ctx: FeatureContext, hostActions: readonly BlockAction[] = []): BlockAction[] {\n return [...contributions(preset, 'blockActions').flatMap(factory => factory(ctx)).sort(byOrder), ...hostActions]\n}\n"],"mappings":";;AAyBA,MAAM,WAAyC,GAAM,OAAU,EAAE,SAAS,MAAM,EAAE,SAAS;;;;;AAM3F,SAAgB,qBAAqB,SAAgD;CACnF,MAAM,EAAE,KAAK,WAAW;CACxB,IAAI;CACJ,MAAM,MAAoE;EACxE;EACA,UAAU,IAAI;EACd,UAAU,QAAQ;EAClB,IAAI,QAAQ;EACZ,QAAQ,QAAQ;EAChB,QAAQ,IAAI;EACZ,GAAG,IAAI;EACP,OAAO,IAAI;EACX,IAAI,IAAI;EACR,YAAY,QAAQ;EACpB,QAAQ,QAAQ;EAChB,eAAe,QAAQ;EACvB,gBAAgB;EAChB,WAAW,QAAQ,aAAa,CAAC;EACjC,qBAAqB;GACnB,IAAI,CAAC,OAAO;IACV,MAAM,WAAW,cAAc,QAAQ,eAAe,CAAC,CAAC,SAAQ,YAAW,QAAQ,GAAG,CAAC;IACvF,QAAQ,QAAQ,gBAAgB,QAAQ,cAAc,QAAQ,IAAI;GACpE;GACA,OAAO;EACT;EACA,WAAW,QAAQ;CACrB;CACA,IAAI,iBAAiB,cAAc,QAAQ,gBAAgB,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK;CAC1E,KAAK,MAAM,YAAY,cAAc,QAAQ,kBAAkB,GAAG,IAAI,SAAS,SAAS,SAAS,GAAG,CAAC;CACrG,OAAO;AACT;;AAGA,SAAgB,eAAe,QAAsB,KAAqB,cAAsC,CAAC,GAAkB;CACjI,OAAO,CAAC,GAAG,cAAc,QAAQ,cAAc,CAAC,CAAC,SAAQ,YAAW,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,GAAG,WAAW;AACjH"}
|