@ecsplico/editor 3.6.0 → 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 +65 -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/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/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 -8
- package/dist/features/composites/merge.js +23 -22
- 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/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 +7 -4
- 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 +6 -6
- 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 -89
- package/dist/features/composites/kinds.js +0 -285
- package/dist/features/composites/kinds.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PropertyDefinition } from "../../../core/properties.js";
|
|
2
|
+
import { BlockProperties } from "../properties.js";
|
|
3
3
|
import { Editor } from "@tiptap/core";
|
|
4
4
|
//#region src/features/composites/components/CompositeFieldEditor.vue.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* One
|
|
6
|
+
* One Block property of a block as an input that writes through `setBlockProperty`. Text-like inputs keep a local
|
|
7
7
|
* draft and commit after typing pauses, on blur and on unmount, so the one-frame-late re-read of the rows never
|
|
8
8
|
* overwrites what is being typed.
|
|
9
9
|
*/
|
|
10
10
|
type __VLS_Props = {
|
|
11
11
|
editor: Editor;
|
|
12
|
-
row:
|
|
13
|
-
field:
|
|
12
|
+
row: BlockProperties;
|
|
13
|
+
field: PropertyDefinition;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
size?: 'xs' | 'sm' | 'md';
|
|
16
16
|
};
|
|
@@ -2,7 +2,8 @@ import { normalizeTagName } from "../../../core/tag-name.js";
|
|
|
2
2
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
3
3
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
4
4
|
import { compositeFieldText, isStructuredField } from "../inspector-model.js";
|
|
5
|
-
import _sfc_main$1 from "./
|
|
5
|
+
import _sfc_main$1 from "./DerivationBadge.js";
|
|
6
|
+
import _sfc_main$2 from "./CompositeFieldEditor.js";
|
|
6
7
|
import { useCompositeInspector } from "../use-composite-inspector.js";
|
|
7
8
|
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
|
|
8
9
|
//#region src/features/composites/components/CompositeInspector.vue
|
|
@@ -45,16 +46,23 @@ const _hoisted_18 = {
|
|
|
45
46
|
const _hoisted_19 = ["aria-labelledby"];
|
|
46
47
|
const _hoisted_20 = ["id"];
|
|
47
48
|
const _hoisted_21 = ["title"];
|
|
48
|
-
const _hoisted_22 = {
|
|
49
|
-
|
|
49
|
+
const _hoisted_22 = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "mt-1 text-xs font-semibold uppercase tracking-wide text-[var(--sk-muted)]"
|
|
52
|
+
};
|
|
53
|
+
const _hoisted_23 = {
|
|
54
|
+
key: 3,
|
|
55
|
+
class: "flex items-center gap-2 border-t border-[var(--sk-border)] pt-3"
|
|
56
|
+
};
|
|
57
|
+
const _hoisted_24 = { class: "text-[var(--sk-muted)]" };
|
|
50
58
|
/**
|
|
51
|
-
* Side panel with the metadata of the document *or* of the
|
|
59
|
+
* Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to
|
|
52
60
|
* `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is
|
|
53
61
|
* the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at
|
|
54
62
|
* the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.
|
|
55
63
|
*
|
|
56
|
-
* The „
|
|
57
|
-
* the editor was ever focused, while the caret is in editor text outside any
|
|
64
|
+
* The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before
|
|
65
|
+
* the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.
|
|
58
66
|
* `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel
|
|
59
67
|
* shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.
|
|
60
68
|
*/
|
|
@@ -68,7 +76,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
68
76
|
const props = __props;
|
|
69
77
|
const { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit();
|
|
70
78
|
const { t } = useEditorI18n();
|
|
71
|
-
const { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused } = useCompositeInspector(() => props.editor, () => props.documentFocused);
|
|
79
|
+
const { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused, properties, derivation } = useCompositeInspector(() => props.editor, () => props.documentFocused);
|
|
72
80
|
const uid = useId();
|
|
73
81
|
const HEX_COLOR = /^#[0-9a-f]{3,8}$/i;
|
|
74
82
|
const mentionStyle = (color) => ({ "--mention-color": color && HEX_COLOR.test(color) ? color : "var(--sk-primary)" });
|
|
@@ -132,124 +140,127 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
132
140
|
style: { background: "var(--mention-color)" }
|
|
133
141
|
}, null, -1)), createElementVNode("span", _hoisted_17, "@" + toDisplayString(mention.label), 1)], 4);
|
|
134
142
|
}), 128))])) : (openBlock(), createElementBlock("dd", _hoisted_18, toDisplayString(unref(t)("composites.inspector.none")), 1))
|
|
135
|
-
])])], 8, _hoisted_2)) : unref(focused) ? (openBlock(), createElementBlock("section", {
|
|
143
|
+
])])], 8, _hoisted_2)) : unref(focused) || unref(properties) ? (openBlock(), createElementBlock("section", {
|
|
136
144
|
key: 1,
|
|
137
145
|
class: "flex-1 p-4",
|
|
138
146
|
"aria-labelledby": `${unref(uid)}-composite`
|
|
139
147
|
}, [createElementVNode("h2", {
|
|
140
148
|
id: `${unref(uid)}-composite`,
|
|
141
149
|
class: "mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]"
|
|
142
|
-
}, toDisplayString(unref(t)("composites.inspector.composite")), 9, _hoisted_20), (openBlock(), createElementBlock("div", {
|
|
143
|
-
key: unref(focused)
|
|
150
|
+
}, toDisplayString(unref(focused) ? unref(t)("composites.inspector.composite") : unref(t)("composites.inspector.properties")), 9, _hoisted_20), (openBlock(), createElementBlock("div", {
|
|
151
|
+
key: unref(focused)?.key ?? unref(properties)?.key,
|
|
144
152
|
class: "flex flex-col gap-3"
|
|
145
153
|
}, [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
help: unref(editable) ? unref(t)("composites.inspector.titleHelp") : void 0
|
|
170
|
-
}, {
|
|
171
|
-
default: withCtx(() => [createElementVNode("p", {
|
|
172
|
-
class: normalizeClass(["min-h-6 truncate leading-6", unref(focused).title ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]),
|
|
173
|
-
title: unref(focused).title
|
|
174
|
-
}, toDisplayString(unref(focused).title || unref(t)("composites.inspector.untitled")), 11, _hoisted_21)]),
|
|
175
|
-
_: 1
|
|
176
|
-
}, 8, ["label", "help"]),
|
|
177
|
-
createVNode(unref(UFormField), {
|
|
178
|
-
label: unref(t)("composites.inspector.description"),
|
|
179
|
-
size: "sm",
|
|
180
|
-
help: unref(focused).descriptionTextOnly ? void 0 : unref(t)("composites.inspector.descriptionHelp")
|
|
181
|
-
}, {
|
|
182
|
-
default: withCtx(() => [createVNode(unref(UTextarea), {
|
|
183
|
-
"model-value": unref(draft),
|
|
184
|
-
autoresize: "",
|
|
185
|
-
rows: 3,
|
|
186
|
-
maxrows: 10,
|
|
154
|
+
unref(focused) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
155
|
+
createVNode(unref(UFormField), {
|
|
156
|
+
label: unref(t)("composites.inspector.kind"),
|
|
157
|
+
size: "sm"
|
|
158
|
+
}, {
|
|
159
|
+
default: withCtx(() => [createVNode(unref(USelect), {
|
|
160
|
+
"model-value": unref(focused).kind,
|
|
161
|
+
items: unref(kindOptions),
|
|
162
|
+
size: "sm",
|
|
163
|
+
class: "w-full",
|
|
164
|
+
"aria-label": unref(t)("composites.kind.select"),
|
|
165
|
+
disabled: !unref(editable),
|
|
166
|
+
"onUpdate:modelValue": onKind
|
|
167
|
+
}, null, 8, [
|
|
168
|
+
"model-value",
|
|
169
|
+
"items",
|
|
170
|
+
"aria-label",
|
|
171
|
+
"disabled"
|
|
172
|
+
])]),
|
|
173
|
+
_: 1
|
|
174
|
+
}, 8, ["label"]),
|
|
175
|
+
createVNode(unref(UFormField), {
|
|
176
|
+
label: unref(t)("composites.inspector.title"),
|
|
187
177
|
size: "sm",
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"readonly",
|
|
199
|
-
"onBlur"
|
|
200
|
-
])]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["label", "help"]),
|
|
203
|
-
unref(focused).tagsVisible ? (openBlock(), createBlock(unref(UFormField), {
|
|
204
|
-
key: 0,
|
|
205
|
-
label: unref(t)("composites.tags.label"),
|
|
206
|
-
size: "sm"
|
|
207
|
-
}, {
|
|
208
|
-
default: withCtx(() => [createCommentVNode(" `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. "), createVNode(unref(UInputMenu), {
|
|
209
|
-
"search-term": unref(searchTerm),
|
|
210
|
-
multiple: "",
|
|
211
|
-
"create-item": {
|
|
212
|
-
position: "bottom",
|
|
213
|
-
when: "always"
|
|
214
|
-
},
|
|
215
|
-
"model-value": unref(focused).tags,
|
|
216
|
-
items: unref(tagItems),
|
|
217
|
-
"ignore-filter": "",
|
|
218
|
-
placeholder: unref(t)("composites.tags.label"),
|
|
219
|
-
"aria-label": unref(t)("composites.tags.label"),
|
|
178
|
+
help: unref(editable) ? unref(t)("composites.inspector.titleHelp") : void 0
|
|
179
|
+
}, {
|
|
180
|
+
default: withCtx(() => [createElementVNode("p", {
|
|
181
|
+
class: normalizeClass(["min-h-6 truncate leading-6", unref(focused).title ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]),
|
|
182
|
+
title: unref(focused).title
|
|
183
|
+
}, toDisplayString(unref(focused).title || unref(t)("composites.inspector.untitled")), 11, _hoisted_21)]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, ["label", "help"]),
|
|
186
|
+
createVNode(unref(UFormField), {
|
|
187
|
+
label: unref(t)("composites.inspector.description"),
|
|
220
188
|
size: "sm",
|
|
221
|
-
|
|
222
|
-
class: "w-full",
|
|
223
|
-
disabled: !unref(editable),
|
|
224
|
-
"onUpdate:modelValue": onTags,
|
|
225
|
-
"onUpdate:searchTerm": unref(inspector).setSearchTerm,
|
|
226
|
-
"onUpdate:open": _cache[0] || (_cache[0] = (isOpen) => isOpen && unref(inspector).searchTags()),
|
|
227
|
-
onCreate: unref(inspector).createTag
|
|
189
|
+
help: unref(focused).descriptionTextOnly ? void 0 : unref(t)("composites.inspector.descriptionHelp")
|
|
228
190
|
}, {
|
|
229
|
-
|
|
191
|
+
default: withCtx(() => [createVNode(unref(UTextarea), {
|
|
192
|
+
"model-value": unref(draft),
|
|
193
|
+
autoresize: "",
|
|
194
|
+
rows: 3,
|
|
195
|
+
maxrows: 10,
|
|
196
|
+
size: "sm",
|
|
197
|
+
class: "w-full",
|
|
198
|
+
placeholder: unref(t)("composites.inspector.description"),
|
|
199
|
+
"aria-label": unref(t)("composites.inspector.description"),
|
|
200
|
+
readonly: !unref(editable) || !unref(focused).descriptionTextOnly,
|
|
201
|
+
"onUpdate:modelValue": onDescriptionInput,
|
|
202
|
+
onBlur: unref(inspector).blurDescription
|
|
203
|
+
}, null, 8, [
|
|
204
|
+
"model-value",
|
|
205
|
+
"placeholder",
|
|
206
|
+
"aria-label",
|
|
207
|
+
"readonly",
|
|
208
|
+
"onBlur"
|
|
209
|
+
])]),
|
|
230
210
|
_: 1
|
|
231
|
-
}, 8, [
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
|
|
237
|
-
"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
211
|
+
}, 8, ["label", "help"]),
|
|
212
|
+
unref(focused).tagsVisible ? (openBlock(), createBlock(unref(UFormField), {
|
|
213
|
+
key: 0,
|
|
214
|
+
label: unref(t)("composites.tags.label"),
|
|
215
|
+
size: "sm"
|
|
216
|
+
}, {
|
|
217
|
+
default: withCtx(() => [createCommentVNode(" `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. "), createVNode(unref(UInputMenu), {
|
|
218
|
+
"search-term": unref(searchTerm),
|
|
219
|
+
multiple: "",
|
|
220
|
+
"create-item": {
|
|
221
|
+
position: "bottom",
|
|
222
|
+
when: "always"
|
|
223
|
+
},
|
|
224
|
+
"model-value": unref(focused).tags,
|
|
225
|
+
items: unref(tagItems),
|
|
226
|
+
"ignore-filter": "",
|
|
227
|
+
placeholder: unref(t)("composites.tags.label"),
|
|
228
|
+
"aria-label": unref(t)("composites.tags.label"),
|
|
229
|
+
size: "sm",
|
|
230
|
+
icon: "i-lucide-hash",
|
|
231
|
+
class: "w-full",
|
|
232
|
+
disabled: !unref(editable),
|
|
233
|
+
"onUpdate:modelValue": onTags,
|
|
234
|
+
"onUpdate:searchTerm": unref(inspector).setSearchTerm,
|
|
235
|
+
"onUpdate:open": _cache[0] || (_cache[0] = (isOpen) => isOpen && unref(inspector).searchTags()),
|
|
236
|
+
onCreate: unref(inspector).createTag
|
|
237
|
+
}, {
|
|
238
|
+
"create-item-label": withCtx(({ item }) => [createTextVNode(toDisplayString(unref(t)("composites.tags.create", { tag: unref(normalizeTagName)(item) || item })), 1)]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, [
|
|
241
|
+
"search-term",
|
|
242
|
+
"model-value",
|
|
243
|
+
"items",
|
|
244
|
+
"placeholder",
|
|
245
|
+
"aria-label",
|
|
246
|
+
"disabled",
|
|
247
|
+
"onUpdate:searchTerm",
|
|
248
|
+
"onCreate"
|
|
249
|
+
])]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["label"])) : createCommentVNode("v-if", true)
|
|
252
|
+
], 64)) : createCommentVNode("v-if", true),
|
|
253
|
+
createCommentVNode(" Block properties: any block that has the `properties` capability, driven by the definitions of its Block type. "),
|
|
254
|
+
unref(properties) && unref(properties).definitions.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [unref(focused) ? (openBlock(), createElementBlock("h3", _hoisted_22, toDisplayString(unref(t)("composites.inspector.properties")), 1)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(properties).definitions, (field) => {
|
|
244
255
|
return openBlock(), createBlock(unref(UFormField), {
|
|
245
256
|
key: field.key,
|
|
246
257
|
label: field.label,
|
|
247
258
|
size: "sm"
|
|
248
259
|
}, {
|
|
249
|
-
default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$
|
|
260
|
+
default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$2, {
|
|
250
261
|
key: 0,
|
|
251
262
|
editor: __props.editor,
|
|
252
|
-
row: unref(
|
|
263
|
+
row: unref(properties),
|
|
253
264
|
field,
|
|
254
265
|
disabled: !unref(editable)
|
|
255
266
|
}, null, 8, [
|
|
@@ -259,7 +270,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
259
270
|
"disabled"
|
|
260
271
|
])) : createCommentVNode("v-if", true)], 64)) : field.type === "select" ? (openBlock(), createBlock(unref(USelect), {
|
|
261
272
|
key: 1,
|
|
262
|
-
"model-value": unref(compositeFieldText)(unref(
|
|
273
|
+
"model-value": unref(compositeFieldText)(unref(properties), field) || void 0,
|
|
263
274
|
items: field.options ?? [],
|
|
264
275
|
"aria-label": field.label,
|
|
265
276
|
placeholder: "–",
|
|
@@ -275,7 +286,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
275
286
|
"onUpdate:modelValue"
|
|
276
287
|
])) : field.type === "textarea" ? (openBlock(), createBlock(unref(UTextarea), {
|
|
277
288
|
key: 2,
|
|
278
|
-
"model-value": unref(compositeFieldText)(unref(
|
|
289
|
+
"model-value": unref(compositeFieldText)(unref(properties), field),
|
|
279
290
|
"aria-label": field.label,
|
|
280
291
|
autoresize: "",
|
|
281
292
|
rows: 2,
|
|
@@ -291,7 +302,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
291
302
|
"onUpdate:modelValue"
|
|
292
303
|
])) : (openBlock(), createBlock(unref(UInput), {
|
|
293
304
|
key: 3,
|
|
294
|
-
"model-value": unref(compositeFieldText)(unref(
|
|
305
|
+
"model-value": unref(compositeFieldText)(unref(properties), field),
|
|
295
306
|
type: field.type,
|
|
296
307
|
"aria-label": field.label,
|
|
297
308
|
size: "sm",
|
|
@@ -307,15 +318,27 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
307
318
|
]))]),
|
|
308
319
|
_: 2
|
|
309
320
|
}, 1032, ["label"]);
|
|
310
|
-
}), 128)),
|
|
311
|
-
|
|
321
|
+
}), 128))], 64)) : createCommentVNode("v-if", true),
|
|
322
|
+
createCommentVNode(" The Derivation of a Derived block whose Block type has no `derivation` definition (that one shows above): any block with the `derived` capability. "),
|
|
323
|
+
unref(derivation) && __props.editor ? (openBlock(), createBlock(unref(UFormField), {
|
|
324
|
+
key: 2,
|
|
325
|
+
label: unref(t)("composites.inspector.derivation"),
|
|
326
|
+
size: "sm"
|
|
327
|
+
}, {
|
|
328
|
+
default: withCtx(() => [createVNode(_sfc_main$1, {
|
|
329
|
+
editor: __props.editor,
|
|
330
|
+
node: unref(derivation).node
|
|
331
|
+
}, null, 8, ["editor", "node"])]),
|
|
332
|
+
_: 1
|
|
333
|
+
}, 8, ["label"])) : createCommentVNode("v-if", true),
|
|
334
|
+
unref(focused) ? (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
312
335
|
createVNode(unref(UIcon), {
|
|
313
336
|
name: "i-lucide-sparkles",
|
|
314
337
|
class: "size-4 shrink-0 text-[var(--sk-muted)]"
|
|
315
338
|
}),
|
|
316
|
-
createElementVNode("span",
|
|
339
|
+
createElementVNode("span", _hoisted_24, toDisplayString(unref(t)("composites.inspector.aiStatus")), 1),
|
|
317
340
|
createElementVNode("span", { class: normalizeClass(["ml-auto inline-flex items-center gap-1.5", unref(hasSummary) ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]) }, [createElementVNode("span", { class: normalizeClass(["size-2 rounded-full", unref(hasSummary) ? "bg-[var(--sk-success)]" : "bg-[var(--sk-bg-accented)]"]) }, null, 2), createTextVNode(" " + toDisplayString(unref(hasSummary) ? unref(t)("composites.inspector.summaryPresent") : unref(t)("composites.inspector.summaryMissing")), 1)], 2)
|
|
318
|
-
])
|
|
341
|
+
])) : createCommentVNode("v-if", true)
|
|
319
342
|
]))], 8, _hoisted_19)) : createCommentVNode("v-if", true)], 8, _hoisted_1);
|
|
320
343
|
};
|
|
321
344
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeInspector.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_toDisplayString","_renderSlot","_Fragment","_renderList","_createVNode","_createBlock","_normalizeStyle","_withCtx","_normalizeClass","_createCommentVNode","_createTextVNode","CompositeFieldEditor"],"sources":["../../../../src/features/composites/components/CompositeInspector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { useId } from 'vue'\nimport { normalizeTagName } from '../../../core/tag-name'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { compositeFieldText, isStructuredField } from '../inspector-model'\nimport { useCompositeInspector } from '../use-composite-inspector'\nimport CompositeFieldEditor from './CompositeFieldEditor.vue'\n\n/**\n * Side panel with the metadata of the document *or* of the Baustein under the caret — one at a time — connected to\n * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is\n * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at\n * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.\n *\n * The „Baustein“ section shows while the caret is in a Baustein of the editor; the „Dokument“ section shows before\n * the editor was ever focused, while the caret is in editor text outside any Baustein, and while `documentFocused`.\n * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel\n * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.\n */\nconst props = defineProps<{ editor?: Editor, documentFocused?: boolean }>()\n\nconst { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\ndefineSlots<{\n /** Document facts known to the host only, rendered above the facts derived from the editor. */\n document?: () => unknown\n}>()\n\nconst { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused } = useCompositeInspector(() => props.editor, () => props.documentFocused)\n\nconst uid = useId()\n\nconst HEX_COLOR = /^#[0-9a-f]{3,8}$/i\n// Same tint as the chip in the document (`--mention-color`), only invalid colors fall back to the primary color.\nconst mentionStyle = (color: string | null) => ({ '--mention-color': color && HEX_COLOR.test(color) ? color : 'var(--sk-primary)' })\n\n// The Nuxt UI inputs emit loosely typed values; the model takes strings.\nfunction onKind(kind: unknown) {\n if (typeof kind === 'string') inspector.value.setKind(kind)\n}\n\nfunction onDescriptionInput(value: unknown) {\n inspector.value.inputDescription(typeof value === 'string' ? value : '')\n}\n\nfunction onTags(value: unknown) {\n inspector.value.setTags(Array.isArray(value) ? value.filter((tag): tag is string => typeof tag === 'string') : [])\n}\n</script>\n\n<template>\n <aside class=\"flex h-full min-h-0 flex-col overflow-y-auto text-sm\" :aria-label=\"t('composites.inspector.label')\">\n <section v-if=\"section === 'document'\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-document`\">\n <h2 :id=\"`${uid}-document`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.document') }}\n </h2>\n <div class=\"flex flex-col gap-y-2\">\n <slot name=\"document\" />\n <dl class=\"grid grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2\">\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.composites') }}\n </dt>\n <dd v-if=\"kinds.length\" class=\"m-0 flex min-w-0 flex-col gap-y-1\">\n <span v-for=\"kind in kinds\" :key=\"kind.id\" class=\"flex min-h-6 min-w-0 items-center gap-2\">\n <UIcon :name=\"kind.icon\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"min-w-0 flex-1 truncate text-[var(--sk-fg-highlighted)]\">{{ kind.label }}</span>\n <span class=\"tabular-nums text-[var(--sk-muted)]\">{{ kind.count }}</span>\n </span>\n <span class=\"min-h-6 leading-6 tabular-nums text-[var(--sk-muted)]\">\n {{ t('composites.inspector.summarized', { n: summarized, total: rows.length }) }}\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.tags.label') }}\n </dt>\n <dd v-if=\"tags.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <UBadge v-for=\"tag in tags\" :key=\"tag\" color=\"neutral\" variant=\"subtle\" size=\"sm\" :label=\"`#${tag}`\" class=\"max-w-full\" />\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.mentions') }}\n </dt>\n <dd v-if=\"mentions.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <span\n v-for=\"mention in mentions\"\n :key=\"mention.id\"\n class=\"inline-flex max-w-full items-center gap-1.5 truncate rounded-sm px-1.5 py-0.5 text-xs font-medium text-[var(--sk-fg-highlighted)]\"\n :style=\"[mentionStyle(mention.color), { background: 'color-mix(in oklab, var(--mention-color) 15%, transparent)' }]\"\n >\n <span class=\"size-1.5 shrink-0 rounded-full\" :style=\"{ background: 'var(--mention-color)' }\" />\n <span class=\"truncate\">@{{ mention.label }}</span>\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n </dl>\n </div>\n </section>\n <section v-else-if=\"focused\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-composite`\">\n <h2 :id=\"`${uid}-composite`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.composite') }}\n </h2>\n\n <div :key=\"focused.key\" class=\"flex flex-col gap-3\">\n <UFormField :label=\"t('composites.inspector.kind')\" size=\"sm\">\n <USelect\n :model-value=\"focused.kind\"\n :items=\"kindOptions\"\n size=\"sm\"\n class=\"w-full\"\n :aria-label=\"t('composites.kind.select')\"\n :disabled=\"!editable\"\n @update:model-value=\"onKind\"\n />\n </UFormField>\n\n <UFormField :label=\"t('composites.inspector.title')\" size=\"sm\" :help=\"editable ? t('composites.inspector.titleHelp') : undefined\">\n <p class=\"min-h-6 truncate leading-6\" :class=\"focused.title ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\" :title=\"focused.title\">\n {{ focused.title || t('composites.inspector.untitled') }}\n </p>\n </UFormField>\n\n <UFormField\n :label=\"t('composites.inspector.description')\"\n size=\"sm\"\n :help=\"focused.descriptionTextOnly ? undefined : t('composites.inspector.descriptionHelp')\"\n >\n <UTextarea\n :model-value=\"draft\"\n autoresize\n :rows=\"3\"\n :maxrows=\"10\"\n size=\"sm\"\n class=\"w-full\"\n :placeholder=\"t('composites.inspector.description')\"\n :aria-label=\"t('composites.inspector.description')\"\n :readonly=\"!editable || !focused.descriptionTextOnly\"\n @update:model-value=\"onDescriptionInput\"\n @blur=\"inspector.blurDescription\"\n />\n </UFormField>\n\n <UFormField v-if=\"focused.tagsVisible\" :label=\"t('composites.tags.label')\" size=\"sm\">\n <!-- `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. -->\n <UInputMenu\n :search-term=\"searchTerm\"\n multiple\n :create-item=\"{ position: 'bottom', when: 'always' }\"\n :model-value=\"focused.tags\"\n :items=\"tagItems\"\n ignore-filter\n :placeholder=\"t('composites.tags.label')\"\n :aria-label=\"t('composites.tags.label')\"\n size=\"sm\"\n icon=\"i-lucide-hash\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"onTags\"\n @update:search-term=\"inspector.setSearchTerm\"\n @update:open=\"(isOpen: boolean) => isOpen && inspector.searchTags()\"\n @create=\"inspector.createTag\"\n >\n <template #create-item-label=\"{ item }: { item: string }\">\n {{ t('composites.tags.create', { tag: normalizeTagName(item) || item }) }}\n </template>\n </UInputMenu>\n </UFormField>\n\n <UFormField v-for=\"field in focused.fields\" :key=\"field.key\" :label=\"field.label\" size=\"sm\">\n <!-- Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. -->\n <template v-if=\"isStructuredField(field)\">\n <CompositeFieldEditor\n v-if=\"editor\"\n :editor=\"editor\"\n :row=\"focused\"\n :field=\"field\"\n :disabled=\"!editable\"\n />\n </template>\n <USelect\n v-else-if=\"field.type === 'select'\"\n :model-value=\"compositeFieldText(focused, field) || undefined\"\n :items=\"field.options ?? []\"\n :aria-label=\"field.label\"\n placeholder=\"–\"\n size=\"sm\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"compositeFieldText(focused, field)\"\n :aria-label=\"field.label\"\n autoresize\n :rows=\"2\"\n :maxrows=\"8\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UInput\n v-else\n :model-value=\"compositeFieldText(focused, field)\"\n :type=\"field.type\"\n :aria-label=\"field.label\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n </UFormField>\n\n <div class=\"flex items-center gap-2 border-t border-[var(--sk-border)] pt-3\">\n <UIcon name=\"i-lucide-sparkles\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"text-[var(--sk-muted)]\">{{ t('composites.inspector.aiStatus') }}</span>\n <span class=\"ml-auto inline-flex items-center gap-1.5\" :class=\"hasSummary ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\">\n <span class=\"size-2 rounded-full\" :class=\"hasSummary ? 'bg-[var(--sk-success)]' : 'bg-[var(--sk-bg-accented)]'\" />\n {{ hasSummary ? t('composites.inspector.summaryPresent') : t('composites.inspector.summaryMissing') }}\n </span>\n </div>\n </div>\n </section>\n </aside>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,QAAQ;EAEd,MAAM,EAAE,OAAO,QAAQ,WAAW,YAAY,MAAM,OAAO,OAAO,QAAQ,WAAW,YAAY,QAAQ,SAAS,UAAU,cAAc,SAAS;EACnJ,MAAM,EAAE,MAAM,cAAc;EAO5B,MAAM,EAAE,WAAW,SAAS,UAAU,OAAO,YAAY,UAAU,aAAa,YAAY,YAAY,MAAM,MAAM,OAAO,UAAU,YAAY,4BAA4B,MAAM,cAAc,MAAM,eAAe;EAEtN,MAAM,MAAM,MAAM;EAElB,MAAM,YAAY;EAElB,MAAM,gBAAgB,WAA0B,EAAE,mBAAmB,SAAS,UAAU,KAAK,KAAK,IAAI,QAAQ,oBAAoB;EAGlI,SAAS,OAAO,MAAe;GAC7B,IAAI,OAAO,SAAS,UAAU,UAAU,MAAM,QAAQ,IAAI;EAC5D;EAEA,SAAS,mBAAmB,OAAgB;GAC1C,UAAU,MAAM,iBAAiB,OAAO,UAAU,WAAW,QAAQ,EAAE;EACzE;EAEA,SAAS,OAAO,OAAgB;GAC9B,UAAU,MAAM,QAAQ,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAQ,QAAuB,OAAO,QAAQ,QAAQ,IAAI,CAA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;OACnB,YAAA;OACC,MAAM;OACN,SAAS;OACV,MAAK;OACL,OAAM;OACL,UAAQ,CAAGA,MAAA,QAAA;OACX,wBAAqB,UAAmBA,MAAA,SAAA,CAAS,CAAC,SAAS,OAAO,KAAK;;;;;;MAE1E,CAAA,MAAAF,UAAA,GAAAS,YASEP,MAAA,MAAA,GAAA;;OAPC,eAAaA,MAAA,kBAAA,CAAkB,CAACA,MAAA,OAAA,GAAS,KAAK;OAC9C,MAAM,MAAM;OACZ,cAAY,MAAM;OACnB,MAAK;OACL,OAAM;OACL,UAAQ,CAAGA,MAAA,QAAA;OACX,wBAAqB,UAAmBA,MAAA,SAAA,CAAS,CAAC,SAAS,OAAO,KAAK;;;;;;;;;;;IAI5EC,mBAOM,OAPN,aAOM;KANJK,YAAiFN,MAAA,KAAA,GAAA;MAA1E,MAAK;MAAoB,OAAM;;KACtCC,mBAAoF,QAApF,aAAoFC,gBAA5CF,MAAA,CAAA,CAAC,CAAA,+BAAA,CAAA,GAAA,CAAA;KACzCC,mBAGO,QAAA,EAHD,OAAKS,eAAA,CAAC,4CAAmDV,MAAA,UAAA,IAAU,oCAAA,4BAAA,CAAA,EAAA,GACvE,CAAAC,mBAAkH,QAAA,EAA5G,OAAKS,eAAA,CAAC,uBAA8BV,MAAA,UAAA,IAAU,2BAAA,4BAAA,CAAA,EAAA,GAAA,MAAA,CAA8D,GAAAY,gBAAA,MAClHV,gBAAGF,MAAA,UAAA,IAAaA,MAAA,CAAA,CAAC,CAAA,qCAAA,IAA0CA,MAAA,CAAA,CAAC,CAAA,qCAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"CompositeInspector.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_toDisplayString","_renderSlot","_Fragment","_renderList","_createVNode","_createBlock","_normalizeStyle","_withCtx","_normalizeClass","_createCommentVNode","_createTextVNode","CompositeFieldEditor","DerivationBadge"],"sources":["../../../../src/features/composites/components/CompositeInspector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { useId } from 'vue'\nimport { normalizeTagName } from '../../../core/tag-name'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { compositeFieldText, isStructuredField } from '../inspector-model'\nimport { useCompositeInspector } from '../use-composite-inspector'\nimport CompositeFieldEditor from './CompositeFieldEditor.vue'\nimport DerivationBadge from './DerivationBadge.vue'\n\n/**\n * Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to\n * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is\n * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at\n * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.\n *\n * The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before\n * the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.\n * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel\n * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.\n */\nconst props = defineProps<{ editor?: Editor, documentFocused?: boolean }>()\n\nconst { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\ndefineSlots<{\n /** Document facts known to the host only, rendered above the facts derived from the editor. */\n document?: () => unknown\n}>()\n\nconst { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused, properties, derivation } = useCompositeInspector(() => props.editor, () => props.documentFocused)\n\nconst uid = useId()\n\nconst HEX_COLOR = /^#[0-9a-f]{3,8}$/i\n// Same tint as the chip in the document (`--mention-color`), only invalid colors fall back to the primary color.\nconst mentionStyle = (color: string | null) => ({ '--mention-color': color && HEX_COLOR.test(color) ? color : 'var(--sk-primary)' })\n\n// The Nuxt UI inputs emit loosely typed values; the model takes strings.\nfunction onKind(kind: unknown) {\n if (typeof kind === 'string') inspector.value.setKind(kind)\n}\n\nfunction onDescriptionInput(value: unknown) {\n inspector.value.inputDescription(typeof value === 'string' ? value : '')\n}\n\nfunction onTags(value: unknown) {\n inspector.value.setTags(Array.isArray(value) ? value.filter((tag): tag is string => typeof tag === 'string') : [])\n}\n</script>\n\n<template>\n <aside class=\"flex h-full min-h-0 flex-col overflow-y-auto text-sm\" :aria-label=\"t('composites.inspector.label')\">\n <section v-if=\"section === 'document'\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-document`\">\n <h2 :id=\"`${uid}-document`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.document') }}\n </h2>\n <div class=\"flex flex-col gap-y-2\">\n <slot name=\"document\" />\n <dl class=\"grid grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2\">\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.composites') }}\n </dt>\n <dd v-if=\"kinds.length\" class=\"m-0 flex min-w-0 flex-col gap-y-1\">\n <span v-for=\"kind in kinds\" :key=\"kind.id\" class=\"flex min-h-6 min-w-0 items-center gap-2\">\n <UIcon :name=\"kind.icon\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"min-w-0 flex-1 truncate text-[var(--sk-fg-highlighted)]\">{{ kind.label }}</span>\n <span class=\"tabular-nums text-[var(--sk-muted)]\">{{ kind.count }}</span>\n </span>\n <span class=\"min-h-6 leading-6 tabular-nums text-[var(--sk-muted)]\">\n {{ t('composites.inspector.summarized', { n: summarized, total: rows.length }) }}\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.tags.label') }}\n </dt>\n <dd v-if=\"tags.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <UBadge v-for=\"tag in tags\" :key=\"tag\" color=\"neutral\" variant=\"subtle\" size=\"sm\" :label=\"`#${tag}`\" class=\"max-w-full\" />\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.mentions') }}\n </dt>\n <dd v-if=\"mentions.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <span\n v-for=\"mention in mentions\"\n :key=\"mention.id\"\n class=\"inline-flex max-w-full items-center gap-1.5 truncate rounded-sm px-1.5 py-0.5 text-xs font-medium text-[var(--sk-fg-highlighted)]\"\n :style=\"[mentionStyle(mention.color), { background: 'color-mix(in oklab, var(--mention-color) 15%, transparent)' }]\"\n >\n <span class=\"size-1.5 shrink-0 rounded-full\" :style=\"{ background: 'var(--mention-color)' }\" />\n <span class=\"truncate\">@{{ mention.label }}</span>\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n </dl>\n </div>\n </section>\n <section v-else-if=\"focused || properties\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-composite`\">\n <h2 :id=\"`${uid}-composite`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ focused ? t('composites.inspector.composite') : t('composites.inspector.properties') }}\n </h2>\n\n <div :key=\"focused?.key ?? properties?.key\" class=\"flex flex-col gap-3\">\n <template v-if=\"focused\">\n <UFormField :label=\"t('composites.inspector.kind')\" size=\"sm\">\n <USelect\n :model-value=\"focused.kind\"\n :items=\"kindOptions\"\n size=\"sm\"\n class=\"w-full\"\n :aria-label=\"t('composites.kind.select')\"\n :disabled=\"!editable\"\n @update:model-value=\"onKind\"\n />\n </UFormField>\n\n <UFormField :label=\"t('composites.inspector.title')\" size=\"sm\" :help=\"editable ? t('composites.inspector.titleHelp') : undefined\">\n <p class=\"min-h-6 truncate leading-6\" :class=\"focused.title ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\" :title=\"focused.title\">\n {{ focused.title || t('composites.inspector.untitled') }}\n </p>\n </UFormField>\n\n <UFormField\n :label=\"t('composites.inspector.description')\"\n size=\"sm\"\n :help=\"focused.descriptionTextOnly ? undefined : t('composites.inspector.descriptionHelp')\"\n >\n <UTextarea\n :model-value=\"draft\"\n autoresize\n :rows=\"3\"\n :maxrows=\"10\"\n size=\"sm\"\n class=\"w-full\"\n :placeholder=\"t('composites.inspector.description')\"\n :aria-label=\"t('composites.inspector.description')\"\n :readonly=\"!editable || !focused.descriptionTextOnly\"\n @update:model-value=\"onDescriptionInput\"\n @blur=\"inspector.blurDescription\"\n />\n </UFormField>\n\n <UFormField v-if=\"focused.tagsVisible\" :label=\"t('composites.tags.label')\" size=\"sm\">\n <!-- `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. -->\n <UInputMenu\n :search-term=\"searchTerm\"\n multiple\n :create-item=\"{ position: 'bottom', when: 'always' }\"\n :model-value=\"focused.tags\"\n :items=\"tagItems\"\n ignore-filter\n :placeholder=\"t('composites.tags.label')\"\n :aria-label=\"t('composites.tags.label')\"\n size=\"sm\"\n icon=\"i-lucide-hash\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"onTags\"\n @update:search-term=\"inspector.setSearchTerm\"\n @update:open=\"(isOpen: boolean) => isOpen && inspector.searchTags()\"\n @create=\"inspector.createTag\"\n >\n <template #create-item-label=\"{ item }: { item: string }\">\n {{ t('composites.tags.create', { tag: normalizeTagName(item) || item }) }}\n </template>\n </UInputMenu>\n </UFormField>\n </template>\n\n <!-- Block properties: any block that has the `properties` capability, driven by the definitions of its Block type. -->\n <template v-if=\"properties && properties.definitions.length\">\n <h3 v-if=\"focused\" class=\"mt-1 text-xs font-semibold uppercase tracking-wide text-[var(--sk-muted)]\">\n {{ t('composites.inspector.properties') }}\n </h3>\n\n <UFormField v-for=\"field in properties.definitions\" :key=\"field.key\" :label=\"field.label\" size=\"sm\">\n <!-- Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. -->\n <template v-if=\"isStructuredField(field)\">\n <CompositeFieldEditor\n v-if=\"editor\"\n :editor=\"editor\"\n :row=\"properties\"\n :field=\"field\"\n :disabled=\"!editable\"\n />\n </template>\n <USelect\n v-else-if=\"field.type === 'select'\"\n :model-value=\"compositeFieldText(properties, field) || undefined\"\n :items=\"field.options ?? []\"\n :aria-label=\"field.label\"\n placeholder=\"–\"\n size=\"sm\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"compositeFieldText(properties, field)\"\n :aria-label=\"field.label\"\n autoresize\n :rows=\"2\"\n :maxrows=\"8\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UInput\n v-else\n :model-value=\"compositeFieldText(properties, field)\"\n :type=\"field.type\"\n :aria-label=\"field.label\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n </UFormField>\n </template>\n\n <!-- The Derivation of a Derived block whose Block type has no `derivation` definition (that one shows above): any block with the `derived` capability. -->\n <UFormField v-if=\"derivation && editor\" :label=\"t('composites.inspector.derivation')\" size=\"sm\">\n <DerivationBadge :editor=\"editor\" :node=\"derivation.node\" />\n </UFormField>\n\n <div v-if=\"focused\" class=\"flex items-center gap-2 border-t border-[var(--sk-border)] pt-3\">\n <UIcon name=\"i-lucide-sparkles\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"text-[var(--sk-muted)]\">{{ t('composites.inspector.aiStatus') }}</span>\n <span class=\"ml-auto inline-flex items-center gap-1.5\" :class=\"hasSummary ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\">\n <span class=\"size-2 rounded-full\" :class=\"hasSummary ? 'bg-[var(--sk-success)]' : 'bg-[var(--sk-bg-accented)]'\" />\n {{ hasSummary ? t('composites.inspector.summaryPresent') : t('composites.inspector.summaryMissing') }}\n </span>\n </div>\n </div>\n </section>\n </aside>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAEd,MAAM,EAAE,OAAO,QAAQ,WAAW,YAAY,MAAM,OAAO,OAAO,QAAQ,WAAW,YAAY,QAAQ,SAAS,UAAU,cAAc,SAAS;EACnJ,MAAM,EAAE,MAAM,cAAc;EAO5B,MAAM,EAAE,WAAW,SAAS,UAAU,OAAO,YAAY,UAAU,aAAa,YAAY,YAAY,MAAM,MAAM,OAAO,UAAU,SAAS,YAAY,eAAe,4BAA4B,MAAM,cAAc,MAAM,eAAe;EAE9O,MAAM,MAAM,MAAM;EAElB,MAAM,YAAY;EAElB,MAAM,gBAAgB,WAA0B,EAAE,mBAAmB,SAAS,UAAU,KAAK,KAAK,IAAI,QAAQ,oBAAoB;EAGlI,SAAS,OAAO,MAAe;GAC7B,IAAI,OAAO,SAAS,UAAU,UAAU,MAAM,QAAQ,IAAI;EAC5D;EAEA,SAAS,mBAAmB,OAAgB;GAC1C,UAAU,MAAM,iBAAiB,OAAO,UAAU,WAAW,QAAQ,EAAE;EACzE;EAEA,SAAS,OAAO,OAAgB;GAC9B,UAAU,MAAM,QAAQ,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAQ,QAAuB,OAAO,QAAQ,QAAQ,IAAI,CAAC,CAAC;EACnH;;GAIE,OAAAA,UAAA,GAAAC,mBAmMQ,SAAA;IAnMD,OAAM;IAAwD,cAAYC,MAAA,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oF,QAApF,aAAoFC,gBAA5CF,MAAA,CAAA,CAAC,CAAA,+BAAA,CAAA,GAAA,CAAA;KACzCC,mBAGO,QAAA,EAHD,OAAKS,eAAA,CAAC,4CAAmDV,MAAA,UAAA,IAAU,oCAAA,4BAAA,CAAA,EAAA,GACvE,CAAAC,mBAAkH,QAAA,EAA5G,OAAKS,eAAA,CAAC,uBAA8BV,MAAA,UAAA,IAAU,2BAAA,4BAAA,CAAA,EAAA,GAAA,MAAA,CAA8D,GAAAY,gBAAA,MAClHV,gBAAGF,MAAA,UAAA,IAAaA,MAAA,CAAA,CAAC,CAAA,qCAAA,IAA0CA,MAAA,CAAA,CAAC,CAAA,qCAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Editor } from "@tiptap/core";
|
|
2
2
|
//#region src/features/composites/components/CompositeInspector.vue.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* Side panel with the metadata of the document *or* of the
|
|
4
|
+
* Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to
|
|
5
5
|
* `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is
|
|
6
6
|
* the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at
|
|
7
7
|
* the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.
|
|
8
8
|
*
|
|
9
|
-
* The „
|
|
10
|
-
* the editor was ever focused, while the caret is in editor text outside any
|
|
9
|
+
* The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before
|
|
10
|
+
* the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.
|
|
11
11
|
* `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel
|
|
12
12
|
* shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.
|
|
13
13
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { setBlockProperty } from "../properties.js";
|
|
1
2
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
2
3
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
3
|
-
import { setCompositeMetaField } from "../rows.js";
|
|
4
4
|
import { rowStatus, statusStyle } from "../meta-display.js";
|
|
5
5
|
import { computed, createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
6
6
|
//#region src/features/composites/components/CompositeStatusMenu.vue
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
25
25
|
type: "checkbox",
|
|
26
26
|
checked: option.value === status.value?.value,
|
|
27
27
|
onUpdateChecked(checked) {
|
|
28
|
-
if (checked)
|
|
28
|
+
if (checked) setBlockProperty(props.editor, props.row, "status", option.value);
|
|
29
29
|
}
|
|
30
30
|
})));
|
|
31
31
|
return (_ctx, _cache) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeStatusMenu.js","names":["_openBlock","_createBlock","_unref","_withCtx","_renderSlot"],"sources":["../../../../src/features/composites/components/CompositeStatusMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed } from 'vue'\nimport type { DropdownItem } from '../../../vue/kit/types'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { rowStatus, statusStyle } from '../meta-display'\nimport { type CompositeRow
|
|
1
|
+
{"version":3,"file":"CompositeStatusMenu.js","names":["_openBlock","_createBlock","_unref","_withCtx","_renderSlot"],"sources":["../../../../src/features/composites/components/CompositeStatusMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed } from 'vue'\nimport type { DropdownItem } from '../../../vue/kit/types'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { rowStatus, statusStyle } from '../meta-display'\nimport { setBlockProperty } from '../properties'\nimport type { CompositeRow } from '../rows'\n\n/**\n * Quick status change: the default slot (a button) opens a menu of the status field's options. Kinds without a\n * status field render the slot bare.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow }>()\n\nconst { DropdownMenu: UDropdownMenu } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst status = computed(() => rowStatus(props.row, t))\n\nconst items = computed<DropdownItem[]>(() => (status.value?.field.options ?? []).map(option => ({\n label: option.label,\n icon: statusStyle(option.value).icon,\n type: 'checkbox',\n checked: option.value === status.value?.value,\n // Checking the current value again would \"uncheck\" it: only a newly chosen value is written.\n onUpdateChecked(checked: boolean) {\n if (checked) setBlockProperty(props.editor, props.row, 'status', option.value)\n },\n})))\n</script>\n\n<template>\n <UDropdownMenu v-if=\"status\" :items=\"items\" :content=\"{ side: 'bottom', align: 'start', sideOffset: 4 }\" :ui=\"{ content: 'w-40' }\">\n <slot />\n </UDropdownMenu>\n <slot v-else />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EAEd,MAAM,EAAE,cAAc,kBAAkB,SAAS;EACjD,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,SAAS,eAAe,UAAU,MAAM,KAAK,CAAC,CAAC;EAErD,MAAM,QAAQ,gBAAgC,OAAO,OAAO,MAAM,WAAW,CAAC,EAAA,CAAG,KAAI,YAAW;GAC9F,OAAO,OAAO;GACd,MAAM,YAAY,OAAO,KAAK,CAAC,CAAC;GAChC,MAAM;GACN,SAAS,OAAO,UAAU,OAAO,OAAO;GAExC,gBAAgB,SAAkB;IAChC,IAAI,SAAS,iBAAiB,MAAM,QAAQ,MAAM,KAAK,UAAU,OAAO,KAAK;GAC/E;EACF,EAAE,CAAC;;GAIoB,OAAA,OAAA,SAArBA,UAAA,GAAAC,YAEgBC,MAAA,aAAA,GAAA;;IAFc,OAAO,MAAA;IAAQ,SAAS;KAAA,MAAA;KAAA,OAAA;KAAA,YAAA;IAAA;IAAoD,IAAI,EAAA,SAAA,OAAA;;IAC5G,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;GAEV,GAAA,GAAA,CAAA,OAAA,CAAA,KAAAA,WAAe,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
|
|
@@ -9,7 +9,7 @@ const _hoisted_1 = {
|
|
|
9
9
|
};
|
|
10
10
|
const _hoisted_2 = { class: "mt-1 block text-xs text-[var(--sk-fg-dimmed)]" };
|
|
11
11
|
/**
|
|
12
|
-
* The summary (description) of one
|
|
12
|
+
* The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with
|
|
13
13
|
* debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and
|
|
14
14
|
* shows plain text while `readonly`.
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeSummaryEditor.js","names":["_openBlock","_createBlock","_unref","_createElementBlock","_normalizeClass","_toDisplayString","_createTextVNode","_createElementVNode"],"sources":["../../../../src/features/composites/components/CompositeSummaryEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { type CompositeRow, setCompositeDescription } from '../rows'\n\n/**\n * The summary (description) of one
|
|
1
|
+
{"version":3,"file":"CompositeSummaryEditor.js","names":["_openBlock","_createBlock","_unref","_createElementBlock","_normalizeClass","_toDisplayString","_createTextVNode","_createElementVNode"],"sources":["../../../../src/features/composites/components/CompositeSummaryEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { type CompositeRow, setCompositeDescription } from '../rows'\n\n/**\n * The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with\n * debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and\n * shows plain text while `readonly`.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow, readonly?: boolean }>()\n\nconst { Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst draft = ref(props.row.description)\nconst typing = ref(false)\nlet dirty = false\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nwatch(() => props.row.description, (value) => {\n if (!typing.value && !dirty) draft.value = value\n})\n\nfunction commit() {\n clearTimeout(timer)\n if (!dirty) return\n dirty = false\n if (!props.editor.isDestroyed) setCompositeDescription(props.editor, props.row, draft.value)\n}\n\nfunction onInput(value: unknown) {\n draft.value = typeof value === 'string' ? value : ''\n dirty = true\n clearTimeout(timer)\n timer = setTimeout(commit, 500)\n}\n\nfunction onBlur() {\n typing.value = false\n commit()\n}\n\nonBeforeUnmount(commit)\n</script>\n\n<template>\n <UTextarea\n v-if=\"row.descriptionTextOnly && !readonly\"\n :model-value=\"draft\"\n :placeholder=\"t('composites.summary.placeholder')\"\n :aria-label=\"t('composites.summary.label')\"\n size=\"sm\"\n autoresize\n :rows=\"2\"\n :maxrows=\"6\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @update:model-value=\"onInput\"\n />\n <p v-else-if=\"readonly\" :class=\"['text-sm', row.description ? 'text-[var(--sk-fg)]' : 'text-[var(--sk-fg-dimmed)]']\">\n {{ row.description || t('composites.summary.none') }}\n </p>\n <p v-else class=\"text-sm text-[var(--sk-muted)]\">\n {{ row.description }}\n <span class=\"mt-1 block text-xs text-[var(--sk-fg-dimmed)]\">{{ t('composites.summary.formatted') }}</span>\n </p>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EAEd,MAAM,EAAE,UAAU,cAAc,SAAS;EACzC,MAAM,EAAE,MAAM,cA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CAAA,GAAAE,mBAA0G,QAA1G,YAA0GF,gBAA3CH,MAAA,CAAA,CAAC,CAAA,8BAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { CompositeRow } from "../rows.js";
|
|
|
2
2
|
import { Editor } from "@tiptap/core";
|
|
3
3
|
//#region src/features/composites/components/CompositeSummaryEditor.vue.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* The summary (description) of one
|
|
5
|
+
* The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with
|
|
6
6
|
* debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and
|
|
7
7
|
* shows plain text while `readonly`.
|
|
8
8
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { blockTypesOf } from "../nodes.js";
|
|
2
2
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
3
3
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
4
4
|
import { FILTER_ALL, columnSpecsOf, fieldColumnsOf, fieldOf, fieldText, hasText, isLongText, sortRows, toggled } from "../table-model.js";
|
|
@@ -59,7 +59,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
59
59
|
rows.value;
|
|
60
60
|
return props.editor ? {
|
|
61
61
|
doc: props.editor.state.doc,
|
|
62
|
-
kinds:
|
|
62
|
+
kinds: blockTypesOf(props.editor),
|
|
63
63
|
t
|
|
64
64
|
} : void 0;
|
|
65
65
|
});
|