@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,305 @@
|
|
|
1
|
+
import { ABILITY } from "../../core/schema/abilities.js";
|
|
2
|
+
import { abilitiesAtSelection } from "../../core/abilities.js";
|
|
3
|
+
import { settingsTabsOf } from "../../core/define-editor.js";
|
|
4
|
+
import { downloadText } from "../../core/download.js";
|
|
5
|
+
import { editorEntryOf } from "../../core/editor-ui.js";
|
|
6
|
+
import { compositeKind, defaultCompositeKinds } from "./kinds.js";
|
|
7
|
+
import { blocksFromMarkdown } from "./fences.js";
|
|
8
|
+
import { structureBlocks } from "./heading-composites.js";
|
|
9
|
+
import { CompositeDescriptionNode, CompositeTitleNode, compositeKindsOf } from "./nodes.js";
|
|
10
|
+
import { compositeConversions } from "./convert.js";
|
|
11
|
+
import { migrateLegacyContent } from "./legacy.js";
|
|
12
|
+
import { documentCompositeMarkdown, markdownFileName } from "./markdown-export.js";
|
|
13
|
+
import { compositeNodes } from "./node-views.js";
|
|
14
|
+
import { Structure, structureOf } from "./structure.js";
|
|
15
|
+
import { STRUCTURE_MODE_KEYS } from "./structure-mode.js";
|
|
16
|
+
//#region src/features/composites/feature.ts
|
|
17
|
+
/** Heading level the structure stage starts at when it turns composites into headings (below the document title). */
|
|
18
|
+
const STRUCTURE_STAGE_LEVEL = 2;
|
|
19
|
+
/**
|
|
20
|
+
* Composites („Bausteine“): the node family with its node views, the toolbar group (insert, „In Baustein umwandeln“,
|
|
21
|
+
* „Gliederung umwandeln“), `/` commands, the conversion providers (wrap into / switch kind of / unwrap composites),
|
|
22
|
+
* Markdown `:::` fences, legacy `section` migration, the preferred-structure setting and its `editing` settings tab,
|
|
23
|
+
* the chips on each title line (status, tags) and the details popover on the kind icon (the binding's `chrome` overlay), and
|
|
24
|
+
* the AI view of kinds and structure. Contributes the `parseMarkdown`,
|
|
25
|
+
* `structure` and `migrateContent` stages. Imports no AI, media or transcript code.
|
|
26
|
+
*/
|
|
27
|
+
function compositeFeatureCore(ui, options = {}) {
|
|
28
|
+
const kindsOf = (ctx) => options.kinds ?? defaultCompositeKinds(ctx.t);
|
|
29
|
+
const { Composite, CompositeTags } = compositeNodes(ui.nodeViews);
|
|
30
|
+
return {
|
|
31
|
+
id: "composites",
|
|
32
|
+
extensions: (ctx) => [
|
|
33
|
+
Composite.configure({ kinds: kindsOf(ctx) }),
|
|
34
|
+
CompositeTitleNode,
|
|
35
|
+
CompositeDescriptionNode,
|
|
36
|
+
CompositeTags,
|
|
37
|
+
Structure.configure({ mode: () => ctx.settings.get().blocks.structure })
|
|
38
|
+
],
|
|
39
|
+
toolbar: (ctx) => [{
|
|
40
|
+
id: "composites",
|
|
41
|
+
order: 60,
|
|
42
|
+
items: compositeToolbarItems(ctx, kindsOf(ctx))
|
|
43
|
+
}],
|
|
44
|
+
slashCommands: (ctx) => compositeSlashCommands(ctx, kindsOf(ctx)),
|
|
45
|
+
blockActions: (ctx) => [{
|
|
46
|
+
id: "document-export",
|
|
47
|
+
label: ctx.t("composites.blockAction.export"),
|
|
48
|
+
icon: "i-lucide-download",
|
|
49
|
+
ability: ABILITY.compositeExport,
|
|
50
|
+
order: 400,
|
|
51
|
+
isVisible: ({ node }) => node.attrs.kind === "document",
|
|
52
|
+
run: ({ editor, node }) => downloadText(markdownFileName(node), documentCompositeMarkdown(editor, node))
|
|
53
|
+
}],
|
|
54
|
+
overlays: [ui.chrome],
|
|
55
|
+
settingsTabs: (ctx) => [{
|
|
56
|
+
id: "editing",
|
|
57
|
+
label: ctx.t("composites.tab"),
|
|
58
|
+
icon: "i-lucide-pencil",
|
|
59
|
+
component: ui.settingsTab,
|
|
60
|
+
props: { kinds: kindsOf(ctx) }
|
|
61
|
+
}],
|
|
62
|
+
blocks: {
|
|
63
|
+
parseMarkdown: (editor, markdown) => blocksFromMarkdown((md) => editor.markdown.parse(md), markdown, compositeKindsOf(editor)),
|
|
64
|
+
structure: (editor, blocks) => {
|
|
65
|
+
const { schema } = editor;
|
|
66
|
+
return structureBlocks(schema, blocks.map((block) => schema.nodeFromJSON(block)), structureOf(editor), STRUCTURE_STAGE_LEVEL, compositeKindsOf(editor)).map((node) => node.toJSON());
|
|
67
|
+
},
|
|
68
|
+
migrateContent: migrateLegacyContent
|
|
69
|
+
},
|
|
70
|
+
conversions: compositeConversions(options.kinds),
|
|
71
|
+
aiContext: (editor) => ({
|
|
72
|
+
kinds: compositeKindsOf(editor).map(({ id, label, fields, ai }) => ({
|
|
73
|
+
id,
|
|
74
|
+
label,
|
|
75
|
+
fields,
|
|
76
|
+
...ai?.purpose && { purpose: ai.purpose }
|
|
77
|
+
})),
|
|
78
|
+
structure: structureOf(editor)
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function compositeSlashCommands({ settings, t }, kinds) {
|
|
83
|
+
const insert = (kind) => (editor) => editor.commands.insertComposite(kind);
|
|
84
|
+
const group = (recursive) => (editor) => {
|
|
85
|
+
const { editing, blocks } = settings.get();
|
|
86
|
+
return editor.commands.convertHeadingsToComposites({
|
|
87
|
+
recursive,
|
|
88
|
+
scope: editing.headingConversionScope,
|
|
89
|
+
kind: blocks.defaultKind
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
const flatten = (recursive) => (editor) => editor.commands.convertCompositesToHeadings({
|
|
93
|
+
recursive,
|
|
94
|
+
scope: settings.get().editing.headingConversionScope
|
|
95
|
+
});
|
|
96
|
+
return [
|
|
97
|
+
{
|
|
98
|
+
id: "abschnitt",
|
|
99
|
+
label: t("composites.slash.section"),
|
|
100
|
+
icon: "i-lucide-layers",
|
|
101
|
+
ability: ABILITY.composite,
|
|
102
|
+
run: insert("section")
|
|
103
|
+
},
|
|
104
|
+
...kinds.filter((kind) => kind.id !== "section").map((kind) => ({
|
|
105
|
+
id: kind.id,
|
|
106
|
+
label: kind.label,
|
|
107
|
+
icon: kind.icon,
|
|
108
|
+
ability: ABILITY.composite,
|
|
109
|
+
run: insert(kind.id)
|
|
110
|
+
})),
|
|
111
|
+
{
|
|
112
|
+
id: "gliedern",
|
|
113
|
+
label: t("composites.slash.group"),
|
|
114
|
+
icon: "i-lucide-layers",
|
|
115
|
+
ability: ABILITY.composite,
|
|
116
|
+
run: group(false)
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "gliedern-alle",
|
|
120
|
+
label: t("composites.slash.groupAll"),
|
|
121
|
+
icon: "i-lucide-list-tree",
|
|
122
|
+
ability: ABILITY.composite,
|
|
123
|
+
run: group(true)
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "aufloesen",
|
|
127
|
+
label: t("composites.slash.flatten"),
|
|
128
|
+
icon: "i-lucide-heading",
|
|
129
|
+
ability: ABILITY.headings,
|
|
130
|
+
run: flatten(false)
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "aufloesen-alle",
|
|
134
|
+
label: t("composites.slash.flattenAll"),
|
|
135
|
+
icon: "i-lucide-align-left",
|
|
136
|
+
ability: ABILITY.headings,
|
|
137
|
+
run: flatten(true)
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The toolbar group beside the inserts: the default kind's insert button (it follows the setting, so label/icon/shortcut
|
|
143
|
+
* are getters read at render time), „In Baustein umwandeln“ (one entry per kind for the caret's block) and „Gliederung
|
|
144
|
+
* umwandeln“ (headings <-> composites in both directions, the preferred structure's direction first).
|
|
145
|
+
*/
|
|
146
|
+
function compositeToolbarItems({ settings, t }, kinds) {
|
|
147
|
+
const defaultKind = () => compositeKind(kinds, settings.get().blocks.defaultKind);
|
|
148
|
+
const insert = (chain) => chain.insertComposite(defaultKind().id);
|
|
149
|
+
const scope = () => settings.get().editing.headingConversionScope;
|
|
150
|
+
const canGroup = (editor, recursive) => editor.can().convertHeadingsToComposites({
|
|
151
|
+
recursive,
|
|
152
|
+
scope: scope(),
|
|
153
|
+
kind: settings.get().blocks.defaultKind
|
|
154
|
+
});
|
|
155
|
+
const canFlatten = (editor, recursive) => editor.can().convertCompositesToHeadings({
|
|
156
|
+
recursive,
|
|
157
|
+
scope: scope()
|
|
158
|
+
});
|
|
159
|
+
function kindItems(editor) {
|
|
160
|
+
return [{
|
|
161
|
+
type: "label",
|
|
162
|
+
label: t("composites.menu.kindHeading")
|
|
163
|
+
}, ...compositeKindsOf(editor).map((kind) => {
|
|
164
|
+
const target = {
|
|
165
|
+
type: "composite",
|
|
166
|
+
kind: kind.id
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
label: kind.label,
|
|
170
|
+
icon: kind.icon,
|
|
171
|
+
disabled: !editor.can().convertBlockTo(target),
|
|
172
|
+
onSelect: () => editor.chain().focus().convertBlockTo(target).run()
|
|
173
|
+
};
|
|
174
|
+
})];
|
|
175
|
+
}
|
|
176
|
+
function structureItems(editor) {
|
|
177
|
+
const structure = settings.get().blocks.structure;
|
|
178
|
+
const abilities = abilitiesAtSelection(editor);
|
|
179
|
+
const composite = abilities.has(ABILITY.composite);
|
|
180
|
+
const headings = abilities.has(ABILITY.headings);
|
|
181
|
+
const run = (command) => () => void command();
|
|
182
|
+
const sep = { type: "separator" };
|
|
183
|
+
const toComposites = [
|
|
184
|
+
{
|
|
185
|
+
type: "label",
|
|
186
|
+
label: t("composites.menu.toComposites")
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: t("composites.menu.toComposites.top"),
|
|
190
|
+
description: t("composites.menu.toComposites.top.description"),
|
|
191
|
+
icon: "i-lucide-layers",
|
|
192
|
+
disabled: !composite || !canGroup(editor, false),
|
|
193
|
+
onSelect: run(() => editor.chain().focus().convertHeadingsToComposites({
|
|
194
|
+
recursive: false,
|
|
195
|
+
scope: scope(),
|
|
196
|
+
kind: settings.get().blocks.defaultKind
|
|
197
|
+
}).run())
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
label: t("composites.menu.toComposites.all"),
|
|
201
|
+
description: t("composites.menu.toComposites.all.description"),
|
|
202
|
+
icon: "i-lucide-list-tree",
|
|
203
|
+
disabled: !composite || !canGroup(editor, true),
|
|
204
|
+
onSelect: run(() => editor.chain().focus().convertHeadingsToComposites({
|
|
205
|
+
recursive: true,
|
|
206
|
+
scope: scope(),
|
|
207
|
+
kind: settings.get().blocks.defaultKind
|
|
208
|
+
}).run())
|
|
209
|
+
}
|
|
210
|
+
];
|
|
211
|
+
const toHeadings = [
|
|
212
|
+
{
|
|
213
|
+
type: "label",
|
|
214
|
+
label: t("composites.menu.toHeadings")
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: t("composites.menu.toHeadings.top"),
|
|
218
|
+
description: t("composites.menu.toHeadings.top.description"),
|
|
219
|
+
icon: "i-lucide-heading",
|
|
220
|
+
disabled: !headings || !canFlatten(editor, false),
|
|
221
|
+
onSelect: run(() => editor.chain().focus().convertCompositesToHeadings({
|
|
222
|
+
recursive: false,
|
|
223
|
+
scope: scope()
|
|
224
|
+
}).run())
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: t("composites.menu.toHeadings.all"),
|
|
228
|
+
description: t("composites.menu.toHeadings.all.description"),
|
|
229
|
+
icon: "i-lucide-align-left",
|
|
230
|
+
disabled: !headings || !canFlatten(editor, true),
|
|
231
|
+
onSelect: run(() => editor.chain().focus().convertCompositesToHeadings({
|
|
232
|
+
recursive: true,
|
|
233
|
+
scope: scope()
|
|
234
|
+
}).run())
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
const entry = editorEntryOf(editor);
|
|
238
|
+
const settingsEntry = entry && settingsTabsOf(entry.preset, entry.ctx.app).length ? [sep, {
|
|
239
|
+
label: t("composites.menu.settings"),
|
|
240
|
+
icon: "i-lucide-settings-2",
|
|
241
|
+
onSelect: () => entry.ui.openSettings("editing")
|
|
242
|
+
}] : [];
|
|
243
|
+
return [
|
|
244
|
+
{
|
|
245
|
+
type: "label",
|
|
246
|
+
label: t("composites.menu.preferred", { mode: t(STRUCTURE_MODE_KEYS[structure].labelKey) })
|
|
247
|
+
},
|
|
248
|
+
...structure === "composite" ? [
|
|
249
|
+
...toComposites,
|
|
250
|
+
sep,
|
|
251
|
+
...toHeadings
|
|
252
|
+
] : [
|
|
253
|
+
...toHeadings,
|
|
254
|
+
sep,
|
|
255
|
+
...toComposites
|
|
256
|
+
],
|
|
257
|
+
...settingsEntry
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
return [
|
|
261
|
+
{
|
|
262
|
+
id: "insert",
|
|
263
|
+
order: 10,
|
|
264
|
+
get icon() {
|
|
265
|
+
return defaultKind().icon;
|
|
266
|
+
},
|
|
267
|
+
get label() {
|
|
268
|
+
return defaultKind().label;
|
|
269
|
+
},
|
|
270
|
+
get kbds() {
|
|
271
|
+
return defaultKind().id === "section" ? [
|
|
272
|
+
"meta",
|
|
273
|
+
"shift",
|
|
274
|
+
"a"
|
|
275
|
+
] : void 0;
|
|
276
|
+
},
|
|
277
|
+
ability: ABILITY.composite,
|
|
278
|
+
disabled: (editor) => !insert(editor.can().chain()).run(),
|
|
279
|
+
run: (editor) => {
|
|
280
|
+
insert(editor.chain().focus()).run();
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
id: "to-kind",
|
|
285
|
+
order: 20,
|
|
286
|
+
icon: "i-lucide-replace",
|
|
287
|
+
label: t("composites.toolbar.toKind"),
|
|
288
|
+
ability: ABILITY.composite,
|
|
289
|
+
disabled: (editor) => kindItems(editor).every((item) => item.type === "label" || item.disabled),
|
|
290
|
+
menu: kindItems
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: "structure",
|
|
294
|
+
order: 30,
|
|
295
|
+
icon: "i-lucide-list-tree",
|
|
296
|
+
label: t("composites.toolbar.structure"),
|
|
297
|
+
disabled: (editor) => !canGroup(editor, true) && !canFlatten(editor, true),
|
|
298
|
+
menu: structureItems
|
|
299
|
+
}
|
|
300
|
+
];
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
303
|
+
export { compositeFeatureCore };
|
|
304
|
+
|
|
305
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","names":[],"sources":["../../../src/features/composites/feature.ts"],"sourcesContent":["import type { ChainedCommands, Editor } from '@tiptap/core'\nimport type { EditorFeature, FeatureContext, MenuItem, SlashCommandItem, ToolbarItem } from '../../core'\nimport { abilitiesAtSelection, downloadText, editorEntryOf, settingsTabsOf } from '../../core'\nimport type { Translate } from '../../i18n'\nimport { ABILITY } from '../../core/schema'\nimport { compositeConversions } from './convert'\nimport { blocksFromMarkdown } from './fences'\nimport { structureBlocks } from './heading-composites'\nimport { type CompositeKind, compositeKind, defaultCompositeKinds } from './kinds'\nimport { migrateLegacyContent } from './legacy'\nimport { documentCompositeMarkdown, markdownFileName } from './markdown-export'\nimport { type CompositeNodeViews, compositeNodes } from './node-views'\nimport { CompositeDescriptionNode, CompositeTitleNode, compositeKindsOf } from './nodes'\nimport { Structure, structureOf } from './structure'\nimport { STRUCTURE_MODE_KEYS } from './structure-mode'\n\n/** What a framework binding supplies to the composites feature. */\nexport interface CompositesUi<C> {\n /** The chips on each title line and the details popover on the kind icon; mounted as an overlay. */\n chrome: C\n /** The „Bearbeiten“ settings tab; receives `{ kinds }` as props. */\n settingsTab: C\n /** The composite block view of the framework. */\n nodeViews: CompositeNodeViews\n}\n\n/** Options of `compositeFeature`. */\nexport interface CompositeFeatureOptions {\n /** The composite kinds („Bausteine“) offered in the editor, with their own labels (default: `defaultCompositeKinds(t)`, the built-in kinds in the editor's language); read once. */\n kinds?: readonly CompositeKind[]\n}\n\n/** Heading level the structure stage starts at when it turns composites into headings (below the document title). */\nconst STRUCTURE_STAGE_LEVEL = 2\n\n/**\n * Composites („Bausteine“): the node family with its node views, the toolbar group (insert, „In Baustein umwandeln“,\n * „Gliederung umwandeln“), `/` commands, the conversion providers (wrap into / switch kind of / unwrap composites),\n * Markdown `:::` fences, legacy `section` migration, the preferred-structure setting and its `editing` settings tab,\n * the chips on each title line (status, tags) and the details popover on the kind icon (the binding's `chrome` overlay), and\n * the AI view of kinds and structure. Contributes the `parseMarkdown`,\n * `structure` and `migrateContent` stages. Imports no AI, media or transcript code.\n */\nexport function compositeFeatureCore<C>(ui: CompositesUi<C>, options: CompositeFeatureOptions = {}): EditorFeature<C> {\n // Host kinds keep their labels; the built-in ones are produced from the context's translator (memoized per `t`).\n const kindsOf = (ctx: { t: Translate }) => options.kinds ?? defaultCompositeKinds(ctx.t)\n const { Composite, CompositeTags } = compositeNodes(ui.nodeViews)\n return {\n id: 'composites',\n extensions: ctx => [\n Composite.configure({ kinds: kindsOf(ctx) }),\n CompositeTitleNode,\n CompositeDescriptionNode,\n CompositeTags,\n Structure.configure({ mode: () => ctx.settings.get().blocks.structure }),\n ],\n toolbar: ctx => [{\n id: 'composites',\n order: 60,\n items: compositeToolbarItems(ctx, kindsOf(ctx)),\n }],\n slashCommands: ctx => compositeSlashCommands(ctx, kindsOf(ctx)),\n blockActions: ctx => [{\n id: 'document-export',\n label: ctx.t('composites.blockAction.export'),\n icon: 'i-lucide-download',\n ability: ABILITY.compositeExport,\n order: 400,\n isVisible: ({ node }) => node.attrs.kind === 'document',\n run: ({ editor, node }) => downloadText(markdownFileName(node), documentCompositeMarkdown(editor, node)),\n }],\n overlays: [ui.chrome],\n settingsTabs: ctx => [{ id: 'editing', label: ctx.t('composites.tab'), icon: 'i-lucide-pencil', component: ui.settingsTab, props: { kinds: kindsOf(ctx) } }],\n blocks: {\n parseMarkdown: (editor, markdown) => blocksFromMarkdown(md => editor.markdown!.parse(md), markdown, compositeKindsOf(editor)),\n structure: (editor, blocks) => {\n const { schema } = editor\n return structureBlocks(schema, blocks.map(block => schema.nodeFromJSON(block)), structureOf(editor), STRUCTURE_STAGE_LEVEL, compositeKindsOf(editor)).map(node => node.toJSON())\n },\n migrateContent: migrateLegacyContent,\n },\n conversions: compositeConversions(options.kinds),\n aiContext: editor => ({\n kinds: compositeKindsOf(editor).map(({ id, label, fields, ai }) => ({ id, label, fields, ...(ai?.purpose && { purpose: ai.purpose }) })),\n structure: structureOf(editor),\n }),\n }\n}\n\nfunction compositeSlashCommands({ settings, t }: FeatureContext, kinds: readonly CompositeKind[]): SlashCommandItem[] {\n const insert = (kind: string) => (editor: Editor) => editor.commands.insertComposite(kind)\n const group = (recursive: boolean) => (editor: Editor) => {\n const { editing, blocks } = settings.get()\n return editor.commands.convertHeadingsToComposites({ recursive, scope: editing.headingConversionScope, kind: blocks.defaultKind })\n }\n const flatten = (recursive: boolean) => (editor: Editor) => editor.commands.convertCompositesToHeadings({ recursive, scope: settings.get().editing.headingConversionScope })\n return [\n { id: 'abschnitt', label: t('composites.slash.section'), icon: 'i-lucide-layers', ability: ABILITY.composite, run: insert('section') },\n ...kinds.filter(kind => kind.id !== 'section').map((kind): SlashCommandItem => (\n { id: kind.id, label: kind.label, icon: kind.icon, ability: ABILITY.composite, run: insert(kind.id) }\n )),\n { id: 'gliedern', label: t('composites.slash.group'), icon: 'i-lucide-layers', ability: ABILITY.composite, run: group(false) },\n { id: 'gliedern-alle', label: t('composites.slash.groupAll'), icon: 'i-lucide-list-tree', ability: ABILITY.composite, run: group(true) },\n { id: 'aufloesen', label: t('composites.slash.flatten'), icon: 'i-lucide-heading', ability: ABILITY.headings, run: flatten(false) },\n { id: 'aufloesen-alle', label: t('composites.slash.flattenAll'), icon: 'i-lucide-align-left', ability: ABILITY.headings, run: flatten(true) },\n ]\n}\n\n/**\n * The toolbar group beside the inserts: the default kind's insert button (it follows the setting, so label/icon/shortcut\n * are getters read at render time), „In Baustein umwandeln“ (one entry per kind for the caret's block) and „Gliederung\n * umwandeln“ (headings <-> composites in both directions, the preferred structure's direction first).\n */\nfunction compositeToolbarItems<C>({ settings, t }: FeatureContext, kinds: readonly CompositeKind[]): ToolbarItem<C>[] {\n const defaultKind = () => compositeKind(kinds, settings.get().blocks.defaultKind)\n const insert = (chain: ChainedCommands) => chain.insertComposite(defaultKind().id)\n const scope = () => settings.get().editing.headingConversionScope\n\n const canGroup = (editor: Editor, recursive: boolean) => editor.can().convertHeadingsToComposites({ recursive, scope: scope(), kind: settings.get().blocks.defaultKind })\n const canFlatten = (editor: Editor, recursive: boolean) => editor.can().convertCompositesToHeadings({ recursive, scope: scope() })\n\n function kindItems(editor: Editor): MenuItem[] {\n return [\n { type: 'label', label: t('composites.menu.kindHeading') },\n ...compositeKindsOf(editor).map((kind): MenuItem => {\n const target = { type: 'composite', kind: kind.id } as const\n return { label: kind.label, icon: kind.icon, disabled: !editor.can().convertBlockTo(target), onSelect: () => editor.chain().focus().convertBlockTo(target).run() }\n }),\n ]\n }\n\n function structureItems(editor: Editor): MenuItem[] {\n const structure = settings.get().blocks.structure\n const abilities = abilitiesAtSelection(editor)\n const composite = abilities.has(ABILITY.composite)\n const headings = abilities.has(ABILITY.headings)\n const run = (command: () => boolean) => () => void command()\n const sep: MenuItem = { type: 'separator' }\n const toComposites: MenuItem[] = [\n { type: 'label', label: t('composites.menu.toComposites') },\n { label: t('composites.menu.toComposites.top'), description: t('composites.menu.toComposites.top.description'), icon: 'i-lucide-layers', disabled: !composite || !canGroup(editor, false), onSelect: run(() => editor.chain().focus().convertHeadingsToComposites({ recursive: false, scope: scope(), kind: settings.get().blocks.defaultKind }).run()) },\n { label: t('composites.menu.toComposites.all'), description: t('composites.menu.toComposites.all.description'), icon: 'i-lucide-list-tree', disabled: !composite || !canGroup(editor, true), onSelect: run(() => editor.chain().focus().convertHeadingsToComposites({ recursive: true, scope: scope(), kind: settings.get().blocks.defaultKind }).run()) },\n ]\n const toHeadings: MenuItem[] = [\n { type: 'label', label: t('composites.menu.toHeadings') },\n { label: t('composites.menu.toHeadings.top'), description: t('composites.menu.toHeadings.top.description'), icon: 'i-lucide-heading', disabled: !headings || !canFlatten(editor, false), onSelect: run(() => editor.chain().focus().convertCompositesToHeadings({ recursive: false, scope: scope() }).run()) },\n { label: t('composites.menu.toHeadings.all'), description: t('composites.menu.toHeadings.all.description'), icon: 'i-lucide-align-left', disabled: !headings || !canFlatten(editor, true), onSelect: run(() => editor.chain().focus().convertCompositesToHeadings({ recursive: true, scope: scope() }).run()) },\n ]\n const entry = editorEntryOf(editor)\n // The settings entry exists only while some feature contributes a tab to open.\n const settingsEntry: MenuItem[] = entry && settingsTabsOf(entry.preset, entry.ctx.app).length\n ? [sep, { label: t('composites.menu.settings'), icon: 'i-lucide-settings-2', onSelect: () => entry.ui.openSettings('editing') }]\n : []\n return [\n { type: 'label', label: t('composites.menu.preferred', { mode: t(STRUCTURE_MODE_KEYS[structure].labelKey) }) },\n ...(structure === 'composite' ? [...toComposites, sep, ...toHeadings] : [...toHeadings, sep, ...toComposites]),\n ...settingsEntry,\n ]\n }\n\n return [\n {\n id: 'insert',\n order: 10,\n // Getters: the default kind arrives with the server settings; the toolbar reads them at render time.\n get icon() { return defaultKind().icon },\n get label() { return defaultKind().label },\n // Mod-Shift-a (CompositeNode) always inserts a `section`, so only then is it shown as the shortcut.\n get kbds() { return defaultKind().id === 'section' ? ['meta', 'shift', 'a'] : undefined },\n ability: ABILITY.composite,\n disabled: editor => !insert(editor.can().chain()).run(),\n run: (editor) => { insert(editor.chain().focus()).run() },\n },\n {\n id: 'to-kind',\n order: 20,\n icon: 'i-lucide-replace',\n label: t('composites.toolbar.toKind'),\n ability: ABILITY.composite,\n disabled: editor => kindItems(editor).every(item => item.type === 'label' || item.disabled),\n menu: kindItems,\n },\n {\n id: 'structure',\n order: 30,\n icon: 'i-lucide-list-tree',\n label: t('composites.toolbar.structure'),\n disabled: editor => !canGroup(editor, true) && !canFlatten(editor, true),\n menu: structureItems,\n },\n ]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,wBAAwB;;;;;;;;;AAU9B,SAAgB,qBAAwB,IAAqB,UAAmC,CAAC,GAAqB;CAEpH,MAAM,WAAW,QAA0B,QAAQ,SAAS,sBAAsB,IAAI,CAAC;CACvF,MAAM,EAAE,WAAW,kBAAkB,eAAe,GAAG,SAAS;CAChE,OAAO;EACL,IAAI;EACJ,aAAY,QAAO;GACjB,UAAU,UAAU,EAAE,OAAO,QAAQ,GAAG,EAAE,CAAC;GAC3C;GACA;GACA;GACA,UAAU,UAAU,EAAE,YAAY,IAAI,SAAS,IAAI,CAAC,CAAC,OAAO,UAAU,CAAC;EACzE;EACA,UAAS,QAAO,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ences } from "../../core/fences.js";
|
|
3
|
+
import { JSONContent } from "@tiptap/core";
|
|
4
|
+
//#region src/features/composites/fences.d.ts
|
|
5
|
+
/** `inner` fenced as composite of `kind`: `::: kind {meta}` (meta JSON only when non-empty), `inner`, `:::`. */
|
|
6
|
+
export declare function compositeFence(kind: string, meta: Record<string, unknown>, inner: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Markdown segments parsed, fences of a registered kind turned into composites, in order. A fence of any other kind
|
|
9
|
+
* becomes an `opaqueFence` that keeps its text verbatim.
|
|
10
|
+
*/
|
|
11
|
+
export declare function blocksFromMarkdown(parse: (md: string) => JSONContent, markdown: string, kinds: readonly CompositeKind[]): JSONContent[];
|
|
12
|
+
/**
|
|
13
|
+
* JSON of a composite built from the fence body: first `#`-heading → title, first blockquote directly after →
|
|
14
|
+
* description, a `Tags:` line → tags, rest → body (recursing for nested fences). Missing title → empty title; empty
|
|
15
|
+
* body → [paragraph]. Meta of a known kind keeps only that kind's fields.
|
|
16
|
+
*/
|
|
17
|
+
export declare function compositeFromMarkdown(parse: (md: string) => JSONContent, fence: CompositeFence, kinds: readonly CompositeKind[]): JSONContent;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { type CompositeFence, type FenceSegment, splitCompositeFences };
|
|
20
|
+
//# sourceMappingURL=fences.d.ts.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { opaqueFenceJSON, splitCompositeFences } from "../../core/fences.js";
|
|
2
|
+
//#region src/features/composites/fences.ts
|
|
3
|
+
/** `inner` fenced as composite of `kind`: `::: kind {meta}` (meta JSON only when non-empty), `inner`, `:::`. */
|
|
4
|
+
function compositeFence(kind, meta, inner) {
|
|
5
|
+
return `${Object.keys(meta).length ? `::: ${kind} ${JSON.stringify(meta)}` : `::: ${kind}`}\n${inner}\n:::`;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Markdown segments parsed, fences of a registered kind turned into composites, in order. A fence of any other kind
|
|
9
|
+
* becomes an `opaqueFence` that keeps its text verbatim.
|
|
10
|
+
*/
|
|
11
|
+
function blocksFromMarkdown(parse, markdown, kinds) {
|
|
12
|
+
return splitCompositeFences(markdown).flatMap((segment) => {
|
|
13
|
+
if (!("inner" in segment)) return parse(segment.markdown).content ?? [];
|
|
14
|
+
return kinds.some((kind) => kind.id === segment.kind) ? [compositeFromMarkdown(parse, segment, kinds)] : [opaqueFenceJSON(segment)];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/** Inline content of the first textblock `parse` makes of `md`. */
|
|
18
|
+
function inlineOf(parse, md) {
|
|
19
|
+
let found;
|
|
20
|
+
const walk = (node) => {
|
|
21
|
+
if (found) return;
|
|
22
|
+
if (node.content?.some((child) => child.type === "text")) found = node.content;
|
|
23
|
+
else node.content?.forEach(walk);
|
|
24
|
+
};
|
|
25
|
+
if (md.trim()) walk(parse(md));
|
|
26
|
+
return found?.length ? found : void 0;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* JSON of a composite built from the fence body: first `#`-heading → title, first blockquote directly after →
|
|
30
|
+
* description, a `Tags:` line → tags, rest → body (recursing for nested fences). Missing title → empty title; empty
|
|
31
|
+
* body → [paragraph]. Meta of a known kind keeps only that kind's fields.
|
|
32
|
+
*/
|
|
33
|
+
function compositeFromMarkdown(parse, fence, kinds) {
|
|
34
|
+
const lines = fence.inner.split("\n");
|
|
35
|
+
let i = 0;
|
|
36
|
+
const skipBlank = () => {
|
|
37
|
+
while (i < lines.length && !lines[i].trim()) i++;
|
|
38
|
+
};
|
|
39
|
+
skipBlank();
|
|
40
|
+
let title;
|
|
41
|
+
const heading = /^\s*#{1,6}(?:\s+(.*?))?\s*#*\s*$/.exec(lines[i] ?? "");
|
|
42
|
+
if (heading) {
|
|
43
|
+
title = inlineOf(parse, heading[1] ?? "");
|
|
44
|
+
i++;
|
|
45
|
+
skipBlank();
|
|
46
|
+
}
|
|
47
|
+
const quote = [];
|
|
48
|
+
while (i < lines.length && /^\s*>/.test(lines[i])) quote.push(lines[i++].replace(/^\s*>\s?/, ""));
|
|
49
|
+
const description = quote.length ? inlineOf(parse, quote.join("\n")) : void 0;
|
|
50
|
+
skipBlank();
|
|
51
|
+
let tags = [];
|
|
52
|
+
const tagLine = /^\s*Tags:\s*(.*)$/i.exec(lines[i] ?? "");
|
|
53
|
+
if (tagLine) {
|
|
54
|
+
tags = [...new Set([...tagLine[1].matchAll(/#?([\p{L}\p{N}_-]+)/gu)].map((m) => m[1].toLowerCase()))];
|
|
55
|
+
i++;
|
|
56
|
+
}
|
|
57
|
+
const body = blocksFromMarkdown(parse, lines.slice(i).join("\n"), kinds);
|
|
58
|
+
const fields = kinds.find((kind) => kind.id === fence.kind)?.fields.map((field) => field.key);
|
|
59
|
+
const meta = fields ? Object.fromEntries(Object.entries(fence.meta).filter(([key]) => fields.includes(key))) : fence.meta;
|
|
60
|
+
return {
|
|
61
|
+
type: "composite",
|
|
62
|
+
attrs: {
|
|
63
|
+
kind: fence.kind,
|
|
64
|
+
meta
|
|
65
|
+
},
|
|
66
|
+
content: [
|
|
67
|
+
title ? {
|
|
68
|
+
type: "compositeTitle",
|
|
69
|
+
content: title
|
|
70
|
+
} : { type: "compositeTitle" },
|
|
71
|
+
description ? {
|
|
72
|
+
type: "compositeDescription",
|
|
73
|
+
content: description
|
|
74
|
+
} : { type: "compositeDescription" },
|
|
75
|
+
{
|
|
76
|
+
type: "compositeTags",
|
|
77
|
+
attrs: { tags }
|
|
78
|
+
},
|
|
79
|
+
...body.length ? body : [{ type: "paragraph" }]
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { blocksFromMarkdown, compositeFence, compositeFromMarkdown, splitCompositeFences };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=fences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fences.js","names":[],"sources":["../../../src/features/composites/fences.ts"],"sourcesContent":["import type { JSONContent } from '@tiptap/core'\nimport { type CompositeFence, opaqueFenceJSON, splitCompositeFences } from '../../core/fences'\nimport type { CompositeKind } from './kinds'\n\n// Inverse of the composite nodes' renderMarkdown: `::: kind {meta}`, `## title`, `> description`, `Tags: #a #b`, body,\n// `:::`. The fence grammar itself (`splitCompositeFences`) is shared with the Markdown entry (`core/fences`).\nexport { type CompositeFence, type FenceSegment, splitCompositeFences } from '../../core/fences'\n\n/** `inner` fenced as composite of `kind`: `::: kind {meta}` (meta JSON only when non-empty), `inner`, `:::`. */\nexport function compositeFence(kind: string, meta: Record<string, unknown>, inner: string): string {\n const opener = Object.keys(meta).length ? `::: ${kind} ${JSON.stringify(meta)}` : `::: ${kind}`\n return `${opener}\\n${inner}\\n:::`\n}\n\n/**\n * Markdown segments parsed, fences of a registered kind turned into composites, in order. A fence of any other kind\n * becomes an `opaqueFence` that keeps its text verbatim.\n */\nexport function blocksFromMarkdown(parse: (md: string) => JSONContent, markdown: string, kinds: readonly CompositeKind[]): JSONContent[] {\n return splitCompositeFences(markdown).flatMap((segment) => {\n if (!('inner' in segment)) return parse(segment.markdown).content ?? []\n return kinds.some(kind => kind.id === segment.kind) ? [compositeFromMarkdown(parse, segment, kinds)] : [opaqueFenceJSON(segment)]\n })\n}\n\n/** Inline content of the first textblock `parse` makes of `md`. */\nfunction inlineOf(parse: (md: string) => JSONContent, md: string): JSONContent[] | undefined {\n let found: JSONContent[] | undefined\n const walk = (node: JSONContent): void => {\n if (found) return\n if (node.content?.some(child => child.type === 'text')) found = node.content\n else node.content?.forEach(walk)\n }\n if (md.trim()) walk(parse(md))\n return found?.length ? found : undefined\n}\n\n/**\n * JSON of a composite built from the fence body: first `#`-heading → title, first blockquote directly after →\n * description, a `Tags:` line → tags, rest → body (recursing for nested fences). Missing title → empty title; empty\n * body → [paragraph]. Meta of a known kind keeps only that kind's fields.\n */\nexport function compositeFromMarkdown(parse: (md: string) => JSONContent, fence: CompositeFence, kinds: readonly CompositeKind[]): JSONContent {\n const lines = fence.inner.split('\\n')\n let i = 0\n const skipBlank = () => {\n while (i < lines.length && !lines[i]!.trim()) i++\n }\n skipBlank()\n let title: JSONContent[] | undefined\n const heading = /^\\s*#{1,6}(?:\\s+(.*?))?\\s*#*\\s*$/.exec(lines[i] ?? '')\n if (heading) {\n title = inlineOf(parse, heading[1] ?? '')\n i++\n skipBlank()\n }\n const quote: string[] = []\n while (i < lines.length && /^\\s*>/.test(lines[i]!)) quote.push(lines[i++]!.replace(/^\\s*>\\s?/, ''))\n const description = quote.length ? inlineOf(parse, quote.join('\\n')) : undefined\n skipBlank()\n let tags: string[] = []\n const tagLine = /^\\s*Tags:\\s*(.*)$/i.exec(lines[i] ?? '')\n if (tagLine) {\n tags = [...new Set([...tagLine[1]!.matchAll(/#?([\\p{L}\\p{N}_-]+)/gu)].map(m => m[1]!.toLowerCase()))]\n i++\n }\n const body = blocksFromMarkdown(parse, lines.slice(i).join('\\n'), kinds)\n\n // A kind outside `kinds` (only reachable when called directly; `blocksFromMarkdown` makes those fences opaque) keeps its id (the views fall back via `compositeKind()`) and its meta as given.\n const fields = kinds.find(kind => kind.id === fence.kind)?.fields.map(field => field.key)\n const meta = fields ? Object.fromEntries(Object.entries(fence.meta).filter(([key]) => fields.includes(key))) : fence.meta\n return {\n type: 'composite',\n attrs: { kind: fence.kind, meta },\n content: [\n title ? { type: 'compositeTitle', content: title } : { type: 'compositeTitle' },\n description ? { type: 'compositeDescription', content: description } : { type: 'compositeDescription' },\n { type: 'compositeTags', attrs: { tags } },\n ...(body.length ? body : [{ type: 'paragraph' }]),\n ],\n }\n}\n"],"mappings":";;;AASA,SAAgB,eAAe,MAAc,MAA+B,OAAuB;CAEjG,OAAO,GADQ,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,OAAO,KAAK,GAAG,KAAK,UAAU,IAAI,MAAM,OAAO,OACxE,IAAI,MAAM;AAC7B;;;;;AAMA,SAAgB,mBAAmB,OAAoC,UAAkB,OAAgD;CACvI,OAAO,qBAAqB,QAAQ,CAAC,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ACX,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,QAAQ,EAAE,CAAE,SAAS,uBAAuB,CAAC,CAAC,CAAC,KAAI,MAAK,EAAE,EAAE,CAAE,YAAY,CAAC,CAAC,CAAC;EACpG;CACF;CACA,MAAM,OAAO,mBAAmB,OAAO,MAAM,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,KAAK;CAGvE,MAAM,SAAS,MAAM,MAAK,SAAQ,KAAK,OAAO,MAAM,IAAI,CAAC,EAAE,OAAO,KAAI,UAAS,MAAM,GAAG;CACxF,MAAM,OAAO,SAAS,OAAO,YAAY,OAAO,QAAQ,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,OAAO,SAAS,GAAG,CAAC,CAAC,IAAI,MAAM;CACrH,OAAO;EACL,MAAM;EACN,OAAO;GAAE,MAAM,MAAM;GAAM;EAAK;EAChC,SAAS;GACP,QAAQ;IAAE,MAAM;IAAkB,SAAS;GAAM,IAAI,EAAE,MAAM,iBAAiB;GAC9E,cAAc;IAAE,MAAM;IAAwB,SAAS;GAAY,IAAI,EAAE,MAAM,uBAAuB;GACtG;IAAE,MAAM;IAAiB,OAAO,EAAE,KAAK;GAAE;GACzC,GAAI,KAAK,SAAS,OAAO,CAAC,EAAE,MAAM,YAAY,CAAC;EACjD;CACF;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StructureMode } from "../../settings/values.js";
|
|
2
|
+
import "../../settings/index.js";
|
|
3
|
+
import { CompositeKind } from "./kinds.js";
|
|
4
|
+
import { Node, Schema } from "@tiptap/pm/model";
|
|
5
|
+
//#region src/features/composites/heading-composites.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* `blocks` (siblings) with headings grouped into composites of `kind`. Flat: only headings of the lowest level present
|
|
8
|
+
* become composites; everything before the first such heading is kept. Recursive: bodies, the part before the first
|
|
9
|
+
* heading and the bodies of existing composites are grouped the same way. `null` when nothing changed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function groupHeadingsIntoComposites(schema: Schema, blocks: readonly Node[], recursive: boolean, kind: string): Node[] | null;
|
|
12
|
+
/** Index range `[from, to)` of the heading at `index` in `parent` plus its content: up to the next sibling heading of the same or a higher level. */
|
|
13
|
+
export declare function headingGroupRange(parent: Node, index: number): {
|
|
14
|
+
from: number;
|
|
15
|
+
to: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Description, tags and meta of `composite` as plain paragraphs, in this order, each only when non-empty: the
|
|
19
|
+
* description italic, the tags as tag chips (`#name` text without a `tag` node), the meta as one `Label: Wert · …` line
|
|
20
|
+
* (labels and option labels from the composite's kind in `kinds`; raw keys and values for an unknown kind).
|
|
21
|
+
*/
|
|
22
|
+
export declare function compositeChromeBlocks(schema: Schema, composite: Node, kinds: readonly CompositeKind[]): Node[];
|
|
23
|
+
/**
|
|
24
|
+
* Inverse of `groupHeadingsIntoComposites`: every composite in `blocks` (siblings) becomes a heading of `level` (max 6)
|
|
25
|
+
* with its title, then its chrome (`compositeChromeBlocks`), then its body (dropped when it is one empty paragraph).
|
|
26
|
+
* Recursive: nested composites in bodies become headings of `level + 1` and so on; flat: they stay. `null` when
|
|
27
|
+
* `blocks` holds no composite. Created blocks carry no id; carried-over body blocks keep theirs.
|
|
28
|
+
*/
|
|
29
|
+
export declare function flattenCompositesToHeadings(schema: Schema, blocks: readonly Node[], recursive: boolean, level: number, kinds: readonly CompositeKind[]): Node[] | null;
|
|
30
|
+
/**
|
|
31
|
+
* `blocks` (siblings) in the preferred `structure`: `'composite'` groups headings into `section` composites at every
|
|
32
|
+
* level, `'flat'` turns composites into headings starting at `level`. Unchanged blocks come back as a copy of the array.
|
|
33
|
+
*/
|
|
34
|
+
export declare function structureBlocks(schema: Schema, blocks: readonly Node[], structure: StructureMode, level: number, kinds: readonly CompositeKind[]): Node[];
|
|
35
|
+
//#endregion
|
|
36
|
+
//# sourceMappingURL=heading-composites.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { compositeKind } from "./kinds.js";
|
|
2
|
+
import { Fragment } from "@tiptap/pm/model";
|
|
3
|
+
//#region src/features/composites/heading-composites.ts
|
|
4
|
+
const HEADING = "heading";
|
|
5
|
+
const COMPOSITE = "composite";
|
|
6
|
+
const TITLE = "compositeTitle";
|
|
7
|
+
const DESCRIPTION = "compositeDescription";
|
|
8
|
+
const TAGS = "compositeTags";
|
|
9
|
+
const PARAGRAPH = "paragraph";
|
|
10
|
+
/** Title, description and tags: the fixed children in front of a composite's body. */
|
|
11
|
+
const CHROME_COUNT = 3;
|
|
12
|
+
const isHeading = (node) => node.type.name === HEADING;
|
|
13
|
+
const levelOf = (node) => node.attrs.level;
|
|
14
|
+
/**
|
|
15
|
+
* `blocks` (siblings) with headings grouped into composites of `kind`. Flat: only headings of the lowest level present
|
|
16
|
+
* become composites; everything before the first such heading is kept. Recursive: bodies, the part before the first
|
|
17
|
+
* heading and the bodies of existing composites are grouped the same way. `null` when nothing changed.
|
|
18
|
+
*/
|
|
19
|
+
function groupHeadingsIntoComposites(schema, blocks, recursive, kind) {
|
|
20
|
+
let changed = false;
|
|
21
|
+
let input = [...blocks];
|
|
22
|
+
if (recursive) input = input.map((block) => {
|
|
23
|
+
if (block.type.name !== COMPOSITE) return block;
|
|
24
|
+
const children = [];
|
|
25
|
+
block.forEach((child) => children.push(child));
|
|
26
|
+
const body = groupHeadingsIntoComposites(schema, children.slice(CHROME_COUNT), true, kind);
|
|
27
|
+
if (!body) return block;
|
|
28
|
+
changed = true;
|
|
29
|
+
return block.copy(Fragment.from([...children.slice(0, CHROME_COUNT), ...body]));
|
|
30
|
+
});
|
|
31
|
+
let minLevel = Infinity;
|
|
32
|
+
for (const block of input) if (isHeading(block)) minLevel = Math.min(minLevel, levelOf(block));
|
|
33
|
+
if (minLevel === Infinity) return changed ? input : null;
|
|
34
|
+
const { nodes } = schema;
|
|
35
|
+
let preamble = [];
|
|
36
|
+
const groups = [];
|
|
37
|
+
for (const block of input) if (isHeading(block) && levelOf(block) <= minLevel) groups.push({
|
|
38
|
+
heading: block,
|
|
39
|
+
body: []
|
|
40
|
+
});
|
|
41
|
+
else if (groups.length) groups[groups.length - 1].body.push(block);
|
|
42
|
+
else preamble.push(block);
|
|
43
|
+
if (recursive) preamble = groupHeadingsIntoComposites(schema, preamble, true, kind) ?? preamble;
|
|
44
|
+
const composites = groups.map(({ heading, body }) => {
|
|
45
|
+
let content = body;
|
|
46
|
+
if (recursive) content = groupHeadingsIntoComposites(schema, content, true, kind) ?? content;
|
|
47
|
+
if (!content.length) content = [nodes[PARAGRAPH].create()];
|
|
48
|
+
return nodes[COMPOSITE].create({ kind }, [
|
|
49
|
+
nodes[TITLE].create(null, heading.content),
|
|
50
|
+
nodes[DESCRIPTION].create(),
|
|
51
|
+
nodes[TAGS].create(),
|
|
52
|
+
...content
|
|
53
|
+
]);
|
|
54
|
+
});
|
|
55
|
+
return [...preamble, ...composites];
|
|
56
|
+
}
|
|
57
|
+
/** Index range `[from, to)` of the heading at `index` in `parent` plus its content: up to the next sibling heading of the same or a higher level. */
|
|
58
|
+
function headingGroupRange(parent, index) {
|
|
59
|
+
const level = levelOf(parent.child(index));
|
|
60
|
+
for (let i = index + 1; i < parent.childCount; i++) {
|
|
61
|
+
const child = parent.child(i);
|
|
62
|
+
if (isHeading(child) && levelOf(child) <= level) return {
|
|
63
|
+
from: index,
|
|
64
|
+
to: i
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
from: index,
|
|
69
|
+
to: parent.childCount
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Description, tags and meta of `composite` as plain paragraphs, in this order, each only when non-empty: the
|
|
74
|
+
* description italic, the tags as tag chips (`#name` text without a `tag` node), the meta as one `Label: Wert · …` line
|
|
75
|
+
* (labels and option labels from the composite's kind in `kinds`; raw keys and values for an unknown kind).
|
|
76
|
+
*/
|
|
77
|
+
function compositeChromeBlocks(schema, composite, kinds) {
|
|
78
|
+
const n = schema.nodes;
|
|
79
|
+
const paragraph = n[PARAGRAPH];
|
|
80
|
+
const description = composite.child(1);
|
|
81
|
+
const tags = composite.child(2).attrs.tags;
|
|
82
|
+
const blocks = [];
|
|
83
|
+
if (description.content.size) {
|
|
84
|
+
const italic = schema.marks.italic;
|
|
85
|
+
const content = [];
|
|
86
|
+
description.forEach((child) => content.push(italic && child.isText ? child.mark(italic.create().addToSet(child.marks)) : child));
|
|
87
|
+
blocks.push(paragraph.create(null, content));
|
|
88
|
+
}
|
|
89
|
+
const names = Array.isArray(tags) ? tags.filter((tag) => typeof tag === "string" && tag !== "") : [];
|
|
90
|
+
if (names.length) {
|
|
91
|
+
const chips = names.flatMap((name, index) => [...index ? [schema.text(" ")] : [], n.tag ? n.tag.create({ name }) : schema.text(`#${name}`)]);
|
|
92
|
+
blocks.push(paragraph.create(null, chips));
|
|
93
|
+
}
|
|
94
|
+
const kind = composite.attrs.kind;
|
|
95
|
+
const fields = kinds.some((known) => known.id === kind) ? compositeKind(kinds, kind).fields : [];
|
|
96
|
+
const meta = composite.attrs.meta ?? {};
|
|
97
|
+
const entries = Object.entries(meta).filter(([, value]) => value !== "" && value !== null && value !== void 0).map(([key, value]) => {
|
|
98
|
+
const field = fields.find((candidate) => candidate.key === key);
|
|
99
|
+
const display = field?.options?.find((option) => option.value === value)?.label ?? String(value);
|
|
100
|
+
return `${field?.label ?? key}: ${display}`;
|
|
101
|
+
});
|
|
102
|
+
if (entries.length) blocks.push(paragraph.create(null, schema.text(entries.join(" · "))));
|
|
103
|
+
return blocks;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Inverse of `groupHeadingsIntoComposites`: every composite in `blocks` (siblings) becomes a heading of `level` (max 6)
|
|
107
|
+
* with its title, then its chrome (`compositeChromeBlocks`), then its body (dropped when it is one empty paragraph).
|
|
108
|
+
* Recursive: nested composites in bodies become headings of `level + 1` and so on; flat: they stay. `null` when
|
|
109
|
+
* `blocks` holds no composite. Created blocks carry no id; carried-over body blocks keep theirs.
|
|
110
|
+
*/
|
|
111
|
+
function flattenCompositesToHeadings(schema, blocks, recursive, level, kinds) {
|
|
112
|
+
if (!blocks.some((block) => block.type.name === COMPOSITE)) return null;
|
|
113
|
+
const heading = schema.nodes[HEADING];
|
|
114
|
+
return blocks.flatMap((block) => {
|
|
115
|
+
if (block.type.name !== COMPOSITE) return [block];
|
|
116
|
+
let body = [];
|
|
117
|
+
block.forEach((child, _offset, index) => {
|
|
118
|
+
if (index >= CHROME_COUNT) body.push(child);
|
|
119
|
+
});
|
|
120
|
+
if (body.length === 1 && body[0].type.name === PARAGRAPH && !body[0].content.size) body = [];
|
|
121
|
+
if (recursive) body = flattenCompositesToHeadings(schema, body, true, level + 1, kinds) ?? body;
|
|
122
|
+
return [
|
|
123
|
+
heading.create({ level: Math.min(level, 6) }, block.child(0).content),
|
|
124
|
+
...compositeChromeBlocks(schema, block, kinds),
|
|
125
|
+
...body
|
|
126
|
+
];
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* `blocks` (siblings) in the preferred `structure`: `'composite'` groups headings into `section` composites at every
|
|
131
|
+
* level, `'flat'` turns composites into headings starting at `level`. Unchanged blocks come back as a copy of the array.
|
|
132
|
+
*/
|
|
133
|
+
function structureBlocks(schema, blocks, structure, level, kinds) {
|
|
134
|
+
if (structure === "composite") return groupHeadingsIntoComposites(schema, blocks, true, "section") ?? [...blocks];
|
|
135
|
+
return flattenCompositesToHeadings(schema, blocks, true, level, kinds) ?? [...blocks];
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { compositeChromeBlocks, flattenCompositesToHeadings, groupHeadingsIntoComposites, headingGroupRange, structureBlocks };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=heading-composites.js.map
|