@formicoidea/labre-core 0.42.0 → 0.45.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/utils.js +4 -0
- package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +17 -4
- package/dist/_pkgs/affine-block-callout/commands/turn-into-callout.d.ts +29 -0
- package/dist/_pkgs/affine-block-callout/commands/turn-into-callout.js +81 -0
- package/dist/_pkgs/affine-block-callout/configs/slash-menu.js +6 -4
- package/dist/_pkgs/affine-block-callout/configs/turn-into.d.ts +8 -0
- package/dist/_pkgs/affine-block-callout/configs/turn-into.js +19 -0
- package/dist/_pkgs/affine-block-callout/translations.d.ts +4 -2
- package/dist/_pkgs/affine-block-callout/translations.js +4 -2
- package/dist/_pkgs/affine-block-callout/view.js +3 -0
- package/dist/_pkgs/affine-block-code/code-block-service.d.ts +13 -0
- package/dist/_pkgs/affine-block-code/code-block-service.js +26 -0
- package/dist/_pkgs/affine-block-code/code-block.d.ts +6 -0
- package/dist/_pkgs/affine-block-code/code-block.js +11 -2
- package/dist/_pkgs/affine-block-code/code-toolbar/components/lang-button.js +31 -8
- package/dist/_pkgs/affine-block-data-view/configs/tooltips.js +1 -1
- package/dist/_pkgs/affine-block-database/configs/tooltips.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +4 -2
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.d.ts +11 -0
- package/dist/_pkgs/affine-block-edgeless-text/svg-painter.d.ts +20 -0
- package/dist/_pkgs/affine-block-edgeless-text/svg-painter.js +76 -0
- package/dist/_pkgs/affine-block-edgeless-text/view.js +2 -0
- package/dist/_pkgs/affine-block-embed/common/iframe-sandbox.d.ts +39 -0
- package/dist/_pkgs/affine-block-embed/common/iframe-sandbox.js +39 -0
- package/dist/_pkgs/affine-block-embed/configs/toolbar.js +11 -2
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-block.js +2 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.d.ts +14 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.js +21 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +11 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.d.ts +0 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.js +2 -5
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +14 -6
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/types.d.ts +16 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/types.js +17 -1
- package/dist/_pkgs/affine-block-embed/embed-loom-block/embed-loom-block.js +2 -0
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/embed-youtube-block.js +2 -0
- package/dist/_pkgs/affine-block-embed/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-embed/index.js +1 -0
- package/dist/_pkgs/affine-block-embed/translations.d.ts +8 -0
- package/dist/_pkgs/affine-block-embed/translations.js +28 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-edgeless-linked-doc-block.js +3 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +4 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +7 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-edgeless-synced-doc-block.js +3 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +2 -2
- package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +5 -0
- package/dist/_pkgs/affine-block-frame/frame-manager.js +53 -19
- package/dist/_pkgs/affine-block-frame/frame-tool.js +3 -1
- package/dist/_pkgs/affine-block-image/utils.js +4 -1
- package/dist/_pkgs/affine-block-latex/adapters/markdown/preprocessor.d.ts +8 -0
- package/dist/_pkgs/affine-block-latex/adapters/markdown/preprocessor.js +9 -5
- package/dist/_pkgs/affine-block-list/utils/get-list-icon.js +3 -1
- package/dist/_pkgs/affine-block-note/configs/tooltips.js +1 -1
- package/dist/_pkgs/affine-block-note/translations.d.ts +0 -1
- package/dist/_pkgs/affine-block-note/translations.js +0 -5
- package/dist/_pkgs/affine-block-root/adapters/html.js +2 -2
- package/dist/_pkgs/affine-block-root/commands/copy-link-commands.d.ts +2 -0
- package/dist/_pkgs/affine-block-root/commands/copy-link-commands.js +155 -0
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +17 -1
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/clipboard.js +2 -1
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/command.js +161 -83
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/paste-order.d.ts +21 -0
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/paste-order.js +85 -0
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.d.ts +6 -0
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +18 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.d.ts +9 -0
- package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.js +28 -0
- package/dist/_pkgs/affine-block-root/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-root/index.js +1 -0
- package/dist/_pkgs/affine-block-root/keyboard/commands.js +9 -6
- package/dist/_pkgs/affine-block-root/preview/edgeless-root-preview-block.js +15 -2
- package/dist/_pkgs/affine-block-root/view.js +2 -0
- package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.d.ts +1 -1
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-surface/element-model/index.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +13 -61
- package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/commands.d.ts +2 -0
- package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/commands.js +71 -0
- package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/clipboard-config.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.d.ts +12 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +27 -7
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.d.ts +2 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.js +22 -3
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.d.ts +6 -3
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.js +4 -2
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/parts.d.ts +63 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/parts.js +67 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.d.ts +62 -5
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.js +98 -18
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.d.ts +14 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.js +82 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.d.ts +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.js +112 -10
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/translations.d.ts +13 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/translations.js +33 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +3 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +3 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +13 -1
- package/dist/_pkgs/affine-block-surface/extensions/legend.d.ts +8 -0
- package/dist/_pkgs/affine-block-surface/extensions/legend.js +59 -3
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.d.ts +13 -6
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +26 -10
- package/dist/_pkgs/affine-block-surface/extensions/reading.d.ts +82 -6
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +99 -21
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/actions.d.ts +80 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/actions.js +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.d.ts +82 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.js +342 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/index.d.ts +3 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/index.js +3 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/tree.d.ts +137 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/tree.js +323 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.d.ts +3 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.js +23 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +112 -4
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +98 -19
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/actions.d.ts +76 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/actions.js +299 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/active-layer.d.ts +20 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/active-layer.js +34 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/commands.d.ts +67 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/commands.js +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/creation.d.ts +40 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/creation.js +69 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/index.d.ts +5 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/index.js +5 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/translations.d.ts +10 -0
- package/dist/_pkgs/affine-block-surface/extensions/user-layers/translations.js +14 -0
- package/dist/_pkgs/affine-block-surface/framework-background/background-view.js +1 -1
- package/dist/_pkgs/affine-block-surface/framework-background/facts.d.ts +55 -2
- package/dist/_pkgs/affine-block-surface/framework-background/facts.js +63 -1
- package/dist/_pkgs/affine-block-surface/framework-background/fit.d.ts +36 -0
- package/dist/_pkgs/affine-block-surface/framework-background/fit.js +30 -0
- package/dist/_pkgs/affine-block-surface/framework-background/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/framework-background/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/framework-background/stacking.d.ts +16 -8
- package/dist/_pkgs/affine-block-surface/framework-background/stacking.js +26 -14
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.js +17 -3
- package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.d.ts +3 -1
- package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.js +22 -2
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +2 -7
- package/dist/_pkgs/affine-block-surface/renderer/paint-predicate.d.ts +30 -0
- package/dist/_pkgs/affine-block-surface/renderer/paint-predicate.js +29 -0
- package/dist/_pkgs/affine-block-surface/surface-block.js +6 -0
- package/dist/_pkgs/affine-block-surface/surface-model.js +5 -0
- package/dist/_pkgs/affine-block-surface/surface-transformer.js +5 -0
- package/dist/_pkgs/affine-block-surface/tool/default-tool.js +28 -5
- package/dist/_pkgs/affine-block-surface/view.js +23 -1
- package/dist/_pkgs/affine-block-surface-ref/configs/tooltips.js +2 -2
- package/dist/_pkgs/affine-block-surface-ref/surface-ref-block.js +12 -2
- package/dist/_pkgs/affine-components/color-picker/palette-carousel.js +5 -0
- package/dist/_pkgs/affine-components/color-picker/styles.js +1 -1
- package/dist/_pkgs/affine-components/context-menu/button.js +17 -1
- package/dist/_pkgs/affine-components/filterable-list/index.js +30 -9
- package/dist/_pkgs/affine-components/icons/ai.js +3 -3
- package/dist/_pkgs/affine-components/icons/index.d.ts +0 -1
- package/dist/_pkgs/affine-components/icons/index.js +0 -1
- package/dist/_pkgs/affine-components/icons/list.js +7 -1
- package/dist/_pkgs/affine-components/icons/text.d.ts +1 -0
- package/dist/_pkgs/affine-components/icons/text.js +11 -0
- package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.js +6 -1
- package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/toolbar/index.js +1 -1
- package/dist/_pkgs/affine-components/toolbar/menu-button.d.ts +7 -0
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +30 -0
- package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +16 -1
- package/dist/_pkgs/affine-components/toolbar/picker-menu.js +2 -2
- package/dist/_pkgs/affine-components/toolbar/toolbar.d.ts +1 -0
- package/dist/_pkgs/affine-components/toolbar/toolbar.js +67 -0
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.d.ts +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title-editor.js +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card.js +3 -3
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +8 -27
- package/dist/_pkgs/affine-fragment-frame-panel/index.d.ts +1 -0
- package/dist/_pkgs/affine-fragment-frame-panel/index.js +1 -0
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/eraser/icons.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.d.ts +11 -2
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +11 -2
- package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.js +3 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +21 -4
- package/dist/_pkgs/affine-gfx-connector/text/edgeless-connector-label-editor.js +6 -4
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +24 -8
- package/dist/_pkgs/affine-gfx-connector/translations.d.ts +3 -0
- package/dist/_pkgs/affine-gfx-connector/translations.js +23 -0
- package/dist/_pkgs/affine-gfx-group/command/group-api.js +52 -1
- package/dist/_pkgs/affine-gfx-mindmap/indicator-overlay/index.js +6 -2
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/config.js +4 -2
- package/dist/_pkgs/affine-gfx-mindmap/translations.d.ts +6 -0
- package/dist/_pkgs/affine-gfx-mindmap/translations.js +10 -0
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/index.js +21 -3
- package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +2 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/config.js +5 -3
- package/dist/_pkgs/affine-gfx-shape/translations.d.ts +7 -0
- package/dist/_pkgs/affine-gfx-shape/translations.js +11 -0
- package/dist/_pkgs/affine-gfx-template/builtin/other.js +13 -7
- package/dist/_pkgs/affine-gfx-template/services/template-middlewares.d.ts +9 -0
- package/dist/_pkgs/affine-gfx-template/services/template-middlewares.js +23 -1
- package/dist/_pkgs/affine-gfx-template/services/template.js +2 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-loading.js +1 -1
- package/dist/_pkgs/affine-gfx-template/translations.d.ts +5 -0
- package/dist/_pkgs/affine-gfx-template/translations.js +38 -0
- package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.js +5 -3
- package/dist/_pkgs/affine-gfx-text/element-renderer/index.js +20 -3
- package/dist/_pkgs/affine-gfx-text/element-renderer/utils.d.ts +67 -1
- package/dist/_pkgs/affine-gfx-text/element-renderer/utils.js +101 -0
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.d.ts +11 -0
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +56 -3
- package/dist/_pkgs/affine-gfx-text/toolbar/config.d.ts +11 -0
- package/dist/_pkgs/affine-gfx-text/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-text/translations.d.ts +8 -0
- package/dist/_pkgs/affine-gfx-text/translations.js +12 -0
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-editor-menu.js +2 -1
- package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.d.ts +3 -0
- package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.js +31 -0
- package/dist/_pkgs/affine-inline-preset/adapters/html/inline-delta.d.ts +4 -0
- package/dist/_pkgs/affine-inline-preset/adapters/html/inline-delta.js +14 -0
- package/dist/_pkgs/affine-inline-preset/command/config.js +21 -3
- package/dist/_pkgs/affine-inline-preset/command/index.d.ts +1 -1
- package/dist/_pkgs/affine-inline-preset/command/index.js +1 -1
- package/dist/_pkgs/affine-inline-preset/command/text-style.d.ts +2 -1
- package/dist/_pkgs/affine-inline-preset/command/text-style.js +1 -0
- package/dist/_pkgs/affine-inline-preset/default-inline-manager.js +2 -1
- package/dist/_pkgs/affine-inline-preset/inline-spec.d.ts +4 -0
- package/dist/_pkgs/affine-inline-preset/inline-spec.js +14 -0
- package/dist/_pkgs/affine-inline-preset/translations.d.ts +2 -2
- package/dist/_pkgs/affine-inline-preset/translations.js +2 -2
- package/dist/_pkgs/affine-model/blocks/attachment/attachment-model.js +2 -0
- package/dist/_pkgs/affine-model/blocks/bookmark/bookmark-model.js +2 -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 +2 -0
- package/dist/_pkgs/affine-model/blocks/embed/iframe/iframe-model.js +2 -0
- package/dist/_pkgs/affine-model/blocks/frame/frame-model.js +2 -0
- package/dist/_pkgs/affine-model/blocks/image/image-model.js +2 -0
- package/dist/_pkgs/affine-model/blocks/latex/latex-model.js +2 -0
- package/dist/_pkgs/affine-model/blocks/note/note-model.js +2 -0
- package/dist/_pkgs/affine-model/consts/text.d.ts +41 -2
- package/dist/_pkgs/affine-model/consts/text.js +50 -1
- package/dist/_pkgs/affine-model/elements/shape/shape.d.ts +6 -1
- package/dist/_pkgs/affine-model/elements/shape/shape.js +14 -1
- package/dist/_pkgs/affine-model/elements/text/text.d.ts +6 -1
- package/dist/_pkgs/affine-model/elements/text/text.js +13 -1
- package/dist/_pkgs/affine-model/utils/helper.js +2 -0
- package/dist/_pkgs/affine-rich-text/conversion.d.ts +25 -0
- package/dist/_pkgs/affine-rich-text/conversion.js +9 -0
- package/dist/_pkgs/affine-rich-text/index.d.ts +1 -1
- package/dist/_pkgs/affine-rich-text/index.js +1 -1
- package/dist/_pkgs/affine-shared/commands/model-crud/replace-selected-text-with-blocks.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/canvas-grid.d.ts +63 -0
- package/dist/_pkgs/affine-shared/services/canvas-grid.js +109 -0
- package/dist/_pkgs/affine-shared/services/canvas-local-visibility.d.ts +64 -0
- package/dist/_pkgs/affine-shared/services/canvas-local-visibility.js +192 -0
- package/dist/_pkgs/affine-shared/services/edit-props-store.d.ts +27 -0
- package/dist/_pkgs/affine-shared/services/edit-props-store.js +34 -0
- package/dist/_pkgs/affine-shared/services/editor-setting-service.d.ts +3 -0
- package/dist/_pkgs/affine-shared/services/editor-setting-service.js +7 -0
- package/dist/_pkgs/affine-shared/services/feature-flag-service.d.ts +4 -0
- package/dist/_pkgs/affine-shared/services/font-loader/config.d.ts +13 -2
- package/dist/_pkgs/affine-shared/services/font-loader/config.js +43 -54
- package/dist/_pkgs/affine-shared/services/index.d.ts +3 -0
- package/dist/_pkgs/affine-shared/services/index.js +3 -0
- package/dist/_pkgs/affine-shared/services/selection-pane-service.d.ts +44 -0
- package/dist/_pkgs/affine-shared/services/selection-pane-service.js +28 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +69 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/telemetry-service.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/theme-service.d.ts +19 -0
- package/dist/_pkgs/affine-shared/services/theme-service.js +24 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +25 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +90 -0
- package/dist/_pkgs/affine-shared/styles/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/styles/index.js +1 -0
- package/dist/_pkgs/affine-shared/styles/panel-header.d.ts +31 -0
- package/dist/_pkgs/affine-shared/styles/panel-header.js +61 -0
- package/dist/_pkgs/affine-shared/styles/text.js +7 -7
- package/dist/_pkgs/affine-shared/types/index.d.ts +6 -0
- package/dist/_pkgs/affine-shared/utils/canvas-export-colors.d.ts +26 -0
- package/dist/_pkgs/affine-shared/utils/canvas-export-colors.js +127 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +8 -11
- package/dist/_pkgs/affine-shared/utils/file/filesys.js +8 -11
- package/dist/_pkgs/affine-shared/utils/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/utils/index.js +2 -0
- package/dist/_pkgs/affine-shared/utils/label-mode.d.ts +47 -0
- package/dist/_pkgs/affine-shared/utils/label-mode.js +55 -0
- package/dist/_pkgs/affine-shared/utils/model/merge-to-code-model.js +7 -1
- package/dist/_pkgs/affine-shared/utils/model/transform-model.js +5 -0
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/utils.js +15 -4
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +25 -49
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/types.d.ts +15 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.d.ts +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.js +7 -2
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-family-panel.d.ts +18 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-family-panel.js +52 -6
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/drop.d.ts +61 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/drop.js +91 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/labels.d.ts +17 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/labels.js +95 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-default.d.ts +10 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-default.js +31 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-tool.d.ts +26 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-tool.js +82 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-widget.d.ts +170 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-widget.js +1381 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.d.ts +58 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.js +171 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +10 -0
- package/dist/_pkgs/affine-widget-frame-title/edgeless-frame-title-editor.js +2 -1
- package/dist/_pkgs/affine-widget-note-slicer/note-slicer.js +7 -3
- package/dist/_pkgs/affine-widget-slash-menu/translations.d.ts +16 -0
- package/dist/_pkgs/affine-widget-slash-menu/translations.js +23 -1
- package/dist/_pkgs/affine-widget-toolbar/utils.js +57 -14
- package/dist/_pkgs/data-view/core/detail/field.js +2 -1
- package/dist/_pkgs/data-view/core/filter/literal/define.js +3 -1
- package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +1 -1
- package/dist/_pkgs/data-view/property-presets/checkbox/cell-renderer.js +8 -2
- package/dist/_pkgs/data-view/view-presets/kanban/pc/cell.js +1 -1
- package/dist/_pkgs/data-view/view-presets/kanban/pc/controller/drag.js +2 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/drag.js +2 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/selection.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/header/vertical-indicator.js +2 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row-select-checkbox.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/drag.js +2 -1
- 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/group/top/header/vertical-indicator.js +2 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/row-header.js +3 -1
- package/dist/_pkgs/std/gfx/controller.d.ts +13 -0
- package/dist/_pkgs/std/gfx/controller.js +22 -2
- package/dist/_pkgs/std/gfx/grid.d.ts +31 -2
- package/dist/_pkgs/std/gfx/index.d.ts +3 -1
- package/dist/_pkgs/std/gfx/index.js +3 -1
- package/dist/_pkgs/std/gfx/interactivity/manager.js +7 -0
- package/dist/_pkgs/std/gfx/layer.js +73 -5
- package/dist/_pkgs/std/gfx/local-visibility.d.ts +88 -0
- package/dist/_pkgs/std/gfx/local-visibility.js +217 -0
- package/dist/_pkgs/std/gfx/model/gfx-block-model.d.ts +13 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +34 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +65 -1
- package/dist/_pkgs/std/gfx/model/surface/role.d.ts +10 -5
- package/dist/_pkgs/std/gfx/model/surface/surface-model.d.ts +27 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +43 -0
- package/dist/_pkgs/std/gfx/model/surface/user-layers.d.ts +68 -0
- package/dist/_pkgs/std/gfx/model/surface/user-layers.js +127 -0
- package/dist/_pkgs/std/utils/layer.d.ts +10 -0
- package/dist/_pkgs/std/utils/layer.js +64 -13
- package/dist/_pkgs/std/view/element/gfx-block-component.js +10 -2
- package/dist/commands.js +6 -2
- package/dist/translations.js +15 -6
- package/package.json +13 -2
- package/dist/_pkgs/affine-components/icons/file-icons-rc.d.ts +0 -1
- package/dist/_pkgs/affine-components/icons/file-icons-rc.js +0 -130
- package/dist/_pkgs/affine-shared/test-utils/affine-template.d.ts +0 -6
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +0 -258
- package/dist/_pkgs/affine-shared/test-utils/affine-test-utils.d.ts +0 -8
- package/dist/_pkgs/affine-shared/test-utils/affine-test-utils.js +0 -81
- package/dist/_pkgs/affine-shared/test-utils/create-test-host.d.ts +0 -23
- package/dist/_pkgs/affine-shared/test-utils/create-test-host.js +0 -187
- package/dist/_pkgs/affine-shared/test-utils/index.d.ts +0 -3
- package/dist/_pkgs/affine-shared/test-utils/index.js +0 -3
|
@@ -10,8 +10,14 @@ export const fontConfigSchema = z.object({
|
|
|
10
10
|
* The AFFiNE-hosted mirror. It carries strictly fewer files than the community
|
|
11
11
|
* list: `cdn.affine.pro` answers 404 for every `Inter-Bold`, `Poppins-Bold`
|
|
12
12
|
* and `BebasNeue-Bold` spelling, so those three families offer no 700 weight
|
|
13
|
-
* here. The Kalam /
|
|
14
|
-
*
|
|
13
|
+
* here. The Kalam / Lora `SemiBold` entries below already point at the 700
|
|
14
|
+
* file — those families ship a single heavy face, not two.
|
|
15
|
+
*
|
|
16
|
+
* Satoshi is in neither list since #396: its licence (ITF Free Font License
|
|
17
|
+
* 2.0, section 02) forbids offering it as a selectable font in a SaaS or design
|
|
18
|
+
* tool, whoever hosts the files. `FontFamily.Satoshi` stays a valid stored
|
|
19
|
+
* value; an element that carries it paints with the fallback, and the family
|
|
20
|
+
* picker names it as unavailable instead of offering it.
|
|
15
21
|
*/
|
|
16
22
|
export const AffineCanvasTextFonts = [
|
|
17
23
|
// Inter, https://fonts.cdnfonts.com/css/inter?styles=29139,29134,29135,29136,29140,29141
|
|
@@ -70,43 +76,6 @@ export const AffineCanvasTextFonts = [
|
|
|
70
76
|
weight: FontWeight.SemiBold,
|
|
71
77
|
style: FontStyle.Normal,
|
|
72
78
|
},
|
|
73
|
-
// Satoshi, https://fonts.cdnfonts.com/css/satoshi?styles=135009,135004,135005,135006,135002,135003
|
|
74
|
-
{
|
|
75
|
-
font: FontFamily.Satoshi,
|
|
76
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-Light.woff2',
|
|
77
|
-
weight: FontWeight.Light,
|
|
78
|
-
style: FontStyle.Normal,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
font: FontFamily.Satoshi,
|
|
82
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-Regular.woff2',
|
|
83
|
-
weight: FontWeight.Regular,
|
|
84
|
-
style: FontStyle.Normal,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
font: FontFamily.Satoshi,
|
|
88
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-Bold.woff2',
|
|
89
|
-
weight: FontWeight.SemiBold,
|
|
90
|
-
style: FontStyle.Normal,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
font: FontFamily.Satoshi,
|
|
94
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-LightItalic.woff2',
|
|
95
|
-
weight: FontWeight.Light,
|
|
96
|
-
style: FontStyle.Italic,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
font: FontFamily.Satoshi,
|
|
100
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-Italic.woff2',
|
|
101
|
-
weight: FontWeight.Regular,
|
|
102
|
-
style: FontStyle.Italic,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
font: FontFamily.Satoshi,
|
|
106
|
-
url: 'https://cdn.affine.pro/fonts/Satoshi-BoldItalic.woff2',
|
|
107
|
-
weight: FontWeight.SemiBold,
|
|
108
|
-
style: FontStyle.Italic,
|
|
109
|
-
},
|
|
110
79
|
// Poppins, https://fonts.cdnfonts.com/css/poppins?styles=20394,20389,20390,20391,20395,20396
|
|
111
80
|
{
|
|
112
81
|
font: FontFamily.Poppins,
|
|
@@ -196,6 +165,11 @@ export const AffineCanvasTextFonts = [
|
|
|
196
165
|
style: FontStyle.Normal,
|
|
197
166
|
},
|
|
198
167
|
];
|
|
168
|
+
/**
|
|
169
|
+
* The families on a public mirror, one `FontConfig` per face. A host that
|
|
170
|
+
* promises no third-party request passes the same list with its own `url`s;
|
|
171
|
+
* a host that drops a family drops it from the family picker too (#396).
|
|
172
|
+
*/
|
|
199
173
|
export const CommunityCanvasTextFonts = [
|
|
200
174
|
// Inter, https://fonts.cdnfonts.com/css/inter?styles=29139,29134,29135,29136,29140,29141
|
|
201
175
|
{
|
|
@@ -267,43 +241,58 @@ export const CommunityCanvasTextFonts = [
|
|
|
267
241
|
weight: FontWeight.SemiBold,
|
|
268
242
|
style: FontStyle.Normal,
|
|
269
243
|
},
|
|
270
|
-
//
|
|
244
|
+
// PlusJakartaSans (SIL OFL 1.1), https://fonts.cdnfonts.com/css/plus-jakarta-sans
|
|
245
|
+
// The mirror serves the two variable files only (weights 200 to 800), so
|
|
246
|
+
// every face below points at one of them: a face declared with a single
|
|
247
|
+
// weight gets that weight from the file's `wght` axis.
|
|
271
248
|
{
|
|
272
|
-
font: FontFamily.
|
|
273
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
249
|
+
font: FontFamily.PlusJakartaSans,
|
|
250
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans%5Bwght%5D.woff',
|
|
274
251
|
weight: FontWeight.Light,
|
|
275
252
|
style: FontStyle.Normal,
|
|
276
253
|
},
|
|
277
254
|
{
|
|
278
|
-
font: FontFamily.
|
|
279
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
255
|
+
font: FontFamily.PlusJakartaSans,
|
|
256
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans%5Bwght%5D.woff',
|
|
280
257
|
weight: FontWeight.Regular,
|
|
281
258
|
style: FontStyle.Normal,
|
|
282
259
|
},
|
|
283
260
|
{
|
|
284
|
-
font: FontFamily.
|
|
285
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
261
|
+
font: FontFamily.PlusJakartaSans,
|
|
262
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans%5Bwght%5D.woff',
|
|
286
263
|
weight: FontWeight.SemiBold,
|
|
287
264
|
style: FontStyle.Normal,
|
|
288
265
|
},
|
|
289
266
|
{
|
|
290
|
-
font: FontFamily.
|
|
291
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
267
|
+
font: FontFamily.PlusJakartaSans,
|
|
268
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans%5Bwght%5D.woff',
|
|
269
|
+
weight: FontWeight.Bold,
|
|
270
|
+
style: FontStyle.Normal,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
font: FontFamily.PlusJakartaSans,
|
|
274
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans-Italic%5Bwght%5D.woff',
|
|
292
275
|
weight: FontWeight.Light,
|
|
293
276
|
style: FontStyle.Italic,
|
|
294
277
|
},
|
|
295
278
|
{
|
|
296
|
-
font: FontFamily.
|
|
297
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
279
|
+
font: FontFamily.PlusJakartaSans,
|
|
280
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans-Italic%5Bwght%5D.woff',
|
|
298
281
|
weight: FontWeight.Regular,
|
|
299
282
|
style: FontStyle.Italic,
|
|
300
283
|
},
|
|
301
284
|
{
|
|
302
|
-
font: FontFamily.
|
|
303
|
-
url: 'https://fonts.cdnfonts.com/s/
|
|
285
|
+
font: FontFamily.PlusJakartaSans,
|
|
286
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans-Italic%5Bwght%5D.woff',
|
|
304
287
|
weight: FontWeight.SemiBold,
|
|
305
288
|
style: FontStyle.Italic,
|
|
306
289
|
},
|
|
290
|
+
{
|
|
291
|
+
font: FontFamily.PlusJakartaSans,
|
|
292
|
+
url: 'https://fonts.cdnfonts.com/s/107199/PlusJakartaSans-Italic%5Bwght%5D.woff',
|
|
293
|
+
weight: FontWeight.Bold,
|
|
294
|
+
style: FontStyle.Italic,
|
|
295
|
+
},
|
|
307
296
|
// Poppins, https://fonts.cdnfonts.com/css/poppins?styles=20394,20389,20390,20391,20395,20396
|
|
308
297
|
{
|
|
309
298
|
font: FontFamily.Poppins,
|
|
@@ -360,8 +349,8 @@ export const CommunityCanvasTextFonts = [
|
|
|
360
349
|
style: FontStyle.Italic,
|
|
361
350
|
},
|
|
362
351
|
// Lora, https://fonts.cdnfonts.com/css/lora-4?styles=50357,50356,50354,50355
|
|
363
|
-
// Lora ships no 600 face either: as with Kalam
|
|
364
|
-
//
|
|
352
|
+
// Lora ships no 600 face either: as with Kalam, the entries below map the
|
|
353
|
+
// 700 file onto `SemiBold` and the family has a single heavy.
|
|
365
354
|
{
|
|
366
355
|
font: FontFamily.Lora,
|
|
367
356
|
url: 'https://fonts.cdnfonts.com/s/29883/Lora-Regular.woff',
|
|
@@ -2,6 +2,8 @@ export * from './artefact-catalogue-service.js';
|
|
|
2
2
|
export * from './audit-service.js';
|
|
3
3
|
export * from './auto-clear-selection-service.js';
|
|
4
4
|
export * from './block-meta-service.js';
|
|
5
|
+
export * from './canvas-grid.js';
|
|
6
|
+
export * from './canvas-local-visibility.js';
|
|
5
7
|
export * from './citation-service/index.js';
|
|
6
8
|
export * from './command-usage-service.js';
|
|
7
9
|
export * from './comment-service/index.js';
|
|
@@ -28,6 +30,7 @@ export * from './parse-url-service.js';
|
|
|
28
30
|
export * from './pivot-materiality-publisher.js';
|
|
29
31
|
export * from './pivot-properties-service.js';
|
|
30
32
|
export * from './quick-search-service.js';
|
|
33
|
+
export * from './selection-pane-service.js';
|
|
31
34
|
export * from './sidebar-service.js';
|
|
32
35
|
export * from './telemetry-service/index.js';
|
|
33
36
|
export * from './theme-service.js';
|
|
@@ -2,6 +2,8 @@ export * from './artefact-catalogue-service.js';
|
|
|
2
2
|
export * from './audit-service.js';
|
|
3
3
|
export * from './auto-clear-selection-service.js';
|
|
4
4
|
export * from './block-meta-service.js';
|
|
5
|
+
export * from './canvas-grid.js';
|
|
6
|
+
export * from './canvas-local-visibility.js';
|
|
5
7
|
export * from './citation-service/index.js';
|
|
6
8
|
export * from './command-usage-service.js';
|
|
7
9
|
export * from './comment-service/index.js';
|
|
@@ -28,6 +30,7 @@ export * from './parse-url-service.js';
|
|
|
28
30
|
export * from './pivot-materiality-publisher.js';
|
|
29
31
|
export * from './pivot-properties-service.js';
|
|
30
32
|
export * from './quick-search-service.js';
|
|
33
|
+
export * from './selection-pane-service.js';
|
|
31
34
|
export * from './sidebar-service.js';
|
|
32
35
|
export * from './telemetry-service/index.js';
|
|
33
36
|
export * from './theme-service.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The selection pane (ADR 0031 §12): a list of the canvas elements by z-order,
|
|
4
|
+
* top first, with groups, lock, a filter by frame, and
|
|
5
|
+
* drag-to-reorder — PowerPoint's pane, on a Labre canvas.
|
|
6
|
+
*
|
|
7
|
+
* The seam is shaped exactly like `ArtefactCatalogueService`, and was
|
|
8
|
+
* challenged against it first: the catalogue's `open(owner)` is scoped to a
|
|
9
|
+
* framework, and stretching it to a second panel would have changed the
|
|
10
|
+
* signature of a shipped seam. So one more seam, two verbs, nothing else.
|
|
11
|
+
*
|
|
12
|
+
* Everything a pane draws is enumerable from the library without this seam:
|
|
13
|
+
* the rows from `selectionPaneTree(std)` (ids only, z-order, top first), the
|
|
14
|
+
* wordings from the element and the translation seam, and every action from
|
|
15
|
+
* the command registry (`canvas.element.reorder`, `canvas.element.lock`,
|
|
16
|
+
* `canvas.element.unlock`, `canvas.group.rename`), run through `runCommand`
|
|
17
|
+
* so the read-only check and the telemetry happen once whoever draws the
|
|
18
|
+
* pixels.
|
|
19
|
+
*/
|
|
20
|
+
export interface SelectionPaneService {
|
|
21
|
+
/** Show the pane. */
|
|
22
|
+
open(): void;
|
|
23
|
+
/** Put it away. Writes nothing. */
|
|
24
|
+
close(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare const SelectionPaneProvider: import("../../global/di/types.js").ServiceIdentifier<SelectionPaneService> & (<U extends SelectionPaneService = SelectionPaneService>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
|
|
27
|
+
/**
|
|
28
|
+
* Host override seam: replace the library's pane with the host's own — or
|
|
29
|
+
* switch it off entirely.
|
|
30
|
+
*
|
|
31
|
+
* **Replace** — a host with its own sidebar registers this extension; its
|
|
32
|
+
* implementation answers {@link SelectionPaneProvider}, the edgeless toolbar's
|
|
33
|
+
* button and the `canvas.selectionPane.toggle` command then call it, and the
|
|
34
|
+
* library's panel is never asked to open.
|
|
35
|
+
*
|
|
36
|
+
* **Disable** — pass `null`. The provider answers nothing: the toolbar button
|
|
37
|
+
* is not rendered and the toggle command is unavailable, because a control
|
|
38
|
+
* that opens nothing is a lie. A cold-assembly switch, decided when the editor
|
|
39
|
+
* is put together (ADR 0031 §13: no flag key for it).
|
|
40
|
+
*
|
|
41
|
+
* `di.override`, like `ArtefactCatalogueExtension`, so a host registering
|
|
42
|
+
* after the library's own default always wins.
|
|
43
|
+
*/
|
|
44
|
+
export declare function SelectionPaneExtension(service: SelectionPaneService | null): ExtensionType;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createIdentifier } from '../../global/di/index.js';
|
|
2
|
+
export const SelectionPaneProvider = createIdentifier('AffineSelectionPane');
|
|
3
|
+
/**
|
|
4
|
+
* Host override seam: replace the library's pane with the host's own — or
|
|
5
|
+
* switch it off entirely.
|
|
6
|
+
*
|
|
7
|
+
* **Replace** — a host with its own sidebar registers this extension; its
|
|
8
|
+
* implementation answers {@link SelectionPaneProvider}, the edgeless toolbar's
|
|
9
|
+
* button and the `canvas.selectionPane.toggle` command then call it, and the
|
|
10
|
+
* library's panel is never asked to open.
|
|
11
|
+
*
|
|
12
|
+
* **Disable** — pass `null`. The provider answers nothing: the toolbar button
|
|
13
|
+
* is not rendered and the toggle command is unavailable, because a control
|
|
14
|
+
* that opens nothing is a lie. A cold-assembly switch, decided when the editor
|
|
15
|
+
* is put together (ADR 0031 §13: no flag key for it).
|
|
16
|
+
*
|
|
17
|
+
* `di.override`, like `ArtefactCatalogueExtension`, so a host registering
|
|
18
|
+
* after the library's own default always wins.
|
|
19
|
+
*/
|
|
20
|
+
export function SelectionPaneExtension(service) {
|
|
21
|
+
return {
|
|
22
|
+
setup: di => {
|
|
23
|
+
// `null` rides through the factory on purpose: `getOptional` then
|
|
24
|
+
// reports the pane as absent, which is the whole disable story.
|
|
25
|
+
di.override(SelectionPaneProvider, () => service);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -320,3 +320,72 @@ export interface DocumentDamagedEvent extends TelemetryEvent {
|
|
|
320
320
|
export type DocumentHealthEvents = {
|
|
321
321
|
DocumentDamaged: DocumentDamagedEvent;
|
|
322
322
|
};
|
|
323
|
+
/**
|
|
324
|
+
* The selection pane was opened (ADR 0031 §14).
|
|
325
|
+
*
|
|
326
|
+
* Worth measuring for the reason any optional surface is: a pane nobody opens
|
|
327
|
+
* is chrome the toolbar pays a slot for. `source` is how the user got there —
|
|
328
|
+
* the edgeless toolbar's button, the palette (or the agent, which invokes by
|
|
329
|
+
* name as the palette does), or a bound chord. Opening only: closing reports
|
|
330
|
+
* nothing, and neither does a toggle that closes the pane.
|
|
331
|
+
*
|
|
332
|
+
* No ids at all: the event is about the pane, never about what it lists.
|
|
333
|
+
*/
|
|
334
|
+
export interface SelectionPaneOpenedEvent extends TelemetryEvent {
|
|
335
|
+
page?: 'whiteboard editor';
|
|
336
|
+
source: 'toolbar' | 'palette' | 'shortcut';
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Something on the canvas was hidden or shown (ADR 0031 §14).
|
|
340
|
+
*
|
|
341
|
+
* `scope: 'local'` is the viewer's own hide, which writes nothing to the
|
|
342
|
+
* document; `'everyone'` is "hide for everyone", which stores
|
|
343
|
+
* `hiddenForEveryone` on each element and syncs it.
|
|
344
|
+
* `target: 'layer'` is reserved for the layers stage. `count` is how many
|
|
345
|
+
* elements the ONE gesture actually changed — a gesture that changes nothing
|
|
346
|
+
* reports nothing.
|
|
347
|
+
*
|
|
348
|
+
* Counts only: never an element id, a type, a group title or any text.
|
|
349
|
+
*/
|
|
350
|
+
export interface CanvasVisibilityChangedEvent extends TelemetryEvent {
|
|
351
|
+
page?: 'whiteboard editor';
|
|
352
|
+
target: 'element' | 'layer';
|
|
353
|
+
scope: 'local' | 'everyone';
|
|
354
|
+
hidden: boolean;
|
|
355
|
+
count: number;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* The canvas grid was turned on or off (ADR 0031 §14).
|
|
359
|
+
*
|
|
360
|
+
* `scope: 'local'` is the viewer's own toggle, which writes nothing to the
|
|
361
|
+
* document; `'everyone'` is "Save for everyone", which stores the grid on the
|
|
362
|
+
* document. `visible` is the state after the gesture. A save that changes
|
|
363
|
+
* nothing in the document reports nothing.
|
|
364
|
+
*/
|
|
365
|
+
export interface CanvasGridToggledEvent extends TelemetryEvent {
|
|
366
|
+
page?: 'whiteboard editor';
|
|
367
|
+
scope: 'local' | 'everyone';
|
|
368
|
+
visible: boolean;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* The user layers changed (ADR 0031 §14).
|
|
372
|
+
*
|
|
373
|
+
* `layerCount` is how many layers the surface holds AFTER the gesture;
|
|
374
|
+
* `memberCount` is how many models the gesture moved (for `move-elements`)
|
|
375
|
+
* or deleted with the layer (for `delete`). A gesture that changes nothing
|
|
376
|
+
* reports nothing.
|
|
377
|
+
*
|
|
378
|
+
* Counts only: never a layer name, a layer id or any element text.
|
|
379
|
+
*/
|
|
380
|
+
export interface CanvasLayerChangedEvent extends TelemetryEvent {
|
|
381
|
+
page?: 'whiteboard editor';
|
|
382
|
+
action: 'create' | 'rename' | 'reorder' | 'delete' | 'move-elements';
|
|
383
|
+
layerCount: number;
|
|
384
|
+
memberCount?: number;
|
|
385
|
+
}
|
|
386
|
+
export type CanvasPaneEvents = {
|
|
387
|
+
SelectionPaneOpened: SelectionPaneOpenedEvent;
|
|
388
|
+
CanvasVisibilityChanged: CanvasVisibilityChangedEvent;
|
|
389
|
+
CanvasGridToggled: CanvasGridToggledEvent;
|
|
390
|
+
CanvasLayerChanged: CanvasLayerChangedEvent;
|
|
391
|
+
};
|
|
@@ -2,12 +2,12 @@ import type { ExtensionType } from '../../../store/index.js';
|
|
|
2
2
|
import type { CitationEvents } from './citation.js';
|
|
3
3
|
import type { CodeBlockEvents } from './code-block.js';
|
|
4
4
|
import type { OutDatabaseAllEvents } from './database.js';
|
|
5
|
-
import type { AuditEvents, BlockLifecycleEvents, DocumentHealthEvents, FrameworkDiagramEvents, ValidationEvents } from './lifecycle.js';
|
|
5
|
+
import type { AuditEvents, BlockLifecycleEvents, CanvasPaneEvents, DocumentHealthEvents, FrameworkDiagramEvents, ValidationEvents } from './lifecycle.js';
|
|
6
6
|
import type { LinkToolbarEvents } from './link.js';
|
|
7
7
|
import type { NoteEvents } from './note.js';
|
|
8
8
|
import type { SlashMenuEvents } from './slash-menu.js';
|
|
9
9
|
import type { AttachmentReloadedEvent, AttachmentReloadedEventInToolbar, AttachmentUpgradedEvent, AttachmentUploadedEvent, BlockCreationEvent, DocCreatedEvent, EdgelessToolPickedEvent, ElementCreationEvent, ElementLockEvent, ElementUpdatedEvent, LatexEvent, LinkedDocCreatedEvent, LinkEvent, MindMapCollapseEvent, TelemetryEvent } from './types.js';
|
|
10
|
-
export type TelemetryEventMap = OutDatabaseAllEvents & LinkToolbarEvents & SlashMenuEvents & CodeBlockEvents & NoteEvents & CitationEvents & BlockLifecycleEvents & FrameworkDiagramEvents & ValidationEvents & AuditEvents & DocumentHealthEvents & {
|
|
10
|
+
export type TelemetryEventMap = OutDatabaseAllEvents & LinkToolbarEvents & SlashMenuEvents & CodeBlockEvents & NoteEvents & CitationEvents & BlockLifecycleEvents & FrameworkDiagramEvents & ValidationEvents & AuditEvents & CanvasPaneEvents & DocumentHealthEvents & {
|
|
11
11
|
DocCreated: DocCreatedEvent;
|
|
12
12
|
Link: TelemetryEvent;
|
|
13
13
|
LinkedDocCreated: LinkedDocCreatedEvent;
|
|
@@ -59,6 +59,25 @@ export declare class ThemeService extends Extension {
|
|
|
59
59
|
getColorValue(color: Color, fallback?: Color, real?: boolean, theme?: ColorScheme): string;
|
|
60
60
|
getCssVariableColor(property: string, theme?: ColorScheme): string;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* The CSS variable the chrome accent lives behind — the token `DESIGN.md`'s
|
|
64
|
+
* Borrowed Blue Rule names. Kept here so a canvas painter can reach the accent
|
|
65
|
+
* by NAME rather than by value.
|
|
66
|
+
*/
|
|
67
|
+
export declare const CHROME_ACCENT_CSS_VARIABLE = "--affine-primary-color";
|
|
68
|
+
/**
|
|
69
|
+
* The chrome accent resolved for the theme in force, ready to be handed to a
|
|
70
|
+
* `CanvasRenderingContext2D` (`strokeStyle`, `fillStyle`), which cannot take a
|
|
71
|
+
* `var(…)`.
|
|
72
|
+
*
|
|
73
|
+
* Canvas painters used to write the AFFiNE blue out as a hex, which made it
|
|
74
|
+
* unreachable for a host re-skin: the DOM followed `--affine-primary-color`
|
|
75
|
+
* while the canvas stayed on the literal. The last-resort value, for the case
|
|
76
|
+
* where no `ThemeProvider` is registered, is READ from the upstream theme
|
|
77
|
+
* rather than spelled out, so no module holds a copy of the hex
|
|
78
|
+
* (`brand-hex.unit.spec.ts` enforces that).
|
|
79
|
+
*/
|
|
80
|
+
export declare function getChromeAccentColor(std: BlockStdScope): string;
|
|
62
81
|
export declare class ThemeObserver {
|
|
63
82
|
private readonly observer;
|
|
64
83
|
theme$: Signal<ColorScheme>;
|
|
@@ -104,6 +104,30 @@ export class ThemeService extends Extension {
|
|
|
104
104
|
return property;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* The CSS variable the chrome accent lives behind — the token `DESIGN.md`'s
|
|
109
|
+
* Borrowed Blue Rule names. Kept here so a canvas painter can reach the accent
|
|
110
|
+
* by NAME rather than by value.
|
|
111
|
+
*/
|
|
112
|
+
export const CHROME_ACCENT_CSS_VARIABLE = '--affine-primary-color';
|
|
113
|
+
/**
|
|
114
|
+
* The chrome accent resolved for the theme in force, ready to be handed to a
|
|
115
|
+
* `CanvasRenderingContext2D` (`strokeStyle`, `fillStyle`), which cannot take a
|
|
116
|
+
* `var(…)`.
|
|
117
|
+
*
|
|
118
|
+
* Canvas painters used to write the AFFiNE blue out as a hex, which made it
|
|
119
|
+
* unreachable for a host re-skin: the DOM followed `--affine-primary-color`
|
|
120
|
+
* while the canvas stayed on the literal. The last-resort value, for the case
|
|
121
|
+
* where no `ThemeProvider` is registered, is READ from the upstream theme
|
|
122
|
+
* rather than spelled out, so no module holds a copy of the hex
|
|
123
|
+
* (`brand-hex.unit.spec.ts` enforces that).
|
|
124
|
+
*/
|
|
125
|
+
export function getChromeAccentColor(std) {
|
|
126
|
+
return (std
|
|
127
|
+
.getOptional(ThemeProvider)
|
|
128
|
+
?.getCssVariableColor(CHROME_ACCENT_CSS_VARIABLE) ??
|
|
129
|
+
combinedLightCssVariables[CHROME_ACCENT_CSS_VARIABLE]);
|
|
130
|
+
}
|
|
107
131
|
export class ThemeObserver {
|
|
108
132
|
constructor() {
|
|
109
133
|
const COLOR_SCHEMES = Object.values(ColorScheme);
|
|
@@ -38,6 +38,18 @@ export declare const TOAST_LINKED_DOC_CREATED: ChromeWording;
|
|
|
38
38
|
export declare const TOAST_NOTE_REMOVED_FROM_PAGE: ChromeWording;
|
|
39
39
|
export declare const TOAST_FRAME_INSERTED_INTO_PAGE: ChromeWording;
|
|
40
40
|
export declare const TOAST_NO_LINK_FOUND: ChromeWording;
|
|
41
|
+
/**
|
|
42
|
+
* What the `doc.copyLink` command says once the document's URL is on the
|
|
43
|
+
* clipboard.
|
|
44
|
+
*
|
|
45
|
+
* Its own wording rather than {@link TOAST_COPIED_TO_CLIPBOARD}: that one
|
|
46
|
+
* reports a SLICE copy (blocks, elements, an image) and this one reports a
|
|
47
|
+
* link, and the two are told apart by nothing else on screen. Its own wording
|
|
48
|
+
* rather than the inline link toolbar's "Copied link to clipboard" too — that
|
|
49
|
+
* key belongs to `@labre/affine-inline-link` and names the `href` a delta
|
|
50
|
+
* already carried, not a document address the host just generated.
|
|
51
|
+
*/
|
|
52
|
+
export declare const TOAST_LINK_COPIED: ChromeWording;
|
|
41
53
|
export declare const TOOLBAR_BRING_TO_FRONT: ChromeWording;
|
|
42
54
|
export declare const TOOLBAR_SEND_TO_BACK: ChromeWording;
|
|
43
55
|
export declare const TOOLBAR_COPY: ChromeWording;
|
|
@@ -176,6 +188,11 @@ export declare const STYLE_MENU_LABEL: ChromeWording;
|
|
|
176
188
|
export declare const TEXT_FORMAT_BOLD: ChromeWording;
|
|
177
189
|
export declare const TEXT_FORMAT_ITALIC: ChromeWording;
|
|
178
190
|
export declare const TEXT_FORMAT_UNDERLINE: ChromeWording;
|
|
191
|
+
/**
|
|
192
|
+
* Said by the canvas text toolbar's decoration toggles (`gfx/text`, beside
|
|
193
|
+
* {@link TEXT_FORMAT_UNDERLINE}) and by the inline format bar (ADR 0030).
|
|
194
|
+
*/
|
|
195
|
+
export declare const TEXT_FORMAT_OVERLINE: ChromeWording;
|
|
179
196
|
export declare const TEXT_FORMAT_STRIKETHROUGH: ChromeWording;
|
|
180
197
|
/**
|
|
181
198
|
* The font weights and the one non-default font style a text toolbar offers —
|
|
@@ -357,6 +374,13 @@ export declare const PALETTE_NAME_MEDIUM_BLUE: ChromeWording;
|
|
|
357
374
|
export declare const PALETTE_NAME_MEDIUM_PURPLE: ChromeWording;
|
|
358
375
|
export declare const PALETTE_NAME_MEDIUM_MAGENTA: ChromeWording;
|
|
359
376
|
export declare const PALETTE_NAME_MEDIUM_GREY: ChromeWording;
|
|
377
|
+
export declare const PALETTE_NAME_HEAVY_RED: ChromeWording;
|
|
378
|
+
export declare const PALETTE_NAME_HEAVY_ORANGE: ChromeWording;
|
|
379
|
+
export declare const PALETTE_NAME_HEAVY_YELLOW: ChromeWording;
|
|
380
|
+
export declare const PALETTE_NAME_HEAVY_GREEN: ChromeWording;
|
|
381
|
+
export declare const PALETTE_NAME_HEAVY_BLUE: ChromeWording;
|
|
382
|
+
export declare const PALETTE_NAME_HEAVY_PURPLE: ChromeWording;
|
|
383
|
+
export declare const PALETTE_NAME_HEAVY_MAGENTA: ChromeWording;
|
|
360
384
|
/**
|
|
361
385
|
* Keyed by the exact `Palette.key` string the default theme's tables produce
|
|
362
386
|
* (`buildPalettes`, `packages/affine/model/src/themes/{default,utils}.ts`) —
|
|
@@ -364,6 +388,7 @@ export declare const PALETTE_NAME_MEDIUM_GREY: ChromeWording;
|
|
|
364
388
|
* falls back to when a swatch declares no `labelWording` of its own.
|
|
365
389
|
*/
|
|
366
390
|
export declare const PALETTE_NAME_WORDINGS: Readonly<Record<string, ChromeWording>>;
|
|
391
|
+
export declare const MENU_ARIA_STYLE: ChromeWording;
|
|
367
392
|
export declare const CHROME_CLIPBOARD_FILE_TOO_LARGE: ChromeWording;
|
|
368
393
|
export declare const CHROME_CLIPBOARD_SIZE_LIMIT: ChromeWording;
|
|
369
394
|
export declare const TOOLBAR_CAPTION: ChromeWording;
|
|
@@ -52,6 +52,21 @@ export const TOAST_NO_LINK_FOUND = [
|
|
|
52
52
|
'com.labre.toast.no-link-found',
|
|
53
53
|
'No link found',
|
|
54
54
|
];
|
|
55
|
+
/**
|
|
56
|
+
* What the `doc.copyLink` command says once the document's URL is on the
|
|
57
|
+
* clipboard.
|
|
58
|
+
*
|
|
59
|
+
* Its own wording rather than {@link TOAST_COPIED_TO_CLIPBOARD}: that one
|
|
60
|
+
* reports a SLICE copy (blocks, elements, an image) and this one reports a
|
|
61
|
+
* link, and the two are told apart by nothing else on screen. Its own wording
|
|
62
|
+
* rather than the inline link toolbar's "Copied link to clipboard" too — that
|
|
63
|
+
* key belongs to `@labre/affine-inline-link` and names the `href` a delta
|
|
64
|
+
* already carried, not a document address the host just generated.
|
|
65
|
+
*/
|
|
66
|
+
export const TOAST_LINK_COPIED = [
|
|
67
|
+
'com.labre.toast.link-copied',
|
|
68
|
+
'Link copied',
|
|
69
|
+
];
|
|
55
70
|
/* ── Toolbars and menus ───────────────────────────────────────────────── */
|
|
56
71
|
export const TOOLBAR_BRING_TO_FRONT = [
|
|
57
72
|
'com.labre.toolbar.bring-to-front',
|
|
@@ -320,6 +335,14 @@ export const TEXT_FORMAT_UNDERLINE = [
|
|
|
320
335
|
'com.labre.text-format.underline',
|
|
321
336
|
'Underline',
|
|
322
337
|
];
|
|
338
|
+
/**
|
|
339
|
+
* Said by the canvas text toolbar's decoration toggles (`gfx/text`, beside
|
|
340
|
+
* {@link TEXT_FORMAT_UNDERLINE}) and by the inline format bar (ADR 0030).
|
|
341
|
+
*/
|
|
342
|
+
export const TEXT_FORMAT_OVERLINE = [
|
|
343
|
+
'com.labre.text-format.overline',
|
|
344
|
+
'Overline',
|
|
345
|
+
];
|
|
323
346
|
export const TEXT_FORMAT_STRIKETHROUGH = [
|
|
324
347
|
'com.labre.text-format.strikethrough',
|
|
325
348
|
'Strikethrough',
|
|
@@ -739,6 +762,40 @@ export const PALETTE_NAME_MEDIUM_GREY = [
|
|
|
739
762
|
'com.labre.palette-name.medium-grey',
|
|
740
763
|
'MediumGrey',
|
|
741
764
|
];
|
|
765
|
+
/*
|
|
766
|
+
* The `Heavy` row (`DefaultTheme.Palettes`, seven colours and no grey). It was
|
|
767
|
+
* missing from the table until #390 — the row rendered its raw `Palette.key`
|
|
768
|
+
* next to translated neighbours. The exhaustiveness test in
|
|
769
|
+
* `packages/affine/all` now compares this table to the theme.
|
|
770
|
+
*/
|
|
771
|
+
export const PALETTE_NAME_HEAVY_RED = [
|
|
772
|
+
'com.labre.palette-name.heavy-red',
|
|
773
|
+
'HeavyRed',
|
|
774
|
+
];
|
|
775
|
+
export const PALETTE_NAME_HEAVY_ORANGE = [
|
|
776
|
+
'com.labre.palette-name.heavy-orange',
|
|
777
|
+
'HeavyOrange',
|
|
778
|
+
];
|
|
779
|
+
export const PALETTE_NAME_HEAVY_YELLOW = [
|
|
780
|
+
'com.labre.palette-name.heavy-yellow',
|
|
781
|
+
'HeavyYellow',
|
|
782
|
+
];
|
|
783
|
+
export const PALETTE_NAME_HEAVY_GREEN = [
|
|
784
|
+
'com.labre.palette-name.heavy-green',
|
|
785
|
+
'HeavyGreen',
|
|
786
|
+
];
|
|
787
|
+
export const PALETTE_NAME_HEAVY_BLUE = [
|
|
788
|
+
'com.labre.palette-name.heavy-blue',
|
|
789
|
+
'HeavyBlue',
|
|
790
|
+
];
|
|
791
|
+
export const PALETTE_NAME_HEAVY_PURPLE = [
|
|
792
|
+
'com.labre.palette-name.heavy-purple',
|
|
793
|
+
'HeavyPurple',
|
|
794
|
+
];
|
|
795
|
+
export const PALETTE_NAME_HEAVY_MAGENTA = [
|
|
796
|
+
'com.labre.palette-name.heavy-magenta',
|
|
797
|
+
'HeavyMagenta',
|
|
798
|
+
];
|
|
742
799
|
/**
|
|
743
800
|
* Keyed by the exact `Palette.key` string the default theme's tables produce
|
|
744
801
|
* (`buildPalettes`, `packages/affine/model/src/themes/{default,utils}.ts`) —
|
|
@@ -773,7 +830,30 @@ export const PALETTE_NAME_WORDINGS = {
|
|
|
773
830
|
MediumPurple: PALETTE_NAME_MEDIUM_PURPLE,
|
|
774
831
|
MediumMagenta: PALETTE_NAME_MEDIUM_MAGENTA,
|
|
775
832
|
MediumGrey: PALETTE_NAME_MEDIUM_GREY,
|
|
833
|
+
HeavyRed: PALETTE_NAME_HEAVY_RED,
|
|
834
|
+
HeavyOrange: PALETTE_NAME_HEAVY_ORANGE,
|
|
835
|
+
HeavyYellow: PALETTE_NAME_HEAVY_YELLOW,
|
|
836
|
+
HeavyGreen: PALETTE_NAME_HEAVY_GREEN,
|
|
837
|
+
HeavyBlue: PALETTE_NAME_HEAVY_BLUE,
|
|
838
|
+
HeavyPurple: PALETTE_NAME_HEAVY_PURPLE,
|
|
839
|
+
HeavyMagenta: PALETTE_NAME_HEAVY_MAGENTA,
|
|
776
840
|
};
|
|
841
|
+
/* ── Menu shells' accessible names (#390) ─────────────────────────────────
|
|
842
|
+
*
|
|
843
|
+
* The `aria-label` of an `editor-menu-button` is a wording of its OWN, never
|
|
844
|
+
* `` `${translatedLabel}-menu` `` — sewing a suffix onto a translated word
|
|
845
|
+
* gave "changer le type de forme-menu" to a French host. The precedent is
|
|
846
|
+
* `ROOT_ALIGNMENT_MENU_ARIA` (`blocks/root`). The fallbacks are the exact
|
|
847
|
+
* identifiers the composition produced in English, so a catalogue-less
|
|
848
|
+
* playground reads what it always read.
|
|
849
|
+
*
|
|
850
|
+
* This one is HERE and not in a package because three toolbars draw a menu
|
|
851
|
+
* called "Style" (shape, mindmap, connector) — one shared word, one key.
|
|
852
|
+
*/
|
|
853
|
+
export const MENU_ARIA_STYLE = [
|
|
854
|
+
'com.labre.menu-aria.style',
|
|
855
|
+
'style-menu',
|
|
856
|
+
];
|
|
777
857
|
/* ── Clipboard size-limit toasts (adapters/clipboard/utils.ts) ────────── */
|
|
778
858
|
export const CHROME_CLIPBOARD_FILE_TOO_LARGE = [
|
|
779
859
|
'com.labre.clipboard.file-too-large',
|
|
@@ -1089,6 +1169,7 @@ export const CHROME_WORDINGS = [
|
|
|
1089
1169
|
TOAST_NOTE_REMOVED_FROM_PAGE,
|
|
1090
1170
|
TOAST_FRAME_INSERTED_INTO_PAGE,
|
|
1091
1171
|
TOAST_NO_LINK_FOUND,
|
|
1172
|
+
TOAST_LINK_COPIED,
|
|
1092
1173
|
TOOLBAR_BRING_TO_FRONT,
|
|
1093
1174
|
TOOLBAR_SEND_TO_BACK,
|
|
1094
1175
|
TOOLBAR_COPY,
|
|
@@ -1130,6 +1211,7 @@ export const CHROME_WORDINGS = [
|
|
|
1130
1211
|
TEXT_FORMAT_BOLD,
|
|
1131
1212
|
TEXT_FORMAT_ITALIC,
|
|
1132
1213
|
TEXT_FORMAT_UNDERLINE,
|
|
1214
|
+
TEXT_FORMAT_OVERLINE,
|
|
1133
1215
|
TEXT_FORMAT_STRIKETHROUGH,
|
|
1134
1216
|
FONT_WEIGHT_LIGHT,
|
|
1135
1217
|
FONT_WEIGHT_REGULAR,
|
|
@@ -1240,4 +1322,12 @@ export const CHROME_WORDINGS = [
|
|
|
1240
1322
|
PALETTE_NAME_MEDIUM_PURPLE,
|
|
1241
1323
|
PALETTE_NAME_MEDIUM_MAGENTA,
|
|
1242
1324
|
PALETTE_NAME_MEDIUM_GREY,
|
|
1325
|
+
PALETTE_NAME_HEAVY_RED,
|
|
1326
|
+
PALETTE_NAME_HEAVY_ORANGE,
|
|
1327
|
+
PALETTE_NAME_HEAVY_YELLOW,
|
|
1328
|
+
PALETTE_NAME_HEAVY_GREEN,
|
|
1329
|
+
PALETTE_NAME_HEAVY_BLUE,
|
|
1330
|
+
PALETTE_NAME_HEAVY_PURPLE,
|
|
1331
|
+
PALETTE_NAME_HEAVY_MAGENTA,
|
|
1332
|
+
MENU_ARIA_STYLE,
|
|
1243
1333
|
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { fontBaseStyle, fontSMStyle, fontXSStyle } from './font.js';
|
|
2
2
|
export { reducedMotionStyle, SPRING_DURATION_MS, SPRING_EASING, springDuration, springEasing, } from './motion.js';
|
|
3
3
|
export { panelBaseColorsStyle, panelBaseStyle } from './panel.js';
|
|
4
|
+
export { PANEL_DRAG_THRESHOLD_PX, panelDragStarted, panelHeaderStyles, } from './panel-header.js';
|
|
4
5
|
export { scrollbarStyle } from './scrollbar-style.js';
|
|
5
6
|
export { affineTextStyles } from './text.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { fontBaseStyle, fontSMStyle, fontXSStyle } from './font.js';
|
|
2
2
|
export { reducedMotionStyle, SPRING_DURATION_MS, SPRING_EASING, springDuration, springEasing, } from './motion.js';
|
|
3
3
|
export { panelBaseColorsStyle, panelBaseStyle } from './panel.js';
|
|
4
|
+
export { PANEL_DRAG_THRESHOLD_PX, panelDragStarted, panelHeaderStyles, } from './panel-header.js';
|
|
4
5
|
export { scrollbarStyle } from './scrollbar-style.js';
|
|
5
6
|
export { affineTextStyles } from './text.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The header of a side panel, as the frame panel draws it
|
|
3
|
+
* (`fragments/frame-panel`, `header/frame-panel-header.ts`): one 36px row,
|
|
4
|
+
* 8px side padding, no divider under it, a 14px / 500 secondary-text title
|
|
5
|
+
* and icon buttons whose glyph is secondary until hovered or active.
|
|
6
|
+
*
|
|
7
|
+
* Every side panel's header takes it from here — the frame panel, the
|
|
8
|
+
* selection pane and the artefact catalogue — so the three cannot drift
|
|
9
|
+
* apart (held by `panel-header-parity.unit.spec.ts` in `affine/all`). It lives
|
|
10
|
+
* this low because a widget may not import the frame panel: the frame panel
|
|
11
|
+
* depends on the frame block, which depends on the edgeless toolbar.
|
|
12
|
+
*
|
|
13
|
+
* A component opts in by adding the three classes to its own markup:
|
|
14
|
+
* `affine-panel-header` on the row, `affine-panel-header-title` on the title,
|
|
15
|
+
* `affine-panel-header-button` on each icon button.
|
|
16
|
+
*/
|
|
17
|
+
export declare const panelHeaderStyles: import("lit").CSSResult;
|
|
18
|
+
/**
|
|
19
|
+
* Pointer travel, on either axis, before a press on a card or a row of a side
|
|
20
|
+
* panel becomes a drag rather than a click — the frame panel's threshold,
|
|
21
|
+
* shared with the selection pane so the two panels start a drag alike.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PANEL_DRAG_THRESHOLD_PX = 5;
|
|
24
|
+
/** Whether a press at `from` moved to `to` has travelled far enough to drag. */
|
|
25
|
+
export declare function panelDragStarted(from: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}, to: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}): boolean;
|