@formicoidea/labre-core 0.40.0 → 0.42.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/LICENSE +384 -0
- package/dist/_pkgs/affine-block-attachment/attachment-block.js +7 -2
- package/dist/_pkgs/affine-block-attachment/components/rename-model.js +3 -2
- package/dist/_pkgs/affine-block-attachment/configs/slash-menu.js +7 -0
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.js +11 -3
- package/dist/_pkgs/affine-block-attachment/configs/tooltips.js +4 -4
- package/dist/_pkgs/affine-block-attachment/translations.d.ts +49 -0
- package/dist/_pkgs/affine-block-attachment/translations.js +98 -0
- package/dist/_pkgs/affine-block-attachment/utils.js +9 -6
- package/dist/_pkgs/affine-block-bookmark/bookmark-block.js +2 -2
- package/dist/_pkgs/affine-block-bookmark/components/bookmark-card.js +13 -6
- package/dist/_pkgs/affine-block-bookmark/configs/slash-menu.js +6 -1
- package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +9 -1
- package/dist/_pkgs/affine-block-bookmark/configs/tooltips.js +2 -2
- package/dist/_pkgs/affine-block-bookmark/translations.d.ts +26 -0
- package/dist/_pkgs/affine-block-bookmark/translations.js +55 -0
- package/dist/_pkgs/affine-block-callout/configs/slash-menu.js +4 -0
- package/dist/_pkgs/affine-block-callout/configs/tooltips.js +2 -2
- package/dist/_pkgs/affine-block-callout/translations.d.ts +16 -0
- package/dist/_pkgs/affine-block-callout/translations.js +24 -0
- package/dist/_pkgs/affine-block-code/code-block.js +6 -3
- package/dist/_pkgs/affine-block-code/code-toolbar/components/code-toolbar.js +4 -2
- package/dist/_pkgs/affine-block-code/code-toolbar/components/lang-button.js +3 -2
- package/dist/_pkgs/affine-block-code/code-toolbar/components/preview-button.js +4 -3
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +116 -72
- package/dist/_pkgs/affine-block-code/translations.d.ts +30 -0
- package/dist/_pkgs/affine-block-code/translations.js +84 -0
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +9 -3
- package/dist/_pkgs/affine-block-embed/common/render-linked-doc.js +7 -6
- 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 -1
- package/dist/_pkgs/affine-block-embed/embed-github-block/embed-github-block.js +2 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/components/fullscreen-toolbar.js +4 -3
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +5 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/tooltips.js +14 -14
- package/dist/_pkgs/affine-block-embed/embed-html-block/embed-html-block.js +7 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.js +11 -4
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-idle-card.d.ts +2 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-idle-card.js +13 -3
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-edit-popup.js +4 -2
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-input-base.js +8 -5
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-link-input-popup.js +21 -5
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-loading-card.js +4 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/slash-menu/slash-menu.js +4 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.d.ts +2 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +6 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.d.ts +2 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.js +5 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.d.ts +1 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +33 -9
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/utils.d.ts +8 -0
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/utils.js +19 -0
- package/dist/_pkgs/affine-block-embed/embed-loom-block/embed-loom-block.js +2 -1
- package/dist/_pkgs/affine-block-embed/embed-youtube-block/embed-youtube-block.js +2 -1
- package/dist/_pkgs/affine-block-embed/translations.d.ts +46 -0
- package/dist/_pkgs/affine-block-embed/translations.js +114 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/slash-menu.js +7 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +29 -12
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/tooltips.js +4 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +10 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js +8 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +28 -13
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-edgeless-synced-doc-block.js +3 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +3 -2
- package/dist/_pkgs/affine-block-embed-doc/translations.d.ts +40 -0
- package/dist/_pkgs/affine-block-embed-doc/translations.js +85 -0
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-dense-menu.js +29 -22
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-menu.js +5 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/frame-tool-button.js +2 -1
- package/dist/_pkgs/affine-block-frame/edgeless-toolbar/presentation-toolbar.js +12 -9
- package/dist/_pkgs/affine-block-frame/frame-manager.js +8 -2
- package/dist/_pkgs/affine-block-frame/frame-tool.js +7 -2
- package/dist/_pkgs/affine-block-frame/frame-toolbar.js +18 -7
- package/dist/_pkgs/affine-block-frame/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-frame/index.js +1 -0
- package/dist/_pkgs/affine-block-frame/present/frame-order-button.js +5 -1
- package/dist/_pkgs/affine-block-frame/present/navigator-setting-button.js +16 -6
- package/dist/_pkgs/affine-block-frame/present/present-button.js +3 -1
- package/dist/_pkgs/affine-block-frame/translations.d.ts +64 -0
- package/dist/_pkgs/affine-block-frame/translations.js +131 -0
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +5 -2
- package/dist/_pkgs/affine-block-image/configs/slash-menu.js +4 -0
- package/dist/_pkgs/affine-block-image/configs/toolbar.js +7 -1
- package/dist/_pkgs/affine-block-image/configs/tooltips.js +1 -1
- package/dist/_pkgs/affine-block-image/image-block.js +3 -2
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +6 -3
- package/dist/_pkgs/affine-block-image/preview-image/page.js +5 -1
- package/dist/_pkgs/affine-block-image/translations.d.ts +35 -0
- package/dist/_pkgs/affine-block-image/translations.js +68 -0
- package/dist/_pkgs/affine-block-image/utils.js +9 -8
- package/dist/_pkgs/affine-block-latex/configs/slash-menu.d.ts +8 -0
- package/dist/_pkgs/affine-block-latex/configs/slash-menu.js +19 -3
- package/dist/_pkgs/affine-block-latex/latex-block.js +6 -2
- package/dist/_pkgs/affine-block-latex/translations.d.ts +35 -0
- package/dist/_pkgs/affine-block-latex/translations.js +60 -0
- package/dist/_pkgs/affine-block-list/list-keymap.js +7 -0
- package/dist/_pkgs/affine-block-note/components/edgeless-note-border-dropdown-menu.d.ts +9 -0
- package/dist/_pkgs/affine-block-note/components/edgeless-note-border-dropdown-menu.js +23 -6
- package/dist/_pkgs/affine-block-note/components/edgeless-note-display-mode-dropdown-menu.d.ts +4 -1
- package/dist/_pkgs/affine-block-note/components/edgeless-note-display-mode-dropdown-menu.js +26 -6
- package/dist/_pkgs/affine-block-note/components/edgeless-note-shadow-menu.d.ts +3 -0
- package/dist/_pkgs/affine-block-note/components/edgeless-note-shadow-menu.js +21 -10
- package/dist/_pkgs/affine-block-note/components/edgeless-note-style-panel.js +22 -8
- package/dist/_pkgs/affine-block-note/configs/slash-menu.js +13 -0
- package/dist/_pkgs/affine-block-note/configs/toolbar.js +26 -19
- package/dist/_pkgs/affine-block-note/configs/tooltips.js +57 -30
- package/dist/_pkgs/affine-block-note/move-block.js +8 -2
- package/dist/_pkgs/affine-block-note/note-keymap.js +7 -1
- package/dist/_pkgs/affine-block-note/translations.d.ts +91 -0
- package/dist/_pkgs/affine-block-note/translations.js +253 -0
- package/dist/_pkgs/affine-block-paragraph/paragraph-block.js +7 -2
- package/dist/_pkgs/affine-block-paragraph/paragraph-keymap.js +7 -1
- package/dist/_pkgs/affine-block-paragraph/translations.d.ts +31 -0
- package/dist/_pkgs/affine-block-paragraph/translations.js +44 -0
- package/dist/_pkgs/affine-block-paragraph/view.js +6 -1
- package/dist/_pkgs/affine-block-root/commands/pivot-commands.js +1 -8
- package/dist/_pkgs/affine-block-root/commands/tag-commands.js +1 -8
- package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +3 -1
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +6 -3
- package/dist/_pkgs/affine-block-root/edgeless/clipboard/utils.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/alignment.js +26 -4
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.d.ts +14 -0
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.js +10 -3
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.d.ts +8 -0
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +9 -0
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.d.ts +9 -0
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +66 -6
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.d.ts +22 -0
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +46 -0
- package/dist/_pkgs/affine-block-root/edgeless/utils/consts.d.ts +0 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/consts.js +0 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/pinch-zoom.d.ts +21 -0
- package/dist/_pkgs/affine-block-root/edgeless/utils/pinch-zoom.js +24 -0
- package/dist/_pkgs/affine-block-root/edgeless/utils/query.js +8 -0
- package/dist/_pkgs/affine-block-root/keyboard/keymap.js +1 -16
- package/dist/_pkgs/affine-block-root/translations.d.ts +61 -0
- package/dist/_pkgs/affine-block-root/translations.js +172 -0
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +21 -3
- package/dist/_pkgs/affine-block-surface/element-model/index.js +14 -2
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +3 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.d.ts +23 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.js +89 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.d.ts +7 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.js +5 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.d.ts +41 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.js +70 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.d.ts +49 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.js +257 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/tagged-path.d.ts +16 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/tagged-path.js +24 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.d.ts +24 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.js +66 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +5 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +5 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +66 -4
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +272 -23
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +58 -8
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +27 -0
- package/dist/_pkgs/affine-block-surface/extensions/legend-toolbar.d.ts +81 -0
- package/dist/_pkgs/affine-block-surface/extensions/legend-toolbar.js +81 -0
- package/dist/_pkgs/affine-block-surface/extensions/legend.d.ts +136 -0
- package/dist/_pkgs/affine-block-surface/extensions/legend.js +439 -0
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +5 -2
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.d.ts +17 -3
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +38 -15
- package/dist/_pkgs/affine-block-surface/extensions/reading.d.ts +61 -1
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +85 -39
- package/dist/_pkgs/affine-block-surface/extensions/record-action.d.ts +66 -0
- package/dist/_pkgs/affine-block-surface/extensions/record-action.js +145 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.d.ts +48 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.js +120 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +36 -23
- package/dist/_pkgs/affine-block-surface/extensions/tags-toolbar.js +5 -5
- package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +253 -28
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +489 -41
- package/dist/_pkgs/affine-block-surface/framework-background/background-view.d.ts +115 -0
- package/dist/_pkgs/affine-block-surface/framework-background/background-view.js +185 -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/labels.d.ts +16 -1
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +31 -21
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +29 -5
- package/dist/_pkgs/affine-block-surface/framework-background/stacking.d.ts +6 -4
- package/dist/_pkgs/affine-block-surface/framework-background/stacking.js +56 -8
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.d.ts +12 -0
- package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.js +15 -0
- package/dist/_pkgs/affine-block-surface/view.js +8 -1
- package/dist/_pkgs/affine-block-surface-ref/components/placeholder.d.ts +2 -1
- package/dist/_pkgs/affine-block-surface-ref/components/placeholder.js +21 -6
- package/dist/_pkgs/affine-block-surface-ref/configs/slash-menu.js +24 -7
- package/dist/_pkgs/affine-block-surface-ref/configs/tooltips.js +2 -2
- package/dist/_pkgs/affine-block-surface-ref/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface-ref/index.js +1 -0
- package/dist/_pkgs/affine-block-surface-ref/surface-ref-block-edgeless.js +1 -0
- package/dist/_pkgs/affine-block-surface-ref/surface-ref-block.js +1 -0
- package/dist/_pkgs/affine-block-surface-ref/translations.d.ts +83 -0
- package/dist/_pkgs/affine-block-surface-ref/translations.js +175 -0
- package/dist/_pkgs/affine-block-surface-ref/utils.d.ts +8 -1
- package/dist/_pkgs/affine-block-surface-ref/utils.js +12 -4
- package/dist/_pkgs/affine-components/caption/block-caption.js +3 -1
- package/dist/_pkgs/affine-components/card-style-dropdown-menu/dropdown-menu.js +4 -3
- package/dist/_pkgs/affine-components/citation/citation.d.ts +2 -0
- package/dist/_pkgs/affine-components/citation/citation.js +19 -3
- package/dist/_pkgs/affine-components/color-picker/button.d.ts +62 -1
- package/dist/_pkgs/affine-components/color-picker/button.js +182 -23
- package/dist/_pkgs/affine-components/color-picker/color-panel.d.ts +8 -0
- package/dist/_pkgs/affine-components/color-picker/color-panel.js +17 -2
- package/dist/_pkgs/affine-components/color-picker/color-picker.d.ts +4 -0
- package/dist/_pkgs/affine-components/color-picker/color-picker.js +27 -3
- package/dist/_pkgs/affine-components/color-picker/framework-palette.d.ts +106 -0
- package/dist/_pkgs/affine-components/color-picker/framework-palette.js +177 -0
- package/dist/_pkgs/affine-components/color-picker/index.d.ts +2 -0
- package/dist/_pkgs/affine-components/color-picker/index.js +2 -0
- package/dist/_pkgs/affine-components/color-picker/palette-carousel.d.ts +85 -0
- package/dist/_pkgs/affine-components/color-picker/palette-carousel.js +440 -0
- package/dist/_pkgs/affine-components/color-picker/types.d.ts +21 -0
- package/dist/_pkgs/affine-components/color-picker/utils.d.ts +28 -2
- package/dist/_pkgs/affine-components/color-picker/utils.js +32 -0
- package/dist/_pkgs/affine-components/context-menu/menu-renderer.d.ts +3 -0
- package/dist/_pkgs/affine-components/context-menu/menu-renderer.js +34 -7
- package/dist/_pkgs/affine-components/edgeless-line-styles-panel/line-styles-panel.d.ts +2 -0
- package/dist/_pkgs/affine-components/edgeless-line-styles-panel/line-styles-panel.js +21 -2
- package/dist/_pkgs/affine-components/edgeless-line-width-panel/line-width-panel.d.ts +2 -0
- package/dist/_pkgs/affine-components/edgeless-line-width-panel/line-width-panel.js +18 -2
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.d.ts +33 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +211 -56
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-create-modal.js +5 -4
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +11 -9
- package/dist/_pkgs/affine-components/filterable-list/index.d.ts +2 -0
- package/dist/_pkgs/affine-components/filterable-list/index.js +17 -2
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/dropdown-menu.d.ts +3 -0
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/dropdown-menu.js +40 -7
- package/dist/_pkgs/affine-components/icon-button/index.d.ts +1 -1
- package/dist/_pkgs/affine-components/icon-button/index.js +1 -1
- package/dist/_pkgs/affine-components/icon-picker/affine-icon-picker-panel.d.ts +6 -0
- package/dist/_pkgs/affine-components/icon-picker/affine-icon-picker-panel.js +42 -7
- package/dist/_pkgs/affine-components/icon-picker/emoji-picker-panel.d.ts +4 -0
- package/dist/_pkgs/affine-components/icon-picker/emoji-picker-panel.js +35 -5
- package/dist/_pkgs/affine-components/icon-picker/icon-picker.d.ts +2 -0
- package/dist/_pkgs/affine-components/icon-picker/icon-picker.js +22 -5
- package/dist/_pkgs/affine-components/linked-doc-title/doc-title.d.ts +2 -0
- package/dist/_pkgs/affine-components/linked-doc-title/doc-title.js +16 -3
- package/dist/_pkgs/affine-components/notification/linked-doc.js +5 -4
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.js +7 -4
- package/dist/_pkgs/affine-components/resource/resource.d.ts +16 -1
- package/dist/_pkgs/affine-components/resource/resource.js +48 -20
- package/dist/_pkgs/affine-components/resource/status.d.ts +2 -0
- package/dist/_pkgs/affine-components/resource/status.js +27 -12
- package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.d.ts +4 -1
- package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.js +23 -4
- package/dist/_pkgs/affine-components/toast/toast.d.ts +1 -1
- package/dist/_pkgs/affine-components/toast/toast.js +1 -1
- package/dist/_pkgs/affine-components/toggle-button/toggle-button.d.ts +3 -0
- package/dist/_pkgs/affine-components/toggle-button/toggle-button.js +18 -3
- package/dist/_pkgs/affine-components/toolbar/icon-button.d.ts +2 -0
- package/dist/_pkgs/affine-components/toolbar/icon-button.js +18 -2
- package/dist/_pkgs/affine-components/toolbar/tooltip.d.ts +3 -3
- package/dist/_pkgs/affine-components/toolbar/tooltip.js +3 -3
- package/dist/_pkgs/affine-components/translations.d.ts +149 -0
- package/dist/_pkgs/affine-components/translations.js +495 -0
- package/dist/_pkgs/affine-foundation/view.js +2 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.d.ts +3 -0
- package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.js +12 -1
- package/dist/_pkgs/affine-fragment-adapter-panel/body/adapter-panel-body.js +4 -3
- package/dist/_pkgs/affine-fragment-adapter-panel/config.d.ts +13 -0
- package/dist/_pkgs/affine-fragment-adapter-panel/config.js +18 -4
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-menu.js +2 -2
- package/dist/_pkgs/affine-fragment-adapter-panel/header/adapter-panel-header.js +2 -2
- package/dist/_pkgs/affine-fragment-adapter-panel/translations.d.ts +24 -0
- package/dist/_pkgs/affine-fragment-adapter-panel/translations.js +37 -0
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.d.ts +1 -0
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.js +9 -1
- package/dist/_pkgs/affine-fragment-doc-title/translations.d.ts +13 -0
- package/dist/_pkgs/affine-fragment-doc-title/translations.js +17 -0
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +3 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +10 -4
- package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +18 -6
- package/dist/_pkgs/affine-fragment-frame-panel/translations.d.ts +16 -0
- package/dist/_pkgs/affine-fragment-frame-panel/translations.js +44 -0
- package/dist/_pkgs/affine-fragment-outline/body/outline-notice.js +10 -4
- package/dist/_pkgs/affine-fragment-outline/body/outline-panel-body.js +6 -3
- package/dist/_pkgs/affine-fragment-outline/card/outline-card.js +13 -6
- package/dist/_pkgs/affine-fragment-outline/card/outline-preview.d.ts +1 -0
- package/dist/_pkgs/affine-fragment-outline/card/outline-preview.js +16 -9
- package/dist/_pkgs/affine-fragment-outline/config.d.ts +1 -20
- package/dist/_pkgs/affine-fragment-outline/config.js +8 -23
- package/dist/_pkgs/affine-fragment-outline/header/outline-panel-header.js +10 -3
- package/dist/_pkgs/affine-fragment-outline/header/outline-setting-menu.js +9 -2
- package/dist/_pkgs/affine-fragment-outline/outline-viewer.js +6 -3
- package/dist/_pkgs/affine-fragment-outline/translations.d.ts +54 -0
- package/dist/_pkgs/affine-fragment-outline/translations.js +110 -0
- package/dist/_pkgs/affine-gfx-brush/element-renderer.js +2 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/eraser/eraser-tool-button.js +3 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/consts.d.ts +3 -0
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/consts.js +3 -0
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-menu.js +5 -4
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +3 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/configs/brush.js +10 -3
- package/dist/_pkgs/affine-gfx-brush/toolbar/configs/highlighter.js +10 -3
- package/dist/_pkgs/affine-gfx-brush/translations.d.ts +17 -0
- package/dist/_pkgs/affine-gfx-brush/translations.js +30 -0
- package/dist/_pkgs/affine-gfx-connector/connector-manager.d.ts +9 -1
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +61 -0
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.d.ts +8 -1
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +7 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.d.ts +7 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.js +87 -17
- package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +78 -17
- package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.d.ts +24 -2
- package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +31 -8
- package/dist/_pkgs/affine-gfx-connector/text/edgeless-connector-label-editor.d.ts +124 -3
- package/dist/_pkgs/affine-gfx-connector/text/edgeless-connector-label-editor.js +219 -56
- package/dist/_pkgs/affine-gfx-connector/text/text.d.ts +13 -4
- package/dist/_pkgs/affine-gfx-connector/text/text.js +13 -44
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.d.ts +60 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +95 -13
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-dense-menu.js +7 -5
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-menu.js +8 -6
- package/dist/_pkgs/affine-gfx-connector/toolbar/connector-tool-button.js +4 -3
- package/dist/_pkgs/affine-gfx-connector/toolbar/hollow-endpoint-icons.d.ts +8 -0
- package/dist/_pkgs/affine-gfx-connector/toolbar/hollow-endpoint-icons.js +118 -0
- package/dist/_pkgs/affine-gfx-connector/translations.d.ts +32 -0
- package/dist/_pkgs/affine-gfx-connector/translations.js +79 -0
- package/dist/_pkgs/affine-gfx-connector/view/view.d.ts +37 -1
- package/dist/_pkgs/affine-gfx-connector/view/view.js +97 -8
- package/dist/_pkgs/affine-gfx-group/command/group-api.js +6 -1
- package/dist/_pkgs/affine-gfx-group/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-group/index.js +1 -0
- package/dist/_pkgs/affine-gfx-group/store.js +0 -2
- package/dist/_pkgs/affine-gfx-group/toolbar/config.d.ts +6 -2
- package/dist/_pkgs/affine-gfx-group/toolbar/config.js +9 -4
- package/dist/_pkgs/affine-gfx-group/translations.d.ts +23 -0
- package/dist/_pkgs/affine-gfx-group/translations.js +29 -0
- package/dist/_pkgs/affine-gfx-link/toolbar/undo-dense-menu.js +2 -1
- package/dist/_pkgs/affine-gfx-link/toolbar/undo-tool-button.js +2 -1
- package/dist/_pkgs/affine-gfx-mindmap/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-mindmap/index.js +1 -0
- package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +628 -577
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/basket-elements.js +7 -3
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/config.js +9 -1
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-importing-placeholder.d.ts +4 -0
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-importing-placeholder.js +70 -7
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +8 -5
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +4 -2
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/senior-tool.js +7 -2
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/utils/import-mindmap.d.ts +2 -1
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/utils/import-mindmap.js +16 -8
- package/dist/_pkgs/affine-gfx-mindmap/translations.d.ts +84 -0
- package/dist/_pkgs/affine-gfx-mindmap/translations.js +171 -0
- package/dist/_pkgs/affine-gfx-note/components/note-display-mode-panel.d.ts +8 -0
- package/dist/_pkgs/affine-gfx-note/components/note-display-mode-panel.js +24 -9
- package/dist/_pkgs/affine-gfx-note/components/note-shadow-panel.d.ts +9 -0
- package/dist/_pkgs/affine-gfx-note/components/note-shadow-panel.js +28 -8
- package/dist/_pkgs/affine-gfx-note/toolbar/note-menu-config.d.ts +2 -1
- package/dist/_pkgs/affine-gfx-note/toolbar/note-menu-config.js +42 -73
- package/dist/_pkgs/affine-gfx-note/toolbar/note-menu.js +21 -17
- package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +3 -2
- package/dist/_pkgs/affine-gfx-note/toolbar/note-tool-button.js +3 -1
- package/dist/_pkgs/affine-gfx-note/toolbar/senior-tool.js +3 -1
- package/dist/_pkgs/affine-gfx-note/translations.d.ts +27 -0
- package/dist/_pkgs/affine-gfx-note/translations.js +59 -0
- package/dist/_pkgs/affine-gfx-pointer/quick-tool/default-tool-button.js +10 -2
- package/dist/_pkgs/affine-gfx-pointer/translations.d.ts +9 -0
- package/dist/_pkgs/affine-gfx-pointer/translations.js +17 -0
- package/dist/_pkgs/affine-gfx-shape/components/shape-panel.d.ts +4 -0
- package/dist/_pkgs/affine-gfx-shape/components/shape-panel.js +17 -3
- package/dist/_pkgs/affine-gfx-shape/components/shape-style-panel.d.ts +4 -0
- package/dist/_pkgs/affine-gfx-shape/components/shape-style-panel.js +23 -5
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-menu.d.ts +0 -1
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-menu.js +6 -46
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-tool-button.js +3 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/highlighter.js +2 -2
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.d.ts +6 -0
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +30 -1
- package/dist/_pkgs/affine-gfx-shape/polygon-tool.d.ts +20 -1
- package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +9 -1
- package/dist/_pkgs/affine-gfx-shape/toolbar/config.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/config.js +35 -9
- package/dist/_pkgs/affine-gfx-shape/toolbar/palette-color-action.js +11 -1
- package/dist/_pkgs/affine-gfx-shape/toolbar/senior-tool.js +2 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/shape-menu-config.d.ts +3 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/shape-menu-config.js +7 -0
- package/dist/_pkgs/affine-gfx-shape/translations.d.ts +37 -0
- package/dist/_pkgs/affine-gfx-shape/translations.js +93 -0
- package/dist/_pkgs/affine-gfx-template/builtin/other.js +70 -42
- package/dist/_pkgs/affine-gfx-template/contribute.js +8 -1
- package/dist/_pkgs/affine-gfx-template/index.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-template/index.js +2 -0
- package/dist/_pkgs/affine-gfx-template/snapshot-from-action.d.ts +6 -1
- package/dist/_pkgs/affine-gfx-template/snapshot-from-action.js +43 -120
- package/dist/_pkgs/affine-gfx-template/toolbar/builtin-templates.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/builtin-templates.js +12 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/resolve-name.d.ts +25 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/resolve-name.js +36 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/senior-tool.js +3 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +30 -8
- package/dist/_pkgs/affine-gfx-template/toolbar/template-type.d.ts +41 -0
- package/dist/_pkgs/affine-gfx-template/translations.d.ts +71 -0
- package/dist/_pkgs/affine-gfx-template/translations.js +209 -0
- package/dist/_pkgs/affine-gfx-text/dblclick-add-edgeless-text.d.ts +13 -1
- package/dist/_pkgs/affine-gfx-text/dblclick-add-edgeless-text.js +19 -4
- package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.d.ts +41 -0
- package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.js +60 -4
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.d.ts +9 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +33 -10
- package/dist/_pkgs/affine-gfx-text/toolbar/text-menu.js +1 -0
- package/dist/_pkgs/affine-gfx-text/translations.d.ts +32 -0
- package/dist/_pkgs/affine-gfx-text/translations.js +65 -0
- package/dist/_pkgs/affine-inline-footnote/footnote-node/footnote-popup.js +8 -2
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-editor-menu.js +5 -2
- package/dist/_pkgs/affine-inline-latex/latex-node/latex-node.js +7 -2
- package/dist/_pkgs/affine-inline-latex/translations.d.ts +13 -0
- package/dist/_pkgs/affine-inline-latex/translations.js +16 -0
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.d.ts +3 -3
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.js +6 -5
- package/dist/_pkgs/affine-inline-link/link-node/link-popup/link-popup.js +11 -5
- package/dist/_pkgs/affine-inline-link/translations.d.ts +23 -0
- package/dist/_pkgs/affine-inline-link/translations.js +44 -0
- package/dist/_pkgs/affine-inline-mention/affine-mention.js +11 -5
- package/dist/_pkgs/affine-inline-mention/translations.d.ts +16 -0
- package/dist/_pkgs/affine-inline-mention/translations.js +29 -0
- package/dist/_pkgs/affine-inline-preset/command/config.d.ts +3 -0
- package/dist/_pkgs/affine-inline-preset/command/config.js +8 -0
- package/dist/_pkgs/affine-inline-preset/markdown.js +5 -1
- package/dist/_pkgs/affine-inline-preset/translations.d.ts +25 -0
- package/dist/_pkgs/affine-inline-preset/translations.js +28 -0
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +3 -3
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-popup/reference-popup.js +8 -6
- package/dist/_pkgs/affine-inline-reference/translations.d.ts +8 -0
- package/dist/_pkgs/affine-inline-reference/translations.js +13 -0
- package/dist/_pkgs/affine-model/consts/connector.d.ts +28 -2
- package/dist/_pkgs/affine-model/consts/connector.js +26 -0
- package/dist/_pkgs/affine-model/elements/bpmn/pool.js +1 -1
- package/dist/_pkgs/affine-model/elements/brush/brush.js +1 -1
- package/dist/_pkgs/affine-model/elements/c4/board.js +1 -1
- package/dist/_pkgs/affine-model/elements/c4/boundary.js +1 -1
- package/dist/_pkgs/affine-model/elements/connector/connector.d.ts +135 -0
- package/dist/_pkgs/affine-model/elements/connector/connector.js +246 -5
- package/dist/_pkgs/affine-model/elements/connector/end-label.d.ts +83 -0
- package/dist/_pkgs/affine-model/elements/connector/end-label.js +119 -0
- package/dist/_pkgs/affine-model/elements/connector/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/connector/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/context-map/context-map.js +1 -1
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +28 -0
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +129 -2
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.d.ts +8 -0
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.js +45 -2
- package/dist/_pkgs/affine-model/elements/edgy/board.js +1 -1
- package/dist/_pkgs/affine-model/elements/edgy/facets.js +1 -1
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.d.ts +6 -0
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.js +36 -2
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +18 -7
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +23 -8
- package/dist/_pkgs/affine-model/elements/framework-background/background.d.ts +16 -0
- package/dist/_pkgs/affine-model/elements/framework-background/background.js +18 -0
- package/dist/_pkgs/affine-model/elements/highlighter/highlighter.js +1 -1
- package/dist/_pkgs/affine-model/elements/index.d.ts +8 -0
- package/dist/_pkgs/affine-model/elements/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/shape/shape.js +1 -1
- package/dist/_pkgs/affine-model/elements/text/text.js +1 -1
- package/dist/_pkgs/affine-model/elements/uml/band.d.ts +39 -0
- package/dist/_pkgs/affine-model/elements/uml/band.js +31 -0
- package/dist/_pkgs/affine-model/elements/uml/diagram.d.ts +158 -0
- package/dist/_pkgs/affine-model/elements/uml/diagram.js +229 -0
- package/dist/_pkgs/affine-model/elements/uml/fragment.d.ts +161 -0
- package/dist/_pkgs/affine-model/elements/uml/fragment.js +205 -0
- package/dist/_pkgs/affine-model/elements/uml/index.d.ts +8 -0
- package/dist/_pkgs/affine-model/elements/uml/index.js +8 -0
- package/dist/_pkgs/affine-model/elements/uml/lifeline.d.ts +77 -0
- package/dist/_pkgs/affine-model/elements/uml/lifeline.js +89 -0
- package/dist/_pkgs/affine-model/elements/uml/node.d.ts +142 -0
- package/dist/_pkgs/affine-model/elements/uml/node.js +190 -0
- package/dist/_pkgs/affine-model/elements/uml/partition.d.ts +106 -0
- package/dist/_pkgs/affine-model/elements/uml/partition.js +172 -0
- package/dist/_pkgs/affine-model/elements/uml/region.d.ts +75 -0
- package/dist/_pkgs/affine-model/elements/uml/region.js +150 -0
- package/dist/_pkgs/affine-model/elements/uml/subject.d.ts +37 -0
- package/dist/_pkgs/affine-model/elements/uml/subject.js +108 -0
- package/dist/_pkgs/affine-model/elements/wardley/wardley.js +1 -1
- package/dist/_pkgs/affine-rich-text/conversion.d.ts +13 -0
- package/dist/_pkgs/affine-rich-text/conversion.js +27 -0
- package/dist/_pkgs/affine-shared/adapters/clipboard/clipboard.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/clipboard/utils.d.ts +2 -1
- package/dist/_pkgs/affine-shared/adapters/clipboard/utils.js +6 -3
- package/dist/_pkgs/affine-shared/adapters/markdown/markdown.js +5 -2
- package/dist/_pkgs/affine-shared/adapters/mix-text.js +5 -2
- package/dist/_pkgs/affine-shared/adapters/plain-text/plain-text.js +5 -2
- package/dist/_pkgs/affine-shared/adapters/utils/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/adapters/utils/index.js +1 -0
- package/dist/_pkgs/affine-shared/adapters/utils/wording.d.ts +9 -0
- package/dist/_pkgs/affine-shared/adapters/utils/wording.js +12 -0
- package/dist/_pkgs/affine-shared/services/comment-service/utils.js +2 -0
- package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +6 -3
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/font-loader/config.d.ts +7 -0
- package/dist/_pkgs/affine-shared/services/font-loader/config.js +43 -0
- package/dist/_pkgs/affine-shared/services/notification-service.js +18 -1
- package/dist/_pkgs/affine-shared/services/open-doc-config.d.ts +0 -1
- package/dist/_pkgs/affine-shared/services/open-doc-config.js +0 -2
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +1 -9
- package/dist/_pkgs/affine-shared/services/telemetry-service/document-damage-watcher.d.ts +53 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/document-damage-watcher.js +95 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +26 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/telemetry-service.d.ts +2 -2
- package/dist/_pkgs/affine-shared/services/toolbar-service/command-action.d.ts +34 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/command-action.js +63 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +432 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +1045 -3
- package/dist/_pkgs/affine-shared/services/translation-service/index.d.ts +40 -2
- package/dist/_pkgs/affine-shared/services/translation-service/index.js +44 -3
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.d.ts +83 -2
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +92 -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/motion.d.ts +14 -0
- package/dist/_pkgs/affine-shared/styles/motion.js +38 -0
- package/dist/_pkgs/affine-shared/utils/event.d.ts +10 -0
- package/dist/_pkgs/affine-shared/utils/event.js +20 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +16 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.js +25 -0
- package/dist/_pkgs/affine-shared/utils/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/utils/index.js +1 -0
- package/dist/_pkgs/affine-shared/utils/link-preview-refresh.d.ts +12 -0
- package/dist/_pkgs/affine-shared/utils/link-preview-refresh.js +13 -0
- package/dist/_pkgs/affine-widget-drag-handle/components/edgeless-preview/preview.d.ts +4 -0
- package/dist/_pkgs/affine-widget-drag-handle/components/edgeless-preview/preview.js +21 -8
- package/dist/_pkgs/affine-widget-drag-handle/helpers/preview-helper.js +1 -0
- package/dist/_pkgs/affine-widget-drag-handle/translations.d.ts +14 -0
- package/dist/_pkgs/affine-widget-drag-handle/translations.js +35 -0
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +4 -3
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/translations.d.ts +6 -0
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/translations.js +14 -0
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/auto-complete-panel.js +8 -5
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-auto-complete.js +3 -2
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/edgeless-element-link.js +3 -1
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/translations.d.ts +17 -0
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/translations.js +30 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/button/tool-icon-button.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/button/tool-icon-button.js +18 -2
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +12 -4
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +29 -6
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/consts.d.ts +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/consts.js +3 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/types.d.ts +18 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.d.ts +8 -3
- package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.js +38 -18
- package/dist/_pkgs/affine-widget-edgeless-toolbar/create-popper.js +13 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +2 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +80 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +270 -81
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/senior-menu-selection.d.ts +15 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/senior-menu-selection.js +15 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-weight-and-style-panel.d.ts +8 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-weight-and-style-panel.js +38 -8
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/artefact-ghost-overlay.d.ts +42 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/artefact-ghost-overlay.js +100 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/artefact-placement-tool.d.ts +100 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/artefact-placement-tool.js +274 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/index.d.ts +3 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/index.js +3 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/translate-created.d.ts +25 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/placement/translate-created.js +67 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.d.ts +15 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.js +20 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +5 -0
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/translations.d.ts +7 -0
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/translations.js +23 -0
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/zoom-bar-toggle-button.js +3 -1
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/zoom-toolbar.js +5 -3
- package/dist/_pkgs/affine-widget-linked-doc/config.js +15 -10
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.d.ts +12 -1
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +27 -18
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/index.d.ts +4 -1
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/index.js +2 -2
- package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +4 -1
- package/dist/_pkgs/affine-widget-linked-doc/mobile-linked-doc-menu.js +6 -2
- package/dist/_pkgs/affine-widget-linked-doc/transformers/html.js +3 -2
- package/dist/_pkgs/affine-widget-linked-doc/transformers/markdown.js +3 -2
- package/dist/_pkgs/affine-widget-linked-doc/translations.d.ts +53 -0
- package/dist/_pkgs/affine-widget-linked-doc/translations.js +104 -0
- package/dist/_pkgs/affine-widget-remote-selection/edgeless/index.js +4 -1
- package/dist/_pkgs/affine-widget-remote-selection/translations.d.ts +12 -0
- package/dist/_pkgs/affine-widget-remote-selection/translations.js +12 -0
- package/dist/_pkgs/affine-widget-slash-menu/config.js +15 -0
- package/dist/_pkgs/affine-widget-slash-menu/index.d.ts +1 -0
- package/dist/_pkgs/affine-widget-slash-menu/index.js +1 -0
- package/dist/_pkgs/affine-widget-slash-menu/slash-menu-popover.js +30 -15
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/copy.js +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/delete.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/index.js +9 -0
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/move-down.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/move-up.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/now.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/today.js +2 -2
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/tomorrow.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/tooltips/yesterday.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/translations.d.ts +91 -0
- package/dist/_pkgs/affine-widget-slash-menu/translations.js +175 -0
- package/dist/_pkgs/affine-widget-slash-menu/types.d.ts +18 -0
- package/dist/_pkgs/affine-widget-slash-menu/utils.d.ts +20 -1
- package/dist/_pkgs/affine-widget-slash-menu/utils.js +37 -0
- package/dist/_pkgs/affine-widget-toolbar/translations.d.ts +9 -0
- package/dist/_pkgs/affine-widget-toolbar/translations.js +13 -0
- package/dist/_pkgs/affine-widget-toolbar/utils.js +2 -1
- package/dist/_pkgs/global/gfx/xywh.js +7 -0
- package/dist/_pkgs/std/extension/command-registry.d.ts +158 -1
- package/dist/_pkgs/std/extension/command-registry.js +22 -0
- package/dist/_pkgs/std/extension/translation-manifest.d.ts +7 -0
- package/dist/_pkgs/std/gfx/index.d.ts +1 -1
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.d.ts +12 -0
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +20 -1
- package/dist/_pkgs/std/gfx/interactivity/manager.d.ts +10 -0
- package/dist/_pkgs/std/gfx/interactivity/manager.js +12 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +12 -7
- package/dist/_pkgs/std/gfx/model/surface/surface-model.d.ts +56 -0
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +84 -3
- package/dist/_pkgs/std/gfx/view/view.d.ts +11 -2
- package/dist/_pkgs/std/gfx/view/view.js +16 -2
- package/dist/_pkgs/std/translations.d.ts +24 -0
- package/dist/_pkgs/std/translations.js +28 -0
- package/dist/_pkgs/std/view/element/block-component.js +24 -7
- package/dist/commands.d.ts +6 -0
- package/dist/commands.js +8 -1
- package/dist/frameworks.d.ts +9 -0
- package/dist/frameworks.js +19 -0
- package/dist/translations.js +160 -5
- package/package.json +9 -4
- package/dist/_pkgs/affine-gfx-group/group-watcher.d.ts +0 -1
- package/dist/_pkgs/affine-gfx-group/group-watcher.js +0 -20
|
@@ -189,6 +189,21 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
189
189
|
'rotate',
|
|
190
190
|
'hidden',
|
|
191
191
|
]); }
|
|
192
|
+
/**
|
|
193
|
+
* The elements this surface built from a Y.Map that was missing a key it
|
|
194
|
+
* declares — today only `xywh`, the bound without which the element paints
|
|
195
|
+
* nothing (see {@link _createElementFromYMap}).
|
|
196
|
+
*
|
|
197
|
+
* **State, not just a signal.** The element models are built when the block
|
|
198
|
+
* model is created, before any view or `LifeCycleWatcher` is mounted, so a
|
|
199
|
+
* subscriber to {@link elementDamaged} would always be too late for the
|
|
200
|
+
* elements the document opened with. Whoever wants to count damaged
|
|
201
|
+
* documents reads this map at mount, then subscribes for what sync brings
|
|
202
|
+
* afterwards.
|
|
203
|
+
*/
|
|
204
|
+
get damagedElements() {
|
|
205
|
+
return this._damagedElements;
|
|
206
|
+
}
|
|
192
207
|
get elementModels() {
|
|
193
208
|
const models = [];
|
|
194
209
|
this._elementModels.forEach(model => models.push(model.model));
|
|
@@ -219,10 +234,17 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
219
234
|
this.elementAdded = new Subject();
|
|
220
235
|
this.elementRemoved = new Subject();
|
|
221
236
|
this.elementUpdated = new Subject();
|
|
237
|
+
/**
|
|
238
|
+
* An element was found damaged — see {@link damagedElements}. Pushed at the
|
|
239
|
+
* same moment the console line is written, so a subscriber that arrives
|
|
240
|
+
* later reads the map instead and misses nothing.
|
|
241
|
+
*/
|
|
242
|
+
this.elementDamaged = new Subject();
|
|
222
243
|
this.localElementAdded = new Subject();
|
|
223
244
|
this.localElementDeleted = new Subject();
|
|
224
245
|
this.localElementUpdated = new Subject();
|
|
225
246
|
this._isEmpty$ = signal(false);
|
|
247
|
+
this._damagedElements = new Map();
|
|
226
248
|
const subscription = this.created.subscribe(() => {
|
|
227
249
|
this._init();
|
|
228
250
|
subscription.unsubscribe();
|
|
@@ -338,6 +360,27 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
338
360
|
delete Ctor['_decoratorState'];
|
|
339
361
|
state.creating = false;
|
|
340
362
|
state.skipField = false;
|
|
363
|
+
// A document whose Yjs state still has pending structs can carry an element
|
|
364
|
+
// whose `xywh` key never arrived. The element reads its `[0,0,0,0]` fallback
|
|
365
|
+
// and paints nothing instead of a phantom shape at the origin — say so ONCE
|
|
366
|
+
// here, where every element model is built from its Y.Map, and never again
|
|
367
|
+
// from a getter that runs several times per frame. Group-like elements are
|
|
368
|
+
// excluded for free: their `xywh` is a derived getter, not a declared field.
|
|
369
|
+
//
|
|
370
|
+
// Only a map that is IN the document is asked: a brand-new element is built
|
|
371
|
+
// from a detached Y.Map whose keys still sit in Yjs' preliminary content,
|
|
372
|
+
// where `has()` sees nothing (and warns about the premature read).
|
|
373
|
+
if (yMap.doc &&
|
|
374
|
+
getFieldPropsSet(elementModel).has('xywh') &&
|
|
375
|
+
!yMap.has('xywh')) {
|
|
376
|
+
// The console line stays: std runs standalone, with no telemetry bus of
|
|
377
|
+
// its own. The state and the subject below are what makes the same fact
|
|
378
|
+
// COUNTABLE by a host that has one.
|
|
379
|
+
console.warn(`[labre] surface element ${type} ${id} has no xywh: rendering it with ` +
|
|
380
|
+
`a zero-size bound; the document is damaged`);
|
|
381
|
+
this._damagedElements.set(id, { type, reason: 'missing-xywh' });
|
|
382
|
+
this.elementDamaged.next({ id, type, reason: 'missing-xywh' });
|
|
383
|
+
}
|
|
341
384
|
const unmount = () => {
|
|
342
385
|
mounted = false;
|
|
343
386
|
elementModel.onDestroyed();
|
|
@@ -458,6 +501,7 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
458
501
|
const { model, unmount } = this._elementModels.get(id);
|
|
459
502
|
removeFromType(model.type, model);
|
|
460
503
|
this._elementModels.delete(id);
|
|
504
|
+
this._damagedElements.delete(id);
|
|
461
505
|
deletedElements.push({ model, unmount });
|
|
462
506
|
}
|
|
463
507
|
break;
|
|
@@ -510,10 +554,11 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
510
554
|
if (isGfxGroupCompatibleModel(payload.model)) {
|
|
511
555
|
this._groupLikeModels.delete(payload.id);
|
|
512
556
|
}
|
|
513
|
-
// Same rule as `_watchGroupRelationChange`:
|
|
557
|
+
// Same rule as `_watchGroupRelationChange`: cascade only on a local
|
|
558
|
+
// edit, and only if the store is writeable. The author already
|
|
514
559
|
// dropped the block from its group, and `removeChild` is a raw
|
|
515
560
|
// `transact` — on a readonly viewer it would be a silent write.
|
|
516
|
-
if (payload.isLocal) {
|
|
561
|
+
if (payload.isLocal && !this.store.readonly) {
|
|
517
562
|
const group = this.getGroup(payload.id);
|
|
518
563
|
if (group) {
|
|
519
564
|
// oxlint-disable-next-line unicorn/prefer-dom-node-remove
|
|
@@ -572,7 +617,10 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
572
617
|
// the same sync. Reacting to a REMOTE update with a local write is
|
|
573
618
|
// redundant on a writeable peer and, on a readonly viewer, the
|
|
574
619
|
// production exception `Cannot remove element in readonly mode`.
|
|
575
|
-
|
|
620
|
+
// A readonly peer never cascades either, whatever the provenance of
|
|
621
|
+
// the update: it may not write at all, and a lingering empty group is
|
|
622
|
+
// harmless — the author's own cascade arrives through sync.
|
|
623
|
+
if (!local || this.store.readonly)
|
|
576
624
|
return;
|
|
577
625
|
const element = this.getElementById(id);
|
|
578
626
|
if (isGroup(element) &&
|
|
@@ -640,6 +688,37 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
640
688
|
});
|
|
641
689
|
return id;
|
|
642
690
|
}
|
|
691
|
+
/**
|
|
692
|
+
* Build the element `addElement` would build from `props`, and stop there:
|
|
693
|
+
* FOR PREVIEWS ONLY — the model never enters the document.
|
|
694
|
+
*
|
|
695
|
+
* The props take the insertion path up to the moment the Y.Map would be
|
|
696
|
+
* attached — the `beforeAdd` middlewares (the author's last-used style), the
|
|
697
|
+
* class's `propsToY` (a string `text` becomes a `Y.Text`), the declared-prop
|
|
698
|
+
* routing — so a preview paints exactly what the placed element will. What
|
|
699
|
+
* `addElement` does next is skipped: the model is not registered (no
|
|
700
|
+
* `getElementById`, no `elementModels`), is never mounted (no observers, no
|
|
701
|
+
* `onChange`), emits no `elementAdded`, and opens no transaction.
|
|
702
|
+
*
|
|
703
|
+
* Its Y.Map is then parked in a throwaway `Y.Doc` of its own, because the
|
|
704
|
+
* values of a map that belongs to no document cannot be read (a `Y.Text`
|
|
705
|
+
* reads empty) — and a renderer needs to read them. That doc is not the
|
|
706
|
+
* store's; a renderer that WROTE to the model would still reach the store's
|
|
707
|
+
* `transact`, which is why a preview must only ever be rendered.
|
|
708
|
+
*
|
|
709
|
+
* `props.id` is required and is the caller's: nothing checks it against the
|
|
710
|
+
* document, since nothing is added to it.
|
|
711
|
+
*/
|
|
712
|
+
createDetachedElement(props) {
|
|
713
|
+
const middlewareCtx = {
|
|
714
|
+
type: 'beforeAdd',
|
|
715
|
+
payload: { type: props.type, props: { ...props } },
|
|
716
|
+
};
|
|
717
|
+
this._middlewares.forEach(mid => mid(middlewareCtx));
|
|
718
|
+
const { model } = this._createElementFromProps({ ...middlewareCtx.payload.props, id: props.id }, { onChange: () => { } });
|
|
719
|
+
new Y.Doc().getMap('preview').set(props.id, model.yMap);
|
|
720
|
+
return model;
|
|
721
|
+
}
|
|
643
722
|
addLocalElement(elem) {
|
|
644
723
|
this.localElements.add(elem);
|
|
645
724
|
this.localElementAdded.next(elem);
|
|
@@ -682,8 +761,10 @@ export class SurfaceBlockModel extends BlockModel {
|
|
|
682
761
|
this.elementAdded.complete();
|
|
683
762
|
this.elementRemoved.complete();
|
|
684
763
|
this.elementUpdated.complete();
|
|
764
|
+
this.elementDamaged.complete();
|
|
685
765
|
this._elementModels.forEach(({ unmount }) => unmount());
|
|
686
766
|
this._elementModels.clear();
|
|
767
|
+
this._damagedElements.clear();
|
|
687
768
|
}
|
|
688
769
|
getElementById(id) {
|
|
689
770
|
return this._elementModels.get(id)?.model ?? null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Container } from '../../../global/di/index.js';
|
|
2
2
|
import { DisposableGroup } from '../../../global/disposable/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { Bound, type IVec } from '../../../global/gfx/index.js';
|
|
4
4
|
import type { Extension } from '../../../store/index.js';
|
|
5
5
|
import type { PointerEventState } from '../../event/index.js';
|
|
6
6
|
import type { EditorHost } from '../../view/index.js';
|
|
@@ -57,7 +57,16 @@ export declare class GfxElementModelView<T extends GfxLocalElementModel | GfxPri
|
|
|
57
57
|
onDragStart(_: DragStartContext): void;
|
|
58
58
|
onDragEnd(_: DragEndContext): void;
|
|
59
59
|
onDragMove({ dx, dy, currentBound }: DragMoveContext): void;
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Whether a box (marquee) selection takes this element. `false` keeps it
|
|
62
|
+
* out; anything else keeps the default (any overlap selects).
|
|
63
|
+
*
|
|
64
|
+
* A model may carry its own answer as `boxSelectable(box)` — a framework
|
|
65
|
+
* background does, to join a marquee only when the marquee contains it —
|
|
66
|
+
* and the default view defers to it, so every view of such a model gets the
|
|
67
|
+
* rule without restating it.
|
|
68
|
+
*/
|
|
69
|
+
onBoxSelected(context: BoxSelectionContext): boolean | void;
|
|
61
70
|
/**
|
|
62
71
|
* Called when the view is destroyed.
|
|
63
72
|
* Override this method requires calling `super.onDestroyed()`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import { DisposableGroup } from '../../../global/disposable/index.js';
|
|
3
3
|
import { BlockSuiteError, ErrorCode } from '../../../global/exceptions/index.js';
|
|
4
|
-
import {} from '../../../global/gfx/index.js';
|
|
4
|
+
import { Bound } from '../../../global/gfx/index.js';
|
|
5
5
|
import { GfxPrimitiveElementModel } from '../model/surface/element-model.js';
|
|
6
6
|
export const GfxElementModelViewExtIdentifier = createIdentifier('GfxElementModelView');
|
|
7
7
|
export class GfxElementModelView {
|
|
@@ -104,7 +104,21 @@ export class GfxElementModelView {
|
|
|
104
104
|
onDragMove({ dx, dy, currentBound }) {
|
|
105
105
|
this.model.xywh = currentBound.moveDelta(dx, dy).serialize();
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Whether a box (marquee) selection takes this element. `false` keeps it
|
|
109
|
+
* out; anything else keeps the default (any overlap selects).
|
|
110
|
+
*
|
|
111
|
+
* A model may carry its own answer as `boxSelectable(box)` — a framework
|
|
112
|
+
* background does, to join a marquee only when the marquee contains it —
|
|
113
|
+
* and the default view defers to it, so every view of such a model gets the
|
|
114
|
+
* rule without restating it.
|
|
115
|
+
*/
|
|
116
|
+
onBoxSelected(context) {
|
|
117
|
+
const model = this.model;
|
|
118
|
+
if (typeof model.boxSelectable === 'function') {
|
|
119
|
+
return model.boxSelectable(Bound.from(context.box));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
108
122
|
/**
|
|
109
123
|
* Called when the view is destroyed.
|
|
110
124
|
* Override this method requires calling `super.onDestroyed()`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package's own wordings, joined into `PACKAGE_WORDINGS` in
|
|
3
|
+
* `@labre/affine/translations` — see that file and
|
|
4
|
+
* `packages/affine/shared/src/services/translation-service/README.md`.
|
|
5
|
+
*
|
|
6
|
+
* A plain local tuple type, not `ChromeWording`
|
|
7
|
+
* (`@labre/affine-shared/services`): `@labre/std` must never import
|
|
8
|
+
* `@labre/affine-shared` (the dependency runs the other way — see
|
|
9
|
+
* `view/element/block-component.ts`'s own doc comment), so this package
|
|
10
|
+
* cannot reuse that type any more than it can reuse `translateKey` itself.
|
|
11
|
+
*/
|
|
12
|
+
type Wording = readonly [key: string, fallback: string];
|
|
13
|
+
/**
|
|
14
|
+
* `BlockComponent.renderVersionMismatch`'s four wordings
|
|
15
|
+
* (`view/element/block-component.ts`) — the "Block Version Mismatched" card
|
|
16
|
+
* shown when a document carries a block flavour newer or older than this
|
|
17
|
+
* editor knows how to render.
|
|
18
|
+
*/
|
|
19
|
+
export declare const STD_VERSION_MISMATCH_TITLE: Wording;
|
|
20
|
+
export declare const STD_VERSION_MISMATCH_BODY: Wording;
|
|
21
|
+
export declare const STD_VERSION_MISMATCH_EDITOR_VERSION: Wording;
|
|
22
|
+
export declare const STD_VERSION_MISMATCH_DATA_VERSION: Wording;
|
|
23
|
+
export declare const STD_WORDINGS: readonly Wording[];
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `BlockComponent.renderVersionMismatch`'s four wordings
|
|
3
|
+
* (`view/element/block-component.ts`) — the "Block Version Mismatched" card
|
|
4
|
+
* shown when a document carries a block flavour newer or older than this
|
|
5
|
+
* editor knows how to render.
|
|
6
|
+
*/
|
|
7
|
+
export const STD_VERSION_MISMATCH_TITLE = [
|
|
8
|
+
'com.labre.std.version-mismatch.title',
|
|
9
|
+
'Block Version Mismatched',
|
|
10
|
+
];
|
|
11
|
+
export const STD_VERSION_MISMATCH_BODY = [
|
|
12
|
+
'com.labre.std.version-mismatch.body',
|
|
13
|
+
'We can not render this {{flavour}} block because the version is mismatched.',
|
|
14
|
+
];
|
|
15
|
+
export const STD_VERSION_MISMATCH_EDITOR_VERSION = [
|
|
16
|
+
'com.labre.std.version-mismatch.editor-version',
|
|
17
|
+
'Editor version: {{version}}',
|
|
18
|
+
];
|
|
19
|
+
export const STD_VERSION_MISMATCH_DATA_VERSION = [
|
|
20
|
+
'com.labre.std.version-mismatch.data-version',
|
|
21
|
+
'Data version: {{version}}',
|
|
22
|
+
];
|
|
23
|
+
export const STD_WORDINGS = [
|
|
24
|
+
STD_VERSION_MISMATCH_TITLE,
|
|
25
|
+
STD_VERSION_MISMATCH_BODY,
|
|
26
|
+
STD_VERSION_MISMATCH_EDITOR_VERSION,
|
|
27
|
+
STD_VERSION_MISMATCH_DATA_VERSION,
|
|
28
|
+
];
|
|
@@ -32,6 +32,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
35
36
|
import { BlockSuiteError, ErrorCode } from '../../../global/exceptions/index.js';
|
|
36
37
|
import { SignalWatcher, WithDisposable } from '../../../global/lit/index.js';
|
|
37
38
|
import { Store } from '../../../store/index.js';
|
|
@@ -44,10 +45,25 @@ import { when } from 'lit/directives/when.js';
|
|
|
44
45
|
import { html } from 'lit/static-html.js';
|
|
45
46
|
import { BlockServiceIdentifier } from '../../identifier.js';
|
|
46
47
|
import { BlockSelection } from '../../selection/index.js';
|
|
48
|
+
import { STD_VERSION_MISMATCH_BODY, STD_VERSION_MISMATCH_DATA_VERSION, STD_VERSION_MISMATCH_EDITOR_VERSION, STD_VERSION_MISMATCH_TITLE, } from '../../translations.js';
|
|
47
49
|
import { PropTypes, requiredProperties } from '../decorators/index.js';
|
|
48
50
|
import { blockComponentSymbol, modelContext, serviceContext, } from './consts.js';
|
|
49
51
|
import { stdContext, storeContext } from './lit-host.js';
|
|
50
52
|
import { ShadowlessElement } from './shadowless-element.js';
|
|
53
|
+
const LocalTranslationProvider = createIdentifier('AffineTranslationService');
|
|
54
|
+
/** `translateKey`'s own contract, replicated (see {@link LocalTranslationService}). */
|
|
55
|
+
function localTranslate(std, key, fallback) {
|
|
56
|
+
const resolved = std.getOptional(LocalTranslationProvider)?.t(key);
|
|
57
|
+
return resolved !== undefined && resolved !== '' ? resolved : fallback;
|
|
58
|
+
}
|
|
59
|
+
const [VERSION_MISMATCH_TITLE_KEY, VERSION_MISMATCH_TITLE_FALLBACK] = STD_VERSION_MISMATCH_TITLE;
|
|
60
|
+
const [VERSION_MISMATCH_BODY_KEY, VERSION_MISMATCH_BODY_FALLBACK] = STD_VERSION_MISMATCH_BODY;
|
|
61
|
+
const [VERSION_MISMATCH_EDITOR_VERSION_KEY, VERSION_MISMATCH_EDITOR_VERSION_FALLBACK,] = STD_VERSION_MISMATCH_EDITOR_VERSION;
|
|
62
|
+
const [VERSION_MISMATCH_DATA_VERSION_KEY, VERSION_MISMATCH_DATA_VERSION_FALLBACK,] = STD_VERSION_MISMATCH_DATA_VERSION;
|
|
63
|
+
/** `translateKey`'s own `{{name}}` interpolation, replicated (see above). */
|
|
64
|
+
function fillPlaceholder(template, name, value) {
|
|
65
|
+
return template.replace(new RegExp(`\\{\\{\\s*${name}\\s*\\}\\}`), value);
|
|
66
|
+
}
|
|
51
67
|
let BlockComponent = (() => {
|
|
52
68
|
var _a;
|
|
53
69
|
let _classDecorators = [requiredProperties({
|
|
@@ -259,18 +275,19 @@ let BlockComponent = (() => {
|
|
|
259
275
|
* @param actualVersion The version of the block's crdt data.
|
|
260
276
|
*/
|
|
261
277
|
renderVersionMismatch(expectedVersion, actualVersion) {
|
|
278
|
+
const title = localTranslate(this.std, VERSION_MISMATCH_TITLE_KEY, VERSION_MISMATCH_TITLE_FALLBACK);
|
|
279
|
+
const body = fillPlaceholder(localTranslate(this.std, VERSION_MISMATCH_BODY_KEY, VERSION_MISMATCH_BODY_FALLBACK), 'flavour', this.model.flavour);
|
|
280
|
+
const editorVersion = fillPlaceholder(localTranslate(this.std, VERSION_MISMATCH_EDITOR_VERSION_KEY, VERSION_MISMATCH_EDITOR_VERSION_FALLBACK), 'version', String(expectedVersion));
|
|
281
|
+
const dataVersion = fillPlaceholder(localTranslate(this.std, VERSION_MISMATCH_DATA_VERSION_KEY, VERSION_MISMATCH_DATA_VERSION_FALLBACK), 'version', String(actualVersion));
|
|
262
282
|
return html `
|
|
263
283
|
<dl class="version-mismatch-warning" contenteditable="false">
|
|
264
284
|
<dt>
|
|
265
|
-
<h4
|
|
285
|
+
<h4>${title}</h4>
|
|
266
286
|
</dt>
|
|
267
287
|
<dd>
|
|
268
|
-
<p>
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
</p>
|
|
272
|
-
<p>Editor version: <var>${expectedVersion}</var></p>
|
|
273
|
-
<p>Data version: <var>${actualVersion}</var></p>
|
|
288
|
+
<p>${body}</p>
|
|
289
|
+
<p>${editorVersion}</p>
|
|
290
|
+
<p>${dataVersion}</p>
|
|
274
291
|
</dd>
|
|
275
292
|
</dl>
|
|
276
293
|
`;
|
package/dist/commands.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export declare function buildCommandRegistry(core: AnyCommandDescriptor[], group
|
|
|
35
35
|
* stay reachable on a board whose framework tooling is switched off; it is
|
|
36
36
|
* registered from the always-on connector view extension for the same reason.
|
|
37
37
|
*
|
|
38
|
+
* `export.svg` joins them on the same terms (`docs/adr/0025`): a board is a
|
|
39
|
+
* `FrameworkBackgroundElementModel` whatever framework drew it, and the picture
|
|
40
|
+
* it hands back is the canvas renderer's output replayed into SVG — so the
|
|
41
|
+
* command belongs to no framework, and a framework toggled off must still be
|
|
42
|
+
* able to export the boards already on the canvas.
|
|
43
|
+
*
|
|
38
44
|
* `auditCommands` is `'core'`-owned but NOT always-on: it rides the `ai-audit`
|
|
39
45
|
* capability switch, which is a second axis (see `OPTIONAL_CAPABILITIES`). The
|
|
40
46
|
* read side is filtered here, the registration side by `AuditViewExtension` in
|
package/dist/commands.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { coreCommands, pivotCommands, readingCommands, tagCommands, } from './_pkgs/affine-block-root/index.js';
|
|
2
|
-
import { auditCommands, mapQualityCommands } from './_pkgs/affine-block-surface/index.js';
|
|
2
|
+
import { auditCommands, exportSvgCommands, mapQualityCommands, } from './_pkgs/affine-block-surface/index.js';
|
|
3
3
|
import { edgeDirectionCommands } from './_pkgs/affine-gfx-connector/index.js';
|
|
4
4
|
import { shapeCommands } from './_pkgs/affine-gfx-shape/index.js';
|
|
5
5
|
import { toCommandManifestEntry, } from './_pkgs/std/index.js';
|
|
@@ -27,6 +27,12 @@ export function buildCommandRegistry(core, groups, flags) {
|
|
|
27
27
|
* stay reachable on a board whose framework tooling is switched off; it is
|
|
28
28
|
* registered from the always-on connector view extension for the same reason.
|
|
29
29
|
*
|
|
30
|
+
* `export.svg` joins them on the same terms (`docs/adr/0025`): a board is a
|
|
31
|
+
* `FrameworkBackgroundElementModel` whatever framework drew it, and the picture
|
|
32
|
+
* it hands back is the canvas renderer's output replayed into SVG — so the
|
|
33
|
+
* command belongs to no framework, and a framework toggled off must still be
|
|
34
|
+
* able to export the boards already on the canvas.
|
|
35
|
+
*
|
|
30
36
|
* `auditCommands` is `'core'`-owned but NOT always-on: it rides the `ai-audit`
|
|
31
37
|
* capability switch, which is a second axis (see `OPTIONAL_CAPABILITIES`). The
|
|
32
38
|
* read side is filtered here, the registration side by `AuditViewExtension` in
|
|
@@ -46,6 +52,7 @@ export function getCommands(flags) {
|
|
|
46
52
|
...readingCommands,
|
|
47
53
|
...shapeCommands,
|
|
48
54
|
...mapQualityCommands,
|
|
55
|
+
...exportSvgCommands,
|
|
49
56
|
...edgeDirectionCommands,
|
|
50
57
|
...(isCapabilityEnabled(flags, 'ai-audit') ? auditCommands : []),
|
|
51
58
|
], FRAMEWORK_COMMAND_GROUPS, flags);
|
package/dist/frameworks.d.ts
CHANGED
|
@@ -10,6 +10,15 @@ import type { OptionalBlock } from './flags.js';
|
|
|
10
10
|
* read it (through a type-strip transform) instead of hand-maintaining its own
|
|
11
11
|
* `FRAMEWORKS` array. Keep it that way. See `docs/adr/0008` § Packaging.
|
|
12
12
|
*
|
|
13
|
+
* `iconKey` names the senior button's 56×56 glyph, registered in the framework's
|
|
14
|
+
* OWN command-icon table under `<segment>.toolbar` and therefore resolvable
|
|
15
|
+
* through `getCommandIcon`. The button still imports the glyph directly; the
|
|
16
|
+
* registry entry is what a host — or the catalogue — can resolve without it.
|
|
17
|
+
* Unlike the 24×24 command glyphs, it is `width="100%"` and fills whatever
|
|
18
|
+
* box it is put in.
|
|
19
|
+
* `__tests__/commands/registry.unit.spec.ts` ("every framework declares its own
|
|
20
|
+
* senior icon key") pins it non-empty, unique and registered.
|
|
21
|
+
*
|
|
13
22
|
* `telemetryKey` and `telemetrySegment` hold the HISTORICAL PostHog values.
|
|
14
23
|
* They are the reason the identity unification is code-side only and existing
|
|
15
24
|
* dashboards keep working untouched — never "tidy" them.
|
package/dist/frameworks.js
CHANGED
|
@@ -162,6 +162,25 @@ export const FRAMEWORK_DESCRIPTORS = [
|
|
|
162
162
|
],
|
|
163
163
|
shortcuts: true,
|
|
164
164
|
},
|
|
165
|
+
{
|
|
166
|
+
id: 'uml',
|
|
167
|
+
labelKey: 'com.labre.framework.uml',
|
|
168
|
+
labelFallback: 'UML',
|
|
169
|
+
iconKey: 'uml.toolbar',
|
|
170
|
+
telemetryKey: 'uml',
|
|
171
|
+
telemetrySegment: 'uml toolbox',
|
|
172
|
+
bundle: 'framework-uml',
|
|
173
|
+
info: 'umlFramework',
|
|
174
|
+
pkg: '@labre/affine-gfx-uml',
|
|
175
|
+
dir: 'affine/gfx/uml',
|
|
176
|
+
extensions: [
|
|
177
|
+
// always-on: placed diagrams, subjects and nodes must paint with the
|
|
178
|
+
// button off, and their role vocabulary must stay readable
|
|
179
|
+
{ viewExtension: 'UmlRenderViewExtension' },
|
|
180
|
+
{ flag: 'uml', viewExtension: 'UmlViewExtension' },
|
|
181
|
+
],
|
|
182
|
+
shortcuts: true,
|
|
183
|
+
},
|
|
165
184
|
];
|
|
166
185
|
/**
|
|
167
186
|
* Bundles that are NOT frameworks: no senior button, no commands, no identity
|
package/dist/translations.js
CHANGED
|
@@ -1,8 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ATTACHMENT_WORDINGS } from './_pkgs/affine-block-attachment/translations.js';
|
|
2
|
+
import { BOOKMARK_WORDINGS } from './_pkgs/affine-block-bookmark/translations.js';
|
|
3
|
+
import { EMBED_WORDINGS } from './_pkgs/affine-block-embed/translations.js';
|
|
4
|
+
import { EMBED_DOC_WORDINGS } from './_pkgs/affine-block-embed-doc/translations.js';
|
|
5
|
+
import { FRAME_CHROME_WORDINGS, FRAME_WORDINGS, } from './_pkgs/affine-block-frame/translations.js';
|
|
6
|
+
import { IMAGE_WORDINGS } from './_pkgs/affine-block-image/translations.js';
|
|
7
|
+
import { EXEMPTION_FALLBACK, PROVENANCE_FALLBACK, SEVERITY_FALLBACK, SVG_SKETCH_WORDINGS, } from './_pkgs/affine-block-surface/index.js';
|
|
8
|
+
import { SURFACE_REF_CHROME_WORDINGS, SURFACE_REF_WORDINGS, } from './_pkgs/affine-block-surface-ref/translations.js';
|
|
9
|
+
import { ADAPTER_PANEL_WORDINGS } from './_pkgs/affine-fragment-adapter-panel/translations.js';
|
|
10
|
+
import { DOC_TITLE_WORDINGS } from './_pkgs/affine-fragment-doc-title/translations.js';
|
|
11
|
+
import { OUTLINE_WORDINGS } from './_pkgs/affine-fragment-outline/translations.js';
|
|
12
|
+
import { COMPONENTS_WORDINGS } from './_pkgs/affine-components/translations.js';
|
|
13
|
+
import { ROOT_CHROME_WORDINGS, ROOT_SEED_WORDINGS, } from './_pkgs/affine-block-root/translations.js';
|
|
14
|
+
import { BRUSH_WORDINGS } from './_pkgs/affine-gfx-brush/translations.js';
|
|
15
|
+
import { CONNECTOR_WORDINGS } from './_pkgs/affine-gfx-connector/translations.js';
|
|
16
|
+
import { GROUP_CHROME_WORDINGS, GROUP_WORDINGS, } from './_pkgs/affine-gfx-group/translations.js';
|
|
17
|
+
import { MINDMAP_CHROME_WORDINGS, MINDMAP_SEED_WORDINGS, } from './_pkgs/affine-gfx-mindmap/translations.js';
|
|
18
|
+
import { SHAPE_WORDINGS } from './_pkgs/affine-gfx-shape/translations.js';
|
|
19
|
+
import { POINTER_WORDINGS } from './_pkgs/affine-gfx-pointer/translations.js';
|
|
20
|
+
import { FRAME_PANEL_WORDINGS } from './_pkgs/affine-fragment-frame-panel/translations.js';
|
|
21
|
+
import { TEMPLATE_PACKAGE_WORDINGS, TEMPLATE_SEED_WORDINGS, } from './_pkgs/affine-gfx-template/translations.js';
|
|
22
|
+
import { TEXT_WORDINGS } from './_pkgs/affine-gfx-text/translations.js';
|
|
23
|
+
import { LATEX_WORDINGS as INLINE_LATEX_WORDINGS } from './_pkgs/affine-inline-latex/translations.js';
|
|
24
|
+
import { LINK_WORDINGS } from './_pkgs/affine-inline-link/translations.js';
|
|
25
|
+
import { MENTION_WORDINGS } from './_pkgs/affine-inline-mention/translations.js';
|
|
26
|
+
import { PRESET_WORDINGS } from './_pkgs/affine-inline-preset/translations.js';
|
|
27
|
+
import { REFERENCE_WORDINGS } from './_pkgs/affine-inline-reference/translations.js';
|
|
28
|
+
import { CHROME_WORDINGS, } from './_pkgs/affine-shared/services/index.js';
|
|
29
|
+
import { CALLOUT_WORDINGS } from './_pkgs/affine-block-callout/translations.js';
|
|
30
|
+
import { CODE_WORDINGS } from './_pkgs/affine-block-code/translations.js';
|
|
31
|
+
import { LATEX_WORDINGS } from './_pkgs/affine-block-latex/translations.js';
|
|
32
|
+
import { NOTE_WORDINGS } from './_pkgs/affine-block-note/translations.js';
|
|
33
|
+
import { PARAGRAPH_WORDINGS } from './_pkgs/affine-block-paragraph/translations.js';
|
|
34
|
+
import { GFX_NOTE_WORDINGS } from './_pkgs/affine-gfx-note/translations.js';
|
|
35
|
+
import { DRAG_HANDLE_WORDINGS } from './_pkgs/affine-widget-drag-handle/translations.js';
|
|
36
|
+
import { AUTO_CONNECT_WORDINGS } from './_pkgs/affine-widget-edgeless-auto-connect/translations.js';
|
|
37
|
+
import { EDGELESS_SELECTED_RECT_WORDINGS } from './_pkgs/affine-widget-edgeless-selected-rect/translations.js';
|
|
38
|
+
import { EDGELESS_TOOLBAR_WORDINGS } from './_pkgs/affine-widget-edgeless-toolbar/translations.js';
|
|
39
|
+
import { ZOOM_TOOLBAR_WORDINGS } from './_pkgs/affine-widget-edgeless-zoom-toolbar/translations.js';
|
|
40
|
+
import { LINKED_DOC_WORDINGS } from './_pkgs/affine-widget-linked-doc/translations.js';
|
|
41
|
+
import { REMOTE_SELECTION_WORDINGS } from './_pkgs/affine-widget-remote-selection/translations.js';
|
|
42
|
+
import { SLASH_MENU_WORDINGS } from './_pkgs/affine-widget-slash-menu/translations.js';
|
|
43
|
+
import { TOOLBAR_WIDGET_WORDINGS } from './_pkgs/affine-widget-toolbar/translations.js';
|
|
3
44
|
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from './_pkgs/std/index.js';
|
|
45
|
+
import { STD_WORDINGS } from './_pkgs/std/translations.js';
|
|
4
46
|
import { getCommands } from './commands.js';
|
|
5
47
|
import { FRAMEWORK_DESCRIPTORS } from './frameworks.js';
|
|
48
|
+
/**
|
|
49
|
+
* The auxiliary bundles' contributions (`AUXILIARY_BUNDLES` in `frameworks.ts`):
|
|
50
|
+
* packages that ship as their own bundle without being a framework. Same
|
|
51
|
+
* one-line `{ owner: '<label>', … }` shape as the framework groups, so
|
|
52
|
+
* `scripts/build-bundles.mjs` strips them from core's copy the same way.
|
|
53
|
+
*/
|
|
54
|
+
const AUXILIARY_TRANSLATION_GROUPS = [
|
|
55
|
+
// One line per bundle: the bundler strips it by its `owner`.
|
|
56
|
+
];
|
|
6
57
|
const FRAMEWORK_TRANSLATION_GROUPS = [];
|
|
7
58
|
/**
|
|
8
59
|
* The chrome wordings that are TABLES: closed enumerations whose key is a
|
|
@@ -87,7 +138,10 @@ const CHROME_KEYS = [
|
|
|
87
138
|
// Artefact catalogue sidepanel
|
|
88
139
|
['com.labre.catalogue.title', 'Artefacts'],
|
|
89
140
|
['com.labre.catalogue.close', 'Close'],
|
|
90
|
-
|
|
141
|
+
// `com.labre.catalogue.other` USED to be here — L7 dedupe moved it to
|
|
142
|
+
// `chrome.ts` (`CATALOGUE_OTHER`), the same word as the templates-panel's
|
|
143
|
+
// own "Other" category tab, and its one call site now imports the constant
|
|
144
|
+
// instead of restating the literal.
|
|
91
145
|
['com.labre.catalogue.ranked', 'Recent & frequent'],
|
|
92
146
|
// Qualify (tags) toolbar
|
|
93
147
|
['com.labre.tags.toolbar.label', 'Qualify'],
|
|
@@ -165,6 +219,14 @@ const CHROME_KEYS = [
|
|
|
165
219
|
// and would leave every new format silently untranslated.
|
|
166
220
|
['com.labre.interchange.import.done', 'file imported'],
|
|
167
221
|
['com.labre.interchange.import.failed', 'This file could not be imported'],
|
|
222
|
+
// Rights lost WHILE the file was being read — the import's own sentence,
|
|
223
|
+
// because nothing is wrong with the file. It rides under the same "could not
|
|
224
|
+
// be imported" headline as a reader's refusal, which is what it is to the
|
|
225
|
+
// person who picked it.
|
|
226
|
+
[
|
|
227
|
+
'com.labre.interchange.import.readonly',
|
|
228
|
+
'This document became read-only while the file was being read, so nothing was imported.',
|
|
229
|
+
],
|
|
168
230
|
[
|
|
169
231
|
'com.labre.interchange.import.remarks',
|
|
170
232
|
'What the import could not keep as it was',
|
|
@@ -180,6 +242,90 @@ const CHROME_KEYS = [
|
|
|
180
242
|
['com.labre.interchange.import.drawn', 'drawn'],
|
|
181
243
|
['com.labre.interchange.import.carried', 'carried'],
|
|
182
244
|
['com.labre.interchange.import.quarantined', 'quarantined'],
|
|
245
|
+
// The one remark the shared materializer raises itself — a provisional name
|
|
246
|
+
// two imported elements were both handed. It belongs here with the pipeline's
|
|
247
|
+
// other words rather than in a reader's table, because no reader produces it:
|
|
248
|
+
// `materializeInterchangeImport` does, whichever format was read.
|
|
249
|
+
[
|
|
250
|
+
'com.labre.interchange.import.duplicate-provisional-name',
|
|
251
|
+
'Two imported elements were handed the same provisional name "{{name}}". Both are on the board; anything referring to that name points at the first of them.',
|
|
252
|
+
],
|
|
253
|
+
];
|
|
254
|
+
/**
|
|
255
|
+
* The block and widget packages' own wordings — one `readonly ChromeWording[]`
|
|
256
|
+
* per package, declared in that package's `translations.ts` beside the code
|
|
257
|
+
* that renders them, and walked here rather than restated.
|
|
258
|
+
*
|
|
259
|
+
* Per package and not one central table because the wordings belong to the
|
|
260
|
+
* package that renders them (an image toolbar's "Download" is the image
|
|
261
|
+
* block's), and because a single file every block edits is a file every
|
|
262
|
+
* parallel change conflicts on. Framework wordings do NOT go here: they travel
|
|
263
|
+
* in the framework's own `…TranslationEntries`, so a bundled host gets them
|
|
264
|
+
* with the framework bundle.
|
|
265
|
+
*/
|
|
266
|
+
const PACKAGE_WORDINGS = [
|
|
267
|
+
SLASH_MENU_WORDINGS,
|
|
268
|
+
OUTLINE_WORDINGS,
|
|
269
|
+
TEMPLATE_PACKAGE_WORDINGS,
|
|
270
|
+
NOTE_WORDINGS,
|
|
271
|
+
GFX_NOTE_WORDINGS,
|
|
272
|
+
CODE_WORDINGS,
|
|
273
|
+
LATEX_WORDINGS,
|
|
274
|
+
CALLOUT_WORDINGS,
|
|
275
|
+
PARAGRAPH_WORDINGS,
|
|
276
|
+
ADAPTER_PANEL_WORDINGS,
|
|
277
|
+
DOC_TITLE_WORDINGS,
|
|
278
|
+
SHAPE_WORDINGS,
|
|
279
|
+
TEXT_WORDINGS,
|
|
280
|
+
MINDMAP_CHROME_WORDINGS,
|
|
281
|
+
DRAG_HANDLE_WORDINGS,
|
|
282
|
+
AUTO_CONNECT_WORDINGS,
|
|
283
|
+
EDGELESS_SELECTED_RECT_WORDINGS,
|
|
284
|
+
EDGELESS_TOOLBAR_WORDINGS,
|
|
285
|
+
ZOOM_TOOLBAR_WORDINGS,
|
|
286
|
+
LINKED_DOC_WORDINGS,
|
|
287
|
+
REMOTE_SELECTION_WORDINGS,
|
|
288
|
+
TOOLBAR_WIDGET_WORDINGS,
|
|
289
|
+
COMPONENTS_WORDINGS,
|
|
290
|
+
INLINE_LATEX_WORDINGS,
|
|
291
|
+
LINK_WORDINGS,
|
|
292
|
+
MENTION_WORDINGS,
|
|
293
|
+
PRESET_WORDINGS,
|
|
294
|
+
REFERENCE_WORDINGS,
|
|
295
|
+
BRUSH_WORDINGS,
|
|
296
|
+
CONNECTOR_WORDINGS,
|
|
297
|
+
GROUP_CHROME_WORDINGS,
|
|
298
|
+
POINTER_WORDINGS,
|
|
299
|
+
ROOT_CHROME_WORDINGS,
|
|
300
|
+
SVG_SKETCH_WORDINGS,
|
|
301
|
+
STD_WORDINGS,
|
|
302
|
+
ATTACHMENT_WORDINGS,
|
|
303
|
+
BOOKMARK_WORDINGS,
|
|
304
|
+
IMAGE_WORDINGS,
|
|
305
|
+
EMBED_WORDINGS,
|
|
306
|
+
EMBED_DOC_WORDINGS,
|
|
307
|
+
SURFACE_REF_CHROME_WORDINGS,
|
|
308
|
+
FRAME_CHROME_WORDINGS,
|
|
309
|
+
FRAME_PANEL_WORDINGS,
|
|
310
|
+
];
|
|
311
|
+
/**
|
|
312
|
+
* Like {@link PACKAGE_WORDINGS}, for a non-framework package's SEEDS: text a
|
|
313
|
+
* creation action writes INTO the document, not chrome. Kept as its own
|
|
314
|
+
* source rather than folded into `PACKAGE_WORDINGS` under `chrome` — the two
|
|
315
|
+
* answer different questions for a host building a catalogue: a seed is
|
|
316
|
+
* translated once and becomes document content forever (a document created
|
|
317
|
+
* before the key existed keeps its plain text), while a chrome wording is
|
|
318
|
+
* re-rendered on every locale switch. `manifest.unit.spec.ts`'s "a placed
|
|
319
|
+
* artefact is seeded through the seam" pins a few of these by key, exactly as
|
|
320
|
+
* it does for a framework's own seeds.
|
|
321
|
+
*/
|
|
322
|
+
const PACKAGE_SEED_WORDINGS = [
|
|
323
|
+
FRAME_WORDINGS,
|
|
324
|
+
GROUP_WORDINGS,
|
|
325
|
+
MINDMAP_SEED_WORDINGS,
|
|
326
|
+
SURFACE_REF_WORDINGS,
|
|
327
|
+
TEMPLATE_SEED_WORDINGS,
|
|
328
|
+
ROOT_SEED_WORDINGS,
|
|
183
329
|
];
|
|
184
330
|
/**
|
|
185
331
|
* Every i18n key THIS package can ask the host for, with its English fallback
|
|
@@ -195,13 +341,13 @@ const CHROME_KEYS = [
|
|
|
195
341
|
* not filtered either.
|
|
196
342
|
*/
|
|
197
343
|
export function getTranslationKeyManifest() {
|
|
198
|
-
return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(),
|
|
344
|
+
return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), ...AUXILIARY_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(),
|
|
199
345
|
// The editor's own shared vocabulary — the toasts, the toolbar verbs, the
|
|
200
346
|
// view switcher, the board tooltips — DECLARED in
|
|
201
347
|
// `@labre/affine-shared/services` beside nothing at all, and walked here
|
|
202
348
|
// rather than restated. Same rule as the tables above: a wording added to
|
|
203
349
|
// `CHROME_WORDINGS` reaches a host with no second edit.
|
|
204
|
-
CHROME_WORDINGS.map(([key, fallback]) => ({
|
|
350
|
+
[...CHROME_WORDINGS, ...PACKAGE_WORDINGS.flat()].map(([key, fallback]) => ({
|
|
205
351
|
key,
|
|
206
352
|
fallback,
|
|
207
353
|
source: 'chrome',
|
|
@@ -209,5 +355,14 @@ export function getTranslationKeyManifest() {
|
|
|
209
355
|
key,
|
|
210
356
|
fallback,
|
|
211
357
|
source: 'chrome',
|
|
358
|
+
})),
|
|
359
|
+
// The non-framework packages' own SEEDS — text a creation action writes
|
|
360
|
+
// INTO the document (a frame's default title, a starter mindmap's
|
|
361
|
+
// captions), never re-rendered once placed. See
|
|
362
|
+
// `PACKAGE_SEED_WORDINGS`.
|
|
363
|
+
PACKAGE_SEED_WORDINGS.flat().map(([key, fallback]) => ({
|
|
364
|
+
key,
|
|
365
|
+
fallback,
|
|
366
|
+
source: 'seed',
|
|
212
367
|
})));
|
|
213
368
|
}
|