@formicoidea/labre-core 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_pkgs/affine-block-attachment/attachment-block.js +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/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 +2 -2
- 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-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/embed-iframe-block.js +3 -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 +12 -6
- 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-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/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/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/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.js +15 -6
- 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/translations.d.ts +61 -0
- package/dist/_pkgs/affine-block-root/translations.js +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +3 -1
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +31 -12
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +40 -8
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +27 -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.js +3 -2
- 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-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 +6 -0
- package/dist/_pkgs/affine-components/color-picker/button.js +15 -1
- 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/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 +2 -0
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +34 -5
- 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 +19 -4
- 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 +141 -0
- package/dist/_pkgs/affine-components/translations.js +478 -0
- 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/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 +4 -2
- package/dist/_pkgs/affine-gfx-brush/toolbar/configs/highlighter.js +4 -2
- 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/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/text/edgeless-connector-label-editor.js +3 -2
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.d.ts +4 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +24 -10
- 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/translations.d.ts +32 -0
- package/dist/_pkgs/affine-gfx-connector/translations.js +79 -0
- 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/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 +24 -0
- package/dist/_pkgs/affine-gfx-group/translations.js +33 -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/toolbar/config.d.ts +2 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/config.js +29 -8
- 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 +15 -5
- 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/edgeless-text-editor.js +3 -2
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.d.ts +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +22 -9
- package/dist/_pkgs/affine-gfx-text/toolbar/text-menu.js +1 -0
- package/dist/_pkgs/affine-gfx-text/translations.d.ts +31 -0
- package/dist/_pkgs/affine-gfx-text/translations.js +64 -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/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-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/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/translation-service/chrome.d.ts +362 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +955 -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-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.js +2 -2
- 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/edgeless-toolbar.js +2 -1
- 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 +31 -8
- 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-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/std/extension/translation-manifest.d.ts +7 -0
- 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/translations.js +144 -5
- package/package.json +1 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { BLOCK_NAME_BULLETED_LIST, BLOCK_NAME_CODE_BLOCK, BLOCK_NAME_DIVIDER, BLOCK_NAME_HEADING_1, BLOCK_NAME_HEADING_2, BLOCK_NAME_HEADING_3, BLOCK_NAME_HEADING_4, BLOCK_NAME_HEADING_5, BLOCK_NAME_HEADING_6, BLOCK_NAME_NUMBERED_LIST, BLOCK_NAME_QUOTE, BLOCK_NAME_TEXT, BLOCK_NAME_TODO_LIST, BOARD_BORDER_STYLE_LABEL, DISPLAY_MODE_BOTH, DISPLAY_MODE_EDGELESS, DISPLAY_MODE_PAGE, DISPLAY_MODE_SHOW_IN, FILL_COLOR_LABEL, NOTE_SHADOW_BOX, NOTE_SHADOW_FILM, NOTE_SHADOW_NONE, NOTE_SHADOW_PAPER, NOTE_SHADOW_STICKER, TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE, TOOLBAR_MOVE_DOWN, TOOLBAR_MOVE_UP, } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* This package's own wordings, declared beside the code that renders them —
|
|
4
|
+
* the note block's edgeless style panel, its slash-menu tooltip captions,
|
|
5
|
+
* and the surface toolbar's notifications. Words this package shares with
|
|
6
|
+
* ANOTHER of this lot's packages (the block-type names, the shadow options,
|
|
7
|
+
* the two move verbs, and — L7 dedupe — the bold/italic/underline/
|
|
8
|
+
* strikethrough formats, the border-style label, the fill-colour label and
|
|
9
|
+
* the display-mode words) live in `chrome.ts` instead and are re-exported or
|
|
10
|
+
* reused here; see the doc comment on each.
|
|
11
|
+
*/
|
|
12
|
+
/* ── Slash-menu tooltip captions (`./configs/tooltips.ts`) ────────────────
|
|
13
|
+
* The heading captions say "Heading #N" — with the hash — which is NOT the
|
|
14
|
+
* same literal as the block-type name "Heading N" used elsewhere (the
|
|
15
|
+
* paragraph placeholder, the gfx/note menu), so they keep their own keys
|
|
16
|
+
* rather than reusing `BLOCK_NAME_HEADING_N`.
|
|
17
|
+
*/
|
|
18
|
+
export const NOTE_TOOLTIP_HEADING_1 = [
|
|
19
|
+
'com.labre.note.tooltip.heading-1',
|
|
20
|
+
'Heading #1',
|
|
21
|
+
];
|
|
22
|
+
export const NOTE_TOOLTIP_HEADING_2 = [
|
|
23
|
+
'com.labre.note.tooltip.heading-2',
|
|
24
|
+
'Heading #2',
|
|
25
|
+
];
|
|
26
|
+
export const NOTE_TOOLTIP_HEADING_3 = [
|
|
27
|
+
'com.labre.note.tooltip.heading-3',
|
|
28
|
+
'Heading #3',
|
|
29
|
+
];
|
|
30
|
+
export const NOTE_TOOLTIP_HEADING_4 = [
|
|
31
|
+
'com.labre.note.tooltip.heading-4',
|
|
32
|
+
'Heading #4',
|
|
33
|
+
];
|
|
34
|
+
export const NOTE_TOOLTIP_HEADING_5 = [
|
|
35
|
+
'com.labre.note.tooltip.heading-5',
|
|
36
|
+
'Heading #5',
|
|
37
|
+
];
|
|
38
|
+
export const NOTE_TOOLTIP_HEADING_6 = [
|
|
39
|
+
'com.labre.note.tooltip.heading-6',
|
|
40
|
+
'Heading #6',
|
|
41
|
+
];
|
|
42
|
+
export const NOTE_TOOLTIP_BOLD_TEXT = [
|
|
43
|
+
'com.labre.note.tooltip.bold-text',
|
|
44
|
+
'Bold Text',
|
|
45
|
+
];
|
|
46
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_ITALIC}, one key. */
|
|
47
|
+
export const NOTE_TOOLTIP_ITALIC = TEXT_FORMAT_ITALIC;
|
|
48
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_UNDERLINE}, one key. */
|
|
49
|
+
export const NOTE_TOOLTIP_UNDERLINE = TEXT_FORMAT_UNDERLINE;
|
|
50
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_STRIKETHROUGH}, one key. */
|
|
51
|
+
export const NOTE_TOOLTIP_STRIKETHROUGH = TEXT_FORMAT_STRIKETHROUGH;
|
|
52
|
+
/* ── Slash-menu items rendered by THIS package (`./configs/slash-menu.ts`) ─
|
|
53
|
+
* `createConversionItem` / `createTextFormatItem` borrow their `name` from
|
|
54
|
+
* `textConversionConfigs` / `textFormatConfigs` (`@labre/affine-rich-text` /
|
|
55
|
+
* `@labre/affine-inline-preset`, both outside this lot) — the literal itself
|
|
56
|
+
* is out of scope, but the NAME each produces is one this package already has
|
|
57
|
+
* a wording for (the block-type names shared in `chrome.ts`, or the format
|
|
58
|
+
* names below), so the item still resolves through the seam by looking the
|
|
59
|
+
* borrowed name up in `NOTE_SLASH_ITEM_NAME_WORDINGS`.
|
|
60
|
+
*/
|
|
61
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_BOLD}, one key. */
|
|
62
|
+
export const NOTE_SLASH_FORMAT_BOLD = TEXT_FORMAT_BOLD;
|
|
63
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_ITALIC}, one key. */
|
|
64
|
+
export const NOTE_SLASH_FORMAT_ITALIC = TEXT_FORMAT_ITALIC;
|
|
65
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_UNDERLINE}, one key. */
|
|
66
|
+
export const NOTE_SLASH_FORMAT_UNDERLINE = TEXT_FORMAT_UNDERLINE;
|
|
67
|
+
/** An alias (L7 dedupe): the same word as {@link TEXT_FORMAT_STRIKETHROUGH}, one key. */
|
|
68
|
+
export const NOTE_SLASH_FORMAT_STRIKETHROUGH = TEXT_FORMAT_STRIKETHROUGH;
|
|
69
|
+
export const NOTE_OTHER_HEADINGS = [
|
|
70
|
+
'com.labre.note.slash-menu.other-headings',
|
|
71
|
+
'Other Headings',
|
|
72
|
+
];
|
|
73
|
+
/**
|
|
74
|
+
* `name` -> wording, for every conversion/format item this package's slash
|
|
75
|
+
* menu can offer. Reuses `BLOCK_NAME_*` (this lot's shared block-type names)
|
|
76
|
+
* where the borrowed `name` matches one, and this file's own format-name
|
|
77
|
+
* wordings otherwise.
|
|
78
|
+
*/
|
|
79
|
+
export const NOTE_SLASH_ITEM_NAME_WORDINGS = {
|
|
80
|
+
Text: BLOCK_NAME_TEXT,
|
|
81
|
+
'Heading 1': BLOCK_NAME_HEADING_1,
|
|
82
|
+
'Heading 2': BLOCK_NAME_HEADING_2,
|
|
83
|
+
'Heading 3': BLOCK_NAME_HEADING_3,
|
|
84
|
+
'Heading 4': BLOCK_NAME_HEADING_4,
|
|
85
|
+
'Heading 5': BLOCK_NAME_HEADING_5,
|
|
86
|
+
'Heading 6': BLOCK_NAME_HEADING_6,
|
|
87
|
+
'Code Block': BLOCK_NAME_CODE_BLOCK,
|
|
88
|
+
Quote: BLOCK_NAME_QUOTE,
|
|
89
|
+
Divider: BLOCK_NAME_DIVIDER,
|
|
90
|
+
'Bulleted List': BLOCK_NAME_BULLETED_LIST,
|
|
91
|
+
'Numbered List': BLOCK_NAME_NUMBERED_LIST,
|
|
92
|
+
'To-do List': BLOCK_NAME_TODO_LIST,
|
|
93
|
+
Bold: NOTE_SLASH_FORMAT_BOLD,
|
|
94
|
+
Italic: NOTE_SLASH_FORMAT_ITALIC,
|
|
95
|
+
Underline: NOTE_SLASH_FORMAT_UNDERLINE,
|
|
96
|
+
Strikethrough: NOTE_SLASH_FORMAT_STRIKETHROUGH,
|
|
97
|
+
};
|
|
98
|
+
/* ── Move up / down (`./move-block.ts`) ────────────────────────────────── */
|
|
99
|
+
export { TOOLBAR_MOVE_DOWN as NOTE_MOVE_DOWN, TOOLBAR_MOVE_UP as NOTE_MOVE_UP };
|
|
100
|
+
/* ── Note shadow menu (`./components/edgeless-note-shadow-menu.ts`) ─────── */
|
|
101
|
+
export { NOTE_SHADOW_BOX, NOTE_SHADOW_FILM, NOTE_SHADOW_NONE, NOTE_SHADOW_PAPER, NOTE_SHADOW_STICKER, };
|
|
102
|
+
export const NOTE_SHADOW_FLOATING = [
|
|
103
|
+
'com.labre.note.shadow.floating',
|
|
104
|
+
'Floating shadow',
|
|
105
|
+
];
|
|
106
|
+
/* ── Note style panel (`./components/edgeless-note-style-panel.ts`) ─────── */
|
|
107
|
+
/** An alias (L7 dedupe): the same word as {@link FILL_COLOR_LABEL}, one key. */
|
|
108
|
+
export const NOTE_STYLE_FILL_COLOR = FILL_COLOR_LABEL;
|
|
109
|
+
export const NOTE_STYLE_SHADOW_SECTION = [
|
|
110
|
+
'com.labre.note.style.shadow',
|
|
111
|
+
'Shadow',
|
|
112
|
+
];
|
|
113
|
+
export const NOTE_STYLE_BORDER_SECTION = [
|
|
114
|
+
'com.labre.note.style.border',
|
|
115
|
+
'Border',
|
|
116
|
+
];
|
|
117
|
+
export const NOTE_STYLE_CORNER_RADIUS = [
|
|
118
|
+
'com.labre.note.style.corner-radius',
|
|
119
|
+
'Corner Radius',
|
|
120
|
+
];
|
|
121
|
+
export const NOTE_STYLE_BACK = [
|
|
122
|
+
'com.labre.note.style.back',
|
|
123
|
+
'Back',
|
|
124
|
+
];
|
|
125
|
+
export const NOTE_STYLE_CUSTOM_COLOR = [
|
|
126
|
+
'com.labre.note.style.custom-color',
|
|
127
|
+
'Custom color',
|
|
128
|
+
];
|
|
129
|
+
export const NOTE_STYLE_PANEL_LABEL = [
|
|
130
|
+
'com.labre.note.style.panel-label',
|
|
131
|
+
'Note Style',
|
|
132
|
+
];
|
|
133
|
+
/* ── Border dropdown (`./components/edgeless-note-border-dropdown-menu.ts`) */
|
|
134
|
+
/**
|
|
135
|
+
* An alias (L7 dedupe): the same word as {@link BOARD_BORDER_STYLE_LABEL},
|
|
136
|
+
* one key.
|
|
137
|
+
*/
|
|
138
|
+
export const NOTE_BORDER_STYLE_LABEL = BOARD_BORDER_STYLE_LABEL;
|
|
139
|
+
/* ── Display-mode dropdown (`./components/edgeless-note-display-mode-dropdown-menu.ts`) */
|
|
140
|
+
/** An alias (L7 dedupe): the same word as {@link DISPLAY_MODE_SHOW_IN}, one key. */
|
|
141
|
+
export const NOTE_DISPLAY_MODE_SHOW_IN = DISPLAY_MODE_SHOW_IN;
|
|
142
|
+
export const NOTE_DISPLAY_MODE_LABEL = [
|
|
143
|
+
'com.labre.note.display-mode.mode-label',
|
|
144
|
+
'Mode',
|
|
145
|
+
];
|
|
146
|
+
export const NOTE_DISPLAY_MODE_TOOLTIP = [
|
|
147
|
+
'com.labre.note.display-mode.tooltip',
|
|
148
|
+
'Display mode',
|
|
149
|
+
];
|
|
150
|
+
/** An alias (L7 dedupe): the same word as {@link DISPLAY_MODE_BOTH}, one key. */
|
|
151
|
+
export const NOTE_DISPLAY_MODE_BOTH = DISPLAY_MODE_BOTH;
|
|
152
|
+
/** An alias (L7 dedupe): the same word as {@link DISPLAY_MODE_EDGELESS}, one key. */
|
|
153
|
+
export const NOTE_DISPLAY_MODE_EDGELESS = DISPLAY_MODE_EDGELESS;
|
|
154
|
+
/** An alias (L7 dedupe): the same word as {@link DISPLAY_MODE_PAGE}, one key. */
|
|
155
|
+
export const NOTE_DISPLAY_MODE_PAGE = DISPLAY_MODE_PAGE;
|
|
156
|
+
/* ── Surface toolbar (`./configs/toolbar.ts`) ─────────────────────────────
|
|
157
|
+
* The two "note is on the page" toasts. The removed-from-page title reuses
|
|
158
|
+
* `TOAST_NOTE_REMOVED_FROM_PAGE` (already in `chrome.ts`); its opposite gets
|
|
159
|
+
* its own key here. Each toast's BODY bakes in the trailing "Find it in the
|
|
160
|
+
* TOC…" sentence rather than composing it at the call site — one full
|
|
161
|
+
* sentence per key, never a fragment plus a suffix.
|
|
162
|
+
*/
|
|
163
|
+
export const NOTE_TOAST_DISPLAYED_IN_PAGE_MODE = [
|
|
164
|
+
'com.labre.note.toast.displayed-in-page-mode',
|
|
165
|
+
'Note displayed in Document Mode',
|
|
166
|
+
];
|
|
167
|
+
export const NOTE_TOAST_REMOVED_FROM_PAGE_BODY = [
|
|
168
|
+
'com.labre.note.toast.removed-from-page.body',
|
|
169
|
+
'Content removed from your document. Find it in the TOC for quick navigation.',
|
|
170
|
+
];
|
|
171
|
+
export const NOTE_TOAST_ADDED_TO_PAGE_BODY = [
|
|
172
|
+
'com.labre.note.toast.added-to-page.body',
|
|
173
|
+
'Content added to your document. Find it in the TOC for quick navigation.',
|
|
174
|
+
];
|
|
175
|
+
export const NOTE_TOAST_VIEW_IN_TOC = [
|
|
176
|
+
'com.labre.note.toast.view-in-toc',
|
|
177
|
+
'View in Toc',
|
|
178
|
+
];
|
|
179
|
+
export const NOTE_TOOLBAR_DISPLAY_IN_PAGE = [
|
|
180
|
+
'com.labre.note.toolbar.display-in-page',
|
|
181
|
+
'Display in Document',
|
|
182
|
+
];
|
|
183
|
+
export const NOTE_TOOLBAR_DISPLAYED_IN_PAGE = [
|
|
184
|
+
'com.labre.note.toolbar.displayed-in-page',
|
|
185
|
+
'Displayed in Document',
|
|
186
|
+
];
|
|
187
|
+
export const NOTE_TOOLBAR_REMOVE_FROM_PAGE_TOOLTIP = [
|
|
188
|
+
'com.labre.note.toolbar.remove-from-page-tooltip',
|
|
189
|
+
'This note is part of Document Mode. Click to remove it from the document.',
|
|
190
|
+
];
|
|
191
|
+
export const NOTE_TOOLBAR_SLICER = [
|
|
192
|
+
'com.labre.note.toolbar.slicer',
|
|
193
|
+
'Slicer',
|
|
194
|
+
];
|
|
195
|
+
export const NOTE_TOOLBAR_CUTTING_MODE = [
|
|
196
|
+
'com.labre.note.toolbar.cutting-mode',
|
|
197
|
+
'Cutting mode',
|
|
198
|
+
];
|
|
199
|
+
export const NOTE_TOOLBAR_SIZE = [
|
|
200
|
+
'com.labre.note.toolbar.size',
|
|
201
|
+
'Size',
|
|
202
|
+
];
|
|
203
|
+
export const NOTE_TOOLBAR_AUTO_HEIGHT = [
|
|
204
|
+
'com.labre.note.toolbar.auto-height',
|
|
205
|
+
'Auto height',
|
|
206
|
+
];
|
|
207
|
+
export const NOTE_TOOLBAR_CUSTOMIZED_HEIGHT = [
|
|
208
|
+
'com.labre.note.toolbar.customized-height',
|
|
209
|
+
'Customized height',
|
|
210
|
+
];
|
|
211
|
+
/**
|
|
212
|
+
* Every wording DECLARED IN THIS FILE (not re-exported from `chrome.ts`), in
|
|
213
|
+
* declaration order — walked by `PACKAGE_WORDINGS` in
|
|
214
|
+
* `packages/affine/all/src/translations.ts`. The chrome re-exports
|
|
215
|
+
* (`NOTE_MOVE_UP`/`_DOWN`, `NOTE_SHADOW_*` other than `_FLOATING`, and — L7
|
|
216
|
+
* dedupe — `NOTE_TOOLTIP_ITALIC`/`_UNDERLINE`/`_STRIKETHROUGH`,
|
|
217
|
+
* `NOTE_SLASH_FORMAT_BOLD`/`_ITALIC`/`_UNDERLINE`/`_STRIKETHROUGH`,
|
|
218
|
+
* `NOTE_STYLE_FILL_COLOR`, `NOTE_BORDER_STYLE_LABEL`,
|
|
219
|
+
* `NOTE_DISPLAY_MODE_SHOW_IN`/`_BOTH`/`_EDGELESS`/`_PAGE`) are not listed
|
|
220
|
+
* again here, same rule `SLASH_MENU_WORDINGS` already follows for its own
|
|
221
|
+
* chrome aliases.
|
|
222
|
+
*/
|
|
223
|
+
export const NOTE_WORDINGS = [
|
|
224
|
+
NOTE_TOOLTIP_HEADING_1,
|
|
225
|
+
NOTE_TOOLTIP_HEADING_2,
|
|
226
|
+
NOTE_TOOLTIP_HEADING_3,
|
|
227
|
+
NOTE_TOOLTIP_HEADING_4,
|
|
228
|
+
NOTE_TOOLTIP_HEADING_5,
|
|
229
|
+
NOTE_TOOLTIP_HEADING_6,
|
|
230
|
+
NOTE_TOOLTIP_BOLD_TEXT,
|
|
231
|
+
NOTE_OTHER_HEADINGS,
|
|
232
|
+
NOTE_SHADOW_FLOATING,
|
|
233
|
+
NOTE_STYLE_SHADOW_SECTION,
|
|
234
|
+
NOTE_STYLE_BORDER_SECTION,
|
|
235
|
+
NOTE_STYLE_CORNER_RADIUS,
|
|
236
|
+
NOTE_STYLE_BACK,
|
|
237
|
+
NOTE_STYLE_CUSTOM_COLOR,
|
|
238
|
+
NOTE_STYLE_PANEL_LABEL,
|
|
239
|
+
NOTE_DISPLAY_MODE_LABEL,
|
|
240
|
+
NOTE_DISPLAY_MODE_TOOLTIP,
|
|
241
|
+
NOTE_TOAST_DISPLAYED_IN_PAGE_MODE,
|
|
242
|
+
NOTE_TOAST_REMOVED_FROM_PAGE_BODY,
|
|
243
|
+
NOTE_TOAST_ADDED_TO_PAGE_BODY,
|
|
244
|
+
NOTE_TOAST_VIEW_IN_TOC,
|
|
245
|
+
NOTE_TOOLBAR_DISPLAY_IN_PAGE,
|
|
246
|
+
NOTE_TOOLBAR_DISPLAYED_IN_PAGE,
|
|
247
|
+
NOTE_TOOLBAR_REMOVE_FROM_PAGE_TOOLTIP,
|
|
248
|
+
NOTE_TOOLBAR_SLICER,
|
|
249
|
+
NOTE_TOOLBAR_CUTTING_MODE,
|
|
250
|
+
NOTE_TOOLBAR_SIZE,
|
|
251
|
+
NOTE_TOOLBAR_AUTO_HEIGHT,
|
|
252
|
+
NOTE_TOOLBAR_CUSTOMIZED_HEIGHT,
|
|
253
|
+
];
|
|
@@ -36,7 +36,7 @@ import { CaptionedBlockComponent } from '../affine-components/caption/index.js';
|
|
|
36
36
|
import { TOGGLE_BUTTON_PARENT_CLASS } from '../affine-components/toggle-button/index.js';
|
|
37
37
|
import { DefaultInlineManagerExtension } from '../affine-inline-preset/index.js';
|
|
38
38
|
import { BLOCK_CHILDREN_CONTAINER_PADDING_LEFT, EDGELESS_TOP_CONTENTEDITABLE_SELECTOR, } from '../affine-shared/consts/index.js';
|
|
39
|
-
import { BlockCommentManager, CitationProvider, DocModeProvider, } from '../affine-shared/services/index.js';
|
|
39
|
+
import { BlockCommentManager, CitationProvider, DocModeProvider, translateKey, } from '../affine-shared/services/index.js';
|
|
40
40
|
import { calculateCollapsedSiblings, getNearestHeadingBefore, getViewportElement, } from '../affine-shared/utils/index.js';
|
|
41
41
|
import { TextSelection } from '../std/index.js';
|
|
42
42
|
import { getInlineRangeProvider, } from '../std/inline/index.js';
|
|
@@ -48,6 +48,7 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
|
48
48
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
49
49
|
import { ParagraphBlockConfigExtension } from './paragraph-block-config.js';
|
|
50
50
|
import { paragraphBlockStyles } from './styles.js';
|
|
51
|
+
import { PARAGRAPH_PLACEHOLDER_WORDINGS } from './translations.js';
|
|
51
52
|
let ParagraphBlockComponent = (() => {
|
|
52
53
|
let _classSuper = CaptionedBlockComponent;
|
|
53
54
|
let __richTextElement_decorators;
|
|
@@ -95,9 +96,13 @@ let ParagraphBlockComponent = (() => {
|
|
|
95
96
|
}
|
|
96
97
|
static { this.styles = paragraphBlockStyles; }
|
|
97
98
|
get _placeholder() {
|
|
98
|
-
|
|
99
|
+
const raw = this.std
|
|
99
100
|
.get(ParagraphBlockConfigExtension.identifier)
|
|
100
101
|
?.getPlaceholder(this.model);
|
|
102
|
+
if (!raw)
|
|
103
|
+
return raw;
|
|
104
|
+
const wording = PARAGRAPH_PLACEHOLDER_WORDINGS[raw];
|
|
105
|
+
return wording ? translateKey(this.std, ...wording) : raw;
|
|
101
106
|
}
|
|
102
107
|
_setReadonlyCollapsed(collapsed) {
|
|
103
108
|
this._readonlyCollapsed.value = collapsed;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ChromeWording } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* This package's own wordings, declared beside the code that renders them —
|
|
4
|
+
* the empty-paragraph placeholder (`./view.ts`). The heading placeholders
|
|
5
|
+
* ("Heading 1".."Heading 6") say the exact same words as the gfx/note menu's
|
|
6
|
+
* own block-type names, so they are re-exported from `chrome.ts` rather than
|
|
7
|
+
* declared again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PARAGRAPH_PLACEHOLDER_H1: ChromeWording;
|
|
10
|
+
export declare const PARAGRAPH_PLACEHOLDER_H2: ChromeWording;
|
|
11
|
+
export declare const PARAGRAPH_PLACEHOLDER_H3: ChromeWording;
|
|
12
|
+
export declare const PARAGRAPH_PLACEHOLDER_H4: ChromeWording;
|
|
13
|
+
export declare const PARAGRAPH_PLACEHOLDER_H5: ChromeWording;
|
|
14
|
+
export declare const PARAGRAPH_PLACEHOLDER_H6: ChromeWording;
|
|
15
|
+
export declare const PARAGRAPH_PLACEHOLDER_TEXT: ChromeWording;
|
|
16
|
+
/**
|
|
17
|
+
* `./paragraph-block.ts` renders whatever `getPlaceholder(model)` returns —
|
|
18
|
+
* a public extension option (`ParagraphBlockConfigExtension`), so its
|
|
19
|
+
* signature stays untouched rather than widened to take `std`. Its DEFAULT
|
|
20
|
+
* implementation still returns the plain English literal (`./view.ts`'s
|
|
21
|
+
* `placeholders` map); this table lets the render site look that literal up
|
|
22
|
+
* and resolve it through the seam, while a host-supplied `getPlaceholder`
|
|
23
|
+
* that returns anything else keeps reading exactly as it did before.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PARAGRAPH_PLACEHOLDER_WORDINGS: Readonly<Record<string, ChromeWording>>;
|
|
26
|
+
/**
|
|
27
|
+
* Every wording DECLARED IN THIS FILE (not re-exported from `chrome.ts`), in
|
|
28
|
+
* declaration order — walked by `PACKAGE_WORDINGS` in
|
|
29
|
+
* `packages/affine/all/src/translations.ts`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const PARAGRAPH_WORDINGS: readonly ChromeWording[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BLOCK_NAME_HEADING_1, BLOCK_NAME_HEADING_2, BLOCK_NAME_HEADING_3, BLOCK_NAME_HEADING_4, BLOCK_NAME_HEADING_5, BLOCK_NAME_HEADING_6, } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* This package's own wordings, declared beside the code that renders them —
|
|
4
|
+
* the empty-paragraph placeholder (`./view.ts`). The heading placeholders
|
|
5
|
+
* ("Heading 1".."Heading 6") say the exact same words as the gfx/note menu's
|
|
6
|
+
* own block-type names, so they are re-exported from `chrome.ts` rather than
|
|
7
|
+
* declared again.
|
|
8
|
+
*/
|
|
9
|
+
export const PARAGRAPH_PLACEHOLDER_H1 = BLOCK_NAME_HEADING_1;
|
|
10
|
+
export const PARAGRAPH_PLACEHOLDER_H2 = BLOCK_NAME_HEADING_2;
|
|
11
|
+
export const PARAGRAPH_PLACEHOLDER_H3 = BLOCK_NAME_HEADING_3;
|
|
12
|
+
export const PARAGRAPH_PLACEHOLDER_H4 = BLOCK_NAME_HEADING_4;
|
|
13
|
+
export const PARAGRAPH_PLACEHOLDER_H5 = BLOCK_NAME_HEADING_5;
|
|
14
|
+
export const PARAGRAPH_PLACEHOLDER_H6 = BLOCK_NAME_HEADING_6;
|
|
15
|
+
export const PARAGRAPH_PLACEHOLDER_TEXT = [
|
|
16
|
+
'com.labre.paragraph.placeholder.text',
|
|
17
|
+
"Type '/' for commands",
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* `./paragraph-block.ts` renders whatever `getPlaceholder(model)` returns —
|
|
21
|
+
* a public extension option (`ParagraphBlockConfigExtension`), so its
|
|
22
|
+
* signature stays untouched rather than widened to take `std`. Its DEFAULT
|
|
23
|
+
* implementation still returns the plain English literal (`./view.ts`'s
|
|
24
|
+
* `placeholders` map); this table lets the render site look that literal up
|
|
25
|
+
* and resolve it through the seam, while a host-supplied `getPlaceholder`
|
|
26
|
+
* that returns anything else keeps reading exactly as it did before.
|
|
27
|
+
*/
|
|
28
|
+
export const PARAGRAPH_PLACEHOLDER_WORDINGS = {
|
|
29
|
+
"Type '/' for commands": PARAGRAPH_PLACEHOLDER_TEXT,
|
|
30
|
+
'Heading 1': PARAGRAPH_PLACEHOLDER_H1,
|
|
31
|
+
'Heading 2': PARAGRAPH_PLACEHOLDER_H2,
|
|
32
|
+
'Heading 3': PARAGRAPH_PLACEHOLDER_H3,
|
|
33
|
+
'Heading 4': PARAGRAPH_PLACEHOLDER_H4,
|
|
34
|
+
'Heading 5': PARAGRAPH_PLACEHOLDER_H5,
|
|
35
|
+
'Heading 6': PARAGRAPH_PLACEHOLDER_H6,
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Every wording DECLARED IN THIS FILE (not re-exported from `chrome.ts`), in
|
|
39
|
+
* declaration order — walked by `PACKAGE_WORDINGS` in
|
|
40
|
+
* `packages/affine/all/src/translations.ts`.
|
|
41
|
+
*/
|
|
42
|
+
export const PARAGRAPH_WORDINGS = [
|
|
43
|
+
PARAGRAPH_PLACEHOLDER_TEXT,
|
|
44
|
+
];
|
|
@@ -7,8 +7,13 @@ import { effects } from './effects.js';
|
|
|
7
7
|
import { ParagraphMarkdownExtension } from './markdown.js';
|
|
8
8
|
import { ParagraphBlockConfigExtension } from './paragraph-block-config.js';
|
|
9
9
|
import { ParagraphKeymapExtension, ParagraphTextKeymapExtension, } from './paragraph-keymap.js';
|
|
10
|
+
import { PARAGRAPH_PLACEHOLDER_TEXT } from './translations.js';
|
|
11
|
+
// `text` reads its English literal from the wording declared in
|
|
12
|
+
// `./translations.ts` (a property access, not a restated literal) so this map
|
|
13
|
+
// stays the single source of truth `paragraph-block.ts` resolves through the
|
|
14
|
+
// seam, rather than drifting from it.
|
|
10
15
|
const placeholders = {
|
|
11
|
-
text:
|
|
16
|
+
text: PARAGRAPH_PLACEHOLDER_TEXT[1],
|
|
12
17
|
h1: 'Heading 1',
|
|
13
18
|
h2: 'Heading 2',
|
|
14
19
|
h3: 'Heading 3',
|
|
@@ -3,7 +3,7 @@ export declare const builtinToolbarConfig: {
|
|
|
3
3
|
readonly actions: [{
|
|
4
4
|
readonly id: "a.conversions";
|
|
5
5
|
readonly when: ({ chain }: import("../../affine-shared/services/index.js").ToolbarContext) => boolean;
|
|
6
|
-
readonly generate: ({ chain }: import("../../affine-shared/services/index.js").ToolbarContext) => {
|
|
6
|
+
readonly generate: ({ chain, std }: import("../../affine-shared/services/index.js").ToolbarContext) => {
|
|
7
7
|
content: import("lit-html").TemplateResult<1>;
|
|
8
8
|
} | null;
|
|
9
9
|
}, {
|
|
@@ -24,12 +24,14 @@ export declare const builtinToolbarConfig: {
|
|
|
24
24
|
}, {
|
|
25
25
|
readonly id: "e.convert-to-database";
|
|
26
26
|
readonly tooltip: "Create Table";
|
|
27
|
+
readonly tooltipWording: import("../../affine-shared/services/index.js").ChromeWording;
|
|
27
28
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
28
29
|
readonly when: ({ chain }: import("../../affine-shared/services/index.js").ToolbarContext) => boolean;
|
|
29
30
|
readonly run: ({ host }: import("../../affine-shared/services/index.js").ToolbarContext) => void;
|
|
30
31
|
}, {
|
|
31
32
|
readonly id: "f.convert-to-linked-doc";
|
|
32
33
|
readonly tooltip: "Create Linked Doc";
|
|
34
|
+
readonly tooltipWording: import("../../affine-shared/services/index.js").ChromeWording;
|
|
33
35
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
34
36
|
readonly when: ({ chain, std }: import("../../affine-shared/services/index.js").ToolbarContext) => boolean;
|
|
35
37
|
readonly run: ({ chain, store, selection, std, track }: import("../../affine-shared/services/index.js").ToolbarContext) => void;
|
|
@@ -14,10 +14,11 @@ import { BlockSelection, BlockViewIdentifier, } from '../../std/index.js';
|
|
|
14
14
|
import { toDraftModel } from '../../store/index.js';
|
|
15
15
|
import { html } from 'lit';
|
|
16
16
|
import { repeat } from 'lit/directives/repeat.js';
|
|
17
|
+
import { ROOT_TOOLBAR_CONVERSIONS_ARIA, ROOT_TOOLBAR_CREATE_LINKED_DOC, ROOT_TOOLBAR_CREATE_TABLE, ROOT_TOOLBAR_TURN_INTO, } from '../translations.js';
|
|
17
18
|
const conversionsActionGroup = {
|
|
18
19
|
id: 'a.conversions',
|
|
19
20
|
when: ({ chain }) => isFormatSupported(chain).run()[0],
|
|
20
|
-
generate({ chain }) {
|
|
21
|
+
generate({ chain, std }) {
|
|
21
22
|
const [ok, { selectedModels = [] }] = chain
|
|
22
23
|
.tryAll(chain => [
|
|
23
24
|
chain.pipe(getTextSelectionCommand),
|
|
@@ -47,8 +48,8 @@ const conversionsActionGroup = {
|
|
|
47
48
|
.contentPadding="${'8px'}"
|
|
48
49
|
.button=${html `
|
|
49
50
|
<editor-icon-button
|
|
50
|
-
aria-label="
|
|
51
|
-
.tooltip="${
|
|
51
|
+
aria-label="${translateKey(std, ...ROOT_TOOLBAR_CONVERSIONS_ARIA)}"
|
|
52
|
+
.tooltip="${translateKey(std, ...ROOT_TOOLBAR_TURN_INTO)}"
|
|
52
53
|
>
|
|
53
54
|
${conversion.icon} ${EditorChevronDown}
|
|
54
55
|
</editor-icon-button>
|
|
@@ -110,6 +111,7 @@ const highlightActionGroup = {
|
|
|
110
111
|
const turnIntoDatabase = {
|
|
111
112
|
id: 'e.convert-to-database',
|
|
112
113
|
tooltip: 'Create Table',
|
|
114
|
+
tooltipWording: ROOT_TOOLBAR_CREATE_TABLE,
|
|
113
115
|
icon: DatabaseTableViewIcon(),
|
|
114
116
|
when({ chain }) {
|
|
115
117
|
const middleware = (count = 0) => {
|
|
@@ -151,6 +153,7 @@ const turnIntoDatabase = {
|
|
|
151
153
|
const turnIntoLinkedDoc = {
|
|
152
154
|
id: 'f.convert-to-linked-doc',
|
|
153
155
|
tooltip: 'Create Linked Doc',
|
|
156
|
+
tooltipWording: ROOT_TOOLBAR_CREATE_LINKED_DOC,
|
|
154
157
|
icon: LinkedPageIcon(),
|
|
155
158
|
when({ chain, std }) {
|
|
156
159
|
const supportFlavours = [
|
|
@@ -34,7 +34,7 @@ export async function prepareClipboardData(selectedAll, std) {
|
|
|
34
34
|
}
|
|
35
35
|
return data;
|
|
36
36
|
}));
|
|
37
|
-
const blobs = await encodeClipboardBlobs(job.assetsManager.getAssets());
|
|
37
|
+
const blobs = await encodeClipboardBlobs(job.assetsManager.getAssets(), undefined, std.provider);
|
|
38
38
|
return {
|
|
39
39
|
snapshot: selected.filter(d => !!d),
|
|
40
40
|
blobs,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { autoArrangeElementsCommand, autoResizeElementsCommand, EdgelessCRUDIdentifier, updateXYWH, } from '../../../../affine-block-surface/index.js';
|
|
2
2
|
import { EditorChevronDown } from '../../../../affine-components/toolbar/index.js';
|
|
3
|
+
import { translateKey } from '../../../../affine-shared/services/index.js';
|
|
3
4
|
import { renderMenuItems } from '../../../../affine-widget-edgeless-toolbar/index.js';
|
|
4
5
|
import { Bound } from '../../../../global/gfx/index.js';
|
|
5
6
|
import { AlignBottomIcon, AlignHorizontalCenterIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, AlignVerticalCenterIcon, AutoTidyUpIcon, DistributeHorizontalIcon, DistributeVerticalIcon, ResizeTidyUpIcon, } from '@blocksuite/icons/lit';
|
|
6
7
|
import { html } from 'lit';
|
|
7
8
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
9
|
+
import { ROOT_ALIGN_BOTTOM, ROOT_ALIGN_HORIZONTALLY, ROOT_ALIGN_LEFT, ROOT_ALIGN_RIGHT, ROOT_ALIGN_TOP, ROOT_ALIGN_VERTICALLY, ROOT_ALIGNMENT_MENU_ARIA, ROOT_AUTO_ARRANGE, ROOT_DISTRIBUTE_HORIZONTALLY, ROOT_DISTRIBUTE_VERTICALLY, ROOT_RESIZE_AND_ALIGN, } from '../../../translations.js';
|
|
8
10
|
var Alignment;
|
|
9
11
|
(function (Alignment) {
|
|
10
12
|
Alignment[Alignment["None"] = 0] = "None";
|
|
@@ -190,10 +192,30 @@ const alignment = {
|
|
|
190
192
|
const updateXYWHWith = (ctx, model, bound) => {
|
|
191
193
|
updateXYWH(model, bound, ctx.std.get(EdgelessCRUDIdentifier).updateElement, ctx.store.updateBlock);
|
|
192
194
|
};
|
|
195
|
+
/** Every alignment menu item's key, resolved through the host's catalogue. */
|
|
196
|
+
const ALIGNMENT_KEY_WORDING = {
|
|
197
|
+
[Alignment.Left]: ROOT_ALIGN_LEFT,
|
|
198
|
+
[Alignment.Horizontally]: ROOT_ALIGN_HORIZONTALLY,
|
|
199
|
+
[Alignment.Right]: ROOT_ALIGN_RIGHT,
|
|
200
|
+
[Alignment.DistributeHorizontally]: ROOT_DISTRIBUTE_HORIZONTALLY,
|
|
201
|
+
[Alignment.Top]: ROOT_ALIGN_TOP,
|
|
202
|
+
[Alignment.Vertically]: ROOT_ALIGN_VERTICALLY,
|
|
203
|
+
[Alignment.Bottom]: ROOT_ALIGN_BOTTOM,
|
|
204
|
+
[Alignment.DistributeVertically]: ROOT_DISTRIBUTE_VERTICALLY,
|
|
205
|
+
[Alignment.AutoArrange]: ROOT_AUTO_ARRANGE,
|
|
206
|
+
[Alignment.AutoResize]: ROOT_RESIZE_AND_ALIGN,
|
|
207
|
+
};
|
|
208
|
+
function translatedItems(std, items) {
|
|
209
|
+
return items.map(item => {
|
|
210
|
+
const wording = ALIGNMENT_KEY_WORDING[item.value];
|
|
211
|
+
return wording ? { ...item, key: translateKey(std, ...wording) } : item;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
193
214
|
export function renderAlignmentMenu(ctx, models, { label, tooltip, icon }, onPick = (type) => alignment[type](ctx, models)) {
|
|
215
|
+
const { std } = ctx;
|
|
194
216
|
return html `
|
|
195
217
|
<editor-menu-button
|
|
196
|
-
aria-label="
|
|
218
|
+
aria-label="${translateKey(std, ...ROOT_ALIGNMENT_MENU_ARIA)}"
|
|
197
219
|
.contentPadding="${'8px'}"
|
|
198
220
|
.button=${html `
|
|
199
221
|
<editor-icon-button
|
|
@@ -206,12 +228,12 @@ export function renderAlignmentMenu(ctx, models, { label, tooltip, icon }, onPic
|
|
|
206
228
|
>
|
|
207
229
|
<div data-orientation="vertical">
|
|
208
230
|
<div style=${styleMap({ display: 'grid', gridGap: '8px', gridTemplateColumns: 'repeat(4, 1fr)' })}>
|
|
209
|
-
${renderMenuItems(HORIZONTAL_ALIGNMENT, Alignment.None, onPick)}
|
|
210
|
-
${renderMenuItems(VERTICAL_ALIGNMENT, Alignment.None, onPick)}
|
|
231
|
+
${renderMenuItems(translatedItems(std, HORIZONTAL_ALIGNMENT), Alignment.None, onPick)}
|
|
232
|
+
${renderMenuItems(translatedItems(std, VERTICAL_ALIGNMENT), Alignment.None, onPick)}
|
|
211
233
|
</div>
|
|
212
234
|
<editor-toolbar-separator data-orientation="horizontal"></editor-toolbar-separator>
|
|
213
235
|
<div style=${styleMap({ display: 'grid', gridGap: '8px', gridTemplateColumns: 'repeat(4, 1fr)' })}>
|
|
214
|
-
${renderMenuItems(AUTO_ALIGNMENT, Alignment.None, onPick)}
|
|
236
|
+
${renderMenuItems(translatedItems(std, AUTO_ALIGNMENT), Alignment.None, onPick)}
|
|
215
237
|
</div>
|
|
216
238
|
</editor-menu-button>
|
|
217
239
|
`;
|
|
@@ -4,6 +4,7 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
4
4
|
readonly placement: ActionPlacement.Start;
|
|
5
5
|
readonly id: "a.release-from-group";
|
|
6
6
|
readonly tooltip: "Release from group";
|
|
7
|
+
readonly tooltipWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
7
8
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
8
9
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
9
10
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -11,8 +12,10 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
11
12
|
readonly placement: ActionPlacement.Start;
|
|
12
13
|
readonly id: "b.add-frame";
|
|
13
14
|
readonly label: "Frame";
|
|
15
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
14
16
|
readonly showLabel: true;
|
|
15
17
|
readonly tooltip: "Frame";
|
|
18
|
+
readonly tooltipWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
16
19
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
17
20
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
18
21
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -20,8 +23,10 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
20
23
|
readonly placement: ActionPlacement.Start;
|
|
21
24
|
readonly id: "c.add-group";
|
|
22
25
|
readonly label: "Group";
|
|
26
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
23
27
|
readonly showLabel: true;
|
|
24
28
|
readonly tooltip: "Group";
|
|
29
|
+
readonly tooltipWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
25
30
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
26
31
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
27
32
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -50,11 +55,13 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
50
55
|
actions: [{
|
|
51
56
|
readonly id: "a.create-frame";
|
|
52
57
|
readonly label: "Frame section";
|
|
58
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
53
59
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
54
60
|
readonly run: (ctx: ToolbarContext) => void;
|
|
55
61
|
}, {
|
|
56
62
|
readonly id: "b.create-group";
|
|
57
63
|
readonly label: "Group section";
|
|
64
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
58
65
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
59
66
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
60
67
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -70,11 +77,13 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
70
77
|
}, {
|
|
71
78
|
readonly id: "b.bring-forward";
|
|
72
79
|
readonly label: "Bring Forward";
|
|
80
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
73
81
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
74
82
|
readonly run: (ctx: ToolbarContext) => void;
|
|
75
83
|
}, {
|
|
76
84
|
readonly id: "c.send-backward";
|
|
77
85
|
readonly label: "Send Backward";
|
|
86
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
78
87
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
79
88
|
readonly run: (ctx: ToolbarContext) => void;
|
|
80
89
|
}, {
|
|
@@ -99,6 +108,7 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
99
108
|
}, {
|
|
100
109
|
readonly id: "reload";
|
|
101
110
|
readonly label: "Reload";
|
|
111
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
102
112
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
103
113
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
104
114
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -109,6 +119,7 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
109
119
|
actions: [{
|
|
110
120
|
readonly id: "a.turn-into-linked-doc";
|
|
111
121
|
readonly label: "Turn into linked doc";
|
|
122
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
112
123
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
113
124
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
114
125
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -127,12 +138,14 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
127
138
|
}, {
|
|
128
139
|
readonly id: "c.edit-element-link";
|
|
129
140
|
readonly label: "Edit link";
|
|
141
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
130
142
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
131
143
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
132
144
|
readonly run: (ctx: ToolbarContext) => void;
|
|
133
145
|
}, {
|
|
134
146
|
readonly id: "c.remove-element-link";
|
|
135
147
|
readonly label: "Remove link";
|
|
148
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
136
149
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
137
150
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
138
151
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -152,6 +165,7 @@ export declare const builtinLockedToolbarConfig: {
|
|
|
152
165
|
readonly placement: ActionPlacement.End;
|
|
153
166
|
readonly id: "b.unlock";
|
|
154
167
|
readonly label: "Click to unlock";
|
|
168
|
+
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
155
169
|
readonly showLabel: true;
|
|
156
170
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
157
171
|
readonly run: (ctx: ToolbarContext) => void;
|