@formicoidea/labre-core 0.30.1 → 0.32.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 +3 -3
- package/dist/_pkgs/affine-block-attachment/components/rename-model.js +1 -1
- package/dist/_pkgs/affine-block-attachment/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.js +3 -3
- package/dist/_pkgs/affine-block-attachment/effects.js +2 -2
- package/dist/_pkgs/affine-block-attachment/embed.js +1 -1
- package/dist/_pkgs/affine-block-attachment/index.d.ts +7 -7
- package/dist/_pkgs/affine-block-attachment/index.js +7 -7
- package/dist/_pkgs/affine-block-attachment/store.js +1 -1
- package/dist/_pkgs/affine-block-attachment/utils.d.ts +1 -1
- package/dist/_pkgs/affine-block-attachment/view.js +3 -3
- package/dist/_pkgs/affine-block-bookmark/commands/insert-link-by-quick-search.js +1 -1
- package/dist/_pkgs/affine-block-bookmark/components/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-bookmark/components/index.js +1 -1
- package/dist/_pkgs/affine-block-bookmark/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-bookmark/effects.js +3 -3
- package/dist/_pkgs/affine-block-bookmark/index.d.ts +6 -6
- package/dist/_pkgs/affine-block-bookmark/index.js +6 -6
- package/dist/_pkgs/affine-block-bookmark/store.js +1 -1
- package/dist/_pkgs/affine-block-bookmark/view.js +5 -5
- package/dist/_pkgs/affine-block-callout/callout-block.d.ts +6 -0
- package/dist/_pkgs/affine-block-callout/callout-block.js +25 -3
- 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 +10 -7
- package/dist/_pkgs/affine-block-callout/effects.d.ts +2 -2
- package/dist/_pkgs/affine-block-callout/effects.js +2 -2
- 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-callout/store.js +1 -1
- package/dist/_pkgs/affine-block-callout/view.js +3 -3
- 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/lang-button.d.ts +1 -1
- 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/components/preview-button.d.ts +1 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/components/preview-button.js +1 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +52 -5
- package/dist/_pkgs/affine-block-code/code-toolbar/context.d.ts +1 -1
- package/dist/_pkgs/affine-block-code/effects.d.ts +6 -4
- package/dist/_pkgs/affine-block-code/effects.js +8 -6
- package/dist/_pkgs/affine-block-code/highlight/affine-code-unit.js +6 -1
- package/dist/_pkgs/affine-block-code/index.d.ts +11 -10
- package/dist/_pkgs/affine-block-code/index.js +11 -10
- 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/store.js +2 -2
- package/dist/_pkgs/affine-block-code/styles.js +31 -0
- package/dist/_pkgs/affine-block-code/turbo/code-layout-handler.d.ts +1 -1
- package/dist/_pkgs/affine-block-code/view.js +1 -1
- package/dist/_pkgs/affine-block-data-view/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-data-view/data-view-block.js +1 -0
- package/dist/_pkgs/affine-block-data-view/effects.js +1 -1
- package/dist/_pkgs/affine-block-data-view/store.js +1 -1
- package/dist/_pkgs/affine-block-data-view/view.js +2 -2
- package/dist/_pkgs/affine-block-database/adapters/html.js +1 -1
- package/dist/_pkgs/affine-block-database/adapters/index.d.ts +4 -4
- package/dist/_pkgs/affine-block-database/adapters/index.js +4 -4
- package/dist/_pkgs/affine-block-database/adapters/markdown.js +1 -1
- package/dist/_pkgs/affine-block-database/adapters/utils.js +1 -1
- package/dist/_pkgs/affine-block-database/commands.js +1 -1
- package/dist/_pkgs/affine-block-database/components/title/index.js +4 -1
- package/dist/_pkgs/affine-block-database/configs/slash-menu.js +30 -3
- package/dist/_pkgs/affine-block-database/context/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-database/context/index.js +1 -1
- package/dist/_pkgs/affine-block-database/database-block.d.ts +1 -1
- package/dist/_pkgs/affine-block-database/database-block.js +13 -0
- package/dist/_pkgs/affine-block-database/effects.js +11 -11
- package/dist/_pkgs/affine-block-database/index.d.ts +14 -14
- package/dist/_pkgs/affine-block-database/index.js +14 -14
- package/dist/_pkgs/affine-block-database/properties/model.js +3 -3
- 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/store.js +2 -2
- package/dist/_pkgs/affine-block-database/view.js +2 -2
- package/dist/_pkgs/affine-block-database/views/index.js +1 -0
- package/dist/_pkgs/affine-block-divider/effects.js +1 -1
- package/dist/_pkgs/affine-block-divider/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-divider/index.js +2 -2
- package/dist/_pkgs/affine-block-divider/store.js +1 -1
- package/dist/_pkgs/affine-block-divider/view.js +2 -2
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +10 -0
- 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-edgeless-text/edgeless-toolbar/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/effects.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-edgeless-text/index.js +2 -2
- package/dist/_pkgs/affine-block-edgeless-text/view.js +4 -4
- package/dist/_pkgs/affine-block-embed/configs/toolbar.d.ts +4 -4
- package/dist/_pkgs/affine-block-embed/effects.d.ts +17 -17
- package/dist/_pkgs/affine-block-embed/effects.js +18 -18
- package/dist/_pkgs/affine-block-embed/embed-figma-block/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-spec.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-figma-block/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-figma-block/index.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-github-block/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-github-block/embed-github-spec.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-github-block/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-github-block/index.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/embed-html-spec.js +2 -2
- package/dist/_pkgs/affine-block-embed/embed-html-block/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/index.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/adapters/html.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/adapters/index.d.ts +3 -3
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/adapters/index.js +6 -6
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/adapters/plain-text.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/commands/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/commands/index.js +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/commands/insert-embed-iframe-with-url.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/commands/insert-empty-embed-iframe.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/commands/insert-empty-embed-iframe.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-idle-card.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-idle-card.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-edit-popup.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-edit-popup.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-input-popup.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-input-popup.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-loading-card.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-loading-card.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/index.js +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/excalidraw.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/google-docs.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/google-drive.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/index.js +6 -6
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/miro.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/providers/spotify.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/slash-menu/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-edgeless-iframe-block.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-edgeless-iframe-block.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-spec.js +3 -3
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/index.d.ts +8 -8
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/index.js +8 -8
- package/dist/_pkgs/affine-block-embed/embed-loom-block/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-loom-block/embed-loom-spec.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-loom-block/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-loom-block/index.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/configs/slash-menu.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/embed-youtube-spec.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/index.js +1 -1
- package/dist/_pkgs/affine-block-embed/index.d.ts +16 -16
- package/dist/_pkgs/affine-block-embed/index.js +16 -16
- package/dist/_pkgs/affine-block-embed/store.js +6 -6
- package/dist/_pkgs/affine-block-embed/types.d.ts +4 -4
- package/dist/_pkgs/affine-block-embed/types.js +4 -4
- package/dist/_pkgs/affine-block-embed/view.js +13 -13
- 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/common/render-linked-doc.d.ts +2 -2
- package/dist/_pkgs/affine-block-embed-doc/effects.d.ts +5 -5
- package/dist/_pkgs/affine-block-embed-doc/effects.js +5 -5
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/commands/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/commands/index.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/slash-menu.js +1 -1
- 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 +10 -6
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-spec.js +3 -3
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/index.d.ts +8 -8
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/index.js +8 -8
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/commands/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/commands/index.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/edgeless-interaction.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-edgeless-synced-doc-block.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-edgeless-synced-doc-block.js +2 -2
- 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 +22 -3
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-spec.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/index.d.ts +7 -7
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/index.js +7 -7
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/init-height-extension.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-embed-doc/index.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/store.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/view.js +4 -4
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-dense-menu.js +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-menu.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-menu.js +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-tool-button.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-tool-button.js +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/index.d.ts +5 -5
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/index.js +5 -5
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/presentation-toolbar.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/presentation-toolbar.js +2 -2
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/quick-tool.js +1 -1
- package/dist/_pkgs/affine-block-frame/effects.d.ts +8 -8
- package/dist/_pkgs/affine-block-frame/effects.js +8 -8
- package/dist/_pkgs/affine-block-frame/frame-block.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-highlight-manager.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/frame-highlight-manager.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +13 -0
- package/dist/_pkgs/affine-block-frame/frame-manager.js +32 -2
- package/dist/_pkgs/affine-block-frame/frame-spec.js +2 -2
- package/dist/_pkgs/affine-block-frame/frame-tool.d.ts +2 -2
- package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-toolbar.js +1 -1
- package/dist/_pkgs/affine-block-frame/index.d.ts +9 -9
- package/dist/_pkgs/affine-block-frame/index.js +9 -9
- package/dist/_pkgs/affine-block-frame/present/frame-order-menu.js +1 -1
- package/dist/_pkgs/affine-block-frame/present/navigator-bg-widget.js +1 -1
- package/dist/_pkgs/affine-block-frame/present/present-button.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/present/present-button.js +1 -1
- package/dist/_pkgs/affine-block-frame/present-tool.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/view.js +10 -10
- package/dist/_pkgs/affine-block-image/adapters/html.js +1 -1
- package/dist/_pkgs/affine-block-image/adapters/markdown.js +1 -1
- package/dist/_pkgs/affine-block-image/adapters/notion-html.js +1 -1
- package/dist/_pkgs/affine-block-image/commands/insert-images.js +1 -1
- package/dist/_pkgs/affine-block-image/components/page-image-block.d.ts +1 -1
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +3 -3
- package/dist/_pkgs/affine-block-image/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-image/configs/toolbar.js +3 -3
- package/dist/_pkgs/affine-block-image/image-block.js +1 -1
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
- package/dist/_pkgs/affine-block-image/image-spec.js +4 -4
- package/dist/_pkgs/affine-block-image/index.d.ts +10 -10
- package/dist/_pkgs/affine-block-image/index.js +10 -10
- package/dist/_pkgs/affine-block-image/store.js +1 -1
- package/dist/_pkgs/affine-block-image/turbo/image-layout-handler.d.ts +1 -1
- package/dist/_pkgs/affine-block-image/utils.d.ts +2 -2
- package/dist/_pkgs/affine-block-image/utils.js +1 -1
- package/dist/_pkgs/affine-block-image/view.js +4 -4
- package/dist/_pkgs/affine-block-latex/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-latex/effects.js +1 -1
- package/dist/_pkgs/affine-block-latex/index.d.ts +3 -3
- package/dist/_pkgs/affine-block-latex/index.js +3 -3
- package/dist/_pkgs/affine-block-latex/store.js +2 -2
- package/dist/_pkgs/affine-block-latex/styles.js +6 -1
- package/dist/_pkgs/affine-block-latex/view.js +2 -2
- package/dist/_pkgs/affine-block-list/index.d.ts +4 -4
- package/dist/_pkgs/affine-block-list/index.js +4 -4
- package/dist/_pkgs/affine-block-list/store.js +1 -1
- package/dist/_pkgs/affine-block-list/turbo/list-layout-handler.d.ts +1 -1
- package/dist/_pkgs/affine-block-note/adapters/index.d.ts +3 -3
- package/dist/_pkgs/affine-block-note/adapters/index.js +6 -6
- package/dist/_pkgs/affine-block-note/commands/dedent-block-to-root.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/dedent-blocks-to-root.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/dedent-blocks.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/indent-blocks.js +1 -1
- package/dist/_pkgs/affine-block-note/components/edgeless-note-background.css.js +1 -1
- package/dist/_pkgs/affine-block-note/components/edgeless-note-background.js +2 -2
- package/dist/_pkgs/affine-block-note/components/edgeless-note-mask.js +1 -1
- package/dist/_pkgs/affine-block-note/components/edgeless-note-shadow-menu.js +1 -1
- package/dist/_pkgs/affine-block-note/components/edgeless-page-block-title.js +2 -2
- package/dist/_pkgs/affine-block-note/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-note/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-note/effects.js +9 -9
- package/dist/_pkgs/affine-block-note/index.d.ts +9 -9
- package/dist/_pkgs/affine-block-note/index.js +9 -9
- package/dist/_pkgs/affine-block-note/note-edgeless-block.d.ts +10 -1
- package/dist/_pkgs/affine-block-note/note-edgeless-block.js +35 -7
- package/dist/_pkgs/affine-block-note/note-keymap.js +3 -3
- package/dist/_pkgs/affine-block-note/store.js +1 -1
- package/dist/_pkgs/affine-block-note/turbo/note-layout-handler.d.ts +1 -1
- package/dist/_pkgs/affine-block-note/view.js +6 -6
- package/dist/_pkgs/affine-block-paragraph/index.d.ts +3 -3
- package/dist/_pkgs/affine-block-paragraph/index.js +3 -3
- package/dist/_pkgs/affine-block-paragraph/store.js +1 -1
- package/dist/_pkgs/affine-block-paragraph/turbo/paragraph-layout-handler.d.ts +1 -1
- package/dist/_pkgs/affine-block-paragraph/view.js +1 -1
- package/dist/_pkgs/affine-block-root/clipboard/page-clipboard.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/clipboard/page-clipboard.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/clipboard/command.js +2 -2
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/utils.js +2 -2
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.js +2 -2
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +16 -9
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/render-linked-doc.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/utils.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/utils.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +26 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +11 -2
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-service.js +15 -1
- package/dist/_pkgs/affine-block-root/edgeless/index.d.ts +4 -3
- package/dist/_pkgs/affine-block-root/edgeless/index.js +4 -3
- 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/edgeless/utils/query.js +1 -1
- package/dist/_pkgs/affine-block-root/index.d.ts +5 -2
- package/dist/_pkgs/affine-block-root/index.js +5 -2
- 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/preview/edgeless-root-preview-block.js +1 -1
- package/dist/_pkgs/affine-block-root/store.js +1 -1
- package/dist/_pkgs/affine-block-root/view.js +21 -12
- package/dist/_pkgs/affine-block-surface/commands/auto-align.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 +5 -2
- package/dist/_pkgs/affine-block-surface/element-model/index.js +4 -2
- package/dist/_pkgs/affine-block-surface/extensions/audit.d.ts +107 -0
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +472 -0
- package/dist/_pkgs/affine-block-surface/extensions/clipboard-config.d.ts +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/clipboard-config.js +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.d.ts +14 -0
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +29 -2
- package/dist/_pkgs/affine-block-surface/extensions/edit-props-middleware-builder.js +1 -1
- 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 +326 -0
- package/dist/_pkgs/affine-block-surface/extensions/element-renderer.d.ts +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +22 -9
- package/dist/_pkgs/affine-block-surface/extensions/index.js +22 -9
- 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/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 +590 -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/surface-middleware.d.ts +1 -1
- 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 +1340 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +3009 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +286 -0
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +907 -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 +321 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +81 -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 +59 -0
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +117 -0
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.d.ts +8 -0
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +238 -0
- package/dist/_pkgs/affine-block-surface/index.d.ts +6 -5
- package/dist/_pkgs/affine-block-surface/index.js +5 -4
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.d.ts +69 -3
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.js +334 -45
- package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.js +18 -2
- package/dist/_pkgs/affine-block-surface/renderer/tool-overlay.d.ts +2 -2
- package/dist/_pkgs/affine-block-surface/renderer/tool-overlay.js +1 -1
- package/dist/_pkgs/affine-block-surface/store.js +2 -2
- 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/utils/get-bg-grip-gap.js +1 -1
- package/dist/_pkgs/affine-block-surface/utils/get-surface-block.d.ts +2 -2
- package/dist/_pkgs/affine-block-surface/utils/index.d.ts +3 -3
- package/dist/_pkgs/affine-block-surface/utils/index.js +3 -3
- package/dist/_pkgs/affine-block-surface/view.d.ts +17 -0
- package/dist/_pkgs/affine-block-surface/view.js +60 -5
- package/dist/_pkgs/affine-block-surface-ref/components/index.d.ts +2 -2
- package/dist/_pkgs/affine-block-surface-ref/components/index.js +2 -2
- package/dist/_pkgs/affine-block-surface-ref/components/placeholder.js +2 -2
- package/dist/_pkgs/affine-block-surface-ref/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-surface-ref/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-surface-ref/effects.js +5 -5
- package/dist/_pkgs/affine-block-surface-ref/view.js +3 -3
- package/dist/_pkgs/affine-block-table/adapters/html.js +2 -2
- package/dist/_pkgs/affine-block-table/adapters/index.d.ts +5 -5
- package/dist/_pkgs/affine-block-table/adapters/index.js +5 -5
- package/dist/_pkgs/affine-block-table/adapters/markdown.js +1 -1
- package/dist/_pkgs/affine-block-table/add-button.d.ts +1 -1
- package/dist/_pkgs/affine-block-table/add-button.js +2 -2
- package/dist/_pkgs/affine-block-table/commands.js +1 -1
- package/dist/_pkgs/affine-block-table/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-table/effects.js +4 -4
- package/dist/_pkgs/affine-block-table/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-table/index.js +1 -1
- package/dist/_pkgs/affine-block-table/selection-controller.d.ts +8 -2
- package/dist/_pkgs/affine-block-table/selection-controller.js +27 -4
- package/dist/_pkgs/affine-block-table/selection-layer.d.ts +1 -1
- package/dist/_pkgs/affine-block-table/store.js +2 -2
- package/dist/_pkgs/affine-block-table/table-block.d.ts +2 -2
- package/dist/_pkgs/affine-block-table/table-block.js +11 -5
- package/dist/_pkgs/affine-block-table/table-cell.d.ts +2 -2
- package/dist/_pkgs/affine-block-table/table-cell.js +9 -10
- package/dist/_pkgs/affine-block-table/table-data-manager.d.ts +1 -1
- 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 +4 -2
- package/dist/_pkgs/affine-components/caption/captioned-block-component.js +2 -1
- package/dist/_pkgs/affine-components/card-style-dropdown-menu/dropdown-menu.js +1 -1
- package/dist/_pkgs/affine-components/card-style-dropdown-menu/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/card-style-dropdown-menu/index.js +2 -2
- package/dist/_pkgs/affine-components/citation/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/citation/index.js +2 -2
- package/dist/_pkgs/affine-components/color-picker/button.d.ts +2 -2
- package/dist/_pkgs/affine-components/color-picker/color-panel.js +2 -2
- package/dist/_pkgs/affine-components/color-picker/color-picker.js +1 -1
- package/dist/_pkgs/affine-components/color-picker/index.d.ts +9 -9
- package/dist/_pkgs/affine-components/color-picker/index.js +9 -9
- package/dist/_pkgs/affine-components/color-picker/utils.js +1 -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/index.d.ts +10 -10
- package/dist/_pkgs/affine-components/context-menu/index.js +15 -15
- 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 +12 -10
- package/dist/_pkgs/affine-components/context-menu/menu-all.js +5 -5
- 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/drop-indicator/file-drop-manager.d.ts +1 -1
- package/dist/_pkgs/affine-components/drop-indicator/file-drop-manager.js +2 -2
- package/dist/_pkgs/affine-components/drop-indicator/index.d.ts +2 -2
- package/dist/_pkgs/affine-components/drop-indicator/index.js +2 -2
- package/dist/_pkgs/affine-components/edgeless-line-styles-panel/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/edgeless-line-styles-panel/index.js +2 -2
- package/dist/_pkgs/affine-components/edgeless-line-width-panel/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/edgeless-line-width-panel/index.js +2 -2
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.d.ts +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/index.js +2 -2
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-create-modal.js +1 -1
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
- package/dist/_pkgs/affine-components/embed-card-modal/index.d.ts +2 -2
- package/dist/_pkgs/affine-components/embed-card-modal/index.js +4 -4
- package/dist/_pkgs/affine-components/filterable-list/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/filterable-list/index.js +1 -1
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/dropdown-menu.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/index.d.ts +3 -3
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/index.js +6 -6
- 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/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/icons/index.js +1 -1
- package/dist/_pkgs/affine-components/icons/text.js +426 -426
- package/dist/_pkgs/affine-components/link-preview/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/link-preview/index.js +2 -2
- package/dist/_pkgs/affine-components/linked-doc-title/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/linked-doc-title/index.js +2 -2
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.js +1 -1
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/index.js +2 -2
- package/dist/_pkgs/affine-components/portal/portal.d.ts +1 -1
- package/dist/_pkgs/affine-components/resource/index.d.ts +2 -2
- package/dist/_pkgs/affine-components/resource/index.js +3 -3
- package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.js +2 -2
- package/dist/_pkgs/affine-components/size-dropdown-menu/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/size-dropdown-menu/index.js +2 -2
- package/dist/_pkgs/affine-components/slider/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/slider/index.js +2 -2
- package/dist/_pkgs/affine-components/slider/slider.d.ts +1 -1
- package/dist/_pkgs/affine-components/slider/slider.js +2 -2
- package/dist/_pkgs/affine-components/slider/utils.d.ts +1 -1
- package/dist/_pkgs/affine-components/toolbar/config.d.ts +1 -1
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -0
- package/dist/_pkgs/affine-components/toolbar/toolbar.js +11 -10
- package/dist/_pkgs/affine-components/view-dropdown-menu/dropdown-menu.js +1 -1
- package/dist/_pkgs/affine-components/view-dropdown-menu/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/view-dropdown-menu/index.js +2 -2
- package/dist/_pkgs/affine-ext-loader/index.d.ts +4 -4
- package/dist/_pkgs/affine-ext-loader/index.js +4 -4
- package/dist/_pkgs/affine-ext-loader/manager.d.ts +1 -1
- package/dist/_pkgs/affine-ext-loader/store-manager.d.ts +1 -1
- package/dist/_pkgs/affine-ext-loader/store-manager.js +1 -1
- package/dist/_pkgs/affine-ext-loader/store-provider.d.ts +1 -1
- package/dist/_pkgs/affine-ext-loader/store-provider.js +1 -1
- package/dist/_pkgs/affine-ext-loader/view-manager.d.ts +2 -2
- package/dist/_pkgs/affine-ext-loader/view-manager.js +1 -1
- package/dist/_pkgs/affine-ext-loader/view-provider.d.ts +1 -1
- package/dist/_pkgs/affine-ext-loader/view-provider.js +1 -1
- package/dist/_pkgs/affine-foundation/view.js +13 -4
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.js +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/body/adapter-panel-body.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/body/adapter-panel-body.js +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/effects.js +4 -4
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-menu.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-menu.js +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-panel-header.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-panel-header.js +1 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/view.js +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/effects.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/effects.js +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/index.d.ts +2 -2
- package/dist/_pkgs/affine-fragment-doc-title/index.js +2 -2
- package/dist/_pkgs/affine-fragment-doc-title/utils.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/view.js +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-preview.js +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/effects.js +8 -8
- package/dist/_pkgs/affine-fragment-frame-panel/index.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/index.js +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/view.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/body/outline-notice.js +3 -3
- package/dist/_pkgs/affine-fragment-outline/body/outline-panel-body.js +4 -4
- package/dist/_pkgs/affine-fragment-outline/card/outline-card.js +2 -2
- package/dist/_pkgs/affine-fragment-outline/card/outline-preview.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/effects.js +9 -9
- package/dist/_pkgs/affine-fragment-outline/header/outline-panel-header.js +2 -2
- package/dist/_pkgs/affine-fragment-outline/header/outline-setting-menu.js +2 -2
- package/dist/_pkgs/affine-fragment-outline/outline-panel.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/view.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/adapter/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-brush/adapter/index.js +2 -2
- package/dist/_pkgs/affine-gfx-brush/effects.d.ts +3 -3
- package/dist/_pkgs/affine-gfx-brush/effects.js +3 -3
- package/dist/_pkgs/affine-gfx-brush/index.d.ts +8 -7
- package/dist/_pkgs/affine-gfx-brush/index.js +8 -7
- 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/store.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/eraser/eraser-tool-button.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/eraser/eraser-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/consts.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/consts.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-menu.d.ts +3 -3
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-menu.js +3 -3
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +3 -3
- package/dist/_pkgs/affine-gfx-brush/toolbar/configs/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/configs/index.js +2 -2
- package/dist/_pkgs/affine-gfx-brush/view.d.ts +14 -0
- package/dist/_pkgs/affine-gfx-brush/view.js +36 -10
- package/dist/_pkgs/affine-gfx-connector/adapter/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-connector/adapter/index.js +2 -2
- package/dist/_pkgs/affine-gfx-connector/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/adapter/plain-text/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/components/connector-handle.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +33 -7
- package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +7 -0
- package/dist/_pkgs/affine-gfx-connector/connector-tool.js +3 -2
- package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.d.ts +123 -0
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +281 -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 +187 -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 +6 -4
- package/dist/_pkgs/affine-gfx-connector/effects.js +6 -4
- package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.js +78 -41
- package/dist/_pkgs/affine-gfx-connector/element-transform/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-connector/element-transform/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/index.d.ts +11 -10
- package/dist/_pkgs/affine-gfx-connector/index.js +11 -10
- package/dist/_pkgs/affine-gfx-connector/store.js +2 -2
- package/dist/_pkgs/affine-gfx-connector/text/text.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.d.ts +50 -0
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +69 -3
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-dense-menu.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-menu.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-menu.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-tool-button.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/view/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-connector/view/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/view/view.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/view.js +25 -9
- package/dist/_pkgs/affine-gfx-group/adapter/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-group/adapter/index.js +2 -2
- package/dist/_pkgs/affine-gfx-group/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-group/adapter/plain-text/index.js +1 -1
- package/dist/_pkgs/affine-gfx-group/command/group-api.js +150 -62
- package/dist/_pkgs/affine-gfx-group/command/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-group/command/index.js +1 -1
- package/dist/_pkgs/affine-gfx-group/effects.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-group/effects.js +1 -1
- package/dist/_pkgs/affine-gfx-group/element-view.js +1 -1
- package/dist/_pkgs/affine-gfx-group/index.d.ts +6 -6
- package/dist/_pkgs/affine-gfx-group/index.js +6 -6
- package/dist/_pkgs/affine-gfx-group/store.js +2 -2
- package/dist/_pkgs/affine-gfx-group/text/edgeless-group-title-editor.js +5 -2
- package/dist/_pkgs/affine-gfx-group/text/text.js +1 -1
- package/dist/_pkgs/affine-gfx-group/toolbar/config.js +2 -2
- package/dist/_pkgs/affine-gfx-group/view.js +5 -5
- package/dist/_pkgs/affine-gfx-link/effects.js +1 -1
- package/dist/_pkgs/affine-gfx-link/undo-tool.js +1 -1
- package/dist/_pkgs/affine-gfx-link/view.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/adapter/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/adapter/index.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/adapter/plain-text/index.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/effects.d.ts +3 -3
- package/dist/_pkgs/affine-gfx-mindmap/effects.js +3 -3
- package/dist/_pkgs/affine-gfx-mindmap/index.d.ts +9 -9
- package/dist/_pkgs/affine-gfx-mindmap/index.js +9 -9
- package/dist/_pkgs/affine-gfx-mindmap/indicator-overlay/index.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/interactivity/drag-utils.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/interactivity/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/interactivity/index.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/interactivity/mind-map-drag.js +4 -4
- package/dist/_pkgs/affine-gfx-mindmap/store.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/senior-tool.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/view/index.d.ts +4 -4
- package/dist/_pkgs/affine-gfx-mindmap/view/index.js +4 -4
- package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +2 -2
- package/dist/_pkgs/affine-gfx-mindmap/view.js +8 -8
- package/dist/_pkgs/affine-gfx-note/components/note-shadow-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-note/effects.d.ts +5 -5
- package/dist/_pkgs/affine-gfx-note/effects.js +5 -5
- package/dist/_pkgs/affine-gfx-note/index.d.ts +3 -3
- package/dist/_pkgs/affine-gfx-note/index.js +3 -3
- package/dist/_pkgs/affine-gfx-note/note-tool.js +1 -1
- package/dist/_pkgs/affine-gfx-note/overlay/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-note/overlay/index.js +2 -2
- package/dist/_pkgs/affine-gfx-note/view.js +3 -3
- package/dist/_pkgs/affine-gfx-pointer/effects.js +1 -1
- package/dist/_pkgs/affine-gfx-pointer/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-pointer/index.js +1 -1
- package/dist/_pkgs/affine-gfx-pointer/quick-tool/default-tool-button.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-pointer/quick-tool/default-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-pointer/snap/snap-manager.d.ts +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-pointer/view.js +5 -5
- package/dist/_pkgs/affine-gfx-shape/adapter/index.d.ts +3 -3
- package/dist/_pkgs/affine-gfx-shape/adapter/index.js +3 -3
- package/dist/_pkgs/affine-gfx-shape/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/adapter/plain-text/index.js +1 -1
- 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/components/shape-panel.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/components/shape-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/draggable/index.d.ts +4 -4
- package/dist/_pkgs/affine-gfx-shape/draggable/index.js +4 -4
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-menu.js +3 -3
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-tool-element.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/effects.d.ts +4 -4
- package/dist/_pkgs/affine-gfx-shape/effects.js +4 -4
- package/dist/_pkgs/affine-gfx-shape/element-renderer/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-shape/element-renderer/index.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/index.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape-dom/index.js +49 -20
- package/dist/_pkgs/affine-gfx-shape/element-view.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-view.js +3 -3
- package/dist/_pkgs/affine-gfx-shape/index.d.ts +12 -12
- package/dist/_pkgs/affine-gfx-shape/index.js +12 -12
- package/dist/_pkgs/affine-gfx-shape/overlay/diamond.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/diamond.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/ellipse.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/ellipse.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/factory.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/factory.js +6 -6
- package/dist/_pkgs/affine-gfx-shape/overlay/index.d.ts +5 -5
- package/dist/_pkgs/affine-gfx-shape/overlay/index.js +5 -5
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/rect.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/rect.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/rounded-rect.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/rounded-rect.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/triangle.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/triangle.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/store.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 -13
- package/dist/_pkgs/affine-gfx-shape/text/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-shape/text/index.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/toolbar/config.js +6 -6
- package/dist/_pkgs/affine-gfx-shape/toolbar/index.d.ts +4 -4
- package/dist/_pkgs/affine-gfx-shape/toolbar/index.js +4 -4
- package/dist/_pkgs/affine-gfx-shape/toolbar/shape-menu-config.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/view.js +10 -10
- package/dist/_pkgs/affine-gfx-template/effects.d.ts +4 -4
- package/dist/_pkgs/affine-gfx-template/effects.js +4 -4
- package/dist/_pkgs/affine-gfx-template/services/template.js +1 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-tool-button.d.ts +3 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-tool-button.js +19 -2
- package/dist/_pkgs/affine-gfx-template/view.js +3 -3
- package/dist/_pkgs/affine-gfx-text/adapter/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-text/adapter/index.js +2 -2
- package/dist/_pkgs/affine-gfx-text/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-text/adapter/plain-text/index.js +1 -1
- package/dist/_pkgs/affine-gfx-text/dblclick-add-edgeless-text.js +2 -2
- package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.js +10 -6
- package/dist/_pkgs/affine-gfx-text/effects.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-text/effects.js +2 -2
- package/dist/_pkgs/affine-gfx-text/element-renderer/index.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-text/element-renderer/index.js +1 -1
- package/dist/_pkgs/affine-gfx-text/element-view.js +2 -2
- package/dist/_pkgs/affine-gfx-text/index.d.ts +7 -7
- package/dist/_pkgs/affine-gfx-text/index.js +7 -7
- package/dist/_pkgs/affine-gfx-text/store.js +1 -1
- package/dist/_pkgs/affine-gfx-text/tool.js +2 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/config.js +2 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/index.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/index.js +2 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/text-menu.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/text-menu.js +1 -1
- package/dist/_pkgs/affine-gfx-text/view.js +6 -6
- package/dist/_pkgs/affine-gfx-turbo-renderer/index.d.ts +5 -5
- package/dist/_pkgs/affine-gfx-turbo-renderer/index.js +5 -5
- package/dist/_pkgs/affine-gfx-turbo-renderer/layout/block-layout-provider.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/painter/painter.worker.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/renderer-utils.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/renderer-utils.js +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/text-utils.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/turbo-renderer.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-turbo-renderer/turbo-renderer.js +1 -1
- package/dist/_pkgs/affine-inline-comment/effects.d.ts +1 -1
- package/dist/_pkgs/affine-inline-comment/effects.js +1 -1
- package/dist/_pkgs/affine-inline-comment/index.d.ts +2 -2
- package/dist/_pkgs/affine-inline-comment/index.js +2 -2
- package/dist/_pkgs/affine-inline-comment/inline-comment-manager.js +2 -2
- package/dist/_pkgs/affine-inline-comment/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-comment/view.js +3 -3
- package/dist/_pkgs/affine-inline-footnote/adapters/index.d.ts +3 -3
- package/dist/_pkgs/affine-inline-footnote/adapters/index.js +3 -3
- package/dist/_pkgs/affine-inline-footnote/effects.d.ts +3 -3
- package/dist/_pkgs/affine-inline-footnote/effects.js +3 -3
- package/dist/_pkgs/affine-inline-footnote/footnote-node/footnote-node.d.ts +2 -2
- package/dist/_pkgs/affine-inline-footnote/footnote-node/footnote-popup.d.ts +1 -1
- package/dist/_pkgs/affine-inline-footnote/index.d.ts +2 -2
- package/dist/_pkgs/affine-inline-footnote/index.js +2 -2
- package/dist/_pkgs/affine-inline-footnote/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-footnote/store.js +1 -1
- package/dist/_pkgs/affine-inline-footnote/view.js +2 -2
- package/dist/_pkgs/affine-inline-latex/adapters/index.d.ts +3 -3
- package/dist/_pkgs/affine-inline-latex/adapters/index.js +3 -3
- package/dist/_pkgs/affine-inline-latex/command.js +46 -26
- package/dist/_pkgs/affine-inline-latex/effects.d.ts +3 -3
- package/dist/_pkgs/affine-inline-latex/effects.js +3 -3
- package/dist/_pkgs/affine-inline-latex/index.d.ts +4 -4
- package/dist/_pkgs/affine-inline-latex/index.js +4 -4
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-editor-menu.js +1 -1
- 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-latex/store.js +1 -1
- package/dist/_pkgs/affine-inline-latex/view.js +3 -3
- package/dist/_pkgs/affine-inline-link/adapters/index.d.ts +6 -6
- package/dist/_pkgs/affine-inline-link/adapters/index.js +6 -6
- package/dist/_pkgs/affine-inline-link/adapters/markdown/index.d.ts +2 -2
- package/dist/_pkgs/affine-inline-link/adapters/markdown/index.js +2 -2
- package/dist/_pkgs/affine-inline-link/command.js +1 -1
- package/dist/_pkgs/affine-inline-link/effects.js +2 -2
- package/dist/_pkgs/affine-inline-link/index.d.ts +6 -6
- package/dist/_pkgs/affine-inline-link/index.js +6 -6
- package/dist/_pkgs/affine-inline-link/link-node/affine-link.js +4 -1
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-inline-link/link-node/link-popup/link-popup.js +1 -1
- package/dist/_pkgs/affine-inline-link/link-node/link-popup/toggle-link-popup.d.ts +1 -1
- package/dist/_pkgs/affine-inline-link/link-node/link-popup/toggle-link-popup.js +1 -1
- package/dist/_pkgs/affine-inline-link/store.js +1 -1
- package/dist/_pkgs/affine-inline-link/view.js +3 -3
- package/dist/_pkgs/affine-inline-mention/effects.d.ts +1 -1
- package/dist/_pkgs/affine-inline-mention/effects.js +1 -1
- package/dist/_pkgs/affine-inline-mention/index.d.ts +3 -3
- package/dist/_pkgs/affine-inline-mention/index.js +3 -3
- package/dist/_pkgs/affine-inline-mention/view.js +2 -2
- package/dist/_pkgs/affine-inline-preset/adapters/extensions.d.ts +5 -5
- package/dist/_pkgs/affine-inline-preset/adapters/extensions.js +10 -10
- 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/default-inline-manager.js +1 -1
- package/dist/_pkgs/affine-inline-preset/effects.d.ts +1 -1
- package/dist/_pkgs/affine-inline-preset/effects.js +1 -1
- package/dist/_pkgs/affine-inline-preset/index.d.ts +6 -6
- package/dist/_pkgs/affine-inline-preset/index.js +6 -6
- package/dist/_pkgs/affine-inline-preset/store.js +1 -1
- package/dist/_pkgs/affine-inline-preset/view.js +4 -4
- package/dist/_pkgs/affine-inline-reference/adapters/index.d.ts +3 -3
- package/dist/_pkgs/affine-inline-reference/adapters/index.js +3 -3
- package/dist/_pkgs/affine-inline-reference/effects.d.ts +1 -1
- package/dist/_pkgs/affine-inline-reference/effects.js +1 -1
- package/dist/_pkgs/affine-inline-reference/index.d.ts +5 -5
- package/dist/_pkgs/affine-inline-reference/index.js +5 -5
- package/dist/_pkgs/affine-inline-reference/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/index.d.ts +6 -6
- package/dist/_pkgs/affine-inline-reference/reference-node/index.js +5 -5
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-config.d.ts +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.d.ts +2 -2
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-popup/toggle-reference-popup.d.ts +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-popup/toggle-reference-popup.js +1 -1
- package/dist/_pkgs/affine-inline-reference/store.js +1 -1
- package/dist/_pkgs/affine-inline-reference/toolbar.js +1 -1
- package/dist/_pkgs/affine-inline-reference/view.js +4 -4
- package/dist/_pkgs/affine-model/blocks/callout/callout-model.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/code/code-model.d.ts +2 -1
- package/dist/_pkgs/affine-model/blocks/code/code-model.js +1 -0
- package/dist/_pkgs/affine-model/blocks/edgeless-text/edgeless-text-model.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/edgeless-text/edgeless-text-model.js +3 -3
- package/dist/_pkgs/affine-model/blocks/embed/iframe/iframe-schema.d.ts +2 -2
- package/dist/_pkgs/affine-model/blocks/embed/iframe/iframe-schema.js +1 -1
- package/dist/_pkgs/affine-model/blocks/embed/iframe/index.d.ts +2 -2
- package/dist/_pkgs/affine-model/blocks/embed/iframe/index.js +2 -2
- package/dist/_pkgs/affine-model/blocks/embed/index.d.ts +9 -9
- package/dist/_pkgs/affine-model/blocks/embed/index.js +9 -9
- package/dist/_pkgs/affine-model/blocks/embed/types.d.ts +9 -9
- package/dist/_pkgs/affine-model/blocks/embed/types.js +6 -6
- package/dist/_pkgs/affine-model/blocks/index.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/index.js +1 -1
- package/dist/_pkgs/affine-model/blocks/list/list-model.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/note/note-model.d.ts +2 -2
- package/dist/_pkgs/affine-model/blocks/note/note-model.js +2 -2
- package/dist/_pkgs/affine-model/blocks/paragraph/paragraph-model.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/table/index.d.ts +1 -1
- package/dist/_pkgs/affine-model/blocks/table/index.js +1 -1
- package/dist/_pkgs/affine-model/blocks/table/table-model.d.ts +1 -1
- package/dist/_pkgs/affine-model/elements/brush/brush.d.ts +1 -1
- package/dist/_pkgs/affine-model/elements/brush/brush.js +1 -1
- package/dist/_pkgs/affine-model/elements/connector/connector.d.ts +2 -2
- package/dist/_pkgs/affine-model/elements/connector/connector.js +26 -2
- package/dist/_pkgs/affine-model/elements/connector/local-connector.d.ts +2 -2
- package/dist/_pkgs/affine-model/elements/connector/local-connector.js +2 -2
- 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/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/highlighter/highlighter.d.ts +1 -1
- package/dist/_pkgs/affine-model/elements/highlighter/highlighter.js +2 -2
- package/dist/_pkgs/affine-model/elements/highlighter/index.d.ts +1 -1
- package/dist/_pkgs/affine-model/elements/highlighter/index.js +1 -1
- package/dist/_pkgs/affine-model/elements/index.d.ts +3 -1
- package/dist/_pkgs/affine-model/elements/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/mindmap/index.d.ts +3 -3
- package/dist/_pkgs/affine-model/elements/mindmap/index.js +3 -3
- package/dist/_pkgs/affine-model/elements/mindmap/mindmap.js +10 -5
- package/dist/_pkgs/affine-model/elements/mindmap/snapshot/index.d.ts +2 -2
- package/dist/_pkgs/affine-model/elements/mindmap/snapshot/index.js +2 -2
- package/dist/_pkgs/affine-model/elements/mindmap/snapshot/utils.d.ts +1 -1
- package/dist/_pkgs/affine-model/elements/mindmap/style.d.ts +10 -0
- package/dist/_pkgs/affine-model/elements/mindmap/style.js +10 -2
- package/dist/_pkgs/affine-model/elements/text/text.d.ts +2 -2
- package/dist/_pkgs/affine-model/elements/text/text.js +2 -2
- 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-model/themes/default.d.ts +1 -1
- package/dist/_pkgs/affine-model/themes/default.js +1 -1
- package/dist/_pkgs/affine-model/themes/index.d.ts +4 -4
- package/dist/_pkgs/affine-model/themes/index.js +4 -4
- package/dist/_pkgs/affine-model/themes/types.js +1 -1
- package/dist/_pkgs/affine-model/themes/utils.d.ts +2 -2
- package/dist/_pkgs/affine-model/utils/helper.d.ts +1 -1
- package/dist/_pkgs/affine-model/utils/types.d.ts +1 -1
- package/dist/_pkgs/affine-rich-text/index.d.ts +4 -4
- package/dist/_pkgs/affine-rich-text/index.js +4 -4
- package/dist/_pkgs/affine-rich-text/utils.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/attachment.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/clipboard/index.d.ts +2 -2
- package/dist/_pkgs/affine-shared/adapters/clipboard/index.js +2 -2
- package/dist/_pkgs/affine-shared/adapters/html/html.d.ts +3 -3
- package/dist/_pkgs/affine-shared/adapters/html/html.js +5 -5
- package/dist/_pkgs/affine-shared/adapters/html/rehype-plugins/index.d.ts +2 -2
- package/dist/_pkgs/affine-shared/adapters/html/rehype-plugins/index.js +2 -2
- package/dist/_pkgs/affine-shared/adapters/html/rehype-plugins/inline-to-block.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/html/rehype-plugins/wrap-inline-element.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/image.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/index.d.ts +12 -12
- package/dist/_pkgs/affine-shared/adapters/index.js +12 -12
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.d.ts +6 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +160 -2
- package/dist/_pkgs/affine-shared/adapters/markdown/markdown.d.ts +5 -5
- package/dist/_pkgs/affine-shared/adapters/markdown/markdown.js +11 -7
- package/dist/_pkgs/affine-shared/adapters/markdown/preprocessor.d.ts +2 -2
- package/dist/_pkgs/affine-shared/adapters/markdown/preprocessor.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/remark-plugins/index.d.ts +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/remark-plugins/index.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/middlewares/index.d.ts +12 -12
- package/dist/_pkgs/affine-shared/adapters/middlewares/index.js +12 -12
- package/dist/_pkgs/affine-shared/adapters/middlewares/paste.js +4 -4
- package/dist/_pkgs/affine-shared/adapters/middlewares/proxy.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/middlewares/replace-id.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/mix-text.js +2 -2
- package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/notion-html.d.ts +2 -2
- package/dist/_pkgs/affine-shared/adapters/notion-html/notion-html.js +4 -4
- package/dist/_pkgs/affine-shared/adapters/notion-text.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/plain-text.d.ts +3 -3
- package/dist/_pkgs/affine-shared/adapters/plain-text/plain-text.js +3 -3
- package/dist/_pkgs/affine-shared/adapters/types/delta-converter.d.ts +2 -1
- package/dist/_pkgs/affine-shared/adapters/utils/color.d.ts +24 -0
- package/dist/_pkgs/affine-shared/adapters/utils/color.js +280 -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/adapters/utils/text.js +1 -1
- package/dist/_pkgs/affine-shared/commands/block-crud/get-selected-blocks.js +10 -2
- package/dist/_pkgs/affine-shared/commands/model-crud/duplicate-selected-model.js +1 -1
- package/dist/_pkgs/affine-shared/commands/model-crud/get-selected-models.js +2 -2
- package/dist/_pkgs/affine-shared/commands/model-crud/replace-selected-text-with-blocks.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/get-block-selections.d.ts +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/get-surface-selection.d.ts +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/get-text-selection.d.ts +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/index.d.ts +6 -6
- package/dist/_pkgs/affine-shared/commands/selection/index.js +6 -6
- package/dist/_pkgs/affine-shared/commands/selection/is-nothing-selected.d.ts +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/is-nothing-selected.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/types.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/audit-service.d.ts +300 -0
- package/dist/_pkgs/affine-shared/services/audit-service.js +228 -0
- package/dist/_pkgs/affine-shared/services/block-meta-service.js +2 -2
- package/dist/_pkgs/affine-shared/services/citation-service/citation-service.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/citation-service/citation-service.js +2 -2
- package/dist/_pkgs/affine-shared/services/citation-service/index.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/citation-service/index.js +1 -1
- package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +5 -5
- package/dist/_pkgs/affine-shared/services/comment-service/index.d.ts +3 -3
- package/dist/_pkgs/affine-shared/services/comment-service/index.js +3 -3
- package/dist/_pkgs/affine-shared/services/comment-service/utils.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/comment-service/utils.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 +13 -2
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-service.js +1 -1
- package/dist/_pkgs/affine-shared/services/embed-iframe/index.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/embed-iframe/index.js +2 -2
- 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 +37 -32
- package/dist/_pkgs/affine-shared/services/index.js +37 -32
- package/dist/_pkgs/affine-shared/services/link-preview-service/index.d.ts +3 -3
- package/dist/_pkgs/affine-shared/services/link-preview-service/index.js +3 -3
- package/dist/_pkgs/affine-shared/services/link-preview-service/link-preview-cache.js +2 -2
- package/dist/_pkgs/affine-shared/services/link-preview-service/link-preview-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/link-preview-service/link-preview-service.js +3 -3
- package/dist/_pkgs/affine-shared/services/page-viewport-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.d.ts +129 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +311 -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/citation.d.ts +1 -1
- 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 +182 -0
- 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/theme-service.js +1 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.d.ts +11 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/config.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/toolbar-service/context.d.ts +6 -6
- package/dist/_pkgs/affine-shared/services/toolbar-service/context.js +6 -6
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.d.ts +7 -6
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.js +7 -6
- 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/module.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +4 -4
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +1 -1
- 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 +254 -0
- package/dist/_pkgs/affine-shared/services/user-service/index.d.ts +4 -4
- package/dist/_pkgs/affine-shared/services/user-service/index.js +4 -4
- package/dist/_pkgs/affine-shared/services/user-service/user-list-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/user-service/user-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/user-service/writer-info-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/viewport-element-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/styles/index.d.ts +4 -4
- package/dist/_pkgs/affine-shared/styles/index.js +4 -4
- package/dist/_pkgs/affine-shared/styles/panel.js +2 -2
- package/dist/_pkgs/affine-shared/styles/text.d.ts +1 -1
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
- package/dist/_pkgs/affine-shared/test-utils/index.d.ts +3 -3
- package/dist/_pkgs/affine-shared/test-utils/index.js +3 -3
- package/dist/_pkgs/affine-shared/types/index.d.ts +1 -1
- package/dist/_pkgs/affine-shared/types/index.js +1 -1
- package/dist/_pkgs/affine-shared/utils/computing.js +2 -2
- 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/drag-helper/cell-select.d.ts +1 -1
- package/dist/_pkgs/affine-shared/utils/drag-helper/index.d.ts +3 -3
- package/dist/_pkgs/affine-shared/utils/drag-helper/index.js +3 -3
- package/dist/_pkgs/affine-shared/utils/drag-helper/linear-move.d.ts +1 -1
- package/dist/_pkgs/affine-shared/utils/index.d.ts +27 -27
- package/dist/_pkgs/affine-shared/utils/index.js +27 -27
- package/dist/_pkgs/affine-shared/utils/popper-position.js +1 -1
- 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/reference.js +1 -1
- package/dist/_pkgs/affine-shared/utils/virtual-padding.js +1 -1
- package/dist/_pkgs/affine-shared/utils/zod-schema.d.ts +7 -0
- package/dist/_pkgs/affine-shared/utils/zod-schema.js +27 -1
- package/dist/_pkgs/affine-widget-drag-handle/effects.js +3 -3
- package/dist/_pkgs/affine-widget-drag-handle/index.d.ts +4 -4
- package/dist/_pkgs/affine-widget-drag-handle/index.js +4 -4
- package/dist/_pkgs/affine-widget-drag-handle/view.js +2 -2
- package/dist/_pkgs/affine-widget-drag-handle/watchers/drag-event-watcher.js +3 -3
- 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 +26 -5
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/effects.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/view.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/effects.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/index.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/view.js +2 -2
- 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/effects.js +4 -4
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/index.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/spec.js +2 -2
- 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-selected-rect/view.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.d.ts +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +7 -7
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +7 -7
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +8 -7
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +8 -7
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +38 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +99 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/slide-menu.d.ts +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/slide-menu.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/mixins/index.d.ts +3 -3
- package/dist/_pkgs/affine-widget-edgeless-toolbar/mixins/index.js +3 -3
- package/dist/_pkgs/affine-widget-edgeless-toolbar/mixins/tool.mixin.d.ts +3 -3
- package/dist/_pkgs/affine-widget-edgeless-toolbar/mixins/tool.mixin.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/effects.js +3 -3
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/view.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/zoom-toolbar.js +1 -1
- package/dist/_pkgs/affine-widget-frame-title/edgeless-frame-title-editor.js +6 -3
- package/dist/_pkgs/affine-widget-frame-title/mount-frame-title-editor.js +1 -1
- package/dist/_pkgs/affine-widget-frame-title/view.js +2 -2
- package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
- package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-toolbar.d.ts +2 -2
- package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-toolbar.js +3 -3
- package/dist/_pkgs/affine-widget-keyboard-toolbar/view.js +2 -2
- package/dist/_pkgs/affine-widget-linked-doc/config.d.ts +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/index.d.ts +4 -4
- package/dist/_pkgs/affine-widget-linked-doc/index.js +4 -4
- package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +3 -16
- 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-linked-doc/view.d.ts +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/view.js +3 -3
- package/dist/_pkgs/affine-widget-note-slicer/effects.js +1 -1
- package/dist/_pkgs/affine-widget-note-slicer/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-note-slicer/index.js +1 -1
- package/dist/_pkgs/affine-widget-note-slicer/view.js +2 -2
- package/dist/_pkgs/affine-widget-page-dragging-area/effects.js +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/view.js +2 -2
- package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +3 -3
- package/dist/_pkgs/affine-widget-remote-selection/edgeless/index.js +7 -5
- package/dist/_pkgs/affine-widget-remote-selection/effects.js +3 -3
- package/dist/_pkgs/affine-widget-remote-selection/index.d.ts +2 -2
- package/dist/_pkgs/affine-widget-remote-selection/index.js +4 -4
- package/dist/_pkgs/affine-widget-remote-selection/manager/remote-color-manager.js +1 -1
- package/dist/_pkgs/affine-widget-remote-selection/view.js +2 -2
- package/dist/_pkgs/affine-widget-scroll-anchoring/view.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/config.d.ts +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/config.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/effects.d.ts +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/effects.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/extensions.d.ts +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/extensions.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/index.d.ts +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/index.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/slash-menu-popover.js +10 -6
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/index.js +8 -8
- package/dist/_pkgs/affine-widget-slash-menu/utils.d.ts +10 -1
- package/dist/_pkgs/affine-widget-slash-menu/utils.js +24 -0
- package/dist/_pkgs/affine-widget-slash-menu/view.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/widget.d.ts +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/widget.js +5 -5
- package/dist/_pkgs/affine-widget-toolbar/effects.d.ts +1 -1
- package/dist/_pkgs/affine-widget-toolbar/effects.js +1 -1
- package/dist/_pkgs/affine-widget-toolbar/index.d.ts +1 -1
- package/dist/_pkgs/affine-widget-toolbar/index.js +2 -2
- package/dist/_pkgs/affine-widget-toolbar/toolbar.d.ts +6 -0
- package/dist/_pkgs/affine-widget-toolbar/toolbar.js +37 -9
- package/dist/_pkgs/affine-widget-toolbar/utils.d.ts +146 -3
- package/dist/_pkgs/affine-widget-toolbar/utils.js +743 -61
- package/dist/_pkgs/affine-widget-toolbar/view.js +2 -2
- package/dist/_pkgs/affine-widget-viewport-overlay/effects.js +1 -1
- package/dist/_pkgs/affine-widget-viewport-overlay/view.js +2 -2
- 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 +5 -3
- 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/index.d.ts +1 -1
- package/dist/_pkgs/data-view/core/index.js +1 -1
- package/dist/_pkgs/data-view/core/property/utils.d.ts +2 -2
- package/dist/_pkgs/data-view/core/types.d.ts +1 -1
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/_pkgs/data-view/core/view-manager/index.d.ts +3 -3
- package/dist/_pkgs/data-view/core/view-manager/index.js +3 -3
- 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 +68 -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 +837 -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 +4 -2
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/cell.js +2 -2
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/kanban-view-ui-logic.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/kanban/pc/cell.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/kanban/pc/controller/selection.d.ts +1 -1
- 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 +3 -3
- 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 +87 -4
- package/dist/_pkgs/data-view/view-presets/table/mobile/table-view-ui-logic.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/cell.d.ts +4 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/cell.js +12 -3
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/clipboard.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/drag-to-fill.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/drag-to-fill.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.d.ts +3 -2
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.js +40 -34
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/selection.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/selection.js +1 -1
- 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 +85 -6
- package/dist/_pkgs/data-view/view-presets/table/pc/header/column-header.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/menu.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row-select-checkbox.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row-select-checkbox.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc/table-view-style.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/table-view-ui-logic.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/table-view-ui-logic.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/clipboard.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/drag-to-fill.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/drag-to-fill.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/drag.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.d.ts +3 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.js +41 -35
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/selection.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/selection.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/effect.js +17 -17
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/group-footer.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/group-footer.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-bar.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-bar.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-column.d.ts +3 -3
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-column.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-header.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-header.js +3 -3
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +20 -20
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/column-header-css.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/column-header.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/column-header.js +4 -4
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/column-move-preview.d.ts +3 -3
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/number-format-bar.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/number-format-bar.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/single-column-header.d.ts +3 -3
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/single-column-header.js +11 -11
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/vertical-indicator.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/vertical-indicator.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.d.ts +8 -5
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.js +12 -4
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/menu.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/menu.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/types.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/virtual/batch-task-manager.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/virtual/batch-task-manager.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/virtual/virtual-scroll.d.ts +2 -2
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/virtual/virtual-scroll.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/renderer.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/table-view-manager.js +4 -2
- package/dist/_pkgs/data-view/view-presets/table/utils.d.ts +4 -1
- package/dist/_pkgs/data-view/view-presets/table/utils.js +17 -2
- 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/index.d.ts +2 -2
- package/dist/_pkgs/std/clipboard/index.js +2 -2
- package/dist/_pkgs/std/clipboard/utils.d.ts +5 -0
- package/dist/_pkgs/std/clipboard/utils.js +7 -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 +321 -0
- package/dist/_pkgs/std/extension/command-registry.js +233 -0
- package/dist/_pkgs/std/extension/dnd/index.d.ts +7 -7
- package/dist/_pkgs/std/extension/dnd/index.js +8 -8
- package/dist/_pkgs/std/extension/dnd/types.d.ts +3 -3
- package/dist/_pkgs/std/extension/editor-life-cycle.d.ts +2 -2
- package/dist/_pkgs/std/extension/editor-life-cycle.js +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/translation-manifest.d.ts +49 -0
- package/dist/_pkgs/std/extension/translation-manifest.js +71 -0
- package/dist/_pkgs/std/gfx/controller.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/event.d.ts +1 -1
- package/dist/_pkgs/std/gfx/interactivity/extension/view.d.ts +6 -6
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.d.ts +1 -1
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +7 -2
- 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/interactivity/resize/manager.d.ts +2 -2
- package/dist/_pkgs/std/gfx/interactivity/types/clone.d.ts +1 -1
- package/dist/_pkgs/std/gfx/interactivity/types/drag.d.ts +3 -3
- package/dist/_pkgs/std/gfx/interactivity/types/resize.d.ts +2 -2
- package/dist/_pkgs/std/gfx/interactivity/types/select.d.ts +1 -1
- package/dist/_pkgs/std/gfx/layer.d.ts +1 -1
- package/dist/_pkgs/std/gfx/layer.js +2 -3
- 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 +282 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +437 -26
- 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 +115 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.d.ts +70 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +304 -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-element.d.ts +3 -3
- package/dist/_pkgs/std/gfx/viewport-element.js +5 -5
- package/dist/_pkgs/std/gfx/viewport.d.ts +13 -1
- package/dist/_pkgs/std/gfx/viewport.js +20 -2
- package/dist/_pkgs/std/inline/extensions/index.d.ts +4 -4
- package/dist/_pkgs/std/inline/extensions/index.js +4 -4
- package/dist/_pkgs/std/inline/index.d.ts +8 -8
- package/dist/_pkgs/std/inline/index.js +8 -8
- package/dist/_pkgs/std/inline/range/active.js +1 -1
- package/dist/_pkgs/std/inline/range/range-binding.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/history/history-extension.d.ts +2 -2
- package/dist/_pkgs/store/extension/history/history-extension.js +1 -1
- package/dist/_pkgs/store/extension/history/index.d.ts +1 -1
- package/dist/_pkgs/store/extension/history/index.js +1 -1
- package/dist/_pkgs/store/extension/index.d.ts +6 -6
- package/dist/_pkgs/store/extension/index.js +6 -6
- package/dist/_pkgs/store/extension/schema.d.ts +2 -2
- package/dist/_pkgs/store/extension/selection/base.d.ts +1 -1
- package/dist/_pkgs/store/extension/selection/identifier.d.ts +2 -2
- package/dist/_pkgs/store/extension/selection/index.d.ts +4 -4
- package/dist/_pkgs/store/extension/selection/index.js +4 -4
- package/dist/_pkgs/store/extension/selection/selection-extension.d.ts +3 -3
- package/dist/_pkgs/store/extension/selection/selection-extension.js +3 -3
- package/dist/_pkgs/store/extension/selection/types.d.ts +1 -1
- package/dist/_pkgs/store/extension/store-extension.d.ts +2 -2
- package/dist/_pkgs/store/extension/store-extension.js +2 -2
- package/dist/_pkgs/store/extension/workspace/doc.d.ts +2 -2
- package/dist/_pkgs/store/extension/workspace/index.d.ts +3 -3
- package/dist/_pkgs/store/extension/workspace/index.js +3 -3
- package/dist/_pkgs/store/extension/workspace/workspace-meta.d.ts +10 -0
- package/dist/_pkgs/store/extension/workspace/workspace.d.ts +1 -1
- package/dist/_pkgs/store/impls/doc.d.ts +45 -0
- package/dist/_pkgs/store/impls/doc.js +110 -0
- package/dist/_pkgs/store/impls/index.d.ts +4 -0
- package/dist/_pkgs/store/impls/index.js +4 -0
- package/dist/_pkgs/store/impls/workspace-base.d.ts +81 -0
- package/dist/_pkgs/store/impls/workspace-base.js +143 -0
- package/dist/_pkgs/store/impls/workspace-meta.d.ts +33 -0
- package/dist/_pkgs/store/impls/workspace-meta.js +125 -0
- package/dist/_pkgs/store/impls/workspace.d.ts +14 -0
- package/dist/_pkgs/store/impls/workspace.js +14 -0
- package/dist/_pkgs/store/index.d.ts +9 -8
- package/dist/_pkgs/store/index.js +9 -8
- package/dist/_pkgs/store/model/block/flat-sync-controller.js +2 -12
- package/dist/_pkgs/store/model/store/crud.js +7 -4
- package/dist/_pkgs/store/model/store/identifier.d.ts +1 -1
- package/dist/_pkgs/store/model/store-container.d.ts +2 -2
- package/dist/_pkgs/store/model/store-container.js +2 -2
- package/dist/_pkgs/store/reactive/base-reactive-data.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/index.d.ts +4 -4
- package/dist/_pkgs/store/reactive/flat-native-y/index.js +31 -9
- package/dist/_pkgs/store/reactive/flat-native-y/initialize.d.ts +2 -2
- package/dist/_pkgs/store/reactive/flat-native-y/initialize.js +3 -3
- package/dist/_pkgs/store/reactive/flat-native-y/proxy.d.ts +2 -2
- package/dist/_pkgs/store/reactive/flat-native-y/proxy.js +5 -5
- package/dist/_pkgs/store/reactive/flat-native-y/signal-updater.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/signal-updater.js +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/types.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/utils.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/utils.js +3 -3
- package/dist/_pkgs/store/reactive/flat-native-y/y-event-handler.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/y-event-handler.js +2 -2
- package/dist/_pkgs/store/reactive/flat-native-y/y-map-updater.d.ts +1 -1
- package/dist/_pkgs/store/reactive/flat-native-y/y-map-updater.js +3 -3
- package/dist/_pkgs/store/reactive/memory.d.ts +1 -1
- package/dist/_pkgs/store/reactive/stash-pop.js +1 -1
- package/dist/_pkgs/store/reactive/text/index.d.ts +3 -3
- package/dist/_pkgs/store/reactive/text/index.js +3 -3
- package/dist/_pkgs/store/reactive/text/text.d.ts +2 -2
- package/dist/_pkgs/store/reactive/text/types.d.ts +1 -1
- package/dist/_pkgs/store/test/test-doc.d.ts +1 -45
- package/dist/_pkgs/store/test/test-doc.js +1 -110
- package/dist/_pkgs/store/test/test-meta.d.ts +1 -33
- package/dist/_pkgs/store/test/test-meta.js +1 -125
- package/dist/_pkgs/store/test/test-workspace.d.ts +8 -68
- package/dist/_pkgs/store/test/test-workspace.js +7 -132
- package/dist/_pkgs/store/transformer/assets.d.ts +2 -2
- package/dist/_pkgs/store/transformer/base.d.ts +5 -5
- package/dist/_pkgs/store/transformer/base.js +4 -4
- package/dist/_pkgs/store/transformer/index.d.ts +7 -7
- package/dist/_pkgs/store/transformer/index.js +7 -7
- package/dist/_pkgs/store/transformer/json.js +4 -4
- package/dist/_pkgs/store/transformer/slice.d.ts +1 -1
- package/dist/_pkgs/store/transformer/slice.js +1 -1
- package/dist/_pkgs/store/transformer/type.d.ts +2 -2
- package/dist/_pkgs/sync/doc/peer.js +1 -1
- 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/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 +23 -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 +154 -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 +112 -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,1340 @@
|
|
|
1
|
+
import type { AuditFinding } from '../../affine-shared/services/index.js';
|
|
2
|
+
import { Bound } from '../../global/gfx/index.js';
|
|
3
|
+
import type { RoleDefs, RoleId, SurfaceBlockModel, ValidationException } from '../../std/gfx/index.js';
|
|
4
|
+
import { GfxPrimitiveElementModel, InteractivityExtension } from '../../std/gfx/index.js';
|
|
5
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
6
|
+
import type { FrameworkBackgroundDef } from '../framework-background/def.js';
|
|
7
|
+
import type { CanvasRenderer } from '../renderer/canvas-renderer.js';
|
|
8
|
+
import { Overlay } from '../renderer/overlay.js';
|
|
9
|
+
import type { RoughCanvas } from '../utils/rough/canvas.js';
|
|
10
|
+
import { type QualityNudge } from './map-quality.js';
|
|
11
|
+
import { ViolationTimeline } from './violation-timeline.js';
|
|
12
|
+
/**
|
|
13
|
+
* Minimal validation engine (PF5, wave 1).
|
|
14
|
+
*
|
|
15
|
+
* A framework declares its rules as DATA and registers them; the engine walks
|
|
16
|
+
* the surface and produces VIOLATION OBJECTS. It renders no text, decides no
|
|
17
|
+
* wording and knows no concrete framework — it only knows roles (PF1) and
|
|
18
|
+
* geometry.
|
|
19
|
+
*
|
|
20
|
+
* Structural twin of `./spotlight.ts`: a generic mechanism living with the
|
|
21
|
+
* surface, opted into by a framework through a DI identifier.
|
|
22
|
+
*
|
|
23
|
+
* ## Gating (PF4 reversed flag contract)
|
|
24
|
+
*
|
|
25
|
+
* The engine registers **no rule of its own**. Rules are registered by the
|
|
26
|
+
* flag-gated `…ViewExtension` of their framework (validation is tooling, not
|
|
27
|
+
* content — see `docs/adr/0009`), so a disabled framework contributes no rule
|
|
28
|
+
* and {@link ValidationManager} short-circuits before touching a single
|
|
29
|
+
* element. Flag off costs exactly one empty-map check.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* How severely a violation is meant to bite. The engine only carries the value
|
|
33
|
+
* through to the violation; acting on it is the host's decision.
|
|
34
|
+
*
|
|
35
|
+
* - `blocking-overridable` — the host may block, and must let the user override.
|
|
36
|
+
* - `warning` — surfaced, never blocking. The sketch always wins.
|
|
37
|
+
* - `audit` — collected for reporting, invisible to the drawing user.
|
|
38
|
+
*/
|
|
39
|
+
export type ViolationSeverity = 'blocking-overridable' | 'warning' | 'audit';
|
|
40
|
+
/**
|
|
41
|
+
* What a PROFILE can say about a rule: one of the three severities, or `'off'`
|
|
42
|
+
* — the rule is not evaluated at all, and costs nothing.
|
|
43
|
+
*/
|
|
44
|
+
export type ProfileSeverity = ViolationSeverity | 'off';
|
|
45
|
+
/**
|
|
46
|
+
* Rule families. One family = one evaluation function ({@link RULE_FAMILIES}).
|
|
47
|
+
* Adding one is adding an entry here and a function below, never a change to
|
|
48
|
+
* the shape of a rule.
|
|
49
|
+
*
|
|
50
|
+
* - `element-in-background` — the subject must sit inside the framework's frame.
|
|
51
|
+
* - `orientation-against-axis` — a DIRECTIONAL subject (an arrow, an edge) must
|
|
52
|
+
* not run against the declared sense of one of the frame's axes.
|
|
53
|
+
* - `attachment` — the subject must STRADDLE one of the frame's zone
|
|
54
|
+
* transitions, and optionally be posed ON a carrier element.
|
|
55
|
+
* - `no-overlap` — declared pairs of roles must not collide. The first family
|
|
56
|
+
* that is not element-local: it evaluates PAIRS.
|
|
57
|
+
* - `tone-convention` — the subject must be drawn in one of the tones the
|
|
58
|
+
* frame's own palette declares for it. On-demand only, in practice.
|
|
59
|
+
* - `majority-fact` — a remark about the MAP, raised when a declared fact holds
|
|
60
|
+
* for a majority of the subjects. Silent while nothing carries the fact.
|
|
61
|
+
* - `relative-order-along-axis` — the two elements a TYPED EDGE links must sit
|
|
62
|
+
* in the order that edge states, along one axis of the frame. The first
|
|
63
|
+
* family whose subject is a RELATION rather than an element or a proximity.
|
|
64
|
+
*/
|
|
65
|
+
export type RuleFamily = 'element-in-background' | 'orientation-against-axis' | 'attachment' | 'no-overlap' | 'relative-order-along-axis' | 'tone-convention' | 'majority-fact';
|
|
66
|
+
/**
|
|
67
|
+
* WHEN a rule is evaluated (PF5.14).
|
|
68
|
+
*
|
|
69
|
+
* - `realtime` — the default, and what every rule was before this existed:
|
|
70
|
+
* evaluated on the debounced path while the user draws, inside the 16 ms
|
|
71
|
+
* budget.
|
|
72
|
+
* - `on-demand` — evaluated ONLY when the user asks for a check-up, and never
|
|
73
|
+
* during a gesture. {@link evaluateRules} skips these before touching a
|
|
74
|
+
* single element, so a framework can ship a control that would not fit the
|
|
75
|
+
* frame — or that is simply not urgent — without spending a microsecond of
|
|
76
|
+
* the drawing budget on it.
|
|
77
|
+
*
|
|
78
|
+
* The split is a property of the RULE, not of the caller: a rule that must not
|
|
79
|
+
* interrupt says so once, in its own declaration, and no evaluation path has to
|
|
80
|
+
* remember. That is what makes "zero real-time cost" provable at the bench
|
|
81
|
+
* rather than promised in a comment.
|
|
82
|
+
*/
|
|
83
|
+
export type ValidationMoment = 'realtime' | 'on-demand';
|
|
84
|
+
/** `orientation-against-axis` configuration. */
|
|
85
|
+
export interface AgainstAxisDef {
|
|
86
|
+
/** Id of the axis in the rule's {@link ValidationRule.background}. */
|
|
87
|
+
axis: string;
|
|
88
|
+
/**
|
|
89
|
+
* Dead zone, in degrees, around the perpendicular. A subject at exactly 90°
|
|
90
|
+
* to the axis runs neither with it nor against it, and a rule that indicted
|
|
91
|
+
* it would be indicting a drawing hand rather than a mistake — so the verdict
|
|
92
|
+
* only falls beyond `90 + toleranceDeg` away from the axis' forward sense.
|
|
93
|
+
*/
|
|
94
|
+
toleranceDeg: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* What a finding SAYS: an i18n key, plus the framework's own wording for a host
|
|
98
|
+
* that ships no catalogue for it, for the message and for the remediation hint.
|
|
99
|
+
*
|
|
100
|
+
* Split out of {@link ValidationRule} because a rule can have more than one way
|
|
101
|
+
* of failing, and a family that knows WHICH one failed must be able to say so.
|
|
102
|
+
* A single message covering two distinct mistakes is a message that describes
|
|
103
|
+
* neither: "not on a dependency at a phase transition" — the wording Wardley's
|
|
104
|
+
* W2 shipped with, before the PO reduced that rule to one condition — left the
|
|
105
|
+
* user to guess which half they had got wrong, on a symbol eight units wide.
|
|
106
|
+
*/
|
|
107
|
+
export interface RuleMessage {
|
|
108
|
+
/** i18n key of the message; resolved by the host. The engine holds no prose. */
|
|
109
|
+
messageKey: string;
|
|
110
|
+
/**
|
|
111
|
+
* The FRAMEWORK's own wording, used when the host ships no catalogue for the
|
|
112
|
+
* key — exactly the `labelKey` + `fallback` pair a {@link ValidationProfile}
|
|
113
|
+
* and a background label already carry. The framework owns the word; the
|
|
114
|
+
* library still never invents one.
|
|
115
|
+
*/
|
|
116
|
+
messageFallback?: string;
|
|
117
|
+
/** i18n key of an optional remediation hint. */
|
|
118
|
+
suggestionKey?: string;
|
|
119
|
+
/** The framework's own wording for {@link suggestionKey}. */
|
|
120
|
+
suggestionFallback?: string;
|
|
121
|
+
}
|
|
122
|
+
/** `attachment` configuration. */
|
|
123
|
+
export interface AttachmentDef {
|
|
124
|
+
/**
|
|
125
|
+
* OPTIONAL: the role of an element the subject must also be posed ON.
|
|
126
|
+
*
|
|
127
|
+
* It has to be an **edge** role: "posed on" is measured as a distance to a
|
|
128
|
+
* PATH, and a node has none. A rule naming a node role here matches nothing
|
|
129
|
+
* and warns once rather than failing silently — a rule that never fires and
|
|
130
|
+
* never says why is the worst thing declarative data can do.
|
|
131
|
+
*
|
|
132
|
+
* Absent means the subject is judged on {@link boundaryAxis} alone, which is
|
|
133
|
+
* the shape Wardley's W2 took the day the PO spelled the rule out: a bar
|
|
134
|
+
* straddling a phase divider is right whether or not a dependency happens to
|
|
135
|
+
* run under it (recette of 02/08/2026).
|
|
136
|
+
*/
|
|
137
|
+
carrierRole?: RoleId;
|
|
138
|
+
/**
|
|
139
|
+
* How far, in model units, the subject may sit from its carrier. Read only
|
|
140
|
+
* when a {@link carrierRole} is declared, and absent means "on the path" —
|
|
141
|
+
* a boundary-only rule declares neither.
|
|
142
|
+
*/
|
|
143
|
+
tolerance?: number;
|
|
144
|
+
/**
|
|
145
|
+
* The subject must STRADDLE one of the frame's declared transitions, measured
|
|
146
|
+
* across this axis. Absent means the position along the axis is not judged at
|
|
147
|
+
* all.
|
|
148
|
+
*
|
|
149
|
+
* ## "Straddling", as geometry
|
|
150
|
+
*
|
|
151
|
+
* The subject's own EXTENT along the axis must intersect the transition BAND
|
|
152
|
+
* — the frontier widened by the frame's declared
|
|
153
|
+
* {@link FrameworkBackgroundDef.transitionBandWidth}. One interval overlap,
|
|
154
|
+
* and it says both halves of what the practitioner means at once:
|
|
155
|
+
*
|
|
156
|
+
* - a subject WIDE enough to cover the frontier is superimposed on it, and is
|
|
157
|
+
* accepted whatever the band says — the line genuinely passes through it;
|
|
158
|
+
* - a subject too thin to cover anything (an inertia bar is eight units wide)
|
|
159
|
+
* is accepted while it is within the band, which is the frame's own
|
|
160
|
+
* declared tolerance for "on this frontier" and, on a Wardley map, Wardley's
|
|
161
|
+
* zone of punctuated equilibrium.
|
|
162
|
+
*
|
|
163
|
+
* Measured on the extent and never on the centre: "superimposed on the line"
|
|
164
|
+
* is a statement about the subject's ink, not about a point inside it. The
|
|
165
|
+
* band is a ratio of the plot, so the verdict holds when the map is resized.
|
|
166
|
+
* A rule asking for a boundary against a frame that declares no band warns
|
|
167
|
+
* once and drops the requirement rather than indicting every subject on the
|
|
168
|
+
* board.
|
|
169
|
+
*/
|
|
170
|
+
boundaryAxis?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The words for the boundary half, when a rule that ALSO declares a
|
|
173
|
+
* {@link carrierRole} wants to say something other than its own message —
|
|
174
|
+
* two requirements the user has two different ways of fixing are two
|
|
175
|
+
* sentences. A boundary-only rule needs none: its own message is the only
|
|
176
|
+
* thing it can be saying.
|
|
177
|
+
*/
|
|
178
|
+
offBoundary?: RuleMessage;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* One `no-overlap` combination: two roles that must not collide. Order carries
|
|
182
|
+
* no meaning — `[label, node]` and `[node, label]` are the same requirement.
|
|
183
|
+
*
|
|
184
|
+
* Which GEOMETRY each side is measured with is not declared here: it follows
|
|
185
|
+
* the role's own `kind` in {@link ValidationRule.roles}. An `edge` role is
|
|
186
|
+
* measured along its PATH, because the bounding box of a diagonal link covers
|
|
187
|
+
* half the map and would indict every label anywhere near it; a `text` role by
|
|
188
|
+
* the ink of its text, because a text box is created at a width that says
|
|
189
|
+
* nothing about what it reads; a `node` role by its bounds.
|
|
190
|
+
*/
|
|
191
|
+
export type OverlapPair = readonly [RoleId, RoleId];
|
|
192
|
+
/**
|
|
193
|
+
* `tone-convention` configuration (PF13.8 / Q5).
|
|
194
|
+
*
|
|
195
|
+
* A framework's colour code is a CONVENTION, not a decoration: on a Wardley map
|
|
196
|
+
* the landscape is drawn in greys, red is reserved for what is changing and
|
|
197
|
+
* green for benefits. A component someone coloured red for emphasis is saying
|
|
198
|
+
* something the author did not mean.
|
|
199
|
+
*
|
|
200
|
+
* ## Why palette ENTRIES and not colours
|
|
201
|
+
*
|
|
202
|
+
* The sanctioned colours are named against the frame's own declared palette
|
|
203
|
+
* ({@link BackgroundChromeDef.palette}) — the same `@name` indirection every
|
|
204
|
+
* background label and wash already uses. A rule therefore never restates a hex
|
|
205
|
+
* the background already owns, and a host restyling the frame restyles the
|
|
206
|
+
* convention with it, in one place.
|
|
207
|
+
*
|
|
208
|
+
* ## Why TONES and not exact colours
|
|
209
|
+
*
|
|
210
|
+
* The convention is about tones, so the comparison is too: an element is judged
|
|
211
|
+
* on the tone family its colour falls into ({@link toneOf}), never on matching
|
|
212
|
+
* a palette entry byte for byte. Otherwise every legitimate shade of grey the
|
|
213
|
+
* shape toolbar can produce would be a finding, which is a rule nobody would
|
|
214
|
+
* keep switched on for five minutes.
|
|
215
|
+
*
|
|
216
|
+
* A colour the engine cannot classify — a CSS variable it has no theme to
|
|
217
|
+
* resolve, a gradient, `transparent` — yields SILENCE. Guessing would mean
|
|
218
|
+
* indicting a user over a colour nobody in this process can actually see.
|
|
219
|
+
*/
|
|
220
|
+
export interface ToneConventionDef {
|
|
221
|
+
/**
|
|
222
|
+
* Names of the entries, in the rule's {@link ValidationRule.background}
|
|
223
|
+
* palette, whose tones the subject may be drawn in. A rule naming entries
|
|
224
|
+
* that resolve to no classifiable tone at all warns once and evaluates
|
|
225
|
+
* nothing, rather than indicting every element on the board.
|
|
226
|
+
*/
|
|
227
|
+
palette: readonly string[];
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* `majority-fact` configuration (PF13.8 / Q6).
|
|
231
|
+
*
|
|
232
|
+
* "Most of what you have mapped is an activity — the phase names for activities
|
|
233
|
+
* would read better." A remark about the MAP, raised from a count over its
|
|
234
|
+
* elements, and deliberately never imposed.
|
|
235
|
+
*
|
|
236
|
+
* ## The gate, and why it is silence rather than a warning
|
|
237
|
+
*
|
|
238
|
+
* The fact is read off a declared element prop that may not exist yet — Wardley's
|
|
239
|
+
* `nature` is the type-3 classification, and nothing writes it today. A family
|
|
240
|
+
* that guessed would produce a remark about a majority it computed over an empty
|
|
241
|
+
* population, i.e. a sentence with no evidence behind it. So a surface where NO
|
|
242
|
+
* subject carries the fact raises nothing at all, silently: the rule is shipped,
|
|
243
|
+
* inert, and starts working by itself the day the fact lands. Nothing to
|
|
244
|
+
* remember, nothing to switch on.
|
|
245
|
+
*/
|
|
246
|
+
export interface MajorityDef {
|
|
247
|
+
/**
|
|
248
|
+
* The element prop carrying the fact, read duck-typed: the engine must not
|
|
249
|
+
* import a framework's model to count something declared by data.
|
|
250
|
+
*/
|
|
251
|
+
fact: string;
|
|
252
|
+
/** The value that must hold for a majority of the subjects. */
|
|
253
|
+
value: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* `relative-order-along-axis` configuration — the family of `docs/adr/0010`'s
|
|
257
|
+
* W4, "a provider component may not be positioned higher than its consumer".
|
|
258
|
+
*
|
|
259
|
+
* The rule reads a RELATION: given a typed edge, it compares the two elements
|
|
260
|
+
* that edge links along one axis of the frame, in the order the edge states.
|
|
261
|
+
* That order comes from the persisted `source → target` pair and from nowhere
|
|
262
|
+
* else — deriving it from the geometry would make the rule compare the layout
|
|
263
|
+
* against itself, so it could never fire (ADR 0010 § 4a).
|
|
264
|
+
*/
|
|
265
|
+
export interface RelativeOrderDef {
|
|
266
|
+
/**
|
|
267
|
+
* The EDGE role whose orientation is read. An element matching it (or
|
|
268
|
+
* specialising it) with both ends bound is one subject of the rule; every
|
|
269
|
+
* other edge on the board is none of its business — a Wardley change arrow is
|
|
270
|
+
* oriented too, and says nothing about who depends on whom.
|
|
271
|
+
*/
|
|
272
|
+
edgeRole: RoleId;
|
|
273
|
+
/** Id of the axis in the rule's {@link ValidationRule.background}. */
|
|
274
|
+
axis: string;
|
|
275
|
+
/**
|
|
276
|
+
* Which end the edge states should be FURTHER ALONG the axis' forward sense
|
|
277
|
+
* (the direction of increasing value: up for a vertical axis, right for a
|
|
278
|
+
* horizontal one).
|
|
279
|
+
*
|
|
280
|
+
* `'source-ahead'` for `wardley:dependency`: the source is the consumer, so
|
|
281
|
+
* it sits higher on the visibility axis and the target is what it rests on.
|
|
282
|
+
* Needs descend from source to target; value flows back up.
|
|
283
|
+
*/
|
|
284
|
+
expect: 'source-ahead' | 'target-ahead';
|
|
285
|
+
/**
|
|
286
|
+
* Slack before the verdict falls, as a RATIO of the frame's extent along that
|
|
287
|
+
* axis — never a number of model units.
|
|
288
|
+
*
|
|
289
|
+
* Same lesson the transition band learned on the PO recette of 01/08/2026: an
|
|
290
|
+
* absolute tolerance is four times as strict on a map four times as big, and
|
|
291
|
+
* nothing on screen explains why. Two components drawn level are not a
|
|
292
|
+
* mistake — an architect lines up a chain before spreading it out — so the
|
|
293
|
+
* rule only speaks when one is genuinely below the other.
|
|
294
|
+
*
|
|
295
|
+
* Absent means zero: any inversion at all, however small, is reported.
|
|
296
|
+
*/
|
|
297
|
+
toleranceRatio?: number;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A rule is declarative, versioned data owned by its framework (PRD principle
|
|
301
|
+
* 5) — never a subclass, never a closure. It is comparable, serializable and
|
|
302
|
+
* can be shipped by a host.
|
|
303
|
+
*/
|
|
304
|
+
export interface ValidationRule extends RuleMessage {
|
|
305
|
+
/** Stable id, namespaced by framework: `wardley.change-arrow-against-evolution`. */
|
|
306
|
+
id: string;
|
|
307
|
+
/** Owning framework, `wardley`. Rules never leave their framework. */
|
|
308
|
+
framework: string;
|
|
309
|
+
family: RuleFamily;
|
|
310
|
+
severity: ViolationSeverity;
|
|
311
|
+
/**
|
|
312
|
+
* When this rule runs. Absent = `'realtime'`, which is what every rule
|
|
313
|
+
* written before PF5.14 means and what the vast majority of rules want.
|
|
314
|
+
*
|
|
315
|
+
* `'on-demand'` takes the rule OUT of {@link evaluateRules} entirely — not
|
|
316
|
+
* out of the canvas affordance, out of the evaluation — and into
|
|
317
|
+
* {@link evaluateCheckup}, which only a user gesture calls.
|
|
318
|
+
*/
|
|
319
|
+
moment?: ValidationMoment;
|
|
320
|
+
/**
|
|
321
|
+
* The role this rule is written on. An element matches when its own role IS
|
|
322
|
+
* that role or SPECIALISES it ({@link roleIsA}), so a rule on
|
|
323
|
+
* `wardley:component` covers `wardley:market` for free. An element with no
|
|
324
|
+
* role (a generalist square, a free text) never matches — proportionality,
|
|
325
|
+
* PRD principle 8.
|
|
326
|
+
*
|
|
327
|
+
* Absent for `no-overlap`, whose subjects are declared per PAIR: the rule has
|
|
328
|
+
* no single subject role, and naming one would be data that lies.
|
|
329
|
+
*/
|
|
330
|
+
appliesTo?: RoleId;
|
|
331
|
+
/** The framework's role vocabulary, for the inheritance walk. */
|
|
332
|
+
roles: RoleDefs;
|
|
333
|
+
/** Bumped when the rule's meaning changes, so a host can pin behaviour. */
|
|
334
|
+
version: number;
|
|
335
|
+
/**
|
|
336
|
+
* The ROLE of the framework's background (`wardley:map`), i.e. the frame the
|
|
337
|
+
* subject roles are measured against.
|
|
338
|
+
*
|
|
339
|
+
* A role, not an element type: the engine never looks at a shape type, on
|
|
340
|
+
* either side of a rule (see `role.ts`). A background authored before its
|
|
341
|
+
* role existed carries none, frames nothing and raises nothing.
|
|
342
|
+
*
|
|
343
|
+
* Required by `element-in-background` and by any family reading the frame's
|
|
344
|
+
* declared facts; optional for `no-overlap`, where it only decides whether a
|
|
345
|
+
* finding can be waived map-wide.
|
|
346
|
+
*/
|
|
347
|
+
backgroundRole?: RoleId;
|
|
348
|
+
/**
|
|
349
|
+
* The framework's background DECLARATION, carried as data exactly like
|
|
350
|
+
* {@link roles} is.
|
|
351
|
+
*
|
|
352
|
+
* This is what lets a rule read the frame's SEMANTICS — which axes it has and
|
|
353
|
+
* which way they run, where its zones meet — without the engine owning a
|
|
354
|
+
* registry of backgrounds or importing a renderer. The facts come out of
|
|
355
|
+
* `../framework-background/facts.js`, and are a pure function of this
|
|
356
|
+
* declaration plus the bounds of the instance a finding is measured against.
|
|
357
|
+
*/
|
|
358
|
+
background?: FrameworkBackgroundDef;
|
|
359
|
+
/** `orientation-against-axis` only. */
|
|
360
|
+
against?: AgainstAxisDef;
|
|
361
|
+
/** `attachment` only. */
|
|
362
|
+
attachment?: AttachmentDef;
|
|
363
|
+
/** `no-overlap` only: the combinations that must not collide. */
|
|
364
|
+
overlap?: readonly OverlapPair[];
|
|
365
|
+
/** `relative-order-along-axis` only. */
|
|
366
|
+
relativeOrder?: RelativeOrderDef;
|
|
367
|
+
/**
|
|
368
|
+
* `no-overlap` only: how DEEP a collision has to be, in model units, before
|
|
369
|
+
* it is worth reporting. Absent or `0` means any shared area at all.
|
|
370
|
+
*
|
|
371
|
+
* Penetration depth, not shared area: how far the two geometries reach INTO
|
|
372
|
+
* each other — `min(overlapX, overlapY)` for two boxes, and for a path the
|
|
373
|
+
* greatest distance any point of it gets under the edge of the box it
|
|
374
|
+
* crosses. A link clipping the corner of a name and a link drawn through the
|
|
375
|
+
* middle of it share the same "they overlap"; only the second one is
|
|
376
|
+
* something the eye trips over.
|
|
377
|
+
*
|
|
378
|
+
* Two paths crossing have no depth to measure — a line has no width — so a
|
|
379
|
+
* declared crossing is reported whatever this says.
|
|
380
|
+
*/
|
|
381
|
+
minPenetration?: number;
|
|
382
|
+
/** `tone-convention` only. */
|
|
383
|
+
tone?: ToneConventionDef;
|
|
384
|
+
/** `majority-fact` only. */
|
|
385
|
+
majority?: MajorityDef;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* A level of requirement, as DATA (PF9) — the same declarative, versioned,
|
|
389
|
+
* host-shippable shape as a rule, a role or a background.
|
|
390
|
+
*
|
|
391
|
+
* A framework exposes several: Wardley ships a permissive learning profile and
|
|
392
|
+
* a strict one; BPMN would ship descriptive / analytic / executable. A profile
|
|
393
|
+
* says, for each rule of its framework, how hard that rule bites — or that it
|
|
394
|
+
* does not apply at all.
|
|
395
|
+
*
|
|
396
|
+
* ## What "absent from {@link rules}" means
|
|
397
|
+
*
|
|
398
|
+
* The rule keeps its OWN declared severity. A profile is an override table, not
|
|
399
|
+
* an allow-list: a rule the framework ships later must not silently vanish from
|
|
400
|
+
* a strict profile that was written before it existed. A profile that wants a
|
|
401
|
+
* rule gone says so — `'off'` — and a profile that wants it louder says that
|
|
402
|
+
* too. Nothing is ever raised implicitly (PF9.4): every severity a user gets is
|
|
403
|
+
* either the one the rule declares or one this table spells out.
|
|
404
|
+
*
|
|
405
|
+
* ## Scope
|
|
406
|
+
*
|
|
407
|
+
* A profile is CHOSEN per root instance, on the framework's background element
|
|
408
|
+
* (`GfxPrimitiveElementModel.validationProfile`) — see PF9.1. Two maps on one
|
|
409
|
+
* canvas therefore hold two independent levels of requirement, and a background
|
|
410
|
+
* that names none is checked against its framework's {@link isDefault} profile.
|
|
411
|
+
*/
|
|
412
|
+
export interface ValidationProfile {
|
|
413
|
+
/** Stable id, namespaced by framework: `wardley.sketch`. */
|
|
414
|
+
id: string;
|
|
415
|
+
/** Owning framework, `wardley`. A profile never applies across frameworks. */
|
|
416
|
+
framework: string;
|
|
417
|
+
/** i18n key of the human name; resolved by the host. No prose here either. */
|
|
418
|
+
labelKey: string;
|
|
419
|
+
/**
|
|
420
|
+
* The framework's own wording when the host ships no catalogue for the key —
|
|
421
|
+
* the same `labelKey` + `fallback` pair the background declaration uses for
|
|
422
|
+
* its axis and phase labels. The framework owns the word; the library still
|
|
423
|
+
* never invents one.
|
|
424
|
+
*/
|
|
425
|
+
fallback?: string;
|
|
426
|
+
/**
|
|
427
|
+
* The one profile that applies when a background names none — and the one
|
|
428
|
+
* that, chosen explicitly, writes NOTHING on the element. It is the most
|
|
429
|
+
* permissive reasonable level, because the sketch wins (PRD principle 3).
|
|
430
|
+
*/
|
|
431
|
+
isDefault?: boolean;
|
|
432
|
+
/** Severity override per rule id. A rule absent here keeps its own. */
|
|
433
|
+
rules: Readonly<Record<string, ProfileSeverity>>;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Severity `profile` gives `rule` — the rule's own when the profile is silent
|
|
437
|
+
* about it, or when there is no profile at all.
|
|
438
|
+
*/
|
|
439
|
+
export declare function profileSeverity(rule: ValidationRule, profile: ValidationProfile | undefined): ProfileSeverity;
|
|
440
|
+
/**
|
|
441
|
+
* The profile a background of `framework` is checked against when it names
|
|
442
|
+
* none: the one flagged {@link ValidationProfile.isDefault}, or — failing that
|
|
443
|
+
* — the first one registered, so a framework that forgot the flag still has a
|
|
444
|
+
* resolvable answer instead of silently losing its profiles.
|
|
445
|
+
*/
|
|
446
|
+
export declare function defaultProfileOf(profiles: readonly ValidationProfile[], framework: string): ValidationProfile | undefined;
|
|
447
|
+
/**
|
|
448
|
+
* The result of a rule that did not hold (PRD principle 6): an OBJECT, not a
|
|
449
|
+
* string and not a rendering. It names the rule, the elements at fault and an
|
|
450
|
+
* i18n key — never a sentence.
|
|
451
|
+
*/
|
|
452
|
+
export interface Violation {
|
|
453
|
+
ruleId: string;
|
|
454
|
+
/**
|
|
455
|
+
* The elements the rule indicts — one for an element-local family, TWO for
|
|
456
|
+
* `no-overlap` (which is about a pair and not about either half of it), and
|
|
457
|
+
* THREE for `relative-order-along-axis`: the two elements the relation links
|
|
458
|
+
* plus the edge that states it.
|
|
459
|
+
*
|
|
460
|
+
* The edge is in there deliberately. The finding has two honest resolutions —
|
|
461
|
+
* move a node, or reverse the relation — and the second one is only reachable
|
|
462
|
+
* from the edge, which carries the inversion command (`docs/adr/0010` M3). A
|
|
463
|
+
* finding that named the nodes alone would show the user two brackets and no
|
|
464
|
+
* way to the gesture that fixes half the cases.
|
|
465
|
+
*
|
|
466
|
+
* Always sorted by id, so the same situation reports the same way whichever
|
|
467
|
+
* order the surface happened to be walked in.
|
|
468
|
+
*/
|
|
469
|
+
elementIds: string[];
|
|
470
|
+
severity: ViolationSeverity;
|
|
471
|
+
messageKey: string;
|
|
472
|
+
/** The framework's own wording for {@link messageKey}. */
|
|
473
|
+
messageFallback?: string;
|
|
474
|
+
/** i18n key of a remediation hint, when the rule carries one. */
|
|
475
|
+
suggestion?: string;
|
|
476
|
+
/** The framework's own wording for {@link suggestion}. */
|
|
477
|
+
suggestionFallback?: string;
|
|
478
|
+
/**
|
|
479
|
+
* The background this finding is attributed to — for `element-in-background`,
|
|
480
|
+
* the NEAREST one, none of them having contained the element (that is what
|
|
481
|
+
* being in violation means here).
|
|
482
|
+
*
|
|
483
|
+
* Recorded by the family at the moment it picks it, because nothing
|
|
484
|
+
* downstream can reconstruct it: a board carries several maps, and "which one
|
|
485
|
+
* did the user mean" is a question only the evaluation is in a position to
|
|
486
|
+
* answer. It is what makes the `map` exemption scope mean ONE map instead of
|
|
487
|
+
* every map on the document — see {@link ExemptionScope}.
|
|
488
|
+
*
|
|
489
|
+
* A heuristic, and an honest one: nearest by edge-to-edge gap
|
|
490
|
+
* ({@link gapSquared}), ties broken by the smaller id so that it never
|
|
491
|
+
* depends on the order the surface happened to be walked in.
|
|
492
|
+
*
|
|
493
|
+
* Absent for a family that measures against no background.
|
|
494
|
+
*/
|
|
495
|
+
backgroundId?: string;
|
|
496
|
+
/**
|
|
497
|
+
* The named FRONTIER of that background the finding is about, when the family
|
|
498
|
+
* measured against one: `custom-built|product` for a transition band
|
|
499
|
+
* ({@link BackgroundTransitionBand}).
|
|
500
|
+
*
|
|
501
|
+
* "This bar is outside the equilibrium zone" is only half an answer — the
|
|
502
|
+
* other half is which zone it should have been in, and the band already knows
|
|
503
|
+
* its own name. Recorded at the moment the family picks the frontier, for the
|
|
504
|
+
* same reason {@link backgroundId} is: nothing downstream can reconstruct
|
|
505
|
+
* which of several transitions the user was aiming at.
|
|
506
|
+
*
|
|
507
|
+
* Absent for a family that measures against no such region.
|
|
508
|
+
*/
|
|
509
|
+
boundaryId?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Set when a user exception covers this finding (PF8), and names the SCOPE
|
|
512
|
+
* that covers it. Absent = live.
|
|
513
|
+
*
|
|
514
|
+
* The engine keeps reporting the violation either way — an exception changes
|
|
515
|
+
* its STATE, it never makes it vanish, so a board can never hide an
|
|
516
|
+
* arbitration it made (PF8.3). Suppressing the canvas affordance is a
|
|
517
|
+
* downstream filter ({@link liveViolations}); the panel and the bubble keep
|
|
518
|
+
* the whole list.
|
|
519
|
+
*/
|
|
520
|
+
exemption?: ExemptionScope;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* How far an exception reaches.
|
|
524
|
+
*
|
|
525
|
+
* - `element` — written on the element itself: the rule is disarmed for it and
|
|
526
|
+
* for nothing else on the board (PF8.2).
|
|
527
|
+
* - `map` — written on ONE background element, the one named by the finding's
|
|
528
|
+
* {@link Violation.backgroundId}: the rule is disarmed for the elements
|
|
529
|
+
* measured against THAT map, and for no other map on the board (PF8.4).
|
|
530
|
+
*
|
|
531
|
+
* There is no third scope, and in particular no document-wide one: an exception
|
|
532
|
+
* is always carried by an element that can be selected, copied and deleted, so
|
|
533
|
+
* it has an owner, a lifetime and no hidden global state to garbage-collect.
|
|
534
|
+
* A board with three maps therefore holds three independent arbitrations, and
|
|
535
|
+
* deleting one map takes exactly its own with it.
|
|
536
|
+
*/
|
|
537
|
+
export type ExemptionScope = 'element' | 'map';
|
|
538
|
+
/**
|
|
539
|
+
* Every element on the surface acting as a framework background for a REAL-TIME
|
|
540
|
+
* rule.
|
|
541
|
+
*
|
|
542
|
+
* Recorded by the manager after each evaluation, and read on the next one — the
|
|
543
|
+
* one fact about a deleted background that nothing else can reconstruct. See
|
|
544
|
+
* {@link ValidationManager._backgrounds}.
|
|
545
|
+
*
|
|
546
|
+
* ## Why the moment is filtered here too
|
|
547
|
+
*
|
|
548
|
+
* This runs on the gesture path, once per evaluation, and it is a FULL surface
|
|
549
|
+
* walk per rule. `evaluateRules` already refuses to walk an on-demand rule, so
|
|
550
|
+
* leaving it in here would have handed the drawing budget back exactly what the
|
|
551
|
+
* second moment took away from it — measured at +58 % on the manager's tick with
|
|
552
|
+
* the two Wardley check-up rules registered, and invisible to a bench that times
|
|
553
|
+
* `evaluateRules` alone.
|
|
554
|
+
*
|
|
555
|
+
* It is also the right answer and not merely the cheap one: `_backgrounds`
|
|
556
|
+
* exists to decide whether an incremental REAL-TIME pass must fall back to a
|
|
557
|
+
* full sweep. An on-demand rule never takes part in that pass, so the frames it
|
|
558
|
+
* measures against have nothing to invalidate — and a framework whose only rules
|
|
559
|
+
* are on-demand has no incremental pass to protect in the first place.
|
|
560
|
+
*/
|
|
561
|
+
export declare function backgroundElementIds(rules: readonly ValidationRule[], elements: readonly GfxPrimitiveElementModel[]): ReadonlySet<string>;
|
|
562
|
+
/**
|
|
563
|
+
* The tone families a colour can fall into — the granularity a colour CONVENTION
|
|
564
|
+
* is actually written at ("the landscape is grey, red is what changes"), and
|
|
565
|
+
* deliberately not finer. A framework's palette entry and a user's colour are
|
|
566
|
+
* both reduced to one of these before they are compared.
|
|
567
|
+
*/
|
|
568
|
+
export type ColourTone = 'grey' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple' | 'magenta';
|
|
569
|
+
/**
|
|
570
|
+
* Which tone family a colour belongs to, or `undefined` when the engine cannot
|
|
571
|
+
* honestly say.
|
|
572
|
+
*
|
|
573
|
+
* Two readings, in order: the NUMBER when the colour is a hex the process can
|
|
574
|
+
* actually see, and the NAME when it is a theme token it cannot. Anything else —
|
|
575
|
+
* `transparent`, a gradient, an `rgb()` triple, a variable with no tone in its
|
|
576
|
+
* name — is unclassifiable, and unclassifiable means silence: a convention rule
|
|
577
|
+
* that guessed would indict a user over a colour nobody here can see.
|
|
578
|
+
*/
|
|
579
|
+
export declare function toneOf(value: string | undefined): ColourTone | undefined;
|
|
580
|
+
/**
|
|
581
|
+
* What a caller knows about a change, when it knows anything.
|
|
582
|
+
*
|
|
583
|
+
* `dirty` is every element id added, removed or updated since the findings in
|
|
584
|
+
* `previous` were computed. Handed in only by the manager's debounced path,
|
|
585
|
+
* where exactly that is known; every other caller — the first evaluation, a
|
|
586
|
+
* gesture that must land immediately, the bench, a test — evaluates in full.
|
|
587
|
+
*
|
|
588
|
+
* Only {@link evaluateNoOverlap} honours it. The element-local families are
|
|
589
|
+
* already constant per element and would gain nothing but a way to be subtly
|
|
590
|
+
* wrong.
|
|
591
|
+
*/
|
|
592
|
+
export interface IncrementalContext {
|
|
593
|
+
dirty: ReadonlySet<string>;
|
|
594
|
+
previous: readonly Violation[];
|
|
595
|
+
}
|
|
596
|
+
/** The exceptions an element carries, always an array, never a copy to keep. */
|
|
597
|
+
export declare function elementExceptions(element: GfxPrimitiveElementModel): readonly ValidationException[];
|
|
598
|
+
/** Whether `element` is excused from `ruleId`. */
|
|
599
|
+
export declare function hasException(element: GfxPrimitiveElementModel, ruleId: string): boolean;
|
|
600
|
+
/**
|
|
601
|
+
* Run every rule over every element. Pure and synchronous — the unit of the
|
|
602
|
+
* 16 ms budget (PF5.12), and the only thing the bench measures.
|
|
603
|
+
*
|
|
604
|
+
* `profiles` is the level of requirement in force (PF9). Omitted, every rule is
|
|
605
|
+
* judged by its own declared severity, which is exactly what a framework
|
|
606
|
+
* shipping no profile gets.
|
|
607
|
+
*
|
|
608
|
+
* `incremental` is what the caller knows about what CHANGED. Omitted — the
|
|
609
|
+
* default, and what every test and the bench's full-evaluation case pass — the
|
|
610
|
+
* whole surface is re-judged from scratch. Handed in, the pair-wise family
|
|
611
|
+
* re-tests only the couples a change can have affected; the answer is the same,
|
|
612
|
+
* it is just reached without walking the grid against itself.
|
|
613
|
+
*/
|
|
614
|
+
export declare function evaluateRules(rules: readonly ValidationRule[], elements: readonly GfxPrimitiveElementModel[], profiles?: readonly ValidationProfile[], incremental?: IncrementalContext): Violation[];
|
|
615
|
+
/** The registered rules a check-up runs — and nothing else ever evaluates. */
|
|
616
|
+
export declare function onDemandRules(rules: readonly ValidationRule[]): readonly ValidationRule[];
|
|
617
|
+
/**
|
|
618
|
+
* Run the ON-DEMAND rules over the surface (PF5.14). The exact mirror of
|
|
619
|
+
* {@link evaluateRules}, for the moment the drawing path never touches.
|
|
620
|
+
*
|
|
621
|
+
* Synchronous and total: this is what a test, a host and a report call. The
|
|
622
|
+
* manager drives the same pipeline one rule at a time so a long check-up can
|
|
623
|
+
* yield the thread — see {@link ValidationManager.runCheckup} — and both reach
|
|
624
|
+
* the same answer, because both are {@link runRules}.
|
|
625
|
+
*
|
|
626
|
+
* The findings are ordinary {@link Violation} objects and go through the same
|
|
627
|
+
* profile and exception passes as any other. What makes them REMARKS rather
|
|
628
|
+
* than verdicts is where they land: they never reach `violations$`, so they
|
|
629
|
+
* never reach the timeline, the bracket or the badge. A framework declares them
|
|
630
|
+
* `audit` on top of that, which is the severity for "collected, invisible to the
|
|
631
|
+
* drawing user" — belt and braces, and the braces are structural.
|
|
632
|
+
*/
|
|
633
|
+
export declare function evaluateCheckup(rules: readonly ValidationRule[], elements: readonly GfxPrimitiveElementModel[], profiles?: readonly ValidationProfile[]): Violation[];
|
|
634
|
+
/**
|
|
635
|
+
* One check-up, as the panel reads it: what it found, when it was asked for,
|
|
636
|
+
* and how far it has got.
|
|
637
|
+
*
|
|
638
|
+
* ONE timestamp for the whole run, taken when the user asked — a single click is
|
|
639
|
+
* a single question, whatever number of rules it happens to walk. The same rule
|
|
640
|
+
* `setException` follows for an arbitration.
|
|
641
|
+
*
|
|
642
|
+
* Session state, never persisted: a document says what it contains, not when
|
|
643
|
+
* somebody last looked at it.
|
|
644
|
+
*/
|
|
645
|
+
export interface CheckupRun {
|
|
646
|
+
/**
|
|
647
|
+
* The INSTANCE this run is about — the map the user asked about, and the only
|
|
648
|
+
* one its remarks are allowed to be measured on.
|
|
649
|
+
*
|
|
650
|
+
* A check-up walks the whole surface, because that is where the elements are;
|
|
651
|
+
* a board carries several maps, and without this the panel on one map would
|
|
652
|
+
* confidently list the components of the one next to it, and a map nobody has
|
|
653
|
+
* ever checked would show somebody else's timestamp. That is precisely the
|
|
654
|
+
* "tally over the whole surface" {@link evaluateMajorityFact} refuses to
|
|
655
|
+
* compute, reintroduced one layer up.
|
|
656
|
+
*
|
|
657
|
+
* The filter is applied in {@link ValidationManager.runCheckup}, on
|
|
658
|
+
* {@link Violation.backgroundId} — recorded by every family that measures
|
|
659
|
+
* against a frame — so `results` is already about this instance and nothing
|
|
660
|
+
* downstream has to remember to narrow it.
|
|
661
|
+
*/
|
|
662
|
+
backgroundId: string;
|
|
663
|
+
/** Epoch ms, taken at the moment of the gesture. */
|
|
664
|
+
at: number;
|
|
665
|
+
/** The remarks so far — complete once {@link done} reaches {@link total}. */
|
|
666
|
+
results: readonly Violation[];
|
|
667
|
+
/** Rules evaluated so far. */
|
|
668
|
+
done: number;
|
|
669
|
+
/** Rules this run has to walk. `done < total` means it is still going. */
|
|
670
|
+
total: number;
|
|
671
|
+
/**
|
|
672
|
+
* Set when a rule threw and the run stopped early.
|
|
673
|
+
*
|
|
674
|
+
* The run is still reported FINISHED (`done === total`), because the one thing
|
|
675
|
+
* a failure must not do is leave the panel believing a check-up is in flight:
|
|
676
|
+
* that reads as "Checking…" for ever and disables the only button that could
|
|
677
|
+
* try again. A visible failure the user can retry beats a silent lock.
|
|
678
|
+
*/
|
|
679
|
+
error?: true;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* How long a check-up may hold the thread before yielding it back.
|
|
683
|
+
*
|
|
684
|
+
* One frame, so a check-up that turns out to be expensive costs a dropped frame
|
|
685
|
+
* at worst instead of a locked tab. A rule is the unit of interruption — the
|
|
686
|
+
* smallest slice that has a meaning — so a single rule slower than this still
|
|
687
|
+
* runs to completion and the next one waits for the following task.
|
|
688
|
+
*
|
|
689
|
+
* The rules shipped today cost well under a millisecond between them, so the
|
|
690
|
+
* yield never fires in the delivered configuration — which would leave the
|
|
691
|
+
* generation counter and the supersession path as code nothing reaches. It is
|
|
692
|
+
* therefore a DEFAULT rather than a constant: {@link ValidationManager.checkupSliceMs}
|
|
693
|
+
* is settable, and lowering it makes every rule a slice, which is how a test
|
|
694
|
+
* exercises the yield and the race with the real rules instead of a stub.
|
|
695
|
+
*/
|
|
696
|
+
export declare const CHECKUP_SLICE_MS = 16;
|
|
697
|
+
/**
|
|
698
|
+
* Grant `ruleId` an exception on `element`, unless it already has one.
|
|
699
|
+
*
|
|
700
|
+
* The write goes through the declared `@field()` accessor, so it lands in the
|
|
701
|
+
* Y.Map, syncs to every peer, joins the undo stack and survives a copy — see the
|
|
702
|
+
* note on `GfxPrimitiveElementModel.validationExceptions`.
|
|
703
|
+
*/
|
|
704
|
+
export declare function grantException(element: GfxPrimitiveElementModel, ruleId: string, author?: string, now?: number): void;
|
|
705
|
+
/** Remove `ruleId`'s exception from `element`, if it has one. */
|
|
706
|
+
export declare function revokeException(element: GfxPrimitiveElementModel, ruleId: string): void;
|
|
707
|
+
/** One stored exception, and the element it is actually written on. */
|
|
708
|
+
export interface AnchoredException {
|
|
709
|
+
/** The element carrying the exception — a group member, or the element. */
|
|
710
|
+
element: GfxPrimitiveElementModel;
|
|
711
|
+
ruleId: string;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* The exceptions `element` ANSWERS FOR, i.e. the ones a menu on it should be
|
|
715
|
+
* able to revoke.
|
|
716
|
+
*
|
|
717
|
+
* Same rule the canvas mark follows ({@link anchorOf}): an exception is
|
|
718
|
+
* answered for by the outermost canvas group containing the element that
|
|
719
|
+
* carries it, or by that element when it is not grouped. So the entry lives on
|
|
720
|
+
* the whole Wardley component rather than on the bare node inside it, moves
|
|
721
|
+
* down to the element the moment the group is dissolved, and appears on a
|
|
722
|
+
* framework background for the map-wide arbitration it carries.
|
|
723
|
+
*
|
|
724
|
+
* Reads STORED exceptions, not current violations: an exception outlives the
|
|
725
|
+
* violation that prompted it (move the component back onto the map and the
|
|
726
|
+
* finding goes, the arbitration stays), and it is the arbitration the user is
|
|
727
|
+
* asking to take back.
|
|
728
|
+
*/
|
|
729
|
+
export declare function exceptionsAnchoredOn(element: GfxPrimitiveElementModel, surface: SurfaceBlockModel): AnchoredException[];
|
|
730
|
+
/** One rule's arbitration taken back, as reported to telemetry. */
|
|
731
|
+
export interface RevokedException {
|
|
732
|
+
ruleId: string;
|
|
733
|
+
framework: string;
|
|
734
|
+
scope: ExemptionScope;
|
|
735
|
+
/** How many elements the single gesture wrote to. */
|
|
736
|
+
elementCount: number;
|
|
737
|
+
}
|
|
738
|
+
/** A framework registers its rules here; nothing else registers rules. */
|
|
739
|
+
export declare const ValidationRuleIdentifier: import("../../global/di/types.js").ServiceIdentifier<ValidationRule> & (<U extends ValidationRule = ValidationRule>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
|
|
740
|
+
/**
|
|
741
|
+
* Register a framework's rules. Call it from the FLAG-GATED view extension —
|
|
742
|
+
* validation is tooling, so a disabled framework must contribute nothing.
|
|
743
|
+
*
|
|
744
|
+
* ```ts
|
|
745
|
+
* context.register(ValidationRuleExtension(WARDLEY_RULES));
|
|
746
|
+
* ```
|
|
747
|
+
*/
|
|
748
|
+
export declare function ValidationRuleExtension(rules: readonly ValidationRule[]): ExtensionType;
|
|
749
|
+
/** A framework registers its profiles here; nothing else registers profiles. */
|
|
750
|
+
export declare const ValidationProfileIdentifier: import("../../global/di/types.js").ServiceIdentifier<ValidationProfile> & (<U extends ValidationProfile = ValidationProfile>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
|
|
751
|
+
/**
|
|
752
|
+
* Register a framework's profiles. Call it from the FLAG-GATED view extension,
|
|
753
|
+
* beside {@link ValidationRuleExtension}: a level of requirement is tooling, so
|
|
754
|
+
* a disabled framework offers none — and the id already written on a background
|
|
755
|
+
* simply goes unread until the flag comes back.
|
|
756
|
+
*
|
|
757
|
+
* ```ts
|
|
758
|
+
* context.register(ValidationProfileExtension(WARDLEY_PROFILES));
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
export declare function ValidationProfileExtension(profiles: readonly ValidationProfile[]): ExtensionType;
|
|
762
|
+
/**
|
|
763
|
+
* Element props that can change a verdict, WHATEVER the registered rules are.
|
|
764
|
+
* Everything else — `opacity` and the other `@local()` fields, colours,
|
|
765
|
+
* labels — is ignored, so brushing a canvas (`SpotlightManager` writes
|
|
766
|
+
* `opacity` on every element it dims) neither re-evaluates the surface nor
|
|
767
|
+
* pushes the pending evaluation further away.
|
|
768
|
+
*
|
|
769
|
+
* A framework can add to this list without the engine learning its name: see
|
|
770
|
+
* {@link verdictPropsOf}.
|
|
771
|
+
*/
|
|
772
|
+
export declare const VERDICT_PROPS: string[];
|
|
773
|
+
/**
|
|
774
|
+
* {@link VERDICT_PROPS} plus what the REGISTERED rules make verdict-bearing.
|
|
775
|
+
*
|
|
776
|
+
* A framework background can carry visibility toggles, and one of them may be
|
|
777
|
+
* the toggle that shows the frontiers a rule measures against — hide the
|
|
778
|
+
* dashed columns of a Wardley map and the findings about them stop being
|
|
779
|
+
* findings ({@link backgroundTransitionBands}). Without this the toggle would be
|
|
780
|
+
* as inert as a colour: the marks would stay on screen until some unrelated
|
|
781
|
+
* drag happened to wake the engine, which is a board that lies about a document
|
|
782
|
+
* that has already changed.
|
|
783
|
+
*
|
|
784
|
+
* Derived from the DECLARATIONS the engine was handed, never from a name it
|
|
785
|
+
* knows: `backgroundTransitionVisibleProps` reads the prop each framework
|
|
786
|
+
* writes beside the line it gates. A framework whose background declares no
|
|
787
|
+
* toggle contributes nothing and the set is the constant.
|
|
788
|
+
*/
|
|
789
|
+
export declare function verdictPropsOf(rules: readonly ValidationRule[]): ReadonlySet<string>;
|
|
790
|
+
/**
|
|
791
|
+
* Whether an `elementUpdated` payload can have changed a verdict.
|
|
792
|
+
*
|
|
793
|
+
* It has to read `oldValues` as well as `props`, because a Y.Map **delete**
|
|
794
|
+
* fills only the former (`syncElementFromY` puts a key in `props` for `add` and
|
|
795
|
+
* `update` only). `validationExceptions` is the first {@link VERDICT_PROPS}
|
|
796
|
+
* entry whose normal life includes being removed — `xywh` and `rotate` are
|
|
797
|
+
* never deleted, `role` is only ever added — so this branch had never been
|
|
798
|
+
* exercised. Reading `props` alone means an UNDO of an exception, which deletes
|
|
799
|
+
* the key, wakes nothing: the board keeps showing a finding as excused when the
|
|
800
|
+
* document no longer says so, and its Revoke button becomes a no-op.
|
|
801
|
+
*
|
|
802
|
+
* A payload carrying neither is unreadable, so it counts as "might have": the
|
|
803
|
+
* cost of a spurious re-evaluation is a debounce tick, the cost of a missed one
|
|
804
|
+
* is a board that lies.
|
|
805
|
+
*/
|
|
806
|
+
export declare function touchesVerdict(payload: {
|
|
807
|
+
props?: Record<string, unknown>;
|
|
808
|
+
oldValues?: Record<string, unknown>;
|
|
809
|
+
}, watched?: ReadonlySet<string> | readonly string[]): boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Owns the evaluation and the reactive violation list. No-op until a framework
|
|
812
|
+
* registers a rule.
|
|
813
|
+
*/
|
|
814
|
+
export declare class ValidationManager extends InteractivityExtension {
|
|
815
|
+
static key: string;
|
|
816
|
+
/**
|
|
817
|
+
* Current violations. The reactive seam a host panel (wave 2) subscribes to;
|
|
818
|
+
* wave 1 ships only the canvas affordance.
|
|
819
|
+
*/
|
|
820
|
+
readonly violations$: import("@preact/signals-core").Signal<readonly Violation[]>;
|
|
821
|
+
/**
|
|
822
|
+
* Level 3 — what an AI audit reported, and ONLY that (PF14.1).
|
|
823
|
+
*
|
|
824
|
+
* A second signal rather than a marked subset of {@link violations$}, and the
|
|
825
|
+
* reason is the invariant the whole audit seam exists to protect: **the
|
|
826
|
+
* deterministic engine never depends on the AI**. Nothing in `evaluate()`
|
|
827
|
+
* reads this signal, writes it or is slowed by it; nothing here is ever
|
|
828
|
+
* recomputed, carried over by an incremental pass, or judged by a profile.
|
|
829
|
+
* The 16 ms budget is measured on a function that cannot see this field.
|
|
830
|
+
*
|
|
831
|
+
* Merging the two lists and discriminating by severity would have been
|
|
832
|
+
* cheaper to type and much more expensive to reason about: every consumer of
|
|
833
|
+
* `violations$` — the overlay, the timeline, the bubble, the exception
|
|
834
|
+
* toolbar, `userFacingViolations`, the incremental carry-over — would have
|
|
835
|
+
* had to learn to skip entries it must never touch, and forgetting one of
|
|
836
|
+
* them in some future slice would put a model's opinion behind a canvas
|
|
837
|
+
* bracket. Two signals make that a type error instead of a review.
|
|
838
|
+
*
|
|
839
|
+
* The findings ARE violation objects (`AuditFinding` is assignable to
|
|
840
|
+
* {@link Violation}, pinned by a test), so a host panel renders them with the
|
|
841
|
+
* code it already has. They are session state, never persisted: an audit is
|
|
842
|
+
* an opinion at a moment, and the document says what it contains, not what a
|
|
843
|
+
* model thought of it on Tuesday.
|
|
844
|
+
*/
|
|
845
|
+
readonly auditFindings$: import("@preact/signals-core").Signal<readonly AuditFinding[]>;
|
|
846
|
+
/**
|
|
847
|
+
* Publish an audit's results. The ONLY writer of {@link auditFindings$}, and
|
|
848
|
+
* deliberately dumb: it stores, it does not evaluate, re-judge or merge.
|
|
849
|
+
*
|
|
850
|
+
* Replaces rather than appends — a run's findings are a whole answer about
|
|
851
|
+
* the board as it was, so accumulating two runs would show a user a
|
|
852
|
+
* contradiction and call it a list.
|
|
853
|
+
*/
|
|
854
|
+
setAuditFindings(findings: readonly AuditFinding[]): void;
|
|
855
|
+
/**
|
|
856
|
+
* Which violations are still FRESH, i.e. still owed the loud bracket.
|
|
857
|
+
*
|
|
858
|
+
* It lives here rather than inside the overlay because the affordance has two
|
|
859
|
+
* halves on two different technologies — a canvas bracket that fades, and a
|
|
860
|
+
* DOM badge that takes over — and they are mutually exclusive: the badge
|
|
861
|
+
* appears only once the bracket is fully gone. Two copies of "when did I
|
|
862
|
+
* first see this" would drift, and the handover would show both at once or
|
|
863
|
+
* neither.
|
|
864
|
+
*
|
|
865
|
+
* Session state, never persisted: a document says which rules it breaks, not
|
|
866
|
+
* when you happened to look at them.
|
|
867
|
+
*/
|
|
868
|
+
readonly timeline: ViolationTimeline;
|
|
869
|
+
/**
|
|
870
|
+
* The last check-up (PF5.14), or `null` while none has been asked for.
|
|
871
|
+
*
|
|
872
|
+
* A SEPARATE signal from {@link violations$}, and that separation is the whole
|
|
873
|
+
* design: a remark never reaches the timeline, the bracket or the badge,
|
|
874
|
+
* because it never reaches the list those three read. "Outside the canvas
|
|
875
|
+
* affordance" is therefore a property of the wiring, not a filter somebody has
|
|
876
|
+
* to remember to apply.
|
|
877
|
+
*
|
|
878
|
+
* Reset to `null` on unmount and never persisted: a document says what it
|
|
879
|
+
* contains, not when somebody last checked it.
|
|
880
|
+
*/
|
|
881
|
+
readonly checkup$: import("@preact/signals-core").Signal<CheckupRun | null>;
|
|
882
|
+
/**
|
|
883
|
+
* The element whose Map quality panel is OPEN, or `null` — the seam between
|
|
884
|
+
* the toolbar entry that asks for it (`validation-toolbar.ts`, PF7.11) and the
|
|
885
|
+
* widget that draws it.
|
|
886
|
+
*
|
|
887
|
+
* A signal rather than a DOM call because the two live in different trees: the
|
|
888
|
+
* entry is a lit template inside `editor-menu-button`'s shadow root, and the
|
|
889
|
+
* panel is a widget on the root block. Session state, like every other "what
|
|
890
|
+
* is open" in this file.
|
|
891
|
+
*/
|
|
892
|
+
readonly mapQualityFor$: import("@preact/signals-core").Signal<string | null>;
|
|
893
|
+
private _pending;
|
|
894
|
+
/**
|
|
895
|
+
* Bumped by every {@link runCheckup}, so a run that yielded the thread can
|
|
896
|
+
* tell it has been superseded and drop its partial results on the floor
|
|
897
|
+
* instead of overwriting a newer answer.
|
|
898
|
+
*/
|
|
899
|
+
private _checkupGeneration;
|
|
900
|
+
/**
|
|
901
|
+
* How long {@link runCheckup} may hold the thread between two rules.
|
|
902
|
+
*
|
|
903
|
+
* Settable rather than fixed so the interruption and the supersession are
|
|
904
|
+
* TESTABLE with the rules a framework actually ships: at the shipped default
|
|
905
|
+
* the Wardley check-up costs half a millisecond and never yields, which would
|
|
906
|
+
* leave the whole race path unreached by anything. Dropped to zero, every rule
|
|
907
|
+
* becomes a slice.
|
|
908
|
+
*/
|
|
909
|
+
checkupSliceMs: number;
|
|
910
|
+
/**
|
|
911
|
+
* Element ids added, removed or updated since the last verdict — the dirty
|
|
912
|
+
* set of PF5.13. Filled by the subscriptions, drained by every evaluation.
|
|
913
|
+
*/
|
|
914
|
+
private _dirty;
|
|
915
|
+
/** Whether {@link violations$} holds a verdict a dirty set can build on. */
|
|
916
|
+
private _evaluated;
|
|
917
|
+
/**
|
|
918
|
+
* The ids that were framework BACKGROUNDS at the last evaluation.
|
|
919
|
+
*
|
|
920
|
+
* `no-overlap` already sends the surface back through a full sweep when a
|
|
921
|
+
* frame is touched, and it finds a DELETED one by looking for its id in the
|
|
922
|
+
* previous findings — the only trace a departed element leaves. That trace
|
|
923
|
+
* does not exist when the frame's profile put the rule on `'off'`: the
|
|
924
|
+
* findings measured against it were dropped by `applyProfiles`, so `previous`
|
|
925
|
+
* is empty, the deletion looks like an ordinary one, and the overlap that
|
|
926
|
+
* comes back to life under the default profile is never reported. No family
|
|
927
|
+
* can close that hole — an element that is gone from the surface AND absent
|
|
928
|
+
* from the findings is invisible to everything except a memory of it.
|
|
929
|
+
*
|
|
930
|
+
* So the manager keeps that memory. A dirty id that used to be a background
|
|
931
|
+
* forces the full pass, whatever the previous findings say or fail to say —
|
|
932
|
+
* which makes `incremental === full` true by construction rather than by the
|
|
933
|
+
* luck of no shipped profile using `'off'` yet.
|
|
934
|
+
*/
|
|
935
|
+
private _backgrounds;
|
|
936
|
+
private _rules;
|
|
937
|
+
/** Registered rules, resolved once. Empty when every framework is flagged off. */
|
|
938
|
+
private get _activeRules();
|
|
939
|
+
private _verdictProps;
|
|
940
|
+
/**
|
|
941
|
+
* The props worth re-evaluating for, given what is registered. Resolved once,
|
|
942
|
+
* beside the rules it is derived from — see {@link verdictPropsOf}.
|
|
943
|
+
*/
|
|
944
|
+
private get _watchedProps();
|
|
945
|
+
private _nudges;
|
|
946
|
+
/**
|
|
947
|
+
* Registered nudges, resolved once. Empty when no framework ships one, or
|
|
948
|
+
* when every framework is flagged off.
|
|
949
|
+
*/
|
|
950
|
+
private get _activeNudges();
|
|
951
|
+
private _profiles;
|
|
952
|
+
/**
|
|
953
|
+
* Registered profiles, resolved once. Empty when no framework ships one, in
|
|
954
|
+
* which case every rule is judged by its own declared severity.
|
|
955
|
+
*/
|
|
956
|
+
private get _activeProfiles();
|
|
957
|
+
private _subscriptions;
|
|
958
|
+
private _disposeSurfaceEffect;
|
|
959
|
+
private get _overlay();
|
|
960
|
+
mounted(): void;
|
|
961
|
+
unmounted(): void;
|
|
962
|
+
private _unsubscribe;
|
|
963
|
+
private _resubscribe;
|
|
964
|
+
private _schedule;
|
|
965
|
+
/**
|
|
966
|
+
* Evaluate now. Exposed so a host (and the bench) can drive it directly.
|
|
967
|
+
*
|
|
968
|
+
* `incremental` is the DEBOUNCED path's privilege and nobody else's: it is
|
|
969
|
+
* the only caller that knows exactly which elements moved since the last
|
|
970
|
+
* verdict. Everything else — a gesture that must land on the spot, a surface
|
|
971
|
+
* arriving, a host asking — pays for a full pass, because a full pass is
|
|
972
|
+
* always right and a wrong dirty set is a board that lies.
|
|
973
|
+
*/
|
|
974
|
+
evaluate(incremental?: boolean): void;
|
|
975
|
+
/** The registered rule with this id, if its framework is enabled. */
|
|
976
|
+
ruleOf(ruleId: string): ValidationRule | undefined;
|
|
977
|
+
/**
|
|
978
|
+
* The profiles selectable on `element`, i.e. those of every framework that
|
|
979
|
+
* measures against a background carrying this element's ROLE.
|
|
980
|
+
*
|
|
981
|
+
* Derived from the registered rules rather than from a second registry: a
|
|
982
|
+
* rule already names the role of the frame it measures against
|
|
983
|
+
* (`backgroundRole`), which is the only thing that makes an element a root
|
|
984
|
+
* instance in the engine's eyes. So the answer is gated for free — flag off,
|
|
985
|
+
* no rule, no profile offered — and a framework that ships profiles but no
|
|
986
|
+
* rule offers nothing to choose between, correctly.
|
|
987
|
+
*
|
|
988
|
+
* Empty for a neutral element, and for a background authored before its role
|
|
989
|
+
* existed: no role, no framework, no profile.
|
|
990
|
+
*/
|
|
991
|
+
profilesFor(element: GfxPrimitiveElementModel): readonly ValidationProfile[];
|
|
992
|
+
/**
|
|
993
|
+
* The frameworks `element` is a ROOT INSTANCE of, i.e. those with a registered
|
|
994
|
+
* rule measuring against a background carrying this element's role.
|
|
995
|
+
*
|
|
996
|
+
* The one test that decides whether an element is a framework's frame, and the
|
|
997
|
+
* only one: it is derived from the registered rules rather than from a second
|
|
998
|
+
* registry, so it is gated for free — flag off, no rule, no framework — and
|
|
999
|
+
* every per-instance surface (the profile picker, the nudge checklist, the
|
|
1000
|
+
* check-up) agrees about what a root instance is without any of them saying so
|
|
1001
|
+
* twice.
|
|
1002
|
+
*
|
|
1003
|
+
* Empty for a neutral element, and for a background authored before its role
|
|
1004
|
+
* existed.
|
|
1005
|
+
*/
|
|
1006
|
+
frameworksOf(element: GfxPrimitiveElementModel): ReadonlySet<string>;
|
|
1007
|
+
/**
|
|
1008
|
+
* The nudges offered on `element` (PF7.10), in declared order.
|
|
1009
|
+
*
|
|
1010
|
+
* Same derivation as {@link profilesFor} and gated the same way: a framework
|
|
1011
|
+
* that registers no nudge — or whose flag is off — offers none, and the ids
|
|
1012
|
+
* already ticked on the element stay written, unread, until it comes back.
|
|
1013
|
+
*/
|
|
1014
|
+
nudgesFor(element: GfxPrimitiveElementModel): readonly QualityNudge[];
|
|
1015
|
+
/** The on-demand rules a check-up on `element` would walk (PF5.14). */
|
|
1016
|
+
checkupRulesFor(element: GfxPrimitiveElementModel): readonly ValidationRule[];
|
|
1017
|
+
/**
|
|
1018
|
+
* Whether `element` has a Map quality panel to open at all: a framework of
|
|
1019
|
+
* its own declaring a NUDGE.
|
|
1020
|
+
*
|
|
1021
|
+
* The panel is the checklist and nothing else since the PO recette of
|
|
1022
|
+
* 02/08/2026, so this asks for the checklist and nothing else — a framework
|
|
1023
|
+
* that declared only on-demand rules would otherwise be offered a panel with
|
|
1024
|
+
* nothing in it. {@link checkupRulesFor} and {@link runCheckup} are unchanged
|
|
1025
|
+
* and unrelated: a host can still ask for a check-up, it simply is not what
|
|
1026
|
+
* this panel is.
|
|
1027
|
+
*
|
|
1028
|
+
* Generic by construction (PF7.11) — nothing here names a framework. A second
|
|
1029
|
+
* framework shipping nudges gets the entry and the panel with no code written
|
|
1030
|
+
* anywhere.
|
|
1031
|
+
*/
|
|
1032
|
+
hasMapQuality(element: GfxPrimitiveElementModel): boolean;
|
|
1033
|
+
/**
|
|
1034
|
+
* Open the Map quality panel on `element`; the widget draws it.
|
|
1035
|
+
*
|
|
1036
|
+
* Opening on a DIFFERENT instance forgets the last check-up. The panel already
|
|
1037
|
+
* refuses to render a run belonging to another map ({@link CheckupRun.backgroundId}),
|
|
1038
|
+
* so this is not what makes the display correct — it is what stops a result
|
|
1039
|
+
* measured on a map the user has moved on from (or deleted) sitting in memory
|
|
1040
|
+
* waiting to be shown again. Reopening on the SAME map keeps its stamp, which
|
|
1041
|
+
* is the one case where "last check-up: 01:51" is worth reading.
|
|
1042
|
+
*/
|
|
1043
|
+
openMapQuality(element: GfxPrimitiveElementModel): void;
|
|
1044
|
+
closeMapQuality(): void;
|
|
1045
|
+
/**
|
|
1046
|
+
* Drop the current check-up when it is about `backgroundId` — or, with
|
|
1047
|
+
* `unless`, when it is about anything else.
|
|
1048
|
+
*
|
|
1049
|
+
* The two callers are the two ways a run stops being about something the user
|
|
1050
|
+
* can look at: the instance it measured was deleted, and the panel moved to a
|
|
1051
|
+
* different instance.
|
|
1052
|
+
*/
|
|
1053
|
+
private _forgetCheckupOf;
|
|
1054
|
+
/**
|
|
1055
|
+
* Run the check-up on `element` (PF5.14).
|
|
1056
|
+
*
|
|
1057
|
+
* ## It is about ONE instance
|
|
1058
|
+
*
|
|
1059
|
+
* The walk covers the whole surface — that is where the elements are — but the
|
|
1060
|
+
* ANSWER is narrowed to the map that was asked about, on
|
|
1061
|
+
* {@link Violation.backgroundId}, which every family measuring against a frame
|
|
1062
|
+
* already records. A board carrying two Wardley maps holds two independent
|
|
1063
|
+
* answers, and handing the panel a tally over both would be exactly the
|
|
1064
|
+
* whole-surface count {@link evaluateMajorityFact} goes out of its way not to
|
|
1065
|
+
* compute. Narrowed HERE and not at the rendering: a run that reaches a host,
|
|
1066
|
+
* a report or the agent has to already be about one map.
|
|
1067
|
+
*
|
|
1068
|
+
* ## Why this is async, for two rules that take a microsecond
|
|
1069
|
+
*
|
|
1070
|
+
* Because the moment exists precisely so that a framework may ship a control
|
|
1071
|
+
* that does NOT fit a frame. A check-up walks the surface with no dirty set
|
|
1072
|
+
* and no budget over its head, and the honest way to offer that is to be
|
|
1073
|
+
* interruptible: the driver evaluates ONE RULE at a time — the smallest slice
|
|
1074
|
+
* that has a meaning — and yields the thread whenever the slice has held it
|
|
1075
|
+
* for {@link checkupSliceMs}. The panel sees `done` climb towards `total`, so
|
|
1076
|
+
* progress is the same value the results arrive in and there is no second
|
|
1077
|
+
* signal to keep in step.
|
|
1078
|
+
*
|
|
1079
|
+
* A run started while another is still yielding SUPERSEDES it: the older one
|
|
1080
|
+
* notices its generation is stale on its next slice and drops what it had.
|
|
1081
|
+
* Clicking twice therefore gives the second answer, never a race between two.
|
|
1082
|
+
*
|
|
1083
|
+
* ## A rule that throws
|
|
1084
|
+
*
|
|
1085
|
+
* ...ends the run, visibly. The failure must not leave the panel believing a
|
|
1086
|
+
* check-up is in flight — that reads as "Checking…" for ever and disables the
|
|
1087
|
+
* one button that could try again, on every map, until the editor is
|
|
1088
|
+
* remounted. So the run is finished with {@link CheckupRun.error} and whatever
|
|
1089
|
+
* it had managed to collect.
|
|
1090
|
+
*
|
|
1091
|
+
* @returns the finished run, or `null` if it was superseded or there was
|
|
1092
|
+
* nothing to run.
|
|
1093
|
+
*/
|
|
1094
|
+
runCheckup(element: GfxPrimitiveElementModel): Promise<CheckupRun | null>;
|
|
1095
|
+
/**
|
|
1096
|
+
* The profile `element` is actually checked against — the one it names, or
|
|
1097
|
+
* its framework's default. `undefined` when it is not a root instance of any
|
|
1098
|
+
* enabled framework, or when its framework ships no profile.
|
|
1099
|
+
*/
|
|
1100
|
+
profileOf(element: GfxPrimitiveElementModel): ValidationProfile | undefined;
|
|
1101
|
+
/**
|
|
1102
|
+
* Put `element` on `profileId`, and re-judge the board on the spot.
|
|
1103
|
+
*
|
|
1104
|
+
* Choosing the DEFAULT clears the key rather than writing it, so a background
|
|
1105
|
+
* that never left the default stays byte-identical to one created before
|
|
1106
|
+
* profiles existed — and a user who tries strict and comes back leaves no
|
|
1107
|
+
* trace. Everything else is one flat string in the same `@field()` the role
|
|
1108
|
+
* and the exceptions live in: it syncs, it undoes, it survives a copy and an
|
|
1109
|
+
* export, with no block schema change.
|
|
1110
|
+
*
|
|
1111
|
+
* Exceptions are deliberately left alone. A level of requirement is not an
|
|
1112
|
+
* amnesty: raising it must not resurrect decisions the user made, and
|
|
1113
|
+
* lowering it must not quietly delete them (PF9.3).
|
|
1114
|
+
*
|
|
1115
|
+
* @returns whether the document actually changed.
|
|
1116
|
+
*/
|
|
1117
|
+
setProfile(element: GfxPrimitiveElementModel, profileId: string): boolean;
|
|
1118
|
+
/**
|
|
1119
|
+
* Which elements an exception of the given scope is written on.
|
|
1120
|
+
*
|
|
1121
|
+
* `element` — the elements the rule actually indicts, which is what makes the
|
|
1122
|
+
* exception local (PF8.2): excusing one component says nothing about the next.
|
|
1123
|
+
*
|
|
1124
|
+
* `map` — the background element these findings were MEASURED AGAINST, and
|
|
1125
|
+
* only that one. It comes from {@link Violation.backgroundId}, recorded by the
|
|
1126
|
+
* rule family when it picked the frame, so a board carrying three maps holds
|
|
1127
|
+
* three independent arbitrations and a gesture made on one writes on one.
|
|
1128
|
+
* That choice is what lets a map-wide arbitration exist with NO block schema
|
|
1129
|
+
* change and no hidden per-document store: it is one more value in the same
|
|
1130
|
+
* `@field()`, on an element that is selected, copied, exported and deleted
|
|
1131
|
+
* like any other. A family that measures against no background records no
|
|
1132
|
+
* `backgroundId`, has no map to hang an exception on, and offers no map scope.
|
|
1133
|
+
*/
|
|
1134
|
+
private _targetsOf;
|
|
1135
|
+
/**
|
|
1136
|
+
* Grant or revoke `ruleId`'s exception at `scope`, over the elements the given
|
|
1137
|
+
* violations indict.
|
|
1138
|
+
*
|
|
1139
|
+
* Takes the whole set rather than one violation on purpose: a Wardley
|
|
1140
|
+
* component is a GROUP, so one bubble line can stand for several indicted
|
|
1141
|
+
* members, and one click has to settle all of them.
|
|
1142
|
+
*
|
|
1143
|
+
* Re-evaluates on the spot instead of waiting for the 120 ms debounce the
|
|
1144
|
+
* field write would trigger anyway — the gesture must apply immediately
|
|
1145
|
+
* (PF8.1).
|
|
1146
|
+
*
|
|
1147
|
+
* @returns the elements actually written to, so the caller can tell a real
|
|
1148
|
+
* arbitration from a no-op and only report the former.
|
|
1149
|
+
*/
|
|
1150
|
+
setException(violations: readonly Violation[], scope: ExemptionScope, granted: boolean, author?: string): GfxPrimitiveElementModel[];
|
|
1151
|
+
/**
|
|
1152
|
+
* The exceptions on `element` that can still be taken back — those it answers
|
|
1153
|
+
* for ({@link exceptionsAnchoredOn}) whose rule is actually REGISTERED.
|
|
1154
|
+
*
|
|
1155
|
+
* The rule filter is what makes the menu entry disappear with the framework:
|
|
1156
|
+
* flag off, no rule reaches the container, so there is nothing to arbitrate
|
|
1157
|
+
* on and nothing to offer. The exceptions themselves are untouched — they are
|
|
1158
|
+
* document data and outlive the tooling (PF8.6).
|
|
1159
|
+
*/
|
|
1160
|
+
revocableExceptionsOn(element: GfxPrimitiveElementModel): AnchoredException[];
|
|
1161
|
+
/**
|
|
1162
|
+
* Take back every exception `element` answers for, in one gesture.
|
|
1163
|
+
*
|
|
1164
|
+
* @returns one entry per (rule, scope) actually written, so the caller can
|
|
1165
|
+
* report the arbitration and tell a real one from a no-op.
|
|
1166
|
+
*/
|
|
1167
|
+
revokeExceptionsOn(element: GfxPrimitiveElementModel): RevokedException[];
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* What SHAPE the anchor is, and therefore where its persistent badge belongs.
|
|
1171
|
+
*
|
|
1172
|
+
* The same split {@link RoleKind} makes for MEASURING, made here for MARKING,
|
|
1173
|
+
* and for the same reason: the bounding box of a diagonal link covers half the
|
|
1174
|
+
* map, so its top-right corner is a point on the white paper with nothing under
|
|
1175
|
+
* it. The PO's capture of 02/08 is exactly that — an amber dot floating a
|
|
1176
|
+
* hundred units away from the trait it accuses.
|
|
1177
|
+
*
|
|
1178
|
+
* - `node` — marked on the top-right corner of its bounds, as before.
|
|
1179
|
+
* - `edge` — marked on the MIDDLE of the link: the midpoint of the drawn path
|
|
1180
|
+
* when the element exposes one, and otherwise the intersection of the
|
|
1181
|
+
* bounding rectangle's diagonals, which is its centre.
|
|
1182
|
+
*/
|
|
1183
|
+
export type ViolationAnchorKind = 'node' | 'edge';
|
|
1184
|
+
/**
|
|
1185
|
+
* One anchor and everything reported against it: where to draw, and what the
|
|
1186
|
+
* detail bubble has to list when the badge on it is clicked.
|
|
1187
|
+
*/
|
|
1188
|
+
export interface ViolationAnchor {
|
|
1189
|
+
/** The element the mark is drawn on — the outermost group, or the element. */
|
|
1190
|
+
id: string;
|
|
1191
|
+
bound: Bound;
|
|
1192
|
+
/** What the mark is pinned to. See {@link ViolationAnchorKind}. */
|
|
1193
|
+
kind: ViolationAnchorKind;
|
|
1194
|
+
/**
|
|
1195
|
+
* Where the persistent badge is pinned, in MODEL space — the one point both
|
|
1196
|
+
* the badge and the bubble it opens are laid out from.
|
|
1197
|
+
*
|
|
1198
|
+
* Computed here rather than by the widget so it is one pure function of the
|
|
1199
|
+
* document, testable with asserted coordinates and identical for every
|
|
1200
|
+
* surface that ever draws a mark.
|
|
1201
|
+
*/
|
|
1202
|
+
markAt: [number, number];
|
|
1203
|
+
violations: Violation[];
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* Group violations by the anchor their mark is drawn on — one entry per
|
|
1207
|
+
* anchor, so several violating members of the same group share a single
|
|
1208
|
+
* bracket, a single badge and a single bubble.
|
|
1209
|
+
*
|
|
1210
|
+
* Pure and stateless, and called at paint time by both halves of the
|
|
1211
|
+
* affordance, so the mark follows a group that moves and falls back onto the
|
|
1212
|
+
* element the moment the group is dissolved, with nothing to invalidate.
|
|
1213
|
+
*
|
|
1214
|
+
* @param vocabularies the registered role vocabularies, for the SEMANTIC half
|
|
1215
|
+
* of "is this an edge" ({@link anchorKindOf}). Optional: a caller that only
|
|
1216
|
+
* reads `bound` — the canvas overlay draws the same bracket either way — needs
|
|
1217
|
+
* none, and still gets the geometric answer.
|
|
1218
|
+
*/
|
|
1219
|
+
export declare function resolveViolationAnchors(violations: readonly Violation[], surface: SurfaceBlockModel, vocabularies?: readonly RoleDefs[]): ViolationAnchor[];
|
|
1220
|
+
/**
|
|
1221
|
+
* Violations the drawing user is meant to SEE. `audit` is collected for
|
|
1222
|
+
* reporting and stays invisible on the canvas — that is what the severity
|
|
1223
|
+
* means (see {@link ViolationSeverity}), and the UI is the only place that can
|
|
1224
|
+
* honour it: the engine reports everything, unfiltered, to the host panel.
|
|
1225
|
+
*/
|
|
1226
|
+
export declare function userFacingViolations(violations: readonly Violation[]): Violation[];
|
|
1227
|
+
/**
|
|
1228
|
+
* Violations still asking for something, i.e. not covered by an exception.
|
|
1229
|
+
*
|
|
1230
|
+
* This is the whole of PF8's canvas behaviour: an exempted finding is dropped
|
|
1231
|
+
* from the timeline, so it never flashes, and from the overlay, so it carries no
|
|
1232
|
+
* bracket. It keeps its badge and its line in the bubble, where it reads as
|
|
1233
|
+
* "exception" and can be revoked — the state changed, the finding did not
|
|
1234
|
+
* disappear.
|
|
1235
|
+
*/
|
|
1236
|
+
export declare function liveViolations(violations: readonly Violation[]): Violation[];
|
|
1237
|
+
/**
|
|
1238
|
+
* One violation per RULE, first occurrence wins.
|
|
1239
|
+
*
|
|
1240
|
+
* What a detail bubble renders is rule-level — a label, a severity, a hint —
|
|
1241
|
+
* so two components of the same group both drawn off the map, which are two
|
|
1242
|
+
* violations, would produce the same sentence twice. The engine is right to
|
|
1243
|
+
* report both (it names the elements); a list that repeats itself is just
|
|
1244
|
+
* noise. Which member moved is on the canvas, not in a list.
|
|
1245
|
+
*/
|
|
1246
|
+
export declare function distinctByRule(violations: readonly Violation[]): Violation[];
|
|
1247
|
+
/**
|
|
1248
|
+
* How loudly an ANCHOR is drawn: the loudest of the violations sharing it, so
|
|
1249
|
+
* a fresh finding is not muted by an older one on the same group.
|
|
1250
|
+
*
|
|
1251
|
+
* The single arbiter between the two markers. `> 0` means the bracket still has
|
|
1252
|
+
* the anchor; exactly `0` means it is done and the badge takes over. Both
|
|
1253
|
+
* halves call this, on the same timeline, so they can never both claim it.
|
|
1254
|
+
*/
|
|
1255
|
+
export declare function anchorEmphasis(anchor: ViolationAnchor, timeline: ViolationTimeline, now: number): number;
|
|
1256
|
+
/**
|
|
1257
|
+
* Gap between the anchor's bounds and the mark, in MODEL units. Exported
|
|
1258
|
+
* because the badge sits ON the bracket's top-right corner and has to use the
|
|
1259
|
+
* same gap to land there.
|
|
1260
|
+
*/
|
|
1261
|
+
export declare const VIOLATION_MARK_PADDING = 6;
|
|
1262
|
+
/** Diameter of the persistent badge, in MODEL units. */
|
|
1263
|
+
export declare const VIOLATION_BADGE_SIZE = 16;
|
|
1264
|
+
/** The one amber the affordance is drawn in, canvas and DOM alike. */
|
|
1265
|
+
export declare const VIOLATION_MARK_COLOR = "#f5a623";
|
|
1266
|
+
/**
|
|
1267
|
+
* The EPHEMERAL half of the PF7 affordance: amber corner brackets that flash on
|
|
1268
|
+
* the anchor of a violation the moment it appears, hold for a few seconds, then
|
|
1269
|
+
* fade out (see {@link ViolationTimeline}). What stays behind afterwards is the
|
|
1270
|
+
* badge — `affine-violation-detail-widget`, a DOM sibling of this overlay.
|
|
1271
|
+
*
|
|
1272
|
+
* The handover is strict: an anchor whose emphasis has reached zero is skipped
|
|
1273
|
+
* here and picked up by the badge, so the two markers are never on screen at
|
|
1274
|
+
* the same time. {@link anchorEmphasis} is the single arbiter, read from the
|
|
1275
|
+
* one timeline the manager owns.
|
|
1276
|
+
*
|
|
1277
|
+
* An overlay rather than a renderer change: it touches no element model, writes
|
|
1278
|
+
* nothing to the document, creates no undo entry, and disappears with the rule
|
|
1279
|
+
* that produced it. The fade is session state too — nothing about "when did I
|
|
1280
|
+
* first see this" ever reaches the document.
|
|
1281
|
+
*
|
|
1282
|
+
* The mark is anchored on the outermost enclosing canvas group rather than on
|
|
1283
|
+
* the bare element — see {@link resolveMarkAnchors}. Evaluation is untouched by
|
|
1284
|
+
* this: it stays on the element carrying the role, because its position is what
|
|
1285
|
+
* the rule is about.
|
|
1286
|
+
*/
|
|
1287
|
+
export declare class ValidationOverlay extends Overlay {
|
|
1288
|
+
static overlayName: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* The violations themselves — NOT their bounds, and not their groups either.
|
|
1291
|
+
* Both are resolved at paint time so the mark tracks what it accuses:
|
|
1292
|
+
* evaluation is debounced, the renderer is not, so a frozen snapshot would
|
|
1293
|
+
* leave the bracket behind at the drag's starting point until 120 ms after
|
|
1294
|
+
* the user let go — and a dissolved group would keep framing nothing.
|
|
1295
|
+
*/
|
|
1296
|
+
private _violations;
|
|
1297
|
+
/**
|
|
1298
|
+
* Handed in with the violations by {@link ValidationManager}, which owns it —
|
|
1299
|
+
* the DOM badge reads the same instance, and the two markers must never
|
|
1300
|
+
* disagree about whether the bracket is done.
|
|
1301
|
+
*/
|
|
1302
|
+
private _timeline;
|
|
1303
|
+
/** Armed only while something is still fading. */
|
|
1304
|
+
private _frame;
|
|
1305
|
+
/**
|
|
1306
|
+
* Whether the renderer this overlay paints into is gone.
|
|
1307
|
+
*
|
|
1308
|
+
* It matters because the two ends of the affordance are on different
|
|
1309
|
+
* lifecycles: the overlay dies with the surface COMPONENT (the renderer
|
|
1310
|
+
* disposes it), while {@link ValidationManager} lives on the gfx scope and
|
|
1311
|
+
* keeps its subscriptions on the surface MODEL, which outlives the component.
|
|
1312
|
+
* So an evaluation can perfectly well land here after teardown — switch to
|
|
1313
|
+
* page mode, edit the doc — and without this flag it would arm an animation
|
|
1314
|
+
* loop repainting a dead renderer sixty times a second for three seconds.
|
|
1315
|
+
*
|
|
1316
|
+
* Not permanent: the overlay is a DI singleton and is handed a new renderer
|
|
1317
|
+
* if the surface comes back.
|
|
1318
|
+
*/
|
|
1319
|
+
private _detached;
|
|
1320
|
+
private readonly _onFrame;
|
|
1321
|
+
/**
|
|
1322
|
+
* Repaint, and keep repainting for as long as a mark is inside its window.
|
|
1323
|
+
*
|
|
1324
|
+
* This is the only clock the affordance runs, and it stops on its own: a
|
|
1325
|
+
* board with no violation, or whose violations have all settled, requests no
|
|
1326
|
+
* animation frame at all.
|
|
1327
|
+
*/
|
|
1328
|
+
private _schedule;
|
|
1329
|
+
private _cancelFrame;
|
|
1330
|
+
private _forget;
|
|
1331
|
+
/**
|
|
1332
|
+
* @param violations already filtered to what the user is meant to see.
|
|
1333
|
+
* @param timeline the manager's, already synced against these violations.
|
|
1334
|
+
*/
|
|
1335
|
+
setViolations(violations: readonly Violation[], timeline: ViolationTimeline): void;
|
|
1336
|
+
setRenderer(renderer: CanvasRenderer | null): void;
|
|
1337
|
+
clear(): void;
|
|
1338
|
+
dispose(): void;
|
|
1339
|
+
render(ctx: CanvasRenderingContext2D, _rc: RoughCanvas): void;
|
|
1340
|
+
}
|