@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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { field } from '../../../std/gfx/index.js';
|
|
36
|
+
import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
|
|
37
|
+
/**
|
|
38
|
+
* The Event Storming board: the paper roll a Big Picture is stormed on.
|
|
39
|
+
*
|
|
40
|
+
* One axis and nothing else — TIME, running left to right along the bottom.
|
|
41
|
+
* That is the whole frame of reference Event Storming has: an event drawn to
|
|
42
|
+
* the left of another happened before it, and how HIGH a sticky sits means
|
|
43
|
+
* nothing at all (the vertical is where a workshop parks its unknowns, not a
|
|
44
|
+
* scale). Declaring the one axis and no zones is therefore the honest
|
|
45
|
+
* declaration, and it is what lets `es.against-timeline` say "this flow runs
|
|
46
|
+
* backwards" without inventing a second dimension nobody drew against.
|
|
47
|
+
*
|
|
48
|
+
* **Swimlanes are cut from v1** (plan § Coupes v1). A lane is a horizontal
|
|
49
|
+
* BAND with a name, which on this element would be a variant declaration
|
|
50
|
+
* (`variantProp: 'lanes'`) and a rule family that measures membership per lane.
|
|
51
|
+
* Neither exists yet, and shipping half of it — bands that paint but that no
|
|
52
|
+
* rule can read — would put a semantic on the vertical the framework does not
|
|
53
|
+
* have. The v2 note lives here so the day lanes land, the reason they were not
|
|
54
|
+
* here is on the record.
|
|
55
|
+
*
|
|
56
|
+
* Adds no field of its own beyond the primitive's `resizeEnabled`, so a board
|
|
57
|
+
* is byte-identical to what {@link FrameworkBackgroundElementModel} already
|
|
58
|
+
* persists. It is created 3200 × 1400 — a Big Picture is WIDE, because the
|
|
59
|
+
* timeline is the point — and freely resizable in both directions: the roll
|
|
60
|
+
* grows sideways all morning as events are remembered, and locking its
|
|
61
|
+
* proportion would fight the hand.
|
|
62
|
+
*/
|
|
63
|
+
let EventStormingBoardElementModel = (() => {
|
|
64
|
+
let _classSuper = FrameworkBackgroundElementModel;
|
|
65
|
+
let _resizeEnabled_decorators;
|
|
66
|
+
let _resizeEnabled_initializers = [];
|
|
67
|
+
let _resizeEnabled_extraInitializers = [];
|
|
68
|
+
let _rotate_decorators;
|
|
69
|
+
let _rotate_initializers = [];
|
|
70
|
+
let _rotate_extraInitializers = [];
|
|
71
|
+
let _xywh_decorators;
|
|
72
|
+
let _xywh_initializers = [];
|
|
73
|
+
let _xywh_extraInitializers = [];
|
|
74
|
+
return class EventStormingBoardElementModel extends _classSuper {
|
|
75
|
+
static {
|
|
76
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
77
|
+
_resizeEnabled_decorators = [field(true)];
|
|
78
|
+
_rotate_decorators = [field(0)];
|
|
79
|
+
_xywh_decorators = [field()];
|
|
80
|
+
__esDecorate(this, null, _resizeEnabled_decorators, { kind: "accessor", name: "resizeEnabled", static: false, private: false, access: { has: obj => "resizeEnabled" in obj, get: obj => obj.resizeEnabled, set: (obj, value) => { obj.resizeEnabled = value; } }, metadata: _metadata }, _resizeEnabled_initializers, _resizeEnabled_extraInitializers);
|
|
81
|
+
__esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
|
|
82
|
+
__esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
|
|
83
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
84
|
+
}
|
|
85
|
+
get type() {
|
|
86
|
+
return 'eventStorming';
|
|
87
|
+
}
|
|
88
|
+
#resizeEnabled_accessor_storage = __runInitializers(this, _resizeEnabled_initializers, true);
|
|
89
|
+
get resizeEnabled() { return this.#resizeEnabled_accessor_storage; }
|
|
90
|
+
set resizeEnabled(value) { this.#resizeEnabled_accessor_storage = value; }
|
|
91
|
+
#rotate_accessor_storage = (__runInitializers(this, _resizeEnabled_extraInitializers), __runInitializers(this, _rotate_initializers, 0));
|
|
92
|
+
get rotate() { return this.#rotate_accessor_storage; }
|
|
93
|
+
set rotate(value) { this.#rotate_accessor_storage = value; }
|
|
94
|
+
#xywh_accessor_storage = (__runInitializers(this, _rotate_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,3200,1400]'));
|
|
95
|
+
get xywh() { return this.#xywh_accessor_storage; }
|
|
96
|
+
set xywh(value) { this.#xywh_accessor_storage = value; }
|
|
97
|
+
constructor() {
|
|
98
|
+
super(...arguments);
|
|
99
|
+
__runInitializers(this, _xywh_extraInitializers);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
})();
|
|
103
|
+
export { EventStormingBoardElementModel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event-storming.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event-storming.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IVec } from '../../../global/gfx/index.js';
|
|
2
2
|
import { Bound } from '../../../global/gfx/index.js';
|
|
3
|
-
import type { BaseElementProps } from '../../../std/gfx/index.js';
|
|
3
|
+
import type { BaseElementProps, PointTestOptions } from '../../../std/gfx/index.js';
|
|
4
4
|
import { GfxPrimitiveElementModel } from '../../../std/gfx/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* The props every framework background carries, whatever it draws.
|
|
@@ -38,5 +38,10 @@ export declare abstract class FrameworkBackgroundElementModel<Props extends Base
|
|
|
38
38
|
containsBound(bounds: Bound): boolean;
|
|
39
39
|
getLineIntersections(start: IVec, end: IVec): import("../../../global/gfx/index.js").PointLocation[] | null;
|
|
40
40
|
getNearestPoint(point: IVec): IVec;
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Picked by its BORDER band, not by its whole area — see
|
|
43
|
+
* {@link backgroundIncludesPoint} for the why and for what a caller asking
|
|
44
|
+
* about the visible extent (`ignoreTransparent: false`) still gets.
|
|
45
|
+
*/
|
|
46
|
+
includesPoint(x: number, y: number, options?: PointTestOptions): boolean;
|
|
42
47
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Bound, getPointsFromBoundWithRotation, linePolygonIntersects,
|
|
1
|
+
import { Bound, getPointsFromBoundWithRotation, linePolygonIntersects, polygonNearestPoint, } from '../../../global/gfx/index.js';
|
|
2
2
|
import { GfxPrimitiveElementModel } from '../../../std/gfx/index.js';
|
|
3
|
+
import { backgroundIncludesPoint } from './hit-test.js';
|
|
3
4
|
/**
|
|
4
5
|
* The MODEL half of the framework-background primitive (PF2.1).
|
|
5
6
|
*
|
|
@@ -35,8 +36,12 @@ export class FrameworkBackgroundElementModel extends GfxPrimitiveElementModel {
|
|
|
35
36
|
getNearestPoint(point) {
|
|
36
37
|
return polygonNearestPoint(Bound.deserialize(this.xywh).points, point);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Picked by its BORDER band, not by its whole area — see
|
|
41
|
+
* {@link backgroundIncludesPoint} for the why and for what a caller asking
|
|
42
|
+
* about the visible extent (`ignoreTransparent: false`) still gets.
|
|
43
|
+
*/
|
|
44
|
+
includesPoint(x, y, options) {
|
|
45
|
+
return backgroundIncludesPoint(this, x, y, options);
|
|
41
46
|
}
|
|
42
47
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IBound } from '../../../global/gfx/index.js';
|
|
2
|
+
import type { PointTestOptions } from '../../../std/gfx/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The width of the band a background is picked by, in SCREEN pixels.
|
|
5
|
+
*
|
|
6
|
+
* Ten is what every caller on the picking path already asks for
|
|
7
|
+
* (`getElementByPoint`, the default tool, the gfx view event handler all pass
|
|
8
|
+
* `hitThreshold: 10`); naming it here gives the one caller that passes nothing
|
|
9
|
+
* — the frame manager, which calls `includesPoint(x, y, {})` — the same band
|
|
10
|
+
* instead of a shape's 1-pixel default.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BACKGROUND_BORDER_HIT_THRESHOLD = 10;
|
|
13
|
+
/**
|
|
14
|
+
* Whether a point picks a framework background — THE hit test every background
|
|
15
|
+
* in the library shares.
|
|
16
|
+
*
|
|
17
|
+
* ## A background is picked by its border, not by its area
|
|
18
|
+
*
|
|
19
|
+
* A background is a passive canvas: the user drops nodes onto it and works on
|
|
20
|
+
* THEM. A hit test over the whole rectangle makes the backdrop compete with its
|
|
21
|
+
* own content for every click — it wins outright when it sits above in the
|
|
22
|
+
* paint order (`getElementByPoint` keeps the topmost hit), and it fills every
|
|
23
|
+
* gap when it sits below (the interior of an unfilled shape, the space beside a
|
|
24
|
+
* small node). Both were reported from the same recette (issue #194).
|
|
25
|
+
*
|
|
26
|
+
* So the band IS the affordance: within `hitThreshold` screen pixels of the
|
|
27
|
+
* (rotated) outline, and nowhere else. The threshold is divided by the zoom for
|
|
28
|
+
* the reason every shape divides it — a border band has to stay the same width
|
|
29
|
+
* under the pointer whatever the viewport is doing.
|
|
30
|
+
*
|
|
31
|
+
* ## The interior still answers "is the pointer on this element"
|
|
32
|
+
*
|
|
33
|
+
* `ignoreTransparent: false` is the existing way a caller says it is asking
|
|
34
|
+
* about the element's visible EXTENT rather than about what a click would pick
|
|
35
|
+
* — an unfilled shape answers the same two ways for the same reason
|
|
36
|
+
* (`rect.includesPoint`). Exactly two callers pass it: the default tool, which
|
|
37
|
+
* uses it to decide whether a press on an ALREADY-SELECTED element starts a
|
|
38
|
+
* move, and the connector manager, which never sees a background at all
|
|
39
|
+
* (`connectable` is false). So a selected background keeps being dragged from
|
|
40
|
+
* anywhere inside it, and only picking changed.
|
|
41
|
+
*
|
|
42
|
+
* ## What did NOT change
|
|
43
|
+
*
|
|
44
|
+
* `containsBound` / `intersectsBound` (the lasso), `getNearestPoint` and
|
|
45
|
+
* `getLineIntersections` are untouched: a rubber band that had to graze the
|
|
46
|
+
* outline would be a second regression dressed as a fix.
|
|
47
|
+
*/
|
|
48
|
+
export declare function backgroundIncludesPoint(bounds: IBound, x: number, y: number, options?: PointTestOptions): boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { getPointsFromBoundWithRotation, pointInPolygon, pointOnPolygonStoke, } from '../../../global/gfx/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The width of the band a background is picked by, in SCREEN pixels.
|
|
4
|
+
*
|
|
5
|
+
* Ten is what every caller on the picking path already asks for
|
|
6
|
+
* (`getElementByPoint`, the default tool, the gfx view event handler all pass
|
|
7
|
+
* `hitThreshold: 10`); naming it here gives the one caller that passes nothing
|
|
8
|
+
* — the frame manager, which calls `includesPoint(x, y, {})` — the same band
|
|
9
|
+
* instead of a shape's 1-pixel default.
|
|
10
|
+
*/
|
|
11
|
+
export const BACKGROUND_BORDER_HIT_THRESHOLD = 10;
|
|
12
|
+
/**
|
|
13
|
+
* Whether a point picks a framework background — THE hit test every background
|
|
14
|
+
* in the library shares.
|
|
15
|
+
*
|
|
16
|
+
* ## A background is picked by its border, not by its area
|
|
17
|
+
*
|
|
18
|
+
* A background is a passive canvas: the user drops nodes onto it and works on
|
|
19
|
+
* THEM. A hit test over the whole rectangle makes the backdrop compete with its
|
|
20
|
+
* own content for every click — it wins outright when it sits above in the
|
|
21
|
+
* paint order (`getElementByPoint` keeps the topmost hit), and it fills every
|
|
22
|
+
* gap when it sits below (the interior of an unfilled shape, the space beside a
|
|
23
|
+
* small node). Both were reported from the same recette (issue #194).
|
|
24
|
+
*
|
|
25
|
+
* So the band IS the affordance: within `hitThreshold` screen pixels of the
|
|
26
|
+
* (rotated) outline, and nowhere else. The threshold is divided by the zoom for
|
|
27
|
+
* the reason every shape divides it — a border band has to stay the same width
|
|
28
|
+
* under the pointer whatever the viewport is doing.
|
|
29
|
+
*
|
|
30
|
+
* ## The interior still answers "is the pointer on this element"
|
|
31
|
+
*
|
|
32
|
+
* `ignoreTransparent: false` is the existing way a caller says it is asking
|
|
33
|
+
* about the element's visible EXTENT rather than about what a click would pick
|
|
34
|
+
* — an unfilled shape answers the same two ways for the same reason
|
|
35
|
+
* (`rect.includesPoint`). Exactly two callers pass it: the default tool, which
|
|
36
|
+
* uses it to decide whether a press on an ALREADY-SELECTED element starts a
|
|
37
|
+
* move, and the connector manager, which never sees a background at all
|
|
38
|
+
* (`connectable` is false). So a selected background keeps being dragged from
|
|
39
|
+
* anywhere inside it, and only picking changed.
|
|
40
|
+
*
|
|
41
|
+
* ## What did NOT change
|
|
42
|
+
*
|
|
43
|
+
* `containsBound` / `intersectsBound` (the lasso), `getNearestPoint` and
|
|
44
|
+
* `getLineIntersections` are untouched: a rubber band that had to graze the
|
|
45
|
+
* outline would be a second regression dressed as a fix.
|
|
46
|
+
*/
|
|
47
|
+
export function backgroundIncludesPoint(bounds, x, y, options) {
|
|
48
|
+
const point = [x, y];
|
|
49
|
+
const points = getPointsFromBoundWithRotation(bounds);
|
|
50
|
+
const threshold = (options?.hitThreshold ?? BACKGROUND_BORDER_HIT_THRESHOLD) /
|
|
51
|
+
(options?.zoom ?? 1);
|
|
52
|
+
if (pointOnPolygonStoke(point, points, threshold))
|
|
53
|
+
return true;
|
|
54
|
+
return options?.ignoreTransparent === false && pointInPolygon(point, points);
|
|
55
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { EdgelessTextBlockModel } from '../blocks/edgeless-text/edgeless-text-model.js';
|
|
2
2
|
import type { BpmnNodeElementModel, BpmnPoolElementModel } from './bpmn/index.js';
|
|
3
3
|
import type { BrushElementModel } from './brush/index.js';
|
|
4
|
+
import type { C4BoardElementModel, C4BoundaryElementModel, C4NodeElementModel } from './c4/index.js';
|
|
4
5
|
import type { ConnectorElementModel } from './connector/index.js';
|
|
6
|
+
import type { ContextMapBoardElementModel } from './context-map/index.js';
|
|
5
7
|
import type { CoreDomainChartElementModel } from './core-domain/index.js';
|
|
8
|
+
import type { EventStormingBoardElementModel } from './event-storming/index.js';
|
|
6
9
|
import type { EdgyBoardElementModel, EdgyFacetsElementModel, EdgyNodeElementModel } from './edgy/index.js';
|
|
7
10
|
import type { CynefinElementModel } from './cynefin/index.js';
|
|
8
11
|
import type { EstuarineElementModel } from './estuarine/index.js';
|
|
@@ -14,11 +17,14 @@ import type { TextElementModel } from './text/index.js';
|
|
|
14
17
|
import type { WardleyBackgroundElementModel, WardleyNodeElementModel } from './wardley/index.js';
|
|
15
18
|
export * from './bpmn/index.js';
|
|
16
19
|
export * from './brush/index.js';
|
|
20
|
+
export * from './c4/index.js';
|
|
17
21
|
export * from './connector/index.js';
|
|
22
|
+
export * from './context-map/index.js';
|
|
18
23
|
export * from './core-domain/index.js';
|
|
19
24
|
export * from './cynefin/index.js';
|
|
20
25
|
export * from './edgy/index.js';
|
|
21
26
|
export * from './estuarine/index.js';
|
|
27
|
+
export * from './event-storming/index.js';
|
|
22
28
|
export * from './framework-background/index.js';
|
|
23
29
|
export * from './group/index.js';
|
|
24
30
|
export * from './highlighter/index.js';
|
|
@@ -30,6 +36,9 @@ export type SurfaceElementModelMap = {
|
|
|
30
36
|
bpmnNode: BpmnNodeElementModel;
|
|
31
37
|
bpmnPool: BpmnPoolElementModel;
|
|
32
38
|
brush: BrushElementModel;
|
|
39
|
+
c4Board: C4BoardElementModel;
|
|
40
|
+
c4Boundary: C4BoundaryElementModel;
|
|
41
|
+
c4Node: C4NodeElementModel;
|
|
33
42
|
highlighter: HighlighterElementModel;
|
|
34
43
|
connector: ConnectorElementModel;
|
|
35
44
|
group: GroupElementModel;
|
|
@@ -44,6 +53,8 @@ export type SurfaceElementModelMap = {
|
|
|
44
53
|
cynefin: CynefinElementModel;
|
|
45
54
|
estuarine: EstuarineElementModel;
|
|
46
55
|
coreDomain: CoreDomainChartElementModel;
|
|
56
|
+
contextMap: ContextMapBoardElementModel;
|
|
57
|
+
eventStorming: EventStormingBoardElementModel;
|
|
47
58
|
};
|
|
48
59
|
export type SurfaceTextModelMap = {
|
|
49
60
|
text: TextElementModel;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export * from './bpmn/index.js';
|
|
2
2
|
export * from './brush/index.js';
|
|
3
|
+
export * from './c4/index.js';
|
|
3
4
|
export * from './connector/index.js';
|
|
5
|
+
export * from './context-map/index.js';
|
|
4
6
|
export * from './core-domain/index.js';
|
|
5
7
|
export * from './cynefin/index.js';
|
|
6
8
|
export * from './edgy/index.js';
|
|
7
9
|
export * from './estuarine/index.js';
|
|
10
|
+
export * from './event-storming/index.js';
|
|
8
11
|
export * from './framework-background/index.js';
|
|
9
12
|
export * from './group/index.js';
|
|
10
13
|
export * from './highlighter/index.js';
|
|
@@ -213,14 +213,8 @@ function pointOnBezierGeometry(element, px, py, hitThreshold) {
|
|
|
213
213
|
const mt2 = mt * mt;
|
|
214
214
|
const t2 = t * t;
|
|
215
215
|
// Cubic Bezier: B(t) = (1-t)^3*P0 + 3(1-t)^2*t*P1 + 3(1-t)*t^2*P2 + t^3*P3
|
|
216
|
-
const bx = mt2 * mt * cx +
|
|
217
|
-
|
|
218
|
-
3 * mt * t2 * cp2x +
|
|
219
|
-
t2 * t * nx;
|
|
220
|
-
const by = mt2 * mt * cy +
|
|
221
|
-
3 * mt2 * t * cp1y +
|
|
222
|
-
3 * mt * t2 * cp2y +
|
|
223
|
-
t2 * t * ny;
|
|
216
|
+
const bx = mt2 * mt * cx + 3 * mt2 * t * cp1x + 3 * mt * t2 * cp2x + t2 * t * nx;
|
|
217
|
+
const by = mt2 * mt * cy + 3 * mt2 * t * cp1y + 3 * mt * t2 * cp2y + t2 * t * ny;
|
|
224
218
|
const dbx = px - bx;
|
|
225
219
|
const dby = py - by;
|
|
226
220
|
if (dbx * dbx + dby * dby <= hitDistSq)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockHtmlAdapterMatcherIdentifier = createIdentifier('BlockHtmlAdapterMatcher');
|
|
3
3
|
export function BlockHtmlAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockHtmlAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockMarkdownAdapterMatcherIdentifier = createIdentifier('BlockMarkdownAdapterMatcher');
|
|
3
3
|
export function BlockMarkdownAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockMarkdownAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import rehypeParse from 'rehype-parse';
|
|
3
3
|
import { unified } from 'unified';
|
|
4
4
|
import { rehypeInlineToBlock, rehypeWrapInlineElements, } from '../html/rehype-plugins/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockNotionHtmlAdapterMatcherIdentifier = createIdentifier('BlockNotionHtmlAdapterMatcher');
|
|
3
3
|
export function BlockNotionHtmlAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockNotionHtmlAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import isEqual from 'lodash-es/isEqual.js';
|
|
3
3
|
import { DeltaASTConverter, } from '../types/delta-converter.js';
|
|
4
4
|
export const NotionHtmlASTToDeltaMatcherIdentifier = createIdentifier('NotionHtmlASTToDeltaMatcher');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockPlainTextAdapterMatcherIdentifier = createIdentifier('BlockPlainTextAdapterMatcher');
|
|
3
3
|
export function BlockPlainTextAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockPlainTextAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import { DeltaASTConverter, } from '../types/delta-converter.js';
|
|
3
3
|
export const InlineDeltaToPlainTextAdapterMatcherIdentifier = createIdentifier('InlineDeltaToPlainTextAdapterMatcher');
|
|
4
4
|
export function InlineDeltaToPlainTextAdapterExtension(matcher) {
|
|
@@ -56,7 +56,9 @@ const parseHex = (value) => {
|
|
|
56
56
|
const hex = value.slice(1);
|
|
57
57
|
if (!/^[0-9a-f]+$/i.test(hex))
|
|
58
58
|
return null;
|
|
59
|
-
const expand = (part) => part.length === 1
|
|
59
|
+
const expand = (part) => part.length === 1
|
|
60
|
+
? Number.parseInt(part + part, 16)
|
|
61
|
+
: Number.parseInt(part, 16);
|
|
60
62
|
const size = hex.length === 3 || hex.length === 4 ? 1 : 2;
|
|
61
63
|
if (hex.length !== size * 3 && hex.length !== size * 4)
|
|
62
64
|
return null;
|
|
@@ -234,7 +236,8 @@ export const resolveNearestSupportedColor = (color) => {
|
|
|
234
236
|
const target = rgbToOklab(parsed);
|
|
235
237
|
const achromatic = target.chroma < ACHROMATIC_CHROMA_THRESHOLD;
|
|
236
238
|
if (achromatic &&
|
|
237
|
-
(target.l < DEFAULT_TEXT_LIGHTNESS_MIN ||
|
|
239
|
+
(target.l < DEFAULT_TEXT_LIGHTNESS_MIN ||
|
|
240
|
+
target.l > DEFAULT_TEXT_LIGHTNESS_MAX)) {
|
|
238
241
|
return null;
|
|
239
242
|
}
|
|
240
243
|
let nearest;
|
|
@@ -4,6 +4,16 @@ export declare const EDGELESS_BLOCK_CHILD_PADDING = 24;
|
|
|
4
4
|
export declare const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
|
|
5
5
|
export declare const PAGE_HEADER_HEIGHT = 53;
|
|
6
6
|
export declare const EMBED_CARD_MIN_WIDTH = 450;
|
|
7
|
+
/**
|
|
8
|
+
* The smallest a thing you TAP may be, in CSS pixels.
|
|
9
|
+
*
|
|
10
|
+
* 44 is the figure both platform guidelines settle on (WCAG 2.2's target-size
|
|
11
|
+
* criterion asks for 24, which is a floor for a mouse, not a finger). Labre's
|
|
12
|
+
* boards are worked on a tablet in a workshop as often as on a laptop, so any
|
|
13
|
+
* list a user picks from — the artefact catalogue's rows are the first — sizes
|
|
14
|
+
* its rows from here rather than from whatever looked right in a screenshot.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TOUCH_TARGET_MIN_PX = 44;
|
|
7
17
|
export declare const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number>;
|
|
8
18
|
export declare const EMBED_CARD_HEIGHT: Record<EmbedCardStyle, number>;
|
|
9
19
|
export declare const EMBED_BLOCK_FLAVOUR_LIST: readonly ["affine:embed-github", "affine:embed-youtube", "affine:embed-figma", "affine:embed-linked-doc", "affine:embed-synced-doc", "affine:embed-html", "affine:embed-loom"];
|
|
@@ -6,6 +6,16 @@ export const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
|
|
|
6
6
|
// In AFFiNE, to avoid the option element to be covered by the header, we need to reserve the space for the header
|
|
7
7
|
export const PAGE_HEADER_HEIGHT = 53;
|
|
8
8
|
export const EMBED_CARD_MIN_WIDTH = 450;
|
|
9
|
+
/**
|
|
10
|
+
* The smallest a thing you TAP may be, in CSS pixels.
|
|
11
|
+
*
|
|
12
|
+
* 44 is the figure both platform guidelines settle on (WCAG 2.2's target-size
|
|
13
|
+
* criterion asks for 24, which is a floor for a mouse, not a finger). Labre's
|
|
14
|
+
* boards are worked on a tablet in a workshop as often as on a laptop, so any
|
|
15
|
+
* list a user picks from — the artefact catalogue's rows are the first — sizes
|
|
16
|
+
* its rows from here rather than from whatever looked right in a screenshot.
|
|
17
|
+
*/
|
|
18
|
+
export const TOUCH_TARGET_MIN_PX = 44;
|
|
9
19
|
export const EMBED_CARD_WIDTH = {
|
|
10
20
|
horizontal: 752,
|
|
11
21
|
horizontalThin: 752,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { CommandOwner } from '../../std/index.js';
|
|
2
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Consumer 2 of `docs/adr/0008`: the "more artefacts" sidepanel, which shows an
|
|
5
|
+
* owner's WHOLE `'catalogue'` surface by sub-category once its senior sub-menu
|
|
6
|
+
* has stopped being able to.
|
|
7
|
+
*
|
|
8
|
+
* The seam had to exist before either end of it, because the senior menu is
|
|
9
|
+
* what opens it — `selectSeniorMenuCommands` reports an overflow, the menu
|
|
10
|
+
* grows a trailing button, and that button needs somewhere to send the click.
|
|
11
|
+
* The library now ships the panel that answers by default
|
|
12
|
+
* (`edgeless-artefact-catalogue-widget`, registered next to the toolbar
|
|
13
|
+
* widget), and the menu still renders the button only when this provider
|
|
14
|
+
* answers — so an assembly that overrode the provider away shows no control
|
|
15
|
+
* that opens nothing.
|
|
16
|
+
*
|
|
17
|
+
* The contract is two verbs on purpose. Everything the panel needs to draw
|
|
18
|
+
* itself is already enumerable from the command registry
|
|
19
|
+
* (`getCommandsForSurface(std, owner, 'catalogue')`), so the seam carries the
|
|
20
|
+
* OWNER and nothing else — no list of entries, no open state, no rendering.
|
|
21
|
+
* That is what lets the two implementations be genuinely different things: the
|
|
22
|
+
* library's own left sidepanel, and a host's existing right-hand sidebar.
|
|
23
|
+
*/
|
|
24
|
+
export interface ArtefactCatalogueService {
|
|
25
|
+
/** Show the catalogue, scoped to one framework's artefacts. */
|
|
26
|
+
open(owner: CommandOwner): void;
|
|
27
|
+
/** Put it away. Never touches the active senior tool. */
|
|
28
|
+
close(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare const ArtefactCatalogueProvider: import("../../global/di/types.js").ServiceIdentifier<ArtefactCatalogueService> & (<U extends ArtefactCatalogueService = ArtefactCatalogueService>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
|
|
31
|
+
/**
|
|
32
|
+
* Host override seam: replace the library's sidepanel with the host's own —
|
|
33
|
+
* or switch the catalogue off entirely.
|
|
34
|
+
*
|
|
35
|
+
* **Replace** — a host that already owns a sidebar (a right-hand inspector, a
|
|
36
|
+
* docked panel, a mobile sheet) registers this extension, its implementation
|
|
37
|
+
* answers {@link ArtefactCatalogueProvider}, and the library's widget is then
|
|
38
|
+
* never asked to open: the sub-menu's "More artefacts…" entry resolves ONE
|
|
39
|
+
* service, and `di.override` decides which. The host's own UI draws itself
|
|
40
|
+
* from the registry (`getCommandsForSurface(std, owner, 'catalogue')`,
|
|
41
|
+
* `getCommandIcon`) and creates through the one bottleneck
|
|
42
|
+
* (`runCommand(std, command, { surface: 'catalogue', … })`), so telemetry and
|
|
43
|
+
* the usage measure keep flowing wherever the pixels live.
|
|
44
|
+
*
|
|
45
|
+
* **Disable** — pass `null`. The provider then answers nothing, and every
|
|
46
|
+
* consumer reads that the honest way: the sub-menu's "More artefacts…" button
|
|
47
|
+
* is not rendered (a control that opens nothing is a lie), and the library's
|
|
48
|
+
* panel never opens. This is a cold-assembly switch, like the framework flags:
|
|
49
|
+
* decided when the editor is put together, not toggled mid-session.
|
|
50
|
+
*
|
|
51
|
+
* Mirrors `CommandUsageExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
52
|
+
* so a host registering after the library's own extensions always wins,
|
|
53
|
+
* whatever the registration order turns out to be.
|
|
54
|
+
*/
|
|
55
|
+
export declare function ArtefactCatalogueExtension(service: ArtefactCatalogueService | null): ExtensionType;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createIdentifier } from '../../global/di/index.js';
|
|
2
|
+
export const ArtefactCatalogueProvider = createIdentifier('AffineArtefactCatalogue');
|
|
3
|
+
/**
|
|
4
|
+
* Host override seam: replace the library's sidepanel with the host's own —
|
|
5
|
+
* or switch the catalogue off entirely.
|
|
6
|
+
*
|
|
7
|
+
* **Replace** — a host that already owns a sidebar (a right-hand inspector, a
|
|
8
|
+
* docked panel, a mobile sheet) registers this extension, its implementation
|
|
9
|
+
* answers {@link ArtefactCatalogueProvider}, and the library's widget is then
|
|
10
|
+
* never asked to open: the sub-menu's "More artefacts…" entry resolves ONE
|
|
11
|
+
* service, and `di.override` decides which. The host's own UI draws itself
|
|
12
|
+
* from the registry (`getCommandsForSurface(std, owner, 'catalogue')`,
|
|
13
|
+
* `getCommandIcon`) and creates through the one bottleneck
|
|
14
|
+
* (`runCommand(std, command, { surface: 'catalogue', … })`), so telemetry and
|
|
15
|
+
* the usage measure keep flowing wherever the pixels live.
|
|
16
|
+
*
|
|
17
|
+
* **Disable** — pass `null`. The provider then answers nothing, and every
|
|
18
|
+
* consumer reads that the honest way: the sub-menu's "More artefacts…" button
|
|
19
|
+
* is not rendered (a control that opens nothing is a lie), and the library's
|
|
20
|
+
* panel never opens. This is a cold-assembly switch, like the framework flags:
|
|
21
|
+
* decided when the editor is put together, not toggled mid-session.
|
|
22
|
+
*
|
|
23
|
+
* Mirrors `CommandUsageExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
24
|
+
* so a host registering after the library's own extensions always wins,
|
|
25
|
+
* whatever the registration order turns out to be.
|
|
26
|
+
*/
|
|
27
|
+
export function ArtefactCatalogueExtension(service) {
|
|
28
|
+
return {
|
|
29
|
+
setup: di => {
|
|
30
|
+
// `null` rides through the factory on purpose: `getOptional` then
|
|
31
|
+
// reports the catalogue as absent, which is the whole disable story.
|
|
32
|
+
di.override(ArtefactCatalogueProvider, () => service);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -65,6 +65,17 @@ export interface AuditAxisFact {
|
|
|
65
65
|
*/
|
|
66
66
|
export interface AuditZoneFact {
|
|
67
67
|
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* The user's own wording, when the zone is one THIS frame declares rather
|
|
70
|
+
* than one the framework does — a BPMN pool's lanes. Namespaced ids keep the
|
|
71
|
+
* two apart (`lane:sales` against `product`), and the name is what makes an
|
|
72
|
+
* instance zone worth reporting at all: `lane:2` says nothing to an assistant,
|
|
73
|
+
* "Facturation" says what the band is for.
|
|
74
|
+
*
|
|
75
|
+
* Absent on every framework zone, whose meaning is the framework's and whose
|
|
76
|
+
* wording is the host's to translate.
|
|
77
|
+
*/
|
|
78
|
+
name?: string;
|
|
68
79
|
rect: {
|
|
69
80
|
x: number;
|
|
70
81
|
y: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type CommandUsageStore } from '../../std/index.js';
|
|
2
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where `createLocalCommandUsageStore` persists. Namespaced like the rest of
|
|
5
|
+
* Labre's browser-local state, and versionless on purpose: the shape is two
|
|
6
|
+
* numbers per command, and a reader that does not recognise an entry drops it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const COMMAND_USAGE_KEY = "labre:command-usage";
|
|
9
|
+
/**
|
|
10
|
+
* The default {@link CommandUsageStore}: recency and frequency in this
|
|
11
|
+
* browser's `localStorage`, per command id.
|
|
12
|
+
*
|
|
13
|
+
* It measures only. Nothing ranks anything here — PF6's "seven most-recent +
|
|
14
|
+
* six most-used" sub-menu reads these numbers, and a host that
|
|
15
|
+
* wants the measure to follow the user across devices replaces the whole store
|
|
16
|
+
* through {@link CommandUsageExtension}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createLocalCommandUsageStore(): CommandUsageStore;
|
|
19
|
+
/**
|
|
20
|
+
* Host override seam: replace the browser-local measure with the host's own.
|
|
21
|
+
*
|
|
22
|
+
* This is where a host persists command usage in ITS database — so the ranking
|
|
23
|
+
* follows the user from laptop to browser to tablet instead of restarting at
|
|
24
|
+
* zero, which is exactly what a "most-used" sub-menu is judged on. The library
|
|
25
|
+
* ships the local store as the default (`CommandUsageViewExtension`) and never
|
|
26
|
+
* requires a host to care.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors `EditorSettingExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
29
|
+
* so a host registering after the library's own extensions always wins.
|
|
30
|
+
*/
|
|
31
|
+
export declare function CommandUsageExtension(store: CommandUsageStore): ExtensionType;
|