@formicoidea/labre-core 0.32.0 → 0.34.1
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/dist/_pkgs/affine-block-attachment/attachment-block.js +3 -3
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.d.ts +2 -2
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.js +9 -7
- package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +12 -12
- package/dist/_pkgs/affine-block-callout/callout-block.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block.js +2 -2
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +9 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-database/data-source.js +1 -2
- package/dist/_pkgs/affine-block-database/database-block.js +2 -2
- package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +1 -1
- package/dist/_pkgs/affine-block-embed/common/render-linked-doc.js +3 -3
- package/dist/_pkgs/affine-block-embed/configs/toolbar.js +11 -11
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.d.ts +7 -7
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +14 -14
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +10 -10
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +4 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/utils.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js +5 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +10 -10
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-manager.js +3 -1
- package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-toolbar.js +2 -2
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
- package/dist/_pkgs/affine-block-image/configs/toolbar.js +4 -4
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
- package/dist/_pkgs/affine-block-list/utils/forward-delete.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-block.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-blocks-between.js +1 -1
- package/dist/_pkgs/affine-block-note/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-note/move-block.js +1 -1
- package/dist/_pkgs/affine-block-paragraph/utils/forward-delete.js +2 -2
- package/dist/_pkgs/affine-block-paragraph/utils/merge-with-prev.js +1 -1
- package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +6 -4
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.d.ts +10 -10
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.js +4 -4
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.d.ts +7 -7
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +9 -9
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +3 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/plain-text/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +18 -3
- package/dist/_pkgs/affine-block-surface/element-model/index.js +12 -2
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +23 -6
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +10 -5
- package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +2 -1
- package/dist/_pkgs/affine-block-surface/extensions/element-renderer.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +404 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +323 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +61 -61
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +78 -80
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.d.ts +21 -0
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.js +17 -3
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +107 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +958 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +809 -20
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +1661 -50
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +50 -6
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +129 -32
- package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +289 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +126 -1
- package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +42 -2
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +80 -4
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +172 -11
- package/dist/_pkgs/affine-block-surface/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.d.ts +17 -0
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +66 -0
- package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
- package/dist/_pkgs/affine-block-surface/view.js +5 -0
- package/dist/_pkgs/affine-block-surface-ref/configs/toolbar.js +4 -4
- package/dist/_pkgs/affine-block-surface-ref/portal/note.js +2 -2
- package/dist/_pkgs/affine-block-table/commands.js +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
- package/dist/_pkgs/affine-components/filterable-list/styles.js +1 -1
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/highlight-duotone-icon.js +8 -8
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/text-duotone-icon.js +11 -11
- package/dist/_pkgs/affine-components/icons/text.js +426 -426
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.d.ts +2 -0
- package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
- package/dist/_pkgs/affine-components/resource/resource.js +2 -0
- package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -0
- package/dist/_pkgs/affine-components/toolbar/index.js +1 -0
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -1
- package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +55 -0
- package/dist/_pkgs/affine-components/toolbar/picker-menu.js +47 -0
- package/dist/_pkgs/affine-components/view-dropdown-menu/dropdown-menu.js +27 -14
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/mobile-outline-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +7 -10
- package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +19 -1
- package/dist/_pkgs/affine-gfx-connector/connector-tool.js +10 -2
- package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +2 -1
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +1 -3
- package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +583 -4
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +23 -23
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +5 -1
- package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-note/overlay/overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/consts.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-draggable.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/polygon.js +17 -9
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/utils.js +8 -3
- package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-vertex-editing-overlay.js +12 -7
- package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +4 -2
- package/dist/_pkgs/affine-gfx-shape/shape-tool.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +1 -3
- package/dist/_pkgs/affine-gfx-template/builtin/other.js +66 -17
- package/dist/_pkgs/affine-gfx-template/toolbar/overlay-scrollbar.js +1 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
- package/dist/_pkgs/affine-inline-link/command.js +1 -1
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.d.ts +4 -4
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-inline-preset/command/format-block.js +1 -1
- package/dist/_pkgs/affine-inline-preset/command/format-native.js +2 -2
- package/dist/_pkgs/affine-inline-preset/command/format-text.js +1 -1
- package/dist/_pkgs/affine-inline-preset/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.d.ts +4 -4
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
- package/dist/_pkgs/affine-model/elements/bpmn/node.d.ts +40 -7
- package/dist/_pkgs/affine-model/elements/bpmn/node.js +4 -2
- package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +135 -17
- package/dist/_pkgs/affine-model/elements/bpmn/pool.js +148 -26
- package/dist/_pkgs/affine-model/elements/c4/board.d.ts +88 -0
- package/dist/_pkgs/affine-model/elements/c4/board.js +128 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.d.ts +63 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.js +134 -0
- package/dist/_pkgs/affine-model/elements/c4/index.d.ts +3 -0
- package/dist/_pkgs/affine-model/elements/c4/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/c4/node.d.ts +97 -0
- package/dist/_pkgs/affine-model/elements/c4/node.js +130 -0
- package/dist/_pkgs/affine-model/elements/connector/connector.js +1 -1
- package/dist/_pkgs/affine-model/elements/context-map/context-map.d.ts +27 -0
- package/dist/_pkgs/affine-model/elements/context-map/context-map.js +94 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +34 -17
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +28 -26
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.js +9 -4
- package/dist/_pkgs/affine-model/elements/edgy/board.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/edgy/board.js +9 -4
- package/dist/_pkgs/affine-model/elements/edgy/facets.d.ts +20 -3
- package/dist/_pkgs/affine-model/elements/edgy/facets.js +13 -4
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.js +9 -4
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +36 -0
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +103 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/framework-background/background.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/framework-background/background.js +9 -4
- package/dist/_pkgs/affine-model/elements/framework-background/hit-test.d.ts +48 -0
- package/dist/_pkgs/affine-model/elements/framework-background/hit-test.js +55 -0
- package/dist/_pkgs/affine-model/elements/framework-background/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/framework-background/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/index.d.ts +11 -0
- package/dist/_pkgs/affine-model/elements/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
- package/dist/_pkgs/affine-shared/adapters/html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/utils/color.js +5 -2
- package/dist/_pkgs/affine-shared/commands/model-crud/draft-selected-models.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-end.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-start.js +1 -1
- package/dist/_pkgs/affine-shared/consts/index.d.ts +10 -0
- package/dist/_pkgs/affine-shared/consts/index.js +10 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.d.ts +55 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.js +35 -0
- package/dist/_pkgs/affine-shared/services/audit-service.d.ts +11 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.d.ts +31 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.js +109 -0
- package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +1 -1
- package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +1 -1
- package/dist/_pkgs/affine-shared/services/edit-props-store.d.ts +11 -0
- package/dist/_pkgs/affine-shared/services/edit-props-store.js +15 -0
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
- package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/services/index.js +2 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +2 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +73 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.d.ts +32 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.js +16 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/flags.d.ts +10 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/flags.js +32 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +44 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +161 -3
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +106 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +201 -0
- package/dist/_pkgs/affine-shared/services/translation-service/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/translation-service/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +5 -3
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
- package/dist/_pkgs/affine-shared/utils/edgeless.js +1 -1
- package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +34 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.js +48 -7
- package/dist/_pkgs/affine-shared/utils/zod-schema.js +1 -3
- package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.d.ts +14 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.js +40 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +158 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +572 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.d.ts +41 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +49 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.d.ts +13 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.js +50 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.d.ts +6 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +15 -5
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/extension/index.d.ts +7 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +19 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +51 -10
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
- package/dist/_pkgs/affine-widget-keyboard-toolbar/config.js +2 -1
- package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
- package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-tool-panel.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
- package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/config.js +2 -1
- package/dist/_pkgs/affine-widget-toolbar/toolbar.js +11 -2
- package/dist/_pkgs/affine-widget-toolbar/utils.d.ts +19 -2
- package/dist/_pkgs/affine-widget-toolbar/utils.js +28 -9
- package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +11 -11
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +8 -12
- package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +52 -40
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/group.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +18 -18
- package/dist/_pkgs/std/clipboard/utils.js +4 -1
- package/dist/_pkgs/std/extension/command-registry.d.ts +195 -5
- package/dist/_pkgs/std/extension/command-registry.js +218 -4
- package/dist/_pkgs/std/extension/shortcut.js +2 -1
- package/dist/_pkgs/std/extension/translation-manifest.d.ts +46 -1
- package/dist/_pkgs/std/extension/translation-manifest.js +58 -0
- package/dist/_pkgs/std/gfx/grid.js +1 -1
- package/dist/_pkgs/std/gfx/highlight.d.ts +84 -0
- package/dist/_pkgs/std/gfx/highlight.js +112 -0
- package/dist/_pkgs/std/gfx/index.d.ts +2 -1
- package/dist/_pkgs/std/gfx/index.js +1 -0
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +17 -3
- package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +160 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +75 -1
- package/dist/_pkgs/std/gfx/model/surface/role.js +5 -3
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +2 -1
- package/dist/_pkgs/std/gfx/selection.js +1 -1
- package/dist/_pkgs/std/gfx/viewport.js +1 -1
- package/dist/_pkgs/std/inline/extensions/inline-manager.js +1 -1
- package/dist/_pkgs/std/inline/extensions/markdown-matcher.js +1 -1
- package/dist/_pkgs/std/scope/std-scope.d.ts +2 -1
- package/dist/_pkgs/std/scope/std-scope.js +2 -0
- package/dist/_pkgs/std/utils/gfx.js +2 -0
- package/dist/_pkgs/store/model/store/crud.js +4 -1
- package/dist/commands.js +1 -1
- package/dist/extensions/command-usage.d.ts +23 -0
- package/dist/extensions/command-usage.js +37 -0
- package/dist/extensions/view.js +12 -0
- package/dist/frameworks.js +32 -0
- package/dist/shortcuts.d.ts +20 -6
- package/dist/shortcuts.js +7 -9
- package/dist/translations.js +98 -3
- package/package.json +13 -1
|
@@ -180,67 +180,67 @@ let ReadingProposalWidget = (() => {
|
|
|
180
180
|
static { this.styles = [
|
|
181
181
|
editorAnchoredPanelStyles,
|
|
182
182
|
css `
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
.reading-title {
|
|
184
|
+
font-weight: 600;
|
|
185
|
+
margin-bottom: 8px;
|
|
186
|
+
}
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
.reading-field + .reading-field {
|
|
189
|
+
margin-top: 10px;
|
|
190
|
+
padding-top: 10px;
|
|
191
|
+
border-top: 1px solid var(--affine-border-color);
|
|
192
|
+
}
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
.reading-label {
|
|
195
|
+
color: var(--affine-text-secondary-color);
|
|
196
|
+
font-size: 11px;
|
|
197
|
+
text-transform: uppercase;
|
|
198
|
+
letter-spacing: 0.04em;
|
|
199
|
+
}
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
.reading-value {
|
|
202
|
+
overflow-wrap: anywhere;
|
|
203
|
+
}
|
|
204
204
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
.reading-empty {
|
|
206
|
+
color: var(--affine-text-secondary-color);
|
|
207
|
+
font-style: italic;
|
|
208
|
+
}
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
.reading-note {
|
|
211
|
+
margin-top: 2px;
|
|
212
|
+
color: var(--affine-text-secondary-color);
|
|
213
|
+
font-size: 13px;
|
|
214
|
+
overflow-wrap: anywhere;
|
|
215
|
+
}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
217
|
+
.reading-actions {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-wrap: wrap;
|
|
220
|
+
gap: 8px;
|
|
221
|
+
margin-top: 8px;
|
|
222
|
+
}
|
|
223
223
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
224
|
+
.reading-action {
|
|
225
|
+
padding: 2px 8px;
|
|
226
|
+
border-radius: 4px;
|
|
227
|
+
border: 1px solid var(--affine-border-color);
|
|
228
|
+
background: transparent;
|
|
229
|
+
color: var(--affine-text-secondary-color);
|
|
230
|
+
font-family: inherit;
|
|
231
|
+
font-size: 12px;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
}
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
.reading-action:hover {
|
|
236
|
+
background: var(--affine-hover-color);
|
|
237
|
+
color: var(--affine-text-primary-color);
|
|
238
|
+
}
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
.reading-action:focus-visible {
|
|
241
|
+
outline: 2px solid var(--affine-primary-color);
|
|
242
|
+
outline-offset: 1px;
|
|
243
|
+
}
|
|
244
244
|
`,
|
|
245
245
|
]; }
|
|
246
246
|
#_revision_accessor_storage;
|
|
@@ -389,8 +389,7 @@ let ReadingProposalWidget = (() => {
|
|
|
389
389
|
@click=${this._confirmNature(reading.elementId, tagId, proposed)}
|
|
390
390
|
>
|
|
391
391
|
${translateKey(this.std, 'com.labre.reading.action.confirm-nature', 'Confirm')}
|
|
392
|
-
·
|
|
393
|
-
${proposed.map(id => this._natureLabel(tagId, id)).join(', ')}
|
|
392
|
+
· ${proposed.map(id => this._natureLabel(tagId, id)).join(', ')}
|
|
394
393
|
</button>
|
|
395
394
|
</div>`
|
|
396
395
|
: nothing}`);
|
|
@@ -412,8 +411,7 @@ let ReadingProposalWidget = (() => {
|
|
|
412
411
|
${translateKey(this.std, 'com.labre.reading.relations.none', 'No typed link touches this component.')}
|
|
413
412
|
</div>`
|
|
414
413
|
: nothing}
|
|
415
|
-
${line(consumers, 'consumers')}
|
|
416
|
-
${line(suppliers, 'suppliers')}
|
|
414
|
+
${line(consumers, 'consumers')} ${line(suppliers, 'suppliers')}
|
|
417
415
|
${contradictions.length
|
|
418
416
|
? html `<div class="reading-note" data-testid="reading-contradiction">
|
|
419
417
|
${translateKey(this.std, 'com.labre.reading.relations.contradiction', 'A link states the opposite of what the positions show')}:
|
|
@@ -446,12 +444,12 @@ let ReadingProposalWidget = (() => {
|
|
|
446
444
|
const from = translateKey(this.std, 'com.labre.reading.value-flow', 'Value flows up from');
|
|
447
445
|
const to = translateKey(this.std, 'com.labre.reading.value-flow.to', 'to');
|
|
448
446
|
return this._field('reading-value-flow', translateKey(this.std, 'com.labre.reading.field.value-flow', 'Value flow'), html `${flows.map(flow => html `<div
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
447
|
+
class="reading-value"
|
|
448
|
+
data-testid="reading-value-flow-line"
|
|
449
|
+
data-edge-id=${flow.edgeId}
|
|
450
|
+
>
|
|
451
|
+
${from} ${flow.from} ${to} ${flow.to}
|
|
452
|
+
</div>`)}`);
|
|
455
453
|
}
|
|
456
454
|
_renderPhase(reading) {
|
|
457
455
|
const { phase } = reading;
|
|
@@ -495,25 +493,25 @@ let ReadingProposalWidget = (() => {
|
|
|
495
493
|
const bound = isPivotBound(element);
|
|
496
494
|
const picker = this.std.getOptional(PivotRecordPickerProvider);
|
|
497
495
|
return this._field('reading-record', translateKey(this.std, 'com.labre.reading.field.record', 'Record'), html `<div class="reading-value">
|
|
498
|
-
|
|
496
|
+
${bound
|
|
499
497
|
? translateKey(this.std, 'com.labre.reading.record.linked', 'Linked')
|
|
500
498
|
: html `<span class="reading-empty"
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
499
|
+
>${translateKey(this.std, 'com.labre.reading.record.none', 'Not linked to a record.')}</span
|
|
500
|
+
>`}
|
|
501
|
+
</div>
|
|
502
|
+
${!bound && picker && writable
|
|
505
503
|
? html `<div class="reading-actions">
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
504
|
+
<button
|
|
505
|
+
class="reading-action"
|
|
506
|
+
type="button"
|
|
507
|
+
data-testid="reading-link-record"
|
|
508
|
+
@pointerdown=${this.swallow}
|
|
509
|
+
@pointerup=${this.swallow}
|
|
510
|
+
@click=${this._linkRecord(reading.elementId)}
|
|
511
|
+
>
|
|
512
|
+
${translateKey(this.std, 'com.labre.reading.action.link', 'Link to a record')}
|
|
513
|
+
</button>
|
|
514
|
+
</div>`
|
|
517
515
|
: nothing}`);
|
|
518
516
|
}
|
|
519
517
|
/** The drift line: informative, never blocking, with one way to settle it. */
|
|
@@ -580,8 +578,8 @@ let ReadingProposalWidget = (() => {
|
|
|
580
578
|
${this._renderNodeType(reading, profile)}
|
|
581
579
|
${this._renderNature(reading, profile, record, writable)}
|
|
582
580
|
${this._renderRelations(reading)} ${this._renderValueFlow(reading)}
|
|
583
|
-
${this._renderPhase(reading)}
|
|
584
|
-
${this.
|
|
581
|
+
${this._renderPhase(reading)} ${this._renderNaming(reading)}
|
|
582
|
+
${this._renderRecord(reading, writable)}
|
|
585
583
|
${writable ? this._renderDrift(reading) : nothing}`);
|
|
586
584
|
}
|
|
587
585
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { getUniverseRegistry, hostLanguage, queryPivotProperties, } from '../../affine-shared/services/index.js';
|
|
2
2
|
import { createIdentifier } from '../../global/di/index.js';
|
|
3
|
-
import { LifeCycleWatcher } from '../../std/index.js';
|
|
3
|
+
import { LifeCycleWatcher, } from '../../std/index.js';
|
|
4
4
|
import { GfxControllerIdentifier, GfxPrimitiveElementModel, isPivotBound, readElementTags, roleIsA, } from '../../std/gfx/index.js';
|
|
5
5
|
import { effect, signal } from '@preact/signals-core';
|
|
6
6
|
// Straight at the two leaf modules rather than at the barrel, for the reason
|
|
7
7
|
// `validation.ts` states: `index.js` also re-exports the RENDERER, and a
|
|
8
8
|
// reading is a one-way read of pure declaration data that must never pull a
|
|
9
9
|
// canvas in.
|
|
10
|
-
import { backgroundPlot } from '../framework-background/def.js';
|
|
10
|
+
import { backgroundPlot, } from '../framework-background/def.js';
|
|
11
11
|
import { backgroundTransitionBands } from '../framework-background/facts.js';
|
|
12
12
|
/** Deepest role chain reported by {@link ReadingNodeType.specialises}. */
|
|
13
13
|
const MAX_ROLE_DEPTH = 32;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConnectorElementModel } from '../../affine-model/index.js';
|
|
2
|
+
import type { Bound } from '../../global/gfx/index.js';
|
|
2
3
|
import type { GfxModel } from '../../std/gfx/index.js';
|
|
3
4
|
import { InteractivityExtension } from '../../std/gfx/index.js';
|
|
4
5
|
import type { ExtensionType } from '../../store/index.js';
|
|
@@ -25,6 +26,26 @@ export declare function SpotlightHostExtension(elementType: string): ExtensionTy
|
|
|
25
26
|
* two endpoints). Pure — exported for unit tests.
|
|
26
27
|
*/
|
|
27
28
|
export declare function spotlightSet(target: GfxModel, getConnectors: (id: string) => ConnectorElementModel[]): Set<string>;
|
|
29
|
+
/** The shape {@link findSpotlightHost} needs of a candidate host. */
|
|
30
|
+
export type SpotlightHostCandidate = {
|
|
31
|
+
type: string;
|
|
32
|
+
elementBound: Bound;
|
|
33
|
+
spotlightEnabled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The host that grants `target` the spotlight, or `null` when none does.
|
|
37
|
+
*
|
|
38
|
+
* A host qualifies when its type was REGISTERED as a spotlight host
|
|
39
|
+
* (`SpotlightHostExtension`), when it did not opt out (`spotlightEnabled:
|
|
40
|
+
* false`, its toolbar toggle) and when its bounds contain the target. A
|
|
41
|
+
* background whose type is not registered grants nothing, whatever fields it
|
|
42
|
+
* carries — that is how the EDGY facets Venn stopped spotlighting (#195).
|
|
43
|
+
*
|
|
44
|
+
* Pure — exported for unit tests.
|
|
45
|
+
*/
|
|
46
|
+
export declare function findSpotlightHost<T extends SpotlightHostCandidate>(target: {
|
|
47
|
+
elementBound: Bound;
|
|
48
|
+
}, elements: readonly T[], hostTypes: readonly string[]): T | null;
|
|
28
49
|
export declare class SpotlightManager extends InteractivityExtension {
|
|
29
50
|
static key: string;
|
|
30
51
|
/** Elements currently faded, restored on leave. */
|
|
@@ -47,6 +47,22 @@ export function spotlightSet(target, getConnectors) {
|
|
|
47
47
|
}
|
|
48
48
|
return keep;
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The host that grants `target` the spotlight, or `null` when none does.
|
|
52
|
+
*
|
|
53
|
+
* A host qualifies when its type was REGISTERED as a spotlight host
|
|
54
|
+
* (`SpotlightHostExtension`), when it did not opt out (`spotlightEnabled:
|
|
55
|
+
* false`, its toolbar toggle) and when its bounds contain the target. A
|
|
56
|
+
* background whose type is not registered grants nothing, whatever fields it
|
|
57
|
+
* carries — that is how the EDGY facets Venn stopped spotlighting (#195).
|
|
58
|
+
*
|
|
59
|
+
* Pure — exported for unit tests.
|
|
60
|
+
*/
|
|
61
|
+
export function findSpotlightHost(target, elements, hostTypes) {
|
|
62
|
+
return (elements.find(el => hostTypes.includes(el.type) &&
|
|
63
|
+
el.spotlightEnabled !== false &&
|
|
64
|
+
el.elementBound.contains(target.elementBound)) ?? null);
|
|
65
|
+
}
|
|
50
66
|
/** Delay before a new spotlight is applied / cleared, so brushing across
|
|
51
67
|
* elements doesn't flash the fade on and off. */
|
|
52
68
|
const SPOTLIGHT_DELAY_MS = 140;
|
|
@@ -120,9 +136,7 @@ export class SpotlightManager extends InteractivityExtension {
|
|
|
120
136
|
// The behavior is granted by a host whose bounds contain the target —
|
|
121
137
|
// unless that host opted out (`spotlightEnabled: false`, toolbar toggle).
|
|
122
138
|
const host = target
|
|
123
|
-
? surface.elementModels
|
|
124
|
-
el.spotlightEnabled !== false &&
|
|
125
|
-
el.elementBound.contains(target.elementBound))
|
|
139
|
+
? findSpotlightHost(target, surface.elementModels, hostTypes)
|
|
126
140
|
: null;
|
|
127
141
|
if (!target || !host) {
|
|
128
142
|
// Debounced restore: brushing across the gaps between elements must not
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { InterchangeImportContext, InterchangeImportResult } from './interchange.js';
|
|
2
|
+
/**
|
|
3
|
+
* **SVG → a canvas sketch.** The platform's VISUAL-tier importer, shared by
|
|
4
|
+
* every framework that declares it (`docs/adr/0012`, P2).
|
|
5
|
+
*
|
|
6
|
+
* ## The heuristics statement, and its known failure modes
|
|
7
|
+
*
|
|
8
|
+
* _This paragraph is ADR 0012's open question 2 — "each visual capability owes
|
|
9
|
+
* a one-paragraph statement of its heuristics and its known failure modes" —
|
|
10
|
+
* answered ONCE, here, because every framework that declares `…:svg:import`
|
|
11
|
+
* wraps this one function and therefore owes the same statement. It is
|
|
12
|
+
* referenced by `bpmn:svg:import` and by `wardley:svg:import`; a framework that
|
|
13
|
+
* ever wants a narrower or wider guess writes its own parser and its own
|
|
14
|
+
* paragraph beside it._
|
|
15
|
+
*
|
|
16
|
+
* **What it guesses.** An SVG carries a rendering, not a model, so this reader
|
|
17
|
+
* recognises GEOMETRY and nothing else: `<rect>` becomes a rectangle,
|
|
18
|
+
* `<circle>` and `<ellipse>` an ellipse, `<polygon>` a polygon, `<line>`,
|
|
19
|
+
* `<polyline>` and `<path>` a brush stroke sampled at its vertices, and
|
|
20
|
+
* `<text>` an editable free-text element. Fill, stroke, stroke width, font size
|
|
21
|
+
* and text anchor are carried across where the shape model has a direct
|
|
22
|
+
* equivalent, with CSS inheritance down `<g>` honoured and colours passed
|
|
23
|
+
* through verbatim. Coordinates are user units placed by the outermost
|
|
24
|
+
* viewport: the `viewBox` origin is subtracted and the `viewBox`-to-`width`
|
|
25
|
+
* scale is applied uniformly (`min(width / viewBox width, height / viewBox
|
|
26
|
+
* height)`, which is what the default `preserveAspectRatio` means), then every
|
|
27
|
+
* `translate(…)` on the way down. Everything it emits is an ADR 0007 **level 1**
|
|
28
|
+
* element — a plain shape on the free surface, which the author then PROMOTES.
|
|
29
|
+
* It recognises no role, no relation and no framework vocabulary, and it never
|
|
30
|
+
* claims to: a Wardley component and a text box are both `<rect>` plus
|
|
31
|
+
* `<text>`, and deciding which is which is the one question only the author can
|
|
32
|
+
* answer.
|
|
33
|
+
*
|
|
34
|
+
* **Where it is known to be wrong, and the list is meant to be complete.** A
|
|
35
|
+
* `scale`, `rotate`, `matrix` or `skew` transform is IGNORED rather than
|
|
36
|
+
* applied, so anything under one lands at its untransformed position and size.
|
|
37
|
+
* Curves (`C`, `S`, `Q`, `T`, `A`) are flattened to their endpoints, so a
|
|
38
|
+
* rounded connector arrives as a polyline through its anchor points and an arc
|
|
39
|
+
* that doubles back arrives as a straight line. A `<path>` that outlines a
|
|
40
|
+
* filled region (an arrowhead, an icon glyph) arrives as an open stroke, not as
|
|
41
|
+
* a filled shape. `<image>`, `<defs>`, `<marker>`, gradients, filters,
|
|
42
|
+
* `<clipPath>` and `<mask>` are skipped by the reader, and `<use>` and
|
|
43
|
+
* `<foreignObject>` never reach it at all — the SANITIZER removes them, because
|
|
44
|
+
* they are two of the constructs an SVG can carry code in. A `<style>` sheet is
|
|
45
|
+
* skipped, and that one is worth naming twice: mermaid paints almost entirely
|
|
46
|
+
* through CSS classes, so a mermaid SVG arrives in the initial colours — mostly
|
|
47
|
+
* black — with only the note to say why. `<title>`, `<desc>` and `<metadata>`
|
|
48
|
+
* are dropped in silence, deliberately and as the only exception to the rule
|
|
49
|
+
* below: they render nothing, so there is nothing to have lost.
|
|
50
|
+
*
|
|
51
|
+
* **What this reader alters without a note, because a note could not help.**
|
|
52
|
+
* Text width and height are ESTIMATED from the font size and the character
|
|
53
|
+
* count, because measuring text needs a font a pure function of a string is not
|
|
54
|
+
* allowed to have, so a label box is approximately and not exactly the size it
|
|
55
|
+
* was. Whitespace inside a label is collapsed to single spaces and trimmed
|
|
56
|
+
* (`xml:space="preserve"` is not honoured). A `<tspan>`'s own `x`/`y`, its `dx`
|
|
57
|
+
* / `dy` offsets and `dominant-baseline` are ignored, so a label laid out span
|
|
58
|
+
* by span arrives as plain stacked lines in document order. `stroke-dasharray`
|
|
59
|
+
* is not read, so a dashed line arrives solid. `em` font sizes are resolved
|
|
60
|
+
* against the inherited size only, with no font-relative refinement.
|
|
61
|
+
*
|
|
62
|
+
* **Everything else is reported.** Every OTHER construct this reader ignores,
|
|
63
|
+
* alters or cannot resolve produces exactly one `warning` note per KIND — never
|
|
64
|
+
* one per instance — so a result that looks empty always says why.
|
|
65
|
+
*
|
|
66
|
+
* ## What it never does
|
|
67
|
+
*
|
|
68
|
+
* **It writes no `interchange` payload, on any element, ever** — P2's hard
|
|
69
|
+
* rule, pinned by an anti-decay test in this package's own spec. There is
|
|
70
|
+
* nothing to preserve that the elements do not already carry: an SVG round-trip
|
|
71
|
+
* would be a re-render rather than a round-trip, and a payload would advertise
|
|
72
|
+
* a promise this tier deliberately does not make. `carried` and `quarantined`
|
|
73
|
+
* are therefore `0` in every report it returns, and the surface that offers the
|
|
74
|
+
* import must say all of this BEFORE the file is read.
|
|
75
|
+
*
|
|
76
|
+
* ## Pure, and framework-agnostic
|
|
77
|
+
*
|
|
78
|
+
* Text in, serialized element props out (P3): no `std`, no surface, no DI, so
|
|
79
|
+
* labre-mcp calls the very same function the editor commands call. It produces
|
|
80
|
+
* only generic `shape` / `text` / `brush` props and knows the name of no
|
|
81
|
+
* framework — which is exactly why several frameworks can declare it. ADR 0012
|
|
82
|
+
* explicitly rejects inferring one framework from a `.svg`, so the capability
|
|
83
|
+
* is declared per framework and this parser is what each of them wraps.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* The format id. Never used as a payload key, unlike every semantic format's —
|
|
87
|
+
* a visual import writes no payload at all — but it is what the report's
|
|
88
|
+
* headline calls itself ("SVG imported"), and what the registry's triple is
|
|
89
|
+
* built from.
|
|
90
|
+
*/
|
|
91
|
+
export declare const SVG_SKETCH_FORMAT_ID = "svg";
|
|
92
|
+
export declare const SVG_SKETCH_EXTENSION = ".svg";
|
|
93
|
+
export declare const SVG_SKETCH_MIME = "image/svg+xml";
|
|
94
|
+
/**
|
|
95
|
+
* An SVG file as a canvas sketch — the shared VISUAL-tier importer.
|
|
96
|
+
*
|
|
97
|
+
* See this module's own documentation for the heuristics statement and the
|
|
98
|
+
* known failure modes (ADR 0012, open question 2). The contract in one
|
|
99
|
+
* sentence: the picture arrives as editable elements, and nothing else is
|
|
100
|
+
* promised.
|
|
101
|
+
*
|
|
102
|
+
* A blank or unrecognisable drawing is `0` elements and a note, NOT an
|
|
103
|
+
* exception: the file was read, it simply held nothing this reader draws, and a
|
|
104
|
+
* throw would show the user an error toast where the truth is a remark.
|
|
105
|
+
* Malformed XML is the exception, because then the file was not read at all.
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseSvgSketch(source: string, context?: InterchangeImportContext): InterchangeImportResult;
|