@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
|
@@ -2,7 +2,7 @@ import { reassociateConnectorsCommand } from '../../../affine-block-surface/inde
|
|
|
2
2
|
import { toast } from '../../../affine-components/toast/index.js';
|
|
3
3
|
import { BookmarkStyles, EmbedIframeBlockModel } from '../../../affine-model/index.js';
|
|
4
4
|
import { EMBED_CARD_HEIGHT, EMBED_CARD_WIDTH, } from '../../../affine-shared/consts/index.js';
|
|
5
|
-
import { ActionPlacement, TOAST_COPIED_TO_CLIPBOARD, TOOLBAR_CARD_VIEW, TOOLBAR_COPY, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, toolbarActionLabel, ToolbarModuleExtension, translateKey, } from '../../../affine-shared/services/index.js';
|
|
5
|
+
import { ActionPlacement, TOAST_COPIED_TO_CLIPBOARD, TOOLBAR_CAPTION, TOOLBAR_CARD_VIEW, TOOLBAR_COPY, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, TOOLBAR_RELOAD, toolbarActionLabel, ToolbarModuleExtension, translateKey, } from '../../../affine-shared/services/index.js';
|
|
6
6
|
import { getBlockProps } from '../../../affine-shared/utils/index.js';
|
|
7
7
|
import { Bound } from '../../../global/gfx/index.js';
|
|
8
8
|
import { CaptionIcon, CopyIcon, DeleteIcon, DuplicateIcon, LinkedPageIcon, OpenInNewIcon, ResetIcon, } from '@blocksuite/icons/lit';
|
|
@@ -13,6 +13,7 @@ import { html } from 'lit';
|
|
|
13
13
|
import { keyed } from 'lit/directives/keyed.js';
|
|
14
14
|
import * as Y from 'yjs';
|
|
15
15
|
import { convertSelectedBlocksToLinkedDoc, getTitleFromSelectedModels, notifyDocCreated, promptDocTitle, } from '../../common/render-linked-doc.js';
|
|
16
|
+
import { EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC, EMBED_IFRAME_TOOLBAR_ORIGINAL, } from '../../translations.js';
|
|
16
17
|
import { EmbedIframeBlockComponent } from '../embed-iframe-block.js';
|
|
17
18
|
const trackBaseProps = {
|
|
18
19
|
category: 'embed iframe block',
|
|
@@ -28,6 +29,7 @@ const openLinkAction = (id) => {
|
|
|
28
29
|
id,
|
|
29
30
|
when: showWhenUrlExists,
|
|
30
31
|
tooltip: 'Original',
|
|
32
|
+
tooltipWording: EMBED_IFRAME_TOOLBAR_ORIGINAL,
|
|
31
33
|
icon: OpenInNewIcon(),
|
|
32
34
|
run(ctx) {
|
|
33
35
|
const component = ctx.getCurrentBlockByType(EmbedIframeBlockComponent);
|
|
@@ -44,6 +46,7 @@ const captionAction = (id) => {
|
|
|
44
46
|
id,
|
|
45
47
|
when: showWhenUrlExists,
|
|
46
48
|
tooltip: 'Caption',
|
|
49
|
+
tooltipWording: TOOLBAR_CAPTION,
|
|
47
50
|
icon: CaptionIcon(),
|
|
48
51
|
run(ctx) {
|
|
49
52
|
const component = ctx.getCurrentBlockByType(EmbedIframeBlockComponent);
|
|
@@ -151,6 +154,7 @@ export const builtinToolbarConfig = {
|
|
|
151
154
|
{
|
|
152
155
|
id: 'e.convert-to-linked-doc',
|
|
153
156
|
tooltip: 'Create Linked Doc',
|
|
157
|
+
tooltipWording: EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC,
|
|
154
158
|
icon: LinkedPageIcon(),
|
|
155
159
|
run(ctx) {
|
|
156
160
|
const model = ctx.getCurrentModelByType(EmbedIframeBlockModel);
|
|
@@ -227,6 +231,7 @@ export const builtinToolbarConfig = {
|
|
|
227
231
|
placement: ActionPlacement.More,
|
|
228
232
|
id: 'b.reload',
|
|
229
233
|
label: 'Reload',
|
|
234
|
+
labelWording: TOOLBAR_RELOAD,
|
|
230
235
|
icon: ResetIcon(),
|
|
231
236
|
run(ctx) {
|
|
232
237
|
const component = ctx.getCurrentBlockByType(EmbedIframeBlockComponent);
|
|
@@ -49,6 +49,7 @@ import { styleMap } from 'lit/directives/style-map.js';
|
|
|
49
49
|
import { DEFAULT_IFRAME_HEIGHT, DEFAULT_IFRAME_WIDTH, EMBED_IFRAME_DEFAULT_CONTAINER_BORDER_RADIUS, ERROR_CARD_DEFAULT_HEIGHT, IDLE_CARD_DEFAULT_HEIGHT, LINK_CREATE_POPUP_OFFSET, LOADING_CARD_DEFAULT_HEIGHT, } from './consts.js';
|
|
50
50
|
import { embedIframeBlockStyles } from './style.js';
|
|
51
51
|
import { safeGetIframeSrc } from './utils.js';
|
|
52
|
+
import { EMBED_IFRAME_NO_LINK_MESSAGE } from '../translations.js';
|
|
52
53
|
let EmbedIframeBlockComponent = (() => {
|
|
53
54
|
let _classSuper = CaptionedBlockComponent;
|
|
54
55
|
let __blockContainer_decorators;
|
|
@@ -223,7 +224,7 @@ let EmbedIframeBlockComponent = (() => {
|
|
|
223
224
|
if (!link) {
|
|
224
225
|
this.notificationService?.notify({
|
|
225
226
|
title: translateKey(this.std, ...TOAST_NO_LINK_FOUND),
|
|
226
|
-
message:
|
|
227
|
+
message: translateKey(this.std, ...EMBED_IFRAME_NO_LINK_MESSAGE),
|
|
227
228
|
accent: 'warning',
|
|
228
229
|
onClose: function () { },
|
|
229
230
|
});
|
|
@@ -382,6 +383,7 @@ let EmbedIframeBlockComponent = (() => {
|
|
|
382
383
|
this._renderContent = () => {
|
|
383
384
|
if (this.isIdle$.value) {
|
|
384
385
|
return html `<embed-iframe-idle-card
|
|
386
|
+
.std=${this.std}
|
|
385
387
|
.options=${this._statusCardOptions}
|
|
386
388
|
></embed-iframe-idle-card>`;
|
|
387
389
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ChromeWording } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The confirm/cancel pair of the two prompts this package renders — the
|
|
4
|
+
* "create a linked doc" title prompt (`common/render-linked-doc.ts`) and the
|
|
5
|
+
* generic-embed link popup's own confirm button
|
|
6
|
+
* (`embed-iframe-block/components/embed-iframe-link-input-popup.ts`). Both
|
|
7
|
+
* read the exact same two words, so one pair serves both. L7 dedupe: the
|
|
8
|
+
* exact same two words `@labre/affine-components`'s own modals use, so both
|
|
9
|
+
* now alias the shared `chrome.ts` wording.
|
|
10
|
+
*/
|
|
11
|
+
export declare const EMBED_CONFIRM: ChromeWording;
|
|
12
|
+
export declare const EMBED_CANCEL: ChromeWording;
|
|
13
|
+
export declare const EMBED_PROMPT_TITLE_MESSAGE: ChromeWording;
|
|
14
|
+
export declare const EMBED_DOC_CREATED_UNDO_MESSAGE: ChromeWording;
|
|
15
|
+
export declare const EMBED_HTML_EMPTY: ChromeWording;
|
|
16
|
+
export declare const EMBED_HTML_SETTINGS_HEADER: ChromeWording;
|
|
17
|
+
export declare const EMBED_IFRAME_SLASH_NAME: ChromeWording;
|
|
18
|
+
export declare const EMBED_IFRAME_SLASH_DESCRIPTION: ChromeWording;
|
|
19
|
+
export declare const EMBED_IFRAME_ERROR_TITLE: ChromeWording;
|
|
20
|
+
export declare const EMBED_IFRAME_ERROR_EDIT: ChromeWording;
|
|
21
|
+
export declare const EMBED_IFRAME_IDLE_TEXT: ChromeWording;
|
|
22
|
+
export declare const EMBED_IFRAME_INVALID_URL_TITLE: ChromeWording;
|
|
23
|
+
export declare const EMBED_IFRAME_INVALID_URL_MESSAGE: ChromeWording;
|
|
24
|
+
export declare const EMBED_IFRAME_CREATION_ERROR_TITLE: ChromeWording;
|
|
25
|
+
export declare const EMBED_IFRAME_CREATION_ERROR_FALLBACK: ChromeWording;
|
|
26
|
+
export declare const EMBED_IFRAME_LINK_POPUP_TITLE: ChromeWording;
|
|
27
|
+
export declare const EMBED_IFRAME_LINK_POPUP_DESCRIPTION: ChromeWording;
|
|
28
|
+
export declare const EMBED_IFRAME_LINK_POPUP_PLACEHOLDER: ChromeWording;
|
|
29
|
+
export declare const EMBED_IFRAME_TOOLBAR_ORIGINAL: ChromeWording;
|
|
30
|
+
/**
|
|
31
|
+
* An alias (L7 dedupe): the same Title Case word as
|
|
32
|
+
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the sentence-case
|
|
33
|
+
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked doc").
|
|
34
|
+
*/
|
|
35
|
+
export declare const EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC: ChromeWording;
|
|
36
|
+
/** The "no link" notification's message (`embed-iframe-block.ts`). */
|
|
37
|
+
export declare const EMBED_IFRAME_NO_LINK_MESSAGE: ChromeWording;
|
|
38
|
+
/**
|
|
39
|
+
* This package's contribution to the translation-key manifest, listed in
|
|
40
|
+
* `PACKAGE_WORDINGS` under source `chrome`
|
|
41
|
+
* (`packages/affine/all/src/translations.ts`). The shared verbs it reuses
|
|
42
|
+
* (Caption, Reload, Loading…, Settings, the card-style switcher's four
|
|
43
|
+
* wordings…) travel with `@labre/affine-shared/services` instead, so they
|
|
44
|
+
* are not restated here.
|
|
45
|
+
*/
|
|
46
|
+
export declare const EMBED_WORDINGS: readonly ChromeWording[];
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ACTION_CANCEL, ACTION_CONFIRM, TOOLBAR_CREATE_LINKED_DOC_TITLE, TOOLBAR_EDIT, TOOLBAR_SETTINGS, } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The confirm/cancel pair of the two prompts this package renders — the
|
|
4
|
+
* "create a linked doc" title prompt (`common/render-linked-doc.ts`) and the
|
|
5
|
+
* generic-embed link popup's own confirm button
|
|
6
|
+
* (`embed-iframe-block/components/embed-iframe-link-input-popup.ts`). Both
|
|
7
|
+
* read the exact same two words, so one pair serves both. L7 dedupe: the
|
|
8
|
+
* exact same two words `@labre/affine-components`'s own modals use, so both
|
|
9
|
+
* now alias the shared `chrome.ts` wording.
|
|
10
|
+
*/
|
|
11
|
+
export const EMBED_CONFIRM = ACTION_CONFIRM;
|
|
12
|
+
export const EMBED_CANCEL = ACTION_CANCEL;
|
|
13
|
+
/* ── "Create a linked doc" prompt (`common/render-linked-doc.ts`) ────────── */
|
|
14
|
+
export const EMBED_PROMPT_TITLE_MESSAGE = [
|
|
15
|
+
'com.labre.embed.prompt.title-message',
|
|
16
|
+
'Enter a title for the new doc.',
|
|
17
|
+
];
|
|
18
|
+
export const EMBED_DOC_CREATED_UNDO_MESSAGE = [
|
|
19
|
+
'com.labre.embed.toast.undo-message',
|
|
20
|
+
'You can click undo to recovery block content',
|
|
21
|
+
];
|
|
22
|
+
/* ── The HTML embed (`embed-html-block/`) ─────────────────────────────── */
|
|
23
|
+
export const EMBED_HTML_EMPTY = [
|
|
24
|
+
'com.labre.embed.html.empty',
|
|
25
|
+
'Empty',
|
|
26
|
+
];
|
|
27
|
+
export const EMBED_HTML_SETTINGS_HEADER = TOOLBAR_SETTINGS;
|
|
28
|
+
/* ── The generic iframe embed (`embed-iframe-block/`) ─────────────────── */
|
|
29
|
+
export const EMBED_IFRAME_SLASH_NAME = [
|
|
30
|
+
'com.labre.embed.iframe.slash.name',
|
|
31
|
+
'Embed',
|
|
32
|
+
];
|
|
33
|
+
export const EMBED_IFRAME_SLASH_DESCRIPTION = [
|
|
34
|
+
'com.labre.embed.iframe.slash.description',
|
|
35
|
+
'For Google Drive, and more.',
|
|
36
|
+
];
|
|
37
|
+
export const EMBED_IFRAME_ERROR_TITLE = [
|
|
38
|
+
'com.labre.embed.iframe.error.title',
|
|
39
|
+
'This link couldn’t be loaded.',
|
|
40
|
+
];
|
|
41
|
+
export const EMBED_IFRAME_ERROR_EDIT = TOOLBAR_EDIT;
|
|
42
|
+
export const EMBED_IFRAME_IDLE_TEXT = [
|
|
43
|
+
'com.labre.embed.iframe.idle.text',
|
|
44
|
+
'Embed anything (Google Drive, Google Docs, Spotify, Miro…)',
|
|
45
|
+
];
|
|
46
|
+
export const EMBED_IFRAME_INVALID_URL_TITLE = [
|
|
47
|
+
'com.labre.embed.iframe.invalid-url.title',
|
|
48
|
+
'Invalid URL',
|
|
49
|
+
];
|
|
50
|
+
export const EMBED_IFRAME_INVALID_URL_MESSAGE = [
|
|
51
|
+
'com.labre.embed.iframe.invalid-url.message',
|
|
52
|
+
'Please enter a valid URL',
|
|
53
|
+
];
|
|
54
|
+
export const EMBED_IFRAME_CREATION_ERROR_TITLE = [
|
|
55
|
+
'com.labre.embed.iframe.creation-error.title',
|
|
56
|
+
'Error in embed iframe creation',
|
|
57
|
+
];
|
|
58
|
+
export const EMBED_IFRAME_CREATION_ERROR_FALLBACK = [
|
|
59
|
+
'com.labre.embed.iframe.creation-error.fallback',
|
|
60
|
+
'Please try again',
|
|
61
|
+
];
|
|
62
|
+
export const EMBED_IFRAME_LINK_POPUP_TITLE = [
|
|
63
|
+
'com.labre.embed.iframe.link-popup.title',
|
|
64
|
+
'Embed Link',
|
|
65
|
+
];
|
|
66
|
+
export const EMBED_IFRAME_LINK_POPUP_DESCRIPTION = [
|
|
67
|
+
'com.labre.embed.iframe.link-popup.description',
|
|
68
|
+
'Works with links of Google Drive, Spotify…',
|
|
69
|
+
];
|
|
70
|
+
export const EMBED_IFRAME_LINK_POPUP_PLACEHOLDER = [
|
|
71
|
+
'com.labre.embed.iframe.link-popup.placeholder',
|
|
72
|
+
'Paste the Embed link...',
|
|
73
|
+
];
|
|
74
|
+
export const EMBED_IFRAME_TOOLBAR_ORIGINAL = [
|
|
75
|
+
'com.labre.embed.iframe.toolbar.original',
|
|
76
|
+
'Original',
|
|
77
|
+
];
|
|
78
|
+
/**
|
|
79
|
+
* An alias (L7 dedupe): the same Title Case word as
|
|
80
|
+
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the sentence-case
|
|
81
|
+
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked doc").
|
|
82
|
+
*/
|
|
83
|
+
export const EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC = TOOLBAR_CREATE_LINKED_DOC_TITLE;
|
|
84
|
+
/** The "no link" notification's message (`embed-iframe-block.ts`). */
|
|
85
|
+
export const EMBED_IFRAME_NO_LINK_MESSAGE = [
|
|
86
|
+
'com.labre.embed.iframe.no-link-message',
|
|
87
|
+
'Please set a link to the block',
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* This package's contribution to the translation-key manifest, listed in
|
|
91
|
+
* `PACKAGE_WORDINGS` under source `chrome`
|
|
92
|
+
* (`packages/affine/all/src/translations.ts`). The shared verbs it reuses
|
|
93
|
+
* (Caption, Reload, Loading…, Settings, the card-style switcher's four
|
|
94
|
+
* wordings…) travel with `@labre/affine-shared/services` instead, so they
|
|
95
|
+
* are not restated here.
|
|
96
|
+
*/
|
|
97
|
+
export const EMBED_WORDINGS = [
|
|
98
|
+
EMBED_PROMPT_TITLE_MESSAGE,
|
|
99
|
+
EMBED_DOC_CREATED_UNDO_MESSAGE,
|
|
100
|
+
EMBED_HTML_EMPTY,
|
|
101
|
+
EMBED_IFRAME_SLASH_NAME,
|
|
102
|
+
EMBED_IFRAME_SLASH_DESCRIPTION,
|
|
103
|
+
EMBED_IFRAME_ERROR_TITLE,
|
|
104
|
+
EMBED_IFRAME_IDLE_TEXT,
|
|
105
|
+
EMBED_IFRAME_INVALID_URL_TITLE,
|
|
106
|
+
EMBED_IFRAME_INVALID_URL_MESSAGE,
|
|
107
|
+
EMBED_IFRAME_CREATION_ERROR_TITLE,
|
|
108
|
+
EMBED_IFRAME_CREATION_ERROR_FALLBACK,
|
|
109
|
+
EMBED_IFRAME_LINK_POPUP_TITLE,
|
|
110
|
+
EMBED_IFRAME_LINK_POPUP_DESCRIPTION,
|
|
111
|
+
EMBED_IFRAME_LINK_POPUP_PLACEHOLDER,
|
|
112
|
+
EMBED_IFRAME_TOOLBAR_ORIGINAL,
|
|
113
|
+
EMBED_IFRAME_NO_LINK_MESSAGE,
|
|
114
|
+
];
|
|
@@ -5,16 +5,20 @@ import { createDefaultDoc } from '../../../affine-shared/utils/index.js';
|
|
|
5
5
|
import { SlashMenuConfigIdentifier, } from '../../../affine-widget-slash-menu/index.js';
|
|
6
6
|
import { LinkedPageIcon, PlusIcon } from '@blocksuite/icons/lit';
|
|
7
7
|
import {} from '../../../store/index.js';
|
|
8
|
+
import { EMBED_DOC_SLASH_LINKED_DOC_CAPTION, EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION, EMBED_DOC_SLASH_LINKED_DOC_NAME, EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION, EMBED_DOC_SLASH_NEW_DOC_NAME, } from '../../translations.js';
|
|
8
9
|
import { LinkDocTooltip, NewDocTooltip } from './tooltips.js';
|
|
9
10
|
const linkedDocSlashMenuConfig = {
|
|
10
11
|
items: [
|
|
11
12
|
{
|
|
12
13
|
name: 'New Doc',
|
|
14
|
+
nameWording: EMBED_DOC_SLASH_NEW_DOC_NAME,
|
|
13
15
|
description: 'Start a new document.',
|
|
16
|
+
descriptionWording: EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION,
|
|
14
17
|
icon: PlusIcon(),
|
|
15
18
|
tooltip: {
|
|
16
19
|
figure: NewDocTooltip,
|
|
17
20
|
caption: 'New Doc',
|
|
21
|
+
captionWording: EMBED_DOC_SLASH_NEW_DOC_NAME,
|
|
18
22
|
},
|
|
19
23
|
group: '3_Page@0',
|
|
20
24
|
when: ({ model }) => model.store.schema.flavourSchemaMap.has('affine:embed-linked-doc'),
|
|
@@ -30,11 +34,14 @@ const linkedDocSlashMenuConfig = {
|
|
|
30
34
|
},
|
|
31
35
|
{
|
|
32
36
|
name: 'Linked Doc',
|
|
37
|
+
nameWording: EMBED_DOC_SLASH_LINKED_DOC_NAME,
|
|
33
38
|
description: 'Link to another document.',
|
|
39
|
+
descriptionWording: EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION,
|
|
34
40
|
icon: LinkedPageIcon(),
|
|
35
41
|
tooltip: {
|
|
36
42
|
figure: LinkDocTooltip,
|
|
37
43
|
caption: 'Link Doc',
|
|
44
|
+
captionWording: EMBED_DOC_SLASH_LINKED_DOC_CAPTION,
|
|
38
45
|
},
|
|
39
46
|
searchAlias: ['dual link'],
|
|
40
47
|
group: '3_Page@1',
|
|
@@ -2,7 +2,7 @@ import { toast } from '../../../affine-components/toast/index.js';
|
|
|
2
2
|
import { EditorChevronDown } from '../../../affine-components/toolbar/index.js';
|
|
3
3
|
import { EmbedLinkedDocModel, EmbedLinkedDocStyles, } from '../../../affine-model/index.js';
|
|
4
4
|
import { EMBED_CARD_HEIGHT, EMBED_CARD_WIDTH, } from '../../../affine-shared/consts/index.js';
|
|
5
|
-
import { ActionPlacement, blockCommentToolbarButton, DocDisplayMetaProvider, 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';
|
|
5
|
+
import { ActionPlacement, blockCommentToolbarButton, CHROME_UNTITLED, DocDisplayMetaProvider, EditorSettingProvider, TOAST_COPIED_TO_CLIPBOARD, TOOLBAR_CAPTION, TOOLBAR_CARD_VIEW, TOOLBAR_COPY, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, TOOLBAR_LARGE_HORIZONTAL_STYLE, TOOLBAR_LARGE_VERTICAL_STYLE, TOOLBAR_OPEN_THIS_DOC, TOOLBAR_SMALL_HORIZONTAL_STYLE, TOOLBAR_SMALL_VERTICAL_STYLE, toolbarActionLabel, ToolbarModuleExtension, translateKey, } from '../../../affine-shared/services/index.js';
|
|
6
6
|
import { getBlockProps, referenceToNode } from '../../../affine-shared/utils/index.js';
|
|
7
7
|
import { Bound } from '../../../global/gfx/index.js';
|
|
8
8
|
import { CaptionIcon, CopyIcon, DeleteIcon, DuplicateIcon, ExpandFullIcon, OpenInNewIcon, } from '@blocksuite/icons/lit';
|
|
@@ -14,6 +14,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
14
14
|
import { keyed } from 'lit/directives/keyed.js';
|
|
15
15
|
import { repeat } from 'lit/directives/repeat.js';
|
|
16
16
|
import { EmbedLinkedDocBlockComponent } from '../embed-linked-doc-block.js';
|
|
17
|
+
import { EMBED_DOC_OPEN_DOC } from '../../translations.js';
|
|
17
18
|
const trackBaseProps = {
|
|
18
19
|
category: 'linked doc',
|
|
19
20
|
type: 'card view',
|
|
@@ -35,7 +36,7 @@ const docTitleAction = {
|
|
|
35
36
|
if (!model.props.title)
|
|
36
37
|
return null;
|
|
37
38
|
const originalTitle = ctx.std.get(DocDisplayMetaProvider).title(model.props.pageId).value ||
|
|
38
|
-
|
|
39
|
+
translateKey(ctx.std, ...CHROME_UNTITLED);
|
|
39
40
|
const open = (event) => block.open({ event });
|
|
40
41
|
return html `<affine-linked-doc-title
|
|
41
42
|
.title=${originalTitle}
|
|
@@ -46,6 +47,7 @@ const docTitleAction = {
|
|
|
46
47
|
const captionAction = {
|
|
47
48
|
id: 'd.caption',
|
|
48
49
|
tooltip: 'Caption',
|
|
50
|
+
tooltipWording: TOOLBAR_CAPTION,
|
|
49
51
|
icon: CaptionIcon(),
|
|
50
52
|
run(ctx) {
|
|
51
53
|
const block = ctx.getCurrentBlockByType(EmbedLinkedDocBlockComponent);
|
|
@@ -61,6 +63,7 @@ const openDocActions = [
|
|
|
61
63
|
mode: 'open-in-active-view',
|
|
62
64
|
id: 'a.open-in-active-view',
|
|
63
65
|
label: 'Open this doc',
|
|
66
|
+
labelWording: TOOLBAR_OPEN_THIS_DOC,
|
|
64
67
|
icon: ExpandFullIcon(),
|
|
65
68
|
},
|
|
66
69
|
];
|
|
@@ -83,25 +86,33 @@ const openDocActionGroup = {
|
|
|
83
86
|
run: (_ctx) => block.open({ openMode }),
|
|
84
87
|
};
|
|
85
88
|
});
|
|
89
|
+
const openDocLabel = translateKey(ctx.std, ...EMBED_DOC_OPEN_DOC);
|
|
86
90
|
return html `
|
|
87
91
|
<editor-menu-button
|
|
88
92
|
.contentPadding="${'8px'}"
|
|
89
93
|
.button=${html `
|
|
90
|
-
<editor-icon-button
|
|
94
|
+
<editor-icon-button
|
|
95
|
+
aria-label=${openDocLabel}
|
|
96
|
+
.tooltip=${openDocLabel}
|
|
97
|
+
>
|
|
91
98
|
${OpenInNewIcon()} ${EditorChevronDown}
|
|
92
99
|
</editor-icon-button>
|
|
93
100
|
`}
|
|
94
101
|
>
|
|
95
102
|
<div data-size="small" data-orientation="vertical">
|
|
96
|
-
${repeat(actions, action => action.id,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
${repeat(actions, action => action.id, action => {
|
|
104
|
+
const label = toolbarActionLabel(ctx.std, action);
|
|
105
|
+
const { icon, run, disabled } = action;
|
|
106
|
+
return html `
|
|
107
|
+
<editor-menu-action
|
|
108
|
+
aria-label=${ifDefined(label)}
|
|
109
|
+
?disabled=${ifDefined(typeof disabled === 'function' ? disabled(ctx) : disabled)}
|
|
110
|
+
@click=${() => run?.(ctx)}
|
|
111
|
+
>
|
|
112
|
+
${icon}<span class="label">${label}</span>
|
|
113
|
+
</editor-menu-action>
|
|
114
|
+
`;
|
|
115
|
+
})}
|
|
105
116
|
</div>
|
|
106
117
|
</editor-menu-button>
|
|
107
118
|
`;
|
|
@@ -190,10 +201,12 @@ const builtinToolbarConfig = {
|
|
|
190
201
|
{
|
|
191
202
|
id: 'horizontal',
|
|
192
203
|
label: 'Large horizontal style',
|
|
204
|
+
labelWording: TOOLBAR_LARGE_HORIZONTAL_STYLE,
|
|
193
205
|
},
|
|
194
206
|
{
|
|
195
207
|
id: 'list',
|
|
196
208
|
label: 'Small horizontal style',
|
|
209
|
+
labelWording: TOOLBAR_SMALL_HORIZONTAL_STYLE,
|
|
197
210
|
},
|
|
198
211
|
].filter(action => EmbedLinkedDocStyles.includes(action.id)),
|
|
199
212
|
content(ctx) {
|
|
@@ -289,18 +302,22 @@ const builtinSurfaceToolbarConfig = {
|
|
|
289
302
|
{
|
|
290
303
|
id: 'horizontal',
|
|
291
304
|
label: 'Large horizontal style',
|
|
305
|
+
labelWording: TOOLBAR_LARGE_HORIZONTAL_STYLE,
|
|
292
306
|
},
|
|
293
307
|
{
|
|
294
308
|
id: 'list',
|
|
295
309
|
label: 'Small horizontal style',
|
|
310
|
+
labelWording: TOOLBAR_SMALL_HORIZONTAL_STYLE,
|
|
296
311
|
},
|
|
297
312
|
{
|
|
298
313
|
id: 'vertical',
|
|
299
314
|
label: 'Large vertical style',
|
|
315
|
+
labelWording: TOOLBAR_LARGE_VERTICAL_STYLE,
|
|
300
316
|
},
|
|
301
317
|
{
|
|
302
318
|
id: 'cube',
|
|
303
319
|
label: 'Small vertical style',
|
|
320
|
+
labelWording: TOOLBAR_SMALL_VERTICAL_STYLE,
|
|
304
321
|
},
|
|
305
322
|
].filter(action => EmbedLinkedDocStyles.includes(action.id)),
|
|
306
323
|
content(ctx) {
|
|
@@ -6,8 +6,8 @@ export const NewDocTooltip = html `<svg width="170" height="68" viewBox="0 0 170
|
|
|
6
6
|
<rect width="170" height="68" rx="2" fill="white"/>
|
|
7
7
|
</mask>
|
|
8
8
|
<g mask="url(#mask0_16460_991)">
|
|
9
|
-
<
|
|
10
|
-
<
|
|
9
|
+
<rect x="8" y="11" width="60.5" height="17.6" rx="8.8" fill="#8E8D91" fill-opacity="0.55"/>
|
|
10
|
+
<rect x="8" y="37.1364" width="115.5" height="8" rx="4" fill="#8E8D91" fill-opacity="0.55"/>
|
|
11
11
|
</g>
|
|
12
12
|
</svg>
|
|
13
13
|
`;
|
|
@@ -18,13 +18,13 @@ export const LinkDocTooltip = html `<svg width="170" height="68" viewBox="0 0 17
|
|
|
18
18
|
<rect width="170" height="68" rx="2" fill="white"/>
|
|
19
19
|
</mask>
|
|
20
20
|
<g mask="url(#mask0_16460_998)">
|
|
21
|
-
<
|
|
21
|
+
<rect x="8" y="8.1364" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="20.1364" width="126.5" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="56.1364" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="68.1364" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="104.136" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="116.136" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="128.136" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="140.136" width="66" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="176.136" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/><rect x="8" y="188.136" width="162" height="8" rx="4" fill="#121212" fill-opacity="0.3"/>
|
|
22
22
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.125 39C10.125 38.2406 10.7406 37.625 11.5 37.625H16.5C17.2594 37.625 17.875 38.2406 17.875 39V42C17.875 42.2071 17.7071 42.375 17.5 42.375C17.2929 42.375 17.125 42.2071 17.125 42V39C17.125 38.6548 16.8452 38.375 16.5 38.375H11.5C11.1548 38.375 10.875 38.6548 10.875 39V45C10.875 45.3452 11.1548 45.625 11.5 45.625H14C14.2071 45.625 14.375 45.7929 14.375 46C14.375 46.2071 14.2071 46.375 14 46.375H11.5C10.7406 46.375 10.125 45.7594 10.125 45V39ZM12.125 40C12.125 39.7929 12.2929 39.625 12.5 39.625H14C14.2071 39.625 14.375 39.7929 14.375 40C14.375 40.2071 14.2071 40.375 14 40.375H12.5C12.2929 40.375 12.125 40.2071 12.125 40ZM12.5 41.375C12.2929 41.375 12.125 41.5429 12.125 41.75C12.125 41.9571 12.2929 42.125 12.5 42.125H15.5C15.7071 42.125 15.875 41.9571 15.875 41.75C15.875 41.5429 15.7071 41.375 15.5 41.375H12.5ZM12.125 43.5C12.125 43.2929 12.2929 43.125 12.5 43.125H13.75C13.9571 43.125 14.125 43.2929 14.125 43.5C14.125 43.7071 13.9571 43.875 13.75 43.875H12.5C12.2929 43.875 12.125 43.7071 12.125 43.5ZM15.75 43.125C15.5429 43.125 15.375 43.2929 15.375 43.5C15.375 43.7071 15.5429 43.875 15.75 43.875H17.0947L15.2348 45.7348C15.0884 45.8813 15.0884 46.1187 15.2348 46.2652C15.3813 46.4116 15.6187 46.4116 15.7652 46.2652L17.625 44.4053V45.75C17.625 45.9571 17.7929 46.125 18 46.125C18.2071 46.125 18.375 45.9571 18.375 45.75V43.5C18.375 43.4005 18.3355 43.3052 18.2652 43.2348C18.1948 43.1645 18.0995 43.125 18 43.125H15.75Z" fill="#77757D"/>
|
|
23
23
|
<mask id="path-5-inside-1_16460_998" fill="white">
|
|
24
24
|
<path d="M24 35H98V49H24V35Z"/>
|
|
25
25
|
</mask>
|
|
26
26
|
<path d="M98 48.5H24V49.5H98V48.5Z" fill="#E3E2E4" mask="url(#path-5-inside-1_16460_998)"/>
|
|
27
|
-
<
|
|
27
|
+
<rect x="24" y="38.1364" width="77" height="8" rx="4" fill="#121212" fill-opacity="0.3"/>
|
|
28
28
|
</g>
|
|
29
29
|
</svg>
|
|
30
30
|
`;
|
|
@@ -38,7 +38,7 @@ import { LoadingIcon } from '../../affine-components/icons/index.js';
|
|
|
38
38
|
import { isPeekable, Peekable } from '../../affine-components/peek/index.js';
|
|
39
39
|
import { RefNodeSlotsProvider } from '../../affine-inline-reference/index.js';
|
|
40
40
|
import { EMBED_CARD_HEIGHT, EMBED_CARD_WIDTH, REFERENCE_NODE, } from '../../affine-shared/consts/index.js';
|
|
41
|
-
import { CitationProvider, DocDisplayMetaProvider, DocModeProvider, LINKED_DOC_DELETED, LINKED_DOC_EMPTY_PREVIEW, LINKED_DOC_FAILED, OpenDocExtensionIdentifier, ThemeProvider, translateKey, whenLinkedDocContentReady, } from '../../affine-shared/services/index.js';
|
|
41
|
+
import { CHROME_LOADING, CitationProvider, DocDisplayMetaProvider, DocModeProvider, LINKED_DOC_DELETED, LINKED_DOC_EMPTY_PREVIEW, LINKED_DOC_FAILED, OpenDocExtensionIdentifier, ThemeProvider, TOOLBAR_RELOAD, translateKey, whenLinkedDocContentReady, } from '../../affine-shared/services/index.js';
|
|
42
42
|
import { cloneReferenceInfo, cloneReferenceInfoWithoutAliases, isNewTabTrigger, isNewViewTrigger, matchModels, referenceToNode, } from '../../affine-shared/utils/index.js';
|
|
43
43
|
import { Bound } from '../../global/gfx/index.js';
|
|
44
44
|
import { ResetIcon } from '@blocksuite/icons/lit';
|
|
@@ -57,6 +57,7 @@ import * as Y from 'yjs';
|
|
|
57
57
|
import { isDocTrashed } from '../common/doc-trashed.js';
|
|
58
58
|
import { renderLinkedDocInCard } from '../common/render-linked-doc.js';
|
|
59
59
|
import { SyncedDocErrorIcon } from '../embed-synced-doc-block/styles.js';
|
|
60
|
+
import { EMBED_DOC_UPDATED_LABEL } from '../translations.js';
|
|
60
61
|
import { styles } from './styles.js';
|
|
61
62
|
import { getEmbedLinkedDocIcons } from './utils.js';
|
|
62
63
|
let EmbedLinkedDocBlockComponent = (() => {
|
|
@@ -464,7 +465,9 @@ let EmbedLinkedDocBlockComponent = (() => {
|
|
|
464
465
|
: isLoading
|
|
465
466
|
? LoadingIcon()
|
|
466
467
|
: this.icon$.value;
|
|
467
|
-
const title = isLoading
|
|
468
|
+
const title = isLoading
|
|
469
|
+
? translateKey(this.std, ...CHROME_LOADING)
|
|
470
|
+
: this.title$;
|
|
468
471
|
const description = this.model.props.description$;
|
|
469
472
|
const showDefaultNoteContent = isError || isLoading || isDeleted || isEmpty;
|
|
470
473
|
const defaultNoteContent = isError
|
|
@@ -523,13 +526,16 @@ let EmbedLinkedDocBlockComponent = (() => {
|
|
|
523
526
|
class="affine-embed-linked-doc-card-content-reload-button"
|
|
524
527
|
@click=${this.refreshData}
|
|
525
528
|
>
|
|
526
|
-
${ResetIcon()}
|
|
529
|
+
${ResetIcon()}
|
|
530
|
+
<span>${translateKey(this.std, ...TOOLBAR_RELOAD)}</span>
|
|
527
531
|
</div>
|
|
528
532
|
</div>
|
|
529
533
|
`
|
|
530
534
|
: html `
|
|
531
535
|
<div class="affine-embed-linked-doc-content-date">
|
|
532
|
-
<span
|
|
536
|
+
<span
|
|
537
|
+
>${translateKey(this.std, ...EMBED_DOC_UPDATED_LABEL)}</span
|
|
538
|
+
>
|
|
533
539
|
|
|
534
540
|
<span>${dateText}</span>
|
|
535
541
|
</div>
|
package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js
CHANGED
|
@@ -34,7 +34,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
34
34
|
};
|
|
35
35
|
import { RENDER_CARD_THROTTLE_MS } from '../../../affine-block-embed/index.js';
|
|
36
36
|
import { LoadingIcon } from '../../../affine-components/icons/index.js';
|
|
37
|
-
import { LINKED_DOC_DELETED, LINKED_DOC_FAILED, SYNCED_DOC_EMPTY_PREVIEW, ThemeProvider, translateKey, whenLinkedDocContentReady, } from '../../../affine-shared/services/index.js';
|
|
37
|
+
import { CHROME_LOADING, LINKED_DOC_DELETED, LINKED_DOC_FAILED, SYNCED_DOC_EMPTY_PREVIEW, ThemeProvider, TOOLBAR_RELOAD, translateKey, whenLinkedDocContentReady, } from '../../../affine-shared/services/index.js';
|
|
38
38
|
import { WithDisposable } from '../../../global/lit/index.js';
|
|
39
39
|
import { ResetIcon } from '@blocksuite/icons/lit';
|
|
40
40
|
import { BlockSelection, isGfxBlockComponent, ShadowlessElement, } from '../../../std/index.js';
|
|
@@ -43,6 +43,7 @@ import { property, queryAsync } from 'lit/decorators.js';
|
|
|
43
43
|
import { classMap } from 'lit/directives/class-map.js';
|
|
44
44
|
import throttle from 'lodash-es/throttle.js';
|
|
45
45
|
import { renderLinkedDocInCard } from '../../common/render-linked-doc.js';
|
|
46
|
+
import { EMBED_DOC_UPDATED_LABEL } from '../../translations.js';
|
|
46
47
|
import { cardStyles } from '../styles.js';
|
|
47
48
|
import { getSyncedDocIcons } from '../utils.js';
|
|
48
49
|
let EmbedSyncedDocCard = (() => {
|
|
@@ -182,7 +183,9 @@ let EmbedSyncedDocCard = (() => {
|
|
|
182
183
|
: isLoading
|
|
183
184
|
? LoadingIcon()
|
|
184
185
|
: this.block.icon$.value;
|
|
185
|
-
const title = isLoading
|
|
186
|
+
const title = isLoading
|
|
187
|
+
? translateKey(this.std, ...CHROME_LOADING)
|
|
188
|
+
: this.block.title$;
|
|
186
189
|
const showDefaultNoteContent = isLoading || error || isDeleted || isEmpty;
|
|
187
190
|
const std = this.block.std;
|
|
188
191
|
const defaultNoteContent = error
|
|
@@ -233,13 +236,14 @@ let EmbedSyncedDocCard = (() => {
|
|
|
233
236
|
class="affine-embed-synced-doc-card-content-reload-button"
|
|
234
237
|
@click=${() => this.block.refreshData()}
|
|
235
238
|
>
|
|
236
|
-
${ResetIcon()}
|
|
239
|
+
${ResetIcon()}
|
|
240
|
+
<span>${translateKey(std, ...TOOLBAR_RELOAD)}</span>
|
|
237
241
|
</div>
|
|
238
242
|
</div>
|
|
239
243
|
`
|
|
240
244
|
: html `
|
|
241
245
|
<div class="affine-embed-synced-doc-card-content-date">
|
|
242
|
-
<span
|
|
246
|
+
<span>${translateKey(std, ...EMBED_DOC_UPDATED_LABEL)}</span>
|
|
243
247
|
|
|
244
248
|
<span>${dateText}</span>
|
|
245
249
|
</div>
|
|
@@ -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;
|