@formicoidea/labre-core 0.43.1 → 0.46.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-callout-into.d.ts +43 -0
- package/dist/_pkgs/affine-block-callout/commands/turn-callout-into.js +109 -0
- 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/toolbar.d.ts +65 -0
- package/dist/_pkgs/affine-block-callout/configs/toolbar.js +178 -0
- 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 +10 -1
- 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-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/configs/toolbar.js +11 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +11 -2
- 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-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-frame/commands.d.ts +27 -0
- package/dist/_pkgs/affine-block-frame/commands.js +49 -0
- package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +16 -6
- package/dist/_pkgs/affine-block-frame/frame-manager.js +58 -22
- package/dist/_pkgs/affine-block-frame/frame-order.d.ts +43 -0
- package/dist/_pkgs/affine-block-frame/frame-order.js +93 -0
- package/dist/_pkgs/affine-block-frame/frame-tool.js +3 -1
- package/dist/_pkgs/affine-block-frame/index.d.ts +2 -0
- package/dist/_pkgs/affine-block-frame/index.js +2 -0
- package/dist/_pkgs/affine-block-frame/present/frame-order-menu.d.ts +10 -2
- package/dist/_pkgs/affine-block-frame/present/frame-order-menu.js +32 -18
- package/dist/_pkgs/affine-block-frame/view.js +6 -0
- 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-note/configs/toolbar.d.ts +19 -0
- package/dist/_pkgs/affine-block-note/configs/toolbar.js +38 -23
- package/dist/_pkgs/affine-block-note/translations.d.ts +2 -1
- package/dist/_pkgs/affine-block-note/translations.js +14 -6
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +48 -3
- 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/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/translations.d.ts +7 -2
- package/dist/_pkgs/affine-block-root/translations.js +10 -13
- 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/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 +91 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/actions.js +285 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.d.ts +80 -0
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.js +355 -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.d.ts +112 -4
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +86 -15
- 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/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/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/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/surface-ref-block.js +12 -2
- package/dist/_pkgs/affine-components/context-menu/button.js +14 -0
- package/dist/_pkgs/affine-components/filterable-list/index.js +30 -9
- 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/text.d.ts +1 -0
- package/dist/_pkgs/affine-components/icons/text.js +11 -0
- package/dist/_pkgs/affine-components/portal/portal.d.ts +1 -1
- package/dist/_pkgs/affine-foundation/view.d.ts +8 -8
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.d.ts +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.d.ts +34 -2
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +194 -81
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card.d.ts +7 -4
- package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card.js +9 -24
- 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 +2 -0
- package/dist/_pkgs/affine-fragment-frame-panel/index.js +2 -0
- 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 +3 -2
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-group/command/group-api.js +52 -1
- 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 +1 -1
- 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-text/edgeless-text-editor.js +2 -1
- 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 +53 -2
- 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-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 +26 -0
- package/dist/_pkgs/affine-model/consts/text.js +25 -0
- 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-model/utils/types.d.ts +2 -2
- 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 +31 -4
- 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 +2 -2
- package/dist/_pkgs/affine-shared/services/font-loader/font-loader-service.d.ts +3 -3
- package/dist/_pkgs/affine-shared/services/index.d.ts +4 -1
- package/dist/_pkgs/affine-shared/services/index.js +4 -1
- package/dist/_pkgs/affine-shared/services/link-preview-service/link-preview-storage.d.ts +4 -4
- package/dist/_pkgs/affine-shared/services/outline-panel-service.d.ts +31 -0
- package/dist/_pkgs/affine-shared/services/outline-panel-service.js +17 -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/translation-service/chrome.d.ts +16 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +28 -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 +3 -0
- package/dist/_pkgs/affine-shared/utils/index.js +3 -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-shared/utils/panel-reorder-drag.d.ts +85 -0
- package/dist/_pkgs/affine-shared/utils/panel-reorder-drag.js +162 -0
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/utils.js +10 -3
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +25 -49
- 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/selection-pane/drop.d.ts +62 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/drop.js +94 -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 +186 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-widget.js +1417 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.d.ts +52 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.js +161 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +10 -0
- package/dist/_pkgs/affine-widget-note-slicer/note-slicer.js +7 -3
- 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/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/scope/std-scope.d.ts +1 -1
- 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 -1
- package/dist/host-panels.d.ts +90 -0
- package/dist/host-panels.js +111 -0
- package/dist/translations.js +10 -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-fragment-frame-panel/utils/drag.d.ts +0 -27
- package/dist/_pkgs/affine-fragment-frame-panel/utils/drag.js +0 -96
- package/dist/_pkgs/affine-shared/services/sidebar-service.d.ts +0 -8
- package/dist/_pkgs/affine-shared/services/sidebar-service.js +0 -7
- 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
|
@@ -58,7 +58,11 @@ export class SurfaceBlockTransformer extends BaseBlockTransformer {
|
|
|
58
58
|
yMap.set(key, element);
|
|
59
59
|
});
|
|
60
60
|
const elements = this._internal.Boxed(yMap);
|
|
61
|
+
// Every other surface prop (ADR 0031: `layers`, `showGrid`, and any key
|
|
62
|
+
// a newer client wrote) crosses the snapshot unchanged; only `elements`
|
|
63
|
+
// needs rebuilding into a Y.Map.
|
|
61
64
|
snapshotRet.props = {
|
|
65
|
+
...snapshotRet.props,
|
|
62
66
|
elements,
|
|
63
67
|
};
|
|
64
68
|
return snapshotRet;
|
|
@@ -79,6 +83,7 @@ export class SurfaceBlockTransformer extends BaseBlockTransformer {
|
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
snapshot.props = {
|
|
86
|
+
...snapshot.props,
|
|
82
87
|
elements: value,
|
|
83
88
|
};
|
|
84
89
|
return snapshot;
|
|
@@ -78,6 +78,9 @@ export class DefaultTool extends BaseTool {
|
|
|
78
78
|
static { this.toolName = 'default'; }
|
|
79
79
|
_scrollViewport(delta) {
|
|
80
80
|
this.gfx.viewport.applyDeltaCenter(delta[0], delta[1]);
|
|
81
|
+
// `viewportMoved` is what an element move listens to in order to keep the
|
|
82
|
+
// dragged elements under a pointer that stays still while the board pans.
|
|
83
|
+
this.gfx.viewport.viewportMoved.next(delta);
|
|
81
84
|
}
|
|
82
85
|
/**
|
|
83
86
|
* Get the end position of the dragging area in the model coordinate
|
|
@@ -144,7 +147,7 @@ export class DefaultTool extends BaseTool {
|
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
|
-
initializeDragState(dragType, event) {
|
|
150
|
+
initializeDragState(dragType, event, cloned = false) {
|
|
148
151
|
this.dragType = dragType;
|
|
149
152
|
this._clearDisposable();
|
|
150
153
|
this._disposables = new DisposableGroup();
|
|
@@ -161,11 +164,16 @@ export class DefaultTool extends BaseTool {
|
|
|
161
164
|
}
|
|
162
165
|
if (this.dragType === DefaultModeDragType.ContentMoving) {
|
|
163
166
|
if (this.interactivity) {
|
|
164
|
-
|
|
167
|
+
// An alt+drag captured BEFORE its clone: a capture here would close
|
|
168
|
+
// the step between the copy and its move, and the first undo would
|
|
169
|
+
// only put the copy back on its source (`alt-drag-clone.spec.ts`).
|
|
170
|
+
if (!cloned)
|
|
171
|
+
this.doc.captureSync();
|
|
165
172
|
this.interactivity.handleElementMove({
|
|
166
173
|
movingElements: this._toBeMoved,
|
|
167
174
|
event: event.raw,
|
|
168
175
|
onDragEnd: () => {
|
|
176
|
+
this._stopEdgeScrolling();
|
|
169
177
|
this.doc.captureSync();
|
|
170
178
|
},
|
|
171
179
|
});
|
|
@@ -230,6 +238,17 @@ export class DefaultTool extends BaseTool {
|
|
|
230
238
|
break;
|
|
231
239
|
}
|
|
232
240
|
case DefaultModeDragType.ContentMoving: {
|
|
241
|
+
// Only an accepted move pans: `handleElementMove` refuses a readonly
|
|
242
|
+
// store and an extension may cancel it, and neither leaves an active
|
|
243
|
+
// interaction behind.
|
|
244
|
+
const moving = this.interactivity?.activeInteraction$.peek()?.type === 'move';
|
|
245
|
+
const moveDelta = moving ? calPanDelta(viewport, e) : null;
|
|
246
|
+
if (moveDelta) {
|
|
247
|
+
this._enableEdgeScrolling(moveDelta);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
this._stopEdgeScrolling();
|
|
251
|
+
}
|
|
233
252
|
break;
|
|
234
253
|
}
|
|
235
254
|
case DefaultModeDragType.NativeEditing: {
|
|
@@ -266,12 +285,16 @@ export class DefaultTool extends BaseTool {
|
|
|
266
285
|
}
|
|
267
286
|
});
|
|
268
287
|
this._toBeMoved = Array.from(toBeMoved);
|
|
269
|
-
// If alt key is pressed and content is moving, clone the content
|
|
270
|
-
|
|
288
|
+
// If alt key is pressed and content is moving, clone the content. One
|
|
289
|
+
// gesture, one undo step: close what came before, then nothing closes the
|
|
290
|
+
// step between the clone's writes and the move's end.
|
|
291
|
+
const cloning = dragType === DefaultModeDragType.ContentMoving && e.keys.alt;
|
|
292
|
+
if (cloning) {
|
|
293
|
+
this.doc.captureSync();
|
|
271
294
|
await this._cloneContent();
|
|
272
295
|
}
|
|
273
296
|
// Set up drag state
|
|
274
|
-
this.initializeDragState(dragType, e);
|
|
297
|
+
this.initializeDragState(dragType, e, cloning);
|
|
275
298
|
}
|
|
276
299
|
mounted() {
|
|
277
300
|
this.disposable.add(effect(() => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ViewExtensionProvider, } from '../affine-ext-loader/index.js';
|
|
2
|
+
import { CanvasGrid, CanvasLocalVisibility, } from '../affine-shared/services/index.js';
|
|
2
3
|
import { BlockViewExtension, CommandExtension, FlavourExtension, } from '../std/index.js';
|
|
3
4
|
import { literal } from 'lit/static-html.js';
|
|
4
5
|
import { effects } from './effects.js';
|
|
5
|
-
import { auditCommands, EdgelessCRUDExtension, EdgelessLegacySlotExtension, EditPropsMiddlewareBuilder, exportSvgCommands, exportSvgToolbarExtension, mapQualityCommands, mapQualityWidget, ReadingManager, readingProposalWidget, readingToolbarExtension, SpotlightManager, ValidationManager, validationExceptionToolbarExtension, ValidationOverlay, violationDetailWidget, } from './extensions/index.js';
|
|
6
|
+
import { auditCommands, CanvasActiveLayer, canvasGridCommands, EdgelessCRUDExtension, EdgelessLegacySlotExtension, EditPropsMiddlewareBuilder, exportSvgCommands, exportSvgToolbarExtension, mapQualityCommands, mapQualityWidget, ReadingManager, readingProposalWidget, readingToolbarExtension, selectionPaneCommands, SelectionPaneModel, SpotlightManager, UserLayerMiddlewareBuilder, userLayerCommands, ValidationManager, validationExceptionToolbarExtension, ValidationOverlay, violationDetailWidget, } from './extensions/index.js';
|
|
6
7
|
import { ExportManagerExtension } from './extensions/export-manager/export-manager.js';
|
|
7
8
|
import { BackgroundStackingExtension } from './framework-background/stacking.js';
|
|
8
9
|
import { ElementHighlightOverlay } from './renderer/element-highlight-overlay.js';
|
|
@@ -72,6 +73,27 @@ export class SurfaceViewExtension extends ViewExtensionProvider {
|
|
|
72
73
|
// (`docs/adr/0025`). Nothing is offered until a board is selected.
|
|
73
74
|
context.register(CommandExtension(exportSvgCommands));
|
|
74
75
|
context.register(exportSvgToolbarExtension);
|
|
76
|
+
// The selection pane's headless half (ADR 0031): the live tree a pane
|
|
77
|
+
// renders from, and the commands its rows run. Core chrome, never a
|
|
78
|
+
// framework's, and nothing it lists is gated — a flag gates tooling,
|
|
79
|
+
// the rows are content. The panel itself is the edgeless toolbar's.
|
|
80
|
+
context.register(SelectionPaneModel);
|
|
81
|
+
// This viewer's local hide (ADR 0031 §8): registers into
|
|
82
|
+
// `gfx.localVisibility` and persists per document, never in it.
|
|
83
|
+
context.register(CanvasLocalVisibility);
|
|
84
|
+
context.register(CommandExtension(selectionPaneCommands));
|
|
85
|
+
// The grid as a setting (ADR 0031 §11): this viewer's override, the
|
|
86
|
+
// document's `showGrid`, the host default, the library default. Read by
|
|
87
|
+
// the edgeless root's background, the surface container and the PNG
|
|
88
|
+
// export; previews follow the document setting alone.
|
|
89
|
+
context.register(CanvasGrid);
|
|
90
|
+
context.register(CommandExtension(canvasGridCommands));
|
|
91
|
+
// User layers (ADR 0031 §2-§6): the viewer's active layer (session
|
|
92
|
+
// only), the `beforeAdd` middleware that stamps it on what is created,
|
|
93
|
+
// and the commands the pane's layer rows run. Content, never gated.
|
|
94
|
+
context.register(CanvasActiveLayer);
|
|
95
|
+
context.register(UserLayerMiddlewareBuilder);
|
|
96
|
+
context.register(CommandExtension(userLayerCommands));
|
|
75
97
|
}
|
|
76
98
|
else {
|
|
77
99
|
context.register(BlockViewExtension('affine:surface', literal `affine-surface-void`));
|
|
@@ -39,7 +39,7 @@ import { Peekable } from '../affine-components/peek/index.js';
|
|
|
39
39
|
import { ViewExtensionManagerIdentifier } from '../affine-ext-loader/index.js';
|
|
40
40
|
import { RefNodeSlotsProvider } from '../affine-inline-reference/index.js';
|
|
41
41
|
import { FrameBlockModel, } from '../affine-model/index.js';
|
|
42
|
-
import { BlockCommentManager, DocModeProvider, EditPropsStore, ThemeProvider, ToolbarRegistryIdentifier, ViewportElementExtension, } from '../affine-shared/services/index.js';
|
|
42
|
+
import { BlockCommentManager, DocModeProvider, documentShowsGrid, EditPropsStore, ThemeProvider, ToolbarRegistryIdentifier, ViewportElementExtension, } from '../affine-shared/services/index.js';
|
|
43
43
|
import { unsafeCSSVarV2 } from '../affine-shared/theme/index.js';
|
|
44
44
|
import { requestConnectedFrame } from '../affine-shared/utils/index.js';
|
|
45
45
|
import { DisposableGroup } from '../global/disposable/index.js';
|
|
@@ -128,6 +128,11 @@ let SurfaceRefBlockComponent = (() => {
|
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/* ADR 0031 §11: a reference follows the document's showGrid alone. */
|
|
132
|
+
.ref-content.grid-hidden {
|
|
133
|
+
background: var(--affine-background-primary-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
131
136
|
.ref-viewport {
|
|
132
137
|
max-width: 100%;
|
|
133
138
|
margin: 0 auto;
|
|
@@ -351,7 +356,12 @@ let SurfaceRefBlockComponent = (() => {
|
|
|
351
356
|
const aspectRatio = h !== 0 ? w / h : 1;
|
|
352
357
|
const _previewSpec = this._previewSpec.concat(this._runtimePreviewExt);
|
|
353
358
|
const edgelessTheme = this.std.get(ThemeProvider).edgeless$.value;
|
|
354
|
-
|
|
359
|
+
// A reference is a picture of the referenced document: its saved grid,
|
|
360
|
+
// never this viewer's override.
|
|
361
|
+
const showGrid = documentShowsGrid(this._previewDoc ? getSurfaceBlock(this._previewDoc) : null);
|
|
362
|
+
return html `<div
|
|
363
|
+
class=${classMap({ 'ref-content': true, 'grid-hidden': !showGrid })}
|
|
364
|
+
>
|
|
355
365
|
<div
|
|
356
366
|
class="ref-viewport"
|
|
357
367
|
style=${styleMap({
|
|
@@ -90,6 +90,20 @@ let MenuButton = (() => {
|
|
|
90
90
|
.affine-menu-button.delete-item:hover .affine-menu-action-text {
|
|
91
91
|
color: var(--affine-error-color);
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
An entry whose effect reaches every viewer of the document ("Hide for
|
|
96
|
+
everyone", ADR 0031): the theme's warning tokens, always on, so it reads
|
|
97
|
+
differently from its local twin before it is hovered.
|
|
98
|
+
*/
|
|
99
|
+
.affine-menu-button.warning-item,
|
|
100
|
+
.affine-menu-button.warning-item .affine-menu-action-text {
|
|
101
|
+
color: var(--affine-warning-color);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.affine-menu-button.warning-item:hover {
|
|
105
|
+
background-color: var(--affine-background-warning-color);
|
|
106
|
+
}
|
|
93
107
|
`; }
|
|
94
108
|
connectedCallback() {
|
|
95
109
|
super.connectedCallback();
|
|
@@ -126,19 +126,25 @@ let FilterableListComponent = (() => {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
_filterItems() {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
const query = this._filterText.toLowerCase();
|
|
130
|
+
// A copy: the caller's array is its own state (the language button keeps
|
|
131
|
+
// its most-recently-used order in it), so sorting must not reorder it.
|
|
132
|
+
const ranked = this.options.items
|
|
133
|
+
.map(item => ({ item, rank: matchRank(item, query) }))
|
|
134
|
+
.filter(entry => entry.rank !== -1);
|
|
135
|
+
return ranked
|
|
136
|
+
.sort((a, b) => {
|
|
137
|
+
const isActiveA = this.options.active?.(a.item);
|
|
138
|
+
const isActiveB = this.options.active?.(b.item);
|
|
136
139
|
if (isActiveA && !isActiveB)
|
|
137
140
|
return -1;
|
|
138
141
|
if (!isActiveA && isActiveB)
|
|
139
142
|
return 1;
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
if (a.rank !== b.rank)
|
|
144
|
+
return a.rank - b.rank;
|
|
145
|
+
return this.listFilter?.(a.item, b.item) ?? 0;
|
|
146
|
+
})
|
|
147
|
+
.map(entry => entry.item);
|
|
142
148
|
}
|
|
143
149
|
_scrollFocusedItemIntoView() {
|
|
144
150
|
this.updateComplete
|
|
@@ -256,6 +262,21 @@ let FilterableListComponent = (() => {
|
|
|
256
262
|
};
|
|
257
263
|
})();
|
|
258
264
|
export { FilterableListComponent };
|
|
265
|
+
/**
|
|
266
|
+
* Prefix match on both sides lowercased: 0 for a name or alias hit, 1 for a
|
|
267
|
+
* hit on the display label only (it sorts after an id hit), -1 for no match.
|
|
268
|
+
* An empty query matches everything at rank 0.
|
|
269
|
+
*/
|
|
270
|
+
function matchRank(item, query) {
|
|
271
|
+
if (!query)
|
|
272
|
+
return 0;
|
|
273
|
+
const hits = (value) => !!value && value.toLowerCase().startsWith(query);
|
|
274
|
+
if (hits(item.name) || item.aliases?.some(hits))
|
|
275
|
+
return 0;
|
|
276
|
+
if (hits(item.label))
|
|
277
|
+
return 1;
|
|
278
|
+
return -1;
|
|
279
|
+
}
|
|
259
280
|
export function showPopFilterableList({ options, filter, abortController = new AbortController(), referenceElement, container, maxHeight = 440, portalStyles, }) {
|
|
260
281
|
const portalPadding = {
|
|
261
282
|
top: PAGE_HEADER_HEIGHT + 12,
|
|
@@ -29,6 +29,7 @@ export declare const DividerIcon: import("lit-html").TemplateResult<1>;
|
|
|
29
29
|
export declare const BoldIcon: import("lit-html").TemplateResult<1>;
|
|
30
30
|
export declare const ItalicIcon: import("lit-html").TemplateResult<1>;
|
|
31
31
|
export declare const UnderlineIcon: import("lit-html").TemplateResult<1>;
|
|
32
|
+
export declare const OverlineIcon: import("lit-html").TemplateResult<1>;
|
|
32
33
|
export declare const StrikethroughIcon: import("lit-html").TemplateResult<1>;
|
|
33
34
|
export declare const CodeIcon: import("lit-html").TemplateResult<1>;
|
|
34
35
|
export declare const LinkIcon: import("lit-html").TemplateResult<1>;
|
|
@@ -97,6 +97,17 @@ export const UnderlineIcon = icons.UnderLineIcon({
|
|
|
97
97
|
width: '20',
|
|
98
98
|
height: '20',
|
|
99
99
|
});
|
|
100
|
+
/**
|
|
101
|
+
* The icon set ships no overline, so it is drawn here: the underline icon's
|
|
102
|
+
* own letter and rule, the rule moved above the letter (ADR 0030).
|
|
103
|
+
*/
|
|
104
|
+
const OverlineSVG = svg `<path
|
|
105
|
+
fill="currentColor"
|
|
106
|
+
fill-rule="evenodd"
|
|
107
|
+
clip-rule="evenodd"
|
|
108
|
+
d="M4.458 3.064a.808.808 0 0 0 0 1.616h15.084a.808.808 0 1 0 0-1.616zM7.744 7.968a.808.808 0 1 0-1.616 0v7.003a5.656 5.656 0 1 0 11.313 0V7.968a.808.808 0 1 0-1.616 0v7.003a4.04 4.04 0 1 1-8.08 0z"
|
|
109
|
+
/>`;
|
|
110
|
+
export const OverlineIcon = icon(OverlineSVG, 20);
|
|
100
111
|
export const StrikethroughIcon = icons.StrikeThroughIcon({
|
|
101
112
|
width: '20',
|
|
102
113
|
height: '20',
|
|
@@ -17,7 +17,7 @@ import { LitElement, type TemplateResult } from 'lit';
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class Portal extends LitElement {
|
|
19
19
|
private _portalRoot;
|
|
20
|
-
createRenderRoot():
|
|
20
|
+
createRenderRoot(): ShadowRoot | HTMLDivElement;
|
|
21
21
|
disconnectedCallback(): void;
|
|
22
22
|
render(): TemplateResult | undefined;
|
|
23
23
|
accessor container: HTMLElement;
|
|
@@ -23,13 +23,13 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
23
23
|
style: z.ZodString;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
style: string;
|
|
26
|
-
font: string;
|
|
27
26
|
url: string;
|
|
27
|
+
font: string;
|
|
28
28
|
weight: string;
|
|
29
29
|
}, {
|
|
30
30
|
style: string;
|
|
31
|
-
font: string;
|
|
32
31
|
url: string;
|
|
32
|
+
font: string;
|
|
33
33
|
weight: string;
|
|
34
34
|
}>, "many">>;
|
|
35
35
|
telemetry: z.ZodOptional<z.ZodType<TelemetryService, z.ZodTypeDef, TelemetryService>>;
|
|
@@ -42,8 +42,8 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
42
42
|
} | undefined;
|
|
43
43
|
fontConfig?: {
|
|
44
44
|
style: string;
|
|
45
|
-
font: string;
|
|
46
45
|
url: string;
|
|
46
|
+
font: string;
|
|
47
47
|
weight: string;
|
|
48
48
|
}[] | undefined;
|
|
49
49
|
telemetry?: TelemetryService | undefined;
|
|
@@ -56,8 +56,8 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
56
56
|
} | undefined;
|
|
57
57
|
fontConfig?: {
|
|
58
58
|
style: string;
|
|
59
|
-
font: string;
|
|
60
59
|
url: string;
|
|
60
|
+
font: string;
|
|
61
61
|
weight: string;
|
|
62
62
|
}[] | undefined;
|
|
63
63
|
telemetry?: TelemetryService | undefined;
|
|
@@ -87,13 +87,13 @@ export declare class FoundationViewExtension extends ViewExtensionProvider<Found
|
|
|
87
87
|
style: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
89
|
style: string;
|
|
90
|
-
font: string;
|
|
91
90
|
url: string;
|
|
91
|
+
font: string;
|
|
92
92
|
weight: string;
|
|
93
93
|
}, {
|
|
94
94
|
style: string;
|
|
95
|
-
font: string;
|
|
96
95
|
url: string;
|
|
96
|
+
font: string;
|
|
97
97
|
weight: string;
|
|
98
98
|
}>, "many">>;
|
|
99
99
|
telemetry: z.ZodOptional<z.ZodType<TelemetryService, z.ZodTypeDef, TelemetryService>>;
|
|
@@ -106,8 +106,8 @@ export declare class FoundationViewExtension extends ViewExtensionProvider<Found
|
|
|
106
106
|
} | undefined;
|
|
107
107
|
fontConfig?: {
|
|
108
108
|
style: string;
|
|
109
|
-
font: string;
|
|
110
109
|
url: string;
|
|
110
|
+
font: string;
|
|
111
111
|
weight: string;
|
|
112
112
|
}[] | undefined;
|
|
113
113
|
telemetry?: TelemetryService | undefined;
|
|
@@ -120,8 +120,8 @@ export declare class FoundationViewExtension extends ViewExtensionProvider<Found
|
|
|
120
120
|
} | undefined;
|
|
121
121
|
fontConfig?: {
|
|
122
122
|
style: string;
|
|
123
|
-
font: string;
|
|
124
123
|
url: string;
|
|
124
|
+
font: string;
|
|
125
125
|
weight: string;
|
|
126
126
|
}[] | undefined;
|
|
127
127
|
telemetry?: TelemetryService | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlockStdScope } from '
|
|
2
|
-
import type { Store, TransformerMiddleware } from '
|
|
1
|
+
import type { BlockStdScope } from '../std/index.js';
|
|
2
|
+
import type { Store, TransformerMiddleware } from '../store/index.js';
|
|
3
3
|
import { LitElement, type PropertyValues } from 'lit';
|
|
4
4
|
export declare const AFFINE_ADAPTER_PANEL = "affine-adapter-panel";
|
|
5
5
|
declare const AdapterPanel_base: typeof LitElement & import("../global/utils/types.js").Constructor<import("../global/lit/with-disposable.js").DisposableClass>;
|
|
@@ -11,8 +11,15 @@ export declare class FramePanelBody extends FramePanelBody_base {
|
|
|
11
11
|
*/
|
|
12
12
|
private readonly _clickBlank;
|
|
13
13
|
private _docDisposables;
|
|
14
|
-
private _frameElementHeight;
|
|
15
14
|
private _frameItems;
|
|
15
|
+
/** The side panels' one reorder gesture (ADR 0034), made on connect. */
|
|
16
|
+
private _reorder;
|
|
17
|
+
/** The card a press landed on: what a pick-up picks up. */
|
|
18
|
+
private _pressed;
|
|
19
|
+
/** The dragged cards' copies following the pointer, top one last. */
|
|
20
|
+
private _ghosts;
|
|
21
|
+
/** The list's `gap`, read once at the pick-up: the drop line sits in it. */
|
|
22
|
+
private _listGap;
|
|
16
23
|
private _indicatorTranslateY;
|
|
17
24
|
private _lastEdgelessRootId;
|
|
18
25
|
private get _gfx();
|
|
@@ -20,10 +27,36 @@ export declare class FramePanelBody extends FramePanelBody_base {
|
|
|
20
27
|
private readonly _updateFrameItems;
|
|
21
28
|
get frames(): FrameBlockModel[];
|
|
22
29
|
get viewportPadding(): [number, number, number, number];
|
|
30
|
+
private _createReorderDrag;
|
|
31
|
+
/** The cards on screen, in presentation order. */
|
|
32
|
+
private _cards;
|
|
33
|
+
/** A press on a card: the controller decides whether it becomes a drag. */
|
|
23
34
|
private _drag;
|
|
35
|
+
/**
|
|
36
|
+
* The press became a drag. The pressed card is selected if it was not
|
|
37
|
+
* (shift adds it to the selection), and every selected card moves: their
|
|
38
|
+
* copies — the last two, the top one counting them — follow the pointer,
|
|
39
|
+
* and the cards themselves stay in place as placeholders.
|
|
40
|
+
*/
|
|
41
|
+
private _pickUp;
|
|
42
|
+
/**
|
|
43
|
+
* A release at the gap `gap` puts the selected cards right before the first
|
|
44
|
+
* card at or after it that does not move, or at the end. The line sits in
|
|
45
|
+
* the middle of the list's gap: above the card under the gap, or under the
|
|
46
|
+
* last card — the frame panel's own drag used to draw that last one at 0.
|
|
47
|
+
*/
|
|
48
|
+
private _dropAt;
|
|
24
49
|
private _fitToElement;
|
|
25
50
|
private _renderEmptyContent;
|
|
26
51
|
private _renderFrameList;
|
|
52
|
+
/**
|
|
53
|
+
* Move the selected cards, as one block, right before the frame `before`
|
|
54
|
+
* (`null` = at the end; `_dropAt` picks it). The write is
|
|
55
|
+
* `canvas.frame.reorder` (ADR 0034): the read-only refusal, the no-op check
|
|
56
|
+
* and the one undo step live in its action, run through the imported
|
|
57
|
+
* descriptor so the panel reorders in page mode too, where the command is
|
|
58
|
+
* not registered.
|
|
59
|
+
*/
|
|
27
60
|
private _reorderFrames;
|
|
28
61
|
private _setDocDisposables;
|
|
29
62
|
private _updateFrames;
|
|
@@ -34,7 +67,6 @@ export declare class FramePanelBody extends FramePanelBody_base {
|
|
|
34
67
|
updated(_changedProperties: PropertyValues): void;
|
|
35
68
|
private accessor _dragging;
|
|
36
69
|
private accessor _selected;
|
|
37
|
-
accessor domHost: Document | HTMLElement;
|
|
38
70
|
accessor editorHost: EditorHost;
|
|
39
71
|
accessor fitPadding: number[];
|
|
40
72
|
accessor frameListContainer: HTMLElement;
|