@ecsplico/editor 3.5.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/dist/adapters/direct-ai.d.ts +4 -4
- package/dist/adapters/direct-ai.js +2 -2
- package/dist/adapters/direct-ai.js.map +1 -1
- package/dist/adapters/document-state.d.ts +1 -1
- package/dist/adapters/document-state.js.map +1 -1
- package/dist/adapters/forge.d.ts +2 -2
- package/dist/adapters/forge.js.map +1 -1
- package/dist/adapters/nitro.d.ts +11 -3
- package/dist/adapters/nitro.js +3 -1
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/adapters/shared.d.ts +6 -6
- package/dist/adapters/shared.js.map +1 -1
- package/dist/code/CodeSurface.vue.d.ts +3 -3
- package/dist/config/index.d.ts +14 -14
- package/dist/config/index.js +8 -8
- package/dist/config/index.js.map +1 -1
- package/dist/core/backend-types.d.ts +3 -3
- package/dist/core/backend-types.js.map +1 -1
- package/dist/core/backend.d.ts +4 -4
- package/dist/core/backend.js.map +1 -1
- package/dist/core/block-convert.d.ts +1 -1
- package/dist/core/block-convert.js +5 -5
- package/dist/core/block-convert.js.map +1 -1
- package/dist/core/block-transfer.d.ts +8 -4
- package/dist/core/block-transfer.js +23 -14
- package/dist/core/block-transfer.js.map +1 -1
- package/dist/core/capabilities.d.ts +113 -0
- package/dist/core/capabilities.js +155 -0
- package/dist/core/capabilities.js.map +1 -0
- package/dist/core/command-types.d.ts +1 -1
- package/dist/core/context.js.map +1 -1
- package/dist/core/convert.d.ts +5 -5
- package/dist/core/convert.js +5 -5
- package/dist/core/convert.js.map +1 -1
- package/dist/core/core-feature.js +1 -1
- package/dist/core/define-editor.d.ts +2 -2
- package/dist/core/define-editor.js +34 -6
- package/dist/core/define-editor.js.map +1 -1
- package/dist/core/derivation.d.ts +119 -0
- package/dist/core/derivation.js +187 -0
- package/dist/core/derivation.js.map +1 -0
- package/dist/core/derive.d.ts +61 -0
- package/dist/core/derive.js +69 -0
- package/dist/core/derive.js.map +1 -0
- package/dist/core/extension-points.d.ts +16 -0
- package/dist/core/feature-context.d.ts +5 -1
- package/dist/core/feature-context.js +10 -3
- package/dist/core/feature-context.js.map +1 -1
- package/dist/core/feature.d.ts +41 -19
- package/dist/core/feature.js.map +1 -1
- package/dist/core/fences.js +1 -1
- package/dist/core/fences.js.map +1 -1
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.js +5 -1
- package/dist/core/pipeline.d.ts +14 -5
- package/dist/core/pipeline.js +19 -7
- package/dist/core/pipeline.js.map +1 -1
- package/dist/core/properties.d.ts +22 -0
- package/dist/core/properties.js +17 -0
- package/dist/core/properties.js.map +1 -0
- package/dist/core/schema/block-ids.js +5 -5
- package/dist/core/schema/block-ids.js.map +1 -1
- package/dist/core/schema/index.d.ts +2 -1
- package/dist/core/schema/index.js +2 -1
- package/dist/core/schema/index.js.map +1 -1
- package/dist/core/schema/opaque-fence.d.ts +4 -4
- package/dist/core/schema/opaque-fence.js +7 -7
- package/dist/core/schema/opaque-fence.js.map +1 -1
- package/dist/core/schema/persisted-names.d.ts +58 -0
- package/dist/core/schema/persisted-names.js +96 -0
- package/dist/core/schema/persisted-names.js.map +1 -0
- package/dist/core/toolbar-items.js +1 -1
- package/dist/core/toolbar-items.js.map +1 -1
- package/dist/core/util.js +5 -1
- package/dist/core/util.js.map +1 -1
- package/dist/document/DocumentSurface.vue.d.ts +3 -3
- package/dist/features/ai/agent-ops.js +1 -1
- package/dist/features/ai/ai-review.js +1 -1
- package/dist/features/ai/assistant.d.ts +4 -4
- package/dist/features/ai/assistant.js +1 -1
- package/dist/features/ai/assistant.js.map +1 -1
- package/dist/features/ai/components/AiSelectionMenu.js +1 -1
- package/dist/features/ai/components/AiSelectionMenu.js.map +1 -1
- package/dist/features/ai/components/ModelQuickSwitch.js +7 -7
- package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -1
- package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +4 -4
- package/dist/features/ai/components/SettingsAiTab.js +8 -8
- package/dist/features/ai/components/SettingsAiTab.js.map +1 -1
- package/dist/features/ai/components/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -1
- package/dist/features/ai/document-chat-model.d.ts +2 -2
- package/dist/features/ai/document-chat-model.js +5 -5
- package/dist/features/ai/document-chat-model.js.map +1 -1
- package/dist/features/ai/document-chat.js +2 -2
- package/dist/features/ai/document-chat.js.map +1 -1
- package/dist/features/ai/feature.d.ts +2 -2
- package/dist/features/ai/feature.js +2 -2
- package/dist/features/ai/feature.js.map +1 -1
- package/dist/features/ai/ghost-autocomplete.d.ts +4 -4
- package/dist/features/ai/ghost-autocomplete.js +1 -1
- package/dist/features/ai/ghost-autocomplete.js.map +1 -1
- package/dist/features/ai/index.d.ts +3 -3
- package/dist/features/ai/index.js +2 -2
- package/dist/features/ai/model-profiles.d.ts +9 -9
- package/dist/features/ai/model-profiles.js +13 -13
- package/dist/features/ai/model-profiles.js.map +1 -1
- package/dist/features/ai/protocol/agent-ops.d.ts +2 -2
- package/dist/features/ai/protocol/agent-ops.js +1 -1
- package/dist/features/ai/protocol/agent-ops.js.map +1 -1
- package/dist/features/ai/protocol/block-lines.d.ts +7 -7
- package/dist/features/ai/protocol/block-lines.js +10 -10
- package/dist/features/ai/protocol/block-lines.js.map +1 -1
- package/dist/features/ai/protocol/chat.d.ts +5 -5
- package/dist/features/ai/protocol/chat.js +12 -12
- package/dist/features/ai/protocol/chat.js.map +1 -1
- package/dist/features/ai/protocol/generate.d.ts +1 -1
- package/dist/features/ai/protocol/generate.js +1 -1
- package/dist/features/ai/protocol/generate.js.map +1 -1
- package/dist/features/ai/protocol/index.d.ts +3 -3
- package/dist/features/ai/protocol/index.js +2 -2
- package/dist/features/ai/protocol/models.d.ts +3 -3
- package/dist/features/ai/protocol/models.js +3 -3
- package/dist/features/ai/protocol/models.js.map +1 -1
- package/dist/features/ai/protocol/schemas.d.ts +1 -1
- package/dist/features/ai/protocol/schemas.js +1 -1
- package/dist/features/ai/protocol/schemas.js.map +1 -1
- package/dist/features/ai/protocol/tasks.d.ts +5 -5
- package/dist/features/ai/protocol/tasks.js +12 -12
- package/dist/features/ai/protocol/tasks.js.map +1 -1
- package/dist/features/ai/react/AiSelectionMenu.js.map +1 -1
- package/dist/features/ai/react/ModelQuickSwitch.d.ts +4 -4
- package/dist/features/ai/react/ModelQuickSwitch.js +6 -6
- package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -1
- package/dist/features/ai/react/SettingsAiTab.d.ts +1 -1
- package/dist/features/ai/react/SettingsAiTab.js +8 -8
- package/dist/features/ai/react/SettingsAiTab.js.map +1 -1
- package/dist/features/ai/react/SettingsModelProfiles.d.ts +1 -1
- package/dist/features/ai/react/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -1
- package/dist/features/ai/react/use-ai-assistant.d.ts +1 -1
- package/dist/features/ai/react/use-ai-assistant.js +1 -1
- package/dist/features/ai/react/use-ai-assistant.js.map +1 -1
- package/dist/features/ai/react/use-model-profiles.d.ts +5 -5
- package/dist/features/ai/react/use-model-profiles.js +2 -2
- package/dist/features/ai/react/use-model-profiles.js.map +1 -1
- package/dist/features/ai/use-ai-assistant.d.ts +1 -1
- package/dist/features/ai/use-ai-assistant.js +1 -1
- package/dist/features/ai/use-ai-assistant.js.map +1 -1
- package/dist/features/ai/use-model-profiles.d.ts +4 -4
- package/dist/features/ai/use-model-profiles.js +2 -2
- package/dist/features/ai/use-model-profiles.js.map +1 -1
- package/dist/features/block-ui/block-actions.d.ts +8 -4
- package/dist/features/block-ui/block-actions.js +38 -22
- package/dist/features/block-ui/block-actions.js.map +1 -1
- package/dist/features/block-ui/block-target.d.ts +29 -0
- package/dist/features/block-ui/block-target.js +63 -0
- package/dist/features/block-ui/block-target.js.map +1 -0
- package/dist/features/block-ui/components/BlockHandles.js +3 -3
- package/dist/features/block-ui/components/BlockHandles.js.map +1 -1
- package/dist/features/block-ui/components/BlockUi.js +11 -23
- package/dist/features/block-ui/components/BlockUi.js.map +1 -1
- package/dist/features/block-ui/feature.d.ts +3 -2
- package/dist/features/block-ui/feature.js +3 -2
- package/dist/features/block-ui/feature.js.map +1 -1
- package/dist/features/block-ui/handle-geometry.js +12 -23
- package/dist/features/block-ui/handle-geometry.js.map +1 -1
- package/dist/features/block-ui/index.d.ts +2 -1
- package/dist/features/block-ui/index.js +2 -1
- package/dist/features/block-ui/react/BlockHandles.d.ts +1 -1
- package/dist/features/block-ui/react/BlockHandles.js +4 -4
- package/dist/features/block-ui/react/BlockHandles.js.map +1 -1
- package/dist/features/block-ui/react/BlockUi.js +13 -25
- package/dist/features/block-ui/react/BlockUi.js.map +1 -1
- package/dist/features/comments/model.js +1 -1
- package/dist/features/composites/accepted-children.d.ts +5 -4
- package/dist/features/composites/accepted-children.js +26 -26
- package/dist/features/composites/accepted-children.js.map +1 -1
- package/dist/features/composites/ai-brief.d.ts +4 -4
- package/dist/features/composites/ai-brief.js +14 -12
- package/dist/features/composites/ai-brief.js.map +1 -1
- package/dist/features/composites/anchors.d.ts +1 -1
- package/dist/features/composites/anchors.js.map +1 -1
- package/dist/features/composites/baskets.d.ts +1 -1
- package/dist/features/composites/baskets.js.map +1 -1
- package/dist/features/composites/bibliography-command.d.ts +1 -1
- package/dist/features/composites/bibliography-form.js +1 -1
- package/dist/features/composites/bibliography-form.js.map +1 -1
- package/dist/features/composites/bibliography.js.map +1 -1
- package/dist/features/composites/block-types-json.d.ts +38 -0
- package/dist/features/composites/block-types-json.js +122 -0
- package/dist/features/composites/block-types-json.js.map +1 -0
- package/dist/features/composites/block-types.d.ts +119 -0
- package/dist/features/composites/block-types.js +343 -0
- package/dist/features/composites/block-types.js.map +1 -0
- package/dist/features/composites/capabilities.js +109 -0
- package/dist/features/composites/capabilities.js.map +1 -0
- package/dist/features/composites/components/BibliographyEditor.js +5 -5
- package/dist/features/composites/components/BibliographyEditor.js.map +1 -1
- package/dist/features/composites/components/CompositeBasketMenu.js +2 -2
- package/dist/features/composites/components/CompositeBasketMenu.js.map +1 -1
- package/dist/features/composites/components/CompositeChrome.js +18 -8
- package/dist/features/composites/components/CompositeChrome.js.map +1 -1
- package/dist/features/composites/components/CompositeChrome.vue.d.ts +1 -1
- package/dist/features/composites/components/CompositeDetails.js +11 -10
- package/dist/features/composites/components/CompositeDetails.js.map +1 -1
- package/dist/features/composites/components/CompositeDetails.vue.d.ts +1 -1
- package/dist/features/composites/components/CompositeFieldEditor.js +7 -7
- package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -1
- package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +5 -5
- package/dist/features/composites/components/CompositeInspector.js +136 -113
- package/dist/features/composites/components/CompositeInspector.js.map +1 -1
- package/dist/features/composites/components/CompositeInspector.vue.d.ts +3 -3
- package/dist/features/composites/components/CompositeStatusMenu.js +2 -2
- package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -1
- package/dist/features/composites/components/CompositeSummaryEditor.js +1 -1
- package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -1
- package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +1 -1
- package/dist/features/composites/components/CompositeTable.js +2 -2
- package/dist/features/composites/components/CompositeTable.js.map +1 -1
- package/dist/features/composites/components/CompositeTagsEditor.js +1 -1
- package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -1
- package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +1 -1
- package/dist/features/composites/components/CompositeView.js +19 -17
- package/dist/features/composites/components/CompositeView.js.map +1 -1
- package/dist/features/composites/components/DerivationBadge.js +15 -6
- package/dist/features/composites/components/DerivationBadge.js.map +1 -1
- package/dist/features/composites/components/FocusChip.js +1 -1
- package/dist/features/composites/components/FocusChip.js.map +1 -1
- package/dist/features/composites/components/FocusChip.vue.d.ts +1 -1
- package/dist/features/composites/components/ReferenceFieldSelect.js +3 -3
- package/dist/features/composites/components/ReferenceFieldSelect.js.map +1 -1
- package/dist/features/composites/components/ReferenceView.js +1 -1
- package/dist/features/composites/components/ReferenceView.js.map +1 -1
- package/dist/features/composites/components/SettingsEditingTab.js +18 -18
- package/dist/features/composites/components/SettingsEditingTab.js.map +1 -1
- package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +3 -3
- package/dist/features/composites/convert.d.ts +4 -4
- package/dist/features/composites/convert.js +27 -28
- package/dist/features/composites/convert.js.map +1 -1
- package/dist/features/composites/derived-chrome.js +34 -28
- package/dist/features/composites/derived-chrome.js.map +1 -1
- package/dist/features/composites/editing-settings-keys.js +6 -6
- package/dist/features/composites/editing-settings-keys.js.map +1 -1
- package/dist/features/composites/feature.d.ts +10 -10
- package/dist/features/composites/feature.js +58 -46
- package/dist/features/composites/feature.js.map +1 -1
- package/dist/features/composites/fences.d.ts +3 -3
- package/dist/features/composites/fences.js +18 -13
- package/dist/features/composites/fences.js.map +1 -1
- package/dist/features/composites/focus.d.ts +10 -10
- package/dist/features/composites/focus.js +11 -11
- package/dist/features/composites/focus.js.map +1 -1
- package/dist/features/composites/heading-composites.d.ts +5 -5
- package/dist/features/composites/heading-composites.js +13 -16
- package/dist/features/composites/heading-composites.js.map +1 -1
- package/dist/features/composites/index.d.ts +20 -18
- package/dist/features/composites/index.js +9 -7
- package/dist/features/composites/inspector-model.d.ts +45 -22
- package/dist/features/composites/inspector-model.js +53 -14
- package/dist/features/composites/inspector-model.js.map +1 -1
- package/dist/features/composites/legacy.d.ts +5 -4
- package/dist/features/composites/legacy.js +16 -23
- package/dist/features/composites/legacy.js.map +1 -1
- package/dist/features/composites/markdown-export.js +3 -3
- package/dist/features/composites/markdown-export.js.map +1 -1
- package/dist/features/composites/merge.d.ts +8 -7
- package/dist/features/composites/merge.js +39 -12
- package/dist/features/composites/merge.js.map +1 -1
- package/dist/features/composites/meta-display.js +5 -5
- package/dist/features/composites/meta-display.js.map +1 -1
- package/dist/features/composites/meta-keys.d.ts +5 -5
- package/dist/features/composites/meta-keys.js +8 -8
- package/dist/features/composites/meta-keys.js.map +1 -1
- package/dist/features/composites/node-views.d.ts +3 -3
- package/dist/features/composites/node-views.js +2 -2
- package/dist/features/composites/node-views.js.map +1 -1
- package/dist/features/composites/nodes.d.ts +13 -13
- package/dist/features/composites/nodes.js +100 -77
- package/dist/features/composites/nodes.js.map +1 -1
- package/dist/features/composites/outline.d.ts +15 -12
- package/dist/features/composites/outline.js +24 -21
- package/dist/features/composites/outline.js.map +1 -1
- package/dist/features/composites/properties.d.ts +51 -0
- package/dist/features/composites/properties.js +89 -0
- package/dist/features/composites/properties.js.map +1 -0
- package/dist/features/composites/react/BibliographyEditor.js +5 -5
- package/dist/features/composites/react/BibliographyEditor.js.map +1 -1
- package/dist/features/composites/react/CompositeBasketMenu.js +2 -2
- package/dist/features/composites/react/CompositeBasketMenu.js.map +1 -1
- package/dist/features/composites/react/CompositeChrome.d.ts +1 -1
- package/dist/features/composites/react/CompositeChrome.js +15 -6
- package/dist/features/composites/react/CompositeChrome.js.map +1 -1
- package/dist/features/composites/react/CompositeDetails.d.ts +1 -1
- package/dist/features/composites/react/CompositeDetails.js +11 -10
- package/dist/features/composites/react/CompositeDetails.js.map +1 -1
- package/dist/features/composites/react/CompositeFieldEditor.d.ts +5 -5
- package/dist/features/composites/react/CompositeFieldEditor.js +6 -6
- package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -1
- package/dist/features/composites/react/CompositeInspector.d.ts +3 -3
- package/dist/features/composites/react/CompositeInspector.js +142 -128
- package/dist/features/composites/react/CompositeInspector.js.map +1 -1
- package/dist/features/composites/react/CompositeStatusMenu.js +2 -2
- package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -1
- package/dist/features/composites/react/CompositeSummaryEditor.d.ts +1 -1
- package/dist/features/composites/react/CompositeSummaryEditor.js +1 -1
- package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -1
- package/dist/features/composites/react/CompositeTable.d.ts +1 -1
- package/dist/features/composites/react/CompositeTable.js +3 -3
- package/dist/features/composites/react/CompositeTable.js.map +1 -1
- package/dist/features/composites/react/CompositeTagsEditor.d.ts +1 -1
- package/dist/features/composites/react/CompositeTagsEditor.js +1 -1
- package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -1
- package/dist/features/composites/react/CompositeView.js +17 -15
- package/dist/features/composites/react/CompositeView.js.map +1 -1
- package/dist/features/composites/react/DerivationBadge.js +13 -4
- package/dist/features/composites/react/DerivationBadge.js.map +1 -1
- package/dist/features/composites/react/FocusChip.d.ts +1 -1
- package/dist/features/composites/react/FocusChip.js +1 -1
- package/dist/features/composites/react/FocusChip.js.map +1 -1
- package/dist/features/composites/react/ReferenceFieldSelect.js +3 -3
- package/dist/features/composites/react/ReferenceFieldSelect.js.map +1 -1
- package/dist/features/composites/react/ReferenceView.d.ts +1 -1
- package/dist/features/composites/react/ReferenceView.js +1 -1
- package/dist/features/composites/react/ReferenceView.js.map +1 -1
- package/dist/features/composites/react/SettingsEditingTab.d.ts +4 -4
- package/dist/features/composites/react/SettingsEditingTab.js +20 -20
- package/dist/features/composites/react/SettingsEditingTab.js.map +1 -1
- package/dist/features/composites/react.js +1 -1
- package/dist/features/composites/react.js.map +1 -1
- package/dist/features/composites/reference-ai.js +1 -1
- package/dist/features/composites/reference-ai.js.map +1 -1
- package/dist/features/composites/reference-label.d.ts +3 -3
- package/dist/features/composites/reference-label.js +6 -6
- package/dist/features/composites/reference-label.js.map +1 -1
- package/dist/features/composites/reference-suggestion.d.ts +1 -1
- package/dist/features/composites/reference-suggestion.js +3 -3
- package/dist/features/composites/reference-suggestion.js.map +1 -1
- package/dist/features/composites/reference-text.d.ts +2 -2
- package/dist/features/composites/reference-text.js +4 -4
- package/dist/features/composites/reference-text.js.map +1 -1
- package/dist/features/composites/reference.d.ts +3 -3
- package/dist/features/composites/reference.js +1 -1
- package/dist/features/composites/reference.js.map +1 -1
- package/dist/features/composites/reveal-source.d.ts +3 -3
- package/dist/features/composites/reveal-source.js +6 -6
- package/dist/features/composites/reveal-source.js.map +1 -1
- package/dist/features/composites/rows-model.d.ts +2 -2
- package/dist/features/composites/rows-model.js +4 -3
- package/dist/features/composites/rows-model.js.map +1 -1
- package/dist/features/composites/rows.d.ts +16 -28
- package/dist/features/composites/rows.js +20 -54
- package/dist/features/composites/rows.js.map +1 -1
- package/dist/features/composites/schema.d.ts +12 -11
- package/dist/features/composites/schema.js +10 -9
- package/dist/features/composites/schema.js.map +1 -1
- package/dist/features/composites/source.d.ts +20 -0
- package/dist/features/composites/source.js +40 -0
- package/dist/features/composites/source.js.map +1 -0
- package/dist/features/composites/split.d.ts +11 -11
- package/dist/features/composites/split.js +20 -20
- package/dist/features/composites/split.js.map +1 -1
- package/dist/features/composites/structure-mode.js +3 -3
- package/dist/features/composites/structure-mode.js.map +1 -1
- package/dist/features/composites/table-model.js +2 -2
- package/dist/features/composites/table-model.js.map +1 -1
- package/dist/features/composites/use-composite-inspector.js +3 -1
- package/dist/features/composites/use-composite-inspector.js.map +1 -1
- package/dist/features/composites/use-composite-rows.d.ts +2 -2
- package/dist/features/composites/use-composite-rows.js.map +1 -1
- package/dist/features/composites/vue.js +1 -1
- package/dist/features/composites/vue.js.map +1 -1
- package/dist/features/image-studio/components/ImageStudioDialog.js +1 -1
- package/dist/features/image-studio/components/ImageStudioDialog.js.map +1 -1
- package/dist/features/image-studio/components/ImageStudioDialog.vue.d.ts +1 -1
- package/dist/features/image-studio/components/ImageStudioView.js.map +1 -1
- package/dist/features/image-studio/feature.d.ts +1 -1
- package/dist/features/image-studio/feature.js +1 -1
- package/dist/features/image-studio/feature.js.map +1 -1
- package/dist/features/image-studio/node-core.d.ts +3 -3
- package/dist/features/image-studio/node-core.js +1 -1
- package/dist/features/image-studio/node-core.js.map +1 -1
- package/dist/features/image-studio/node-store.d.ts +1 -1
- package/dist/features/image-studio/node-store.js +1 -1
- package/dist/features/image-studio/node-store.js.map +1 -1
- package/dist/features/image-studio/react/ImageStudioDialog.d.ts +1 -1
- package/dist/features/image-studio/react/ImageStudioDialog.js +1 -1
- package/dist/features/image-studio/react/ImageStudioDialog.js.map +1 -1
- package/dist/features/image-studio/react/ImageStudioView.js +1 -1
- package/dist/features/image-studio/react/ImageStudioView.js.map +1 -1
- package/dist/features/image-studio/react/store.d.ts +3 -3
- package/dist/features/image-studio/react/store.js.map +1 -1
- package/dist/features/image-studio/react.d.ts +1 -1
- package/dist/features/image-studio/react.js +1 -1
- package/dist/features/image-studio/react.js.map +1 -1
- package/dist/features/image-studio/schema.d.ts +1 -1
- package/dist/features/image-studio/schema.js +1 -1
- package/dist/features/image-studio/schema.js.map +1 -1
- package/dist/features/image-studio/state.d.ts +3 -3
- package/dist/features/image-studio/state.js +2 -2
- package/dist/features/image-studio/state.js.map +1 -1
- package/dist/features/image-studio/store.d.ts +3 -3
- package/dist/features/image-studio/vue.d.ts +1 -1
- package/dist/features/image-studio/vue.js +1 -1
- package/dist/features/image-studio/vue.js.map +1 -1
- package/dist/features/media/index.js +1 -1
- package/dist/features/media/react/AudioRecorderModal.js +1 -1
- package/dist/features/media/react.js +1 -1
- package/dist/features/mentions/tag.js +2 -1
- package/dist/features/mentions/tag.js.map +1 -1
- package/dist/features/themes/components/SettingsAppearanceTab.js +1 -1
- package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -1
- package/dist/features/themes/feature.d.ts +1 -1
- package/dist/features/themes/feature.js.map +1 -1
- package/dist/features/themes/react/SettingsAppearanceTab.d.ts +1 -1
- package/dist/features/themes/react/SettingsAppearanceTab.js +1 -1
- package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -1
- package/dist/features/themes/theme-runtime.js +1 -1
- package/dist/features/themes/theme-runtime.js.map +1 -1
- package/dist/features/transcript/TranscriptSegmentView.js +1 -1
- package/dist/features/transcript/TranscriptSegmentView.js.map +1 -1
- package/dist/features/transcript/react/TranscriptSegmentView.js +1 -1
- package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -1
- package/dist/features/transcript/segment-node.js.map +1 -1
- package/dist/features/transfer/feature.js +1 -1
- package/dist/features/transfer/feature.js.map +1 -1
- package/dist/features/transfer/transforms.d.ts +4 -4
- package/dist/features/transfer/transforms.js +12 -12
- package/dist/features/transfer/transforms.js.map +1 -1
- package/dist/i18n/de/ai.js +4 -4
- package/dist/i18n/de/ai.js.map +1 -1
- package/dist/i18n/de/authors.js +1 -1
- package/dist/i18n/de/authors.js.map +1 -1
- package/dist/i18n/de/comments.js +1 -1
- package/dist/i18n/de/comments.js.map +1 -1
- package/dist/i18n/de/composites.js +62 -59
- package/dist/i18n/de/composites.js.map +1 -1
- package/dist/i18n/de/image-studio.js +2 -2
- package/dist/i18n/de/image-studio.js.map +1 -1
- package/dist/i18n/de/integrations.js +20 -20
- package/dist/i18n/de/integrations.js.map +1 -1
- package/dist/i18n/de/markdown.js +1 -1
- package/dist/i18n/de/markdown.js.map +1 -1
- package/dist/i18n/de/palette.js +1 -1
- package/dist/i18n/de/palette.js.map +1 -1
- package/dist/i18n/de/themes.js +3 -3
- package/dist/i18n/de/themes.js.map +1 -1
- package/dist/i18n/de/transfer.js +2 -2
- package/dist/i18n/de/transfer.js.map +1 -1
- package/dist/i18n/de/tree.js +6 -6
- package/dist/i18n/de/tree.js.map +1 -1
- package/dist/i18n/de.d.ts +101 -98
- package/dist/i18n/en/ai.js +2 -2
- package/dist/i18n/en/ai.js.map +1 -1
- package/dist/i18n/en/composites.js +64 -61
- package/dist/i18n/en/composites.js.map +1 -1
- package/dist/i18n/en/integrations.js +9 -9
- package/dist/i18n/en/integrations.js.map +1 -1
- package/dist/i18n/en/markdown.js +1 -1
- package/dist/i18n/en/markdown.js.map +1 -1
- package/dist/i18n/en/palette.js +1 -1
- package/dist/i18n/en/palette.js.map +1 -1
- package/dist/i18n/en/themes.js +4 -4
- package/dist/i18n/en/themes.js.map +1 -1
- package/dist/i18n/en/tree.js +5 -5
- package/dist/i18n/en/tree.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/integrations/composite-ai/bibliography-fetch.d.ts +6 -6
- package/dist/integrations/composite-ai/bibliography-fetch.js +19 -19
- package/dist/integrations/composite-ai/bibliography-fetch.js.map +1 -1
- package/dist/integrations/composite-ai/composite-fill.d.ts +4 -4
- package/dist/integrations/composite-ai/composite-fill.js +5 -5
- package/dist/integrations/composite-ai/composite-fill.js.map +1 -1
- package/dist/integrations/composite-ai/composite-summary.d.ts +2 -2
- package/dist/integrations/composite-ai/composite-summary.js +5 -5
- package/dist/integrations/composite-ai/composite-summary.js.map +1 -1
- package/dist/integrations/composite-ai/derive.d.ts +17 -17
- package/dist/integrations/composite-ai/derive.js +27 -26
- package/dist/integrations/composite-ai/derive.js.map +1 -1
- package/dist/integrations/composite-ai/index.d.ts +14 -15
- package/dist/integrations/composite-ai/index.js +98 -77
- package/dist/integrations/composite-ai/index.js.map +1 -1
- package/dist/integrations/composite-ai/outline-sanitize.d.ts +1 -1
- package/dist/integrations/composite-ai/outline-sanitize.js +1 -1
- package/dist/integrations/composite-ai/outline-sanitize.js.map +1 -1
- package/dist/integrations/composite-ai/rendition.d.ts +9 -9
- package/dist/integrations/composite-ai/rendition.js +27 -27
- package/dist/integrations/composite-ai/rendition.js.map +1 -1
- package/dist/integrations/composite-ai/split.d.ts +8 -8
- package/dist/integrations/composite-ai/split.js +12 -12
- package/dist/integrations/composite-ai/split.js.map +1 -1
- package/dist/integrations/composite-ai/transfer-transforms.d.ts +2 -2
- package/dist/integrations/composite-ai/transfer-transforms.js +12 -12
- package/dist/integrations/composite-ai/transfer-transforms.js.map +1 -1
- package/dist/integrations/composite-media/index.d.ts +4 -3
- package/dist/integrations/composite-media/index.js +20 -14
- package/dist/integrations/composite-media/index.js.map +1 -1
- package/dist/markdown/MarkdownSurface.vue.d.ts +7 -7
- package/dist/markdown/document.js +1 -1
- package/dist/markdown/document.js.map +1 -1
- package/dist/nuxt/module.d.ts +30 -24
- package/dist/nuxt/module.js.map +1 -1
- package/dist/nuxt/runtime/server/plugins/editor-server.js +3 -2
- package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -1
- package/dist/presets/compose.d.ts +6 -6
- package/dist/presets/compose.js +8 -5
- package/dist/presets/compose.js.map +1 -1
- package/dist/react/AdvancedEditor.d.ts +2 -2
- package/dist/react/AdvancedEditor.js +1 -1
- package/dist/react/AdvancedEditor.js.map +1 -1
- package/dist/react/compose.d.ts +1 -1
- package/dist/react/compose.js +2 -2
- package/dist/react/compose.js.map +1 -1
- package/dist/react/composed-surface.d.ts +5 -5
- package/dist/react/composed-surface.js +2 -2
- package/dist/react/composed-surface.js.map +1 -1
- package/dist/server/ai.d.ts +7 -7
- package/dist/server/ai.js +1 -1
- package/dist/server/ai.js.map +1 -1
- package/dist/server/auth.d.ts +1 -1
- package/dist/server/collab-state.d.ts +1 -1
- package/dist/server/collab-state.js.map +1 -1
- package/dist/server/collab.d.ts +4 -4
- package/dist/server/collab.js +22 -17
- package/dist/server/collab.js.map +1 -1
- package/dist/server/handlers/ai.d.ts +9 -6
- package/dist/server/handlers/ai.js +13 -17
- package/dist/server/handlers/ai.js.map +1 -1
- package/dist/server/handlers/context.d.ts +4 -0
- package/dist/server/handlers/context.js.map +1 -1
- package/dist/server/handlers/editor.d.ts +33 -32
- package/dist/server/handlers/editor.js +13 -8
- package/dist/server/handlers/editor.js.map +1 -1
- package/dist/server/handlers/images.d.ts +1 -1
- package/dist/server/handlers/images.js +1 -1
- package/dist/server/handlers/images.js.map +1 -1
- package/dist/server/host.d.ts +4 -0
- package/dist/server/host.js +10 -2
- package/dist/server/host.js.map +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/ports.d.ts +8 -8
- package/dist/server/ports.js.map +1 -1
- package/dist/settings/index.d.ts +20 -19
- package/dist/settings/index.js +25 -24
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/migrate.d.ts +18 -0
- package/dist/settings/migrate.js +46 -0
- package/dist/settings/migrate.js.map +1 -0
- package/dist/settings/values.d.ts +12 -12
- package/dist/settings/values.js +11 -11
- package/dist/settings/values.js.map +1 -1
- package/dist/styles/composites.css +10 -10
- package/dist/tree/DocumentTree.js +12 -5
- package/dist/tree/DocumentTree.js.map +1 -1
- package/dist/tree/drop-rules.js +5 -5
- package/dist/tree/drop-rules.js.map +1 -1
- package/dist/tree/react/DocumentTree.js +14 -5
- package/dist/tree/react/DocumentTree.js.map +1 -1
- package/dist/tree/tree-host.js +6 -6
- package/dist/tree/tree-host.js.map +1 -1
- package/dist/tree/tree-items.js +34 -28
- package/dist/tree/tree-items.js.map +1 -1
- package/dist/tree/tree-model.js +16 -16
- package/dist/tree/tree-model.js.map +1 -1
- package/dist/tree/tree-rows.js +2 -2
- package/dist/tree/tree-rows.js.map +1 -1
- package/dist/tree/tree-view-model.d.ts +2 -2
- package/dist/tree/tree-view-model.js.map +1 -1
- package/dist/vue/AdvancedEditor.js +2 -2
- package/dist/vue/AdvancedEditor.js.map +1 -1
- package/dist/vue/AdvancedEditor.vue.d.ts +10 -10
- package/dist/vue/SimpleEditor.vue.d.ts +4 -4
- package/dist/vue/components/EditorSurface.vue.d.ts +4 -4
- package/dist/vue/compose.d.ts +1 -1
- package/dist/vue/compose.js +2 -2
- package/dist/vue/compose.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/composites/derivation.d.ts +0 -62
- package/dist/features/composites/derivation.js +0 -102
- package/dist/features/composites/derivation.js.map +0 -1
- package/dist/features/composites/kinds.d.ts +0 -83
- package/dist/features/composites/kinds.js +0 -285
- package/dist/features/composites/kinds.js.map +0 -1
|
@@ -3,10 +3,10 @@ import { CommandDef } from "../core/command-types.js";
|
|
|
3
3
|
import { AbilitiesOptions, BlockAction, BlockUiOptions } from "../core/extension-points.js";
|
|
4
4
|
import { EditorMetadata, MetadataItem } from "../core/metadata-types.js";
|
|
5
5
|
import { CollaborationSession, EditorFeature } from "../core/feature.js";
|
|
6
|
+
import { Basket } from "../features/composites/baskets.js";
|
|
7
|
+
import { BlockType } from "../features/composites/block-types.js";
|
|
6
8
|
import { CoreContentOptions } from "../core/schema/index.js";
|
|
7
9
|
import "../core/commands.js";
|
|
8
|
-
import { CompositeKind } from "../features/composites/kinds.js";
|
|
9
|
-
import { Basket } from "../features/composites/baskets.js";
|
|
10
10
|
import "../features/composites/index.js";
|
|
11
11
|
import { ComposedEditor, ContentLevel, FeatureId, InteractionLevel } from "../presets/compose.js";
|
|
12
12
|
import "./advanced.js";
|
|
@@ -29,9 +29,9 @@ type __VLS_Props = {
|
|
|
29
29
|
extensions?: AnyExtension[];
|
|
30
30
|
/** Hover actions shown after the defaults (AI, convert, duplicate, delete, composite actions), on blocks with their `ability`. */
|
|
31
31
|
blockActions?: BlockAction[];
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/** Colour baskets a
|
|
32
|
+
/** Block types offered in the editor (default: `defaultBlockTypes(t)`); read once at setup. */
|
|
33
|
+
blockTypes?: BlockType[];
|
|
34
|
+
/** Colour baskets a Typed block can sit in (default: `defaultBaskets(t)`); read once at setup. */
|
|
35
35
|
compositeBaskets?: Basket[];
|
|
36
36
|
/** Which surfaces render block actions: the hover bar (default), the selected-block toolbar, `'both'` or `'none'` (`BlockUiOptions`); read once at setup. */
|
|
37
37
|
blockUi?: BlockUiOptions;
|
|
@@ -50,7 +50,7 @@ type __VLS_Props = {
|
|
|
50
50
|
/** The backend the composition is pruned by (default: the editor context's backend); read once at setup. */
|
|
51
51
|
backend?: EditorBackend;
|
|
52
52
|
/**
|
|
53
|
-
* Builds the final commands (toolbar, `/` menu) from the default ones (incl. one per
|
|
53
|
+
* Builds the final commands (toolbar, `/` menu) from the default ones (incl. one per Block type); absent = the
|
|
54
54
|
* defaults. Host commands with an `ability` are enabled only where the caret has it, like the defaults. Read once at setup.
|
|
55
55
|
*/
|
|
56
56
|
commands?: (defaults: CommandDef[]) => CommandDef[];
|
|
@@ -71,21 +71,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
71
71
|
editor: import("vue").ComputedRef<Editor | undefined>;
|
|
72
72
|
preset: ComposedEditor<Component>;
|
|
73
73
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
74
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
74
75
|
"update:sidebarOpen": (value: boolean) => any;
|
|
75
76
|
"update:commentsOpen": (value: boolean) => any;
|
|
76
|
-
ready: (editor: Editor) => any;
|
|
77
77
|
"update:modelValue": (content: JSONContent) => any;
|
|
78
|
+
ready: (editor: Editor) => any;
|
|
78
79
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
79
80
|
contentError: (error: Error) => any;
|
|
80
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
81
81
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
82
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
82
83
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
83
84
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
84
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
85
85
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
86
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
86
87
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
87
88
|
onContentError?: ((error: Error) => any) | undefined;
|
|
88
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
89
89
|
}>, {
|
|
90
90
|
content: ContentLevel | readonly FeatureId[];
|
|
91
91
|
ai: boolean;
|
|
@@ -41,21 +41,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
41
41
|
editor: import("vue").ComputedRef<Editor | undefined>;
|
|
42
42
|
preset: EditorPreset<Component>;
|
|
43
43
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
44
45
|
"update:sidebarOpen": (value: boolean) => any;
|
|
45
46
|
"update:commentsOpen": (value: boolean) => any;
|
|
46
|
-
ready: (editor: Editor) => any;
|
|
47
47
|
"update:modelValue": (content: JSONContent) => any;
|
|
48
|
+
ready: (editor: Editor) => any;
|
|
48
49
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
49
50
|
contentError: (error: Error) => any;
|
|
50
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
51
51
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
52
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
52
53
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
53
54
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
54
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
55
55
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
56
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
56
57
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
57
58
|
onContentError?: ((error: Error) => any) | undefined;
|
|
58
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
editable: boolean;
|
|
61
61
|
settingsUi: "internal" | "external";
|
|
@@ -43,21 +43,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
43
43
|
settingsOpen: import("vue").Ref<boolean, boolean>;
|
|
44
44
|
settingsTab: import("vue").Ref<string | undefined, string | undefined>;
|
|
45
45
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
46
47
|
"update:sidebarOpen": (value: boolean) => any;
|
|
47
48
|
"update:commentsOpen": (value: boolean) => any;
|
|
48
|
-
ready: (editor: Editor) => any;
|
|
49
49
|
"update:modelValue": (content: JSONContent) => any;
|
|
50
|
+
ready: (editor: Editor) => any;
|
|
50
51
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
51
52
|
contentError: (error: Error) => any;
|
|
52
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
53
53
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
54
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
54
55
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
55
56
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
56
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
57
57
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
58
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
58
59
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
59
60
|
onContentError?: ((error: Error) => any) | undefined;
|
|
60
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
62
|
editable: boolean;
|
|
63
63
|
settingsUi: "internal" | "external";
|
package/dist/vue/compose.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Component } from "vue";
|
|
|
9
9
|
export declare const composeEditor: (options: ComposeOptions<Component>) => ComposedEditor<Component>;
|
|
10
10
|
/**
|
|
11
11
|
* The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option
|
|
12
|
-
* overridable (`
|
|
12
|
+
* overridable (`blockTypes`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed
|
|
13
13
|
* to the surface.
|
|
14
14
|
*/
|
|
15
15
|
export declare const advancedEditor: (options?: Partial<ComposeOptions<Component>>) => ComposedEditor<Component>;
|
package/dist/vue/compose.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { coreUiFeature } from "../core/core-feature.js";
|
|
2
|
-
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
3
2
|
import { bulletsTransform, summaryTransform } from "../integrations/composite-ai/transfer-transforms.js";
|
|
4
3
|
import { compositeAiFeature } from "../integrations/composite-ai/index.js";
|
|
5
4
|
import { transcriptAiFeature } from "../integrations/transcript-ai/index.js";
|
|
5
|
+
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
6
6
|
import { mediaFeature } from "../features/media/vue.js";
|
|
7
7
|
import _sfc_main from "./components/EditorCommandPalette.js";
|
|
8
8
|
import { aiFeature } from "../features/ai/vue.js";
|
|
@@ -40,7 +40,7 @@ const VUE_BINDINGS = {
|
|
|
40
40
|
const composeEditor = (options) => composeEditor$1(VUE_BINDINGS, options);
|
|
41
41
|
/**
|
|
42
42
|
* The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option
|
|
43
|
-
* overridable (`
|
|
43
|
+
* overridable (`blockTypes`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed
|
|
44
44
|
* to the surface.
|
|
45
45
|
*/
|
|
46
46
|
const advancedEditor = (options = {}) => composeEditor({
|
package/dist/vue/compose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","names":["EditorCommandPalette","compose"],"sources":["../../src/vue/compose.ts"],"sourcesContent":["import type { Component } from 'vue'\nimport { coreUiFeature } from '../core/core-feature'\nimport EditorCommandPalette from './components/EditorCommandPalette.vue'\nimport { aiFeature } from '../features/ai/vue'\nimport { authorsFeature } from '../features/authors/vue'\nimport { blockUiFeature } from '../features/block-ui/vue'\nimport { collabFeature } from '../features/collab/vue'\nimport { commentsFeature } from '../features/comments/vue'\nimport { compositeFeature } from '../features/composites/vue'\nimport { mediaFeature } from '../features/media/vue'\nimport { themesFeature } from '../features/themes/vue'\nimport { transferFeature } from '../features/transfer/vue'\nimport { transcriptFeature } from '../features/transcript/vue'\nimport { bulletsTransform, compositeAiFeature, summaryTransform } from '../integrations/composite-ai'\nimport { transcriptAiFeature } from '../integrations/transcript-ai'\nimport { type ComposedEditor, type ComposeOptions, composeEditor as compose, type UiBindings } from '../presets/compose'\n\n/** The Vue bindings of every UI-bound catalog feature. */\nconst VUE_BINDINGS = {\n 'core-ui': () => coreUiFeature<Component>({ palette: EditorCommandPalette }),\n 'media': mediaFeature,\n 'transcript': transcriptFeature,\n 'composites': compositeFeature,\n 'authors': authorsFeature,\n 'comments': commentsFeature,\n 'ai': aiFeature,\n 'composite-ai': compositeAiFeature,\n 'transcript-ai': transcriptAiFeature,\n 'collab': collabFeature,\n 'block-ui': blockUiFeature,\n 'themes': themesFeature,\n 'transfer': transferFeature,\n 'transfer-ai': () => [summaryTransform, bulletsTransform],\n} satisfies UiBindings<Component>\n\n/**\n * `composeEditor` of `presets/compose` over the Vue bindings: the editor of the three dimensions (`content`,\n * `interaction`, `ai`), pruned by the capabilities of `options.backend`. Call during component setup (`themesFeature()`\n * reads the current Vue app to stop the theme runtime when it unmounts).\n */\nexport const composeEditor = (options: ComposeOptions<Component>): ComposedEditor<Component> => compose(VUE_BINDINGS, options)\n\n/**\n * The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option\n * overridable (`
|
|
1
|
+
{"version":3,"file":"compose.js","names":["EditorCommandPalette","compose"],"sources":["../../src/vue/compose.ts"],"sourcesContent":["import type { Component } from 'vue'\nimport { coreUiFeature } from '../core/core-feature'\nimport EditorCommandPalette from './components/EditorCommandPalette.vue'\nimport { aiFeature } from '../features/ai/vue'\nimport { authorsFeature } from '../features/authors/vue'\nimport { blockUiFeature } from '../features/block-ui/vue'\nimport { collabFeature } from '../features/collab/vue'\nimport { commentsFeature } from '../features/comments/vue'\nimport { compositeFeature } from '../features/composites/vue'\nimport { mediaFeature } from '../features/media/vue'\nimport { themesFeature } from '../features/themes/vue'\nimport { transferFeature } from '../features/transfer/vue'\nimport { transcriptFeature } from '../features/transcript/vue'\nimport { bulletsTransform, compositeAiFeature, summaryTransform } from '../integrations/composite-ai'\nimport { transcriptAiFeature } from '../integrations/transcript-ai'\nimport { type ComposedEditor, type ComposeOptions, composeEditor as compose, type UiBindings } from '../presets/compose'\n\n/** The Vue bindings of every UI-bound catalog feature. */\nconst VUE_BINDINGS = {\n 'core-ui': () => coreUiFeature<Component>({ palette: EditorCommandPalette }),\n 'media': mediaFeature,\n 'transcript': transcriptFeature,\n 'composites': compositeFeature,\n 'authors': authorsFeature,\n 'comments': commentsFeature,\n 'ai': aiFeature,\n 'composite-ai': compositeAiFeature,\n 'transcript-ai': transcriptAiFeature,\n 'collab': collabFeature,\n 'block-ui': blockUiFeature,\n 'themes': themesFeature,\n 'transfer': transferFeature,\n 'transfer-ai': () => [summaryTransform, bulletsTransform],\n} satisfies UiBindings<Component>\n\n/**\n * `composeEditor` of `presets/compose` over the Vue bindings: the editor of the three dimensions (`content`,\n * `interaction`, `ai`), pruned by the capabilities of `options.backend`. Call during component setup (`themesFeature()`\n * reads the current Vue app to stop the theme runtime when it unmounts).\n */\nexport const composeEditor = (options: ComposeOptions<Component>): ComposedEditor<Component> => compose(VUE_BINDINGS, options)\n\n/**\n * The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option\n * overridable (`blockTypes`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed\n * to the surface.\n */\nexport const advancedEditor = (options: Partial<ComposeOptions<Component>> = {}): ComposedEditor<Component> => composeEditor({ content: 'rich', interaction: 'full', ai: true, ...options })\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,eAAe;CACnB,iBAAiB,cAAyB,EAAE,SAASA,UAAqB,CAAC;CAC3E,SAAS;CACT,cAAc;CACd,cAAc;CACd,WAAW;CACX,YAAY;CACZ,MAAM;CACN,gBAAgB;CAChB,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,UAAU;CACV,YAAY;CACZ,qBAAqB,CAAC,kBAAkB,gBAAgB;AAC1D;;;;;;AAOA,MAAa,iBAAiB,YAAkEC,gBAAQ,cAAc,OAAO;;;;;;AAO7H,MAAa,kBAAkB,UAA8C,CAAC,MAAiC,cAAc;CAAE,SAAS;CAAQ,aAAa;CAAQ,IAAI;CAAM,GAAG;AAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecsplico/editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue and React editor library on TipTap v3 (Vue: Nuxt UI; React: shadcn/ui): framework-free features with Vue and React bindings, simple and advanced presets, tree-shakeable entries. Built ESM with type declarations.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { CompositeKind } from "./kinds.js";
|
|
2
|
-
import { DERIVATION_KEY } from "./meta-keys.js";
|
|
3
|
-
import { Editor } from "@tiptap/core";
|
|
4
|
-
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
5
|
-
//#region src/features/composites/derivation.d.ts
|
|
6
|
-
/** How a derived Baustein was made; `ai:<kindId>` for a block derived from another block by the model. */
|
|
7
|
-
export type DerivationMethod = 'transcription' | 'pdf-text' | 'ocr' | 'description' | 'bibliography' | (string & {});
|
|
8
|
-
/** What a derived Baustein was made from: an uploaded asset (by asset name) or another block (by block id). */
|
|
9
|
-
export type DerivationSource = {
|
|
10
|
-
asset: string;
|
|
11
|
-
} | {
|
|
12
|
-
block: string; /** Document the block lives in; absent = this document. */
|
|
13
|
-
document?: string;
|
|
14
|
-
};
|
|
15
|
-
/** `meta.derivation` of a derived Baustein. */
|
|
16
|
-
export interface Derivation {
|
|
17
|
-
from: DerivationSource;
|
|
18
|
-
method: DerivationMethod;
|
|
19
|
-
model?: string;
|
|
20
|
-
/** ISO timestamp. */
|
|
21
|
-
createdAt: string;
|
|
22
|
-
/** SHA-256 hex of the asset bytes / of the source block's Markdown; `''` when unknown. */
|
|
23
|
-
inputHash: string;
|
|
24
|
-
/** SHA-256 hex of the produced body's Markdown; `''` when unknown. */
|
|
25
|
-
outputHash: string;
|
|
26
|
-
/** Asset name of the stored raw output (text/markdown). */
|
|
27
|
-
output?: string;
|
|
28
|
-
}
|
|
29
|
-
/** The derivation of a composite (`meta.derivation` with a `from` object and a `method`); null when it has none. */
|
|
30
|
-
export declare function derivationOf(node: Node$1): Derivation | null;
|
|
31
|
-
/** The media block a source-holding kind keeps its original in: first body child of a type in `kind.source`. */
|
|
32
|
-
export declare function sourceOf(composite: Node$1, kinds: readonly CompositeKind[]): {
|
|
33
|
-
node: Node$1;
|
|
34
|
-
index: number;
|
|
35
|
-
asset: {
|
|
36
|
-
documentId: string;
|
|
37
|
-
name: string;
|
|
38
|
-
} | null;
|
|
39
|
-
hash: string | null;
|
|
40
|
-
} | null;
|
|
41
|
-
/** The body children of `composite` that are derived Bausteine, with their child index. */
|
|
42
|
-
export declare function renditionsOf(composite: Node$1): {
|
|
43
|
-
node: Node$1;
|
|
44
|
-
index: number;
|
|
45
|
-
derivation: Derivation;
|
|
46
|
-
}[];
|
|
47
|
-
/**
|
|
48
|
-
* Whether `derived` (a Baustein with a derivation, a child of `composite`) is out of date or was edited since it was made.
|
|
49
|
-
* `stale`: for an asset source, the block `sourceOf(composite, kinds)` finds has a `hash` that differs from `inputHash`; null
|
|
50
|
-
* when either is unknown. A block source is null here: callers with the document compare the hash of the source block's
|
|
51
|
-
* Markdown. `edited`: the body's
|
|
52
|
-
* hash (computed lazily, it serialises the whole body) differs from `outputHash`; null when `outputHash` is unknown.
|
|
53
|
-
*/
|
|
54
|
-
export declare function derivationState(composite: Node$1, derived: Node$1, bodyHash: () => string, kinds: readonly CompositeKind[]): {
|
|
55
|
-
stale: boolean | null;
|
|
56
|
-
edited: boolean | null;
|
|
57
|
-
};
|
|
58
|
-
/** Markdown of the body of `composite` (everything after title, description and tags). */
|
|
59
|
-
export declare function bodyMarkdown(editor: Editor, composite: Node$1): string;
|
|
60
|
-
//#endregion
|
|
61
|
-
export { DERIVATION_KEY };
|
|
62
|
-
//# sourceMappingURL=derivation.d.ts.map
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { EDITOR_API } from "../../core/api-routes.js";
|
|
2
|
-
import { compositeKind } from "./kinds.js";
|
|
3
|
-
import { DERIVATION_KEY } from "./meta-keys.js";
|
|
4
|
-
import "./nodes.js";
|
|
5
|
-
//#region src/features/composites/derivation.ts
|
|
6
|
-
/** The derivation of a composite (`meta.derivation` with a `from` object and a `method`); null when it has none. */
|
|
7
|
-
function derivationOf(node) {
|
|
8
|
-
const meta = node.attrs.meta;
|
|
9
|
-
const value = meta && typeof meta === "object" ? meta[DERIVATION_KEY] : void 0;
|
|
10
|
-
if (!value || typeof value !== "object") return null;
|
|
11
|
-
const { from, method } = value;
|
|
12
|
-
if (!from || typeof from !== "object" || typeof method !== "string") return null;
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
/** Whether `derivation` points at a block of another document than `documentId` (the open one; null/undefined = unknown, so any named document is another). */
|
|
16
|
-
function isForeignSource(derivation, documentId) {
|
|
17
|
-
return "block" in derivation.from && !!derivation.from.document && derivation.from.document !== documentId;
|
|
18
|
-
}
|
|
19
|
-
const ASSET_URL_PREFIX = `${EDITOR_API}/assets/`;
|
|
20
|
-
const ASSET_NAME = /^[0-9a-f-]{36}\.[a-z0-9]{1,8}$/;
|
|
21
|
-
const ASSET_DOCUMENT_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
22
|
-
/** The stored asset behind an `/api/editor/assets/<documentId>/<name>` URL; null for any other `src`. */
|
|
23
|
-
function assetRefOf(src) {
|
|
24
|
-
if (!src.startsWith(ASSET_URL_PREFIX)) return null;
|
|
25
|
-
const [documentId, name, ...rest] = src.slice(ASSET_URL_PREFIX.length).split("/");
|
|
26
|
-
if (rest.length || !documentId || !name || !ASSET_DOCUMENT_ID.test(documentId) || !ASSET_NAME.test(name)) return null;
|
|
27
|
-
return {
|
|
28
|
-
documentId,
|
|
29
|
-
name
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
/** The media block a source-holding kind keeps its original in: first body child of a type in `kind.source`. */
|
|
33
|
-
function sourceOf(composite, kinds) {
|
|
34
|
-
if (composite.type.name !== "composite") return null;
|
|
35
|
-
const types = compositeKind(kinds, String(composite.attrs.kind)).source;
|
|
36
|
-
if (!types) return null;
|
|
37
|
-
for (let index = 3; index < composite.childCount; index++) {
|
|
38
|
-
const node = composite.child(index);
|
|
39
|
-
if (!types.includes(node.type.name)) continue;
|
|
40
|
-
const hash = node.attrs.hash;
|
|
41
|
-
return {
|
|
42
|
-
node,
|
|
43
|
-
index,
|
|
44
|
-
asset: assetRefOf(String(node.attrs.src ?? "")),
|
|
45
|
-
hash: typeof hash === "string" && hash ? hash : null
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
/** The body children of `composite` that are derived Bausteine, with their child index. */
|
|
51
|
-
function renditionsOf(composite) {
|
|
52
|
-
const found = [];
|
|
53
|
-
composite.forEach((node, _offset, index) => {
|
|
54
|
-
if (index < 3 || node.type.name !== "composite") return;
|
|
55
|
-
const derivation = derivationOf(node);
|
|
56
|
-
if (derivation) found.push({
|
|
57
|
-
node,
|
|
58
|
-
index,
|
|
59
|
-
derivation
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
return found;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Whether `derived` (a Baustein with a derivation, a child of `composite`) is out of date or was edited since it was made.
|
|
66
|
-
* `stale`: for an asset source, the block `sourceOf(composite, kinds)` finds has a `hash` that differs from `inputHash`; null
|
|
67
|
-
* when either is unknown. A block source is null here: callers with the document compare the hash of the source block's
|
|
68
|
-
* Markdown. `edited`: the body's
|
|
69
|
-
* hash (computed lazily, it serialises the whole body) differs from `outputHash`; null when `outputHash` is unknown.
|
|
70
|
-
*/
|
|
71
|
-
function derivationState(composite, derived, bodyHash, kinds) {
|
|
72
|
-
const derivation = derivationOf(derived);
|
|
73
|
-
if (!derivation) return {
|
|
74
|
-
stale: null,
|
|
75
|
-
edited: null
|
|
76
|
-
};
|
|
77
|
-
let stale = null;
|
|
78
|
-
if ("asset" in derivation.from) {
|
|
79
|
-
const hash = sourceOf(composite, kinds)?.hash;
|
|
80
|
-
stale = hash && derivation.inputHash ? hash !== derivation.inputHash : null;
|
|
81
|
-
}
|
|
82
|
-
const edited = derivation.outputHash ? bodyHash() !== derivation.outputHash : null;
|
|
83
|
-
return {
|
|
84
|
-
stale,
|
|
85
|
-
edited
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/** Markdown of the body of `composite` (everything after title, description and tags). */
|
|
89
|
-
function bodyMarkdown(editor, composite) {
|
|
90
|
-
const content = [];
|
|
91
|
-
composite.forEach((child, _offset, index) => {
|
|
92
|
-
if (index >= 3) content.push(child.toJSON());
|
|
93
|
-
});
|
|
94
|
-
return editor.markdown.serialize({
|
|
95
|
-
type: "doc",
|
|
96
|
-
content
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
export { DERIVATION_KEY, assetRefOf, bodyMarkdown, derivationOf, derivationState, isForeignSource, renditionsOf, sourceOf };
|
|
101
|
-
|
|
102
|
-
//# sourceMappingURL=derivation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"derivation.js","names":[],"sources":["../../../src/features/composites/derivation.ts"],"sourcesContent":["// Vue-free and server-importable: where a Baustein's content comes from. A source-holding Baustein (`recording`, `paper`,\n// `book`, `figure`, `document`) carries its original as an `image|audio|video|file` block in the body; a derived\n// Baustein (transcript, full text, description, AI result) records in `meta.derivation` what it was made from.\nimport type { Editor, JSONContent } from '@tiptap/core'\n// Types only: brings in the `editor.markdown` augmentation of `@tiptap/markdown` for contexts that do not otherwise load it.\nimport type {} from '@tiptap/markdown'\nimport type { Node as PMNode } from '@tiptap/pm/model'\nimport { EDITOR_API } from '../../core/api-routes'\nimport { type CompositeKind, compositeKind } from './kinds'\nimport { COMPOSITE_CHROME_COUNT } from './nodes'\nimport { DERIVATION_KEY } from './meta-keys'\n\n/** How a derived Baustein was made; `ai:<kindId>` for a block derived from another block by the model. */\nexport type DerivationMethod = 'transcription' | 'pdf-text' | 'ocr' | 'description' | 'bibliography' | (string & {})\n\n/** What a derived Baustein was made from: an uploaded asset (by asset name) or another block (by block id). */\nexport type DerivationSource = { asset: string } | { block: string, /** Document the block lives in; absent = this document. */ document?: string }\n\n/** `meta.derivation` of a derived Baustein. */\nexport interface Derivation {\n from: DerivationSource\n method: DerivationMethod\n model?: string\n /** ISO timestamp. */\n createdAt: string\n /** SHA-256 hex of the asset bytes / of the source block's Markdown; `''` when unknown. */\n inputHash: string\n /** SHA-256 hex of the produced body's Markdown; `''` when unknown. */\n outputHash: string\n /** Asset name of the stored raw output (text/markdown). */\n output?: string\n}\n\nexport { DERIVATION_KEY }\n\n/** The derivation of a composite (`meta.derivation` with a `from` object and a `method`); null when it has none. */\nexport function derivationOf(node: PMNode): Derivation | null {\n const meta: unknown = node.attrs.meta\n const value = meta && typeof meta === 'object' ? (meta as Record<string, unknown>)[DERIVATION_KEY] : undefined\n if (!value || typeof value !== 'object') return null\n const { from, method } = value as Record<string, unknown>\n if (!from || typeof from !== 'object' || typeof method !== 'string') return null\n return value as Derivation\n}\n\n/** Whether `derivation` points at a block of another document than `documentId` (the open one; null/undefined = unknown, so any named document is another). */\nexport function isForeignSource(derivation: Derivation, documentId: string | null | undefined): boolean {\n return 'block' in derivation.from && !!derivation.from.document && derivation.from.document !== documentId\n}\n\nconst ASSET_URL_PREFIX = `${EDITOR_API}/assets/`\n// Same patterns as `features/media/assets.ts`; copied because composites must not import media.\nconst ASSET_NAME = /^[0-9a-f-]{36}\\.[a-z0-9]{1,8}$/\nconst ASSET_DOCUMENT_ID = /^[A-Za-z0-9_-]{1,64}$/\n\n/** The stored asset behind an `/api/editor/assets/<documentId>/<name>` URL; null for any other `src`. */\nexport function assetRefOf(src: string): { documentId: string, name: string } | null {\n if (!src.startsWith(ASSET_URL_PREFIX)) return null\n const [documentId, name, ...rest] = src.slice(ASSET_URL_PREFIX.length).split('/')\n if (rest.length || !documentId || !name || !ASSET_DOCUMENT_ID.test(documentId) || !ASSET_NAME.test(name)) return null\n return { documentId, name }\n}\n\n/** The media block a source-holding kind keeps its original in: first body child of a type in `kind.source`. */\nexport function sourceOf(\n composite: PMNode,\n kinds: readonly CompositeKind[],\n): { node: PMNode, index: number, asset: { documentId: string, name: string } | null, hash: string | null } | null {\n if (composite.type.name !== 'composite') return null\n const types = compositeKind(kinds, String(composite.attrs.kind)).source\n if (!types) return null\n for (let index = COMPOSITE_CHROME_COUNT; index < composite.childCount; index++) {\n const node = composite.child(index)\n if (!(types as readonly string[]).includes(node.type.name)) continue\n const hash: unknown = node.attrs.hash\n return { node, index, asset: assetRefOf(String(node.attrs.src ?? '')), hash: typeof hash === 'string' && hash ? hash : null }\n }\n return null\n}\n\n/** The body children of `composite` that are derived Bausteine, with their child index. */\nexport function renditionsOf(composite: PMNode): { node: PMNode, index: number, derivation: Derivation }[] {\n const found: { node: PMNode, index: number, derivation: Derivation }[] = []\n composite.forEach((node, _offset, index) => {\n if (index < COMPOSITE_CHROME_COUNT || node.type.name !== 'composite') return\n const derivation = derivationOf(node)\n if (derivation) found.push({ node, index, derivation })\n })\n return found\n}\n\n/**\n * Whether `derived` (a Baustein with a derivation, a child of `composite`) is out of date or was edited since it was made.\n * `stale`: for an asset source, the block `sourceOf(composite, kinds)` finds has a `hash` that differs from `inputHash`; null\n * when either is unknown. A block source is null here: callers with the document compare the hash of the source block's\n * Markdown. `edited`: the body's\n * hash (computed lazily, it serialises the whole body) differs from `outputHash`; null when `outputHash` is unknown.\n */\nexport function derivationState(\n composite: PMNode,\n derived: PMNode,\n bodyHash: () => string,\n kinds: readonly CompositeKind[],\n): { stale: boolean | null, edited: boolean | null } {\n const derivation = derivationOf(derived)\n if (!derivation) return { stale: null, edited: null }\n let stale: boolean | null = null\n if ('asset' in derivation.from) {\n const hash = sourceOf(composite, kinds)?.hash\n stale = hash && derivation.inputHash ? hash !== derivation.inputHash : null\n }\n const edited = derivation.outputHash ? bodyHash() !== derivation.outputHash : null\n return { stale, edited }\n}\n\n/** Markdown of the body of `composite` (everything after title, description and tags). */\nexport function bodyMarkdown(editor: Editor, composite: PMNode): string {\n const content: JSONContent[] = []\n composite.forEach((child, _offset, index) => {\n if (index >= COMPOSITE_CHROME_COUNT) content.push(child.toJSON() as JSONContent)\n })\n return editor.markdown!.serialize({ type: 'doc', content })\n}\n"],"mappings":";;;;;;AAoCA,SAAgB,aAAa,MAAiC;CAC5D,MAAM,OAAgB,KAAK,MAAM;CACjC,MAAM,QAAQ,QAAQ,OAAO,SAAS,WAAY,KAAiC,kBAAkB,KAAA;CACrG,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO;CAChD,MAAM,EAAE,MAAM,WAAW;CACzB,IAAI,CAAC,QAAQ,OAAO,SAAS,YAAY,OAAO,WAAW,UAAU,OAAO;CAC5E,OAAO;AACT;;AAGA,SAAgB,gBAAgB,YAAwB,YAAgD;CACtG,OAAO,WAAW,WAAW,QAAQ,CAAC,CAAC,WAAW,KAAK,YAAY,WAAW,KAAK,aAAa;AAClG;AAEA,MAAM,mBAAmB,GAAG,WAAW;AAEvC,MAAM,aAAa;AACnB,MAAM,oBAAoB;;AAG1B,SAAgB,WAAW,KAA0D;CACnF,IAAI,CAAC,IAAI,WAAW,gBAAgB,GAAG,OAAO;CAC9C,MAAM,CAAC,YAAY,MAAM,GAAG,QAAQ,IAAI,MAAM,iBAAiB,MAAM,CAAC,CAAC,MAAM,GAAG;CAChF,IAAI,KAAK,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,kBAAkB,KAAK,UAAU,KAAK,CAAC,WAAW,KAAK,IAAI,GAAG,OAAO;CACjH,OAAO;EAAE;EAAY;CAAK;AAC5B;;AAGA,SAAgB,SACd,WACA,OACiH;CACjH,IAAI,UAAU,KAAK,SAAS,aAAa,OAAO;CAChD,MAAM,QAAQ,cAAc,OAAO,OAAO,UAAU,MAAM,IAAI,CAAC,CAAC,CAAC;CACjE,IAAI,CAAC,OAAO,OAAO;CACnB,KAAK,IAAI,QAAA,GAAgC,QAAQ,UAAU,YAAY,SAAS;EAC9E,MAAM,OAAO,UAAU,MAAM,KAAK;EAClC,IAAI,CAAE,MAA4B,SAAS,KAAK,KAAK,IAAI,GAAG;EAC5D,MAAM,OAAgB,KAAK,MAAM;EACjC,OAAO;GAAE;GAAM;GAAO,OAAO,WAAW,OAAO,KAAK,MAAM,OAAO,EAAE,CAAC;GAAG,MAAM,OAAO,SAAS,YAAY,OAAO,OAAO;EAAK;CAC9H;CACA,OAAO;AACT;;AAGA,SAAgB,aAAa,WAA8E;CACzG,MAAM,QAAmE,CAAC;CAC1E,UAAU,SAAS,MAAM,SAAS,UAAU;EAC1C,IAAI,QAAA,KAAkC,KAAK,KAAK,SAAS,aAAa;EACtE,MAAM,aAAa,aAAa,IAAI;EACpC,IAAI,YAAY,MAAM,KAAK;GAAE;GAAM;GAAO;EAAW,CAAC;CACxD,CAAC;CACD,OAAO;AACT;;;;;;;;AASA,SAAgB,gBACd,WACA,SACA,UACA,OACmD;CACnD,MAAM,aAAa,aAAa,OAAO;CACvC,IAAI,CAAC,YAAY,OAAO;EAAE,OAAO;EAAM,QAAQ;CAAK;CACpD,IAAI,QAAwB;CAC5B,IAAI,WAAW,WAAW,MAAM;EAC9B,MAAM,OAAO,SAAS,WAAW,KAAK,CAAC,EAAE;EACzC,QAAQ,QAAQ,WAAW,YAAY,SAAS,WAAW,YAAY;CACzE;CACA,MAAM,SAAS,WAAW,aAAa,SAAS,MAAM,WAAW,aAAa;CAC9E,OAAO;EAAE;EAAO;CAAO;AACzB;;AAGA,SAAgB,aAAa,QAAgB,WAA2B;CACtE,MAAM,UAAyB,CAAC;CAChC,UAAU,SAAS,OAAO,SAAS,UAAU;EAC3C,IAAI,SAAA,GAAiC,QAAQ,KAAK,MAAM,OAAO,CAAgB;CACjF,CAAC;CACD,OAAO,OAAO,SAAU,UAAU;EAAE,MAAM;EAAO;CAAQ,CAAC;AAC5D"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Translate } from "../../i18n/index.js";
|
|
2
|
-
//#region src/features/composites/kinds.d.ts
|
|
3
|
-
/** Media block types a source-holding kind's source may be (`CompositeKind.source`). */
|
|
4
|
-
export declare const SOURCE_MEDIA_TYPES: readonly ["image", "audio", "video", "file"];
|
|
5
|
-
/** One metadata field of a composite kind, stored under `key` in the composite's `meta` attribute. */
|
|
6
|
-
export interface CompositeMetaField {
|
|
7
|
-
key: string;
|
|
8
|
-
label: string;
|
|
9
|
-
/**
|
|
10
|
-
* `bibliography`: CSL-JSON item under `meta.bib`; `derivation`: read-only provenance of a derived Baustein; `reference`: block id of another Baustein;
|
|
11
|
-
* `multiselect`: several of `options`, stored as `string[]` (the key is removed when none is chosen).
|
|
12
|
-
*/
|
|
13
|
-
type: 'text' | 'textarea' | 'date' | 'number' | 'select' | 'multiselect' | 'reference' | 'bibliography' | 'derivation';
|
|
14
|
-
/** Choices of a `select` or `multiselect` field (required for `multiselect`). */
|
|
15
|
-
options?: {
|
|
16
|
-
value: string;
|
|
17
|
-
label: string;
|
|
18
|
-
}[];
|
|
19
|
-
/** `reference`: kind ids the field may point to; absent = any Baustein. */
|
|
20
|
-
targets?: readonly string[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* What a kind tells the model beyond its fields. `purpose` goes into every AI request's block model (chat, generate
|
|
24
|
-
* tasks); `instructions`, `instructionsField` and `skeleton` are read only by „Baustein füllen (KI)“ (`fillComposite`).
|
|
25
|
-
*/
|
|
26
|
-
export interface CompositeKindAi {
|
|
27
|
-
/** One or two German sentences: what a Baustein of this kind is for and what its body holds. */
|
|
28
|
-
purpose: string;
|
|
29
|
-
/** Default instruction for filling the body of a Baustein of this kind (what to write, structure, tone). */
|
|
30
|
-
instructions?: string;
|
|
31
|
-
/** Key of a `textarea` field of this kind; a Baustein whose value is non-empty replaces `instructions` with it. */
|
|
32
|
-
instructionsField?: string;
|
|
33
|
-
/** Target text (Vorlage) as Markdown; `{key}` placeholders are replaced by the Baustein's `meta[key]` before it goes to the model, unknown ones stay. */
|
|
34
|
-
skeleton?: string;
|
|
35
|
-
}
|
|
36
|
-
/** A composite kind: what its `kind` attribute selects (label, icon, chrome placeholders, meta fields). */
|
|
37
|
-
export interface CompositeKind {
|
|
38
|
-
id: string;
|
|
39
|
-
label: string;
|
|
40
|
-
icon: string;
|
|
41
|
-
titlePlaceholder: string;
|
|
42
|
-
descriptionPlaceholder: string;
|
|
43
|
-
fields: CompositeMetaField[];
|
|
44
|
-
/**
|
|
45
|
-
* How much of the chrome the kind shows. Absent: all of it. `tags: false` hides the tag row of this kind (the node stays in the schema, empty).
|
|
46
|
-
* `tone`: a CSS colour or `var(...)` that sets the kind apart: a Baustein of this kind gets `data-kind-tone` and `--sk-kind-tone` on its wrapper
|
|
47
|
-
* (a tinted surface and a left border in the tone) and its tree rows tint the kind icon with it. Absent: the kind looks as before.
|
|
48
|
-
* `controls: false` makes the chrome of a Baustein of this kind read-only although the editor is editable (for a kind whose attributes a host
|
|
49
|
-
* guard refuses to change): no basket menu, status menu, title-visibility toggle, tag editing or drag handle on the kind icon, and a read-only
|
|
50
|
-
* details popover; an existing basket, status and tags still show as chips. Default `true`.
|
|
51
|
-
*/
|
|
52
|
-
chrome?: {
|
|
53
|
-
tags?: boolean;
|
|
54
|
-
tone?: string;
|
|
55
|
-
controls?: boolean;
|
|
56
|
-
};
|
|
57
|
-
/** Absent: the kind has no AI brief; „Baustein füllen (KI)“ is not offered for it. */
|
|
58
|
-
ai?: CompositeKindAi;
|
|
59
|
-
/**
|
|
60
|
-
* Baustein kinds this kind accepts as nested Bausteine: a list of kind ids, or `'all'`. Absent: `folder` and `document`
|
|
61
|
-
* accept `'all'`, every other kind accepts none. Non-Baustein content (paragraphs, lists, ...) is always allowed.
|
|
62
|
-
* Only new moves are checked; documents that already nest against it stay as they are.
|
|
63
|
-
*/
|
|
64
|
-
accepts?: readonly string[] | 'all';
|
|
65
|
-
/** Present on source-holding kinds: the media block types the kind's source may be; `sourceOf` returns the first body child of one of these. */
|
|
66
|
-
source?: readonly (typeof SOURCE_MEDIA_TYPES)[number][];
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* The built-in kinds in the language of `t`. The default set is produced from the translator (labels, placeholders, field
|
|
70
|
-
* labels and status choices are catalog messages), so it is built per translator and memoized; hosts that pass their own
|
|
71
|
-
* kinds (`compositeFeature({ kinds })`, `Composite.configure({ kinds })`) keep their labels untouched. Ids, field keys and
|
|
72
|
-
* stored values (`open`, `doing`, `done`) do not depend on the language.
|
|
73
|
-
*/
|
|
74
|
-
export declare function defaultCompositeKinds(t: Translate): readonly CompositeKind[];
|
|
75
|
-
/** Kind `id` from `kinds`; an unknown id gets the `section` kind's presentation (else the first kind's) under its own id and label. */
|
|
76
|
-
export declare function compositeKind(kinds: readonly CompositeKind[], id: string): CompositeKind;
|
|
77
|
-
/**
|
|
78
|
-
* Whether a Baustein of kind `parentKind` accepts one of kind `childKind` as nested Baustein. The `accepts` of the kind
|
|
79
|
-
* in `kinds` decides; without one (or for a kind `kinds` does not list) only `folder` and `document` accept all.
|
|
80
|
-
*/
|
|
81
|
-
export declare function kindAccepts(kinds: readonly CompositeKind[], parentKind: string, childKind: string): boolean;
|
|
82
|
-
//#endregion
|
|
83
|
-
//# sourceMappingURL=kinds.d.ts.map
|