@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,480 @@
|
|
|
1
|
+
import { ABILITY, TEXT_ABILITIES } from "../../core/schema/abilities.js";
|
|
2
|
+
import { isChromeNode } from "../../core/schema/node-flags.js";
|
|
3
|
+
import { editorEntryOf } from "../../core/editor-ui.js";
|
|
4
|
+
import { compositeKind, defaultCompositeKinds, fallbackCompositeKinds } from "./kinds.js";
|
|
5
|
+
import { compositeFence } from "./fences.js";
|
|
6
|
+
import { flattenCompositesToHeadings, groupHeadingsIntoComposites, headingGroupRange } from "./heading-composites.js";
|
|
7
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
8
|
+
import { Selection, TextSelection } from "@tiptap/pm/state";
|
|
9
|
+
//#region src/features/composites/nodes.ts
|
|
10
|
+
const COMPOSITE = "composite";
|
|
11
|
+
const TITLE = "compositeTitle";
|
|
12
|
+
const DESCRIPTION = "compositeDescription";
|
|
13
|
+
const TAGS = "compositeTags";
|
|
14
|
+
/** Kind of a composite created without an explicit one (also the attribute default). */
|
|
15
|
+
const DEFAULT_KIND = "section";
|
|
16
|
+
/** Title, description and tags: the fixed children in front of a composite's body. */
|
|
17
|
+
const COMPOSITE_CHROME_COUNT = 3;
|
|
18
|
+
const CHROME_COUNT = 3;
|
|
19
|
+
/**
|
|
20
|
+
* Composite kinds `editor` was configured with. An editor without the composite node gets the built-in kinds in the
|
|
21
|
+
* language of its surface (the default language without one).
|
|
22
|
+
*/
|
|
23
|
+
function compositeKindsOf(editor) {
|
|
24
|
+
const configured = editor.storage.composite?.kinds;
|
|
25
|
+
if (configured) return configured;
|
|
26
|
+
const entry = editorEntryOf(editor);
|
|
27
|
+
return entry ? defaultCompositeKinds(entry.ctx.t) : fallbackCompositeKinds();
|
|
28
|
+
}
|
|
29
|
+
/** JSON of a fresh composite of `kind` (empty title/description/tags, hidden meta) with `body`. */
|
|
30
|
+
function compositeJSON(kind, body = [{ type: "paragraph" }]) {
|
|
31
|
+
return {
|
|
32
|
+
type: COMPOSITE,
|
|
33
|
+
attrs: { kind },
|
|
34
|
+
content: [
|
|
35
|
+
{ type: TITLE },
|
|
36
|
+
{ type: DESCRIPTION },
|
|
37
|
+
{ type: TAGS },
|
|
38
|
+
...body
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Innermost composite around `$pos`: its depth, position and node. */
|
|
43
|
+
function compositeAround($pos) {
|
|
44
|
+
for (let depth = $pos.depth; depth > 0; depth--) {
|
|
45
|
+
const node = $pos.node(depth);
|
|
46
|
+
if (node.type.name === COMPOSITE) return {
|
|
47
|
+
depth,
|
|
48
|
+
pos: $pos.before(depth),
|
|
49
|
+
node
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/** The composite starting at `pos`, or without `pos` the caret's innermost composite. */
|
|
55
|
+
function compositeAt(state, pos) {
|
|
56
|
+
if (pos === void 0) return compositeAround(state.selection.$head);
|
|
57
|
+
const node = state.doc.nodeAt(pos);
|
|
58
|
+
return node?.type.name === COMPOSITE ? {
|
|
59
|
+
pos,
|
|
60
|
+
node
|
|
61
|
+
} : null;
|
|
62
|
+
}
|
|
63
|
+
/** Position right in front of the body (= after the tags row) of the composite whose content starts at `start`. */
|
|
64
|
+
function bodyStart(composite, start) {
|
|
65
|
+
let pos = start;
|
|
66
|
+
for (let i = 0; i < CHROME_COUNT; i++) pos += composite.child(i).nodeSize;
|
|
67
|
+
return pos;
|
|
68
|
+
}
|
|
69
|
+
const isEmptyParagraph = (node) => node.type.name === "paragraph" && node.content.size === 0;
|
|
70
|
+
/** The caret's block is an empty paragraph, the last child of a composite whose body has more than this one block. */
|
|
71
|
+
function inTrailingEmptyParagraph($head) {
|
|
72
|
+
if ($head.depth < 2 || !isEmptyParagraph($head.parent)) return false;
|
|
73
|
+
const composite = $head.node($head.depth - 1);
|
|
74
|
+
return composite.type.name === COMPOSITE && $head.index($head.depth - 1) === composite.childCount - 1 && composite.childCount > 4;
|
|
75
|
+
}
|
|
76
|
+
/** Nothing typed yet: empty title and description, no tags, body is one empty paragraph. */
|
|
77
|
+
function isEmptyComposite(composite) {
|
|
78
|
+
const tags = composite.child(2).attrs.tags;
|
|
79
|
+
return composite.child(0).content.size === 0 && composite.child(1).content.size === 0 && (!Array.isArray(tags) || tags.length === 0) && composite.childCount === 4 && isEmptyParagraph(composite.child(CHROME_COUNT));
|
|
80
|
+
}
|
|
81
|
+
/** Child range of `parent` a structure conversion works on: the selected blocks (composite chrome excluded), or without a selection the `scope` — for `'heading'` the caret's heading group (`'group'`) or innermost composite (`'flatten'`). */
|
|
82
|
+
function structureRange(state, scope, direction) {
|
|
83
|
+
const { $from, $to, $head, empty } = state.selection;
|
|
84
|
+
if (!empty) {
|
|
85
|
+
const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === COMPOSITE);
|
|
86
|
+
if (!range) return null;
|
|
87
|
+
const parent = range.parent;
|
|
88
|
+
const fromIndex = Math.max(range.startIndex, parent.type.name === COMPOSITE ? CHROME_COUNT : 0);
|
|
89
|
+
const toIndex = range.endIndex;
|
|
90
|
+
if (fromIndex >= toIndex) return null;
|
|
91
|
+
return {
|
|
92
|
+
parent,
|
|
93
|
+
parentDepth: range.depth,
|
|
94
|
+
parentStart: range.$from.start(range.depth),
|
|
95
|
+
fromIndex,
|
|
96
|
+
toIndex
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (scope === "container") {
|
|
100
|
+
const found = compositeAround($head);
|
|
101
|
+
if (found) return {
|
|
102
|
+
parent: found.node,
|
|
103
|
+
parentDepth: found.depth,
|
|
104
|
+
parentStart: $head.start(found.depth),
|
|
105
|
+
fromIndex: CHROME_COUNT,
|
|
106
|
+
toIndex: found.node.childCount
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
parent: state.doc,
|
|
110
|
+
parentDepth: 0,
|
|
111
|
+
parentStart: 0,
|
|
112
|
+
fromIndex: 0,
|
|
113
|
+
toIndex: state.doc.childCount
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (scope === "heading") {
|
|
117
|
+
if (direction === "flatten") {
|
|
118
|
+
const found = compositeAround($head);
|
|
119
|
+
if (!found) return null;
|
|
120
|
+
const depth = found.depth - 1;
|
|
121
|
+
const fromIndex = $head.index(depth);
|
|
122
|
+
return {
|
|
123
|
+
parent: $head.node(depth),
|
|
124
|
+
parentDepth: depth,
|
|
125
|
+
parentStart: $head.start(depth),
|
|
126
|
+
fromIndex,
|
|
127
|
+
toIndex: fromIndex + 1
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
let depth = $head.depth;
|
|
131
|
+
while (depth > 0 && !["doc", COMPOSITE].includes($head.node(depth - 1).type.name)) depth--;
|
|
132
|
+
if (depth === 0) return null;
|
|
133
|
+
const parent = $head.node(depth - 1);
|
|
134
|
+
const minIndex = parent.type.name === COMPOSITE ? CHROME_COUNT : 0;
|
|
135
|
+
let index = $head.index(depth - 1);
|
|
136
|
+
while (index >= minIndex && parent.child(index).type.name !== "heading") index--;
|
|
137
|
+
if (index < minIndex) return null;
|
|
138
|
+
const group = headingGroupRange(parent, index);
|
|
139
|
+
return {
|
|
140
|
+
parent,
|
|
141
|
+
parentDepth: depth - 1,
|
|
142
|
+
parentStart: $head.start(depth - 1),
|
|
143
|
+
fromIndex: group.from,
|
|
144
|
+
toIndex: group.to
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
parent: state.doc,
|
|
149
|
+
parentDepth: 0,
|
|
150
|
+
parentStart: 0,
|
|
151
|
+
fromIndex: 0,
|
|
152
|
+
toIndex: state.doc.childCount
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/** Children `fromIndex..toIndex` of `parent` (content starting at `parentStart`) and their document range. */
|
|
156
|
+
function rangeBlocks(parent, parentStart, fromIndex, toIndex) {
|
|
157
|
+
const blocks = [];
|
|
158
|
+
let from = parentStart;
|
|
159
|
+
let to = parentStart;
|
|
160
|
+
parent.forEach((child, _offset, index) => {
|
|
161
|
+
if (index < fromIndex) from += child.nodeSize;
|
|
162
|
+
else if (index < toIndex) blocks.push(child);
|
|
163
|
+
if (index < toIndex) to += child.nodeSize;
|
|
164
|
+
});
|
|
165
|
+
return {
|
|
166
|
+
blocks,
|
|
167
|
+
from,
|
|
168
|
+
to
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
const CHROME_REVOKES = [
|
|
172
|
+
ABILITY.headings,
|
|
173
|
+
ABILITY.lists,
|
|
174
|
+
ABILITY.blockquote,
|
|
175
|
+
ABILITY.codeBlock,
|
|
176
|
+
ABILITY.rule,
|
|
177
|
+
ABILITY.composite,
|
|
178
|
+
ABILITY.transcript,
|
|
179
|
+
ABILITY.media,
|
|
180
|
+
ABILITY.record,
|
|
181
|
+
ABILITY.aiGenerate,
|
|
182
|
+
ABILITY.blockDuplicate
|
|
183
|
+
];
|
|
184
|
+
const CompositeNode = Node.create({
|
|
185
|
+
name: COMPOSITE,
|
|
186
|
+
priority: 101,
|
|
187
|
+
group: "block",
|
|
188
|
+
content: `${TITLE} ${DESCRIPTION} ${TAGS} block+`,
|
|
189
|
+
isolating: true,
|
|
190
|
+
defining: true,
|
|
191
|
+
editorBlockContainer: true,
|
|
192
|
+
abilities: { own: [
|
|
193
|
+
ABILITY.compositeMeta,
|
|
194
|
+
ABILITY.compositeSummarize,
|
|
195
|
+
ABILITY.compositeExport,
|
|
196
|
+
ABILITY.compositeTranscribe
|
|
197
|
+
] },
|
|
198
|
+
addOptions: () => ({ kinds: fallbackCompositeKinds() }),
|
|
199
|
+
addStorage() {
|
|
200
|
+
return { kinds: this.options.kinds };
|
|
201
|
+
},
|
|
202
|
+
addAttributes: () => ({
|
|
203
|
+
kind: {
|
|
204
|
+
default: DEFAULT_KIND,
|
|
205
|
+
parseHTML: (el) => el.getAttribute("data-kind") || null,
|
|
206
|
+
renderHTML: (attrs) => ({ "data-kind": attrs.kind })
|
|
207
|
+
},
|
|
208
|
+
meta: {
|
|
209
|
+
default: {},
|
|
210
|
+
parseHTML: (el) => {
|
|
211
|
+
try {
|
|
212
|
+
const value = JSON.parse(el.getAttribute("data-meta") ?? "{}");
|
|
213
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
214
|
+
} catch {
|
|
215
|
+
return {};
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
renderHTML: (attrs) => ({ "data-meta": JSON.stringify(attrs.meta) })
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
parseHTML: () => [{ tag: "section[data-type=\"composite\"]" }, { tag: "section[data-type=\"section\"]" }],
|
|
222
|
+
renderHTML: ({ HTMLAttributes }) => [
|
|
223
|
+
"section",
|
|
224
|
+
mergeAttributes(HTMLAttributes, { "data-type": COMPOSITE }),
|
|
225
|
+
0
|
|
226
|
+
],
|
|
227
|
+
renderMarkdown: (node, h) => {
|
|
228
|
+
const kind = typeof node.attrs?.kind === "string" && node.attrs.kind ? node.attrs.kind : DEFAULT_KIND;
|
|
229
|
+
const meta = node.attrs?.meta;
|
|
230
|
+
const body = (node.content ?? []).map((child, index) => h.renderChild?.(child, index) ?? h.renderChildren([child])).filter(Boolean).join("\n\n");
|
|
231
|
+
return compositeFence(kind, meta && typeof meta === "object" ? meta : {}, body);
|
|
232
|
+
},
|
|
233
|
+
addCommands() {
|
|
234
|
+
return {
|
|
235
|
+
insertComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {
|
|
236
|
+
const { $head } = state.selection;
|
|
237
|
+
let depth = $head.depth;
|
|
238
|
+
while (depth > 0 && !["doc", COMPOSITE].includes($head.node(depth - 1).type.name)) depth--;
|
|
239
|
+
let from = $head.pos;
|
|
240
|
+
let to = from;
|
|
241
|
+
if (depth > 0) {
|
|
242
|
+
const block = $head.node(depth);
|
|
243
|
+
if (isChromeNode(block)) from = to = bodyStart($head.node(depth - 1), $head.start(depth - 1));
|
|
244
|
+
else if (isEmptyParagraph(block)) {
|
|
245
|
+
from = $head.before(depth);
|
|
246
|
+
to = $head.after(depth);
|
|
247
|
+
} else from = to = $head.after(depth);
|
|
248
|
+
}
|
|
249
|
+
const $from = state.doc.resolve(from);
|
|
250
|
+
if (!$from.parent.canReplaceWith($from.index(), state.doc.resolve(to).index(), this.type)) return false;
|
|
251
|
+
if (dispatch) {
|
|
252
|
+
const json = compositeJSON(kind);
|
|
253
|
+
tr.replaceWith(from, to, state.schema.nodeFromJSON(json));
|
|
254
|
+
tr.setSelection(TextSelection.create(tr.doc, from + 2)).scrollIntoView();
|
|
255
|
+
}
|
|
256
|
+
return true;
|
|
257
|
+
},
|
|
258
|
+
wrapInComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {
|
|
259
|
+
const { $from, $to } = state.selection;
|
|
260
|
+
const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === COMPOSITE);
|
|
261
|
+
if (!range) return false;
|
|
262
|
+
if (range.parent.type.name === COMPOSITE && range.startIndex < CHROME_COUNT) return false;
|
|
263
|
+
if (!range.parent.canReplaceWith(range.startIndex, range.endIndex, this.type)) return false;
|
|
264
|
+
if (dispatch) {
|
|
265
|
+
const { nodes } = state.schema;
|
|
266
|
+
const composite = this.type.create({ kind }, [
|
|
267
|
+
nodes[TITLE].create(),
|
|
268
|
+
nodes[DESCRIPTION].create(),
|
|
269
|
+
nodes[TAGS].create(),
|
|
270
|
+
...state.doc.slice(range.start, range.end).content.content
|
|
271
|
+
]);
|
|
272
|
+
tr.replaceWith(range.start, range.end, composite);
|
|
273
|
+
tr.setSelection(TextSelection.create(tr.doc, range.start + 2)).scrollIntoView();
|
|
274
|
+
}
|
|
275
|
+
return true;
|
|
276
|
+
},
|
|
277
|
+
setCompositeKind: (kind, pos) => ({ state, tr, dispatch }) => {
|
|
278
|
+
const found = compositeAt(state, pos);
|
|
279
|
+
if (!found) return false;
|
|
280
|
+
if (dispatch) {
|
|
281
|
+
const keys = new Set(compositeKind(this.options.kinds, kind).fields.map((field) => field.key));
|
|
282
|
+
const meta = Object.fromEntries(Object.entries(found.node.attrs.meta).filter(([key]) => keys.has(key)));
|
|
283
|
+
tr.setNodeMarkup(found.pos, void 0, {
|
|
284
|
+
...found.node.attrs,
|
|
285
|
+
kind,
|
|
286
|
+
meta
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return true;
|
|
290
|
+
},
|
|
291
|
+
exitComposite: () => ({ state, tr, dispatch }) => {
|
|
292
|
+
const { $head } = state.selection;
|
|
293
|
+
const composite = compositeAround($head);
|
|
294
|
+
if (!composite) return false;
|
|
295
|
+
if (dispatch) {
|
|
296
|
+
if ($head.depth === composite.depth + 1 && inTrailingEmptyParagraph($head)) tr.delete($head.before(), $head.after());
|
|
297
|
+
const after = tr.mapping.map($head.after(composite.depth));
|
|
298
|
+
tr.insert(after, state.schema.nodes.paragraph.create());
|
|
299
|
+
tr.setSelection(TextSelection.create(tr.doc, after + 1)).scrollIntoView();
|
|
300
|
+
}
|
|
301
|
+
return true;
|
|
302
|
+
},
|
|
303
|
+
convertHeadingsToComposites: ({ recursive, scope, kind = DEFAULT_KIND }) => ({ state, tr, dispatch }) => {
|
|
304
|
+
const range = structureRange(state, scope, "group");
|
|
305
|
+
if (!range) return false;
|
|
306
|
+
const { blocks, from, to } = rangeBlocks(range.parent, range.parentStart, range.fromIndex, range.toIndex);
|
|
307
|
+
const result = groupHeadingsIntoComposites(state.schema, blocks, recursive, kind);
|
|
308
|
+
if (!result) return false;
|
|
309
|
+
if (dispatch) {
|
|
310
|
+
tr.replaceWith(from, to, result);
|
|
311
|
+
tr.setSelection(Selection.near(tr.doc.resolve(from), 1)).scrollIntoView();
|
|
312
|
+
}
|
|
313
|
+
return true;
|
|
314
|
+
},
|
|
315
|
+
convertCompositesToHeadings: ({ recursive, scope }) => ({ state, tr, dispatch }) => {
|
|
316
|
+
const range = structureRange(state, scope, "flatten");
|
|
317
|
+
if (!range) return false;
|
|
318
|
+
const $pos = state.selection.empty ? state.selection.$head : state.selection.$from;
|
|
319
|
+
let level = 1;
|
|
320
|
+
for (let depth = 1; depth <= range.parentDepth; depth++) if ($pos.node(depth).type.name === COMPOSITE) level++;
|
|
321
|
+
const { blocks, from, to } = rangeBlocks(range.parent, range.parentStart, range.fromIndex, range.toIndex);
|
|
322
|
+
const result = flattenCompositesToHeadings(state.schema, blocks, recursive, level, this.options.kinds);
|
|
323
|
+
if (!result) return false;
|
|
324
|
+
if (dispatch) {
|
|
325
|
+
tr.replaceWith(from, to, result);
|
|
326
|
+
tr.setSelection(Selection.near(tr.doc.resolve(from), 1)).scrollIntoView();
|
|
327
|
+
}
|
|
328
|
+
return true;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
},
|
|
332
|
+
addKeyboardShortcuts() {
|
|
333
|
+
return {
|
|
334
|
+
Enter: () => {
|
|
335
|
+
const { $head } = this.editor.state.selection;
|
|
336
|
+
const type = $head.parent.type.name;
|
|
337
|
+
if (type === TITLE || type === DESCRIPTION) {
|
|
338
|
+
const depth = $head.depth - 1;
|
|
339
|
+
const composite = $head.node(depth);
|
|
340
|
+
const start = $head.start(depth);
|
|
341
|
+
return this.editor.commands.command(({ tr }) => {
|
|
342
|
+
const selection = Selection.findFrom(tr.doc.resolve(bodyStart(composite, start)), 1);
|
|
343
|
+
if (!selection) return false;
|
|
344
|
+
tr.setSelection(selection).scrollIntoView();
|
|
345
|
+
return true;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
if (this.editor.state.selection.empty && inTrailingEmptyParagraph($head)) return this.editor.commands.exitComposite();
|
|
349
|
+
return false;
|
|
350
|
+
},
|
|
351
|
+
Backspace: () => {
|
|
352
|
+
const { selection } = this.editor.state;
|
|
353
|
+
const { $head } = selection;
|
|
354
|
+
if (!selection.empty || !$head.parent.isTextblock || $head.parentOffset !== 0 || $head.depth < 2) return false;
|
|
355
|
+
const depth = $head.depth - 1;
|
|
356
|
+
const composite = $head.node(depth);
|
|
357
|
+
if (composite.type.name !== COMPOSITE) return false;
|
|
358
|
+
const titleEnd = $head.start(depth) + composite.child(0).nodeSize - 1;
|
|
359
|
+
const type = $head.parent.type.name;
|
|
360
|
+
if (type === DESCRIPTION) return this.editor.commands.command(({ tr }) => {
|
|
361
|
+
tr.setSelection(TextSelection.create(tr.doc, titleEnd));
|
|
362
|
+
return true;
|
|
363
|
+
});
|
|
364
|
+
if (type === TITLE) {
|
|
365
|
+
if (!isEmptyComposite(composite)) return true;
|
|
366
|
+
return this.editor.commands.command(({ tr, state }) => {
|
|
367
|
+
const from = $head.before(depth);
|
|
368
|
+
tr.replaceWith(from, $head.after(depth), state.schema.nodes.paragraph.create());
|
|
369
|
+
tr.setSelection(TextSelection.create(tr.doc, from + 1));
|
|
370
|
+
return true;
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
if ($head.index(depth) !== CHROME_COUNT) return false;
|
|
374
|
+
return this.editor.commands.command(({ tr }) => {
|
|
375
|
+
if (isEmptyParagraph($head.parent) && composite.childCount > 4) tr.delete($head.before(), $head.after());
|
|
376
|
+
tr.setSelection(TextSelection.create(tr.doc, titleEnd));
|
|
377
|
+
return true;
|
|
378
|
+
});
|
|
379
|
+
},
|
|
380
|
+
Delete: () => {
|
|
381
|
+
const { selection } = this.editor.state;
|
|
382
|
+
const { $head } = selection;
|
|
383
|
+
const type = $head.parent.type.name;
|
|
384
|
+
return selection.empty && (type === TITLE || type === DESCRIPTION) && $head.parentOffset === $head.parent.content.size;
|
|
385
|
+
},
|
|
386
|
+
"Mod-Shift-a": () => this.editor.commands.insertComposite(DEFAULT_KIND)
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
const CompositeTitleNode = Node.create({
|
|
391
|
+
name: TITLE,
|
|
392
|
+
priority: 101,
|
|
393
|
+
content: "inline*",
|
|
394
|
+
defining: true,
|
|
395
|
+
editorChrome: true,
|
|
396
|
+
abilities: { revokes: CHROME_REVOKES },
|
|
397
|
+
parseHTML: () => [{
|
|
398
|
+
tag: "h2[data-type=\"composite-title\"]",
|
|
399
|
+
priority: 60
|
|
400
|
+
}, {
|
|
401
|
+
tag: "h2[data-type=\"section-title\"]",
|
|
402
|
+
priority: 60
|
|
403
|
+
}],
|
|
404
|
+
renderHTML: ({ HTMLAttributes }) => [
|
|
405
|
+
"h2",
|
|
406
|
+
mergeAttributes(HTMLAttributes, {
|
|
407
|
+
"data-type": "composite-title",
|
|
408
|
+
class: "composite-title"
|
|
409
|
+
}),
|
|
410
|
+
0
|
|
411
|
+
],
|
|
412
|
+
renderMarkdown: (node, h) => `## ${h.renderChildren(node.content ?? [])}`,
|
|
413
|
+
addKeyboardShortcuts() {
|
|
414
|
+
return { "Mod-Enter": () => this.editor.commands.exitComposite() };
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
const CompositeDescriptionNode = Node.create({
|
|
418
|
+
name: DESCRIPTION,
|
|
419
|
+
content: "inline*",
|
|
420
|
+
defining: true,
|
|
421
|
+
editorChrome: true,
|
|
422
|
+
abilities: { revokes: CHROME_REVOKES },
|
|
423
|
+
parseHTML: () => [{
|
|
424
|
+
tag: "p[data-type=\"composite-description\"]",
|
|
425
|
+
priority: 60
|
|
426
|
+
}, {
|
|
427
|
+
tag: "p[data-type=\"section-summary\"]",
|
|
428
|
+
priority: 60
|
|
429
|
+
}],
|
|
430
|
+
renderHTML: ({ HTMLAttributes }) => [
|
|
431
|
+
"p",
|
|
432
|
+
mergeAttributes(HTMLAttributes, {
|
|
433
|
+
"data-type": "composite-description",
|
|
434
|
+
class: "composite-description"
|
|
435
|
+
}),
|
|
436
|
+
0
|
|
437
|
+
],
|
|
438
|
+
renderMarkdown: (node, h) => {
|
|
439
|
+
const text = h.renderChildren(node.content ?? []);
|
|
440
|
+
return text ? `> ${text}` : "";
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
const CompositeTagsNode = Node.create({
|
|
444
|
+
name: TAGS,
|
|
445
|
+
atom: true,
|
|
446
|
+
selectable: false,
|
|
447
|
+
draggable: false,
|
|
448
|
+
allowGapCursor: false,
|
|
449
|
+
editorChrome: true,
|
|
450
|
+
abilities: { revokes: [
|
|
451
|
+
...TEXT_ABILITIES,
|
|
452
|
+
ABILITY.blockDelete,
|
|
453
|
+
ABILITY.blockDuplicate
|
|
454
|
+
] },
|
|
455
|
+
addAttributes: () => ({ tags: {
|
|
456
|
+
default: [],
|
|
457
|
+
parseHTML: (el) => {
|
|
458
|
+
try {
|
|
459
|
+
const value = JSON.parse(el.getAttribute("data-tags") ?? "[]");
|
|
460
|
+
return Array.isArray(value) ? value.filter((tag) => typeof tag === "string") : [];
|
|
461
|
+
} catch {
|
|
462
|
+
return [];
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
renderHTML: (attrs) => ({ "data-tags": JSON.stringify(attrs.tags) })
|
|
466
|
+
} }),
|
|
467
|
+
parseHTML: () => [{ tag: "div[data-type=\"composite-tags\"]" }, { tag: "div[data-type=\"section-tags\"]" }],
|
|
468
|
+
renderHTML: ({ HTMLAttributes }) => ["div", mergeAttributes(HTMLAttributes, {
|
|
469
|
+
"data-type": "composite-tags",
|
|
470
|
+
class: "composite-tags"
|
|
471
|
+
})],
|
|
472
|
+
renderMarkdown: (node) => {
|
|
473
|
+
const tags = node.attrs?.tags;
|
|
474
|
+
return Array.isArray(tags) && tags.length ? `Tags: ${tags.map((tag) => `#${tag}`).join(" ")}` : "";
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
//#endregion
|
|
478
|
+
export { COMPOSITE_CHROME_COUNT, CompositeDescriptionNode, CompositeNode, CompositeTagsNode, CompositeTitleNode, compositeJSON, compositeKindsOf };
|
|
479
|
+
|
|
480
|
+
//# sourceMappingURL=nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","names":[],"sources":["../../../src/features/composites/nodes.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { type JSONContent, mergeAttributes, Node } from '@tiptap/core'\nimport type { Node as PMNode, ResolvedPos } from '@tiptap/pm/model'\nimport { type EditorState, Selection, TextSelection } from '@tiptap/pm/state'\nimport { editorEntryOf } from '../../core/editor-ui'\nimport { ABILITY, isChromeNode, TEXT_ABILITIES } from '../../core/schema'\nimport type { HeadingConversionScope } from '../../settings'\nimport { compositeFence } from './fences'\nimport { flattenCompositesToHeadings, groupHeadingsIntoComposites, headingGroupRange } from './heading-composites'\nimport { type CompositeKind, compositeKind, defaultCompositeKinds, fallbackCompositeKinds } from './kinds'\n\n/** Options of the `composite` node: the kinds its `kind` attribute selects from. */\nexport interface CompositeOptions {\n kinds: readonly CompositeKind[]\n}\n\n/** Storage of the `composite` node: mirrors `options.kinds` for code that only has the editor. */\nexport interface CompositeStorage {\n kinds: readonly CompositeKind[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n composite: {\n /** Insert an empty composite of `kind` after the caret's block (replacing an empty paragraph; at the body start from the composite chrome), caret in its title. */\n insertComposite: (kind?: string) => ReturnType\n /** Wrap the selected blocks into a new composite of `kind`, caret in its title. */\n wrapInComposite: (kind?: string) => ReturnType\n /** Leave the caret's innermost composite: new paragraph right after it (a trailing empty body paragraph is moved there). */\n exitComposite: () => ReturnType\n /** Group headings in the selected blocks (or, without a selection, in `scope`) into composites of `kind`; `recursive` nests every heading level. False when the range holds no heading. */\n convertHeadingsToComposites: (options: { recursive: boolean, scope: HeadingConversionScope, kind?: string }) => ReturnType\n /** Turn composites among the selected blocks (or, without a selection, in `scope`) into headings of their nesting level, with description, tags and meta as text lines; `recursive` flattens every level. False when the range holds no composite. */\n convertCompositesToHeadings: (options: { recursive: boolean, scope: HeadingConversionScope }) => ReturnType\n /** Switch the composite at `pos` (default: the caret's innermost composite) to `kind`; `meta` keeps only the target kind's fields. */\n setCompositeKind: (kind: string, pos?: number) => ReturnType\n }\n }\n\n interface Storage {\n composite: CompositeStorage\n }\n}\n\nconst COMPOSITE = 'composite'\nconst TITLE = 'compositeTitle'\nconst DESCRIPTION = 'compositeDescription'\nconst TAGS = 'compositeTags'\n/** Kind of a composite created without an explicit one (also the attribute default). */\nconst DEFAULT_KIND = 'section'\n/** Title, description and tags: the fixed children in front of a composite's body. */\nexport const COMPOSITE_CHROME_COUNT = 3\nconst CHROME_COUNT = COMPOSITE_CHROME_COUNT\n\n/**\n * Composite kinds `editor` was configured with. An editor without the composite node gets the built-in kinds in the\n * language of its surface (the default language without one).\n */\nexport function compositeKindsOf(editor: Editor): readonly CompositeKind[] {\n const configured: readonly CompositeKind[] | undefined = editor.storage.composite?.kinds\n if (configured) return configured\n const entry = editorEntryOf(editor)\n return entry ? defaultCompositeKinds(entry.ctx.t) : fallbackCompositeKinds()\n}\n\n/** JSON of a fresh composite of `kind` (empty title/description/tags, hidden meta) with `body`. */\nexport function compositeJSON(kind: string, body: JSONContent[] = [{ type: 'paragraph' }]): JSONContent {\n return { type: COMPOSITE, attrs: { kind }, content: [{ type: TITLE }, { type: DESCRIPTION }, { type: TAGS }, ...body] }\n}\n\n/** Innermost composite around `$pos`: its depth, position and node. */\nfunction compositeAround($pos: ResolvedPos): { depth: number, pos: number, node: PMNode } | null {\n for (let depth = $pos.depth; depth > 0; depth--) {\n const node = $pos.node(depth)\n if (node.type.name === COMPOSITE) return { depth, pos: $pos.before(depth), node }\n }\n return null\n}\n\n/** The composite starting at `pos`, or without `pos` the caret's innermost composite. */\nfunction compositeAt(state: EditorState, pos: number | undefined): { pos: number, node: PMNode } | null {\n if (pos === undefined) return compositeAround(state.selection.$head)\n const node = state.doc.nodeAt(pos)\n return node?.type.name === COMPOSITE ? { pos, node } : null\n}\n\n/** Position right in front of the body (= after the tags row) of the composite whose content starts at `start`. */\nfunction bodyStart(composite: PMNode, start: number): number {\n let pos = start\n for (let i = 0; i < CHROME_COUNT; i++) pos += composite.child(i).nodeSize\n return pos\n}\n\nconst isEmptyParagraph = (node: PMNode) => node.type.name === 'paragraph' && node.content.size === 0\n\n/** The caret's block is an empty paragraph, the last child of a composite whose body has more than this one block. */\nfunction inTrailingEmptyParagraph($head: ResolvedPos): boolean {\n if ($head.depth < 2 || !isEmptyParagraph($head.parent)) return false\n const composite = $head.node($head.depth - 1)\n return composite.type.name === COMPOSITE\n && $head.index($head.depth - 1) === composite.childCount - 1\n && composite.childCount > CHROME_COUNT + 1\n}\n\n/** Nothing typed yet: empty title and description, no tags, body is one empty paragraph. */\nfunction isEmptyComposite(composite: PMNode): boolean {\n const tags: unknown = composite.child(2).attrs.tags\n return composite.child(0).content.size === 0\n && composite.child(1).content.size === 0\n && (!Array.isArray(tags) || tags.length === 0)\n && composite.childCount === CHROME_COUNT + 1\n && isEmptyParagraph(composite.child(CHROME_COUNT))\n}\n\n/** Child range of `parent` a structure conversion works on: the selected blocks (composite chrome excluded), or without a selection the `scope` — for `'heading'` the caret's heading group (`'group'`) or innermost composite (`'flatten'`). */\nfunction structureRange(state: EditorState, scope: HeadingConversionScope, direction: 'group' | 'flatten'): { parent: PMNode, parentDepth: number, parentStart: number, fromIndex: number, toIndex: number } | null {\n const { $from, $to, $head, empty } = state.selection\n if (!empty) {\n const range = $from.blockRange($to, node => node.type.name === 'doc' || node.type.name === COMPOSITE)\n if (!range) return null\n const parent = range.parent\n // The composite chrome (title, description, tags) is never part of the converted blocks.\n const fromIndex = Math.max(range.startIndex, parent.type.name === COMPOSITE ? CHROME_COUNT : 0)\n const toIndex = range.endIndex\n if (fromIndex >= toIndex) return null\n return { parent, parentDepth: range.depth, parentStart: range.$from.start(range.depth), fromIndex, toIndex }\n }\n if (scope === 'container') {\n const found = compositeAround($head)\n if (found) return { parent: found.node, parentDepth: found.depth, parentStart: $head.start(found.depth), fromIndex: CHROME_COUNT, toIndex: found.node.childCount }\n return { parent: state.doc, parentDepth: 0, parentStart: 0, fromIndex: 0, toIndex: state.doc.childCount }\n }\n if (scope === 'heading') {\n if (direction === 'flatten') {\n const found = compositeAround($head)\n if (!found) return null\n const depth = found.depth - 1\n const fromIndex = $head.index(depth)\n return { parent: $head.node(depth), parentDepth: depth, parentStart: $head.start(depth), fromIndex, toIndex: fromIndex + 1 }\n }\n let depth = $head.depth\n while (depth > 0 && !['doc', COMPOSITE].includes($head.node(depth - 1).type.name)) depth--\n if (depth === 0) return null\n const parent = $head.node(depth - 1)\n const minIndex = parent.type.name === COMPOSITE ? CHROME_COUNT : 0\n let index = $head.index(depth - 1)\n while (index >= minIndex && parent.child(index).type.name !== 'heading') index--\n if (index < minIndex) return null\n const group = headingGroupRange(parent, index)\n return { parent, parentDepth: depth - 1, parentStart: $head.start(depth - 1), fromIndex: group.from, toIndex: group.to }\n }\n return { parent: state.doc, parentDepth: 0, parentStart: 0, fromIndex: 0, toIndex: state.doc.childCount }\n}\n\n/** Children `fromIndex..toIndex` of `parent` (content starting at `parentStart`) and their document range. */\nfunction rangeBlocks(parent: PMNode, parentStart: number, fromIndex: number, toIndex: number): { blocks: PMNode[], from: number, to: number } {\n const blocks: PMNode[] = []\n let from = parentStart\n let to = parentStart\n parent.forEach((child, _offset, index) => {\n if (index < fromIndex) from += child.nodeSize\n else if (index < toIndex) blocks.push(child)\n if (index < toIndex) to += child.nodeSize\n })\n return { blocks, from, to }\n}\n\n// Revoked inside title and description: they are single lines of text, not containers for blocks.\nconst CHROME_REVOKES = [\n ABILITY.headings, ABILITY.lists, ABILITY.blockquote, ABILITY.codeBlock, ABILITY.rule, ABILITY.composite, ABILITY.transcript,\n ABILITY.media, ABILITY.record, ABILITY.aiGenerate, ABILITY.blockDuplicate,\n]\n\n// Schema-only nodes (no node views): shared by the client editor and the server-side Yjs schema.\n// The client adds the node view of `composite` in `node-views.ts`; `compositeTags` needs none (a hidden data row).\nexport const CompositeNode = Node.create<CompositeOptions, CompositeStorage>({\n name: COMPOSITE,\n // Above StarterKit's default (100) so this Enter / Backspace / Delete keymap runs first,\n // below Paragraph (1000) so the paragraph stays the schema's default block.\n priority: 101,\n group: 'block',\n content: `${TITLE} ${DESCRIPTION} ${TAGS} block+`,\n isolating: true,\n defining: true,\n editorBlockContainer: true,\n abilities: { own: [ABILITY.compositeMeta, ABILITY.compositeSummarize, ABILITY.compositeExport, ABILITY.compositeTranscribe] },\n addOptions: () => ({ kinds: fallbackCompositeKinds() }),\n addStorage() {\n return { kinds: this.options.kinds }\n },\n addAttributes: () => ({\n kind: {\n default: DEFAULT_KIND,\n // `null` (no `data-kind`, e.g. legacy markup) falls back to the default kind.\n parseHTML: el => el.getAttribute('data-kind') || null,\n renderHTML: attrs => ({ 'data-kind': attrs.kind }),\n },\n meta: {\n default: {},\n parseHTML: (el) => {\n try {\n const value: unknown = JSON.parse(el.getAttribute('data-meta') ?? '{}')\n return value && typeof value === 'object' && !Array.isArray(value) ? value : {}\n }\n catch {\n return {}\n }\n },\n renderHTML: attrs => ({ 'data-meta': JSON.stringify(attrs.meta) }),\n },\n }),\n parseHTML: () => [\n { tag: 'section[data-type=\"composite\"]' },\n // Legacy markup of the block the composite family replaced: no `data-kind`, so it parses as kind `section`.\n { tag: 'section[data-type=\"section\"]' },\n ],\n renderHTML: ({ HTMLAttributes }) => ['section', mergeAttributes(HTMLAttributes, { 'data-type': COMPOSITE }), 0],\n // Fenced: `::: <kind> {meta JSON, only when non-empty}`, then title, description, tags and body blocks as separate\n // Markdown blocks (empty description/tags render nothing), then `:::`. Same child iteration as the blockquote's\n // renderMarkdown (keeps list numbering etc. per sibling index).\n renderMarkdown: (node, h) => {\n const kind = typeof node.attrs?.kind === 'string' && node.attrs.kind ? node.attrs.kind : DEFAULT_KIND\n const meta: unknown = node.attrs?.meta\n const body = (node.content ?? [])\n .map((child, index) => h.renderChild?.(child, index) ?? h.renderChildren([child]))\n .filter(Boolean)\n .join('\\n\\n')\n return compositeFence(kind, meta && typeof meta === 'object' ? meta as Record<string, unknown> : {}, body)\n },\n\n addCommands() {\n return {\n insertComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {\n const { $head } = state.selection\n let depth = $head.depth\n while (depth > 0 && !['doc', COMPOSITE].includes($head.node(depth - 1).type.name)) depth--\n let from = $head.pos\n let to = from\n if (depth > 0) {\n const block = $head.node(depth)\n if (isChromeNode(block)) from = to = bodyStart($head.node(depth - 1), $head.start(depth - 1))\n else if (isEmptyParagraph(block)) {\n from = $head.before(depth)\n to = $head.after(depth)\n }\n else from = to = $head.after(depth)\n }\n const $from = state.doc.resolve(from)\n if (!$from.parent.canReplaceWith($from.index(), state.doc.resolve(to).index(), this.type)) return false\n if (dispatch) {\n const json = compositeJSON(kind)\n tr.replaceWith(from, to, state.schema.nodeFromJSON(json))\n tr.setSelection(TextSelection.create(tr.doc, from + 2)).scrollIntoView()\n }\n return true\n },\n\n wrapInComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {\n const { $from, $to } = state.selection\n const range = $from.blockRange($to, node => node.type.name === 'doc' || node.type.name === COMPOSITE)\n if (!range) return false\n if (range.parent.type.name === COMPOSITE && range.startIndex < CHROME_COUNT) return false\n if (!range.parent.canReplaceWith(range.startIndex, range.endIndex, this.type)) return false\n if (dispatch) {\n const { nodes } = state.schema\n const composite = this.type.create({ kind }, [\n nodes[TITLE]!.create(), nodes[DESCRIPTION]!.create(), nodes[TAGS]!.create(),\n ...state.doc.slice(range.start, range.end).content.content,\n ])\n tr.replaceWith(range.start, range.end, composite)\n tr.setSelection(TextSelection.create(tr.doc, range.start + 2)).scrollIntoView()\n }\n return true\n },\n\n setCompositeKind: (kind, pos) => ({ state, tr, dispatch }) => {\n const found = compositeAt(state, pos)\n if (!found) return false\n if (dispatch) {\n const keys = new Set(compositeKind(this.options.kinds, kind).fields.map(field => field.key))\n const meta = Object.fromEntries(Object.entries(found.node.attrs.meta as Record<string, unknown>).filter(([key]) => keys.has(key)))\n tr.setNodeMarkup(found.pos, undefined, { ...found.node.attrs, kind, meta })\n }\n return true\n },\n\n exitComposite: () => ({ state, tr, dispatch }) => {\n const { $head } = state.selection\n const composite = compositeAround($head)\n if (!composite) return false\n if (dispatch) {\n // Leaving from a trailing empty paragraph moves it out instead of leaving an empty line behind.\n if ($head.depth === composite.depth + 1 && inTrailingEmptyParagraph($head)) tr.delete($head.before(), $head.after())\n const after = tr.mapping.map($head.after(composite.depth))\n tr.insert(after, state.schema.nodes.paragraph!.create())\n tr.setSelection(TextSelection.create(tr.doc, after + 1)).scrollIntoView()\n }\n return true\n },\n\n convertHeadingsToComposites: ({ recursive, scope, kind = DEFAULT_KIND }) => ({ state, tr, dispatch }) => {\n const range = structureRange(state, scope, 'group')\n if (!range) return false\n const { blocks, from, to } = rangeBlocks(range.parent, range.parentStart, range.fromIndex, range.toIndex)\n const result = groupHeadingsIntoComposites(state.schema, blocks, recursive, kind)\n if (!result) return false\n if (dispatch) {\n tr.replaceWith(from, to, result)\n tr.setSelection(Selection.near(tr.doc.resolve(from), 1)).scrollIntoView()\n }\n return true\n },\n\n convertCompositesToHeadings: ({ recursive, scope }) => ({ state, tr, dispatch }) => {\n const range = structureRange(state, scope, 'flatten')\n if (!range) return false\n const $pos = state.selection.empty ? state.selection.$head : state.selection.$from\n let level = 1\n for (let depth = 1; depth <= range.parentDepth; depth++) {\n if ($pos.node(depth).type.name === COMPOSITE) level++\n }\n const { blocks, from, to } = rangeBlocks(range.parent, range.parentStart, range.fromIndex, range.toIndex)\n const result = flattenCompositesToHeadings(state.schema, blocks, recursive, level, this.options.kinds)\n if (!result) return false\n if (dispatch) {\n tr.replaceWith(from, to, result)\n tr.setSelection(Selection.near(tr.doc.resolve(from), 1)).scrollIntoView()\n }\n return true\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { $head } = this.editor.state.selection\n const type = $head.parent.type.name\n if (type === TITLE || type === DESCRIPTION) {\n const depth = $head.depth - 1\n const composite = $head.node(depth)\n const start = $head.start(depth)\n return this.editor.commands.command(({ tr }) => {\n const selection = Selection.findFrom(tr.doc.resolve(bodyStart(composite, start)), 1)\n if (!selection) return false\n tr.setSelection(selection).scrollIntoView()\n return true\n })\n }\n if (this.editor.state.selection.empty && inTrailingEmptyParagraph($head)) return this.editor.commands.exitComposite()\n return false\n },\n\n Backspace: () => {\n const { selection } = this.editor.state\n const { $head } = selection\n if (!selection.empty || !$head.parent.isTextblock || $head.parentOffset !== 0 || $head.depth < 2) return false\n const depth = $head.depth - 1\n const composite = $head.node(depth)\n if (composite.type.name !== COMPOSITE) return false\n const start = $head.start(depth)\n const titleEnd = start + composite.child(0).nodeSize - 1\n const type = $head.parent.type.name\n\n if (type === DESCRIPTION) {\n return this.editor.commands.command(({ tr }) => {\n tr.setSelection(TextSelection.create(tr.doc, titleEnd))\n return true\n })\n }\n if (type === TITLE) {\n // Never joins anything into the title; an untouched composite turns back into a paragraph.\n if (!isEmptyComposite(composite)) return true\n return this.editor.commands.command(({ tr, state }) => {\n const from = $head.before(depth)\n tr.replaceWith(from, $head.after(depth), state.schema.nodes.paragraph!.create())\n tr.setSelection(TextSelection.create(tr.doc, from + 1))\n return true\n })\n }\n // First body block: ProseMirror's joinBackward would delete the tags row (an atom) — move into the chrome instead.\n if ($head.index(depth) !== CHROME_COUNT) return false\n return this.editor.commands.command(({ tr }) => {\n if (isEmptyParagraph($head.parent) && composite.childCount > CHROME_COUNT + 1) tr.delete($head.before(), $head.after())\n tr.setSelection(TextSelection.create(tr.doc, titleEnd))\n return true\n })\n },\n\n // No join of the following block into title or description.\n Delete: () => {\n const { selection } = this.editor.state\n const { $head } = selection\n const type = $head.parent.type.name\n return selection.empty && (type === TITLE || type === DESCRIPTION) && $head.parentOffset === $head.parent.content.size\n },\n\n 'Mod-Shift-a': () => this.editor.commands.insertComposite(DEFAULT_KIND),\n }\n },\n})\n\nexport const CompositeTitleNode = Node.create({\n name: TITLE,\n // Above StarterKit's hard break (100), which also binds Mod-Enter.\n priority: 101,\n content: 'inline*',\n defining: true,\n editorChrome: true,\n abilities: { revokes: CHROME_REVOKES },\n // Above the heading's `h2` rule; the second rule reads legacy markup.\n parseHTML: () => [\n { tag: 'h2[data-type=\"composite-title\"]', priority: 60 },\n { tag: 'h2[data-type=\"section-title\"]', priority: 60 },\n ],\n renderHTML: ({ HTMLAttributes }) => ['h2', mergeAttributes(HTMLAttributes, { 'data-type': 'composite-title', class: 'composite-title' }), 0],\n renderMarkdown: (node, h) => `## ${h.renderChildren(node.content ?? [])}`,\n addKeyboardShortcuts() {\n return {\n // Here rather than on CompositeNode: the ability gate swallows every Mod-/Alt- key of the `composite` type where\n // `format.composite` is missing (title, code blocks, speaker segments), but leaving a composite must work everywhere.\n 'Mod-Enter': () => this.editor.commands.exitComposite(),\n }\n },\n})\n\nexport const CompositeDescriptionNode = Node.create({\n name: DESCRIPTION,\n content: 'inline*',\n defining: true,\n editorChrome: true,\n abilities: { revokes: CHROME_REVOKES },\n // Above the paragraph's `p` rule; the second rule reads legacy markup.\n parseHTML: () => [\n { tag: 'p[data-type=\"composite-description\"]', priority: 60 },\n { tag: 'p[data-type=\"section-summary\"]', priority: 60 },\n ],\n renderHTML: ({ HTMLAttributes }) => ['p', mergeAttributes(HTMLAttributes, { 'data-type': 'composite-description', class: 'composite-description' }), 0],\n renderMarkdown: (node, h) => {\n const text = h.renderChildren(node.content ?? [])\n return text ? `> ${text}` : ''\n },\n})\n\nexport const CompositeTagsNode = Node.create({\n name: TAGS,\n atom: true,\n selectable: false,\n draggable: false,\n allowGapCursor: false,\n editorChrome: true,\n abilities: { revokes: [...TEXT_ABILITIES, ABILITY.blockDelete, ABILITY.blockDuplicate] },\n addAttributes: () => ({\n tags: {\n default: [],\n parseHTML: (el) => {\n try {\n const value: unknown = JSON.parse(el.getAttribute('data-tags') ?? '[]')\n return Array.isArray(value) ? value.filter(tag => typeof tag === 'string') : []\n }\n catch {\n return []\n }\n },\n renderHTML: attrs => ({ 'data-tags': JSON.stringify(attrs.tags) }),\n },\n }),\n // The second rule reads legacy markup.\n parseHTML: () => [{ tag: 'div[data-type=\"composite-tags\"]' }, { tag: 'div[data-type=\"section-tags\"]' }],\n renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes(HTMLAttributes, { 'data-type': 'composite-tags', class: 'composite-tags' })],\n renderMarkdown: (node) => {\n const tags: unknown = node.attrs?.tags\n return Array.isArray(tags) && tags.length ? `Tags: ${tags.map(tag => `#${tag}`).join(' ')}` : ''\n },\n})\n\nexport const CompositeNodes = [CompositeNode, CompositeTitleNode, CompositeDescriptionNode, CompositeTagsNode]\n"],"mappings":";;;;;;;;;AA4CA,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AAK,SAAS;CAC9B;AACF,CAAC;AAED,MAAa,oBAAoB,KAAK,OAAO;CAC3C,MAAM;CACN,MAAM;CACN,YAAY;CACZ,WAAW;CACX,gBAAgB;CAChB,cAAc;CACd,WAAW,EAAE,SAAS;EAAC,GAAG;EAAgB,QAAQ;EAAa,QAAQ;CAAc,EAAE;CACvF,sBAAsB,EACpB,MAAM;EACJ,SAAS,CAAC;EACV,YAAY,OAAO;GACjB,IAAI;IACF,MAAM,QAAiB,KAAK,MAAM,GAAG,aAAa,WAAW,KAAK,IAAI;IACtE,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAO,QAAO,OAAO,QAAQ,QAAQ,IAAI,CAAC;GAChF,QACM;IACJ,OAAO,CAAC;GACV;EACF;EACA,aAAY,WAAU,EAAE,aAAa,KAAK,UAAU,MAAM,IAAI,EAAE;CAClE,EACF;CAEA,iBAAiB,CAAC,EAAE,KAAK,oCAAkC,GAAG,EAAE,KAAK,kCAAgC,CAAC;CACtG,aAAa,EAAE,qBAAqB,CAAC,OAAO,gBAAgB,gBAAgB;EAAE,aAAa;EAAkB,OAAO;CAAiB,CAAC,CAAC;CACvI,iBAAiB,SAAS;EACxB,MAAM,OAAgB,KAAK,OAAO;EAClC,OAAO,MAAM,QAAQ,IAAI,KAAK,KAAK,SAAS,SAAS,KAAK,KAAI,QAAO,IAAI,KAAK,CAAC,CAAC,KAAK,GAAG,MAAM;CAChG;AACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
3
|
+
//#region src/features/composites/outline.d.ts
|
|
4
|
+
/** One Baustein of a document's outline. */
|
|
5
|
+
export interface OutlineNode {
|
|
6
|
+
/** Block ID, or `pos:<pos>` for a block without one yet; unique within the document. */
|
|
7
|
+
key: string;
|
|
8
|
+
id: string | null;
|
|
9
|
+
/** Position of the composite in the document it was read from. */
|
|
10
|
+
pos: number;
|
|
11
|
+
kind: string;
|
|
12
|
+
title: string;
|
|
13
|
+
/** The composite has a description (the summary). */
|
|
14
|
+
hasSummary: boolean;
|
|
15
|
+
children: OutlineNode[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The composites of `doc` as a tree (title, kind, summary flag). A composite without a title gets `untitled` (the
|
|
19
|
+
* caller's translated „(ohne Titel)“). Composites of a kind in `hiddenKinds` are omitted and their visible descendants
|
|
20
|
+
* take their place in the parent's list.
|
|
21
|
+
*/
|
|
22
|
+
export declare function compositeOutline(doc: Node$1, hiddenKinds: ReadonlySet<string>, untitled: string): OutlineNode[];
|
|
23
|
+
/**
|
|
24
|
+
* Whether block `id` can move into the composite `targetId` (`null` = the end of the document): both exist, the target
|
|
25
|
+
* is a composite and neither the block itself nor inside it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function canMoveBlockInto(editor: Editor, id: string, targetId: string | null): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Moves block `id` to the end of the body of the composite `targetId` (`null` = the end of the document) in a single
|
|
30
|
+
* transaction, i.e. one undo step. `false` when nothing moved: a block is missing, the target is not a composite, or it
|
|
31
|
+
* is the block itself or lies inside it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function moveBlockInto(editor: Editor, id: string, targetId: string | null): boolean;
|
|
34
|
+
//#endregion
|
|
35
|
+
//# sourceMappingURL=outline.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { blockIdOf, findBlockById } from "../../core/schema/block-ids.js";
|
|
2
|
+
//#region src/features/composites/outline.ts
|
|
3
|
+
/**
|
|
4
|
+
* The composites of `doc` as a tree (title, kind, summary flag). A composite without a title gets `untitled` (the
|
|
5
|
+
* caller's translated „(ohne Titel)“). Composites of a kind in `hiddenKinds` are omitted and their visible descendants
|
|
6
|
+
* take their place in the parent's list.
|
|
7
|
+
*/
|
|
8
|
+
function compositeOutline(doc, hiddenKinds, untitled) {
|
|
9
|
+
function collect(parent, start, into) {
|
|
10
|
+
parent.forEach((node, offset) => {
|
|
11
|
+
const pos = start + offset;
|
|
12
|
+
if (node.type.name === "composite") {
|
|
13
|
+
const kind = String(node.attrs.kind);
|
|
14
|
+
const children = [];
|
|
15
|
+
collect(node, pos + 1, children);
|
|
16
|
+
if (hiddenKinds.has(kind)) {
|
|
17
|
+
into.push(...children);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const id = blockIdOf(node);
|
|
21
|
+
into.push({
|
|
22
|
+
key: id ?? `pos:${pos}`,
|
|
23
|
+
id,
|
|
24
|
+
pos,
|
|
25
|
+
kind,
|
|
26
|
+
title: node.firstChild?.textContent.trim() || untitled,
|
|
27
|
+
hasSummary: (node.maybeChild(1)?.content.size ?? 0) > 0,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
} else if (!node.isTextblock && !node.isLeaf) collect(node, pos + 1, into);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const roots = [];
|
|
34
|
+
collect(doc, 0, roots);
|
|
35
|
+
return roots;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether block `id` can move into the composite `targetId` (`null` = the end of the document): both exist, the target
|
|
39
|
+
* is a composite and neither the block itself nor inside it.
|
|
40
|
+
*/
|
|
41
|
+
function canMoveBlockInto(editor, id, targetId) {
|
|
42
|
+
const { doc } = editor.state;
|
|
43
|
+
const block = findBlockById(doc, id);
|
|
44
|
+
if (!block) return false;
|
|
45
|
+
if (targetId === null) return true;
|
|
46
|
+
const target = findBlockById(doc, targetId);
|
|
47
|
+
if (!target || target.node.type.name !== "composite") return false;
|
|
48
|
+
return target.pos < block.pos || target.pos >= block.pos + block.node.nodeSize;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Moves block `id` to the end of the body of the composite `targetId` (`null` = the end of the document) in a single
|
|
52
|
+
* transaction, i.e. one undo step. `false` when nothing moved: a block is missing, the target is not a composite, or it
|
|
53
|
+
* is the block itself or lies inside it.
|
|
54
|
+
*/
|
|
55
|
+
function moveBlockInto(editor, id, targetId) {
|
|
56
|
+
if (!canMoveBlockInto(editor, id, targetId)) return false;
|
|
57
|
+
const { doc, tr } = editor.state;
|
|
58
|
+
const block = findBlockById(doc, id);
|
|
59
|
+
const target = targetId === null ? null : findBlockById(doc, targetId);
|
|
60
|
+
const insertPos = target ? target.pos + target.node.nodeSize - 1 : doc.content.size;
|
|
61
|
+
tr.delete(block.pos, block.pos + block.node.nodeSize);
|
|
62
|
+
tr.insert(tr.mapping.map(insertPos), block.node);
|
|
63
|
+
editor.view.dispatch(tr.scrollIntoView());
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { canMoveBlockInto, compositeOutline, moveBlockInto };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=outline.js.map
|