@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,96 @@
|
|
|
1
|
+
import { Fragment, Node, Schema } from "@tiptap/pm/model";
|
|
2
|
+
//#region src/core/convert.d.ts
|
|
3
|
+
/** A block type blocks can be converted into. Inert: composite, speaker and custom targets are interpreted by their providers. */
|
|
4
|
+
export type ConvertTarget = {
|
|
5
|
+
type: 'paragraph';
|
|
6
|
+
} | {
|
|
7
|
+
type: 'heading';
|
|
8
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'bulletList';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'orderedList';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'blockquote';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'codeBlock';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'transcriptSegment';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'composite';
|
|
21
|
+
kind: string;
|
|
22
|
+
} |
|
|
23
|
+
/** A host block: `id` is both the target id and the node type name; `attrs` must match for the node to be the current target. */
|
|
24
|
+
{
|
|
25
|
+
type: 'custom';
|
|
26
|
+
id: string;
|
|
27
|
+
attrs?: Record<string, unknown>;
|
|
28
|
+
};
|
|
29
|
+
type CoreTarget = Extract<ConvertTarget, {
|
|
30
|
+
type: 'paragraph' | 'heading' | 'bulletList' | 'orderedList' | 'blockquote' | 'codeBlock';
|
|
31
|
+
}>;
|
|
32
|
+
/** Ids of the targets of the core provider. */
|
|
33
|
+
export declare const CORE_TARGET_IDS: readonly ["paragraph", "heading1", "heading2", "heading3", "bulletList", "orderedList", "blockquote", "codeBlock"];
|
|
34
|
+
/** `'heading2'`, `'composite:task'`, a custom target's id, else the target's type. */
|
|
35
|
+
export declare function convertTargetId(target: ConvertTarget): string;
|
|
36
|
+
/** The target of a `CORE_TARGET_IDS` entry; null for anything else. */
|
|
37
|
+
export declare function parseCoreTarget(id: string): CoreTarget | null;
|
|
38
|
+
export declare const isCoreTarget: (target: ConvertTarget) => target is CoreTarget;
|
|
39
|
+
/** `node` already is `target` (same heading level, same composite kind, same custom type and attrs). */
|
|
40
|
+
export declare function isCurrentTarget(node: Node, target: ConvertTarget): boolean;
|
|
41
|
+
/** A textblock of the document body (not a block's chrome such as a composite title). */
|
|
42
|
+
export declare const isTextblockNode: (node: Node) => boolean;
|
|
43
|
+
export declare const isListNode: (node: Node) => boolean;
|
|
44
|
+
export declare const isQuoteNode: (node: Node) => boolean;
|
|
45
|
+
/** A host block holding blocks (a callout): an editor block that is no textblock, leaf, block container, list or quote. */
|
|
46
|
+
export declare const isWrapperBlock: (node: Node) => boolean;
|
|
47
|
+
/** Blocks the core engine converts by itself. */
|
|
48
|
+
export declare const isCoreSource: (node: Node) => boolean;
|
|
49
|
+
export declare function childrenOf(node: Node, from?: number): Node[];
|
|
50
|
+
/** Targets offered for `node` in menus: every core target its schema has except its current type; none for other blocks. */
|
|
51
|
+
export declare function coreConversionTargets(node: Node): ConvertTarget[];
|
|
52
|
+
/** A textblock type to retype blocks into; `variant` lists the attributes that tell variants of one type apart (a heading's level). */
|
|
53
|
+
export interface TextblockSpec {
|
|
54
|
+
type: string;
|
|
55
|
+
attrs?: Record<string, unknown>;
|
|
56
|
+
variant?: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/** The spec of a textblock core target. */
|
|
59
|
+
export declare function textblockSpecOf(target: Extract<CoreTarget, {
|
|
60
|
+
type: 'paragraph' | 'heading' | 'codeBlock';
|
|
61
|
+
}>): TextblockSpec;
|
|
62
|
+
/** Blocks of a feature (composites) that unwrap into plain blocks when converted into core targets. */
|
|
63
|
+
export interface ForeignBlocks {
|
|
64
|
+
is: (node: Node) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* `node` as plain blocks. `keepEmptyTitle`: keep an empty first block. `headingLevel`: the node becomes a heading of
|
|
67
|
+
* that level, so nested foreign blocks become sub-headings.
|
|
68
|
+
*/
|
|
69
|
+
unwrap: (node: Node, keepEmptyTitle: boolean, headingLevel?: number) => Node[];
|
|
70
|
+
}
|
|
71
|
+
export interface Converter {
|
|
72
|
+
/** Inline content of a textblock for a block of `type`: plain text for code blocks; elsewhere code lines become hard breaks. */
|
|
73
|
+
inline: (node: Node, type: string) => Fragment;
|
|
74
|
+
/** `node` retyped to a textblock; keeps its own id. The node itself when it already is the target. */
|
|
75
|
+
textblock: (node: Node, to: TextblockSpec) => Node;
|
|
76
|
+
toTextblocks: (nodes: Node[], to: TextblockSpec) => Node[];
|
|
77
|
+
/** One list of `type` (`bulletList`, `orderedList`) with an item per textblock; lists contribute their items. */
|
|
78
|
+
toList: (nodes: Node[], type: string) => Node[];
|
|
79
|
+
toQuote: (nodes: Node[]) => Node[];
|
|
80
|
+
}
|
|
81
|
+
/** The conversion rules between textblocks, lists and quotes, over `schema`. Foreign blocks unwrap through `foreign`. */
|
|
82
|
+
export declare function createConverter(schema: Schema, foreign?: ForeignBlocks): Converter;
|
|
83
|
+
/**
|
|
84
|
+
* Finalizes a conversion of `nodes` into `output`: ids (the first output block takes the first input block's id,
|
|
85
|
+
* blocks carried over keep theirs, new ones get none), then null when nothing changed or a block violates the schema.
|
|
86
|
+
*/
|
|
87
|
+
export declare function finishConversion(nodes: Node[], output: Node[]): Node[] | null;
|
|
88
|
+
/**
|
|
89
|
+
* Blocks `nodes` (siblings) converted to a core `target`: textblocks retype, lists flatten into one block per item,
|
|
90
|
+
* quotes unwrap, textblocks wrap into one list item / paragraph each. Null when the target is not a core target, a node
|
|
91
|
+
* is not a core source, nothing changes or the result does not fit the schema.
|
|
92
|
+
*/
|
|
93
|
+
export declare function convertCoreBlocks(schema: Schema, nodes: Node[], target: ConvertTarget): Node[] | null;
|
|
94
|
+
//#endregion
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import "./schema/block-ids.js";
|
|
2
|
+
import { isBlockContainer, isChromeNode, isEditorBlock } from "./schema/node-flags.js";
|
|
3
|
+
import { getText, getTextSerializersFromSchema } from "@tiptap/core";
|
|
4
|
+
import { Fragment } from "@tiptap/pm/model";
|
|
5
|
+
//#region src/core/convert.ts
|
|
6
|
+
/** Ids of the targets of the core provider. */
|
|
7
|
+
const CORE_TARGET_IDS = [
|
|
8
|
+
"paragraph",
|
|
9
|
+
"heading1",
|
|
10
|
+
"heading2",
|
|
11
|
+
"heading3",
|
|
12
|
+
"bulletList",
|
|
13
|
+
"orderedList",
|
|
14
|
+
"blockquote",
|
|
15
|
+
"codeBlock"
|
|
16
|
+
];
|
|
17
|
+
const CORE_TARGET_TYPES = {
|
|
18
|
+
paragraph: true,
|
|
19
|
+
heading: true,
|
|
20
|
+
bulletList: true,
|
|
21
|
+
orderedList: true,
|
|
22
|
+
blockquote: true,
|
|
23
|
+
codeBlock: true
|
|
24
|
+
};
|
|
25
|
+
/** `'heading2'`, `'composite:task'`, a custom target's id, else the target's type. */
|
|
26
|
+
function convertTargetId(target) {
|
|
27
|
+
if (target.type === "heading") return `heading${target.level}`;
|
|
28
|
+
if (target.type === "composite") return `composite:${target.kind}`;
|
|
29
|
+
if (target.type === "custom") return target.id;
|
|
30
|
+
return target.type;
|
|
31
|
+
}
|
|
32
|
+
/** The target of a `CORE_TARGET_IDS` entry; null for anything else. */
|
|
33
|
+
function parseCoreTarget(id) {
|
|
34
|
+
const known = CORE_TARGET_IDS.find((targetId) => targetId === id);
|
|
35
|
+
if (!known) return null;
|
|
36
|
+
if (known === "heading1" || known === "heading2" || known === "heading3") return {
|
|
37
|
+
type: "heading",
|
|
38
|
+
level: Number(known.slice(-1))
|
|
39
|
+
};
|
|
40
|
+
return { type: known };
|
|
41
|
+
}
|
|
42
|
+
const isCoreTarget = (target) => CORE_TARGET_TYPES[target.type] === true;
|
|
43
|
+
/** `node` already is `target` (same heading level, same composite kind, same custom type and attrs). */
|
|
44
|
+
function isCurrentTarget(node, target) {
|
|
45
|
+
if (target.type === "custom") return node.type.name === target.id && Object.entries(target.attrs ?? {}).every(([key, value]) => node.attrs[key] === value);
|
|
46
|
+
if (node.type.name !== target.type) return false;
|
|
47
|
+
if (target.type === "heading") return node.attrs.level === target.level;
|
|
48
|
+
if (target.type === "composite") return node.attrs.kind === target.kind;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
const LISTS = {
|
|
52
|
+
bulletList: true,
|
|
53
|
+
orderedList: true
|
|
54
|
+
};
|
|
55
|
+
const CODE_BLOCK = "codeBlock";
|
|
56
|
+
/** A textblock of the document body (not a block's chrome such as a composite title). */
|
|
57
|
+
const isTextblockNode = (node) => node.isTextblock && !isChromeNode(node);
|
|
58
|
+
const isListNode = (node) => LISTS[node.type.name] === true;
|
|
59
|
+
const isQuoteNode = (node) => node.type.name === "blockquote";
|
|
60
|
+
/** A host block holding blocks (a callout): an editor block that is no textblock, leaf, block container, list or quote. */
|
|
61
|
+
const isWrapperBlock = (node) => isEditorBlock(node) && !node.isTextblock && !node.isLeaf && !isBlockContainer(node) && !isListNode(node) && !isQuoteNode(node);
|
|
62
|
+
/** Blocks the core engine converts by itself. */
|
|
63
|
+
const isCoreSource = (node) => isTextblockNode(node) || isListNode(node) || isQuoteNode(node);
|
|
64
|
+
function childrenOf(node, from = 0) {
|
|
65
|
+
const children = [];
|
|
66
|
+
node.forEach((child, _offset, index) => {
|
|
67
|
+
if (index >= from) children.push(child);
|
|
68
|
+
});
|
|
69
|
+
return children;
|
|
70
|
+
}
|
|
71
|
+
/** Targets offered for `node` in menus: every core target its schema has except its current type; none for other blocks. */
|
|
72
|
+
function coreConversionTargets(node) {
|
|
73
|
+
if (!isCoreSource(node)) return [];
|
|
74
|
+
const targets = [
|
|
75
|
+
{ type: "paragraph" },
|
|
76
|
+
{
|
|
77
|
+
type: "heading",
|
|
78
|
+
level: 1
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: "heading",
|
|
82
|
+
level: 2
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "heading",
|
|
86
|
+
level: 3
|
|
87
|
+
},
|
|
88
|
+
{ type: "bulletList" },
|
|
89
|
+
{ type: "orderedList" },
|
|
90
|
+
{ type: "blockquote" },
|
|
91
|
+
{ type: "codeBlock" }
|
|
92
|
+
];
|
|
93
|
+
const { nodes } = node.type.schema;
|
|
94
|
+
return targets.filter((target) => nodes[target.type] && !isCurrentTarget(node, target));
|
|
95
|
+
}
|
|
96
|
+
/** The spec of a textblock core target. */
|
|
97
|
+
function textblockSpecOf(target) {
|
|
98
|
+
return target.type === "heading" ? {
|
|
99
|
+
type: "heading",
|
|
100
|
+
attrs: { level: target.level },
|
|
101
|
+
variant: ["level"]
|
|
102
|
+
} : { type: target.type };
|
|
103
|
+
}
|
|
104
|
+
/** The conversion rules between textblocks, lists and quotes, over `schema`. Foreign blocks unwrap through `foreign`. */
|
|
105
|
+
function createConverter(schema, foreign) {
|
|
106
|
+
const n = schema.nodes;
|
|
107
|
+
const paragraph = n.paragraph;
|
|
108
|
+
const listItem = n.listItem;
|
|
109
|
+
const textSerializers = getTextSerializersFromSchema(schema);
|
|
110
|
+
const paragraphSpec = { type: "paragraph" };
|
|
111
|
+
function inline(node, type) {
|
|
112
|
+
if (type === CODE_BLOCK) {
|
|
113
|
+
const text = getText(node, { textSerializers });
|
|
114
|
+
return text ? Fragment.from(schema.text(text)) : Fragment.empty;
|
|
115
|
+
}
|
|
116
|
+
const hardBreak = n.hardBreak;
|
|
117
|
+
if (node.type.name !== CODE_BLOCK || !hardBreak) return node.content;
|
|
118
|
+
const parts = [];
|
|
119
|
+
node.textContent.split("\n").forEach((line, index) => {
|
|
120
|
+
if (index) parts.push(hardBreak.create());
|
|
121
|
+
if (line) parts.push(schema.text(line));
|
|
122
|
+
});
|
|
123
|
+
return Fragment.from(parts);
|
|
124
|
+
}
|
|
125
|
+
function textblock(node, to) {
|
|
126
|
+
if (node.type.name === to.type && (to.variant ?? []).every((key) => node.attrs[key] === to.attrs?.[key])) return node;
|
|
127
|
+
const attrs = {
|
|
128
|
+
["id"]: node.attrs["id"] ?? null,
|
|
129
|
+
...to.attrs
|
|
130
|
+
};
|
|
131
|
+
return n[to.type].create(attrs, inline(node, to.type));
|
|
132
|
+
}
|
|
133
|
+
/** A list as textblocks: one per item from its first paragraph, nested lists depth-first, other item blocks as they are. */
|
|
134
|
+
function flattenList(list, to) {
|
|
135
|
+
return childrenOf(list).flatMap((item) => childrenOf(item).flatMap((child, index) => {
|
|
136
|
+
if (isListNode(child)) return flattenList(child, to);
|
|
137
|
+
return index === 0 && isTextblockNode(child) ? [textblock(child, to)] : [child];
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
/** Content of a quote or list made from `node`: textblocks as paragraphs, quotes and foreign blocks unwrapped. */
|
|
141
|
+
function containerBlocks(node) {
|
|
142
|
+
if (isTextblockNode(node)) return [textblock(node, paragraphSpec)];
|
|
143
|
+
if (isQuoteNode(node)) return childrenOf(node);
|
|
144
|
+
if (foreign?.is(node)) return foreign.unwrap(node, false);
|
|
145
|
+
return [node];
|
|
146
|
+
}
|
|
147
|
+
/** List items of `blocks`: one per textblock (as paragraph), the items of lists; other blocks join the item before them. */
|
|
148
|
+
function listItems(blocks) {
|
|
149
|
+
const items = [];
|
|
150
|
+
for (const block of blocks) if (isTextblockNode(block)) items.push(listItem.create(null, textblock(block, paragraphSpec)));
|
|
151
|
+
else if (isListNode(block)) items.push(...childrenOf(block));
|
|
152
|
+
else {
|
|
153
|
+
const last = items.pop();
|
|
154
|
+
items.push(last ? last.copy(last.content.addToEnd(block)) : listItem.create(null, [paragraph.create(), block]));
|
|
155
|
+
}
|
|
156
|
+
return items;
|
|
157
|
+
}
|
|
158
|
+
function toTextblocks(nodes, to) {
|
|
159
|
+
return nodes.flatMap((node) => {
|
|
160
|
+
if (isTextblockNode(node)) return [textblock(node, to)];
|
|
161
|
+
if (isListNode(node)) return flattenList(node, to);
|
|
162
|
+
if (isQuoteNode(node)) return childrenOf(node).map((child) => isTextblockNode(child) ? textblock(child, to) : child);
|
|
163
|
+
const headingLevel = to.type === "heading" ? Number(to.attrs?.level) : void 0;
|
|
164
|
+
const [title, ...rest] = foreign.unwrap(node, true, headingLevel);
|
|
165
|
+
return [textblock(title, to), ...rest];
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
inline,
|
|
170
|
+
textblock,
|
|
171
|
+
toTextblocks,
|
|
172
|
+
toList: (nodes, type) => [n[type].create(null, listItems(nodes.flatMap(containerBlocks)))],
|
|
173
|
+
toQuote: (nodes) => [n.blockquote.create(null, nodes.flatMap(containerBlocks))]
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/** `node` without the id `id` anywhere in it (itself included); the same node when it does not carry it. */
|
|
177
|
+
function withoutId(node, id) {
|
|
178
|
+
let found = node.attrs["id"] === id;
|
|
179
|
+
if (!found) node.descendants((child) => {
|
|
180
|
+
if (child.attrs["id"] === id) found = true;
|
|
181
|
+
return !found;
|
|
182
|
+
});
|
|
183
|
+
if (!found) return node;
|
|
184
|
+
const attrs = node.attrs["id"] === id ? {
|
|
185
|
+
...node.attrs,
|
|
186
|
+
["id"]: null
|
|
187
|
+
} : node.attrs;
|
|
188
|
+
return node.type.create(attrs, childrenOf(node).map((child) => withoutId(child, id)), node.marks);
|
|
189
|
+
}
|
|
190
|
+
/** The first block takes `id` (the first input block's) and no other block keeps it; unchanged when there is no id. */
|
|
191
|
+
function withFirstId(blocks, id) {
|
|
192
|
+
const [head, ...rest] = blocks;
|
|
193
|
+
if (!head || typeof id !== "string" || !id || !("id" in head.attrs)) return blocks;
|
|
194
|
+
const own = withoutId(head, id);
|
|
195
|
+
return [own.type.create({
|
|
196
|
+
...own.attrs,
|
|
197
|
+
["id"]: id
|
|
198
|
+
}, own.content, own.marks), ...rest.map((block) => withoutId(block, id))];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Finalizes a conversion of `nodes` into `output`: ids (the first output block takes the first input block's id,
|
|
202
|
+
* blocks carried over keep theirs, new ones get none), then null when nothing changed or a block violates the schema.
|
|
203
|
+
*/
|
|
204
|
+
function finishConversion(nodes, output) {
|
|
205
|
+
const result = withFirstId(output, nodes[0]?.attrs["id"]);
|
|
206
|
+
if (Fragment.from(result).eq(Fragment.from(nodes))) return null;
|
|
207
|
+
try {
|
|
208
|
+
for (const block of result) block.check();
|
|
209
|
+
} catch {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
return result;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Blocks `nodes` (siblings) converted to a core `target`: textblocks retype, lists flatten into one block per item,
|
|
216
|
+
* quotes unwrap, textblocks wrap into one list item / paragraph each. Null when the target is not a core target, a node
|
|
217
|
+
* is not a core source, nothing changes or the result does not fit the schema.
|
|
218
|
+
*/
|
|
219
|
+
function convertCoreBlocks(schema, nodes, target) {
|
|
220
|
+
const first = nodes[0];
|
|
221
|
+
if (!first || !isCoreTarget(target) || !schema.nodes[target.type]) return null;
|
|
222
|
+
if (!nodes.every(isCoreSource)) return null;
|
|
223
|
+
if (nodes.length === 1 && isCurrentTarget(first, target)) return null;
|
|
224
|
+
const converter = createConverter(schema);
|
|
225
|
+
let output;
|
|
226
|
+
switch (target.type) {
|
|
227
|
+
case "bulletList":
|
|
228
|
+
case "orderedList":
|
|
229
|
+
output = converter.toList(nodes, target.type);
|
|
230
|
+
break;
|
|
231
|
+
case "blockquote":
|
|
232
|
+
output = converter.toQuote(nodes);
|
|
233
|
+
break;
|
|
234
|
+
default: output = converter.toTextblocks(nodes, textblockSpecOf(target));
|
|
235
|
+
}
|
|
236
|
+
return finishConversion(nodes, output);
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
export { CORE_TARGET_IDS, childrenOf, convertCoreBlocks, convertTargetId, coreConversionTargets, createConverter, finishConversion, isCoreSource, isCoreTarget, isCurrentTarget, isListNode, isQuoteNode, isTextblockNode, isWrapperBlock, parseCoreTarget, textblockSpecOf };
|
|
240
|
+
|
|
241
|
+
//# sourceMappingURL=convert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.js","names":[],"sources":["../../src/core/convert.ts"],"sourcesContent":["import { getText, getTextSerializersFromSchema } from '@tiptap/core'\nimport { Fragment, type Node as PMNode, type Schema } from '@tiptap/pm/model'\nimport { BLOCK_ID_ATTR } from './schema/block-ids'\nimport { isBlockContainer, isChromeNode, isEditorBlock } from './schema/node-flags'\n\n// Vue-free and server-importable: the generic block conversion engine behind „Umwandeln in …“ and the toolbar. It\n// converts paragraphs, headings, code blocks, lists and quotes into each other. Features whose blocks take part\n// (composites, speaker segments) own those conversions as `ConversionProvider`s and reuse this engine for the shared\n// parts (see `ForeignBlocks`, `createConverter`, `finishConversion`).\n\n/** A block type blocks can be converted into. Inert: composite, speaker and custom targets are interpreted by their providers. */\nexport type ConvertTarget =\n | { type: 'paragraph' } | { type: 'heading', level: 1 | 2 | 3 | 4 | 5 | 6 } | { type: 'bulletList' } | { type: 'orderedList' }\n | { type: 'blockquote' } | { type: 'codeBlock' } | { type: 'transcriptSegment' } | { type: 'composite', kind: string }\n /** A host block: `id` is both the target id and the node type name; `attrs` must match for the node to be the current target. */\n | { type: 'custom', id: string, attrs?: Record<string, unknown> }\n\ntype CoreTarget = Extract<ConvertTarget, { type: 'paragraph' | 'heading' | 'bulletList' | 'orderedList' | 'blockquote' | 'codeBlock' }>\n\n/** Ids of the targets of the core provider. */\nexport const CORE_TARGET_IDS = ['paragraph', 'heading1', 'heading2', 'heading3', 'bulletList', 'orderedList', 'blockquote', 'codeBlock'] as const\n\nconst CORE_TARGET_TYPES: Record<string, true> = { paragraph: true, heading: true, bulletList: true, orderedList: true, blockquote: true, codeBlock: true }\n\n/** `'heading2'`, `'composite:task'`, a custom target's id, else the target's type. */\nexport function convertTargetId(target: ConvertTarget): string {\n if (target.type === 'heading') return `heading${target.level}`\n if (target.type === 'composite') return `composite:${target.kind}`\n if (target.type === 'custom') return target.id\n return target.type\n}\n\n/** The target of a `CORE_TARGET_IDS` entry; null for anything else. */\nexport function parseCoreTarget(id: string): CoreTarget | null {\n const known = CORE_TARGET_IDS.find(targetId => targetId === id)\n if (!known) return null\n if (known === 'heading1' || known === 'heading2' || known === 'heading3') return { type: 'heading', level: Number(known.slice(-1)) as 1 | 2 | 3 }\n return { type: known }\n}\n\nexport const isCoreTarget = (target: ConvertTarget): target is CoreTarget => CORE_TARGET_TYPES[target.type] === true\n\n/** `node` already is `target` (same heading level, same composite kind, same custom type and attrs). */\nexport function isCurrentTarget(node: PMNode, target: ConvertTarget): boolean {\n if (target.type === 'custom') return node.type.name === target.id && Object.entries(target.attrs ?? {}).every(([key, value]) => node.attrs[key] === value)\n if (node.type.name !== target.type) return false\n if (target.type === 'heading') return node.attrs.level === target.level\n if (target.type === 'composite') return node.attrs.kind === target.kind\n return true\n}\n\nconst LISTS: Record<string, true> = { bulletList: true, orderedList: true }\nconst CODE_BLOCK = 'codeBlock'\n\n/** A textblock of the document body (not a block's chrome such as a composite title). */\nexport const isTextblockNode = (node: PMNode) => node.isTextblock && !isChromeNode(node)\nexport const isListNode = (node: PMNode) => LISTS[node.type.name] === true\nexport const isQuoteNode = (node: PMNode) => node.type.name === 'blockquote'\n/** A host block holding blocks (a callout): an editor block that is no textblock, leaf, block container, list or quote. */\nexport const isWrapperBlock = (node: PMNode) =>\n isEditorBlock(node) && !node.isTextblock && !node.isLeaf && !isBlockContainer(node) && !isListNode(node) && !isQuoteNode(node)\n/** Blocks the core engine converts by itself. */\nexport const isCoreSource = (node: PMNode) => isTextblockNode(node) || isListNode(node) || isQuoteNode(node)\n\nexport function childrenOf(node: PMNode, from = 0): PMNode[] {\n const children: PMNode[] = []\n node.forEach((child, _offset, index) => {\n if (index >= from) children.push(child)\n })\n return children\n}\n\n/** Targets offered for `node` in menus: every core target its schema has except its current type; none for other blocks. */\nexport function coreConversionTargets(node: PMNode): ConvertTarget[] {\n if (!isCoreSource(node)) return []\n const targets: ConvertTarget[] = [\n { type: 'paragraph' }, { type: 'heading', level: 1 }, { type: 'heading', level: 2 }, { type: 'heading', level: 3 },\n { type: 'bulletList' }, { type: 'orderedList' }, { type: 'blockquote' }, { type: 'codeBlock' },\n ]\n const { nodes } = node.type.schema\n return targets.filter(target => nodes[target.type] && !isCurrentTarget(node, target))\n}\n\n/** A textblock type to retype blocks into; `variant` lists the attributes that tell variants of one type apart (a heading's level). */\nexport interface TextblockSpec {\n type: string\n attrs?: Record<string, unknown>\n variant?: readonly string[]\n}\n\n/** The spec of a textblock core target. */\nexport function textblockSpecOf(target: Extract<CoreTarget, { type: 'paragraph' | 'heading' | 'codeBlock' }>): TextblockSpec {\n return target.type === 'heading' ? { type: 'heading', attrs: { level: target.level }, variant: ['level'] } : { type: target.type }\n}\n\n/** Blocks of a feature (composites) that unwrap into plain blocks when converted into core targets. */\nexport interface ForeignBlocks {\n is: (node: PMNode) => boolean\n /**\n * `node` as plain blocks. `keepEmptyTitle`: keep an empty first block. `headingLevel`: the node becomes a heading of\n * that level, so nested foreign blocks become sub-headings.\n */\n unwrap: (node: PMNode, keepEmptyTitle: boolean, headingLevel?: number) => PMNode[]\n}\n\nexport interface Converter {\n /** Inline content of a textblock for a block of `type`: plain text for code blocks; elsewhere code lines become hard breaks. */\n inline: (node: PMNode, type: string) => Fragment\n /** `node` retyped to a textblock; keeps its own id. The node itself when it already is the target. */\n textblock: (node: PMNode, to: TextblockSpec) => PMNode\n toTextblocks: (nodes: PMNode[], to: TextblockSpec) => PMNode[]\n /** One list of `type` (`bulletList`, `orderedList`) with an item per textblock; lists contribute their items. */\n toList: (nodes: PMNode[], type: string) => PMNode[]\n toQuote: (nodes: PMNode[]) => PMNode[]\n}\n\n/** The conversion rules between textblocks, lists and quotes, over `schema`. Foreign blocks unwrap through `foreign`. */\nexport function createConverter(schema: Schema, foreign?: ForeignBlocks): Converter {\n const n = schema.nodes\n const paragraph = n.paragraph!\n const listItem = n.listItem!\n const textSerializers = getTextSerializersFromSchema(schema)\n const paragraphSpec: TextblockSpec = { type: 'paragraph' }\n\n function inline(node: PMNode, type: string): Fragment {\n if (type === CODE_BLOCK) {\n const text = getText(node, { textSerializers })\n return text ? Fragment.from(schema.text(text)) : Fragment.empty\n }\n const hardBreak = n.hardBreak\n if (node.type.name !== CODE_BLOCK || !hardBreak) return node.content\n const parts: PMNode[] = []\n node.textContent.split('\\n').forEach((line, index) => {\n if (index) parts.push(hardBreak.create())\n if (line) parts.push(schema.text(line))\n })\n return Fragment.from(parts)\n }\n\n function textblock(node: PMNode, to: TextblockSpec): PMNode {\n if (node.type.name === to.type && (to.variant ?? []).every(key => node.attrs[key] === to.attrs?.[key])) return node\n const attrs: Record<string, unknown> = { [BLOCK_ID_ATTR]: node.attrs[BLOCK_ID_ATTR] ?? null, ...to.attrs }\n return n[to.type]!.create(attrs, inline(node, to.type))\n }\n\n /** A list as textblocks: one per item from its first paragraph, nested lists depth-first, other item blocks as they are. */\n function flattenList(list: PMNode, to: TextblockSpec): PMNode[] {\n return childrenOf(list).flatMap(item => childrenOf(item).flatMap((child, index) => {\n if (isListNode(child)) return flattenList(child, to)\n return index === 0 && isTextblockNode(child) ? [textblock(child, to)] : [child]\n }))\n }\n\n /** Content of a quote or list made from `node`: textblocks as paragraphs, quotes and foreign blocks unwrapped. */\n function containerBlocks(node: PMNode): PMNode[] {\n if (isTextblockNode(node)) return [textblock(node, paragraphSpec)]\n if (isQuoteNode(node)) return childrenOf(node)\n if (foreign?.is(node)) return foreign.unwrap(node, false)\n return [node]\n }\n\n /** List items of `blocks`: one per textblock (as paragraph), the items of lists; other blocks join the item before them. */\n function listItems(blocks: PMNode[]): PMNode[] {\n const items: PMNode[] = []\n for (const block of blocks) {\n if (isTextblockNode(block)) items.push(listItem.create(null, textblock(block, paragraphSpec)))\n else if (isListNode(block)) items.push(...childrenOf(block))\n else {\n const last = items.pop()\n items.push(last ? last.copy(last.content.addToEnd(block)) : listItem.create(null, [paragraph.create(), block]))\n }\n }\n return items\n }\n\n function toTextblocks(nodes: PMNode[], to: TextblockSpec): PMNode[] {\n return nodes.flatMap((node) => {\n if (isTextblockNode(node)) return [textblock(node, to)]\n if (isListNode(node)) return flattenList(node, to)\n if (isQuoteNode(node)) return childrenOf(node).map(child => isTextblockNode(child) ? textblock(child, to) : child)\n const headingLevel = to.type === 'heading' ? Number(to.attrs?.level) : undefined\n const [title, ...rest] = foreign!.unwrap(node, true, headingLevel)\n return [textblock(title!, to), ...rest]\n })\n }\n\n return {\n inline,\n textblock,\n toTextblocks,\n toList: (nodes, type) => [n[type]!.create(null, listItems(nodes.flatMap(containerBlocks)))],\n toQuote: nodes => [n.blockquote!.create(null, nodes.flatMap(containerBlocks))],\n }\n}\n\n/** `node` without the id `id` anywhere in it (itself included); the same node when it does not carry it. */\nfunction withoutId(node: PMNode, id: string): PMNode {\n let found = node.attrs[BLOCK_ID_ATTR] === id\n if (!found) {\n node.descendants((child) => {\n if (child.attrs[BLOCK_ID_ATTR] === id) found = true\n return !found\n })\n }\n if (!found) return node\n const attrs = node.attrs[BLOCK_ID_ATTR] === id ? { ...node.attrs, [BLOCK_ID_ATTR]: null } : node.attrs\n return node.type.create(attrs, childrenOf(node).map(child => withoutId(child, id)), node.marks)\n}\n\n/** The first block takes `id` (the first input block's) and no other block keeps it; unchanged when there is no id. */\nfunction withFirstId(blocks: PMNode[], id: unknown): PMNode[] {\n const [head, ...rest] = blocks\n if (!head || typeof id !== 'string' || !id || !(BLOCK_ID_ATTR in head.attrs)) return blocks\n const own = withoutId(head, id)\n return [own.type.create({ ...own.attrs, [BLOCK_ID_ATTR]: id }, own.content, own.marks), ...rest.map(block => withoutId(block, id))]\n}\n\n/**\n * Finalizes a conversion of `nodes` into `output`: ids (the first output block takes the first input block's id,\n * blocks carried over keep theirs, new ones get none), then null when nothing changed or a block violates the schema.\n */\nexport function finishConversion(nodes: PMNode[], output: PMNode[]): PMNode[] | null {\n const result = withFirstId(output, nodes[0]?.attrs[BLOCK_ID_ATTR])\n if (Fragment.from(result).eq(Fragment.from(nodes))) return null\n try {\n for (const block of result) block.check()\n }\n catch {\n return null\n }\n return result\n}\n\n/**\n * Blocks `nodes` (siblings) converted to a core `target`: textblocks retype, lists flatten into one block per item,\n * quotes unwrap, textblocks wrap into one list item / paragraph each. Null when the target is not a core target, a node\n * is not a core source, nothing changes or the result does not fit the schema.\n */\nexport function convertCoreBlocks(schema: Schema, nodes: PMNode[], target: ConvertTarget): PMNode[] | null {\n const first = nodes[0]\n if (!first || !isCoreTarget(target) || !schema.nodes[target.type]) return null\n if (!nodes.every(isCoreSource)) return null\n if (nodes.length === 1 && isCurrentTarget(first, target)) return null\n const converter = createConverter(schema)\n let output: PMNode[]\n switch (target.type) {\n case 'bulletList':\n case 'orderedList':\n output = converter.toList(nodes, target.type)\n break\n case 'blockquote':\n output = converter.toQuote(nodes)\n break\n default:\n output = converter.toTextblocks(nodes, textblockSpecOf(target))\n }\n return finishConversion(nodes, output)\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BlockAction } from "./extension-points.js";
|
|
2
|
+
import { EditorFeature, FeatureContext } from "./feature.js";
|
|
3
|
+
//#region src/core/core-feature.d.ts
|
|
4
|
+
/** Hover actions every editor with block UI has: „Umwandeln in …“, duplicate, delete (in this order, after features' own). */
|
|
5
|
+
export declare const coreBlockActions: (ctx: FeatureContext) => readonly BlockAction[];
|
|
6
|
+
/**
|
|
7
|
+
* The base of every editor, and all a simple editor is: StarterKit with StrikeX, block IDs and node flags, the verbatim
|
|
8
|
+
* `OpaqueFence` for Markdown fences of unknown kinds, Markdown, Placeholder (marks empty textblocks `is-empty`),
|
|
9
|
+
* BlockFlash (`revealBlock`), local DocAnchors, abilities and metadata infrastructure, the standard conversions, the
|
|
10
|
+
* `/` menu (without commands of its own: hosts and other features fill it), the undo/redo, formatting and block toolbar
|
|
11
|
+
* groups, and the duplicate/delete/convert block actions.
|
|
12
|
+
* StarterKit's undo history is off when a collaboration session brings its own.
|
|
13
|
+
* Contributes no components (`EditorFeature<never>`), so it fits a preset of any framework layer.
|
|
14
|
+
*/
|
|
15
|
+
export declare function coreFeature(): EditorFeature<never>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=core-feature.d.ts.map
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ABILITY } from "./schema/abilities.js";
|
|
2
|
+
import { Abilities } from "./abilities.js";
|
|
3
|
+
import { BlockId } from "./schema/block-ids.js";
|
|
4
|
+
import { NodeFlags } from "./schema/node-flags.js";
|
|
5
|
+
import { BlockConvert, convertMenuItems, coreConversions } from "./block-convert.js";
|
|
6
|
+
import { BlockFlash } from "./block-flash.js";
|
|
7
|
+
import { DocAnchors } from "./doc-anchors.js";
|
|
8
|
+
import { DocumentMarkdown } from "./document-markdown.js";
|
|
9
|
+
import { Metadata } from "./metadata.js";
|
|
10
|
+
import { OpaqueFence } from "./schema/opaque-fence.js";
|
|
11
|
+
import { StrikeX } from "./schema/strike.js";
|
|
12
|
+
import { SlashCommand } from "./slash.js";
|
|
13
|
+
import { coreToolbarGroups } from "./toolbar-items.js";
|
|
14
|
+
import { Placeholder } from "@tiptap/extensions";
|
|
15
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
16
|
+
//#region src/core/core-feature.ts
|
|
17
|
+
/** Hover actions every editor with block UI has: „Umwandeln in …“, duplicate, delete (in this order, after features' own). */
|
|
18
|
+
const coreBlockActions = (ctx) => [
|
|
19
|
+
{
|
|
20
|
+
id: "convert",
|
|
21
|
+
label: ctx.t("block.convert"),
|
|
22
|
+
icon: "i-lucide-replace",
|
|
23
|
+
ability: ABILITY.blockConvert,
|
|
24
|
+
order: 1e3,
|
|
25
|
+
menu: ({ editor, node, pos }) => convertMenuItems(editor, {
|
|
26
|
+
node,
|
|
27
|
+
pos
|
|
28
|
+
}, ctx.t)
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "duplicate",
|
|
32
|
+
label: ctx.t("block.duplicate"),
|
|
33
|
+
icon: "i-lucide-copy",
|
|
34
|
+
ability: ABILITY.blockDuplicate,
|
|
35
|
+
order: 1010,
|
|
36
|
+
run: ({ editor, node, pos }) => editor.chain().insertContentAt(pos + node.nodeSize, node.toJSON()).run()
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "delete",
|
|
40
|
+
label: ctx.t("block.delete"),
|
|
41
|
+
icon: "i-lucide-trash-2",
|
|
42
|
+
ability: ABILITY.blockDelete,
|
|
43
|
+
order: 1020,
|
|
44
|
+
run: ({ editor, node, pos }) => editor.chain().focus().deleteRange({
|
|
45
|
+
from: pos,
|
|
46
|
+
to: pos + node.nodeSize
|
|
47
|
+
}).run()
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* The base of every editor, and all a simple editor is: StarterKit with StrikeX, block IDs and node flags, the verbatim
|
|
52
|
+
* `OpaqueFence` for Markdown fences of unknown kinds, Markdown, Placeholder (marks empty textblocks `is-empty`),
|
|
53
|
+
* BlockFlash (`revealBlock`), local DocAnchors, abilities and metadata infrastructure, the standard conversions, the
|
|
54
|
+
* `/` menu (without commands of its own: hosts and other features fill it), the undo/redo, formatting and block toolbar
|
|
55
|
+
* groups, and the duplicate/delete/convert block actions.
|
|
56
|
+
* StarterKit's undo history is off when a collaboration session brings its own.
|
|
57
|
+
* Contributes no components (`EditorFeature<never>`), so it fits a preset of any framework layer.
|
|
58
|
+
*/
|
|
59
|
+
function coreFeature() {
|
|
60
|
+
return {
|
|
61
|
+
id: "core",
|
|
62
|
+
extensions: (ctx) => [
|
|
63
|
+
Abilities.configure(ctx.abilities),
|
|
64
|
+
StarterKit.configure({
|
|
65
|
+
strike: false,
|
|
66
|
+
undoRedo: ctx.collaboration ? false : void 0,
|
|
67
|
+
dropcursor: {
|
|
68
|
+
color: "var(--sk-primary)",
|
|
69
|
+
width: 2
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
StrikeX,
|
|
73
|
+
NodeFlags,
|
|
74
|
+
OpaqueFence,
|
|
75
|
+
Placeholder.configure({
|
|
76
|
+
includeChildren: true,
|
|
77
|
+
showOnlyCurrent: false,
|
|
78
|
+
placeholder: ""
|
|
79
|
+
}),
|
|
80
|
+
Metadata.configure({ registry: ctx.metadata }),
|
|
81
|
+
SlashCommand.configure({
|
|
82
|
+
items: ctx.slashCommands(),
|
|
83
|
+
emptyText: ctx.t("slash.empty"),
|
|
84
|
+
loadingText: ctx.t("common.loading")
|
|
85
|
+
}),
|
|
86
|
+
BlockId,
|
|
87
|
+
DocumentMarkdown,
|
|
88
|
+
BlockFlash,
|
|
89
|
+
BlockConvert,
|
|
90
|
+
DocAnchors.configure({ resolver: ctx.anchorResolver })
|
|
91
|
+
],
|
|
92
|
+
toolbar: (ctx) => coreToolbarGroups(ctx),
|
|
93
|
+
blockActions: (ctx) => [...coreBlockActions(ctx)],
|
|
94
|
+
conversions: [coreConversions]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { coreBlockActions, coreFeature };
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=core-feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-feature.js","names":[],"sources":["../../src/core/core-feature.ts"],"sourcesContent":["import { Placeholder } from '@tiptap/extensions'\nimport StarterKit from '@tiptap/starter-kit'\nimport { Abilities } from './abilities'\nimport { BlockConvert, coreConversions, convertMenuItems } from './block-convert'\nimport { BlockFlash } from './block-flash'\nimport { DocAnchors } from './doc-anchors'\nimport { DocumentMarkdown } from './document-markdown'\nimport type { BlockAction } from './extension-points'\nimport type { EditorFeature, FeatureContext } from './feature'\nimport { Metadata } from './metadata'\nimport { ABILITY } from './schema/abilities'\nimport { BlockId } from './schema/block-ids'\nimport { NodeFlags } from './schema/node-flags'\nimport { OpaqueFence } from './schema/opaque-fence'\nimport { StrikeX } from './schema/strike'\nimport { SlashCommand } from './slash'\nimport { coreToolbarGroups } from './toolbar-items'\n\n/** Hover actions every editor with block UI has: „Umwandeln in …“, duplicate, delete (in this order, after features' own). */\nexport const coreBlockActions = (ctx: FeatureContext): readonly BlockAction[] => [\n {\n id: 'convert',\n label: ctx.t('block.convert'),\n icon: 'i-lucide-replace',\n ability: ABILITY.blockConvert,\n order: 1000,\n menu: ({ editor, node, pos }) => convertMenuItems(editor, { node, pos }, ctx.t),\n },\n {\n id: 'duplicate',\n label: ctx.t('block.duplicate'),\n icon: 'i-lucide-copy',\n ability: ABILITY.blockDuplicate,\n order: 1010,\n // BlockId's dedupe plugin gives the copy (and every block nested in it) fresh ids.\n run: ({ editor, node, pos }) => editor.chain().insertContentAt(pos + node.nodeSize, node.toJSON()).run(),\n },\n {\n id: 'delete',\n label: ctx.t('block.delete'),\n icon: 'i-lucide-trash-2',\n ability: ABILITY.blockDelete,\n order: 1020,\n run: ({ editor, node, pos }) => editor.chain().focus().deleteRange({ from: pos, to: pos + node.nodeSize }).run(),\n },\n]\n\n/**\n * The base of every editor, and all a simple editor is: StarterKit with StrikeX, block IDs and node flags, the verbatim\n * `OpaqueFence` for Markdown fences of unknown kinds, Markdown, Placeholder (marks empty textblocks `is-empty`),\n * BlockFlash (`revealBlock`), local DocAnchors, abilities and metadata infrastructure, the standard conversions, the\n * `/` menu (without commands of its own: hosts and other features fill it), the undo/redo, formatting and block toolbar\n * groups, and the duplicate/delete/convert block actions.\n * StarterKit's undo history is off when a collaboration session brings its own.\n * Contributes no components (`EditorFeature<never>`), so it fits a preset of any framework layer.\n */\nexport function coreFeature(): EditorFeature<never> {\n return {\n id: 'core',\n extensions: ctx => [\n Abilities.configure(ctx.abilities),\n StarterKit.configure({ strike: false, undoRedo: ctx.collaboration ? false : undefined, dropcursor: { color: 'var(--sk-primary)', width: 2 } }),\n StrikeX,\n NodeFlags,\n OpaqueFence,\n Placeholder.configure({ includeChildren: true, showOnlyCurrent: false, placeholder: '' }),\n Metadata.configure({ registry: ctx.metadata }),\n SlashCommand.configure({ items: ctx.slashCommands(), emptyText: ctx.t('slash.empty'), loadingText: ctx.t('common.loading') }),\n BlockId,\n DocumentMarkdown,\n BlockFlash,\n BlockConvert,\n DocAnchors.configure({ resolver: ctx.anchorResolver }),\n ],\n toolbar: ctx => coreToolbarGroups(ctx),\n blockActions: ctx => [...coreBlockActions(ctx)],\n conversions: [coreConversions],\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAa,oBAAoB,QAAgD;CAC/E;EACE,IAAI;EACJ,OAAO,IAAI,EAAE,eAAe;EAC5B,MAAM;EACN,SAAS,QAAQ;EACjB,OAAO;EACP,OAAO,EAAE,QAAQ,MAAM,UAAU,iBAAiB,QAAQ;GAAE;GAAM;EAAI,GAAG,IAAI,CAAC;CAChF;CACA;EACE,IAAI;EACJ,OAAO,IAAI,EAAE,iBAAiB;EAC9B,MAAM;EACN,SAAS,QAAQ;EACjB,OAAO;EAEP,MAAM,EAAE,QAAQ,MAAM,UAAU,OAAO,MAAM,CAAC,CAAC,gBAAgB,MAAM,KAAK,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI;CACzG;CACA;EACE,IAAI;EACJ,OAAO,IAAI,EAAE,cAAc;EAC3B,MAAM;EACN,SAAS,QAAQ;EACjB,OAAO;EACP,MAAM,EAAE,QAAQ,MAAM,UAAU,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY;GAAE,MAAM;GAAK,IAAI,MAAM,KAAK;EAAS,CAAC,CAAC,CAAC,IAAI;CACjH;AACF;;;;;;;;;;AAWA,SAAgB,cAAoC;CAClD,OAAO;EACL,IAAI;EACJ,aAAY,QAAO;GACjB,UAAU,UAAU,IAAI,SAAS;GACjC,WAAW,UAAU;IAAE,QAAQ;IAAO,UAAU,IAAI,gBAAgB,QAAQ,KAAA;IAAW,YAAY;KAAE,OAAO;KAAqB,OAAO;IAAE;GAAE,CAAC;GAC7I;GACA;GACA;GACA,YAAY,UAAU;IAAE,iBAAiB;IAAM,iBAAiB;IAAO,aAAa;GAAG,CAAC;GACxF,SAAS,UAAU,EAAE,UAAU,IAAI,SAAS,CAAC;GAC7C,aAAa,UAAU;IAAE,OAAO,IAAI,cAAc;IAAG,WAAW,IAAI,EAAE,aAAa;IAAG,aAAa,IAAI,EAAE,gBAAgB;GAAE,CAAC;GAC5H;GACA;GACA;GACA;GACA,WAAW,UAAU,EAAE,UAAU,IAAI,eAAe,CAAC;EACvD;EACA,UAAS,QAAO,kBAAkB,GAAG;EACrC,eAAc,QAAO,CAAC,GAAG,iBAAiB,GAAG,CAAC;EAC9C,aAAa,CAAC,eAAe;CAC/B;AACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EditorContext } from "./context.js";
|
|
2
|
+
import { EditorFeature, EditorPreset, SettingsTab } from "./feature.js";
|
|
3
|
+
//#region src/core/define-editor.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Validates `features` and resolves their pipeline and conversion providers. Keeps the given order; neither
|
|
6
|
+
* deduplicates nor installs missing dependencies. Throws on duplicate ids, a `requires` entry that is not installed
|
|
7
|
+
* and a singleton hook (`parseMarkdown`, `segment`, `structure`, `wrapImport`, `migrateContent`, `anchorResolver`,
|
|
8
|
+
* `formatAiResult`) contributed twice. `normalize` hooks chain left to right. `aiContext` contributions merge (`kinds` and `blocks`
|
|
9
|
+
* concatenated in feature order, `structure` from one feature only); their conflicts surface when the merged `aiContext` reads the editor.
|
|
10
|
+
* `aiBlockData` contributions are additive too: they run in parallel per block and their data concatenate in feature order.
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineEditor<C = unknown>(config: {
|
|
13
|
+
features: readonly EditorFeature<C>[];
|
|
14
|
+
}): EditorPreset<C>;
|
|
15
|
+
/**
|
|
16
|
+
* The settings tabs the features of `preset` contribute for the app context `ctx` (labels in its language), in feature
|
|
17
|
+
* order; none means there is no settings UI. Throws when two features contribute the same tab id.
|
|
18
|
+
*/
|
|
19
|
+
export declare function settingsTabsOf<C = unknown>(preset: EditorPreset<C>, ctx: EditorContext): readonly SettingsTab<C>[];
|
|
20
|
+
/** Features of `preset` that fill the contribution `key`, in order. */
|
|
21
|
+
export declare function contributions<C, K extends keyof EditorFeature<C>>(preset: EditorPreset<C>, key: K): NonNullable<EditorFeature<C>[K]>[];
|
|
22
|
+
//#endregion
|
|
23
|
+
//# sourceMappingURL=define-editor.d.ts.map
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { DEFAULT_BLOCK_PIPELINE } from "./pipeline.js";
|
|
2
|
+
import { SINGLETON_PIPELINE_HOOKS } from "./feature.js";
|
|
3
|
+
//#region src/core/define-editor.ts
|
|
4
|
+
const FEATURE_SINGLETONS = ["anchorResolver", "formatAiResult"];
|
|
5
|
+
function fail(message) {
|
|
6
|
+
throw new Error(`@ecsplico/editor: defineEditor: ${message}`);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Validates `features` and resolves their pipeline and conversion providers. Keeps the given order; neither
|
|
10
|
+
* deduplicates nor installs missing dependencies. Throws on duplicate ids, a `requires` entry that is not installed
|
|
11
|
+
* and a singleton hook (`parseMarkdown`, `segment`, `structure`, `wrapImport`, `migrateContent`, `anchorResolver`,
|
|
12
|
+
* `formatAiResult`) contributed twice. `normalize` hooks chain left to right. `aiContext` contributions merge (`kinds` and `blocks`
|
|
13
|
+
* concatenated in feature order, `structure` from one feature only); their conflicts surface when the merged `aiContext` reads the editor.
|
|
14
|
+
* `aiBlockData` contributions are additive too: they run in parallel per block and their data concatenate in feature order.
|
|
15
|
+
*/
|
|
16
|
+
function defineEditor(config) {
|
|
17
|
+
const features = Object.freeze([...config.features]);
|
|
18
|
+
const ids = /* @__PURE__ */ new Set();
|
|
19
|
+
for (const feature of features) {
|
|
20
|
+
if (ids.has(feature.id)) fail(`duplicate feature id "${feature.id}"`);
|
|
21
|
+
ids.add(feature.id);
|
|
22
|
+
}
|
|
23
|
+
for (const feature of features) for (const required of feature.requires ?? []) if (!ids.has(required)) fail(`feature "${feature.id}" requires "${required}", which is not installed`);
|
|
24
|
+
const owners = /* @__PURE__ */ new Map();
|
|
25
|
+
const claim = (hook, feature) => {
|
|
26
|
+
const owner = owners.get(hook);
|
|
27
|
+
if (owner) fail(`features "${owner}" and "${feature.id}" both contribute the singleton hook "${hook}"`);
|
|
28
|
+
owners.set(hook, feature.id);
|
|
29
|
+
};
|
|
30
|
+
const pipeline = { ...DEFAULT_BLOCK_PIPELINE };
|
|
31
|
+
const normalizers = [];
|
|
32
|
+
for (const feature of features) {
|
|
33
|
+
for (const hook of FEATURE_SINGLETONS) if (feature[hook]) claim(hook, feature);
|
|
34
|
+
const blocks = feature.blocks;
|
|
35
|
+
if (!blocks) continue;
|
|
36
|
+
if (blocks.normalize) normalizers.push(blocks.normalize);
|
|
37
|
+
for (const hook of SINGLETON_PIPELINE_HOOKS) {
|
|
38
|
+
const fn = blocks[hook];
|
|
39
|
+
if (!fn) continue;
|
|
40
|
+
claim(hook, feature);
|
|
41
|
+
Object.assign(pipeline, { [hook]: fn });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (normalizers.length) pipeline.normalize = (editor, blocks) => normalizers.reduce((current, normalize) => normalize(editor, current), blocks);
|
|
45
|
+
const conversions = features.flatMap((feature) => [...feature.conversions ?? []]);
|
|
46
|
+
const contexts = features.flatMap((feature) => feature.aiContext ? [{
|
|
47
|
+
id: feature.id,
|
|
48
|
+
read: feature.aiContext
|
|
49
|
+
}] : []);
|
|
50
|
+
const aiContext = contexts.length ? (editor) => {
|
|
51
|
+
const merged = {
|
|
52
|
+
kinds: [],
|
|
53
|
+
blocks: []
|
|
54
|
+
};
|
|
55
|
+
const blockIds = /* @__PURE__ */ new Set();
|
|
56
|
+
for (const { id, read } of contexts) {
|
|
57
|
+
const context = read(editor);
|
|
58
|
+
merged.kinds.push(...context.kinds ?? []);
|
|
59
|
+
for (const block of context.blocks ?? []) {
|
|
60
|
+
if (blockIds.has(block.id)) fail(`the AI block "${block.id}" is described by more than one feature`);
|
|
61
|
+
blockIds.add(block.id);
|
|
62
|
+
merged.blocks.push(block);
|
|
63
|
+
}
|
|
64
|
+
if (context.structure === void 0) continue;
|
|
65
|
+
if (merged.owner) fail(`features "${merged.owner}" and "${id}" both set aiContext.structure`);
|
|
66
|
+
merged.owner = id;
|
|
67
|
+
merged.structure = context.structure;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
kinds: merged.kinds,
|
|
71
|
+
blocks: merged.blocks,
|
|
72
|
+
...merged.structure && { structure: merged.structure }
|
|
73
|
+
};
|
|
74
|
+
} : void 0;
|
|
75
|
+
const dataProviders = features.flatMap((feature) => feature.aiBlockData ? [feature.aiBlockData] : []);
|
|
76
|
+
const aiBlockData = dataProviders.length ? async (request) => (await Promise.all(dataProviders.map((provide) => provide(request)))).flat() : void 0;
|
|
77
|
+
const formatAiResult = features.find((feature) => feature.formatAiResult)?.formatAiResult;
|
|
78
|
+
return Object.freeze({
|
|
79
|
+
features,
|
|
80
|
+
pipeline: Object.freeze(pipeline),
|
|
81
|
+
conversions: Object.freeze(conversions),
|
|
82
|
+
...aiContext && { aiContext },
|
|
83
|
+
...aiBlockData && { aiBlockData },
|
|
84
|
+
...formatAiResult && { formatAiResult }
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The settings tabs the features of `preset` contribute for the app context `ctx` (labels in its language), in feature
|
|
89
|
+
* order; none means there is no settings UI. Throws when two features contribute the same tab id.
|
|
90
|
+
*/
|
|
91
|
+
function settingsTabsOf(preset, ctx) {
|
|
92
|
+
const owners = /* @__PURE__ */ new Map();
|
|
93
|
+
return preset.features.flatMap((feature) => {
|
|
94
|
+
const tabs = feature.settingsTabs?.(ctx) ?? [];
|
|
95
|
+
for (const tab of tabs) {
|
|
96
|
+
const owner = owners.get(tab.id);
|
|
97
|
+
if (owner) fail(`features "${owner}" and "${feature.id}" both contribute the settings tab "${tab.id}"`);
|
|
98
|
+
owners.set(tab.id, feature.id);
|
|
99
|
+
}
|
|
100
|
+
return tabs;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/** Features of `preset` that fill the contribution `key`, in order. */
|
|
104
|
+
function contributions(preset, key) {
|
|
105
|
+
return preset.features.flatMap((feature) => feature[key] ? [feature[key]] : []);
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { contributions, defineEditor, settingsTabsOf };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=define-editor.js.map
|