@formicoidea/labre-core 0.39.3 → 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/emoji-margin.js +19 -11
- 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.d.ts +16 -0
- package/dist/_pkgs/affine-block-note/configs/tooltips.js +150 -90
- 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/styles.js +30 -83
- 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/turbo/paragraph-layout-handler.js +1 -0
- package/dist/_pkgs/affine-block-paragraph/turbo/paragraph-painter.worker.d.ts +2 -0
- package/dist/_pkgs/affine-block-paragraph/turbo/paragraph-painter.worker.js +6 -1
- 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/framework-background/def.d.ts +4 -1
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +6 -2
- 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 +101 -56
- 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/markdown.d.ts +3 -0
- package/dist/_pkgs/affine-inline-preset/markdown.js +19 -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/consts/heading.d.ts +29 -0
- package/dist/_pkgs/affine-shared/consts/heading.js +70 -0
- package/dist/_pkgs/affine-shared/consts/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/consts/index.js +2 -0
- package/dist/_pkgs/affine-shared/consts/notation.d.ts +67 -0
- package/dist/_pkgs/affine-shared/consts/notation.js +65 -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
|
@@ -3,7 +3,7 @@ import { EditorChevronDown } from '../../../affine-components/toolbar/index.js';
|
|
|
3
3
|
import { DEFAULT_NOTE_HEIGHT, DEFAULT_NOTE_WIDTH, EmbedSyncedDocModel, NoteBlockModel, NoteDisplayMode, } from '../../../affine-model/index.js';
|
|
4
4
|
import { draftSelectedModelsCommand, duplicateSelectedModelsCommand, } from '../../../affine-shared/commands/index.js';
|
|
5
5
|
import { REFERENCE_NODE } from '../../../affine-shared/consts/index.js';
|
|
6
|
-
import { ActionPlacement, blockCommentToolbarButton, EditorSettingProvider, TOAST_COPIED_TO_CLIPBOARD, TOOLBAR_CARD_VIEW, TOOLBAR_COPY, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, ToolbarModuleExtension, translateKey, } from '../../../affine-shared/services/index.js';
|
|
6
|
+
import { ActionPlacement, blockCommentToolbarButton, EditorSettingProvider, TOAST_COPIED_TO_CLIPBOARD, TOOLBAR_CAPTION, TOOLBAR_CARD_VIEW, TOOLBAR_COPY, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, TOOLBAR_OPEN_THIS_DOC, toolbarActionLabel, ToolbarModuleExtension, translateKey, } from '../../../affine-shared/services/index.js';
|
|
7
7
|
import { getBlockProps, matchModels } from '../../../affine-shared/utils/index.js';
|
|
8
8
|
import { Bound } from '../../../global/gfx/index.js';
|
|
9
9
|
import { CaptionIcon, CopyIcon, DeleteIcon, DuplicateIcon, ExpandFullIcon, InsertIntoPageIcon, OpenInNewIcon, } from '@blocksuite/icons/lit';
|
|
@@ -15,6 +15,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
15
15
|
import { keyed } from 'lit/directives/keyed.js';
|
|
16
16
|
import { repeat } from 'lit/directives/repeat.js';
|
|
17
17
|
import { EmbedSyncedDocBlockComponent } from '../embed-synced-doc-block.js';
|
|
18
|
+
import { EMBED_DOC_DUPLICATE_AS_NOTE, EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP, EMBED_DOC_INSERT_TO_PAGE, EMBED_DOC_OPEN_DOC, } from '../../translations.js';
|
|
18
19
|
const trackBaseProps = {
|
|
19
20
|
category: 'linked doc',
|
|
20
21
|
type: 'embed view',
|
|
@@ -31,6 +32,7 @@ const openDocActions = [
|
|
|
31
32
|
mode: 'open-in-active-view',
|
|
32
33
|
id: 'a.open-in-active-view',
|
|
33
34
|
label: 'Open this doc',
|
|
35
|
+
labelWording: TOOLBAR_OPEN_THIS_DOC,
|
|
34
36
|
icon: ExpandFullIcon(),
|
|
35
37
|
},
|
|
36
38
|
];
|
|
@@ -53,25 +55,33 @@ const openDocActionGroup = {
|
|
|
53
55
|
run: (_ctx) => block.open({ openMode }),
|
|
54
56
|
};
|
|
55
57
|
});
|
|
58
|
+
const openDocLabel = translateKey(ctx.std, ...EMBED_DOC_OPEN_DOC);
|
|
56
59
|
return html `
|
|
57
60
|
<editor-menu-button
|
|
58
61
|
.contentPadding="${'8px'}"
|
|
59
62
|
.button=${html `
|
|
60
|
-
<editor-icon-button
|
|
63
|
+
<editor-icon-button
|
|
64
|
+
aria-label=${openDocLabel}
|
|
65
|
+
.tooltip=${openDocLabel}
|
|
66
|
+
>
|
|
61
67
|
${OpenInNewIcon()} ${EditorChevronDown}
|
|
62
68
|
</editor-icon-button>
|
|
63
69
|
`}
|
|
64
70
|
>
|
|
65
71
|
<div data-size="small" data-orientation="vertical">
|
|
66
|
-
${repeat(actions, action => action.id,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
${repeat(actions, action => action.id, action => {
|
|
73
|
+
const label = toolbarActionLabel(ctx.std, action);
|
|
74
|
+
const { icon, run, disabled } = action;
|
|
75
|
+
return html `
|
|
76
|
+
<editor-menu-action
|
|
77
|
+
aria-label=${ifDefined(label)}
|
|
78
|
+
?disabled=${ifDefined(typeof disabled === 'function' ? disabled(ctx) : disabled)}
|
|
79
|
+
@click=${() => run?.(ctx)}
|
|
80
|
+
>
|
|
81
|
+
${icon}<span class="label">${label}</span>
|
|
82
|
+
</editor-menu-action>
|
|
83
|
+
`;
|
|
84
|
+
})}
|
|
75
85
|
</div>
|
|
76
86
|
</editor-menu-button>
|
|
77
87
|
`;
|
|
@@ -138,6 +148,7 @@ const conversionsActionGroup = {
|
|
|
138
148
|
const captionAction = {
|
|
139
149
|
id: 'd.caption',
|
|
140
150
|
tooltip: 'Caption',
|
|
151
|
+
tooltipWording: TOOLBAR_CAPTION,
|
|
141
152
|
icon: CaptionIcon(),
|
|
142
153
|
run(ctx) {
|
|
143
154
|
const block = ctx.getCurrentBlockByType(EmbedSyncedDocBlockComponent);
|
|
@@ -216,8 +227,10 @@ const builtinSurfaceToolbarConfig = {
|
|
|
216
227
|
conversionsActionGroup,
|
|
217
228
|
{
|
|
218
229
|
id: 'b.insert-to-page',
|
|
219
|
-
label: 'Insert to
|
|
220
|
-
|
|
230
|
+
label: 'Insert to document',
|
|
231
|
+
labelWording: EMBED_DOC_INSERT_TO_PAGE,
|
|
232
|
+
tooltip: 'Insert to document',
|
|
233
|
+
tooltipWording: EMBED_DOC_INSERT_TO_PAGE,
|
|
221
234
|
icon: InsertIntoPageIcon(),
|
|
222
235
|
run: ctx => {
|
|
223
236
|
const model = ctx.getCurrentModelByType(EmbedSyncedDocModel);
|
|
@@ -247,7 +260,9 @@ const builtinSurfaceToolbarConfig = {
|
|
|
247
260
|
{
|
|
248
261
|
id: 'c.duplicate-as-note',
|
|
249
262
|
label: 'Duplicate as note',
|
|
263
|
+
labelWording: EMBED_DOC_DUPLICATE_AS_NOTE,
|
|
250
264
|
tooltip: 'Duplicate as note to create an editable copy, the original remains unchanged.',
|
|
265
|
+
tooltipWording: EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP,
|
|
251
266
|
icon: DuplicateIcon(),
|
|
252
267
|
run: ctx => {
|
|
253
268
|
const { gfx } = ctx;
|
package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-edgeless-synced-doc-block.js
CHANGED
|
@@ -36,7 +36,7 @@ import { toEdgelessEmbedBlock } from '../../affine-block-embed/index.js';
|
|
|
36
36
|
import { EdgelessCRUDIdentifier, reassociateConnectorsCommand, } from '../../affine-block-surface/index.js';
|
|
37
37
|
import {} from '../../affine-model/index.js';
|
|
38
38
|
import { EMBED_CARD_HEIGHT, EMBED_CARD_WIDTH, } from '../../affine-shared/consts/index.js';
|
|
39
|
-
import { ThemeExtensionIdentifier, ThemeProvider, } from '../../affine-shared/services/index.js';
|
|
39
|
+
import { ThemeExtensionIdentifier, ThemeProvider, translateKey, } from '../../affine-shared/services/index.js';
|
|
40
40
|
import { Bound } from '../../global/gfx/index.js';
|
|
41
41
|
import { BlockStdScope } from '../../std/index.js';
|
|
42
42
|
import { html, nothing } from 'lit';
|
|
@@ -47,6 +47,7 @@ import { guard } from 'lit/directives/guard.js';
|
|
|
47
47
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
48
48
|
import { EmbedSyncedDocConfigExtension } from './configs/index.js';
|
|
49
49
|
import { EmbedSyncedDocBlockComponent } from './embed-synced-doc-block.js';
|
|
50
|
+
import { EMBED_DOC_CARD_EMPTY_CONTENT } from '../translations.js';
|
|
50
51
|
let EmbedEdgelessSyncedDocBlockComponent = (() => {
|
|
51
52
|
let _classSuper = toEdgelessEmbedBlock(EmbedSyncedDocBlockComponent);
|
|
52
53
|
let _headerWrapper_decorators;
|
|
@@ -144,7 +145,7 @@ let EmbedEdgelessSyncedDocBlockComponent = (() => {
|
|
|
144
145
|
? html `
|
|
145
146
|
<div class="affine-embed-synced-doc-editor-empty">
|
|
146
147
|
<span>
|
|
147
|
-
|
|
148
|
+
${translateKey(this.std, ...EMBED_DOC_CARD_EMPTY_CONTENT)}
|
|
148
149
|
</span>
|
|
149
150
|
</div>
|
|
150
151
|
`
|
|
@@ -38,7 +38,7 @@ import { ViewExtensionManagerIdentifier } from '../../affine-ext-loader/index.js
|
|
|
38
38
|
import { RefNodeSlotsProvider, } from '../../affine-inline-reference/index.js';
|
|
39
39
|
import { NoteDisplayMode, } from '../../affine-model/index.js';
|
|
40
40
|
import { REFERENCE_NODE } from '../../affine-shared/consts/index.js';
|
|
41
|
-
import { DocDisplayMetaProvider, DocModeProvider, EditorSettingExtension, EditorSettingProvider, GeneralSettingSchema, ThemeExtensionIdentifier, ThemeProvider, } from '../../affine-shared/services/index.js';
|
|
41
|
+
import { DocDisplayMetaProvider, DocModeProvider, EditorSettingExtension, EditorSettingProvider, GeneralSettingSchema, ThemeExtensionIdentifier, ThemeProvider, translateKey, } from '../../affine-shared/services/index.js';
|
|
42
42
|
import { cloneReferenceInfo } from '../../affine-shared/utils/index.js';
|
|
43
43
|
import { Bound, getCommonBound } from '../../global/gfx/index.js';
|
|
44
44
|
import { BlockSelection, BlockStdScope, LifeCycleWatcher, } from '../../std/index.js';
|
|
@@ -53,6 +53,7 @@ import { guard } from 'lit/directives/guard.js';
|
|
|
53
53
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
54
54
|
import * as Y from 'yjs';
|
|
55
55
|
import { isDocTrashed } from '../common/doc-trashed.js';
|
|
56
|
+
import { EMBED_DOC_CARD_EMPTY_CONTENT } from '../translations.js';
|
|
56
57
|
import { blockStyles } from './styles.js';
|
|
57
58
|
let EmbedSyncedDocBlockComponent = (() => {
|
|
58
59
|
let _classDecorators = [Peekable({
|
|
@@ -259,7 +260,7 @@ let EmbedSyncedDocBlockComponent = (() => {
|
|
|
259
260
|
? html `
|
|
260
261
|
<div class="affine-embed-synced-doc-editor-empty">
|
|
261
262
|
<span>
|
|
262
|
-
|
|
263
|
+
${translateKey(this.std, ...EMBED_DOC_CARD_EMPTY_CONTENT)}
|
|
263
264
|
</span>
|
|
264
265
|
</div>
|
|
265
266
|
`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ChromeWording } from '../affine-shared/services/index.js';
|
|
2
|
+
export declare const EMBED_DOC_SLASH_NEW_DOC_NAME: ChromeWording;
|
|
3
|
+
export declare const EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION: ChromeWording;
|
|
4
|
+
export declare const EMBED_DOC_SLASH_LINKED_DOC_NAME: ChromeWording;
|
|
5
|
+
/** The tooltip's own word — distinct from the item's name above. */
|
|
6
|
+
export declare const EMBED_DOC_SLASH_LINKED_DOC_CAPTION: ChromeWording;
|
|
7
|
+
export declare const EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION: ChromeWording;
|
|
8
|
+
/**
|
|
9
|
+
* The "Open doc" dropdown button — its own `aria-label`/`tooltip` AND the
|
|
10
|
+
* dropdown's single entry label, in both `embed-linked-doc-block/configs/toolbar.ts`
|
|
11
|
+
* and `embed-synced-doc-block/configs/toolbar.ts`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const EMBED_DOC_OPEN_DOC: ChromeWording;
|
|
14
|
+
/** The card's "last updated" date label (`components/embed-synced-doc-card.ts`, `embed-linked-doc-block.ts`). */
|
|
15
|
+
export declare const EMBED_DOC_UPDATED_LABEL: ChromeWording;
|
|
16
|
+
export declare const EMBED_DOC_INSERT_TO_PAGE: ChromeWording;
|
|
17
|
+
export declare const EMBED_DOC_DUPLICATE_AS_NOTE: ChromeWording;
|
|
18
|
+
export declare const EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP: ChromeWording;
|
|
19
|
+
/**
|
|
20
|
+
* The nested-editor empty state — the exact same sentence in both the page
|
|
21
|
+
* and the edgeless synced-doc view (`embed-synced-doc-block.ts`,
|
|
22
|
+
* `embed-edgeless-synced-doc-block.ts`).
|
|
23
|
+
*/
|
|
24
|
+
export declare const EMBED_DOC_CARD_EMPTY_CONTENT: ChromeWording;
|
|
25
|
+
/**
|
|
26
|
+
* This package's contribution to the translation-key manifest, listed in
|
|
27
|
+
* `PACKAGE_WORDINGS` under source `chrome`
|
|
28
|
+
* (`packages/affine/all/src/translations.ts`). The shared verbs it reuses
|
|
29
|
+
* (Caption, Reload, Loading…, Untitled, the card-style switcher's four
|
|
30
|
+
* wordings, Open this doc…) travel with `@labre/affine-shared/services`
|
|
31
|
+
* instead, so they are not restated here.
|
|
32
|
+
*
|
|
33
|
+
* The three export adapters' own "untitled" fallback
|
|
34
|
+
* (`adapters/html.ts`/`markdown.ts`/`plain-text.ts`) is deliberately left
|
|
35
|
+
* untouched: per the L2b lot's changeset, the paste/import pipeline's
|
|
36
|
+
* `Transformer` carries an optional `provider` that is never wired to the
|
|
37
|
+
* editor's `TranslationProvider` by any existing caller, so resolving a key
|
|
38
|
+
* there would be dead code, not a real translation path.
|
|
39
|
+
*/
|
|
40
|
+
export declare const EMBED_DOC_WORDINGS: readonly ChromeWording[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { NEW_DOC_LABEL, } from '../affine-shared/services/index.js';
|
|
2
|
+
/* ── The linked-doc embed's own slash-menu items ─────────────────────────
|
|
3
|
+
* (`embed-linked-doc-block/configs/slash-menu.ts`)
|
|
4
|
+
*/
|
|
5
|
+
export const EMBED_DOC_SLASH_NEW_DOC_NAME = NEW_DOC_LABEL;
|
|
6
|
+
export const EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION = [
|
|
7
|
+
'com.labre.embed-doc.slash.new-doc.description',
|
|
8
|
+
'Start a new document.',
|
|
9
|
+
];
|
|
10
|
+
export const EMBED_DOC_SLASH_LINKED_DOC_NAME = [
|
|
11
|
+
'com.labre.embed-doc.slash.linked-doc.name',
|
|
12
|
+
'Linked Doc',
|
|
13
|
+
];
|
|
14
|
+
/** The tooltip's own word — distinct from the item's name above. */
|
|
15
|
+
export const EMBED_DOC_SLASH_LINKED_DOC_CAPTION = [
|
|
16
|
+
'com.labre.embed-doc.slash.linked-doc.caption',
|
|
17
|
+
'Link Doc',
|
|
18
|
+
];
|
|
19
|
+
export const EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION = [
|
|
20
|
+
'com.labre.embed-doc.slash.linked-doc.description',
|
|
21
|
+
'Link to another document.',
|
|
22
|
+
];
|
|
23
|
+
/* ── Toolbar chrome shared by the linked-doc and synced-doc toolbars ───── */
|
|
24
|
+
/**
|
|
25
|
+
* The "Open doc" dropdown button — its own `aria-label`/`tooltip` AND the
|
|
26
|
+
* dropdown's single entry label, in both `embed-linked-doc-block/configs/toolbar.ts`
|
|
27
|
+
* and `embed-synced-doc-block/configs/toolbar.ts`.
|
|
28
|
+
*/
|
|
29
|
+
export const EMBED_DOC_OPEN_DOC = [
|
|
30
|
+
'com.labre.embed-doc.toolbar.open-doc',
|
|
31
|
+
'Open doc',
|
|
32
|
+
];
|
|
33
|
+
/** The card's "last updated" date label (`components/embed-synced-doc-card.ts`, `embed-linked-doc-block.ts`). */
|
|
34
|
+
export const EMBED_DOC_UPDATED_LABEL = [
|
|
35
|
+
'com.labre.embed-doc.card.updated',
|
|
36
|
+
'Updated',
|
|
37
|
+
];
|
|
38
|
+
export const EMBED_DOC_INSERT_TO_PAGE = [
|
|
39
|
+
'com.labre.embed-doc.toolbar.insert-to-page',
|
|
40
|
+
'Insert to document',
|
|
41
|
+
];
|
|
42
|
+
export const EMBED_DOC_DUPLICATE_AS_NOTE = [
|
|
43
|
+
'com.labre.embed-doc.toolbar.duplicate-as-note',
|
|
44
|
+
'Duplicate as note',
|
|
45
|
+
];
|
|
46
|
+
export const EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP = [
|
|
47
|
+
'com.labre.embed-doc.toolbar.duplicate-as-note.tooltip',
|
|
48
|
+
'Duplicate as note to create an editable copy, the original remains unchanged.',
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* The nested-editor empty state — the exact same sentence in both the page
|
|
52
|
+
* and the edgeless synced-doc view (`embed-synced-doc-block.ts`,
|
|
53
|
+
* `embed-edgeless-synced-doc-block.ts`).
|
|
54
|
+
*/
|
|
55
|
+
export const EMBED_DOC_CARD_EMPTY_CONTENT = [
|
|
56
|
+
'com.labre.embed-doc.card.empty-content',
|
|
57
|
+
'This is a linked doc, you can add content here.',
|
|
58
|
+
];
|
|
59
|
+
/**
|
|
60
|
+
* This package's contribution to the translation-key manifest, listed in
|
|
61
|
+
* `PACKAGE_WORDINGS` under source `chrome`
|
|
62
|
+
* (`packages/affine/all/src/translations.ts`). The shared verbs it reuses
|
|
63
|
+
* (Caption, Reload, Loading…, Untitled, the card-style switcher's four
|
|
64
|
+
* wordings, Open this doc…) travel with `@labre/affine-shared/services`
|
|
65
|
+
* instead, so they are not restated here.
|
|
66
|
+
*
|
|
67
|
+
* The three export adapters' own "untitled" fallback
|
|
68
|
+
* (`adapters/html.ts`/`markdown.ts`/`plain-text.ts`) is deliberately left
|
|
69
|
+
* untouched: per the L2b lot's changeset, the paste/import pipeline's
|
|
70
|
+
* `Transformer` carries an optional `provider` that is never wired to the
|
|
71
|
+
* editor's `TranslationProvider` by any existing caller, so resolving a key
|
|
72
|
+
* there would be dead code, not a real translation path.
|
|
73
|
+
*/
|
|
74
|
+
export const EMBED_DOC_WORDINGS = [
|
|
75
|
+
EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION,
|
|
76
|
+
EMBED_DOC_SLASH_LINKED_DOC_NAME,
|
|
77
|
+
EMBED_DOC_SLASH_LINKED_DOC_CAPTION,
|
|
78
|
+
EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION,
|
|
79
|
+
EMBED_DOC_OPEN_DOC,
|
|
80
|
+
EMBED_DOC_UPDATED_LABEL,
|
|
81
|
+
EMBED_DOC_INSERT_TO_PAGE,
|
|
82
|
+
EMBED_DOC_DUPLICATE_AS_NOTE,
|
|
83
|
+
EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP,
|
|
84
|
+
EMBED_DOC_CARD_EMPTY_CONTENT,
|
|
85
|
+
];
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import { DefaultTool } from '../../affine-block-surface/index.js';
|
|
2
2
|
import { menu } from '../../affine-components/context-menu/index.js';
|
|
3
|
+
import { TOOLBAR_FRAME, translateKey } from '../../affine-shared/services/index.js';
|
|
3
4
|
import { FrameIcon } from '@blocksuite/icons/lit';
|
|
4
5
|
import { EdgelessFrameManagerIdentifier } from '../frame-manager.js';
|
|
5
6
|
import { FrameTool } from '../frame-tool.js';
|
|
7
|
+
import { FRAME_DENSE_MENU_CUSTOM, FRAME_DENSE_MENU_SLIDE, } from '../translations.js';
|
|
6
8
|
import { FrameConfig } from './config.js';
|
|
7
|
-
export const buildFrameDenseMenu = (edgeless, gfx) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
9
|
+
export const buildFrameDenseMenu = (edgeless, gfx) => {
|
|
10
|
+
const { std } = edgeless;
|
|
11
|
+
return menu.subMenu({
|
|
12
|
+
name: translateKey(std, ...TOOLBAR_FRAME),
|
|
13
|
+
prefix: FrameIcon({ width: '20px', height: '20px' }),
|
|
14
|
+
select: () => gfx.tool.setTool(FrameTool),
|
|
15
|
+
isSelected: gfx.tool.currentToolName$.peek() === 'frame',
|
|
16
|
+
options: {
|
|
17
|
+
items: [
|
|
18
|
+
menu.action({
|
|
19
|
+
name: translateKey(std, ...FRAME_DENSE_MENU_CUSTOM),
|
|
20
|
+
select: () => gfx.tool.setTool(FrameTool),
|
|
21
|
+
}),
|
|
22
|
+
...FrameConfig.map(config => menu.action({
|
|
23
|
+
name: translateKey(std, ...FRAME_DENSE_MENU_SLIDE, {
|
|
24
|
+
name: config.name,
|
|
25
|
+
}),
|
|
26
|
+
select: () => {
|
|
27
|
+
const frame = edgeless.std.get(EdgelessFrameManagerIdentifier);
|
|
28
|
+
gfx.tool.setTool(DefaultTool);
|
|
29
|
+
frame.createFrameOnViewportCenter(config.wh);
|
|
30
|
+
},
|
|
31
|
+
})),
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DefaultTool } from '../../affine-block-surface/index.js';
|
|
2
|
+
import { translateKey } from '../../affine-shared/services/index.js';
|
|
2
3
|
import { EdgelessToolbarToolMixin } from '../../affine-widget-edgeless-toolbar/index.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { repeat } from 'lit/directives/repeat.js';
|
|
5
6
|
import { EdgelessFrameManagerIdentifier } from '../frame-manager.js';
|
|
6
7
|
import { FrameTool } from '../frame-tool.js';
|
|
8
|
+
import { FRAME_DENSE_MENU_CUSTOM } from '../translations.js';
|
|
7
9
|
import { FrameConfig } from './config.js';
|
|
8
10
|
export class EdgelessFrameMenu extends EdgelessToolbarToolMixin(LitElement) {
|
|
9
11
|
constructor() {
|
|
@@ -75,7 +77,9 @@ export class EdgelessFrameMenu extends EdgelessToolbarToolMixin(LitElement) {
|
|
|
75
77
|
return html `
|
|
76
78
|
<edgeless-slide-menu .showNext=${false}>
|
|
77
79
|
<div class="menu-content">
|
|
78
|
-
<div class="frame-add-button custom">
|
|
80
|
+
<div class="frame-add-button custom">
|
|
81
|
+
${translateKey(this.edgeless.std, ...FRAME_DENSE_MENU_CUSTOM)}
|
|
82
|
+
</div>
|
|
79
83
|
<div class="divider"></div>
|
|
80
84
|
${repeat(FrameConfig, item => item.name, (item, index) => html `
|
|
81
85
|
<div
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TOOLBAR_FRAME, translateKey } from '../../affine-shared/services/index.js';
|
|
1
2
|
import { QuickToolMixin } from '../../affine-widget-edgeless-toolbar/index.js';
|
|
2
3
|
import { FrameIcon } from '@blocksuite/icons/lit';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
@@ -26,7 +27,7 @@ export class EdgelessFrameToolButton extends QuickToolMixin(LitElement) {
|
|
|
26
27
|
.tooltip=${this.popper
|
|
27
28
|
? ''
|
|
28
29
|
: html `<affine-tooltip-content-with-shortcut
|
|
29
|
-
data-tip="${
|
|
30
|
+
data-tip="${translateKey(this.edgeless.std, ...TOOLBAR_FRAME)}"
|
|
30
31
|
data-shortcut="${'F'}"
|
|
31
32
|
></affine-tooltip-content-with-shortcut>`}
|
|
32
33
|
.tooltipOffset=${17}
|
|
@@ -35,7 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
35
35
|
import { DefaultTool, EdgelessLegacySlotIdentifier, } from '../../affine-block-surface/index.js';
|
|
36
36
|
import { toast } from '../../affine-components/toast/index.js';
|
|
37
37
|
import { PanTool } from '../../affine-gfx-pointer/index.js';
|
|
38
|
-
import { EditPropsStore, ViewportElementProvider, } from '../../affine-shared/services/index.js';
|
|
38
|
+
import { EditPropsStore, translateKey, ViewportElementProvider, } from '../../affine-shared/services/index.js';
|
|
39
39
|
import { EdgelessToolbarToolMixin } from '../../affine-widget-edgeless-toolbar/index.js';
|
|
40
40
|
import { Bound, clamp } from '../../global/gfx/index.js';
|
|
41
41
|
import { SignalWatcher } from '../../global/lit/index.js';
|
|
@@ -46,6 +46,7 @@ import { css, html, LitElement, nothing } from 'lit';
|
|
|
46
46
|
import { property, state } from 'lit/decorators.js';
|
|
47
47
|
import { EdgelessFrameManagerIdentifier, isFrameBlock, } from '../frame-manager.js';
|
|
48
48
|
import { PresentTool } from '../present-tool.js';
|
|
49
|
+
import { FRAME_PRESENT_ENTER_FULLSCREEN, FRAME_PRESENT_EXIT_FULLSCREEN, FRAME_PRESENT_NEXT, FRAME_PRESENT_NO_FRAME_TITLE, FRAME_PRESENT_PREVIOUS, FRAME_PRESENT_REACHED_FIRST, FRAME_PRESENT_REACHED_LAST, FRAME_PRESENT_REQUIRES_ONE_FRAME, } from '../translations.js';
|
|
49
50
|
let PresentationToolbar = (() => {
|
|
50
51
|
let _classSuper = EdgelessToolbarToolMixin(SignalWatcher(LitElement));
|
|
51
52
|
let __currentFrameIndex_decorators;
|
|
@@ -283,7 +284,7 @@ let PresentationToolbar = (() => {
|
|
|
283
284
|
const min = 0;
|
|
284
285
|
const max = frames.length - 1;
|
|
285
286
|
if (this._currentFrameIndex === frames.length - 1) {
|
|
286
|
-
toast(this.host,
|
|
287
|
+
toast(this.host, translateKey(this.edgeless.std, ...FRAME_PRESENT_REACHED_LAST));
|
|
287
288
|
}
|
|
288
289
|
else {
|
|
289
290
|
this._currentFrameIndex = clamp(this._currentFrameIndex + 1, min, max);
|
|
@@ -294,7 +295,7 @@ let PresentationToolbar = (() => {
|
|
|
294
295
|
const min = 0;
|
|
295
296
|
const max = frames.length - 1;
|
|
296
297
|
if (this._currentFrameIndex === 0) {
|
|
297
|
-
toast(this.host,
|
|
298
|
+
toast(this.host, translateKey(this.edgeless.std, ...FRAME_PRESENT_REACHED_FIRST));
|
|
298
299
|
}
|
|
299
300
|
else {
|
|
300
301
|
this._currentFrameIndex = clamp(this._currentFrameIndex - 1, min, max);
|
|
@@ -344,7 +345,7 @@ let PresentationToolbar = (() => {
|
|
|
344
345
|
const store = this.edgeless.std.get(EditPropsStore);
|
|
345
346
|
if (this._frames.length === 0) {
|
|
346
347
|
if (!store.getStorage('presentNoFrameToastShown')) {
|
|
347
|
-
toast(this.host,
|
|
348
|
+
toast(this.host, translateKey(this.edgeless.std, ...FRAME_PRESENT_REQUIRES_ONE_FRAME), 5000);
|
|
348
349
|
store.setStorage('presentNoFrameToastShown', true);
|
|
349
350
|
}
|
|
350
351
|
}
|
|
@@ -398,6 +399,7 @@ let PresentationToolbar = (() => {
|
|
|
398
399
|
const current = this._currentFrameIndex;
|
|
399
400
|
const frames = this._frames;
|
|
400
401
|
const frame = frames[current];
|
|
402
|
+
const { std } = this.edgeless;
|
|
401
403
|
return html `
|
|
402
404
|
<style>
|
|
403
405
|
:host {
|
|
@@ -406,7 +408,7 @@ let PresentationToolbar = (() => {
|
|
|
406
408
|
</style>
|
|
407
409
|
<edgeless-tool-icon-button
|
|
408
410
|
.iconContainerPadding=${0}
|
|
409
|
-
.tooltip=${
|
|
411
|
+
.tooltip=${translateKey(std, ...FRAME_PRESENT_PREVIOUS)}
|
|
410
412
|
.iconSize=${'24px'}
|
|
411
413
|
@click=${() => this._previousFrame()}
|
|
412
414
|
>
|
|
@@ -421,7 +423,8 @@ let PresentationToolbar = (() => {
|
|
|
421
423
|
class="edgeless-frame-navigator-title"
|
|
422
424
|
@click=${() => this._moveToCurrentFrame()}
|
|
423
425
|
>
|
|
424
|
-
${frame?.props.title ??
|
|
426
|
+
${frame?.props.title ??
|
|
427
|
+
translateKey(std, ...FRAME_PRESENT_NO_FRAME_TITLE)}
|
|
425
428
|
</span>`}
|
|
426
429
|
|
|
427
430
|
<span class="edgeless-frame-navigator-count">
|
|
@@ -430,7 +433,7 @@ let PresentationToolbar = (() => {
|
|
|
430
433
|
</div>
|
|
431
434
|
|
|
432
435
|
<edgeless-tool-icon-button
|
|
433
|
-
.tooltip=${
|
|
436
|
+
.tooltip=${translateKey(std, ...FRAME_PRESENT_NEXT)}
|
|
434
437
|
@click=${() => this._nextFrame()}
|
|
435
438
|
.iconContainerPadding=${0}
|
|
436
439
|
.iconSize=${'24px'}
|
|
@@ -443,8 +446,8 @@ let PresentationToolbar = (() => {
|
|
|
443
446
|
<div class="config-buttons">
|
|
444
447
|
<edgeless-tool-icon-button
|
|
445
448
|
.tooltip=${document.fullscreenElement
|
|
446
|
-
?
|
|
447
|
-
:
|
|
449
|
+
? translateKey(std, ...FRAME_PRESENT_EXIT_FULLSCREEN)
|
|
450
|
+
: translateKey(std, ...FRAME_PRESENT_ENTER_FULLSCREEN)}
|
|
448
451
|
@click=${() => this._toggleFullScreen()}
|
|
449
452
|
.iconContainerPadding=${0}
|
|
450
453
|
.iconContainerWidth=${'24px'}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { indexOverBackgrounds, Overlay, stackedElementsOf, } from '../affine-block-surface/index.js';
|
|
2
2
|
import { FrameworkBackgroundElementModel } from '../affine-model/index.js';
|
|
3
|
-
import { EditPropsStore } from '../affine-shared/services/index.js';
|
|
3
|
+
import { EditPropsStore, translateKey } from '../affine-shared/services/index.js';
|
|
4
4
|
import { DisposableGroup } from '../global/disposable/index.js';
|
|
5
5
|
import { BlockSuiteError, ErrorCode } from '../global/exceptions/index.js';
|
|
6
6
|
import { Bound, deserializeXYWH, } from '../global/gfx/index.js';
|
|
7
7
|
import { generateKeyBetween, generateKeyBetweenV2, getTopElements, GfxBlockElementModel, GfxExtension, GfxExtensionIdentifier, isGfxGroupCompatibleModel, renderableInEdgeless, } from '../std/gfx/index.js';
|
|
8
8
|
import { Text } from '../store/index.js';
|
|
9
9
|
import * as Y from 'yjs';
|
|
10
|
+
import { FRAME_SEED_NAME } from './translations.js';
|
|
10
11
|
const FRAME_PADDING = 40;
|
|
11
12
|
export class FrameOverlay extends Overlay {
|
|
12
13
|
static { this.overlayName = 'frame'; }
|
|
@@ -144,7 +145,12 @@ export class EdgelessFrameManager extends GfxExtension {
|
|
|
144
145
|
const props = this.gfx.std
|
|
145
146
|
.get(EditPropsStore)
|
|
146
147
|
.applyLastProps('affine:frame', {
|
|
147
|
-
|
|
148
|
+
// Translated HERE and once: the title is document content the moment
|
|
149
|
+
// it lands (ADR 0016), so the host's catalogue is asked at placement
|
|
150
|
+
// and never again — a renamed frame keeps its name.
|
|
151
|
+
title: new Text(new Y.Text(translateKey(this.gfx.std, ...FRAME_SEED_NAME, {
|
|
152
|
+
n: this.frames.length + 1,
|
|
153
|
+
}))),
|
|
148
154
|
xywh: bound.serialize(),
|
|
149
155
|
index: this.frameIndexAt(bound),
|
|
150
156
|
presentationIndex: this.generatePresentationIndex(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DefaultTool, OverlayIdentifier } from '../affine-block-surface/index.js';
|
|
2
|
-
import { EditPropsStore, TelemetryProvider, } from '../affine-shared/services/index.js';
|
|
2
|
+
import { EditPropsStore, TelemetryProvider, translateKey, } from '../affine-shared/services/index.js';
|
|
3
3
|
import { Bound, Vec } from '../global/gfx/index.js';
|
|
4
4
|
import { BaseTool, getTopElements } from '../std/gfx/index.js';
|
|
5
5
|
import { Text } from '../store/index.js';
|
|
6
6
|
import * as Y from 'yjs';
|
|
7
7
|
import { EdgelessFrameManagerIdentifier, } from './frame-manager.js';
|
|
8
|
+
import { FRAME_SEED_NAME } from './translations.js';
|
|
8
9
|
export class FrameTool extends BaseTool {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -48,7 +49,11 @@ export class FrameTool extends BaseTool {
|
|
|
48
49
|
const props = this.std
|
|
49
50
|
.get(EditPropsStore)
|
|
50
51
|
.applyLastProps('affine:frame', {
|
|
51
|
-
|
|
52
|
+
// Translated HERE and once, like `EdgelessFrameManager._addFrameBlock`:
|
|
53
|
+
// the title is document content the moment it lands (ADR 0016).
|
|
54
|
+
title: new Text(new Y.Text(translateKey(this.std, ...FRAME_SEED_NAME, {
|
|
55
|
+
n: frames.length + 1,
|
|
56
|
+
}))),
|
|
52
57
|
xywh: bound.serialize(),
|
|
53
58
|
// Not the raw back of the stack: a frame drawn on a framework
|
|
54
59
|
// background must sit just above it, or the author draws blind
|
|
@@ -2,7 +2,7 @@ import { EdgelessCRUDIdentifier } from '../affine-block-surface/index.js';
|
|
|
2
2
|
import { packColor, } from '../affine-components/color-picker/index.js';
|
|
3
3
|
import { toast } from '../affine-components/toast/index.js';
|
|
4
4
|
import { DEFAULT_NOTE_HEIGHT, DefaultTheme, FrameBlockModel, FrameBlockSchema, NoteBlockModel, NoteBlockSchema, NoteDisplayMode, resolveColor, SurfaceRefBlockSchema, } from '../affine-model/index.js';
|
|
5
|
-
import { NotificationProvider, TOAST_FRAME_INSERTED_INTO_PAGE, ToolbarModuleExtension, translateKey, } from '../affine-shared/services/index.js';
|
|
5
|
+
import { NotificationProvider, TOAST_FRAME_INSERTED_INTO_PAGE, TOOLBAR_RENAME, ToolbarModuleExtension, translateKey, } from '../affine-shared/services/index.js';
|
|
6
6
|
import { getMostCommonResolvedValue, matchModels, } from '../affine-shared/utils/index.js';
|
|
7
7
|
import { mountFrameTitleEditor } from '../affine-widget-frame-title/index.js';
|
|
8
8
|
import { Bound } from '../global/gfx/index.js';
|
|
@@ -11,6 +11,7 @@ import { BlockFlavourIdentifier } from '../std/index.js';
|
|
|
11
11
|
import { GfxControllerIdentifier } from '../std/gfx/index.js';
|
|
12
12
|
import { html } from 'lit';
|
|
13
13
|
import { EdgelessFrameManagerIdentifier } from './frame-manager.js';
|
|
14
|
+
import { FRAME_TOAST_INSERTED_MESSAGE, FRAME_TOOLBAR_BACKGROUND, FRAME_TOOLBAR_INSERT_INTO_PAGE, FRAME_TOOLBAR_UNGROUP, } from './translations.js';
|
|
14
15
|
function getRootBlock(ctx) {
|
|
15
16
|
const rootModel = ctx.store.root;
|
|
16
17
|
if (!rootModel)
|
|
@@ -21,8 +22,10 @@ const builtinSurfaceToolbarConfig = {
|
|
|
21
22
|
actions: [
|
|
22
23
|
{
|
|
23
24
|
id: 'a.insert-into-page',
|
|
24
|
-
label: 'Insert into
|
|
25
|
-
|
|
25
|
+
label: 'Insert into Document',
|
|
26
|
+
labelWording: FRAME_TOOLBAR_INSERT_INTO_PAGE,
|
|
27
|
+
tooltip: 'Insert into Document',
|
|
28
|
+
tooltipWording: FRAME_TOOLBAR_INSERT_INTO_PAGE,
|
|
26
29
|
icon: InsertIntoPageIcon(),
|
|
27
30
|
when: ctx => ctx.getSurfaceModelsByType(FrameBlockModel).length === 1,
|
|
28
31
|
run(ctx) {
|
|
@@ -47,18 +50,19 @@ const builtinSurfaceToolbarConfig = {
|
|
|
47
50
|
if (notification) {
|
|
48
51
|
notification.notifyWithUndoAction({
|
|
49
52
|
title: translateKey(ctx.std, ...TOAST_FRAME_INSERTED_INTO_PAGE),
|
|
50
|
-
message:
|
|
53
|
+
message: translateKey(ctx.std, ...FRAME_TOAST_INSERTED_MESSAGE),
|
|
51
54
|
accent: 'success',
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
else {
|
|
55
|
-
toast(ctx.host,
|
|
58
|
+
toast(ctx.host, translateKey(ctx.std, ...FRAME_TOAST_INSERTED_MESSAGE));
|
|
56
59
|
}
|
|
57
60
|
},
|
|
58
61
|
},
|
|
59
62
|
{
|
|
60
63
|
id: 'b.rename',
|
|
61
64
|
tooltip: 'Rename',
|
|
65
|
+
tooltipWording: TOOLBAR_RENAME,
|
|
62
66
|
icon: EditIcon(),
|
|
63
67
|
when: ctx => ctx.getSurfaceModelsByType(FrameBlockModel).length === 1,
|
|
64
68
|
run(ctx) {
|
|
@@ -74,6 +78,7 @@ const builtinSurfaceToolbarConfig = {
|
|
|
74
78
|
{
|
|
75
79
|
id: 'b.ungroup',
|
|
76
80
|
tooltip: 'Ungroup',
|
|
81
|
+
tooltipWording: FRAME_TOOLBAR_UNGROUP,
|
|
77
82
|
icon: UngroupIcon(),
|
|
78
83
|
run(ctx) {
|
|
79
84
|
const models = ctx.getSurfaceModelsByType(FrameBlockModel);
|
|
@@ -133,10 +138,11 @@ const builtinSurfaceToolbarConfig = {
|
|
|
133
138
|
return html `
|
|
134
139
|
<edgeless-color-picker-button
|
|
135
140
|
class="background"
|
|
136
|
-
.label="${
|
|
141
|
+
.label="${translateKey(ctx.std, ...FRAME_TOOLBAR_BACKGROUND)}"
|
|
137
142
|
.pick=${onPick}
|
|
138
143
|
.color=${background}
|
|
139
144
|
.theme=${theme}
|
|
145
|
+
.std=${ctx.std}
|
|
140
146
|
.originalColor=${firstModel.props.background}
|
|
141
147
|
.enableCustomColor=${enableCustomColor}
|
|
142
148
|
>
|
|
@@ -32,11 +32,13 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
+
import { translateKey } from '../../affine-shared/services/index.js';
|
|
35
36
|
import { createButtonPopper } from '../../affine-shared/utils/index.js';
|
|
36
37
|
import { WithDisposable } from '../../global/lit/index.js';
|
|
37
38
|
import { LayerIcon } from '@blocksuite/icons/lit';
|
|
38
39
|
import { css, html, LitElement } from 'lit';
|
|
39
40
|
import { property, query } from 'lit/decorators.js';
|
|
41
|
+
import { FRAME_PRESENT_FRAME_ORDER } from '../translations.js';
|
|
40
42
|
let EdgelessFrameOrderButton = (() => {
|
|
41
43
|
let _classSuper = WithDisposable(LitElement);
|
|
42
44
|
let __edgelessFrameOrderButton_decorators;
|
|
@@ -106,7 +108,9 @@ let EdgelessFrameOrderButton = (() => {
|
|
|
106
108
|
<edgeless-tool-icon-button
|
|
107
109
|
class="edgeless-frame-order-button"
|
|
108
110
|
.iconSize=${'24px'}
|
|
109
|
-
.tooltip=${this.popperShow
|
|
111
|
+
.tooltip=${this.popperShow
|
|
112
|
+
? ''
|
|
113
|
+
: translateKey(this.edgeless.std, ...FRAME_PRESENT_FRAME_ORDER)}
|
|
110
114
|
@click=${() => {
|
|
111
115
|
if (readonly)
|
|
112
116
|
return;
|