@ecsplico/editor 0.0.0-stage → 1.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/LICENSE +21 -0
- package/README.md +233 -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 +11 -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 +503 -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 +11 -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 +68 -0
- package/dist/nuxt/module.js +103 -0
- package/dist/nuxt/module.js.map +1 -0
- package/dist/nuxt/runtime/install-context.d.ts +17 -0
- package/dist/nuxt/runtime/install-context.js +26 -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/plugins/editor-context-primevue.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 +41 -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/primevue/Alert.js +49 -0
- package/dist/vue/kit/primevue/Alert.js.map +1 -0
- package/dist/vue/kit/primevue/Avatar.js +54 -0
- package/dist/vue/kit/primevue/Avatar.js.map +1 -0
- package/dist/vue/kit/primevue/Badge.js +41 -0
- package/dist/vue/kit/primevue/Badge.js.map +1 -0
- package/dist/vue/kit/primevue/Button.js +112 -0
- package/dist/vue/kit/primevue/Button.js.map +1 -0
- package/dist/vue/kit/primevue/Chip.js +38 -0
- package/dist/vue/kit/primevue/Chip.js.map +1 -0
- package/dist/vue/kit/primevue/DropdownMenu.js +98 -0
- package/dist/vue/kit/primevue/DropdownMenu.js.map +1 -0
- package/dist/vue/kit/primevue/FieldGroup.js +22 -0
- package/dist/vue/kit/primevue/FieldGroup.js.map +1 -0
- package/dist/vue/kit/primevue/FormField.js +56 -0
- package/dist/vue/kit/primevue/FormField.js.map +1 -0
- package/dist/vue/kit/primevue/Icon.js +23 -0
- package/dist/vue/kit/primevue/Icon.js.map +1 -0
- package/dist/vue/kit/primevue/Input.js +96 -0
- package/dist/vue/kit/primevue/Input.js.map +1 -0
- package/dist/vue/kit/primevue/InputMenu.js +122 -0
- package/dist/vue/kit/primevue/InputMenu.js.map +1 -0
- package/dist/vue/kit/primevue/Modal.js +59 -0
- package/dist/vue/kit/primevue/Modal.js.map +1 -0
- package/dist/vue/kit/primevue/Popover.js +135 -0
- package/dist/vue/kit/primevue/Popover.js.map +1 -0
- package/dist/vue/kit/primevue/RadioGroup.js +58 -0
- package/dist/vue/kit/primevue/RadioGroup.js.map +1 -0
- package/dist/vue/kit/primevue/Select.js +68 -0
- package/dist/vue/kit/primevue/Select.js.map +1 -0
- package/dist/vue/kit/primevue/SelectMenu.js +94 -0
- package/dist/vue/kit/primevue/SelectMenu.js.map +1 -0
- package/dist/vue/kit/primevue/Separator.js +16 -0
- package/dist/vue/kit/primevue/Separator.js.map +1 -0
- package/dist/vue/kit/primevue/Switch.js +46 -0
- package/dist/vue/kit/primevue/Switch.js.map +1 -0
- package/dist/vue/kit/primevue/Table.js +54 -0
- package/dist/vue/kit/primevue/Table.js.map +1 -0
- package/dist/vue/kit/primevue/Tabs.js +49 -0
- package/dist/vue/kit/primevue/Tabs.js.map +1 -0
- package/dist/vue/kit/primevue/Textarea.js +55 -0
- package/dist/vue/kit/primevue/Textarea.js.map +1 -0
- package/dist/vue/kit/primevue/Tooltip.js +43 -0
- package/dist/vue/kit/primevue/Tooltip.js.map +1 -0
- package/dist/vue/kit/primevue/Tree.js +75 -0
- package/dist/vue/kit/primevue/Tree.js.map +1 -0
- package/dist/vue/kit/primevue/select-options.js +55 -0
- package/dist/vue/kit/primevue/select-options.js.map +1 -0
- package/dist/vue/kit/primevue/shared.js +49 -0
- package/dist/vue/kit/primevue/shared.js.map +1 -0
- package/dist/vue/kit/primevue/trigger.js +25 -0
- package/dist/vue/kit/primevue/trigger.js.map +1 -0
- package/dist/vue/kit/primevue.css +86 -0
- package/dist/vue/kit/primevue.d.ts +33 -0
- package/dist/vue/kit/primevue.js +96 -0
- package/dist/vue/kit/primevue.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 +634 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioRecorderModal.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_createElementBlock","_toDisplayString","_createCommentVNode","_normalizeClass","_createTextVNode","_createVNode"],"sources":["../../../../src/features/media/components/AudioRecorderModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor, EditorEvents } from '@tiptap/vue-3'\nimport { computed, onBeforeUnmount, ref, shallowRef } from 'vue'\nimport { captureRange, type DocAnchor, fetchErrorMessage, releaseRanges, resolveRange } from '../../../core'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { useNotifier } from '../../../vue/use-notifier'\nimport { useAudioRecorder } from '../use-audio-recorder'\nimport { AUDIO_RECORDER_OPEN } from '../upload'\n\n/**\n * „Audio aufnehmen“, opened by `openAudioRecorder(editor)` (toolbar „Aufnahme“): records in the browser and imports the\n * file through `importFiles` (upload, wrapped by the pipeline's `wrapImport` stage) where the caret was when the modal opened.\n * Nothing enters the (possibly shared) document before the upload succeeded.\n */\nconst props = defineProps<{ editor: Editor }>()\n\nconst { Button: UButton, Modal: UModal } = useUiKit()\nconst { t } = useEditorI18n()\nconst notify = useNotifier(() => props.editor)\nconst { state, seconds, start, stop, cancel } = useAudioRecorder()\nconst open = ref(false)\n/** Stopping, uploading and inserting a recording. */\nconst inserting = ref(false)\n/** The recording once stopped; kept after a failed upload so „Erneut hochladen“ can retry it. */\nconst recorded = shallowRef<File | null>(null)\nlet anchor: DocAnchor | null = null\n\nconst notice = computed(() => {\n if (state.value === 'denied') return t('media.recorder.denied')\n if (state.value === 'unsupported') return t('media.recorder.unsupported')\n return null\n})\nconst clock = computed(() => `${String(Math.floor(seconds.value / 60)).padStart(2, '0')}:${String(seconds.value % 60).padStart(2, '0')}`)\n\nfunction onTransaction({ transaction }: EditorEvents['transaction']) {\n if (!transaction.getMeta(AUDIO_RECORDER_OPEN) || open.value || !props.editor.isEditable) return\n const { head } = props.editor.state.selection\n anchor = captureRange(props.editor, { from: head, to: head })\n open.value = true\n}\nprops.editor.on('transaction', onTransaction)\n\nasync function record() {\n try {\n await start()\n } catch (error) {\n notify({ title: t('media.recorder.failed'), description: fetchErrorMessage(error), kind: 'error' })\n }\n}\n\nasync function insert() {\n if (inserting.value) return\n inserting.value = true\n try {\n const file = recorded.value ?? await stop()\n if (!file) return\n recorded.value = file\n const pos = anchor ? resolveRange(props.editor.state, anchor)?.from : undefined\n // `importFiles` toasts its own failures; the modal stays open with the recording so the upload can be retried.\n if (!await props.editor.storage.media.importFiles(props.editor, [file], pos)) return\n if (!props.editor.isDestroyed) close()\n } catch (error) {\n notify({ title: t('media.recorder.failed'), description: fetchErrorMessage(error), kind: 'error' })\n } finally {\n inserting.value = false\n }\n}\n\n/** Ends the flow: discards a running or unsent recording and releases the caret anchor. */\nfunction close() {\n cancel()\n recorded.value = null\n if (anchor) releaseRanges(props.editor, [anchor])\n anchor = null\n open.value = false\n}\n\nonBeforeUnmount(() => {\n props.editor.off('transaction', onTransaction)\n if (anchor) releaseRanges(props.editor, [anchor])\n})\n</script>\n\n<template>\n <UModal\n :open=\"open\"\n :title=\"t('media.recorder.title')\"\n :dismissible=\"!inserting\"\n :close=\"{ disabled: inserting }\"\n @update:open=\"(value: boolean) => { if (!value) close() }\"\n >\n <template #body>\n <div class=\"flex flex-col items-center gap-3 py-2\">\n <p v-if=\"notice\" class=\"text-sm text-[var(--sk-danger)]\">\n {{ notice }}\n </p>\n <div\n class=\"flex items-center gap-2 font-mono text-3xl tabular-nums\"\n :class=\"state === 'recording' ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-muted)]'\"\n role=\"timer\"\n :aria-label=\"t('media.recorder.duration')\"\n >\n <span v-if=\"state === 'recording'\" class=\"size-2.5 animate-pulse rounded-full bg-[var(--sk-danger)]\" />\n {{ clock }}\n </div>\n </div>\n </template>\n <template #footer>\n <div class=\"flex w-full justify-end gap-2\">\n <UButton :label=\"t('media.recorder.cancel')\" color=\"neutral\" variant=\"ghost\" :disabled=\"inserting\" @click=\"close\" />\n <UButton\n v-if=\"state === 'recording' || inserting\"\n :label=\"t('media.recorder.stopInsert')\"\n icon=\"i-lucide-square\"\n :loading=\"inserting\"\n @click=\"insert\"\n />\n <UButton v-else-if=\"recorded\" :label=\"t('media.recorder.retry')\" icon=\"i-lucide-upload\" @click=\"insert\" />\n <UButton v-else :label=\"t('media.recorder.start')\" icon=\"i-lucide-mic\" :disabled=\"state === 'unsupported'\" @click=\"record\" />\n </div>\n </template>\n </UModal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAEd,MAAM,EAAE,QAAQ,SAAS,OAAO,WAAW,SAAS;EACpD,MAAM,EAAE,MAAM,cAAc;EAC5B,MAAM,SAAS,kBAAkB,MAAM,MAAM;EAC7C,MAAM,EAAE,OAAO,SAAS,OAAO,MAAM,WAAW,iBAAiB;EACjE,MAAM,OAAO,IAAI,KAAK;;EAEtB,MAAM,YAAY,IAAI,KAAK;;EAE3B,MAAM,WAAW,WAAwB,IAAI;EAC7C,IAAI,SAA2B;EAE/B,MAAM,SAAS,eAAe;GAC5B,IAAI,MAAM,UAAU,UAAU,OAAO,EAAE,uBAAuB;GAC9D,IAAI,MAAM,UAAU,eAAe,OAAO,EAAE,4BAA4B;GACxE,OAAO;EACT,CAAC;EACD,MAAM,QAAQ,eAAe,GAAG,OAAO,KAAK,MAAM,QAAQ,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,QAAQ,QAAQ,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;EAExI,SAAS,cAAc,EAAE,eAA4C;GACnE,IAAI,CAAC,YAAY,QAAA,mBAA2B,KAAK,KAAK,SAAS,CAAC,MAAM,OAAO,YAAY;GACzF,MAAM,EAAE,SAAS,MAAM,OAAO,MAAM;GACpC,SAAS,aAAa,MAAM,QAAQ;IAAE,MAAM;IAAM,IAAI;GAAK,CAAC;GAC5D,KAAK,QAAQ;EACf;EACA,MAAM,OAAO,GAAG,eAAe,aAAa;EAE5C,eAAe,SAAS;GACtB,IAAI;IACF,MAAM,MAAM;GACd,SAAS,OAAO;IACd,OAAO;KAAE,OAAO,EAAE,uBAAuB;KAAG,aAAa,kBAAkB,KAAK;KAAG,MAAM;IAAQ,CAAC;GACpG;EACF;EAEA,eAAe,SAAS;GACtB,IAAI,UAAU,OAAO;GACrB,UAAU,QAAQ;GAClB,IAAI;IACF,MAAM,OAAO,SAAS,SAAS,MAAM,KAAK;IAC1C,IAAI,CAAC,MAAM;IACX,SAAS,QAAQ;IACjB,MAAM,MAAM,SAAS,aAAa,MAAM,OAAO,OAAO,MAAM,CAAC,EAAE,OAAO,KAAA;IAEtE,IAAI,CAAC,MAAM,MAAM,OAAO,QAAQ,MAAM,YAAY,MAAM,QAAQ,CAAC,IAAI,GAAG,GAAG,GAAG;IAC9E,IAAI,CAAC,MAAM,OAAO,aAAa,MAAM;GACvC,SAAS,OAAO;IACd,OAAO;KAAE,OAAO,EAAE,uBAAuB;KAAG,aAAa,kBAAkB,KAAK;KAAG,MAAM;IAAQ,CAAC;GACpG,UAAU;IACR,UAAU,QAAQ;GACpB;EACF;;EAGA,SAAS,QAAQ;GACf,OAAO;GACP,SAAS,QAAQ;GACjB,IAAI,QAAQ,cAAc,MAAM,QAAQ,CAAC,MAAM,CAAC;GAChD,SAAS;GACT,KAAK,QAAQ;EACf;EAEA,sBAAsB;GACpB,MAAM,OAAO,IAAI,eAAe,aAAa;GAC7C,IAAI,QAAQ,cAAc,MAAM,QAAQ,CAAC,MAAM,CAAC;EAClD,CAAC;;GAIC,OAAAA,UAAA,GAAAC,YAqCSC,MAAA,MAAA,GAAA;IApCN,MAAM,KAAA;IACN,OAAOA,MAAA,CAAA,CAAC,CAAA,sBAAA;IACR,aAAW,CAAG,UAAA;IACd,OAAK,EAAA,UAAc,UAAA,MAAS;IAC5B,iBAAW,OAAA,OAAA,OAAA,MAAG,UAAc;KAAA,IAAA,CAAY,OAAO,MAAK;IAAA;;IAE1C,MAAIC,cAcP,CAbNC,mBAaM,OAbN,YAaM,CAZK,OAAA,SAATJ,UAAA,GAAAK,mBAEI,KAFJ,YAEIC,gBADC,OAAA,KAAM,GAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,GAEXH,mBAQM,OAAA;KAPJ,OAAKI,eAAA,CAAC,2DACEN,MAAA,KAAA,MAAK,cAAA,oCAAA,wBAAA,CAAA;KACb,MAAK;KACJ,cAAYA,MAAA,CAAA,CAAC,CAAA,yBAAA;IAEF,GAAA,CAAAA,MAAA,KAAA,MAAK,eAAjBF,UAAA,GAAAK,mBAAuG,QAAvG,UAAuG,KAAAE,mBAAA,QAAA,IAAA,GAAAE,gBAAA,MACvGH,gBAAG,MAAA,KAAK,GAAA,CAAA,CAAA,GAAA,IAAA,UAAA,CAAA,CAAA,CAAA,CAAA;IAIH,QAAMH,cAYT,CAXNC,mBAWM,OAXN,YAWM,CAVJM,YAAoHR,MAAA,OAAA,GAAA;KAA1G,OAAOA,MAAA,CAAA,CAAC,CAAA,uBAAA;KAA2B,OAAM;KAAU,SAAQ;KAAS,UAAU,UAAA;KAAY,SAAO;IAEnG,GAAA,MAAA,GAAA,CAAA,SAAA,UAAA,CAAA,GAAAA,MAAA,KAAA,MAAK,eAAoB,UAAA,SADjCF,UAAA,GAAAC,YAMEC,MAAA,OAAA,GAAA;;KAJC,OAAOA,MAAA,CAAA,CAAC,CAAA,2BAAA;KACT,MAAK;KACJ,SAAS,UAAA;KACT,SAAO;IAEU,GAAA,MAAA,GAAA,CAAA,SAAA,SAAA,CAAA,KAAA,SAAA,SAApBF,UAAA,GAAAC,YAA0GC,MAAA,OAAA,GAAA;;KAA3E,OAAOA,MAAA,CAAA,CAAC,CAAA,sBAAA;KAA0B,MAAK;KAAmB,SAAO;IAChG,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA,MAAAF,UAAA,GAAAC,YAA6HC,MAAA,OAAA,GAAA;;KAA5G,OAAOA,MAAA,CAAA,CAAC,CAAA,sBAAA;KAA0B,MAAK;KAAgB,UAAUA,MAAA,KAAA,MAAK;KAAqB,SAAO"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/vue-3";
|
|
2
|
+
//#region src/features/media/components/AudioRecorderModal.vue.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* „Audio aufnehmen“, opened by `openAudioRecorder(editor)` (toolbar „Aufnahme“): records in the browser and imports the
|
|
5
|
+
* file through `importFiles` (upload, wrapped by the pipeline's `wrapImport` stage) where the caret was when the modal opened.
|
|
6
|
+
* Nothing enters the (possibly shared) document before the upload succeeded.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { _default as default };
|
|
15
|
+
//# sourceMappingURL=AudioRecorderModal.vue.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
2
|
+
import { createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, unref, withCtx } from "vue";
|
|
3
|
+
import { NodeViewWrapper, nodeViewProps } from "@tiptap/vue-3";
|
|
4
|
+
//#region src/features/media/components/AudioView.vue
|
|
5
|
+
const _hoisted_1 = ["src"];
|
|
6
|
+
const _hoisted_2 = [
|
|
7
|
+
"value",
|
|
8
|
+
"placeholder",
|
|
9
|
+
"aria-label",
|
|
10
|
+
"readonly"
|
|
11
|
+
];
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
__name: "AudioView",
|
|
14
|
+
props: nodeViewProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const { t } = useEditorI18n();
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return openBlock(), createBlock(unref(NodeViewWrapper), {
|
|
19
|
+
as: "figure",
|
|
20
|
+
class: normalizeClass(["media-block flex flex-col gap-1", { "is-selected": _ctx.selected }]),
|
|
21
|
+
"data-id": _ctx.node.attrs.id || void 0
|
|
22
|
+
}, {
|
|
23
|
+
default: withCtx(() => [createElementVNode("audio", {
|
|
24
|
+
controls: "",
|
|
25
|
+
preload: "metadata",
|
|
26
|
+
src: _ctx.node.attrs.src,
|
|
27
|
+
class: "w-full"
|
|
28
|
+
}, null, 8, _hoisted_1), createElementVNode("input", {
|
|
29
|
+
value: _ctx.node.attrs.title,
|
|
30
|
+
contenteditable: "false",
|
|
31
|
+
placeholder: unref(t)("media.view.title"),
|
|
32
|
+
"aria-label": unref(t)("media.view.title"),
|
|
33
|
+
autocomplete: "off",
|
|
34
|
+
readonly: !_ctx.editor.isEditable,
|
|
35
|
+
class: "w-full rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]",
|
|
36
|
+
onInput: _cache[0] || (_cache[0] = ($event) => _ctx.updateAttributes({ title: $event.target.value }))
|
|
37
|
+
}, null, 40, _hoisted_2)]),
|
|
38
|
+
_: 1
|
|
39
|
+
}, 8, ["class", "data-id"]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { _sfc_main as default };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=AudioView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioView.js","names":["selected","node","editor","updateAttributes","_openBlock","_createBlock","_unref","_normalizeClass","_withCtx","_createElementVNode"],"sources":["../../../../src/features/media/components/AudioView.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\n\ndefineProps(nodeViewProps)\n\nconst { t } = useEditorI18n()\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"figure\"\n :class=\"['media-block flex flex-col gap-1', { 'is-selected': selected }]\"\n :data-id=\"node.attrs.id || undefined\"\n >\n <audio controls preload=\"metadata\" :src=\"node.attrs.src\" class=\"w-full\" />\n <input\n :value=\"node.attrs.title\"\n contenteditable=\"false\"\n :placeholder=\"t('media.view.title')\"\n :aria-label=\"t('media.view.title')\"\n autocomplete=\"off\"\n :readonly=\"!editor.isEditable\"\n class=\"w-full rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]\"\n @input=\"updateAttributes({ title: ($event.target as HTMLInputElement).value })\"\n >\n </NodeViewWrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAMA,MAAM,EAAE,MAAM,cAAc;;GAI1B,OAAAI,UAAA,GAAAC,YAgBkBC,MAAA,eAAA,GAAA;IAfhB,IAAG;IACF,OAAKC,eAAA,CAAA,mCAAA,EAAA,eAAuDP,KAAAA,SAAQ,CAAA,CAAA;IACpE,WAASC,KAAAA,KAAK,MAAM,MAAM,KAAA;;IAE3B,SAAAO,cAA0E,CAA1EC,mBAA0E,SAAA;KAAnE,UAAA;KAAS,SAAQ;KAAY,KAAKR,KAAAA,KAAK,MAAM;KAAK,OAAM;IAC/D,GAAA,MAAA,GAAA,UAAA,GAAAQ,mBASC,SAAA;KARE,OAAOR,KAAAA,KAAK,MAAM;KACnB,iBAAgB;KACf,aAAaK,MAAA,CAAA,CAAC,CAAA,kBAAA;KACd,cAAYA,MAAA,CAAA,CAAC,CAAA,kBAAA;KACd,cAAa;KACZ,UAAQ,CAAGJ,KAAAA,OAAO;KACnB,OAAM;KACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,iBAAgB,EAAA,OAAW,OAAO,OAA4B,MAAK,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
2
|
+
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
3
|
+
import { formatBytes } from "../upload.js";
|
|
4
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
5
|
+
import { NodeViewWrapper, nodeViewProps } from "@tiptap/vue-3";
|
|
6
|
+
//#region src/features/media/components/FileView.vue
|
|
7
|
+
const _hoisted_1 = {
|
|
8
|
+
class: "flex items-center gap-2",
|
|
9
|
+
contenteditable: "false"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = [
|
|
12
|
+
"value",
|
|
13
|
+
"placeholder",
|
|
14
|
+
"aria-label",
|
|
15
|
+
"readonly"
|
|
16
|
+
];
|
|
17
|
+
const _hoisted_3 = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "shrink-0 text-xs text-[var(--sk-fg-dimmed)]"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_4 = ["data"];
|
|
22
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
23
|
+
__name: "FileView",
|
|
24
|
+
props: nodeViewProps,
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const { Button: UButton, Icon: UIcon } = useUiKit();
|
|
27
|
+
const { t } = useEditorI18n();
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createBlock(unref(NodeViewWrapper), {
|
|
30
|
+
as: "figure",
|
|
31
|
+
class: normalizeClass(["media-block flex flex-col gap-1", { "is-selected": _ctx.selected }]),
|
|
32
|
+
"data-id": _ctx.node.attrs.id || void 0
|
|
33
|
+
}, {
|
|
34
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [
|
|
35
|
+
createVNode(unref(UIcon), {
|
|
36
|
+
name: _ctx.node.attrs.mimeType === "application/pdf" ? "i-lucide-file-text" : "i-lucide-file",
|
|
37
|
+
class: "size-5 shrink-0 text-[var(--sk-muted)]"
|
|
38
|
+
}, null, 8, ["name"]),
|
|
39
|
+
createElementVNode("input", {
|
|
40
|
+
value: _ctx.node.attrs.title,
|
|
41
|
+
placeholder: unref(t)("media.view.fileName"),
|
|
42
|
+
"aria-label": unref(t)("media.view.fileName"),
|
|
43
|
+
autocomplete: "off",
|
|
44
|
+
readonly: !_ctx.editor.isEditable,
|
|
45
|
+
class: "min-w-0 flex-1 rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]",
|
|
46
|
+
onInput: _cache[0] || (_cache[0] = ($event) => _ctx.updateAttributes({ title: $event.target.value }))
|
|
47
|
+
}, null, 40, _hoisted_2),
|
|
48
|
+
_ctx.node.attrs.size ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(formatBytes)(_ctx.node.attrs.size)), 1)) : createCommentVNode("v-if", true),
|
|
49
|
+
createVNode(unref(UButton), {
|
|
50
|
+
href: _ctx.node.attrs.src,
|
|
51
|
+
target: "_blank",
|
|
52
|
+
label: unref(t)("media.view.open"),
|
|
53
|
+
icon: "i-lucide-external-link",
|
|
54
|
+
size: "xs",
|
|
55
|
+
color: "neutral",
|
|
56
|
+
variant: "soft"
|
|
57
|
+
}, null, 8, ["href", "label"])
|
|
58
|
+
]), _ctx.node.attrs.mimeType === "application/pdf" && _ctx.node.attrs.src ? (openBlock(), createElementBlock("object", {
|
|
59
|
+
key: 0,
|
|
60
|
+
data: _ctx.node.attrs.src,
|
|
61
|
+
type: "application/pdf",
|
|
62
|
+
contenteditable: "false",
|
|
63
|
+
class: "mt-2 h-[480px] w-full rounded-md border border-[var(--sk-border)]"
|
|
64
|
+
}, null, 8, _hoisted_4)) : createCommentVNode("v-if", true)]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["class", "data-id"]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { _sfc_main as default };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=FileView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileView.js","names":["selected","node","editor","updateAttributes","_openBlock","_createBlock","_unref","_normalizeClass","_withCtx","_createElementVNode","_createVNode","_createElementBlock","_toDisplayString","_createCommentVNode"],"sources":["../../../../src/features/media/components/FileView.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { formatBytes } from '../upload'\n\ndefineProps(nodeViewProps)\n\nconst { Button: UButton, Icon: UIcon } = useUiKit()\nconst { t } = useEditorI18n()\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"figure\"\n :class=\"['media-block flex flex-col gap-1', { 'is-selected': selected }]\"\n :data-id=\"node.attrs.id || undefined\"\n >\n <div class=\"flex items-center gap-2\" contenteditable=\"false\">\n <UIcon\n :name=\"node.attrs.mimeType === 'application/pdf' ? 'i-lucide-file-text' : 'i-lucide-file'\"\n class=\"size-5 shrink-0 text-[var(--sk-muted)]\"\n />\n <input\n :value=\"node.attrs.title\"\n :placeholder=\"t('media.view.fileName')\"\n :aria-label=\"t('media.view.fileName')\"\n autocomplete=\"off\"\n :readonly=\"!editor.isEditable\"\n class=\"min-w-0 flex-1 rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]\"\n @input=\"updateAttributes({ title: ($event.target as HTMLInputElement).value })\"\n >\n <span v-if=\"node.attrs.size\" class=\"shrink-0 text-xs text-[var(--sk-fg-dimmed)]\">{{ formatBytes(node.attrs.size) }}</span>\n <UButton\n :href=\"node.attrs.src\"\n target=\"_blank\"\n :label=\"t('media.view.open')\"\n icon=\"i-lucide-external-link\"\n size=\"xs\"\n color=\"neutral\"\n variant=\"soft\"\n />\n </div>\n <object\n v-if=\"node.attrs.mimeType === 'application/pdf' && node.attrs.src\"\n :data=\"node.attrs.src\"\n type=\"application/pdf\"\n contenteditable=\"false\"\n class=\"mt-2 h-[480px] w-full rounded-md border border-[var(--sk-border)]\"\n />\n </NodeViewWrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAQA,MAAM,EAAE,QAAQ,SAAS,MAAM,UAAU,SAAS;EAClD,MAAM,EAAE,MAAM,cAAc;;GAI1B,OAAAI,UAAA,GAAAC,YAqCkBC,MAAA,eAAA,GAAA;IApChB,IAAG;IACF,OAAKC,eAAA,CAAA,mCAAA,EAAA,eAAuDP,KAAAA,SAAQ,CAAA,CAAA;IACpE,WAASC,KAAAA,KAAK,MAAM,MAAM,KAAA;;IAE3B,SAAAO,cAwBM,CAxBNC,mBAwBM,OAxBN,YAwBM;KAvBJC,YAGEJ,MAAA,KAAA,GAAA;MAFC,MAAML,KAAAA,KAAK,MAAM,aAAQ,oBAAA,uBAAA;MAC1B,OAAM;;KAERQ,mBAQC,SAAA;MAPE,OAAOR,KAAAA,KAAK,MAAM;MAClB,aAAaK,MAAA,CAAA,CAAC,CAAA,qBAAA;MACd,cAAYA,MAAA,CAAA,CAAC,CAAA,qBAAA;MACd,cAAa;MACZ,UAAQ,CAAGJ,KAAAA,OAAO;MACnB,OAAM;MACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,iBAAgB,EAAA,OAAW,OAAO,OAA4B,MAAK,CAAA;;KAEjEF,KAAAA,KAAK,MAAM,QAAvBG,UAAA,GAAAO,mBAA0H,QAA1H,YAA0HC,gBAAtCN,MAAA,WAAA,CAAW,CAACL,KAAAA,KAAK,MAAM,IAAI,CAAA,GAAA,CAAA,KAAAY,mBAAA,QAAA,IAAA;KAC/GH,YAQEJ,MAAA,OAAA,GAAA;MAPC,MAAML,KAAAA,KAAK,MAAM;MAClB,QAAO;MACN,OAAOK,MAAA,CAAA,CAAC,CAAA,iBAAA;MACT,MAAK;MACL,MAAK;MACL,OAAM;MACN,SAAQ;;IAIJL,CAAAA,GAAAA,KAAAA,KAAK,MAAM,aAAQ,qBAA0BA,KAAAA,KAAK,MAAM,OADhEG,UAAA,GAAAO,mBAME,UAAA;;KAJC,MAAMV,KAAAA,KAAK,MAAM;KAClB,MAAK;KACL,iBAAgB;KAChB,OAAM"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
2
|
+
import { createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, unref, withCtx } from "vue";
|
|
3
|
+
import { NodeViewWrapper, nodeViewProps } from "@tiptap/vue-3";
|
|
4
|
+
//#region src/features/media/components/VideoView.vue
|
|
5
|
+
const _hoisted_1 = ["src"];
|
|
6
|
+
const _hoisted_2 = [
|
|
7
|
+
"value",
|
|
8
|
+
"placeholder",
|
|
9
|
+
"aria-label",
|
|
10
|
+
"readonly"
|
|
11
|
+
];
|
|
12
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
13
|
+
__name: "VideoView",
|
|
14
|
+
props: nodeViewProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const { t } = useEditorI18n();
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return openBlock(), createBlock(unref(NodeViewWrapper), {
|
|
19
|
+
as: "figure",
|
|
20
|
+
class: normalizeClass(["media-block flex flex-col gap-1", { "is-selected": _ctx.selected }]),
|
|
21
|
+
"data-id": _ctx.node.attrs.id || void 0
|
|
22
|
+
}, {
|
|
23
|
+
default: withCtx(() => [createElementVNode("video", {
|
|
24
|
+
controls: "",
|
|
25
|
+
preload: "metadata",
|
|
26
|
+
playsinline: "",
|
|
27
|
+
src: _ctx.node.attrs.src,
|
|
28
|
+
class: "max-w-full rounded-md"
|
|
29
|
+
}, null, 8, _hoisted_1), createElementVNode("input", {
|
|
30
|
+
value: _ctx.node.attrs.title,
|
|
31
|
+
contenteditable: "false",
|
|
32
|
+
placeholder: unref(t)("media.view.title"),
|
|
33
|
+
"aria-label": unref(t)("media.view.title"),
|
|
34
|
+
autocomplete: "off",
|
|
35
|
+
readonly: !_ctx.editor.isEditable,
|
|
36
|
+
class: "w-full rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]",
|
|
37
|
+
onInput: _cache[0] || (_cache[0] = ($event) => _ctx.updateAttributes({ title: $event.target.value }))
|
|
38
|
+
}, null, 40, _hoisted_2)]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 8, ["class", "data-id"]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { _sfc_main as default };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=VideoView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoView.js","names":["selected","node","editor","updateAttributes","_openBlock","_createBlock","_unref","_normalizeClass","_withCtx","_createElementVNode"],"sources":["../../../../src/features/media/components/VideoView.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\n\ndefineProps(nodeViewProps)\n\nconst { t } = useEditorI18n()\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"figure\"\n :class=\"['media-block flex flex-col gap-1', { 'is-selected': selected }]\"\n :data-id=\"node.attrs.id || undefined\"\n >\n <video controls preload=\"metadata\" playsinline :src=\"node.attrs.src\" class=\"max-w-full rounded-md\" />\n <input\n :value=\"node.attrs.title\"\n contenteditable=\"false\"\n :placeholder=\"t('media.view.title')\"\n :aria-label=\"t('media.view.title')\"\n autocomplete=\"off\"\n :readonly=\"!editor.isEditable\"\n class=\"w-full rounded bg-transparent px-1 text-sm text-[var(--sk-muted)] outline-none placeholder:text-[var(--sk-fg-dimmed)] focus:bg-[color-mix(in_oklab,var(--sk-bg-accented)_50%,transparent)] focus:text-[var(--sk-fg-highlighted)]\"\n @input=\"updateAttributes({ title: ($event.target as HTMLInputElement).value })\"\n >\n </NodeViewWrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAMA,MAAM,EAAE,MAAM,cAAc;;GAI1B,OAAAI,UAAA,GAAAC,YAgBkBC,MAAA,eAAA,GAAA;IAfhB,IAAG;IACF,OAAKC,eAAA,CAAA,mCAAA,EAAA,eAAuDP,KAAAA,SAAQ,CAAA,CAAA;IACpE,WAASC,KAAAA,KAAK,MAAM,MAAM,KAAA;;IAE3B,SAAAO,cAAqG,CAArGC,mBAAqG,SAAA;KAA9F,UAAA;KAAS,SAAQ;KAAW,aAAA;KAAa,KAAKR,KAAAA,KAAK,MAAM;KAAK,OAAM;IAC3E,GAAA,MAAA,GAAA,UAAA,GAAAQ,mBASC,SAAA;KARE,OAAOR,KAAAA,KAAK,MAAM;KACnB,iBAAgB;KACf,aAAaK,MAAA,CAAA,CAAC,CAAA,kBAAA;KACd,cAAYA,MAAA,CAAA,CAAC,CAAA,kBAAA;KACd,cAAa;KACZ,UAAQ,CAAGJ,KAAAA,OAAO;KACnB,OAAM;KACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,iBAAgB,EAAA,OAAW,OAAO,OAA4B,MAAK,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EditorFeature } from "../../core/feature.js";
|
|
2
|
+
import "../../core/index.js";
|
|
3
|
+
import { MediaNodeViews } from "./node-views.js";
|
|
4
|
+
//#region src/features/media/feature.d.ts
|
|
5
|
+
/** What a framework binding supplies to the media feature. */
|
|
6
|
+
export interface MediaUi<C> {
|
|
7
|
+
/** The „Audio aufnehmen“ modal; mounted as an overlay, opened by `openAudioRecorder(editor)`. */
|
|
8
|
+
recorderModal: C;
|
|
9
|
+
/** The audio, video and file block views of the framework. */
|
|
10
|
+
nodeViews: MediaNodeViews;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Image, audio, video and file blocks with their views, upload (the surface's `upload` prop, else the document's asset
|
|
14
|
+
* endpoint), drop/paste of files, the audio recorder, and the toolbar and `/` entries that open the file picker or
|
|
15
|
+
* recorder. Files import through the pipeline: text and Markdown files are parsed into blocks, everything else is
|
|
16
|
+
* uploaded; the `wrapImport` stage (identity by default) may wrap the blocks, which are then inserted as they are.
|
|
17
|
+
* Import problems reach the user through the surface's notice seam (`ctx.notify`).
|
|
18
|
+
* Needs a backend (or an `upload` function) only when a file is uploaded.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mediaFeatureCore<C>(ui: MediaUi<C>): EditorFeature<C>;
|
|
21
|
+
//#endregion
|
|
22
|
+
//# sourceMappingURL=feature.d.ts.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ABILITY } from "../../core/schema/abilities.js";
|
|
2
|
+
import { acceptFor } from "./schema.js";
|
|
3
|
+
import { Media, openAudioRecorder, pickFiles, uploadOf } from "./upload.js";
|
|
4
|
+
import { fileImport } from "./file-import.js";
|
|
5
|
+
import { mediaBlocks } from "./node-views.js";
|
|
6
|
+
import { Image } from "@tiptap/extension-image";
|
|
7
|
+
import { FileHandler } from "@tiptap/extension-file-handler";
|
|
8
|
+
//#region src/features/media/feature.ts
|
|
9
|
+
const PICKERS = [
|
|
10
|
+
{
|
|
11
|
+
id: "bild",
|
|
12
|
+
labelKey: "media.picker.image",
|
|
13
|
+
icon: "i-lucide-image",
|
|
14
|
+
kind: "image"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "audio",
|
|
18
|
+
labelKey: "media.picker.audio",
|
|
19
|
+
icon: "i-lucide-file-audio",
|
|
20
|
+
kind: "audio"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "video",
|
|
24
|
+
labelKey: "media.picker.video",
|
|
25
|
+
icon: "i-lucide-video",
|
|
26
|
+
kind: "video"
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Image, audio, video and file blocks with their views, upload (the surface's `upload` prop, else the document's asset
|
|
31
|
+
* endpoint), drop/paste of files, the audio recorder, and the toolbar and `/` entries that open the file picker or
|
|
32
|
+
* recorder. Files import through the pipeline: text and Markdown files are parsed into blocks, everything else is
|
|
33
|
+
* uploaded; the `wrapImport` stage (identity by default) may wrap the blocks, which are then inserted as they are.
|
|
34
|
+
* Import problems reach the user through the surface's notice seam (`ctx.notify`).
|
|
35
|
+
* Needs a backend (or an `upload` function) only when a file is uploaded.
|
|
36
|
+
*/
|
|
37
|
+
function mediaFeatureCore(ui) {
|
|
38
|
+
const { AudioBlock, VideoBlock, FileBlock } = mediaBlocks(ui.nodeViews);
|
|
39
|
+
return {
|
|
40
|
+
id: "media",
|
|
41
|
+
extensions: (ctx) => {
|
|
42
|
+
const { importFiles } = fileImport(ctx.notify, ctx.t);
|
|
43
|
+
return [
|
|
44
|
+
Image,
|
|
45
|
+
AudioBlock,
|
|
46
|
+
VideoBlock,
|
|
47
|
+
FileBlock,
|
|
48
|
+
Media.configure({
|
|
49
|
+
upload: uploadOf(ctx),
|
|
50
|
+
importFiles
|
|
51
|
+
}),
|
|
52
|
+
FileHandler.configure({
|
|
53
|
+
consumePasteEvent: true,
|
|
54
|
+
onDrop: (editor, files, pos) => importFiles(editor, files, pos),
|
|
55
|
+
onPaste: (editor, files) => importFiles(editor, files)
|
|
56
|
+
})
|
|
57
|
+
];
|
|
58
|
+
},
|
|
59
|
+
toolbar: (ctx) => [{
|
|
60
|
+
id: "inserts",
|
|
61
|
+
order: 50,
|
|
62
|
+
items: [...PICKERS.map((picker, index) => ({
|
|
63
|
+
id: picker.id,
|
|
64
|
+
order: 20 + index * 10,
|
|
65
|
+
icon: picker.icon,
|
|
66
|
+
label: ctx.t(picker.labelKey),
|
|
67
|
+
ability: ABILITY.media,
|
|
68
|
+
run: (editor) => void pickAndImport(editor, acceptFor(picker.kind))
|
|
69
|
+
})), {
|
|
70
|
+
id: "aufnahme",
|
|
71
|
+
order: 50,
|
|
72
|
+
icon: "i-lucide-mic",
|
|
73
|
+
label: ctx.t("media.toolbar.record"),
|
|
74
|
+
ability: ABILITY.record,
|
|
75
|
+
run: openAudioRecorder
|
|
76
|
+
}]
|
|
77
|
+
}],
|
|
78
|
+
slashCommands: (ctx) => [...PICKERS.map((picker) => ({
|
|
79
|
+
id: picker.id,
|
|
80
|
+
label: ctx.t(picker.labelKey),
|
|
81
|
+
icon: picker.icon,
|
|
82
|
+
ability: ABILITY.media,
|
|
83
|
+
run: (editor) => void pickAndImport(editor, acceptFor(picker.kind), editor.state.selection.from)
|
|
84
|
+
})), {
|
|
85
|
+
id: "aufnahme",
|
|
86
|
+
label: ctx.t("media.slash.record"),
|
|
87
|
+
icon: "i-lucide-mic",
|
|
88
|
+
ability: ABILITY.record,
|
|
89
|
+
run: openAudioRecorder
|
|
90
|
+
}],
|
|
91
|
+
overlays: [ui.recorderModal]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
async function pickAndImport(editor, accept, pos) {
|
|
95
|
+
const files = await pickFiles(accept);
|
|
96
|
+
if (files.length && !editor.isDestroyed) await editor.storage.media.importFiles(editor, files, pos);
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { mediaFeatureCore };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","names":[],"sources":["../../../src/features/media/feature.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { FileHandler } from '@tiptap/extension-file-handler'\nimport { Image } from '@tiptap/extension-image'\nimport type { EditorFeature, SlashCommandItem, ToolbarItem } from '../../core'\nimport { ABILITY } from '../../core/schema'\nimport type { MessageKey } from '../../i18n'\nimport { fileImport } from './file-import'\nimport { type MediaNodeViews, mediaBlocks } from './node-views'\nimport { acceptFor, type MediaKind } from './schema'\nimport { Media, openAudioRecorder, pickFiles, uploadOf } from './upload'\n\n/** What a framework binding supplies to the media feature. */\nexport interface MediaUi<C> {\n /** The „Audio aufnehmen“ modal; mounted as an overlay, opened by `openAudioRecorder(editor)`. */\n recorderModal: C\n /** The audio, video and file block views of the framework. */\n nodeViews: MediaNodeViews\n}\n\nconst PICKERS: readonly { id: string, labelKey: MessageKey, icon: string, kind: MediaKind }[] = [\n { id: 'bild', labelKey: 'media.picker.image', icon: 'i-lucide-image', kind: 'image' },\n { id: 'audio', labelKey: 'media.picker.audio', icon: 'i-lucide-file-audio', kind: 'audio' },\n { id: 'video', labelKey: 'media.picker.video', icon: 'i-lucide-video', kind: 'video' },\n]\n\n/**\n * Image, audio, video and file blocks with their views, upload (the surface's `upload` prop, else the document's asset\n * endpoint), drop/paste of files, the audio recorder, and the toolbar and `/` entries that open the file picker or\n * recorder. Files import through the pipeline: text and Markdown files are parsed into blocks, everything else is\n * uploaded; the `wrapImport` stage (identity by default) may wrap the blocks, which are then inserted as they are.\n * Import problems reach the user through the surface's notice seam (`ctx.notify`).\n * Needs a backend (or an `upload` function) only when a file is uploaded.\n */\nexport function mediaFeatureCore<C>(ui: MediaUi<C>): EditorFeature<C> {\n const { AudioBlock, VideoBlock, FileBlock } = mediaBlocks(ui.nodeViews)\n return {\n id: 'media',\n extensions: (ctx) => {\n const { importFiles } = fileImport(ctx.notify, ctx.t)\n return [\n Image,\n AudioBlock,\n VideoBlock,\n FileBlock,\n Media.configure({ upload: uploadOf(ctx), importFiles }),\n FileHandler.configure({\n consumePasteEvent: true,\n onDrop: (editor, files, pos) => importFiles(editor, files, pos),\n onPaste: (editor, files) => importFiles(editor, files),\n }),\n ]\n },\n toolbar: ctx => [{\n id: 'inserts',\n order: 50,\n items: [\n ...PICKERS.map((picker, index): ToolbarItem<C> => ({\n id: picker.id,\n order: 20 + index * 10,\n icon: picker.icon,\n label: ctx.t(picker.labelKey),\n ability: ABILITY.media,\n run: editor => void pickAndImport(editor, acceptFor(picker.kind)),\n })),\n { id: 'aufnahme', order: 50, icon: 'i-lucide-mic', label: ctx.t('media.toolbar.record'), ability: ABILITY.record, run: openAudioRecorder },\n ],\n }],\n slashCommands: (ctx): SlashCommandItem[] => [\n ...PICKERS.map((picker): SlashCommandItem => ({\n id: picker.id,\n label: ctx.t(picker.labelKey),\n icon: picker.icon,\n ability: ABILITY.media,\n run: editor => void pickAndImport(editor, acceptFor(picker.kind), editor.state.selection.from),\n })),\n { id: 'aufnahme', label: ctx.t('media.slash.record'), icon: 'i-lucide-mic', ability: ABILITY.record, run: openAudioRecorder },\n ],\n overlays: [ui.recorderModal],\n }\n}\n\nasync function pickAndImport(editor: Editor, accept: string, pos?: number): Promise<void> {\n const files = await pickFiles(accept)\n if (files.length && !editor.isDestroyed) await editor.storage.media.importFiles(editor, files, pos)\n}\n"],"mappings":";;;;;;;;AAmBA,MAAM,UAA0F;CAC9F;EAAE,IAAI;EAAQ,UAAU;EAAsB,MAAM;EAAkB,MAAM;CAAQ;CACpF;EAAE,IAAI;EAAS,UAAU;EAAsB,MAAM;EAAuB,MAAM;CAAQ;CAC1F;EAAE,IAAI;EAAS,UAAU;EAAsB,MAAM;EAAkB,MAAM;CAAQ;AACvF;;;;;;;;;AAUA,SAAgB,iBAAoB,IAAkC;CACpE,MAAM,EAAE,YAAY,YAAY,cAAc,YAAY,GAAG,SAAS;CACtE,OAAO;EACL,IAAI;EACJ,aAAa,QAAQ;GACnB,MAAM,EAAE,gBAAgB,WAAW,IAAI,QAAQ,IAAI,CAAC;GACpD,OAAO;IACL;IACA;IACA;IACA;IACA,MAAM,UAAU;KAAE,QAAQ,SAAS,GAAG;KAAG;IAAY,CAAC;IACtD,YAAY,UAAU;KACpB,mBAAmB;KACnB,SAAS,QAAQ,OAAO,QAAQ,YAAY,QAAQ,OAAO,GAAG;KAC9D,UAAU,QAAQ,UAAU,YAAY,QAAQ,KAAK;IACvD,CAAC;GACH;EACF;EACA,UAAS,QAAO,CAAC;GACf,IAAI;GACJ,OAAO;GACP,OAAO,CACL,GAAG,QAAQ,KAAK,QAAQ,WAA2B;IACjD,IAAI,OAAO;IACX,OAAO,KAAK,QAAQ;IACpB,MAAM,OAAO;IACb,OAAO,IAAI,EAAE,OAAO,QAAQ;IAC5B,SAAS,QAAQ;IACjB,MAAK,WAAU,KAAK,cAAc,QAAQ,UAAU,OAAO,IAAI,CAAC;GAClE,EAAE,GACF;IAAE,IAAI;IAAY,OAAO;IAAI,MAAM;IAAgB,OAAO,IAAI,EAAE,sBAAsB;IAAG,SAAS,QAAQ;IAAQ,KAAK;GAAkB,CAC3I;EACF,CAAC;EACD,gBAAgB,QAA4B,CAC1C,GAAG,QAAQ,KAAK,YAA8B;GAC5C,IAAI,OAAO;GACX,OAAO,IAAI,EAAE,OAAO,QAAQ;GAC5B,MAAM,OAAO;GACb,SAAS,QAAQ;GACjB,MAAK,WAAU,KAAK,cAAc,QAAQ,UAAU,OAAO,IAAI,GAAG,OAAO,MAAM,UAAU,IAAI;EAC/F,EAAE,GACF;GAAE,IAAI;GAAY,OAAO,IAAI,EAAE,oBAAoB;GAAG,MAAM;GAAgB,SAAS,QAAQ;GAAQ,KAAK;EAAkB,CAC9H;EACA,UAAU,CAAC,GAAG,aAAa;CAC7B;AACF;AAEA,eAAe,cAAc,QAAgB,QAAgB,KAA6B;CACxF,MAAM,QAAQ,MAAM,UAAU,MAAM;CACpC,IAAI,MAAM,UAAU,CAAC,OAAO,aAAa,MAAM,OAAO,QAAQ,MAAM,YAAY,QAAQ,OAAO,GAAG;AACpG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Translate } from "../../i18n/index.js";
|
|
2
|
+
import { Notifier } from "../../core/notify.js";
|
|
3
|
+
import "../../core/index.js";
|
|
4
|
+
import { ImportFilesFn } from "./upload.js";
|
|
5
|
+
//#region src/features/media/file-import.d.ts
|
|
6
|
+
/** Text files are read into the document, bigger ones are refused. */
|
|
7
|
+
export declare const MAX_TEXT_BYTES: number;
|
|
8
|
+
/** Whether `file` is imported as text (parsed Markdown) rather than uploaded. */
|
|
9
|
+
export declare function isTextFile(file: File): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Imports files into the editor. Text and Markdown files are parsed through the editor's block pipeline into blocks;
|
|
12
|
+
* all other files are uploaded through `editor.storage.media.upload` and appear as their media or file block. The
|
|
13
|
+
* blocks go through the pipeline's `wrapImport` stage (identity unless an installed feature wraps imports) and are
|
|
14
|
+
* inserted as they are. Problems (an oversized text file, a failed upload) are reported through `notify` and the file
|
|
15
|
+
* is skipped. Framework-free: the Vue and React bindings pass their notifier and translator (`useFileImport()`), the feature passes `ctx.notify` and `ctx.t`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function fileImport(notify: Notifier, t: Translate): {
|
|
18
|
+
importFiles: ImportFilesFn;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=file-import.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { parseBlocks, structureBlocks, wrapImportBlocks } from "../../core/pipeline.js";
|
|
2
|
+
import { captureRange, releaseRanges, resolveRange } from "../../core/doc-anchors.js";
|
|
3
|
+
import { fetchErrorMessage } from "../../core/fetch-error.js";
|
|
4
|
+
import { mediaMime } from "./schema.js";
|
|
5
|
+
import { fileNodeFor, mediaNodeFor } from "./upload.js";
|
|
6
|
+
//#region src/features/media/file-import.ts
|
|
7
|
+
/** Text files are read into the document, bigger ones are refused. */
|
|
8
|
+
const MAX_TEXT_BYTES = 2097152;
|
|
9
|
+
/** Browsers report `''` (or something else) as the type of `.md` files, so the name decides too. */
|
|
10
|
+
const TEXT_EXTENSION = /\.(md|markdown|txt)$/i;
|
|
11
|
+
/** Whether `file` is imported as text (parsed Markdown) rather than uploaded. */
|
|
12
|
+
function isTextFile(file) {
|
|
13
|
+
const mime = mediaMime(file.type);
|
|
14
|
+
return mime === "text/markdown" || mime === "text/plain" || TEXT_EXTENSION.test(file.name);
|
|
15
|
+
}
|
|
16
|
+
/** Blocks for `file`: its text parsed through the editor's block pipeline (parse, normalize, segment, structure), or the uploaded media/file block. */
|
|
17
|
+
async function blocksOf(editor, file) {
|
|
18
|
+
if (isTextFile(file)) {
|
|
19
|
+
const blocks = structureBlocks(editor, parseBlocks(editor, await file.text()).blocks);
|
|
20
|
+
return blocks.length ? blocks : [{ type: "paragraph" }];
|
|
21
|
+
}
|
|
22
|
+
const { url } = await editor.storage.media.upload(file);
|
|
23
|
+
return [mediaNodeFor(file, url) ?? fileNodeFor(file, url)];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Imports files into the editor. Text and Markdown files are parsed through the editor's block pipeline into blocks;
|
|
27
|
+
* all other files are uploaded through `editor.storage.media.upload` and appear as their media or file block. The
|
|
28
|
+
* blocks go through the pipeline's `wrapImport` stage (identity unless an installed feature wraps imports) and are
|
|
29
|
+
* inserted as they are. Problems (an oversized text file, a failed upload) are reported through `notify` and the file
|
|
30
|
+
* is skipped. Framework-free: the Vue and React bindings pass their notifier and translator (`useFileImport()`), the feature passes `ctx.notify` and `ctx.t`.
|
|
31
|
+
*/
|
|
32
|
+
function fileImport(notify, t) {
|
|
33
|
+
async function importFiles(editor, files, pos) {
|
|
34
|
+
let anchor = pos === void 0 ? null : captureRange(editor, {
|
|
35
|
+
from: pos,
|
|
36
|
+
to: pos
|
|
37
|
+
});
|
|
38
|
+
let allImported = true;
|
|
39
|
+
try {
|
|
40
|
+
for (const file of Array.from(files)) {
|
|
41
|
+
if (isTextFile(file) && file.size > 2097152) {
|
|
42
|
+
notify({
|
|
43
|
+
title: t("media.import.tooLarge.title"),
|
|
44
|
+
description: t("media.import.tooLarge.description", { name: file.name }),
|
|
45
|
+
kind: "error"
|
|
46
|
+
});
|
|
47
|
+
allImported = false;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
const blocks = wrapImportBlocks(editor, file, await blocksOf(editor, file));
|
|
52
|
+
if (editor.isDestroyed) return false;
|
|
53
|
+
const at = (anchor && resolveRange(editor.state, anchor)?.from) ?? editor.state.selection.to;
|
|
54
|
+
editor.chain().focus().insertContentAt(at, blocks).run();
|
|
55
|
+
if (anchor) releaseRanges(editor, [anchor]);
|
|
56
|
+
anchor = null;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
notify({
|
|
59
|
+
title: t("media.import.failed"),
|
|
60
|
+
description: fetchErrorMessage(error),
|
|
61
|
+
kind: "error"
|
|
62
|
+
});
|
|
63
|
+
allImported = false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} finally {
|
|
67
|
+
if (anchor) releaseRanges(editor, [anchor]);
|
|
68
|
+
}
|
|
69
|
+
return allImported;
|
|
70
|
+
}
|
|
71
|
+
return { importFiles };
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { MAX_TEXT_BYTES, fileImport, isTextFile };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=file-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-import.js","names":[],"sources":["../../../src/features/media/file-import.ts"],"sourcesContent":["import type { Editor, JSONContent } from '@tiptap/core'\nimport type { Translate } from '../../i18n'\nimport { captureRange, fetchErrorMessage, type Notifier, parseBlocks, releaseRanges, resolveRange, structureBlocks, wrapImportBlocks } from '../../core'\nimport { mediaMime } from './schema'\nimport { fileNodeFor, type ImportFilesFn, mediaNodeFor } from './upload'\n\n/** Text files are read into the document, bigger ones are refused. */\nexport const MAX_TEXT_BYTES = 2 * 1024 * 1024\n/** Browsers report `''` (or something else) as the type of `.md` files, so the name decides too. */\nconst TEXT_EXTENSION = /\\.(md|markdown|txt)$/i\n\n/** Whether `file` is imported as text (parsed Markdown) rather than uploaded. */\nexport function isTextFile(file: File): boolean {\n const mime = mediaMime(file.type)\n return mime === 'text/markdown' || mime === 'text/plain' || TEXT_EXTENSION.test(file.name)\n}\n\n/** Blocks for `file`: its text parsed through the editor's block pipeline (parse, normalize, segment, structure), or the uploaded media/file block. */\nasync function blocksOf(editor: Editor, file: File): Promise<JSONContent[]> {\n if (isTextFile(file)) {\n const blocks = structureBlocks(editor, parseBlocks(editor, await file.text()).blocks)\n return blocks.length ? blocks : [{ type: 'paragraph' }]\n }\n const { url } = await editor.storage.media.upload(file)\n return [mediaNodeFor(file, url) ?? fileNodeFor(file, url)]\n}\n\n/**\n * Imports files into the editor. Text and Markdown files are parsed through the editor's block pipeline into blocks;\n * all other files are uploaded through `editor.storage.media.upload` and appear as their media or file block. The\n * blocks go through the pipeline's `wrapImport` stage (identity unless an installed feature wraps imports) and are\n * inserted as they are. Problems (an oversized text file, a failed upload) are reported through `notify` and the file\n * is skipped. Framework-free: the Vue and React bindings pass their notifier and translator (`useFileImport()`), the feature passes `ctx.notify` and `ctx.t`.\n */\nexport function fileImport(notify: Notifier, t: Translate): { importFiles: ImportFilesFn } {\n // Sequential so files land in selection order; a failed file is reported and skipped. A drop position is anchored,\n // since uploads take a while and the document may change meanwhile; later files follow the first one, because\n // `insertContentAt` leaves the selection right after what it inserted. Resolves whether every file was imported.\n async function importFiles(editor: Editor, files: File[] | FileList, pos?: number): Promise<boolean> {\n let anchor = pos === undefined ? null : captureRange(editor, { from: pos, to: pos })\n let allImported = true\n try {\n for (const file of Array.from(files)) {\n if (isTextFile(file) && file.size > MAX_TEXT_BYTES) {\n notify({ title: t('media.import.tooLarge.title'), description: t('media.import.tooLarge.description', { name: file.name }), kind: 'error' })\n allImported = false\n continue\n }\n try {\n const blocks = wrapImportBlocks(editor, file, await blocksOf(editor, file))\n if (editor.isDestroyed) return false\n const at = (anchor && resolveRange(editor.state, anchor)?.from) ?? editor.state.selection.to\n editor.chain().focus().insertContentAt(at, blocks).run()\n if (anchor) releaseRanges(editor, [anchor])\n anchor = null\n }\n catch (error) {\n notify({ title: t('media.import.failed'), description: fetchErrorMessage(error), kind: 'error' })\n allImported = false\n }\n }\n }\n finally {\n if (anchor) releaseRanges(editor, [anchor])\n }\n return allImported\n }\n\n return { importFiles }\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB;;AAE9B,MAAM,iBAAiB;;AAGvB,SAAgB,WAAW,MAAqB;CAC9C,MAAM,OAAO,UAAU,KAAK,IAAI;CAChC,OAAO,SAAS,mBAAmB,SAAS,gBAAgB,eAAe,KAAK,KAAK,IAAI;AAC3F;;AAGA,eAAe,SAAS,QAAgB,MAAoC;CAC1E,IAAI,WAAW,IAAI,GAAG;EACpB,MAAM,SAAS,gBAAgB,QAAQ,YAAY,QAAQ,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM;EACpF,OAAO,OAAO,SAAS,SAAS,CAAC,EAAE,MAAM,YAAY,CAAC;CACxD;CACA,MAAM,EAAE,QAAQ,MAAM,OAAO,QAAQ,MAAM,OAAO,IAAI;CACtD,OAAO,CAAC,aAAa,MAAM,GAAG,KAAK,YAAY,MAAM,GAAG,CAAC;AAC3D;;;;;;;;AASA,SAAgB,WAAW,QAAkB,GAA8C;CAIzF,eAAe,YAAY,QAAgB,OAA0B,KAAgC;EACnG,IAAI,SAAS,QAAQ,KAAA,IAAY,OAAO,aAAa,QAAQ;GAAE,MAAM;GAAK,IAAI;EAAI,CAAC;EACnF,IAAI,cAAc;EAClB,IAAI;GACF,KAAK,MAAM,QAAQ,MAAM,KAAK,KAAK,GAAG;IACpC,IAAI,WAAW,IAAI,KAAK,KAAK,OAAA,SAAuB;KAClD,OAAO;MAAE,OAAO,EAAE,6BAA6B;MAAG,aAAa,EAAE,qCAAqC,EAAE,MAAM,KAAK,KAAK,CAAC;MAAG,MAAM;KAAQ,CAAC;KAC3I,cAAc;KACd;IACF;IACA,IAAI;KACF,MAAM,SAAS,iBAAiB,QAAQ,MAAM,MAAM,SAAS,QAAQ,IAAI,CAAC;KAC1E,IAAI,OAAO,aAAa,OAAO;KAC/B,MAAM,MAAM,UAAU,aAAa,OAAO,OAAO,MAAM,CAAC,EAAE,SAAS,OAAO,MAAM,UAAU;KAC1F,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC,IAAI;KACvD,IAAI,QAAQ,cAAc,QAAQ,CAAC,MAAM,CAAC;KAC1C,SAAS;IACX,SACO,OAAO;KACZ,OAAO;MAAE,OAAO,EAAE,qBAAqB;MAAG,aAAa,kBAAkB,KAAK;MAAG,MAAM;KAAQ,CAAC;KAChG,cAAc;IAChB;GACF;EACF,UACQ;GACN,IAAI,QAAQ,cAAc,QAAQ,CAAC,MAAM,CAAC;EAC5C;EACA,OAAO;CACT;CAEA,OAAO,EAAE,YAAY;AACvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AudioRecorder, AudioRecorderState, AudioRecorderStatus, createAudioRecorder } from "./audio-recorder.js";
|
|
2
|
+
import { AUDIO_RECORDER_OPEN, ImportFilesFn, Media, fileNodeFor, formatBytes, mediaNodeFor, openAudioRecorder, pickFiles, postUpload, uploadOf } from "./upload.js";
|
|
3
|
+
import { MAX_TEXT_BYTES, fileImport, isTextFile } from "./file-import.js";
|
|
4
|
+
import { MediaNodeViews, mediaBlocks, playerOptions } from "./node-views.js";
|
|
5
|
+
import { MediaUi, mediaFeatureCore } from "./feature.js";
|
|
6
|
+
import { MAX_MEDIA_BYTES, MEDIA_TYPES, MediaKind, acceptFor, mediaKindOf, mediaMime } from "./schema.js";
|
|
7
|
+
export { AUDIO_RECORDER_OPEN, type AudioRecorder, type AudioRecorderState, type AudioRecorderStatus, type ImportFilesFn, MAX_MEDIA_BYTES, MAX_TEXT_BYTES, MEDIA_TYPES, Media, type MediaKind, type MediaNodeViews, type MediaUi, acceptFor, createAudioRecorder, fileImport, fileNodeFor, formatBytes, isTextFile, mediaBlocks, mediaFeatureCore, mediaKindOf, mediaMime, mediaNodeFor, openAudioRecorder, pickFiles, playerOptions, postUpload, uploadOf };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MAX_MEDIA_BYTES, MEDIA_TYPES, acceptFor, mediaKindOf, mediaMime } from "./schema.js";
|
|
2
|
+
import { createAudioRecorder } from "./audio-recorder.js";
|
|
3
|
+
import { AUDIO_RECORDER_OPEN, Media, fileNodeFor, formatBytes, mediaNodeFor, openAudioRecorder, pickFiles, postUpload, uploadOf } from "./upload.js";
|
|
4
|
+
import { MAX_TEXT_BYTES, fileImport, isTextFile } from "./file-import.js";
|
|
5
|
+
import { mediaBlocks, playerOptions } from "./node-views.js";
|
|
6
|
+
import { mediaFeatureCore } from "./feature.js";
|
|
7
|
+
export { AUDIO_RECORDER_OPEN, MAX_MEDIA_BYTES, MAX_TEXT_BYTES, MEDIA_TYPES, Media, acceptFor, createAudioRecorder, fileImport, fileNodeFor, formatBytes, isTextFile, mediaBlocks, mediaFeatureCore, mediaKindOf, mediaMime, mediaNodeFor, openAudioRecorder, pickFiles, playerOptions, postUpload, uploadOf };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NodeViewRenderer } from "@tiptap/core";
|
|
2
|
+
//#region src/features/media/node-views.d.ts
|
|
3
|
+
/** The node view renderers a framework binding supplies for the three blocks. */
|
|
4
|
+
export interface MediaNodeViews {
|
|
5
|
+
audio: NodeViewRenderer;
|
|
6
|
+
video: NodeViewRenderer;
|
|
7
|
+
file: NodeViewRenderer;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renderer options of the three media blocks (`VueNodeViewRenderer(view, playerOptions)`,
|
|
11
|
+
* `ReactNodeViewRenderer(view, playerOptions)`): the player and the title field get their own events, drags and drops
|
|
12
|
+
* excepted; elsewhere on the block ProseMirror selects and drags it as usual. The default `stopEvent` hands a mousedown
|
|
13
|
+
* on the player to ProseMirror, which makes the block draggable for that gesture, so dragging the seek bar or volume
|
|
14
|
+
* slider would drag the block instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare const playerOptions: {
|
|
17
|
+
stopEvent: ({ event }: {
|
|
18
|
+
event: Event;
|
|
19
|
+
}) => boolean;
|
|
20
|
+
};
|
|
21
|
+
/** The audio, video and file nodes of the schema with the views of a framework binding. */
|
|
22
|
+
export declare function mediaBlocks(nodeViews: MediaNodeViews): {
|
|
23
|
+
AudioBlock: import("@tiptap/core").Node<any, any>;
|
|
24
|
+
VideoBlock: import("@tiptap/core").Node<any, any>;
|
|
25
|
+
FileBlock: import("@tiptap/core").Node<any, any>;
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=node-views.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AudioNode, FileNode, VideoNode } from "./schema.js";
|
|
2
|
+
//#region src/features/media/node-views.ts
|
|
3
|
+
/**
|
|
4
|
+
* Renderer options of the three media blocks (`VueNodeViewRenderer(view, playerOptions)`,
|
|
5
|
+
* `ReactNodeViewRenderer(view, playerOptions)`): the player and the title field get their own events, drags and drops
|
|
6
|
+
* excepted; elsewhere on the block ProseMirror selects and drags it as usual. The default `stopEvent` hands a mousedown
|
|
7
|
+
* on the player to ProseMirror, which makes the block draggable for that gesture, so dragging the seek bar or volume
|
|
8
|
+
* slider would drag the block instead.
|
|
9
|
+
*/
|
|
10
|
+
const playerOptions = { stopEvent: ({ event }) => event.target instanceof Element && !!event.target.closest("audio, video, input") && !event.type.startsWith("drag") && event.type !== "drop" };
|
|
11
|
+
/** The audio, video and file nodes of the schema with the views of a framework binding. */
|
|
12
|
+
function mediaBlocks(nodeViews) {
|
|
13
|
+
return {
|
|
14
|
+
AudioBlock: AudioNode.extend({ addNodeView() {
|
|
15
|
+
return nodeViews.audio;
|
|
16
|
+
} }),
|
|
17
|
+
VideoBlock: VideoNode.extend({ addNodeView() {
|
|
18
|
+
return nodeViews.video;
|
|
19
|
+
} }),
|
|
20
|
+
FileBlock: FileNode.extend({ addNodeView() {
|
|
21
|
+
return nodeViews.file;
|
|
22
|
+
} })
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { mediaBlocks, playerOptions };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=node-views.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-views.js","names":[],"sources":["../../../src/features/media/node-views.ts"],"sourcesContent":["import type { NodeViewRenderer } from '@tiptap/core'\nimport { AudioNode, FileNode, VideoNode } from './schema'\n\n/** The node view renderers a framework binding supplies for the three blocks. */\nexport interface MediaNodeViews {\n audio: NodeViewRenderer\n video: NodeViewRenderer\n file: NodeViewRenderer\n}\n\n/**\n * Renderer options of the three media blocks (`VueNodeViewRenderer(view, playerOptions)`,\n * `ReactNodeViewRenderer(view, playerOptions)`): the player and the title field get their own events, drags and drops\n * excepted; elsewhere on the block ProseMirror selects and drags it as usual. The default `stopEvent` hands a mousedown\n * on the player to ProseMirror, which makes the block draggable for that gesture, so dragging the seek bar or volume\n * slider would drag the block instead.\n */\nexport const playerOptions = {\n stopEvent: ({ event }: { event: Event }): boolean => event.target instanceof Element\n && !!event.target.closest('audio, video, input')\n && !event.type.startsWith('drag')\n && event.type !== 'drop',\n}\n\n/** The audio, video and file nodes of the schema with the views of a framework binding. */\nexport function mediaBlocks(nodeViews: MediaNodeViews) {\n return {\n // Explicit return types: the declarations stay independent of the framework views' inferred types.\n AudioBlock: AudioNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.audio\n },\n }),\n VideoBlock: VideoNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.video\n },\n }),\n // Same event handling as the players: the title field keeps its own events, drags and drops excepted.\n FileBlock: FileNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.file\n },\n }),\n }\n}\n"],"mappings":";;;;;;;;;AAiBA,MAAa,gBAAgB,EAC3B,YAAY,EAAE,YAAuC,MAAM,kBAAkB,WACxE,CAAC,CAAC,MAAM,OAAO,QAAQ,qBAAqB,KAC5C,CAAC,MAAM,KAAK,WAAW,MAAM,KAC7B,MAAM,SAAS,OACtB;;AAGA,SAAgB,YAAY,WAA2B;CACrD,OAAO;EAEL,YAAY,UAAU,OAAO,EAC3B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;EACD,YAAY,UAAU,OAAO,EAC3B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;EAED,WAAW,SAAS,OAAO,EACzB,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;CACH;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
//#region src/features/media/react/AudioRecorderModal.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* „Audio aufnehmen“, opened by `openAudioRecorder(editor)` (toolbar „Aufnahme“): records in the browser and imports the
|
|
5
|
+
* file through `importFiles` (upload, wrapped by the pipeline's `wrapImport` stage) where the caret was when the modal opened.
|
|
6
|
+
* Nothing enters the (possibly shared) document before the upload succeeded.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AudioRecorderModal({ editor }: {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=AudioRecorderModal.d.ts.map
|