@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,164 @@
|
|
|
1
|
+
import { TYPE_ABILITIES } from "./schema/abilities.js";
|
|
2
|
+
import { abilitiesAt } from "./abilities.js";
|
|
3
|
+
import { isBlockContainer, isChromeNode } from "./schema/node-flags.js";
|
|
4
|
+
import { convertCoreBlocks, convertTargetId, coreConversionTargets, isCoreTarget, parseCoreTarget } from "./convert.js";
|
|
5
|
+
import { conversionsOf } from "./pipeline.js";
|
|
6
|
+
import { Extension } from "@tiptap/core";
|
|
7
|
+
import { Selection } from "@tiptap/pm/state";
|
|
8
|
+
import { Fragment } from "@tiptap/pm/model";
|
|
9
|
+
//#region src/core/block-convert.ts
|
|
10
|
+
const CORE_LABELS = {
|
|
11
|
+
paragraph: {
|
|
12
|
+
key: "block.paragraph",
|
|
13
|
+
icon: "i-lucide-pilcrow"
|
|
14
|
+
},
|
|
15
|
+
bulletList: {
|
|
16
|
+
key: "block.bulletList",
|
|
17
|
+
icon: "i-lucide-list"
|
|
18
|
+
},
|
|
19
|
+
orderedList: {
|
|
20
|
+
key: "block.orderedList",
|
|
21
|
+
icon: "i-lucide-list-ordered"
|
|
22
|
+
},
|
|
23
|
+
blockquote: {
|
|
24
|
+
key: "block.blockquote",
|
|
25
|
+
icon: "i-lucide-text-quote"
|
|
26
|
+
},
|
|
27
|
+
codeBlock: {
|
|
28
|
+
key: "block.codeBlock",
|
|
29
|
+
icon: "i-lucide-square-code"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The standard conversions: paragraphs, headings, lists, quotes and code blocks into each other. Declines every other
|
|
34
|
+
* target, so features that add targets (speaker segments, composites) own them in their own providers.
|
|
35
|
+
*/
|
|
36
|
+
const coreConversions = {
|
|
37
|
+
targets: (_editor, node) => coreConversionTargets(node),
|
|
38
|
+
parseTarget: parseCoreTarget,
|
|
39
|
+
label: (target, t) => {
|
|
40
|
+
if (target.type === "heading") return {
|
|
41
|
+
label: t("block.heading", { level: target.level }),
|
|
42
|
+
icon: `i-lucide-heading-${target.level}`
|
|
43
|
+
};
|
|
44
|
+
const core = isCoreTarget(target) ? CORE_LABELS[target.type] : void 0;
|
|
45
|
+
return core ? {
|
|
46
|
+
label: t(core.key),
|
|
47
|
+
icon: core.icon
|
|
48
|
+
} : null;
|
|
49
|
+
},
|
|
50
|
+
convert: (state, $start, target) => {
|
|
51
|
+
const node = $start.nodeAfter;
|
|
52
|
+
if (!node) return null;
|
|
53
|
+
const blocks = convertCoreBlocks(state.schema, [node], target);
|
|
54
|
+
return blocks ? {
|
|
55
|
+
from: $start.pos,
|
|
56
|
+
to: $start.pos + node.nodeSize,
|
|
57
|
+
blocks
|
|
58
|
+
} : null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
/** The provider that owns `target`: the first, in feature order, that parses its id. */
|
|
62
|
+
function targetOwner(providers, target) {
|
|
63
|
+
const id = convertTargetId(target);
|
|
64
|
+
return providers.find((provider) => provider.parseTarget(id) !== null);
|
|
65
|
+
}
|
|
66
|
+
/** The target `id` names, by its owner; null when no provider knows it. */
|
|
67
|
+
function parseConversionTarget(providers, id) {
|
|
68
|
+
for (const provider of providers) {
|
|
69
|
+
const target = provider.parseTarget(id);
|
|
70
|
+
if (target) return target;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
/** Label (in the language of `t`) and icon of `target`, from its owner. */
|
|
75
|
+
function conversionLabel(providers, target, t) {
|
|
76
|
+
const label = targetOwner(providers, target)?.label(target, t);
|
|
77
|
+
if (!label) throw new Error(`@ecsplico/editor: no conversion provider owns the target "${convertTargetId(target)}"`);
|
|
78
|
+
return label;
|
|
79
|
+
}
|
|
80
|
+
/** The targets offered for `node` per provider, in feature order; a target id offered twice is an error. */
|
|
81
|
+
function conversionTargetGroups(providers, editor, node) {
|
|
82
|
+
const offered = /* @__PURE__ */ new Set();
|
|
83
|
+
return providers.map((provider) => provider.targets(editor, node).filter((target) => {
|
|
84
|
+
const id = convertTargetId(target);
|
|
85
|
+
if (offered.has(id)) throw new Error(`@ecsplico/editor: the conversion target "${id}" is advertised by more than one provider`);
|
|
86
|
+
offered.add(id);
|
|
87
|
+
return true;
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
/** The `$pos` right in front of the block to convert; a chrome node stands for its parent block. */
|
|
91
|
+
function blockStart(state, pos) {
|
|
92
|
+
let $start;
|
|
93
|
+
if (pos === void 0) {
|
|
94
|
+
const { $head } = state.selection;
|
|
95
|
+
let depth = $head.depth;
|
|
96
|
+
while (depth > 0 && !isBlockContainer($head.node(depth - 1))) depth--;
|
|
97
|
+
if (depth === 0) return null;
|
|
98
|
+
$start = state.doc.resolve($head.before(depth));
|
|
99
|
+
} else {
|
|
100
|
+
if (pos < 0 || pos >= state.doc.content.size) return null;
|
|
101
|
+
$start = state.doc.resolve(pos);
|
|
102
|
+
}
|
|
103
|
+
const node = $start.nodeAfter;
|
|
104
|
+
if (!node) return null;
|
|
105
|
+
return isChromeNode(node) ? state.doc.resolve($start.before()) : $start;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The conversion of the block right after `$start` into `target`: the range it replaces and the converted blocks.
|
|
109
|
+
* A provider claiming the source block (`handlesSource`) executes; otherwise the target's owner does. Null when the
|
|
110
|
+
* conversion changes nothing or the result does not fit there (`parent.canReplace`). Shared by `convertBlockTo` and
|
|
111
|
+
* the chat's `convert` op.
|
|
112
|
+
*/
|
|
113
|
+
function blockConversion(providers, state, $start, target) {
|
|
114
|
+
const node = $start.nodeAfter;
|
|
115
|
+
if (!node) return null;
|
|
116
|
+
const conversion = (providers.find((candidate) => candidate.handlesSource?.(node)) ?? targetOwner(providers, target))?.convert(state, $start, target);
|
|
117
|
+
if (!conversion) return null;
|
|
118
|
+
const parent = $start.parent;
|
|
119
|
+
const $end = state.doc.resolve(conversion.to);
|
|
120
|
+
if ($end.parent !== parent || !parent.canReplace($start.index(), $end.index(), Fragment.from(conversion.blocks))) return null;
|
|
121
|
+
return conversion;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Client-only, no schema: the `convertBlockTo` command over the preset's conversion providers — the „Umwandeln in …“
|
|
125
|
+
* block action and the toolbar's conversion groups. One transaction, so one undo step.
|
|
126
|
+
*/
|
|
127
|
+
const BlockConvert = Extension.create({
|
|
128
|
+
name: "blockConvert",
|
|
129
|
+
addCommands() {
|
|
130
|
+
return { convertBlockTo: (target, pos) => ({ editor, state, tr, dispatch }) => {
|
|
131
|
+
const $start = blockStart(state, pos);
|
|
132
|
+
const conversion = $start && blockConversion(conversionsOf(editor), state, $start, target);
|
|
133
|
+
if (!conversion) return false;
|
|
134
|
+
if (dispatch) {
|
|
135
|
+
tr.replaceWith(conversion.from, conversion.to, conversion.blocks);
|
|
136
|
+
const $first = tr.doc.resolve(conversion.from);
|
|
137
|
+
tr.setSelection(Selection.findFrom($first, 1, true) ?? Selection.near($first)).scrollIntoView();
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
} };
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* „Umwandeln in …“ entries for the block `target`: the targets the providers offer whose type the block's container
|
|
145
|
+
* allows (`TYPE_ABILITIES`), one separated group per provider in feature order. A list item stands for its list.
|
|
146
|
+
*/
|
|
147
|
+
function convertMenuItems(editor, target, t) {
|
|
148
|
+
let { node, pos } = target;
|
|
149
|
+
if (node.type.name === "listItem") {
|
|
150
|
+
const $item = editor.state.doc.resolve(pos);
|
|
151
|
+
node = $item.parent;
|
|
152
|
+
pos = $item.before();
|
|
153
|
+
}
|
|
154
|
+
const providers = conversionsOf(editor);
|
|
155
|
+
const abilities = abilitiesAt(editor, pos);
|
|
156
|
+
return conversionTargetGroups(providers, editor, node).map((targets) => targets.filter((to) => !TYPE_ABILITIES[to.type] || abilities.has(TYPE_ABILITIES[to.type])).map((to) => ({
|
|
157
|
+
...conversionLabel(providers, to, t),
|
|
158
|
+
onSelect: () => editor.chain().focus().convertBlockTo(to, pos).run()
|
|
159
|
+
}))).filter((items) => items.length > 0).flatMap((items, index) => index ? [{ type: "separator" }, ...items] : items);
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
export { BlockConvert, blockConversion, conversionLabel, conversionTargetGroups, convertMenuItems, coreConversions, parseConversionTarget, targetOwner };
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=block-convert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-convert.js","names":[],"sources":["../../src/core/block-convert.ts"],"sourcesContent":["import { type Editor, Extension } from '@tiptap/core'\nimport { Fragment, type Node as PMNode, type ResolvedPos } from '@tiptap/pm/model'\nimport { type EditorState, Selection } from '@tiptap/pm/state'\nimport { abilitiesAt } from './abilities'\nimport { type ConvertTarget, convertCoreBlocks, convertTargetId, coreConversionTargets, isCoreTarget, parseCoreTarget } from './convert'\nimport type { BlockTarget } from './extension-points'\nimport type { ConversionProvider } from './feature'\nimport type { MessageKey, Translate } from '../i18n'\nimport { conversionsOf } from './pipeline'\nimport { isBlockContainer, isChromeNode } from './schema/node-flags'\nimport { TYPE_ABILITIES } from './schema/abilities'\nimport type { MenuItem } from './toolbar'\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n blockConvert: {\n /**\n * Convert the block at `pos` (default: the caret's block in the document or another block container; a chrome\n * node stands for its parent) into `target`. False when the conversion changes nothing or is impossible there.\n */\n convertBlockTo: (target: ConvertTarget, pos?: number) => ReturnType\n }\n }\n}\n\nconst CORE_LABELS: Record<string, { key: MessageKey, icon: string }> = {\n paragraph: { key: 'block.paragraph', icon: 'i-lucide-pilcrow' },\n bulletList: { key: 'block.bulletList', icon: 'i-lucide-list' },\n orderedList: { key: 'block.orderedList', icon: 'i-lucide-list-ordered' },\n blockquote: { key: 'block.blockquote', icon: 'i-lucide-text-quote' },\n codeBlock: { key: 'block.codeBlock', icon: 'i-lucide-square-code' },\n}\n\n/**\n * The standard conversions: paragraphs, headings, lists, quotes and code blocks into each other. Declines every other\n * target, so features that add targets (speaker segments, composites) own them in their own providers.\n */\nexport const coreConversions: ConversionProvider = {\n targets: (_editor, node) => coreConversionTargets(node),\n parseTarget: parseCoreTarget,\n label: (target, t) => {\n if (target.type === 'heading') return { label: t('block.heading', { level: target.level }), icon: `i-lucide-heading-${target.level}` }\n const core = isCoreTarget(target) ? CORE_LABELS[target.type] : undefined\n return core ? { label: t(core.key), icon: core.icon } : null\n },\n convert: (state, $start, target) => {\n const node = $start.nodeAfter\n if (!node) return null\n const blocks = convertCoreBlocks(state.schema, [node], target)\n return blocks ? { from: $start.pos, to: $start.pos + node.nodeSize, blocks } : null\n },\n}\n\n/** The provider that owns `target`: the first, in feature order, that parses its id. */\nexport function targetOwner(providers: readonly ConversionProvider[], target: ConvertTarget): ConversionProvider | undefined {\n const id = convertTargetId(target)\n return providers.find(provider => provider.parseTarget(id) !== null)\n}\n\n/** The target `id` names, by its owner; null when no provider knows it. */\nexport function parseConversionTarget(providers: readonly ConversionProvider[], id: string): ConvertTarget | null {\n for (const provider of providers) {\n const target = provider.parseTarget(id)\n if (target) return target\n }\n return null\n}\n\n/** Label (in the language of `t`) and icon of `target`, from its owner. */\nexport function conversionLabel(providers: readonly ConversionProvider[], target: ConvertTarget, t: Translate): { label: string, icon: string } {\n const label = targetOwner(providers, target)?.label(target, t)\n if (!label) throw new Error(`@ecsplico/editor: no conversion provider owns the target \"${convertTargetId(target)}\"`)\n return label\n}\n\n/** The targets offered for `node` per provider, in feature order; a target id offered twice is an error. */\nexport function conversionTargetGroups(providers: readonly ConversionProvider[], editor: Editor, node: PMNode): ConvertTarget[][] {\n const offered = new Set<string>()\n return providers.map(provider => provider.targets(editor, node).filter((target) => {\n const id = convertTargetId(target)\n if (offered.has(id)) throw new Error(`@ecsplico/editor: the conversion target \"${id}\" is advertised by more than one provider`)\n offered.add(id)\n return true\n }))\n}\n\n/** The `$pos` right in front of the block to convert; a chrome node stands for its parent block. */\nfunction blockStart(state: EditorState, pos: number | undefined): ResolvedPos | null {\n let $start: ResolvedPos\n if (pos === undefined) {\n // The caret's block whose parent is a block container (the document, a composite).\n const { $head } = state.selection\n let depth = $head.depth\n while (depth > 0 && !isBlockContainer($head.node(depth - 1))) depth--\n if (depth === 0) return null\n $start = state.doc.resolve($head.before(depth))\n }\n else {\n if (pos < 0 || pos >= state.doc.content.size) return null\n $start = state.doc.resolve(pos)\n }\n const node = $start.nodeAfter\n if (!node) return null\n return isChromeNode(node) ? state.doc.resolve($start.before()) : $start\n}\n\n/**\n * The conversion of the block right after `$start` into `target`: the range it replaces and the converted blocks.\n * A provider claiming the source block (`handlesSource`) executes; otherwise the target's owner does. Null when the\n * conversion changes nothing or the result does not fit there (`parent.canReplace`). Shared by `convertBlockTo` and\n * the chat's `convert` op.\n */\nexport function blockConversion(providers: readonly ConversionProvider[], state: EditorState, $start: ResolvedPos, target: ConvertTarget): { from: number, to: number, blocks: PMNode[] } | null {\n const node = $start.nodeAfter\n if (!node) return null\n const provider = providers.find(candidate => candidate.handlesSource?.(node)) ?? targetOwner(providers, target)\n const conversion = provider?.convert(state, $start, target)\n if (!conversion) return null\n const parent = $start.parent\n const $end = state.doc.resolve(conversion.to)\n if ($end.parent !== parent || !parent.canReplace($start.index(), $end.index(), Fragment.from(conversion.blocks))) return null\n return conversion\n}\n\n/**\n * Client-only, no schema: the `convertBlockTo` command over the preset's conversion providers — the „Umwandeln in …“\n * block action and the toolbar's conversion groups. One transaction, so one undo step.\n */\nexport const BlockConvert = Extension.create({\n name: 'blockConvert',\n\n addCommands() {\n return {\n convertBlockTo: (target, pos) => ({ editor, state, tr, dispatch }) => {\n const $start = blockStart(state, pos)\n const conversion = $start && blockConversion(conversionsOf(editor), state, $start, target)\n if (!conversion) return false\n if (dispatch) {\n tr.replaceWith(conversion.from, conversion.to, conversion.blocks)\n const $first = tr.doc.resolve(conversion.from)\n tr.setSelection(Selection.findFrom($first, 1, true) ?? Selection.near($first)).scrollIntoView()\n }\n return true\n },\n }\n },\n})\n\n/**\n * „Umwandeln in …“ entries for the block `target`: the targets the providers offer whose type the block's container\n * allows (`TYPE_ABILITIES`), one separated group per provider in feature order. A list item stands for its list.\n */\nexport function convertMenuItems(editor: Editor, target: BlockTarget, t: Translate): MenuItem[] {\n let { node, pos } = target\n if (node.type.name === 'listItem') {\n const $item = editor.state.doc.resolve(pos)\n node = $item.parent\n pos = $item.before()\n }\n const providers = conversionsOf(editor)\n const abilities = abilitiesAt(editor, pos)\n const groups = conversionTargetGroups(providers, editor, node)\n .map(targets => targets\n .filter(to => !TYPE_ABILITIES[to.type] || abilities.has(TYPE_ABILITIES[to.type]!))\n .map((to): MenuItem => ({\n ...conversionLabel(providers, to, t),\n onSelect: () => editor.chain().focus().convertBlockTo(to, pos).run(),\n })))\n .filter(items => items.length > 0)\n return groups.flatMap((items, index) => index ? [{ type: 'separator' } as const, ...items] : items)\n}\n"],"mappings":";;;;;;;;;AAyBA,MAAM,cAAiE;CACrE,WAAW;EAAE,KAAK;EAAmB,MAAM;CAAmB;CAC9D,YAAY;EAAE,KAAK;EAAoB,MAAM;CAAgB;CAC7D,aAAa;EAAE,KAAK;EAAqB,MAAM;CAAwB;CACvE,YAAY;EAAE,KAAK;EAAoB,MAAM;CAAsB;CACnE,WAAW;EAAE,KAAK;EAAmB,MAAM;CAAuB;AACpE;;;;;AAMA,MAAa,kBAAsC;CACjD,UAAU,SAAS,SAAS,sBAAsB,IAAI;CACtD,aAAa;CACb,QAAQ,QAAQ,MAAM;EACpB,IAAI,OAAO,SAAS,WAAW,OAAO;GAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,OAAO,MAAM,CAAC;GAAG,MAAM,oBAAoB,OAAO;EAAQ;EACrI,MAAM,OAAO,aAAa,MAAM,IAAI,YAAY,OAAO,QAAQ,KAAA;EAC/D,OAAO,OAAO;GAAE,OAAO,EAAE,KAAK,GAAG;GAAG,MAAM,KAAK;EAAK,IAAI;CAC1D;CACA,UAAU,OAAO,QAAQ,WAAW;EAClC,MAAM,OAAO,OAAO;EACpB,IAAI,CAAC,MAAM,OAAO;EAClB,MAAM,SAAS,kBAAkB,MAAM,QAAQ,CAAC,IAAI,GAAG,MAAM;EAC7D,OAAO,SAAS;GAAE,MAAM,OAAO;GAAK,IAAI,OAAO,MAAM,KAAK;GAAU;EAAO,IAAI;CACjF;AACF;;AAGA,SAAgB,YAAY,WAA0C,QAAuD;CAC3H,MAAM,KAAK,gBAAgB,MAAM;CACjC,OAAO,UAAU,MAAK,aAAY,SAAS,YAAY,EAAE,MAAM,IAAI;AACrE;;AAGA,SAAgB,sBAAsB,WAA0C,IAAkC;CAChH,KAAK,MAAM,YAAY,WAAW;EAChC,MAAM,SAAS,SAAS,YAAY,EAAE;EACtC,IAAI,QAAQ,OAAO;CACrB;CACA,OAAO;AACT;;AAGA,SAAgB,gBAAgB,WAA0C,QAAuB,GAA+C;CAC9I,MAAM,QAAQ,YAAY,WAAW,MAAM,CAAC,EAAE,MAAM,QAAQ,CAAC;CAC7D,IAAI,CAAC,OAAO,MAAM,IAAI,MAAM,6DAA6D,gBAAgB,MAAM,EAAE,EAAE;CACnH,OAAO;AACT;;AAGA,SAAgB,uBAAuB,WAA0C,QAAgB,MAAiC;CAChI,MAAM,0BAAU,IAAI,IAAY;CAChC,OAAO,UAAU,KAAI,aAAY,SAAS,QAAQ,QAAQ,IAAI,CAAC,CAAC,QAAQ,WAAW;EACjF,MAAM,KAAK,gBAAgB,MAAM;EACjC,IAAI,QAAQ,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,4CAA4C,GAAG,0CAA0C;EAC9H,QAAQ,IAAI,EAAE;EACd,OAAO;CACT,CAAC,CAAC;AACJ;;AAGA,SAAS,WAAW,OAAoB,KAA6C;CACnF,IAAI;CACJ,IAAI,QAAQ,KAAA,GAAW;EAErB,MAAM,EAAE,UAAU,MAAM;EACxB,IAAI,QAAQ,MAAM;EAClB,OAAO,QAAQ,KAAK,CAAC,iBAAiB,MAAM,KAAK,QAAQ,CAAC,CAAC,GAAG;EAC9D,IAAI,UAAU,GAAG,OAAO;EACxB,SAAS,MAAM,IAAI,QAAQ,MAAM,OAAO,KAAK,CAAC;CAChD,OACK;EACH,IAAI,MAAM,KAAK,OAAO,MAAM,IAAI,QAAQ,MAAM,OAAO;EACrD,SAAS,MAAM,IAAI,QAAQ,GAAG;CAChC;CACA,MAAM,OAAO,OAAO;CACpB,IAAI,CAAC,MAAM,OAAO;CAClB,OAAO,aAAa,IAAI,IAAI,MAAM,IAAI,QAAQ,OAAO,OAAO,CAAC,IAAI;AACnE;;;;;;;AAQA,SAAgB,gBAAgB,WAA0C,OAAoB,QAAqB,QAA8E;CAC/L,MAAM,OAAO,OAAO;CACpB,IAAI,CAAC,MAAM,OAAO;CAElB,MAAM,cADW,UAAU,MAAK,cAAa,UAAU,gBAAgB,IAAI,CAAC,KAAK,YAAY,WAAW,MAAM,EAAA,EACjF,QAAQ,OAAO,QAAQ,MAAM;CAC1D,IAAI,CAAC,YAAY,OAAO;CACxB,MAAM,SAAS,OAAO;CACtB,MAAM,OAAO,MAAM,IAAI,QAAQ,WAAW,EAAE;CAC5C,IAAI,KAAK,WAAW,UAAU,CAAC,OAAO,WAAW,OAAO,MAAM,GAAG,KAAK,MAAM,GAAG,SAAS,KAAK,WAAW,MAAM,CAAC,GAAG,OAAO;CACzH,OAAO;AACT;;;;;AAMA,MAAa,eAAe,UAAU,OAAO;CAC3C,MAAM;CAEN,cAAc;EACZ,OAAO,EACL,iBAAiB,QAAQ,SAAS,EAAE,QAAQ,OAAO,IAAI,eAAe;GACpE,MAAM,SAAS,WAAW,OAAO,GAAG;GACpC,MAAM,aAAa,UAAU,gBAAgB,cAAc,MAAM,GAAG,OAAO,QAAQ,MAAM;GACzF,IAAI,CAAC,YAAY,OAAO;GACxB,IAAI,UAAU;IACZ,GAAG,YAAY,WAAW,MAAM,WAAW,IAAI,WAAW,MAAM;IAChE,MAAM,SAAS,GAAG,IAAI,QAAQ,WAAW,IAAI;IAC7C,GAAG,aAAa,UAAU,SAAS,QAAQ,GAAG,IAAI,KAAK,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe;GAChG;GACA,OAAO;EACT,EACF;CACF;AACF,CAAC;;;;;AAMD,SAAgB,iBAAiB,QAAgB,QAAqB,GAA0B;CAC9F,IAAI,EAAE,MAAM,QAAQ;CACpB,IAAI,KAAK,KAAK,SAAS,YAAY;EACjC,MAAM,QAAQ,OAAO,MAAM,IAAI,QAAQ,GAAG;EAC1C,OAAO,MAAM;EACb,MAAM,MAAM,OAAO;CACrB;CACA,MAAM,YAAY,cAAc,MAAM;CACtC,MAAM,YAAY,YAAY,QAAQ,GAAG;CASzC,OARe,uBAAuB,WAAW,QAAQ,IAAI,CAAC,CAC3D,KAAI,YAAW,QACb,QAAO,OAAM,CAAC,eAAe,GAAG,SAAS,UAAU,IAAI,eAAe,GAAG,KAAM,CAAC,CAAC,CACjF,KAAK,QAAkB;EACtB,GAAG,gBAAgB,WAAW,IAAI,CAAC;EACnC,gBAAgB,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,eAAe,IAAI,GAAG,CAAC,CAAC,IAAI;CACrE,EAAE,CAAC,CAAC,CACL,QAAO,UAAS,MAAM,SAAS,CACtB,CAAC,CAAC,SAAS,OAAO,UAAU,QAAQ,CAAC,EAAE,MAAM,YAAY,GAAY,GAAG,KAAK,IAAI,KAAK;AACpG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/core/block-drag.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Starts a drag of the block at `pos` from a drag source outside the editor's DOM (the kind icon of a composite, a
|
|
5
|
+
* permanent drag handle), the way the upstream drag handle does it: the block becomes the `NodeSelection`, the drag
|
|
6
|
+
* image is a styled clone of the block, and `view.dragging` tells ProseMirror that dropping inside the editor moves the
|
|
7
|
+
* node (`Alt` copies it). Call it from the source's `dragstart`; returns false, and starts nothing, when the editor is
|
|
8
|
+
* read-only or `pos` holds no selectable block.
|
|
9
|
+
*/
|
|
10
|
+
export declare function startBlockDrag(editor: Editor, event: DragEvent, pos: number): boolean;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=block-drag.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { NodeSelection } from "@tiptap/pm/state";
|
|
2
|
+
//#region src/core/block-drag.ts
|
|
3
|
+
/** The element with every computed style written inline, so it looks the same outside the editor's stylesheet scope. */
|
|
4
|
+
function cloneWithStyles(source) {
|
|
5
|
+
const clone = source.cloneNode(true);
|
|
6
|
+
const from = [source, ...source.getElementsByTagName("*")];
|
|
7
|
+
const to = [clone, ...clone.getElementsByTagName("*")];
|
|
8
|
+
from.forEach((element, index) => {
|
|
9
|
+
const style = getComputedStyle(element);
|
|
10
|
+
const target = to[index];
|
|
11
|
+
if (target) target.style.cssText = Array.from(style, (name) => `${name}:${style.getPropertyValue(name)};`).join("");
|
|
12
|
+
});
|
|
13
|
+
return clone;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Starts a drag of the block at `pos` from a drag source outside the editor's DOM (the kind icon of a composite, a
|
|
17
|
+
* permanent drag handle), the way the upstream drag handle does it: the block becomes the `NodeSelection`, the drag
|
|
18
|
+
* image is a styled clone of the block, and `view.dragging` tells ProseMirror that dropping inside the editor moves the
|
|
19
|
+
* node (`Alt` copies it). Call it from the source's `dragstart`; returns false, and starts nothing, when the editor is
|
|
20
|
+
* read-only or `pos` holds no selectable block.
|
|
21
|
+
*/
|
|
22
|
+
function startBlockDrag(editor, event, pos) {
|
|
23
|
+
const { view } = editor;
|
|
24
|
+
const { dataTransfer } = event;
|
|
25
|
+
const node = view.state.doc.nodeAt(pos);
|
|
26
|
+
const dom = view.nodeDOM(pos);
|
|
27
|
+
if (!editor.isEditable || !dataTransfer || !node || !NodeSelection.isSelectable(node) || !(dom instanceof HTMLElement)) return false;
|
|
28
|
+
const selection = NodeSelection.create(view.state.doc, pos);
|
|
29
|
+
const direction = getComputedStyle(dom).direction;
|
|
30
|
+
const clone = cloneWithStyles(dom);
|
|
31
|
+
clone.style.margin = "0";
|
|
32
|
+
const preview = document.createElement("div");
|
|
33
|
+
preview.setAttribute("dir", direction);
|
|
34
|
+
preview.style.position = "absolute";
|
|
35
|
+
preview.style.top = "-10000px";
|
|
36
|
+
preview.append(clone);
|
|
37
|
+
document.body.append(preview);
|
|
38
|
+
dataTransfer.clearData();
|
|
39
|
+
dataTransfer.setData("text/plain", node.textContent);
|
|
40
|
+
dataTransfer.effectAllowed = "copyMove";
|
|
41
|
+
dataTransfer.setDragImage(preview, direction === "rtl" ? preview.getBoundingClientRect().width : 0, 0);
|
|
42
|
+
const dragging = {
|
|
43
|
+
slice: selection.content(),
|
|
44
|
+
move: true,
|
|
45
|
+
node: selection
|
|
46
|
+
};
|
|
47
|
+
view.dragging = dragging;
|
|
48
|
+
view.dispatch(view.state.tr.setSelection(selection));
|
|
49
|
+
const end = () => {
|
|
50
|
+
preview.remove();
|
|
51
|
+
if (view.dragging === dragging) view.dragging = null;
|
|
52
|
+
document.removeEventListener("drop", end);
|
|
53
|
+
document.removeEventListener("dragend", end);
|
|
54
|
+
};
|
|
55
|
+
document.addEventListener("drop", end);
|
|
56
|
+
document.addEventListener("dragend", end);
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { startBlockDrag };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=block-drag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-drag.js","names":[],"sources":["../../src/core/block-drag.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { NodeSelection } from '@tiptap/pm/state'\n\n/** The element with every computed style written inline, so it looks the same outside the editor's stylesheet scope. */\nfunction cloneWithStyles(source: HTMLElement): HTMLElement {\n const clone = source.cloneNode(true) as HTMLElement\n const from = [source, ...source.getElementsByTagName('*')]\n const to = [clone, ...clone.getElementsByTagName('*')] as HTMLElement[]\n from.forEach((element, index) => {\n const style = getComputedStyle(element)\n const target = to[index]\n if (target) target.style.cssText = Array.from(style, name => `${name}:${style.getPropertyValue(name)};`).join('')\n })\n return clone\n}\n\n/**\n * Starts a drag of the block at `pos` from a drag source outside the editor's DOM (the kind icon of a composite, a\n * permanent drag handle), the way the upstream drag handle does it: the block becomes the `NodeSelection`, the drag\n * image is a styled clone of the block, and `view.dragging` tells ProseMirror that dropping inside the editor moves the\n * node (`Alt` copies it). Call it from the source's `dragstart`; returns false, and starts nothing, when the editor is\n * read-only or `pos` holds no selectable block.\n */\nexport function startBlockDrag(editor: Editor, event: DragEvent, pos: number): boolean {\n const { view } = editor\n const { dataTransfer } = event\n const node = view.state.doc.nodeAt(pos)\n const dom = view.nodeDOM(pos)\n if (!editor.isEditable || !dataTransfer || !node || !NodeSelection.isSelectable(node) || !(dom instanceof HTMLElement)) return false\n\n const selection = NodeSelection.create(view.state.doc, pos)\n const direction = getComputedStyle(dom).direction\n const clone = cloneWithStyles(dom)\n clone.style.margin = '0'\n const preview = document.createElement('div')\n preview.setAttribute('dir', direction)\n preview.style.position = 'absolute'\n preview.style.top = '-10000px'\n preview.append(clone)\n document.body.append(preview)\n\n dataTransfer.clearData()\n dataTransfer.setData('text/plain', node.textContent)\n dataTransfer.effectAllowed = 'copyMove'\n dataTransfer.setDragImage(preview, direction === 'rtl' ? preview.getBoundingClientRect().width : 0, 0)\n\n // `node` is read by ProseMirror's drop handler to delete exactly the dragged node, but is not in the public type.\n const dragging = { slice: selection.content(), move: true, node: selection } as typeof view.dragging\n view.dragging = dragging\n view.dispatch(view.state.tr.setSelection(selection))\n\n // The source may be gone after a drop (its overlay re-renders), and then sends no `dragend`: listen on the document.\n const end = () => {\n preview.remove()\n if (view.dragging === dragging) view.dragging = null\n document.removeEventListener('drop', end)\n document.removeEventListener('dragend', end)\n }\n document.addEventListener('drop', end)\n document.addEventListener('dragend', end)\n return true\n}\n"],"mappings":";;;AAIA,SAAS,gBAAgB,QAAkC;CACzD,MAAM,QAAQ,OAAO,UAAU,IAAI;CACnC,MAAM,OAAO,CAAC,QAAQ,GAAG,OAAO,qBAAqB,GAAG,CAAC;CACzD,MAAM,KAAK,CAAC,OAAO,GAAG,MAAM,qBAAqB,GAAG,CAAC;CACrD,KAAK,SAAS,SAAS,UAAU;EAC/B,MAAM,QAAQ,iBAAiB,OAAO;EACtC,MAAM,SAAS,GAAG;EAClB,IAAI,QAAQ,OAAO,MAAM,UAAU,MAAM,KAAK,QAAO,SAAQ,GAAG,KAAK,GAAG,MAAM,iBAAiB,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE;CAClH,CAAC;CACD,OAAO;AACT;;;;;;;;AASA,SAAgB,eAAe,QAAgB,OAAkB,KAAsB;CACrF,MAAM,EAAE,SAAS;CACjB,MAAM,EAAE,iBAAiB;CACzB,MAAM,OAAO,KAAK,MAAM,IAAI,OAAO,GAAG;CACtC,MAAM,MAAM,KAAK,QAAQ,GAAG;CAC5B,IAAI,CAAC,OAAO,cAAc,CAAC,gBAAgB,CAAC,QAAQ,CAAC,cAAc,aAAa,IAAI,KAAK,EAAE,eAAe,cAAc,OAAO;CAE/H,MAAM,YAAY,cAAc,OAAO,KAAK,MAAM,KAAK,GAAG;CAC1D,MAAM,YAAY,iBAAiB,GAAG,CAAC,CAAC;CACxC,MAAM,QAAQ,gBAAgB,GAAG;CACjC,MAAM,MAAM,SAAS;CACrB,MAAM,UAAU,SAAS,cAAc,KAAK;CAC5C,QAAQ,aAAa,OAAO,SAAS;CACrC,QAAQ,MAAM,WAAW;CACzB,QAAQ,MAAM,MAAM;CACpB,QAAQ,OAAO,KAAK;CACpB,SAAS,KAAK,OAAO,OAAO;CAE5B,aAAa,UAAU;CACvB,aAAa,QAAQ,cAAc,KAAK,WAAW;CACnD,aAAa,gBAAgB;CAC7B,aAAa,aAAa,SAAS,cAAc,QAAQ,QAAQ,sBAAsB,CAAC,CAAC,QAAQ,GAAG,CAAC;CAGrG,MAAM,WAAW;EAAE,OAAO,UAAU,QAAQ;EAAG,MAAM;EAAM,MAAM;CAAU;CAC3E,KAAK,WAAW;CAChB,KAAK,SAAS,KAAK,MAAM,GAAG,aAAa,SAAS,CAAC;CAGnD,MAAM,YAAY;EAChB,QAAQ,OAAO;EACf,IAAI,KAAK,aAAa,UAAU,KAAK,WAAW;EAChD,SAAS,oBAAoB,QAAQ,GAAG;EACxC,SAAS,oBAAoB,WAAW,GAAG;CAC7C;CACA,SAAS,iBAAiB,QAAQ,GAAG;CACrC,SAAS,iBAAiB,WAAW,GAAG;CACxC,OAAO;AACT"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Extension } from "@tiptap/core";
|
|
2
|
+
//#region src/core/block-flash.d.ts
|
|
3
|
+
declare module '@tiptap/core' {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
blockFlash: {
|
|
6
|
+
/** Scrolls block `id` into view and briefly highlights it (local decoration); false when the block is gone. */
|
|
7
|
+
revealBlock: (id: string) => ReturnType;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Client-only reveal of a block by its ID (quote links of the document chat): scrolls to it and highlights it with the
|
|
13
|
+
* `block-flash` class. The highlight is a local decoration, so neither Yjs nor other users see it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const BlockFlash: Extension<object, {
|
|
16
|
+
timer: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=block-flash.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { findBlockById } from "./schema/block-ids.js";
|
|
2
|
+
import { Extension } from "@tiptap/core";
|
|
3
|
+
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
4
|
+
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
5
|
+
//#region src/core/block-flash.ts
|
|
6
|
+
/** Keep in sync with the `block-flash` animations in editor.css. */
|
|
7
|
+
const FLASH_MS = 1600;
|
|
8
|
+
const blockFlashKey = new PluginKey("blockFlash");
|
|
9
|
+
/**
|
|
10
|
+
* Client-only reveal of a block by its ID (quote links of the document chat): scrolls to it and highlights it with the
|
|
11
|
+
* `block-flash` class. The highlight is a local decoration, so neither Yjs nor other users see it.
|
|
12
|
+
*/
|
|
13
|
+
const BlockFlash = Extension.create({
|
|
14
|
+
name: "blockFlash",
|
|
15
|
+
addStorage() {
|
|
16
|
+
return { timer: void 0 };
|
|
17
|
+
},
|
|
18
|
+
onDestroy() {
|
|
19
|
+
clearTimeout(this.storage.timer);
|
|
20
|
+
},
|
|
21
|
+
addCommands() {
|
|
22
|
+
return { revealBlock: (id) => ({ editor, view, state, tr, dispatch }) => {
|
|
23
|
+
const found = findBlockById(tr.doc, id);
|
|
24
|
+
if (!found) return false;
|
|
25
|
+
if (!dispatch) return true;
|
|
26
|
+
const dom = view.nodeDOM(found.pos);
|
|
27
|
+
if (dom instanceof HTMLElement) dom.scrollIntoView({
|
|
28
|
+
behavior: "smooth",
|
|
29
|
+
block: "center"
|
|
30
|
+
});
|
|
31
|
+
const alt = !blockFlashKey.getState(state)?.alt;
|
|
32
|
+
tr.setMeta(blockFlashKey, {
|
|
33
|
+
id,
|
|
34
|
+
alt
|
|
35
|
+
}).setMeta("addToHistory", false);
|
|
36
|
+
clearTimeout(this.storage.timer);
|
|
37
|
+
this.storage.timer = window.setTimeout(() => {
|
|
38
|
+
if (!editor.isDestroyed) editor.view.dispatch(editor.state.tr.setMeta(blockFlashKey, null).setMeta("addToHistory", false));
|
|
39
|
+
}, FLASH_MS);
|
|
40
|
+
return true;
|
|
41
|
+
} };
|
|
42
|
+
},
|
|
43
|
+
addProseMirrorPlugins() {
|
|
44
|
+
return [new Plugin({
|
|
45
|
+
key: blockFlashKey,
|
|
46
|
+
state: {
|
|
47
|
+
init: () => null,
|
|
48
|
+
apply: (tr, flash) => {
|
|
49
|
+
const meta = tr.getMeta(blockFlashKey);
|
|
50
|
+
return meta === void 0 ? flash : meta;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
props: { decorations(state) {
|
|
54
|
+
const flash = blockFlashKey.getState(state);
|
|
55
|
+
const found = flash ? findBlockById(state.doc, flash.id) : null;
|
|
56
|
+
if (!found) return null;
|
|
57
|
+
const className = flash.alt ? "block-flash block-flash--alt" : "block-flash";
|
|
58
|
+
return DecorationSet.create(state.doc, [Decoration.node(found.pos, found.pos + found.node.nodeSize, { class: className })]);
|
|
59
|
+
} }
|
|
60
|
+
})];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
export { BlockFlash };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=block-flash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-flash.js","names":[],"sources":["../../src/core/block-flash.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\nimport { Decoration, DecorationSet } from '@tiptap/pm/view'\nimport { findBlockById } from './schema/block-ids'\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n blockFlash: {\n /** Scrolls block `id` into view and briefly highlights it (local decoration); false when the block is gone. */\n revealBlock: (id: string) => ReturnType\n }\n }\n}\n\n/** Keep in sync with the `block-flash` animations in editor.css. */\nconst FLASH_MS = 1600\n\n/** The highlighted block; `alt` flips on every reveal, which switches the animation and so restarts it. */\ninterface FlashState { id: string, alt: boolean }\n\nconst blockFlashKey = new PluginKey<FlashState | null>('blockFlash')\n\n/**\n * Client-only reveal of a block by its ID (quote links of the document chat): scrolls to it and highlights it with the\n * `block-flash` class. The highlight is a local decoration, so neither Yjs nor other users see it.\n */\nexport const BlockFlash = Extension.create<object, { timer: number | undefined }>({\n name: 'blockFlash',\n\n addStorage() {\n return { timer: undefined }\n },\n\n onDestroy() {\n clearTimeout(this.storage.timer)\n },\n\n addCommands() {\n return {\n revealBlock: id => ({ editor, view, state, tr, dispatch }) => {\n const found = findBlockById(tr.doc, id)\n if (!found) return false\n if (!dispatch) return true\n const dom = view.nodeDOM(found.pos)\n if (dom instanceof HTMLElement) dom.scrollIntoView({ behavior: 'smooth', block: 'center' })\n const alt = !blockFlashKey.getState(state)?.alt\n tr.setMeta(blockFlashKey, { id, alt } satisfies FlashState).setMeta('addToHistory', false)\n clearTimeout(this.storage.timer)\n this.storage.timer = window.setTimeout(() => {\n if (!editor.isDestroyed) editor.view.dispatch(editor.state.tr.setMeta(blockFlashKey, null).setMeta('addToHistory', false))\n }, FLASH_MS)\n return true\n },\n }\n },\n\n addProseMirrorPlugins() {\n return [\n new Plugin<FlashState | null>({\n key: blockFlashKey,\n state: {\n init: () => null,\n apply: (tr, flash) => {\n const meta = tr.getMeta(blockFlashKey) as FlashState | null | undefined\n return meta === undefined ? flash : meta\n },\n },\n props: {\n decorations(state) {\n const flash = blockFlashKey.getState(state)\n const found = flash ? findBlockById(state.doc, flash.id) : null\n if (!found) return null\n const className = flash!.alt ? 'block-flash block-flash--alt' : 'block-flash'\n return DecorationSet.create(state.doc, [Decoration.node(found.pos, found.pos + found.node.nodeSize, { class: className })])\n },\n },\n }),\n ]\n },\n})\n"],"mappings":";;;;;;AAeA,MAAM,WAAW;AAKjB,MAAM,gBAAgB,IAAI,UAA6B,YAAY;;;;;AAMnE,MAAa,aAAa,UAAU,OAA8C;CAChF,MAAM;CAEN,aAAa;EACX,OAAO,EAAE,OAAO,KAAA,EAAU;CAC5B;CAEA,YAAY;EACV,aAAa,KAAK,QAAQ,KAAK;CACjC;CAEA,cAAc;EACZ,OAAO,EACL,cAAa,QAAO,EAAE,QAAQ,MAAM,OAAO,IAAI,eAAe;GAC5D,MAAM,QAAQ,cAAc,GAAG,KAAK,EAAE;GACtC,IAAI,CAAC,OAAO,OAAO;GACnB,IAAI,CAAC,UAAU,OAAO;GACtB,MAAM,MAAM,KAAK,QAAQ,MAAM,GAAG;GAClC,IAAI,eAAe,aAAa,IAAI,eAAe;IAAE,UAAU;IAAU,OAAO;GAAS,CAAC;GAC1F,MAAM,MAAM,CAAC,cAAc,SAAS,KAAK,CAAC,EAAE;GAC5C,GAAG,QAAQ,eAAe;IAAE;IAAI;GAAI,CAAsB,CAAC,CAAC,QAAQ,gBAAgB,KAAK;GACzF,aAAa,KAAK,QAAQ,KAAK;GAC/B,KAAK,QAAQ,QAAQ,OAAO,iBAAiB;IAC3C,IAAI,CAAC,OAAO,aAAa,OAAO,KAAK,SAAS,OAAO,MAAM,GAAG,QAAQ,eAAe,IAAI,CAAC,CAAC,QAAQ,gBAAgB,KAAK,CAAC;GAC3H,GAAG,QAAQ;GACX,OAAO;EACT,EACF;CACF;CAEA,wBAAwB;EACtB,OAAO,CACL,IAAI,OAA0B;GAC5B,KAAK;GACL,OAAO;IACL,YAAY;IACZ,QAAQ,IAAI,UAAU;KACpB,MAAM,OAAO,GAAG,QAAQ,aAAa;KACrC,OAAO,SAAS,KAAA,IAAY,QAAQ;IACtC;GACF;GACA,OAAO,EACL,YAAY,OAAO;IACjB,MAAM,QAAQ,cAAc,SAAS,KAAK;IAC1C,MAAM,QAAQ,QAAQ,cAAc,MAAM,KAAK,MAAM,EAAE,IAAI;IAC3D,IAAI,CAAC,OAAO,OAAO;IACnB,MAAM,YAAY,MAAO,MAAM,iCAAiC;IAChE,OAAO,cAAc,OAAO,MAAM,KAAK,CAAC,WAAW,KAAK,MAAM,KAAK,MAAM,MAAM,MAAM,KAAK,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC,CAAC;GAC5H,EACF;EACF,CAAC,CACH;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Locale, Messages, Translate } from "../i18n/index.js";
|
|
2
|
+
import { ModelSlot } from "../settings/values.js";
|
|
3
|
+
import { EditorSettings } from "../settings/index.js";
|
|
4
|
+
import { Notifier } from "./notify.js";
|
|
5
|
+
import { ReadonlyStore, Store } from "./store.js";
|
|
6
|
+
import { $Fetch } from "ofetch";
|
|
7
|
+
//#region src/core/context.d.ts
|
|
8
|
+
/** Inert public AI configuration (set by the Nuxt client plugin); only the AI feature reads it. */
|
|
9
|
+
export interface EditorAiConfig {
|
|
10
|
+
slots: Record<ModelSlot, string>;
|
|
11
|
+
transcription: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface EditorContextOptions {
|
|
14
|
+
/** HTTP client of every feature request (default: ofetch). */
|
|
15
|
+
fetch?: $Fetch;
|
|
16
|
+
settings?: {
|
|
17
|
+
/** Keep the settings per account through `GET`/`PUT /api/editor/settings`; default false (this browser only). */
|
|
18
|
+
remote?: boolean;
|
|
19
|
+
};
|
|
20
|
+
ai?: EditorAiConfig;
|
|
21
|
+
/** Shows app-level notices (e.g. model profiles); default: dropped (`silentNotifier`). */
|
|
22
|
+
notify?: Notifier;
|
|
23
|
+
/** Language of every string the editor renders (toolbar, slash menu, settings, AI, notices); default `'de'`. Fixed for the life of the context. */
|
|
24
|
+
locale?: Locale;
|
|
25
|
+
/** Overrides of single messages by key (`{ 'toolbar.bold': 'Strong' }`); the rest comes from the catalog of `locale`. */
|
|
26
|
+
messages?: Partial<Messages>;
|
|
27
|
+
}
|
|
28
|
+
/** What `createEditorContext` returns: shared by all editors of an app. One per app: there is no process-global state. */
|
|
29
|
+
export interface EditorContext {
|
|
30
|
+
settings: Store<EditorSettings>;
|
|
31
|
+
/** True once the stored settings are usable: immediately in local mode, after the server answered in remote mode. */
|
|
32
|
+
ready: ReadonlyStore<boolean>;
|
|
33
|
+
/** True once the account's settings from the server are in effect (always false in local mode). */
|
|
34
|
+
synced: ReadonlyStore<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Starts the account-settings load of remote mode (idempotent, no-op in local mode). The framework layers'
|
|
37
|
+
* settings hooks call it, so the server is asked only once an editor-side component needs the settings (not on a
|
|
38
|
+
* login page).
|
|
39
|
+
*/
|
|
40
|
+
load: () => void;
|
|
41
|
+
fetch: $Fetch;
|
|
42
|
+
ai: EditorAiConfig | undefined;
|
|
43
|
+
/** Notices of app-level models; surfaces hand features their own `FeatureContext.notify`. */
|
|
44
|
+
notify: Notifier;
|
|
45
|
+
/** The language of the editor's strings (`options.locale`, default `'de'`). */
|
|
46
|
+
locale: Locale;
|
|
47
|
+
/** Renders a message of the catalog (with the host's `messages` applied): `t('toolbar.bold')`, `t('ai.run', { task })`. */
|
|
48
|
+
t: Translate;
|
|
49
|
+
/** Stops the persistence (store subscription and pending server write); call when the app goes away. */
|
|
50
|
+
dispose: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The editor context of an app: the settings shared by all editors of the app, and the HTTP client. Framework-free;
|
|
54
|
+
* the Vue layer installs it with `app.use(createEditor())`, the React layer provides it through
|
|
55
|
+
* `EditorContextProvider`. The settings are read from localStorage right away (client only) and every change is
|
|
56
|
+
* written back. With `settings.remote`, `GET /api/editor/settings` (on `load()`, which the settings hooks call) answers:
|
|
57
|
+
* `200` replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401`
|
|
58
|
+
* or a network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced).
|
|
59
|
+
* Subscription and timer stop with `dispose()`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function createEditorContext(options?: EditorContextOptions): EditorContext;
|
|
62
|
+
//#endregion
|
|
63
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createTranslator } from "../i18n/index.js";
|
|
2
|
+
import { parseEditorSettings } from "../settings/index.js";
|
|
3
|
+
import { silentNotifier } from "./notify.js";
|
|
4
|
+
import { createStore } from "./store.js";
|
|
5
|
+
import { ofetch } from "ofetch";
|
|
6
|
+
//#region src/core/context.ts
|
|
7
|
+
const STORAGE_KEY = "tiptap-editor:settings";
|
|
8
|
+
/** Pause after the last change before the settings are sent to the server (ms). */
|
|
9
|
+
const PUT_DEBOUNCE = 500;
|
|
10
|
+
function readLocal() {
|
|
11
|
+
try {
|
|
12
|
+
return parseEditorSettings(JSON.parse(localStorage.getItem(STORAGE_KEY) ?? "null"));
|
|
13
|
+
} catch {
|
|
14
|
+
return parseEditorSettings(null);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function writeLocal(settings) {
|
|
18
|
+
try {
|
|
19
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(settings));
|
|
20
|
+
} catch {}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The editor context of an app: the settings shared by all editors of the app, and the HTTP client. Framework-free;
|
|
24
|
+
* the Vue layer installs it with `app.use(createEditor())`, the React layer provides it through
|
|
25
|
+
* `EditorContextProvider`. The settings are read from localStorage right away (client only) and every change is
|
|
26
|
+
* written back. With `settings.remote`, `GET /api/editor/settings` (on `load()`, which the settings hooks call) answers:
|
|
27
|
+
* `200` replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401`
|
|
28
|
+
* or a network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced).
|
|
29
|
+
* Subscription and timer stop with `dispose()`.
|
|
30
|
+
*/
|
|
31
|
+
function createEditorContext(options = {}) {
|
|
32
|
+
const fetcher = options.fetch ?? ofetch;
|
|
33
|
+
const remoteMode = options.settings?.remote === true;
|
|
34
|
+
const settings = createStore(parseEditorSettings(null));
|
|
35
|
+
const ready = createStore(!remoteMode);
|
|
36
|
+
const synced = createStore(false);
|
|
37
|
+
let loading = false;
|
|
38
|
+
let loadRemote = () => {};
|
|
39
|
+
const load = () => {
|
|
40
|
+
if (loading) return;
|
|
41
|
+
loading = true;
|
|
42
|
+
loadRemote();
|
|
43
|
+
};
|
|
44
|
+
let dispose = () => {};
|
|
45
|
+
const locale = options.locale ?? "de";
|
|
46
|
+
const t = createTranslator(locale, options.messages);
|
|
47
|
+
const context = {
|
|
48
|
+
settings,
|
|
49
|
+
ready,
|
|
50
|
+
synced,
|
|
51
|
+
load,
|
|
52
|
+
fetch: fetcher,
|
|
53
|
+
ai: options.ai,
|
|
54
|
+
notify: options.notify ?? silentNotifier,
|
|
55
|
+
locale,
|
|
56
|
+
t,
|
|
57
|
+
dispose: () => dispose()
|
|
58
|
+
};
|
|
59
|
+
if (!("window" in globalThis)) return context;
|
|
60
|
+
settings.set(readLocal());
|
|
61
|
+
writeLocal(settings.get());
|
|
62
|
+
/** JSON of the settings the server holds, so values that came from it are not sent back. */
|
|
63
|
+
let remote = "";
|
|
64
|
+
let timer;
|
|
65
|
+
let active = true;
|
|
66
|
+
function push(value) {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
timer = setTimeout(() => {
|
|
69
|
+
const json = JSON.stringify(value);
|
|
70
|
+
if (json === remote) return;
|
|
71
|
+
fetcher("/api/editor/settings", {
|
|
72
|
+
method: "PUT",
|
|
73
|
+
body: value
|
|
74
|
+
}).then(() => {
|
|
75
|
+
remote = json;
|
|
76
|
+
}).catch((error) => {
|
|
77
|
+
if (error?.statusCode !== 501) console.warn(`tiptap-editor: ${t("settings.saveFailed")}`, error);
|
|
78
|
+
});
|
|
79
|
+
}, PUT_DEBOUNCE);
|
|
80
|
+
}
|
|
81
|
+
const unsubscribe = settings.subscribe((value) => {
|
|
82
|
+
writeLocal(value);
|
|
83
|
+
if (synced.get()) push(value);
|
|
84
|
+
});
|
|
85
|
+
dispose = () => {
|
|
86
|
+
active = false;
|
|
87
|
+
clearTimeout(timer);
|
|
88
|
+
unsubscribe();
|
|
89
|
+
};
|
|
90
|
+
if (!remoteMode) return context;
|
|
91
|
+
loadRemote = () => fetcher.raw("/api/editor/settings").then((response) => {
|
|
92
|
+
if (!active || response.status !== 200) return;
|
|
93
|
+
synced.set(true);
|
|
94
|
+
if (response._data) {
|
|
95
|
+
settings.set(parseEditorSettings(response._data));
|
|
96
|
+
remote = JSON.stringify(settings.get());
|
|
97
|
+
} else push(settings.get());
|
|
98
|
+
}).catch((error) => {
|
|
99
|
+
console.warn(`tiptap-editor: ${t("settings.loadFailed")}`, error);
|
|
100
|
+
}).finally(() => {
|
|
101
|
+
ready.set(true);
|
|
102
|
+
});
|
|
103
|
+
return context;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { createEditorContext };
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../src/core/context.ts"],"sourcesContent":["import { type $Fetch, ofetch } from 'ofetch'\nimport { createTranslator, DEFAULT_LOCALE, type Locale, type Messages, type Translate } from '../i18n'\nimport { type EditorSettings, type ModelSlot, parseEditorSettings } from '../settings'\nimport { type Notifier, silentNotifier } from './notify'\nimport { createStore, type ReadonlyStore, type Store } from './store'\n\nconst STORAGE_KEY = 'tiptap-editor:settings'\n/** Pause after the last change before the settings are sent to the server (ms). */\nconst PUT_DEBOUNCE = 500\n\n/** Inert public AI configuration (set by the Nuxt client plugin); only the AI feature reads it. */\nexport interface EditorAiConfig {\n slots: Record<ModelSlot, string>\n transcription: boolean\n}\n\nexport interface EditorContextOptions {\n /** HTTP client of every feature request (default: ofetch). */\n fetch?: $Fetch\n settings?: {\n /** Keep the settings per account through `GET`/`PUT /api/editor/settings`; default false (this browser only). */\n remote?: boolean\n }\n ai?: EditorAiConfig\n /** Shows app-level notices (e.g. model profiles); default: dropped (`silentNotifier`). */\n notify?: Notifier\n /** Language of every string the editor renders (toolbar, slash menu, settings, AI, notices); default `'de'`. Fixed for the life of the context. */\n locale?: Locale\n /** Overrides of single messages by key (`{ 'toolbar.bold': 'Strong' }`); the rest comes from the catalog of `locale`. */\n messages?: Partial<Messages>\n}\n\n/** What `createEditorContext` returns: shared by all editors of an app. One per app: there is no process-global state. */\nexport interface EditorContext {\n settings: Store<EditorSettings>\n /** True once the stored settings are usable: immediately in local mode, after the server answered in remote mode. */\n ready: ReadonlyStore<boolean>\n /** True once the account's settings from the server are in effect (always false in local mode). */\n synced: ReadonlyStore<boolean>\n /**\n * Starts the account-settings load of remote mode (idempotent, no-op in local mode). The framework layers'\n * settings hooks call it, so the server is asked only once an editor-side component needs the settings (not on a\n * login page).\n */\n load: () => void\n fetch: $Fetch\n ai: EditorAiConfig | undefined\n /** Notices of app-level models; surfaces hand features their own `FeatureContext.notify`. */\n notify: Notifier\n /** The language of the editor's strings (`options.locale`, default `'de'`). */\n locale: Locale\n /** Renders a message of the catalog (with the host's `messages` applied): `t('toolbar.bold')`, `t('ai.run', { task })`. */\n t: Translate\n /** Stops the persistence (store subscription and pending server write); call when the app goes away. */\n dispose: () => void\n}\n\nfunction readLocal(): EditorSettings {\n try {\n // Also migrates the flat `{ headingConversionScope }` of the per-browser settings before version 1.\n return parseEditorSettings(JSON.parse(localStorage.getItem(STORAGE_KEY) ?? 'null'))\n }\n catch {\n // Unreadable or corrupt (or no) storage: the defaults.\n return parseEditorSettings(null)\n }\n}\n\nfunction writeLocal(settings: EditorSettings) {\n try {\n localStorage.setItem(STORAGE_KEY, JSON.stringify(settings))\n }\n catch {\n // Storage unavailable (e.g. privacy mode): the settings last for this session only.\n }\n}\n\n/**\n * The editor context of an app: the settings shared by all editors of the app, and the HTTP client. Framework-free;\n * the Vue layer installs it with `app.use(createEditor())`, the React layer provides it through\n * `EditorContextProvider`. The settings are read from localStorage right away (client only) and every change is\n * written back. With `settings.remote`, `GET /api/editor/settings` (on `load()`, which the settings hooks call) answers:\n * `200` replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401`\n * or a network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced).\n * Subscription and timer stop with `dispose()`.\n */\nexport function createEditorContext(options: EditorContextOptions = {}): EditorContext {\n const fetcher = options.fetch ?? ofetch\n const remoteMode = options.settings?.remote === true\n const settings = createStore<EditorSettings>(parseEditorSettings(null))\n const ready = createStore(!remoteMode)\n const synced = createStore(false)\n let loading = false\n let loadRemote = () => {}\n const load = () => {\n if (loading) return\n loading = true\n loadRemote()\n }\n let dispose = () => {}\n const locale = options.locale ?? DEFAULT_LOCALE\n const t = createTranslator(locale, options.messages)\n const context: EditorContext = { settings, ready, synced, load, fetch: fetcher, ai: options.ai, notify: options.notify ?? silentNotifier, locale, t, dispose: () => dispose() }\n // No browser storage (server render): defaults, nothing to persist.\n if (!('window' in globalThis)) return context\n\n settings.set(readLocal())\n writeLocal(settings.get())\n\n /** JSON of the settings the server holds, so values that came from it are not sent back. */\n let remote = ''\n let timer: ReturnType<typeof setTimeout> | undefined\n let active = true\n function push(value: EditorSettings) {\n clearTimeout(timer)\n timer = setTimeout(() => {\n const json = JSON.stringify(value)\n if (json === remote) return\n fetcher('/api/editor/settings', { method: 'PUT', body: value })\n .then(() => { remote = json })\n .catch((error: unknown) => {\n // 501: the adapter stores no settings; nothing to report.\n if ((error as { statusCode?: unknown } | null)?.statusCode !== 501) {\n console.warn(`tiptap-editor: ${t('settings.saveFailed')}`, error)\n }\n })\n }, PUT_DEBOUNCE)\n }\n\n const unsubscribe = settings.subscribe((value) => {\n writeLocal(value)\n if (synced.get()) push(value)\n })\n dispose = () => {\n active = false\n clearTimeout(timer)\n unsubscribe()\n }\n\n if (!remoteMode) return context\n loadRemote = () => fetcher.raw<EditorSettings | null>('/api/editor/settings')\n .then((response) => {\n if (!active || response.status !== 200) return\n synced.set(true)\n if (response._data) {\n settings.set(parseEditorSettings(response._data))\n remote = JSON.stringify(settings.get())\n }\n // The account has no settings yet: it takes this browser's.\n else push(settings.get())\n })\n .catch((error: unknown) => {\n console.warn(`tiptap-editor: ${t('settings.loadFailed')}`, error)\n })\n .finally(() => { ready.set(true) })\n return context\n}\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;;AAEpB,MAAM,eAAe;AAiDrB,SAAS,YAA4B;CACnC,IAAI;EAEF,OAAO,oBAAoB,KAAK,MAAM,aAAa,QAAQ,WAAW,KAAK,MAAM,CAAC;CACpF,QACM;EAEJ,OAAO,oBAAoB,IAAI;CACjC;AACF;AAEA,SAAS,WAAW,UAA0B;CAC5C,IAAI;EACF,aAAa,QAAQ,aAAa,KAAK,UAAU,QAAQ,CAAC;CAC5D,QACM,CAEN;AACF;;;;;;;;;;AAWA,SAAgB,oBAAoB,UAAgC,CAAC,GAAkB;CACrF,MAAM,UAAU,QAAQ,SAAS;CACjC,MAAM,aAAa,QAAQ,UAAU,WAAW;CAChD,MAAM,WAAW,YAA4B,oBAAoB,IAAI,CAAC;CACtE,MAAM,QAAQ,YAAY,CAAC,UAAU;CACrC,MAAM,SAAS,YAAY,KAAK;CAChC,IAAI,UAAU;CACd,IAAI,mBAAmB,CAAC;CACxB,MAAM,aAAa;EACjB,IAAI,SAAS;EACb,UAAU;EACV,WAAW;CACb;CACA,IAAI,gBAAgB,CAAC;CACrB,MAAM,SAAS,QAAQ,UAAA;CACvB,MAAM,IAAI,iBAAiB,QAAQ,QAAQ,QAAQ;CACnD,MAAM,UAAyB;EAAE;EAAU;EAAO;EAAQ;EAAM,OAAO;EAAS,IAAI,QAAQ;EAAI,QAAQ,QAAQ,UAAU;EAAgB;EAAQ;EAAG,eAAe,QAAQ;CAAE;CAE9K,IAAI,EAAE,YAAY,aAAa,OAAO;CAEtC,SAAS,IAAI,UAAU,CAAC;CACxB,WAAW,SAAS,IAAI,CAAC;;CAGzB,IAAI,SAAS;CACb,IAAI;CACJ,IAAI,SAAS;CACb,SAAS,KAAK,OAAuB;EACnC,aAAa,KAAK;EAClB,QAAQ,iBAAiB;GACvB,MAAM,OAAO,KAAK,UAAU,KAAK;GACjC,IAAI,SAAS,QAAQ;GACrB,QAAQ,wBAAwB;IAAE,QAAQ;IAAO,MAAM;GAAM,CAAC,CAAC,CAC5D,WAAW;IAAE,SAAS;GAAK,CAAC,CAAC,CAC7B,OAAO,UAAmB;IAEzB,IAAK,OAA2C,eAAe,KAC7D,QAAQ,KAAK,kBAAkB,EAAE,qBAAqB,KAAK,KAAK;GAEpE,CAAC;EACL,GAAG,YAAY;CACjB;CAEA,MAAM,cAAc,SAAS,WAAW,UAAU;EAChD,WAAW,KAAK;EAChB,IAAI,OAAO,IAAI,GAAG,KAAK,KAAK;CAC9B,CAAC;CACD,gBAAgB;EACd,SAAS;EACT,aAAa,KAAK;EAClB,YAAY;CACd;CAEA,IAAI,CAAC,YAAY,OAAO;CACxB,mBAAmB,QAAQ,IAA2B,sBAAsB,CAAC,CAC1E,MAAM,aAAa;EAClB,IAAI,CAAC,UAAU,SAAS,WAAW,KAAK;EACxC,OAAO,IAAI,IAAI;EACf,IAAI,SAAS,OAAO;GAClB,SAAS,IAAI,oBAAoB,SAAS,KAAK,CAAC;GAChD,SAAS,KAAK,UAAU,SAAS,IAAI,CAAC;EACxC,OAEK,KAAK,SAAS,IAAI,CAAC;CAC1B,CAAC,CAAC,CACD,OAAO,UAAmB;EACzB,QAAQ,KAAK,kBAAkB,EAAE,qBAAqB,KAAK,KAAK;CAClE,CAAC,CAAC,CACD,cAAc;EAAE,MAAM,IAAI,IAAI;CAAE,CAAC;CACpC,OAAO;AACT"}
|