@formicoidea/labre-core 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_pkgs/affine-block-attachment/attachment-block.js +1 -1
- package/dist/_pkgs/affine-block-callout/callout-block.d.ts +6 -0
- package/dist/_pkgs/affine-block-callout/callout-block.js +26 -4
- package/dist/_pkgs/affine-block-callout/callout-keymap.js +59 -19
- package/dist/_pkgs/affine-block-callout/commands/callout-to-paragraph.d.ts +20 -0
- package/dist/_pkgs/affine-block-callout/commands/callout-to-paragraph.js +60 -0
- package/dist/_pkgs/affine-block-callout/commands/split-callout.d.ts +17 -0
- package/dist/_pkgs/affine-block-callout/commands/split-callout.js +42 -0
- package/dist/_pkgs/affine-block-callout/configs/slash-menu.js +9 -6
- package/dist/_pkgs/affine-block-callout/emoji-margin.d.ts +9 -0
- package/dist/_pkgs/affine-block-callout/emoji-margin.js +36 -0
- package/dist/_pkgs/affine-block-callout/emoji-menu.d.ts +5 -1
- package/dist/_pkgs/affine-block-callout/emoji-menu.js +5 -0
- package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block.d.ts +14 -0
- package/dist/_pkgs/affine-block-code/code-block.js +44 -6
- package/dist/_pkgs/affine-block-code/code-toolbar/components/code-toolbar.d.ts +2 -0
- package/dist/_pkgs/affine-block-code/code-toolbar/components/code-toolbar.js +23 -14
- package/dist/_pkgs/affine-block-code/code-toolbar/components/more-menu.d.ts +16 -0
- package/dist/_pkgs/affine-block-code/code-toolbar/components/more-menu.js +93 -0
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +54 -5
- package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-code/effects.d.ts +2 -0
- package/dist/_pkgs/affine-block-code/effects.js +2 -0
- package/dist/_pkgs/affine-block-code/highlight/affine-code-unit.js +6 -1
- package/dist/_pkgs/affine-block-code/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-code/index.js +1 -0
- package/dist/_pkgs/affine-block-code/line-numbers.d.ts +25 -0
- package/dist/_pkgs/affine-block-code/line-numbers.js +27 -0
- package/dist/_pkgs/affine-block-code/styles.js +31 -0
- package/dist/_pkgs/affine-block-data-view/data-view-block.js +1 -0
- package/dist/_pkgs/affine-block-database/components/title/index.js +4 -1
- package/dist/_pkgs/affine-block-database/configs/slash-menu.js +28 -1
- package/dist/_pkgs/affine-block-database/data-source.js +1 -2
- package/dist/_pkgs/affine-block-database/database-block.js +13 -0
- package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
- package/dist/_pkgs/affine-block-database/properties/paste-url.d.ts +24 -0
- package/dist/_pkgs/affine-block-database/properties/paste-url.js +98 -0
- package/dist/_pkgs/affine-block-database/properties/rich-text/cell-renderer.js +9 -19
- package/dist/_pkgs/affine-block-database/properties/title/text.js +20 -25
- package/dist/_pkgs/affine-block-database/views/index.js +1 -0
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +11 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.d.ts +3 -0
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +48 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/font-size.d.ts +17 -0
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/font-size.js +24 -0
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/common/doc-trashed.d.ts +9 -0
- package/dist/_pkgs/affine-block-embed-doc/common/doc-trashed.js +10 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +8 -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/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.d.ts +4 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +23 -4
- package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +13 -0
- package/dist/_pkgs/affine-block-frame/frame-manager.js +34 -2
- package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
- package/dist/_pkgs/affine-block-latex/styles.js +6 -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/move-block.js +1 -1
- package/dist/_pkgs/affine-block-note/note-edgeless-block.d.ts +9 -0
- package/dist/_pkgs/affine-block-note/note-edgeless-block.js +29 -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/commands/pivot-commands.d.ts +37 -0
- package/dist/_pkgs/affine-block-root/commands/pivot-commands.js +168 -0
- package/dist/_pkgs/affine-block-root/commands/reading-commands.d.ts +23 -0
- package/dist/_pkgs/affine-block-root/commands/reading-commands.js +107 -0
- package/dist/_pkgs/affine-block-root/commands/tag-commands.d.ts +47 -0
- package/dist/_pkgs/affine-block-root/commands/tag-commands.js +159 -0
- package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +1 -0
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +10 -3
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/render-linked-doc.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +27 -2
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +11 -2
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-service.js +14 -0
- package/dist/_pkgs/affine-block-root/edgeless/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-root/edgeless/index.js +1 -0
- package/dist/_pkgs/affine-block-root/edgeless/reserved-keys.d.ts +21 -0
- package/dist/_pkgs/affine-block-root/edgeless/reserved-keys.js +34 -0
- package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.d.ts +7 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.js +11 -2
- package/dist/_pkgs/affine-block-root/index.d.ts +4 -1
- package/dist/_pkgs/affine-block-root/index.js +4 -1
- package/dist/_pkgs/affine-block-root/keyboard/commands.d.ts +2 -0
- package/dist/_pkgs/affine-block-root/keyboard/commands.js +147 -0
- package/dist/_pkgs/affine-block-root/view.js +13 -4
- 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/commands/reassociate-connectors.js +0 -1
- package/dist/_pkgs/affine-block-surface/effects.js +6 -0
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +21 -3
- package/dist/_pkgs/affine-block-surface/element-model/index.js +14 -2
- package/dist/_pkgs/affine-block-surface/extensions/audit.d.ts +107 -0
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +489 -0
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.d.ts +14 -0
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +37 -5
- package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.d.ts +133 -0
- package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +327 -0
- 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 +17 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +17 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +393 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +306 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.d.ts +146 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +528 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality.d.ts +109 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality.js +84 -0
- 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-toolbar.d.ts +15 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-toolbar.js +158 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.d.ts +145 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +588 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading.d.ts +494 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +767 -0
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.d.ts +45 -0
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.js +177 -0
- 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/tags-toolbar.d.ts +10 -0
- package/dist/_pkgs/affine-block-surface/extensions/tags-toolbar.js +295 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation-toolbar.d.ts +27 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation-toolbar.js +361 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +2129 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +4620 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +330 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +1004 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-timeline.d.ts +80 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-timeline.js +123 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +610 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +206 -0
- package/dist/_pkgs/affine-block-surface/framework-background/facts.d.ts +188 -0
- package/dist/_pkgs/affine-block-surface/framework-background/facts.js +284 -0
- package/dist/_pkgs/affine-block-surface/framework-background/index.d.ts +5 -0
- package/dist/_pkgs/affine-block-surface/framework-background/index.js +5 -0
- package/dist/_pkgs/affine-block-surface/framework-background/interaction.d.ts +12 -0
- package/dist/_pkgs/affine-block-surface/framework-background/interaction.js +24 -0
- package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +99 -0
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +193 -0
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.d.ts +8 -0
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +399 -0
- 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/canvas-renderer.d.ts +69 -3
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.js +333 -44
- package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.js +18 -2
- package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
- package/dist/_pkgs/affine-block-surface/tool/default-tool.js +8 -0
- package/dist/_pkgs/affine-block-surface/utils/font.js +9 -3
- package/dist/_pkgs/affine-block-surface/view.d.ts +17 -0
- package/dist/_pkgs/affine-block-surface/view.js +57 -2
- 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-block-table/selection-controller.d.ts +6 -0
- package/dist/_pkgs/affine-block-table/selection-controller.js +24 -1
- package/dist/_pkgs/affine-block-table/table-block.js +8 -2
- package/dist/_pkgs/affine-block-table/table-cell.js +5 -6
- package/dist/_pkgs/affine-block-table/table-keymap.d.ts +18 -0
- package/dist/_pkgs/affine-block-table/table-keymap.js +41 -0
- package/dist/_pkgs/affine-block-table/utils.d.ts +7 -0
- package/dist/_pkgs/affine-block-table/utils.js +12 -0
- package/dist/_pkgs/affine-block-table/view.js +2 -0
- package/dist/_pkgs/affine-components/caption/captioned-block-component.js +2 -1
- package/dist/_pkgs/affine-components/context-menu/button.d.ts +7 -0
- package/dist/_pkgs/affine-components/context-menu/button.js +7 -2
- package/dist/_pkgs/affine-components/context-menu/input.d.ts +4 -0
- package/dist/_pkgs/affine-components/context-menu/input.js +12 -0
- package/dist/_pkgs/affine-components/context-menu/menu-all.d.ts +2 -0
- package/dist/_pkgs/affine-components/context-menu/menu-renderer.js +8 -1
- package/dist/_pkgs/affine-components/context-menu/sub-menu.js +3 -0
- 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/icon-picker/affine-icon-picker-panel.d.ts +28 -0
- package/dist/_pkgs/affine-components/icon-picker/affine-icon-picker-panel.js +231 -0
- package/dist/_pkgs/affine-components/icon-picker/emoji-data.d.ts +40 -0
- package/dist/_pkgs/affine-components/icon-picker/emoji-data.js +99 -0
- package/dist/_pkgs/affine-components/icon-picker/emoji-picker-panel.d.ts +32 -0
- package/dist/_pkgs/affine-components/icon-picker/emoji-picker-panel.js +276 -0
- package/dist/_pkgs/affine-components/icon-picker/icon-data.d.ts +34 -0
- package/dist/_pkgs/affine-components/icon-picker/icon-data.js +83 -0
- package/dist/_pkgs/affine-components/icon-picker/icon-picker.d.ts +39 -0
- package/dist/_pkgs/affine-components/icon-picker/icon-picker.js +233 -0
- package/dist/_pkgs/affine-components/icon-picker/index.d.ts +8 -0
- package/dist/_pkgs/affine-components/icon-picker/index.js +15 -0
- package/dist/_pkgs/affine-components/icon-picker/recent-store.d.ts +8 -0
- package/dist/_pkgs/affine-components/icon-picker/recent-store.js +41 -0
- package/dist/_pkgs/affine-components/icon-picker/styles.d.ts +5 -0
- package/dist/_pkgs/affine-components/icon-picker/styles.js +166 -0
- package/dist/_pkgs/affine-components/icon-picker/types.d.ts +22 -0
- package/dist/_pkgs/affine-components/icon-picker/types.js +10 -0
- package/dist/_pkgs/affine-components/icons/text.js +426 -426
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
- package/dist/_pkgs/affine-components/portal/portal.d.ts +1 -1
- 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 +2 -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/toolbar/toolbar.js +11 -10
- package/dist/_pkgs/affine-foundation/view.js +11 -2
- 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/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-brush/index.js +1 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/brush.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/brush.js +11 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/highlighter.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/highlighter.js +11 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/index.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/index.js +2 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/shared.d.ts +14 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/dom/shared.js +54 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-brush/renderer/index.js +4 -0
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/view.d.ts +14 -0
- package/dist/_pkgs/affine-gfx-brush/view.js +29 -3
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +39 -16
- package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +26 -1
- package/dist/_pkgs/affine-gfx-connector/connector-tool.js +12 -3
- package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.d.ts +123 -0
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +282 -0
- package/dist/_pkgs/affine-gfx-connector/direction/direction-widget.d.ts +65 -0
- package/dist/_pkgs/affine-gfx-connector/direction/direction-widget.js +395 -0
- package/dist/_pkgs/affine-gfx-connector/direction/index.d.ts +4 -0
- package/dist/_pkgs/affine-gfx-connector/direction/index.js +4 -0
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.d.ts +72 -0
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +185 -0
- package/dist/_pkgs/affine-gfx-connector/direction/typed-edge.d.ts +69 -0
- package/dist/_pkgs/affine-gfx-connector/direction/typed-edge.js +66 -0
- package/dist/_pkgs/affine-gfx-connector/effects.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-connector/effects.js +2 -0
- package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.js +78 -41
- 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/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-connector/index.js +1 -0
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.d.ts +50 -0
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +68 -2
- package/dist/_pkgs/affine-gfx-connector/view.js +16 -0
- package/dist/_pkgs/affine-gfx-group/command/group-api.js +150 -62
- package/dist/_pkgs/affine-gfx-group/text/edgeless-group-title-editor.js +4 -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-pointer/tools/pan-tool.d.ts +16 -0
- package/dist/_pkgs/affine-gfx-pointer/tools/pan-tool.js +102 -32
- package/dist/_pkgs/affine-gfx-shape/commands.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-shape/commands.js +33 -0
- 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-renderer/shape-dom/index.js +48 -19
- package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
- package/dist/_pkgs/affine-gfx-shape/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/index.js +1 -1
- 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.d.ts +26 -0
- package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +124 -15
- package/dist/_pkgs/affine-gfx-shape/view.js +3 -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-template/toolbar/template-tool-button.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/template-tool-button.js +18 -1
- package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.js +9 -5
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
- package/dist/_pkgs/affine-inline-latex/command.js +46 -26
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-node.d.ts +10 -0
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-node.js +23 -0
- package/dist/_pkgs/affine-inline-link/command.js +1 -1
- package/dist/_pkgs/affine-inline-link/link-node/affine-link.js +4 -1
- package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.d.ts +3 -0
- package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.js +29 -1
- 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/reference-node.js +1 -1
- package/dist/_pkgs/affine-model/blocks/code/code-model.d.ts +1 -0
- package/dist/_pkgs/affine-model/blocks/code/code-model.js +1 -0
- 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 +74 -17
- package/dist/_pkgs/affine-model/elements/bpmn/pool.js +55 -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 +25 -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/edgy/board.d.ts +32 -0
- package/dist/_pkgs/affine-model/elements/edgy/board.js +112 -0
- package/dist/_pkgs/affine-model/elements/edgy/facets.d.ts +12 -0
- package/dist/_pkgs/affine-model/elements/edgy/facets.js +25 -1
- package/dist/_pkgs/affine-model/elements/edgy/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/edgy/index.js +1 -0
- 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 +42 -0
- package/dist/_pkgs/affine-model/elements/framework-background/background.js +42 -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 +14 -1
- package/dist/_pkgs/affine-model/elements/index.js +4 -0
- package/dist/_pkgs/affine-model/elements/mindmap/mindmap.js +8 -3
- package/dist/_pkgs/affine-model/elements/mindmap/style.d.ts +10 -0
- package/dist/_pkgs/affine-model/elements/mindmap/style.js +8 -0
- package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
- package/dist/_pkgs/affine-model/elements/wardley/wardley.d.ts +21 -29
- package/dist/_pkgs/affine-model/elements/wardley/wardley.js +41 -48
- 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.d.ts +6 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +161 -3
- package/dist/_pkgs/affine-shared/adapters/markdown/markdown.js +5 -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/types/delta-converter.d.ts +1 -0
- package/dist/_pkgs/affine-shared/adapters/utils/color.d.ts +24 -0
- package/dist/_pkgs/affine-shared/adapters/utils/color.js +283 -0
- package/dist/_pkgs/affine-shared/adapters/utils/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/adapters/utils/index.js +1 -0
- package/dist/_pkgs/affine-shared/commands/block-crud/get-selected-blocks.js +10 -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 +311 -0
- package/dist/_pkgs/affine-shared/services/audit-service.js +228 -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 +7 -0
- package/dist/_pkgs/affine-shared/services/edit-props-store.js +11 -0
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
- package/dist/_pkgs/affine-shared/services/font-loader/font-loader-service.d.ts +26 -1
- package/dist/_pkgs/affine-shared/services/font-loader/font-loader-service.js +124 -7
- package/dist/_pkgs/affine-shared/services/index.d.ts +7 -0
- package/dist/_pkgs/affine-shared/services/index.js +7 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.d.ts +129 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +312 -0
- package/dist/_pkgs/affine-shared/services/pivot-properties-service.d.ts +217 -0
- package/dist/_pkgs/affine-shared/services/pivot-properties-service.js +114 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/code-block.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +255 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/telemetry-service.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/telemetry-service/types.d.ts +6 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.d.ts +10 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/layout.d.ts +134 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/layout.js +146 -0
- 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/index.d.ts +68 -0
- package/dist/_pkgs/affine-shared/services/translation-service/index.js +39 -0
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.d.ts +155 -0
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +256 -0
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
- package/dist/_pkgs/affine-shared/utils/dom/point-to-range.d.ts +4 -0
- package/dist/_pkgs/affine-shared/utils/dom/point-to-range.js +58 -2
- package/dist/_pkgs/affine-shared/utils/dom/viewport.d.ts +60 -0
- package/dist/_pkgs/affine-shared/utils/dom/viewport.js +58 -0
- 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/print-to-pdf.d.ts +21 -0
- package/dist/_pkgs/affine-shared/utils/print-to-pdf.js +166 -32
- package/dist/_pkgs/affine-shared/utils/zod-schema.d.ts +7 -0
- package/dist/_pkgs/affine-shared/utils/zod-schema.js +25 -1
- package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
- package/dist/_pkgs/affine-widget-drag-handle/watchers/edgeless-watcher.d.ts +19 -10
- package/dist/_pkgs/affine-widget-drag-handle/watchers/edgeless-watcher.js +122 -23
- package/dist/_pkgs/affine-widget-drag-handle/watchers/pointer-event-watcher.d.ts +2 -0
- package/dist/_pkgs/affine-widget-drag-handle/watchers/pointer-event-watcher.js +25 -4
- 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-selected-rect/auto-complete-panel.js +10 -5
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-auto-complete.d.ts +15 -1
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-auto-complete.js +37 -32
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-element-link.js +5 -4
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-selected-rect.js +19 -9
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/utils.d.ts +16 -2
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/utils.js +19 -2
- 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 +46 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +66 -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 +5 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +5 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +57 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +140 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
- package/dist/_pkgs/affine-widget-frame-title/edgeless-frame-title-editor.js +4 -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 +2 -15
- package/dist/_pkgs/affine-widget-linked-doc/transformers/markdown.d.ts +10 -1
- package/dist/_pkgs/affine-widget-linked-doc/transformers/markdown.js +133 -6
- package/dist/_pkgs/affine-widget-linked-doc/transformers/utils.d.ts +10 -0
- package/dist/_pkgs/affine-widget-linked-doc/transformers/utils.js +120 -3
- package/dist/_pkgs/affine-widget-linked-doc/utils.d.ts +12 -0
- package/dist/_pkgs/affine-widget-linked-doc/utils.js +33 -0
- 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-remote-selection/edgeless/index.js +6 -4
- package/dist/_pkgs/affine-widget-slash-menu/slash-menu-popover.js +8 -4
- package/dist/_pkgs/affine-widget-slash-menu/utils.d.ts +9 -0
- package/dist/_pkgs/affine-widget-slash-menu/utils.js +24 -0
- package/dist/_pkgs/affine-widget-toolbar/toolbar.d.ts +6 -0
- package/dist/_pkgs/affine-widget-toolbar/toolbar.js +40 -8
- package/dist/_pkgs/affine-widget-toolbar/utils.d.ts +146 -3
- package/dist/_pkgs/affine-widget-toolbar/utils.js +744 -58
- package/dist/_pkgs/data-view/core/common/property-menu.js +3 -16
- package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.d.ts +4 -0
- package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.js +28 -1
- package/dist/_pkgs/data-view/core/data-view.d.ts +3 -1
- package/dist/_pkgs/data-view/core/data-view.js +25 -3
- package/dist/_pkgs/data-view/core/detail/field.js +2 -2
- package/dist/_pkgs/data-view/core/detail/selection.d.ts +4 -2
- package/dist/_pkgs/data-view/core/detail/selection.js +23 -7
- package/dist/_pkgs/data-view/core/effect.js +2 -0
- package/dist/_pkgs/data-view/core/filter/eval.js +36 -23
- package/dist/_pkgs/data-view/core/filter/filter-fn/matcher.d.ts +7 -0
- package/dist/_pkgs/data-view/core/filter/filter-fn/matcher.js +12 -0
- package/dist/_pkgs/data-view/core/group-by/compare-date-keys.d.ts +11 -0
- package/dist/_pkgs/data-view/core/group-by/compare-date-keys.js +55 -0
- package/dist/_pkgs/data-view/core/group-by/define.d.ts +6 -0
- package/dist/_pkgs/data-view/core/group-by/define.js +114 -0
- package/dist/_pkgs/data-view/core/group-by/matcher.d.ts +7 -0
- package/dist/_pkgs/data-view/core/group-by/matcher.js +13 -0
- package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +11 -11
- package/dist/_pkgs/data-view/core/group-by/renderer/date-group.d.ts +9 -0
- package/dist/_pkgs/data-view/core/group-by/renderer/date-group.js +97 -0
- package/dist/_pkgs/data-view/core/group-by/setting.js +86 -7
- package/dist/_pkgs/data-view/core/group-by/trait.d.ts +34 -0
- package/dist/_pkgs/data-view/core/group-by/trait.js +106 -10
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/_pkgs/data-view/property-presets/multi-select/cell-renderer.js +3 -1
- package/dist/_pkgs/data-view/property-presets/number/define.js +2 -1
- package/dist/_pkgs/data-view/property-presets/select/cell-renderer.js +3 -1
- package/dist/_pkgs/data-view/view-presets/calendar/calendar-view-manager.d.ts +70 -0
- package/dist/_pkgs/data-view/view-presets/calendar/calendar-view-manager.js +449 -0
- package/dist/_pkgs/data-view/view-presets/calendar/define.d.ts +10 -0
- package/dist/_pkgs/data-view/view-presets/calendar/define.js +27 -0
- package/dist/_pkgs/data-view/view-presets/calendar/effect.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/calendar/effect.js +4 -0
- package/dist/_pkgs/data-view/view-presets/calendar/index.d.ts +6 -0
- package/dist/_pkgs/data-view/view-presets/calendar/index.js +6 -0
- package/dist/_pkgs/data-view/view-presets/calendar/layout.d.ts +37 -0
- package/dist/_pkgs/data-view/view-presets/calendar/layout.js +138 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.d.ts +7 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +64 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/dnd.d.ts +32 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/dnd.js +159 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/effect.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/effect.js +7 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/hit-test.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/hit-test.js +28 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/styles.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/styles.js +707 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/view.d.ts +89 -0
- package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +849 -0
- package/dist/_pkgs/data-view/view-presets/calendar/renderer.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/calendar/renderer.js +8 -0
- package/dist/_pkgs/data-view/view-presets/calendar/source.d.ts +8 -0
- package/dist/_pkgs/data-view/view-presets/calendar/source.js +3 -0
- package/dist/_pkgs/data-view/view-presets/calendar/types.d.ts +79 -0
- package/dist/_pkgs/data-view/view-presets/calendar/types.js +1 -0
- package/dist/_pkgs/data-view/view-presets/convert.js +28 -0
- package/dist/_pkgs/data-view/view-presets/effect.js +2 -0
- package/dist/_pkgs/data-view/view-presets/index.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/index.js +3 -0
- package/dist/_pkgs/data-view/view-presets/kanban/kanban-view-manager.js +3 -1
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/cell.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/collapsed-state.d.ts +18 -0
- package/dist/_pkgs/data-view/view-presets/table/collapsed-state.js +36 -0
- package/dist/_pkgs/data-view/view-presets/table/mobile/cell.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.d.ts +11 -0
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +89 -4
- package/dist/_pkgs/data-view/view-presets/table/pc/cell.d.ts +3 -0
- package/dist/_pkgs/data-view/view-presets/table/pc/cell.js +11 -2
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.js +39 -33
- package/dist/_pkgs/data-view/view-presets/table/pc/group.d.ts +10 -0
- package/dist/_pkgs/data-view/view-presets/table/pc/group.js +86 -5
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.js +39 -33
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +18 -18
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.d.ts +3 -0
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.js +8 -0
- package/dist/_pkgs/data-view/view-presets/table/table-view-manager.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/utils.d.ts +3 -0
- package/dist/_pkgs/data-view/view-presets/table/utils.js +16 -1
- package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.js +3 -1
- package/dist/_pkgs/global/gfx/curve.js +4 -3
- package/dist/_pkgs/std/clipboard/clipboard.js +13 -3
- package/dist/_pkgs/std/clipboard/utils.d.ts +5 -0
- package/dist/_pkgs/std/clipboard/utils.js +10 -0
- package/dist/_pkgs/std/event/dispatcher.js +27 -1
- package/dist/_pkgs/std/event/keymap.js +16 -6
- package/dist/_pkgs/std/extension/command-registry.d.ts +475 -0
- package/dist/_pkgs/std/extension/command-registry.js +431 -0
- package/dist/_pkgs/std/extension/dnd/index.d.ts +1 -1
- package/dist/_pkgs/std/extension/index.d.ts +2 -0
- package/dist/_pkgs/std/extension/index.js +2 -0
- package/dist/_pkgs/std/extension/shortcut.js +2 -1
- package/dist/_pkgs/std/extension/translation-manifest.d.ts +49 -0
- package/dist/_pkgs/std/extension/translation-manifest.js +71 -0
- package/dist/_pkgs/std/gfx/grid.js +1 -1
- package/dist/_pkgs/std/gfx/index.d.ts +7 -3
- package/dist/_pkgs/std/gfx/index.js +6 -2
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +6 -1
- package/dist/_pkgs/std/gfx/interactivity/manager.d.ts +8 -0
- package/dist/_pkgs/std/gfx/interactivity/manager.js +18 -0
- package/dist/_pkgs/std/gfx/layer.d.ts +1 -1
- package/dist/_pkgs/std/gfx/layer.js +1 -2
- package/dist/_pkgs/std/gfx/model/surface/decorators/field.js +9 -0
- package/dist/_pkgs/std/gfx/model/surface/decorators/index.d.ts +2 -2
- package/dist/_pkgs/std/gfx/model/surface/decorators/index.js +2 -2
- package/dist/_pkgs/std/gfx/model/surface/decorators/local.d.ts +14 -0
- package/dist/_pkgs/std/gfx/model/surface/decorators/local.js +22 -0
- package/dist/_pkgs/std/gfx/model/surface/decorators/observer.d.ts +2 -0
- package/dist/_pkgs/std/gfx/model/surface/decorators/observer.js +40 -1
- package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +442 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +510 -25
- package/dist/_pkgs/std/gfx/model/surface/pivot.d.ts +48 -0
- package/dist/_pkgs/std/gfx/model/surface/pivot.js +34 -0
- package/dist/_pkgs/std/gfx/model/surface/role.d.ts +153 -0
- package/dist/_pkgs/std/gfx/model/surface/role.js +117 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.d.ts +70 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +305 -17
- package/dist/_pkgs/std/gfx/model/surface/tags.d.ts +77 -0
- package/dist/_pkgs/std/gfx/model/surface/tags.js +246 -0
- package/dist/_pkgs/std/gfx/perf.d.ts +10 -0
- package/dist/_pkgs/std/gfx/perf.js +30 -0
- package/dist/_pkgs/std/gfx/selection.js +1 -1
- package/dist/_pkgs/std/gfx/tool/tool-controller.d.ts +13 -0
- package/dist/_pkgs/std/gfx/tool/tool-controller.js +26 -0
- package/dist/_pkgs/std/gfx/viewport.d.ts +12 -0
- package/dist/_pkgs/std/gfx/viewport.js +20 -2
- 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/inline/services/event.d.ts +2 -0
- package/dist/_pkgs/std/inline/services/event.js +96 -21
- package/dist/_pkgs/std/utils/layer.js +2 -6
- package/dist/_pkgs/std/utils/tree.d.ts +14 -0
- package/dist/_pkgs/std/utils/tree.js +59 -8
- package/dist/_pkgs/std/view/element/gfx-block-component.js +23 -13
- package/dist/_pkgs/store/extension/workspace/workspace-meta.d.ts +10 -0
- package/dist/_pkgs/store/model/block/flat-sync-controller.js +2 -12
- package/dist/_pkgs/store/model/store/crud.js +10 -4
- package/dist/_pkgs/store/reactive/flat-native-y/index.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/index.js +24 -2
- package/dist/commands.d.ts +58 -0
- package/dist/commands.js +66 -0
- package/dist/extensions/command-telemetry.d.ts +21 -0
- package/dist/extensions/command-telemetry.js +89 -0
- package/dist/extensions/command-usage.d.ts +23 -0
- package/dist/extensions/command-usage.js +37 -0
- package/dist/extensions/store.d.ts +9 -4
- package/dist/extensions/store.js +27 -24
- package/dist/extensions/view.d.ts +9 -4
- package/dist/extensions/view.js +35 -8
- package/dist/flags.d.ts +98 -21
- package/dist/flags.js +103 -22
- package/dist/frameworks.d.ts +45 -0
- package/dist/frameworks.js +186 -0
- package/dist/schemas.d.ts +8 -5
- package/dist/schemas.js +28 -32
- package/dist/shortcuts.d.ts +16 -16
- package/dist/shortcuts.js +8 -36
- package/dist/translations.d.ts +56 -0
- package/dist/translations.js +200 -0
- package/package.json +16 -4
- package/dist/_pkgs/affine-block-root/keyboard/shortcuts.d.ts +0 -8
- package/dist/_pkgs/affine-block-root/keyboard/shortcuts.js +0 -48
- package/dist/_pkgs/affine-gfx-shape/shortcuts.d.ts +0 -6
- package/dist/_pkgs/affine-gfx-shape/shortcuts.js +0 -28
- package/dist/_pkgs/data-view/core/utils/cache.d.ts +0 -5
- package/dist/_pkgs/data-view/core/utils/cache.js +0 -28
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import type { RoleId } from '../../std/gfx/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The framework-background DECLARATION (PF2.1).
|
|
4
|
+
*
|
|
5
|
+
* A framework describes its background as DATA — geometry, axes, zones,
|
|
6
|
+
* chrome — and the primitive paints it. Nothing here is a function, a class or
|
|
7
|
+
* a closure: same philosophy as the validation rules (`../extensions/validation.ts`)
|
|
8
|
+
* and the role defs (`@labre/std/gfx`), for the same reason — a declaration is
|
|
9
|
+
* comparable, serialisable, reviewable by a non-developer and can one day be
|
|
10
|
+
* shipped by a host without a release of this library.
|
|
11
|
+
*
|
|
12
|
+
* The default rendering of a declaration that says nothing but its size is a
|
|
13
|
+
* plain white rectangle: no axis, no zone, no decoration.
|
|
14
|
+
*
|
|
15
|
+
* ## Two coordinate spaces
|
|
16
|
+
*
|
|
17
|
+
* - the **element box**, `[0,0,w,h]` in model units, which the card is drawn in;
|
|
18
|
+
* - the **plot**, the element box minus {@link BackgroundGeometry.margin}.
|
|
19
|
+
* Every ratio in this file is a ratio OF THE PLOT: `x: 0` is its left edge,
|
|
20
|
+
* `y: 1` its bottom edge. Ratios scale with the element; the offsets beside
|
|
21
|
+
* them (`dx`, `dy`, margins, font sizes, stroke widths) are FIXED model
|
|
22
|
+
* units and do not, so labels stay legible however large the background is
|
|
23
|
+
* stretched.
|
|
24
|
+
*/
|
|
25
|
+
/** A position expressed as a fraction of a plot span, `0..1`. */
|
|
26
|
+
export type Ratio = number;
|
|
27
|
+
/**
|
|
28
|
+
* A colour: either a literal (`'#ffffff'`) or `@name`, resolved against
|
|
29
|
+
* {@link BackgroundChromeDef.palette} — the declarative colour code.
|
|
30
|
+
*/
|
|
31
|
+
export type BackgroundColor = string;
|
|
32
|
+
export interface BackgroundInset {
|
|
33
|
+
top: number;
|
|
34
|
+
right: number;
|
|
35
|
+
bottom: number;
|
|
36
|
+
left: number;
|
|
37
|
+
}
|
|
38
|
+
export interface BackgroundStroke {
|
|
39
|
+
color: BackgroundColor;
|
|
40
|
+
width: number;
|
|
41
|
+
/** Dash pattern in model units; absent or empty means a solid line. */
|
|
42
|
+
dash?: readonly number[];
|
|
43
|
+
}
|
|
44
|
+
export interface BackgroundTextStyle {
|
|
45
|
+
/** Font size in FIXED model units — it does not scale with the element. */
|
|
46
|
+
size: number;
|
|
47
|
+
color: BackgroundColor;
|
|
48
|
+
/**
|
|
49
|
+
* Defaults to {@link BackgroundChromeDef.fontFamily}. Named consumer:
|
|
50
|
+
* Estuarine draws its `e` / `t` axis letters in `Georgia, serif` while the
|
|
51
|
+
* rest of the map is Inter.
|
|
52
|
+
*/
|
|
53
|
+
family?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Omitted from the font string when absent, i.e. the browser default. Named
|
|
56
|
+
* consumers: the BPMN pool draws its participant name at `600`, Estuarine its
|
|
57
|
+
* curve legends at `600`, Cynefin its domain headings at `700`.
|
|
58
|
+
*/
|
|
59
|
+
weight?: number;
|
|
60
|
+
/** Named consumer: Estuarine's `e` / `t` letters are `italic 700`. */
|
|
61
|
+
italic?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Where the anchor sits on the glyphs. `alphabetic` — the default, and what
|
|
64
|
+
* every text meant before this existed — puts it on the BASELINE, so the
|
|
65
|
+
* words hang above the anchor; `middle` centres them on it.
|
|
66
|
+
*
|
|
67
|
+
* Named consumer: the BPMN pool, whose participant name is centred ACROSS the
|
|
68
|
+
* band it is written in. A baseline anchor there would push the name against
|
|
69
|
+
* the frame instead of down the middle of the band — the one case where the
|
|
70
|
+
* two conventions are visibly different, because the room the text is given
|
|
71
|
+
* is the width of the glyphs and nothing more.
|
|
72
|
+
*/
|
|
73
|
+
baseline?: 'alphabetic' | 'middle';
|
|
74
|
+
}
|
|
75
|
+
/** Where a piece of text sits: a plot ratio plus a fixed model-unit offset. */
|
|
76
|
+
export interface BackgroundAnchor {
|
|
77
|
+
x: Ratio;
|
|
78
|
+
y: Ratio;
|
|
79
|
+
dx?: number;
|
|
80
|
+
dy?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Where the words come from. THREE sources, tried in order:
|
|
84
|
+
*
|
|
85
|
+
* 1. `prop` — a model prop holding the user's own text. A framework whose
|
|
86
|
+
* labels are editable on the canvas declares this, and the user's wording
|
|
87
|
+
* always wins.
|
|
88
|
+
* 2. `labelKey` — an i18n key, resolved through the house seam
|
|
89
|
+
* (`TranslationProvider`, which the host injects). This is the source for a
|
|
90
|
+
* framework whose labels are fixed vocabulary: no hard-coded prose.
|
|
91
|
+
* 3. `fallback` — the default wording, used until a host resolves the key. A
|
|
92
|
+
* declaration with only a `fallback` is hard-coded text and should be
|
|
93
|
+
* treated as a gap, not as a pattern. A key with no fallback shows the raw
|
|
94
|
+
* key, so a dangling entry is visible rather than invented.
|
|
95
|
+
*/
|
|
96
|
+
export interface BackgroundLabelSource {
|
|
97
|
+
prop?: string;
|
|
98
|
+
labelKey?: string;
|
|
99
|
+
fallback?: string;
|
|
100
|
+
}
|
|
101
|
+
/** A drawn piece of text: what it says, where, how, and when. */
|
|
102
|
+
export interface BackgroundTextDef extends BackgroundLabelSource {
|
|
103
|
+
/** Stable id inside the declaration; also what a hit test reports. */
|
|
104
|
+
id: string;
|
|
105
|
+
anchor: BackgroundAnchor;
|
|
106
|
+
style: BackgroundTextStyle;
|
|
107
|
+
/**
|
|
108
|
+
* Only drawn when {@link FrameworkBackgroundDef.variantProp} reads one of
|
|
109
|
+
* these — the same semantics a wash already has
|
|
110
|
+
* ({@link BackgroundWashDef.variants}), and the reason a variant is a
|
|
111
|
+
* DECLARATION and not a second background.
|
|
112
|
+
*
|
|
113
|
+
* Absent means every variant, which is what every text meant before this
|
|
114
|
+
* existed. Distinct from {@link visibleProp}, and the two compose: a variant
|
|
115
|
+
* says which chart this text belongs to, a visible prop says whether the user
|
|
116
|
+
* has switched it off in the chart it does belong to.
|
|
117
|
+
*/
|
|
118
|
+
variants?: readonly string[];
|
|
119
|
+
/** Defaults to `left` for horizontal text and `center` for vertical. */
|
|
120
|
+
align?: 'left' | 'center' | 'right';
|
|
121
|
+
/** Drawn rotated -90°, reading bottom-to-top. */
|
|
122
|
+
vertical?: boolean;
|
|
123
|
+
/** Model prop gating this text. Absent means always drawn. */
|
|
124
|
+
visibleProp?: string;
|
|
125
|
+
}
|
|
126
|
+
/** One graduation on an axis. */
|
|
127
|
+
export interface BackgroundTickDef {
|
|
128
|
+
/** Position along the axis, as a ratio of the plot span it runs on. */
|
|
129
|
+
at: Ratio;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The graduations of an axis: divider lines spanning the plot.
|
|
133
|
+
*
|
|
134
|
+
* Deliberately NOT gated by the owning axis: on a Wardley map the evolution
|
|
135
|
+
* dividers are wanted with the axis line hidden and vice versa, so ticks carry
|
|
136
|
+
* their own {@link visibleProp}. Drawing an axis and graduating it are two
|
|
137
|
+
* decisions.
|
|
138
|
+
*
|
|
139
|
+
* A graduation is a line and nothing else. Short stubs on the axis line, and
|
|
140
|
+
* per-tick labels, had no framework asking for them — a tick that wants a name
|
|
141
|
+
* is a {@link BackgroundZoneDef} with a label, which is what Wardley's
|
|
142
|
+
* evolution phases actually are.
|
|
143
|
+
*/
|
|
144
|
+
export interface BackgroundTicksDef {
|
|
145
|
+
ticks: readonly BackgroundTickDef[];
|
|
146
|
+
stroke: BackgroundStroke;
|
|
147
|
+
visibleProp?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* A named axis of the frame of reference.
|
|
151
|
+
*
|
|
152
|
+
* `forward` is the direction of INCREASING value: rightwards for a horizontal
|
|
153
|
+
* axis, UPWARDS for a vertical one — which is where a reader expects "more" to
|
|
154
|
+
* be, and the opposite of increasing screen `y`.
|
|
155
|
+
*/
|
|
156
|
+
export interface BackgroundAxisDef {
|
|
157
|
+
id: string;
|
|
158
|
+
orientation: 'horizontal' | 'vertical';
|
|
159
|
+
/**
|
|
160
|
+
* Which plot line the axis sits on, across its own orientation: a horizontal
|
|
161
|
+
* axis at `1` runs along the bottom, a vertical axis at `0` up the left edge.
|
|
162
|
+
*/
|
|
163
|
+
at: Ratio;
|
|
164
|
+
/**
|
|
165
|
+
* Named consumer for `both`: Estuarine's energy axis is double-headed (its
|
|
166
|
+
* `e` runs positive and negative around zero).
|
|
167
|
+
*/
|
|
168
|
+
arrow?: 'none' | 'forward' | 'backward' | 'both';
|
|
169
|
+
/** Arrowhead length in model units. */
|
|
170
|
+
arrowSize?: number;
|
|
171
|
+
stroke: BackgroundStroke;
|
|
172
|
+
/** Model prop gating the line, its arrowheads AND its title. */
|
|
173
|
+
visibleProp?: string;
|
|
174
|
+
/** The axis name. Shares the axis' own visibility. */
|
|
175
|
+
title?: BackgroundTextDef;
|
|
176
|
+
/**
|
|
177
|
+
* Words naming the two ends ("Uncharted"/"Industrialized"). Gated by their
|
|
178
|
+
* OWN `visibleProp` only — naming where an axis leads is a separate decision
|
|
179
|
+
* from drawing it.
|
|
180
|
+
*/
|
|
181
|
+
endLabels?: readonly BackgroundTextDef[];
|
|
182
|
+
ticks?: BackgroundTicksDef;
|
|
183
|
+
}
|
|
184
|
+
/** A named region of the plot. */
|
|
185
|
+
export interface BackgroundZoneDef {
|
|
186
|
+
id: string;
|
|
187
|
+
/** The zone rectangle, in plot ratios. */
|
|
188
|
+
rect: {
|
|
189
|
+
x: Ratio;
|
|
190
|
+
y: Ratio;
|
|
191
|
+
w: Ratio;
|
|
192
|
+
h: Ratio;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* The variants this zone exists in, same semantics as
|
|
196
|
+
* {@link BackgroundWashDef.variants}: only drawn when
|
|
197
|
+
* {@link FrameworkBackgroundDef.variantProp} reads one of them, and absent
|
|
198
|
+
* means all of them.
|
|
199
|
+
*
|
|
200
|
+
* Unlike {@link fillVisibleProp}, which gates the TINT alone, this gates the
|
|
201
|
+
* zone as a whole — its {@link label} included, unless that label names its
|
|
202
|
+
* own variants. A quadrant that is not part of this reading of the chart has
|
|
203
|
+
* no name to be written on the canvas either, and the same precedent already
|
|
204
|
+
* holds one layer up: an axis' title shares the axis' visibility.
|
|
205
|
+
*/
|
|
206
|
+
variants?: readonly string[];
|
|
207
|
+
/** Tint painted under everything but the card. */
|
|
208
|
+
fill?: BackgroundColor;
|
|
209
|
+
/** Model prop gating the tint (not the label). */
|
|
210
|
+
fillVisibleProp?: string;
|
|
211
|
+
/** The zone name. Anchored in plot ratios like any other text. */
|
|
212
|
+
label?: BackgroundTextDef;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* One region of the plot an INSTANCE declares, read off a model prop.
|
|
216
|
+
*
|
|
217
|
+
* The counterpart of {@link BackgroundZoneDef}, which is part of the framework
|
|
218
|
+
* and identical on every element of it. This one is the user's own partition of
|
|
219
|
+
* their own frame: a BPMN pool's lanes (couloirs) are exactly this — how many
|
|
220
|
+
* there are, what they are called and how the height is shared between them is
|
|
221
|
+
* a property of THAT pool, not of BPMN.
|
|
222
|
+
*/
|
|
223
|
+
export interface BackgroundInstanceZoneItem {
|
|
224
|
+
/** Stable id inside the instance; what a reported zone id is built from. */
|
|
225
|
+
id: string;
|
|
226
|
+
/** The zone name, drawn in the band. Absent means an unnamed band. */
|
|
227
|
+
name?: string;
|
|
228
|
+
/**
|
|
229
|
+
* A relative WEIGHT, not a length: the zones share the plot in proportion to
|
|
230
|
+
* their sizes. See {@link BackgroundInstanceZonesDef} for why.
|
|
231
|
+
*/
|
|
232
|
+
size: number;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* A label STRIP at the leading edge of every instance zone.
|
|
236
|
+
*
|
|
237
|
+
* The placement BPMN 2.0 draws a lane title in, and the one bpmn.io, Camunda
|
|
238
|
+
* and Visio all render: a fixed-width band along the lane's leading edge,
|
|
239
|
+
* immediately inside the pool's own participant band, with the lane name turned
|
|
240
|
+
* on its side. The first placement this file offered wrote the name across the
|
|
241
|
+
* zone's top-left corner instead; the PO's visual recette (2026-08-26) settled
|
|
242
|
+
* it against the corner, on notation rather than on taste — a reader who knows
|
|
243
|
+
* BPMN reads the strip as a lane title and a floating corner word as a note.
|
|
244
|
+
*
|
|
245
|
+
* ## The strip is CHROME, not a smaller zone
|
|
246
|
+
*
|
|
247
|
+
* {@link backgroundInstanceZones} keeps reporting the FULL plot slice, and the
|
|
248
|
+
* strip is painted inside it. That is the BPMN reading and not an
|
|
249
|
+
* implementation shortcut: the title band belongs TO the lane, so an element
|
|
250
|
+
* dropped on it is in that lane, and a lane's share of the pool does not shrink
|
|
251
|
+
* because it was given a name. Membership, the audit and every rule therefore
|
|
252
|
+
* see exactly what they saw before this existed.
|
|
253
|
+
*
|
|
254
|
+
* ## Which way the words run
|
|
255
|
+
*
|
|
256
|
+
* From the stack, not from a field: a `'y'` stack makes the strip tall and
|
|
257
|
+
* narrow, so the name is rotated to read bottom-to-top, exactly as the
|
|
258
|
+
* participant name is one level up ({@link BackgroundSideBandDef}); an `'x'`
|
|
259
|
+
* stack makes it short and wide, so the name stays upright. A declaration that
|
|
260
|
+
* could disagree with its own geometry would only ever be a way to get it
|
|
261
|
+
* wrong.
|
|
262
|
+
*/
|
|
263
|
+
export interface BackgroundInstanceZoneBandDef {
|
|
264
|
+
/** Strip thickness in FIXED model units — across the stacking direction. */
|
|
265
|
+
width: number;
|
|
266
|
+
/** The line between the strip and the rest of the zone. Absent means none. */
|
|
267
|
+
divider?: BackgroundStroke;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A background whose plot its INSTANCES divide up.
|
|
271
|
+
*
|
|
272
|
+
* A framework declares here that its elements carry their own partition, which
|
|
273
|
+
* prop holds it and how the pieces stack; the primitive paints the dividers and
|
|
274
|
+
* the names, and the audit reports the pieces as zones like any other. Named
|
|
275
|
+
* consumer: the BPMN pool, whose lanes arrive in the tranche after this one.
|
|
276
|
+
*
|
|
277
|
+
* ## Why weights and not model units
|
|
278
|
+
*
|
|
279
|
+
* Every position in this file is a ratio of the plot precisely so that a
|
|
280
|
+
* background survives being stretched, and an instance partition has to survive
|
|
281
|
+
* it too. Sizes are therefore NORMALISED over their sum: a pool with lanes of
|
|
282
|
+
* `1, 2, 1` gives the middle one half the height at any size, and dragging the
|
|
283
|
+
* pool taller redistributes the extra space proportionally instead of leaving a
|
|
284
|
+
* gap under the last band or pushing it out of the frame. The numbers are also
|
|
285
|
+
* free of a unit the user would have to think in — `2` reads as "twice the
|
|
286
|
+
* other one", which is the only thing a lane's height ever means.
|
|
287
|
+
*/
|
|
288
|
+
export interface BackgroundInstanceZonesDef {
|
|
289
|
+
/** Model prop holding the {@link BackgroundInstanceZoneItem}[]. */
|
|
290
|
+
prop: string;
|
|
291
|
+
/**
|
|
292
|
+
* Which way the zones stack. `'y'` lays them out as horizontal bands, full
|
|
293
|
+
* width, top to bottom in array order — the BPMN pool. `'x'` is the
|
|
294
|
+
* symmetric case: full-height columns, left to right.
|
|
295
|
+
*/
|
|
296
|
+
stack: 'x' | 'y';
|
|
297
|
+
/** The line between two adjacent zones. Absent means none is drawn. */
|
|
298
|
+
divider?: BackgroundStroke;
|
|
299
|
+
/**
|
|
300
|
+
* How a zone's {@link BackgroundInstanceZoneItem.name} is written.
|
|
301
|
+
*
|
|
302
|
+
* Not a {@link BackgroundTextDef}: there is one style for every zone of the
|
|
303
|
+
* instance, and the anchor is the zone's own geometry rather than a declared
|
|
304
|
+
* ratio — the whole point is that the declaration does not know how many
|
|
305
|
+
* zones there are or where they sit.
|
|
306
|
+
*
|
|
307
|
+
* ## Two placements, selected by the PRESENCE of {@link band}
|
|
308
|
+
*
|
|
309
|
+
* - **corner** (no `band`) — horizontal, anchored at the top-left of the
|
|
310
|
+
* zone, inset by `dx` / `dy` in FIXED model units like every other offset
|
|
311
|
+
* here. The original placement, and still the default;
|
|
312
|
+
* - **band** — a fixed-width label STRIP at the zone's leading edge, with the
|
|
313
|
+
* name written along it: rotated for a `'y'` stack, upright for an `'x'`
|
|
314
|
+
* one. See {@link BackgroundInstanceZoneBandDef}.
|
|
315
|
+
*
|
|
316
|
+
* Presence as the selector rather than a discriminated union, deliberately.
|
|
317
|
+
* A union would need a tag on every declaration that already exists, which
|
|
318
|
+
* makes an additive change a breaking one for no reader; and presence is
|
|
319
|
+
* already how this file says "this feature is off" everywhere else — an
|
|
320
|
+
* absent `instanceZones` is no partition, an absent `divider` is no line, an
|
|
321
|
+
* absent `label` is no names at all. `dx` / `dy` belong to the corner
|
|
322
|
+
* placement and are ignored under a band, which has no corner to inset from.
|
|
323
|
+
*/
|
|
324
|
+
label?: {
|
|
325
|
+
style: BackgroundTextStyle;
|
|
326
|
+
/** Corner placement only. */
|
|
327
|
+
dx?: number;
|
|
328
|
+
/** Corner placement only. */
|
|
329
|
+
dy?: number;
|
|
330
|
+
/** Present = band placement. */
|
|
331
|
+
band?: BackgroundInstanceZoneBandDef;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Prefix of the reported zone ids: `'lane'` reports `lane:sales`.
|
|
335
|
+
*
|
|
336
|
+
* A namespace, not decoration. The instance zones are concatenated with the
|
|
337
|
+
* declared ones ({@link FrameworkBackgroundDef.zones}) wherever zones are
|
|
338
|
+
* consumed, and a user free to name a lane `early` must not be able to shadow
|
|
339
|
+
* a framework zone by doing so.
|
|
340
|
+
*/
|
|
341
|
+
idPrefix: string;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* A flat colour wash over the plot, given as gradient stops.
|
|
345
|
+
*
|
|
346
|
+
* Stops are DATA — `[offset, alpha]` pairs — never a curve evaluated at paint
|
|
347
|
+
* time. A framework whose wash follows an analytic function tabulates it once,
|
|
348
|
+
* at module load, and ships the table.
|
|
349
|
+
*/
|
|
350
|
+
export interface BackgroundWashDef {
|
|
351
|
+
id: string;
|
|
352
|
+
/** Only painted when {@link FrameworkBackgroundDef.variantProp} is one of these. */
|
|
353
|
+
variants?: readonly string[];
|
|
354
|
+
visibleProp?: string;
|
|
355
|
+
color: BackgroundColor;
|
|
356
|
+
/**
|
|
357
|
+
* `[offset 0..1, alpha 0..1]`, in ascending offset order, along the plot
|
|
358
|
+
* WIDTH. A wash runs left to right because that is the only direction any
|
|
359
|
+
* framework has asked for; a vertical one is a field to add the day one does.
|
|
360
|
+
*/
|
|
361
|
+
stops: readonly (readonly [number, number])[];
|
|
362
|
+
}
|
|
363
|
+
export interface BackgroundSurfaceDef {
|
|
364
|
+
fill?: BackgroundColor;
|
|
365
|
+
/**
|
|
366
|
+
* The frame round the card. `dash` is a pattern in model units, exactly as
|
|
367
|
+
* {@link BackgroundStroke.dash} is; absent — which is what every declaration
|
|
368
|
+
* written before it existed says — draws the solid line it always drew.
|
|
369
|
+
*
|
|
370
|
+
* Named consumer: the C4 boundary, which the notation draws as a DASHED
|
|
371
|
+
* rectangle round a group of elements. A dash is what tells a boundary from a
|
|
372
|
+
* board on that canvas, so it belongs where the rest of the frame is declared
|
|
373
|
+
* rather than in a renderer wrapper only one framework would ever have.
|
|
374
|
+
*/
|
|
375
|
+
border?: {
|
|
376
|
+
color: BackgroundColor;
|
|
377
|
+
width: number;
|
|
378
|
+
radius?: number;
|
|
379
|
+
dash?: readonly number[];
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* A filled strip of FIXED width, painted over one margin of the card.
|
|
384
|
+
*
|
|
385
|
+
* The width of a band IS the margin it covers
|
|
386
|
+
* ({@link BackgroundGeometry.margin}), never a second number: the margin is
|
|
387
|
+
* already the room the plot gives up to the furniture, and letting a
|
|
388
|
+
* declaration state a different width would be two numbers that must agree and
|
|
389
|
+
* one day will not. An element narrower than its own margin clamps the band to
|
|
390
|
+
* the element, which is the only case where the two can disagree.
|
|
391
|
+
*
|
|
392
|
+
* A band is part of the CARD, not a layer over it: it is painted over the
|
|
393
|
+
* card's fill and under its border, so the frame keeps outlining the whole
|
|
394
|
+
* element. Its {@link label} is a text like any other, drawn with the rest of
|
|
395
|
+
* them, and anchored in plot ratios — the plot edge is the band's inner edge,
|
|
396
|
+
* so `x: 0` with a negative `dx` walks back INTO the band.
|
|
397
|
+
*
|
|
398
|
+
* Named consumer: the BPMN pool, a lane whose participant name is written up a
|
|
399
|
+
* filled band along its left edge, with a {@link divider} between that band and
|
|
400
|
+
* the flow area.
|
|
401
|
+
*
|
|
402
|
+
* Only `'left'` for now — same philosophy as the wash direction
|
|
403
|
+
* ({@link BackgroundWashDef.stops}): the union grows the day a framework asks
|
|
404
|
+
* for a top or a right band, not in anticipation of one.
|
|
405
|
+
*/
|
|
406
|
+
export interface BackgroundSideBandDef {
|
|
407
|
+
side: 'left';
|
|
408
|
+
/** Tint over the whole strip. Absent means the card shows through. */
|
|
409
|
+
fill?: BackgroundColor;
|
|
410
|
+
/** The line between the band and the plot. Absent means none. */
|
|
411
|
+
divider?: BackgroundStroke;
|
|
412
|
+
/** The words written in the band — the band's own label. */
|
|
413
|
+
label?: BackgroundTextDef;
|
|
414
|
+
}
|
|
415
|
+
/** Everything that dresses the frame: the card, the fills, the colour code. */
|
|
416
|
+
export interface BackgroundChromeDef {
|
|
417
|
+
/** Font family every text inherits unless it names its own. */
|
|
418
|
+
fontFamily?: string;
|
|
419
|
+
/**
|
|
420
|
+
* The card — the element rectangle itself. Absent means the default:
|
|
421
|
+
* a plain white rectangle with no border.
|
|
422
|
+
*/
|
|
423
|
+
surface?: BackgroundSurfaceDef;
|
|
424
|
+
/**
|
|
425
|
+
* Filled strips over the margins, painted WITH the card — over its fill, under
|
|
426
|
+
* its border — in declaration order.
|
|
427
|
+
*/
|
|
428
|
+
sideBands?: readonly BackgroundSideBandDef[];
|
|
429
|
+
/** Washes over the plot, painted in declaration order, under the zones. */
|
|
430
|
+
washes?: readonly BackgroundWashDef[];
|
|
431
|
+
/** The colour code: names a palette entry `@name` can resolve to. */
|
|
432
|
+
palette?: Readonly<Record<string, BackgroundColor>>;
|
|
433
|
+
}
|
|
434
|
+
export interface BackgroundGeometry {
|
|
435
|
+
/** Reference size in model units — what a fresh background is created at. */
|
|
436
|
+
width: number;
|
|
437
|
+
height: number;
|
|
438
|
+
/**
|
|
439
|
+
* When true the reference proportion `height / width` is preserved as the
|
|
440
|
+
* background is sized up to match its neighbours. `false` leaves the two
|
|
441
|
+
* dimensions independent — named consumer: the BPMN pool, a 560 × 200 lane
|
|
442
|
+
* that is stretched in one direction all the time.
|
|
443
|
+
*
|
|
444
|
+
* A starting proportion, not a constraint on the user's hand: once
|
|
445
|
+
* {@link resizable} lets the handles out, dragging them is free either way.
|
|
446
|
+
*/
|
|
447
|
+
lockAspectRatio: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* Whether the background offers its resize handles. Seeded onto
|
|
450
|
+
* `resizeEnabled` at creation and used as the fallback for an element that
|
|
451
|
+
* carries no such prop — see `backgroundResizeAllowed`.
|
|
452
|
+
*/
|
|
453
|
+
resizable: boolean;
|
|
454
|
+
/** Fixed inset, in model units, between the element box and the plot. */
|
|
455
|
+
margin: BackgroundInset;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* One framework's background, in full. The primitive needs nothing else to
|
|
459
|
+
* paint it, to hit-test its editable labels or to size a new one.
|
|
460
|
+
*/
|
|
461
|
+
export interface FrameworkBackgroundDef {
|
|
462
|
+
/** The PERSISTED element type this declaration implements (`wardley`). */
|
|
463
|
+
type: string;
|
|
464
|
+
/** The role stamped on the element at creation, so rules can frame against it. */
|
|
465
|
+
role?: RoleId;
|
|
466
|
+
geometry: BackgroundGeometry;
|
|
467
|
+
/** Model prop selecting a variant; washes name the variants they belong to. */
|
|
468
|
+
variantProp?: string;
|
|
469
|
+
axes?: readonly BackgroundAxisDef[];
|
|
470
|
+
zones?: readonly BackgroundZoneDef[];
|
|
471
|
+
/**
|
|
472
|
+
* The plot partition each INSTANCE carries, if this framework lets its
|
|
473
|
+
* elements declare one. Absent — the case for every framework so far — means
|
|
474
|
+
* a background whose zones are the same on every element of it.
|
|
475
|
+
*/
|
|
476
|
+
instanceZones?: BackgroundInstanceZonesDef;
|
|
477
|
+
/**
|
|
478
|
+
* Width of the TOLERANCE BAND around each zone transition, as a ratio of the
|
|
479
|
+
* plot span the transition is measured across. Centred on the transition, so
|
|
480
|
+
* a band of `0.1` reaches `0.05` of the plot either side of the line.
|
|
481
|
+
*
|
|
482
|
+
* A frontier between two zones is a line to the renderer and a REGION to the
|
|
483
|
+
* reader: things do not change phase at a coordinate, they change phase
|
|
484
|
+
* around one. A framework whose rules ask "is this artefact at a transition"
|
|
485
|
+
* declares here how wide "at" is — in a ratio, so the answer survives the map
|
|
486
|
+
* being resized, exactly like every other position in this file.
|
|
487
|
+
*
|
|
488
|
+
* Absent means the framework has not declared one, and a rule asking for the
|
|
489
|
+
* band gets silence rather than a guessed width.
|
|
490
|
+
*/
|
|
491
|
+
transitionBandWidth?: Ratio;
|
|
492
|
+
chrome?: BackgroundChromeDef;
|
|
493
|
+
}
|
|
494
|
+
/** The default card: a plain white rectangle, no border, no radius. */
|
|
495
|
+
export declare const DEFAULT_BACKGROUND_SURFACE: BackgroundSurfaceDef;
|
|
496
|
+
/** The plot rectangle of a background of size `w × h`, in element-local units. */
|
|
497
|
+
export declare function backgroundPlot(def: FrameworkBackgroundDef, w: number, h: number): {
|
|
498
|
+
x0: number;
|
|
499
|
+
y0: number;
|
|
500
|
+
x1: number;
|
|
501
|
+
y1: number;
|
|
502
|
+
width: number;
|
|
503
|
+
height: number;
|
|
504
|
+
};
|
|
505
|
+
/** Element-local point of an anchor, given the plot it is expressed against. */
|
|
506
|
+
export declare function backgroundPoint(anchor: BackgroundAnchor, plot: ReturnType<typeof backgroundPlot>): [number, number];
|
|
507
|
+
/**
|
|
508
|
+
* The colour a broken declaration paints in.
|
|
509
|
+
*
|
|
510
|
+
* Loud magenta on purpose: a background is DATA, and the cost of getting it
|
|
511
|
+
* wrong must be seen on the canvas in one glance rather than debugged from a
|
|
512
|
+
* `rgba(NaN,NaN,NaN,0.4)` that silently paints nothing.
|
|
513
|
+
*/
|
|
514
|
+
export declare const BROKEN_BACKGROUND_COLOR = "#ff00ff";
|
|
515
|
+
export declare function warnBrokenBackgroundColor(reason: string): void;
|
|
516
|
+
/**
|
|
517
|
+
* Resolve `@name` against the palette; anything else is a literal colour.
|
|
518
|
+
*
|
|
519
|
+
* A name the palette does not carry is a typo in the declaration, not a
|
|
520
|
+
* request for transparency: it warns and returns {@link BROKEN_BACKGROUND_COLOR}.
|
|
521
|
+
*/
|
|
522
|
+
export declare function backgroundColor(color: BackgroundColor | undefined, palette: Readonly<Record<string, BackgroundColor>> | undefined): string;
|
|
523
|
+
/** One zone of one instance, resolved: a name and a rectangle in plot ratios. */
|
|
524
|
+
export interface BackgroundInstanceZone {
|
|
525
|
+
/** `${idPrefix}:${item.id}` — never collides with a declared zone id. */
|
|
526
|
+
id: string;
|
|
527
|
+
name?: string;
|
|
528
|
+
rect: {
|
|
529
|
+
x: Ratio;
|
|
530
|
+
y: Ratio;
|
|
531
|
+
w: Ratio;
|
|
532
|
+
h: Ratio;
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* The plot partition ONE instance carries, as rectangles in plot ratios.
|
|
537
|
+
*
|
|
538
|
+
* The semantic accessor onto {@link BackgroundInstanceZonesDef}: everything
|
|
539
|
+
* that has to know where a user's own zones sit — the renderer that draws their
|
|
540
|
+
* dividers and their names, the audit that reports them, the rules a later
|
|
541
|
+
* tranche will judge inside them — reads them here, so a lane is one shape and
|
|
542
|
+
* not four that must agree. Named consumer: the BPMN pool's lanes (couloirs).
|
|
543
|
+
*
|
|
544
|
+
* Pure: declaration plus the instance's bag of props in, plain data out. Ratios
|
|
545
|
+
* and not model units, for the reason every position in this file is a ratio —
|
|
546
|
+
* an instance stretched to twice its height keeps the same partition.
|
|
547
|
+
*
|
|
548
|
+
* ## What a malformed partition does
|
|
549
|
+
*
|
|
550
|
+
* A partition is data the user edits, so it gets typos and half-written rows,
|
|
551
|
+
* and none of them may take the frame down or paint a picture that lies:
|
|
552
|
+
*
|
|
553
|
+
* - a missing, empty or non-array prop yields `[]` — a background that simply
|
|
554
|
+
* has no partition yet, which is what every instance looks like the moment it
|
|
555
|
+
* is created;
|
|
556
|
+
* - an entry that is not an object, or carries no string id, is dropped;
|
|
557
|
+
* - a size that is not a finite number, or is `0` or less, is dropped with a
|
|
558
|
+
* warning: a zero-height band is a band nothing can be in, and a negative one
|
|
559
|
+
* would eat into its neighbours. Dropped rather than clamped, for the reason
|
|
560
|
+
* {@link FrameworkBackgroundDef.transitionBandWidth} drops its own degenerate
|
|
561
|
+
* case — silently inventing a size is worse than showing one band fewer;
|
|
562
|
+
* - once for each distinct problem, like every other diagnostic on the paint
|
|
563
|
+
* path (see {@link warnBrokenBackgroundColor}).
|
|
564
|
+
*
|
|
565
|
+
* The survivors keep their declaration ORDER, and their sizes are normalised
|
|
566
|
+
* over the sum of the survivors — so dropping a broken row redistributes its
|
|
567
|
+
* space rather than leaving a hole where it was.
|
|
568
|
+
*/
|
|
569
|
+
export declare function backgroundInstanceZones(def: FrameworkBackgroundDef, model: Readonly<Record<string, unknown>>): readonly BackgroundInstanceZone[];
|
|
570
|
+
/** A rectangle in ELEMENT-LOCAL model units, i.e. what the renderer paints in. */
|
|
571
|
+
export interface BackgroundRect {
|
|
572
|
+
x: number;
|
|
573
|
+
y: number;
|
|
574
|
+
w: number;
|
|
575
|
+
h: number;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* The label STRIP of one instance zone, in element-local model units.
|
|
579
|
+
*
|
|
580
|
+
* `null` when the declaration asks for no band, or when there is no room for
|
|
581
|
+
* one. THE one place that knows where a lane title sits: the renderer paints
|
|
582
|
+
* from it and the framework's view hit-tests a double-click against it, so the
|
|
583
|
+
* words a user aims at and the words they get are the same rectangle by
|
|
584
|
+
* construction rather than by two constants that must agree.
|
|
585
|
+
*
|
|
586
|
+
* Clamped to the plot, the way a side band clamps to an element narrower than
|
|
587
|
+
* its own margin ({@link BackgroundSideBandDef}) — the same degenerate case,
|
|
588
|
+
* and the same answer.
|
|
589
|
+
*/
|
|
590
|
+
export declare function backgroundInstanceZoneBand(def: FrameworkBackgroundDef, zone: BackgroundInstanceZone, plot: ReturnType<typeof backgroundPlot>): BackgroundRect | null;
|
|
591
|
+
/**
|
|
592
|
+
* Whether the resize handles are offered for this element.
|
|
593
|
+
*
|
|
594
|
+
* The element's own `resizeEnabled` decides — it is what the toolbar toggle
|
|
595
|
+
* writes. The declaration's {@link BackgroundGeometry.resizable} is the
|
|
596
|
+
* fallback for an element that carries no such prop, which is what makes it
|
|
597
|
+
* live data rather than documentation.
|
|
598
|
+
*/
|
|
599
|
+
export declare function backgroundResizeAllowed(def: FrameworkBackgroundDef, model: {
|
|
600
|
+
resizeEnabled?: boolean;
|
|
601
|
+
}): boolean;
|
|
602
|
+
/**
|
|
603
|
+
* The size a fresh background of this framework is created at, never smaller
|
|
604
|
+
* than the bounds it is asked to cover — so a second map dropped on a board
|
|
605
|
+
* matches the biggest one already there instead of shrinking beside it.
|
|
606
|
+
*/
|
|
607
|
+
export declare function backgroundSize(def: FrameworkBackgroundDef, atLeastWidth?: number, atLeastHeight?: number): {
|
|
608
|
+
width: number;
|
|
609
|
+
height: number;
|
|
610
|
+
};
|