@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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { MINDMAP_NAME, } from '../affine-shared/services/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The mindmap's own seeds: the captions a freshly placed mindmap is written
|
|
4
|
+
* with, wherever the gesture draws one directly (the toolbar's built-in
|
|
5
|
+
* templates, the drag-from-basket tool, a `.mm`/`.opml` import that meets an
|
|
6
|
+
* empty node). Resolved at PLACEMENT and never again (ADR 0016) — a node
|
|
7
|
+
* renamed by its author keeps its name, and a mindmap created before these
|
|
8
|
+
* keys existed keeps the plain text it was given.
|
|
9
|
+
*
|
|
10
|
+
* `root` and `child` are shared by every gesture that draws a plain mindmap
|
|
11
|
+
* with no real content yet (the built-in templates and the basket tool both
|
|
12
|
+
* write the same two words); `topic1`–`topic3` are the three placeholder
|
|
13
|
+
* children the STARTER TEMPLATES draw, one key per position; `imported-node`
|
|
14
|
+
* is what a `.mm` / `.opml` file's own untitled node becomes.
|
|
15
|
+
*/
|
|
16
|
+
export const MINDMAP_SEED_ROOT = [
|
|
17
|
+
'com.labre.mindmap.seed.root',
|
|
18
|
+
'Mind Map',
|
|
19
|
+
];
|
|
20
|
+
export const MINDMAP_SEED_CHILD = [
|
|
21
|
+
'com.labre.mindmap.seed.child',
|
|
22
|
+
'Text',
|
|
23
|
+
];
|
|
24
|
+
export const MINDMAP_SEED_TOPIC_1 = [
|
|
25
|
+
'com.labre.mindmap.seed.topic-1',
|
|
26
|
+
'Topic 1',
|
|
27
|
+
];
|
|
28
|
+
export const MINDMAP_SEED_TOPIC_2 = [
|
|
29
|
+
'com.labre.mindmap.seed.topic-2',
|
|
30
|
+
'Topic 2',
|
|
31
|
+
];
|
|
32
|
+
export const MINDMAP_SEED_TOPIC_3 = [
|
|
33
|
+
'com.labre.mindmap.seed.topic-3',
|
|
34
|
+
'Topic 3',
|
|
35
|
+
];
|
|
36
|
+
export const MINDMAP_SEED_IMPORTED_NODE = [
|
|
37
|
+
'com.labre.mindmap.seed.imported-node',
|
|
38
|
+
'MINDMAP',
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* The mindmap model's `addNode` (`packages/affine/model`, a red zone this
|
|
42
|
+
* package never edits) defaults an untitled node's text to the literal
|
|
43
|
+
* `'New node'` when no caller supplies one. Declared here — a seed, resolved
|
|
44
|
+
* at the gesture that calls `addNode`, never again — so every call site that
|
|
45
|
+
* relied on the model's own default can pass this instead:
|
|
46
|
+
* `{ text: translateKey(std, ...MINDMAP_SEED_NEW_NODE) }`. Used by this
|
|
47
|
+
* package's own gestures and by `widgets/edgeless-selected-rect`'s
|
|
48
|
+
* "add sibling / child node" action (`edgeless-auto-complete.ts`);
|
|
49
|
+
* `blocks/root` imports it directly for its own call sites onto the same
|
|
50
|
+
* model.
|
|
51
|
+
*/
|
|
52
|
+
export const MINDMAP_SEED_NEW_NODE = [
|
|
53
|
+
'com.labre.mindmap.seed.new-node',
|
|
54
|
+
'New node',
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* This package's contribution to the translation-key manifest, listed in
|
|
58
|
+
* `PACKAGE_SEED_WORDINGS` under source `seed`
|
|
59
|
+
* (`packages/affine/all/src/translations.ts`).
|
|
60
|
+
*/
|
|
61
|
+
export const MINDMAP_SEED_WORDINGS = [
|
|
62
|
+
MINDMAP_SEED_ROOT,
|
|
63
|
+
MINDMAP_SEED_CHILD,
|
|
64
|
+
MINDMAP_SEED_TOPIC_1,
|
|
65
|
+
MINDMAP_SEED_TOPIC_2,
|
|
66
|
+
MINDMAP_SEED_TOPIC_3,
|
|
67
|
+
MINDMAP_SEED_IMPORTED_NODE,
|
|
68
|
+
MINDMAP_SEED_NEW_NODE,
|
|
69
|
+
];
|
|
70
|
+
/* ── Chrome: the mindmap's own toolbar, senior buttons and template tab ──── */
|
|
71
|
+
/**
|
|
72
|
+
* "Mind Map" said as chrome rather than as a seed: the template-panel
|
|
73
|
+
* category tab, the senior/quick tool's own name, and every tooltip that
|
|
74
|
+
* names the mindmap tool — one word, one key, reused across every drawer in
|
|
75
|
+
* this package.
|
|
76
|
+
*/
|
|
77
|
+
export const MINDMAP_TOOLTIP = MINDMAP_NAME;
|
|
78
|
+
/** The Templates panel's "Mind Map" category tab (`TemplateCategory.nameKey`). */
|
|
79
|
+
export const MINDMAP_TEMPLATE_CATEGORY = MINDMAP_TOOLTIP;
|
|
80
|
+
/**
|
|
81
|
+
* The four starter templates' own tile names (`Template.nameKey`) — chrome,
|
|
82
|
+
* resolved by the panel widget every time it opens, distinct from the seeds
|
|
83
|
+
* ({@link MINDMAP_SEED_WORDINGS}) each starter WRITES into the document.
|
|
84
|
+
*/
|
|
85
|
+
export const MINDMAP_TEMPLATE_NAME_STYLE_1 = [
|
|
86
|
+
'com.labre.mindmap.template.style-1',
|
|
87
|
+
'Mind Map — Style 1',
|
|
88
|
+
];
|
|
89
|
+
export const MINDMAP_TEMPLATE_NAME_STYLE_2 = [
|
|
90
|
+
'com.labre.mindmap.template.style-2',
|
|
91
|
+
'Mind Map — Style 2',
|
|
92
|
+
];
|
|
93
|
+
export const MINDMAP_TEMPLATE_NAME_STYLE_3 = [
|
|
94
|
+
'com.labre.mindmap.template.style-3',
|
|
95
|
+
'Mind Map — Style 3',
|
|
96
|
+
];
|
|
97
|
+
export const MINDMAP_TEMPLATE_NAME_STYLE_4 = [
|
|
98
|
+
'com.labre.mindmap.template.style-4',
|
|
99
|
+
'Mind Map — Style 4',
|
|
100
|
+
];
|
|
101
|
+
export const MINDMAP_LAYOUT_LABEL = [
|
|
102
|
+
'com.labre.mindmap.toolbar.layout',
|
|
103
|
+
'Layout',
|
|
104
|
+
];
|
|
105
|
+
/**
|
|
106
|
+
* The three layout directions — a different concept from `gfx/text`'s own
|
|
107
|
+
* "Left" / "Right" text alignment (`TEXT_ALIGN_LEFT`/`RIGHT`), so kept as
|
|
108
|
+
* this package's own keys: the English word coincides, the meaning (which
|
|
109
|
+
* way the tree grows vs. how a line of text sits) does not.
|
|
110
|
+
*/
|
|
111
|
+
export const MINDMAP_LAYOUT_LEFT = [
|
|
112
|
+
'com.labre.mindmap.toolbar.layout.left',
|
|
113
|
+
'Left',
|
|
114
|
+
];
|
|
115
|
+
export const MINDMAP_LAYOUT_RADIAL = [
|
|
116
|
+
'com.labre.mindmap.toolbar.layout.radial',
|
|
117
|
+
'Radial',
|
|
118
|
+
];
|
|
119
|
+
export const MINDMAP_LAYOUT_RIGHT = [
|
|
120
|
+
'com.labre.mindmap.toolbar.layout.right',
|
|
121
|
+
'Right',
|
|
122
|
+
];
|
|
123
|
+
export const MINDMAP_IMPORT_TOOLTIP = [
|
|
124
|
+
'com.labre.mindmap.toolbar.import-tooltip',
|
|
125
|
+
'Support import of FreeMind,OPML.',
|
|
126
|
+
];
|
|
127
|
+
export const MINDMAP_IMPORT_FAILED_TOAST = [
|
|
128
|
+
'com.labre.mindmap.toolbar.import-failed',
|
|
129
|
+
'Import failed, please try again',
|
|
130
|
+
];
|
|
131
|
+
export const MINDMAP_IMPORTING_PLACEHOLDER = [
|
|
132
|
+
'com.labre.mindmap.toolbar.importing-placeholder',
|
|
133
|
+
'Importing mind map...',
|
|
134
|
+
];
|
|
135
|
+
export const MINDMAP_ADD_MEDIA_TOOLTIP = [
|
|
136
|
+
'com.labre.mindmap.toolbar.add-media',
|
|
137
|
+
'Add media',
|
|
138
|
+
];
|
|
139
|
+
export const MINDMAP_EDGELESS_TEXT_TOOLTIP = [
|
|
140
|
+
'com.labre.mindmap.toolbar.edgeless-text',
|
|
141
|
+
'Canvas Text',
|
|
142
|
+
];
|
|
143
|
+
/** The promoted "Add file" senior tool's own name/tooltip. */
|
|
144
|
+
export const MINDMAP_ADD_FILE_TOOL = [
|
|
145
|
+
'com.labre.mindmap.senior-tool.add-file',
|
|
146
|
+
'Add file',
|
|
147
|
+
];
|
|
148
|
+
/**
|
|
149
|
+
* This package's chrome contribution to the manifest, listed in
|
|
150
|
+
* `PACKAGE_WORDINGS` under source `chrome`. `STYLE_MENU_LABEL` and
|
|
151
|
+
* `TOOL_NAME_TEXT` (this package's own "Style" menu and standalone "Text"
|
|
152
|
+
* senior tool) are declared once in `chrome.ts` — shared with `gfx/shape` and
|
|
153
|
+
* `widgets/edgeless-selected-rect` — and imported directly at their call
|
|
154
|
+
* sites rather than re-declared here.
|
|
155
|
+
*/
|
|
156
|
+
export const MINDMAP_CHROME_WORDINGS = [
|
|
157
|
+
MINDMAP_TEMPLATE_NAME_STYLE_1,
|
|
158
|
+
MINDMAP_TEMPLATE_NAME_STYLE_2,
|
|
159
|
+
MINDMAP_TEMPLATE_NAME_STYLE_3,
|
|
160
|
+
MINDMAP_TEMPLATE_NAME_STYLE_4,
|
|
161
|
+
MINDMAP_LAYOUT_LABEL,
|
|
162
|
+
MINDMAP_LAYOUT_LEFT,
|
|
163
|
+
MINDMAP_LAYOUT_RADIAL,
|
|
164
|
+
MINDMAP_LAYOUT_RIGHT,
|
|
165
|
+
MINDMAP_IMPORT_TOOLTIP,
|
|
166
|
+
MINDMAP_IMPORT_FAILED_TOAST,
|
|
167
|
+
MINDMAP_IMPORTING_PLACEHOLDER,
|
|
168
|
+
MINDMAP_ADD_MEDIA_TOOLTIP,
|
|
169
|
+
MINDMAP_EDGELESS_TEXT_TOOLTIP,
|
|
170
|
+
MINDMAP_ADD_FILE_TOOL,
|
|
171
|
+
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NoteDisplayMode } from '../../affine-model/index.js';
|
|
2
|
+
import type { BlockStdScope } from '../../std/index.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
declare const NoteDisplayModePanel_base: typeof LitElement & import("../../global/utils/types.js").Constructor<import("../../global/lit/with-disposable.js").DisposableClass>;
|
|
4
5
|
export declare class NoteDisplayModePanel extends NoteDisplayModePanel_base {
|
|
@@ -9,5 +10,12 @@ export declare class NoteDisplayModePanel extends NoteDisplayModePanel_base {
|
|
|
9
10
|
accessor displayMode: NoteDisplayMode;
|
|
10
11
|
accessor onSelect: (displayMode: NoteDisplayMode) => void;
|
|
11
12
|
accessor panelWidth: number;
|
|
13
|
+
/**
|
|
14
|
+
* Optional: this panel also renders from
|
|
15
|
+
* `packages/affine/fragments/outline/src/card/outline-card.ts`, outside
|
|
16
|
+
* this lot's packages, which supplies no `std`. Without one the English
|
|
17
|
+
* fallback shows, same as before this wording existed.
|
|
18
|
+
*/
|
|
19
|
+
accessor std: BlockStdScope | undefined;
|
|
12
20
|
}
|
|
13
21
|
export {};
|
|
@@ -33,12 +33,19 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
35
|
import { NoteDisplayMode } from '../../affine-model/index.js';
|
|
36
|
+
import { translateKey } from '../../affine-shared/services/index.js';
|
|
36
37
|
import { stopPropagation } from '../../affine-shared/utils/index.js';
|
|
37
38
|
import { WithDisposable } from '../../global/lit/index.js';
|
|
38
39
|
import { EdgelessIcon, PageIcon } from '@blocksuite/icons/lit';
|
|
39
40
|
import { css, html, LitElement } from 'lit';
|
|
40
41
|
import { property } from 'lit/decorators.js';
|
|
41
42
|
import { repeat } from 'lit/directives/repeat.js';
|
|
43
|
+
import { GFX_NOTE_DISPLAY_MODE_BOTH, GFX_NOTE_DISPLAY_MODE_EDGELESS_ONLY, GFX_NOTE_DISPLAY_MODE_PAGE_ONLY, } from '../translations.js';
|
|
44
|
+
const DisplayModeWording = {
|
|
45
|
+
[NoteDisplayMode.DocAndEdgeless]: GFX_NOTE_DISPLAY_MODE_BOTH,
|
|
46
|
+
[NoteDisplayMode.DocOnly]: GFX_NOTE_DISPLAY_MODE_PAGE_ONLY,
|
|
47
|
+
[NoteDisplayMode.EdgelessOnly]: GFX_NOTE_DISPLAY_MODE_EDGELESS_ONLY,
|
|
48
|
+
};
|
|
42
49
|
let NoteDisplayModePanel = (() => {
|
|
43
50
|
let _classSuper = WithDisposable(LitElement);
|
|
44
51
|
let _displayMode_decorators;
|
|
@@ -50,15 +57,20 @@ let NoteDisplayModePanel = (() => {
|
|
|
50
57
|
let _panelWidth_decorators;
|
|
51
58
|
let _panelWidth_initializers = [];
|
|
52
59
|
let _panelWidth_extraInitializers = [];
|
|
60
|
+
let _std_decorators;
|
|
61
|
+
let _std_initializers = [];
|
|
62
|
+
let _std_extraInitializers = [];
|
|
53
63
|
return class NoteDisplayModePanel extends _classSuper {
|
|
54
64
|
static {
|
|
55
65
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
56
66
|
_displayMode_decorators = [property({ attribute: false })];
|
|
57
67
|
_onSelect_decorators = [property({ attribute: false })];
|
|
58
68
|
_panelWidth_decorators = [property({ attribute: false })];
|
|
69
|
+
_std_decorators = [property({ attribute: false })];
|
|
59
70
|
__esDecorate(this, null, _displayMode_decorators, { kind: "accessor", name: "displayMode", static: false, private: false, access: { has: obj => "displayMode" in obj, get: obj => obj.displayMode, set: (obj, value) => { obj.displayMode = value; } }, metadata: _metadata }, _displayMode_initializers, _displayMode_extraInitializers);
|
|
60
71
|
__esDecorate(this, null, _onSelect_decorators, { kind: "accessor", name: "onSelect", static: false, private: false, access: { has: obj => "onSelect" in obj, get: obj => obj.onSelect, set: (obj, value) => { obj.onSelect = value; } }, metadata: _metadata }, _onSelect_initializers, _onSelect_extraInitializers);
|
|
61
72
|
__esDecorate(this, null, _panelWidth_decorators, { kind: "accessor", name: "panelWidth", static: false, private: false, access: { has: obj => "panelWidth" in obj, get: obj => obj.panelWidth, set: (obj, value) => { obj.panelWidth = value; } }, metadata: _metadata }, _panelWidth_initializers, _panelWidth_extraInitializers);
|
|
73
|
+
__esDecorate(this, null, _std_decorators, { kind: "accessor", name: "std", static: false, private: false, access: { has: obj => "std" in obj, get: obj => obj.std, set: (obj, value) => { obj.std = value; } }, metadata: _metadata }, _std_initializers, _std_extraInitializers);
|
|
62
74
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
63
75
|
}
|
|
64
76
|
static { this.styles = css `
|
|
@@ -112,14 +124,8 @@ let NoteDisplayModePanel = (() => {
|
|
|
112
124
|
}
|
|
113
125
|
}
|
|
114
126
|
_DisplayModeLabel(mode) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return 'In Both';
|
|
118
|
-
case NoteDisplayMode.DocOnly:
|
|
119
|
-
return 'In Page Only';
|
|
120
|
-
case NoteDisplayMode.EdgelessOnly:
|
|
121
|
-
return 'In Edgeless Only';
|
|
122
|
-
}
|
|
127
|
+
const wording = DisplayModeWording[mode];
|
|
128
|
+
return this.std ? translateKey(this.std, ...wording) : wording[1];
|
|
123
129
|
}
|
|
124
130
|
render() {
|
|
125
131
|
this.style.setProperty('--panel-width', `${this.panelWidth}px`);
|
|
@@ -146,9 +152,18 @@ let NoteDisplayModePanel = (() => {
|
|
|
146
152
|
#panelWidth_accessor_storage = (__runInitializers(this, _onSelect_extraInitializers), __runInitializers(this, _panelWidth_initializers, 240));
|
|
147
153
|
get panelWidth() { return this.#panelWidth_accessor_storage; }
|
|
148
154
|
set panelWidth(value) { this.#panelWidth_accessor_storage = value; }
|
|
155
|
+
#std_accessor_storage = (__runInitializers(this, _panelWidth_extraInitializers), __runInitializers(this, _std_initializers, undefined));
|
|
156
|
+
/**
|
|
157
|
+
* Optional: this panel also renders from
|
|
158
|
+
* `packages/affine/fragments/outline/src/card/outline-card.ts`, outside
|
|
159
|
+
* this lot's packages, which supplies no `std`. Without one the English
|
|
160
|
+
* fallback shows, same as before this wording existed.
|
|
161
|
+
*/
|
|
162
|
+
get std() { return this.#std_accessor_storage; }
|
|
163
|
+
set std(value) { this.#std_accessor_storage = value; }
|
|
149
164
|
constructor() {
|
|
150
165
|
super(...arguments);
|
|
151
|
-
__runInitializers(this,
|
|
166
|
+
__runInitializers(this, _std_extraInitializers);
|
|
152
167
|
}
|
|
153
168
|
};
|
|
154
169
|
})();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ColorScheme } from '../../affine-model/index.js';
|
|
2
|
+
import type { BlockStdScope } from '../../std/index.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
declare const EdgelessNoteShadowPanel_base: typeof LitElement & import("../../global/utils/types.js").Constructor<import("../../global/lit/with-disposable.js").DisposableClass>;
|
|
4
5
|
export declare class EdgelessNoteShadowPanel extends EdgelessNoteShadowPanel_base {
|
|
@@ -8,5 +9,13 @@ export declare class EdgelessNoteShadowPanel extends EdgelessNoteShadowPanel_bas
|
|
|
8
9
|
accessor onSelect: (value: string) => void;
|
|
9
10
|
accessor theme: ColorScheme;
|
|
10
11
|
accessor value: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional: no renderer in this repo currently instantiates
|
|
14
|
+
* `edgeless-note-shadow-panel` (registered in `../effects.ts`, but unused
|
|
15
|
+
* elsewhere) — so there is no call site yet to thread `std` from. Without
|
|
16
|
+
* one the English fallback keeps showing, same as before this wording
|
|
17
|
+
* existed.
|
|
18
|
+
*/
|
|
19
|
+
accessor std: BlockStdScope | undefined;
|
|
11
20
|
}
|
|
12
21
|
export {};
|
|
@@ -33,11 +33,13 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
35
|
import { ColorScheme, NoteShadow } from '../../affine-model/index.js';
|
|
36
|
+
import { translateKey, } from '../../affine-shared/services/index.js';
|
|
36
37
|
import { WithDisposable } from '../../global/lit/index.js';
|
|
37
38
|
import { css, html, LitElement } from 'lit';
|
|
38
39
|
import { property } from 'lit/decorators.js';
|
|
39
40
|
import { repeat } from 'lit/directives/repeat.js';
|
|
40
41
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
42
|
+
import { GFX_NOTE_SHADOW_FLOATION, NOTE_SHADOW_BOX, NOTE_SHADOW_FILM, NOTE_SHADOW_NONE, NOTE_SHADOW_PAPER, NOTE_SHADOW_STICKER, } from '../translations.js';
|
|
41
43
|
import { NoteNoShadowIcon, NoteShadowSampleIcon } from './icons.js';
|
|
42
44
|
const SHADOWS = [
|
|
43
45
|
{
|
|
@@ -46,7 +48,7 @@ const SHADOWS = [
|
|
|
46
48
|
light: '',
|
|
47
49
|
dark: '',
|
|
48
50
|
},
|
|
49
|
-
|
|
51
|
+
tooltipWording: NOTE_SHADOW_NONE,
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
type: NoteShadow.Box,
|
|
@@ -54,7 +56,7 @@ const SHADOWS = [
|
|
|
54
56
|
light: '0px 0.2px 4.8px 0px rgba(66, 65, 73, 0.2), 0px 0px 1.6px 0px rgba(66, 65, 73, 0.2)',
|
|
55
57
|
dark: '0px 0.2px 6px 0px rgba(0, 0, 0, 0.44), 0px 0px 2px 0px rgba(0, 0, 0, 0.66)',
|
|
56
58
|
},
|
|
57
|
-
|
|
59
|
+
tooltipWording: NOTE_SHADOW_BOX,
|
|
58
60
|
},
|
|
59
61
|
{
|
|
60
62
|
type: NoteShadow.Sticker,
|
|
@@ -62,7 +64,7 @@ const SHADOWS = [
|
|
|
62
64
|
light: '0px 9.6px 10.4px -4px rgba(66, 65, 73, 0.07), 0px 10.4px 7.2px -8px rgba(66, 65, 73, 0.22)',
|
|
63
65
|
dark: '0px 9.6px 10.4px -4px rgba(0, 0, 0, 0.66), 0px 10.4px 7.2px -8px rgba(0, 0, 0, 0.44)',
|
|
64
66
|
},
|
|
65
|
-
|
|
67
|
+
tooltipWording: NOTE_SHADOW_STICKER,
|
|
66
68
|
},
|
|
67
69
|
{
|
|
68
70
|
type: NoteShadow.Paper,
|
|
@@ -70,7 +72,7 @@ const SHADOWS = [
|
|
|
70
72
|
light: '0px 0px 0px 4px rgba(255, 255, 255, 1), 0px 1.2px 2.4px 4.8px rgba(66, 65, 73, 0.16)',
|
|
71
73
|
dark: '0px 1.2px 2.4px 4.8px rgba(0, 0, 0, 0.36), 0px 0px 0px 3.4px rgba(75, 75, 75, 1)',
|
|
72
74
|
},
|
|
73
|
-
|
|
75
|
+
tooltipWording: NOTE_SHADOW_PAPER,
|
|
74
76
|
},
|
|
75
77
|
{
|
|
76
78
|
type: NoteShadow.Float,
|
|
@@ -78,7 +80,7 @@ const SHADOWS = [
|
|
|
78
80
|
light: '0px 5.2px 12px 0px rgba(66, 65, 73, 0.13), 0px 0px 0.4px 1px rgba(0, 0, 0, 0.06)',
|
|
79
81
|
dark: '0px 5.2px 12px 0px rgba(0, 0, 0, 0.66), 0px 0px 0.4px 1px rgba(0, 0, 0, 0.44)',
|
|
80
82
|
},
|
|
81
|
-
|
|
83
|
+
tooltipWording: GFX_NOTE_SHADOW_FLOATION,
|
|
82
84
|
},
|
|
83
85
|
{
|
|
84
86
|
type: NoteShadow.Film,
|
|
@@ -86,7 +88,7 @@ const SHADOWS = [
|
|
|
86
88
|
light: '0px 0px 0px 1.4px rgba(0, 0, 0, 1), 2.4px 2.4px 0px 1px rgba(0, 0, 0, 1)',
|
|
87
89
|
dark: '0px 0px 0px 1.4px rgba(178, 178, 178, 1), 2.4px 2.4px 0px 1px rgba(178, 178, 178, 1)',
|
|
88
90
|
},
|
|
89
|
-
|
|
91
|
+
tooltipWording: NOTE_SHADOW_FILM,
|
|
90
92
|
},
|
|
91
93
|
];
|
|
92
94
|
let EdgelessNoteShadowPanel = (() => {
|
|
@@ -103,6 +105,9 @@ let EdgelessNoteShadowPanel = (() => {
|
|
|
103
105
|
let _value_decorators;
|
|
104
106
|
let _value_initializers = [];
|
|
105
107
|
let _value_extraInitializers = [];
|
|
108
|
+
let _std_decorators;
|
|
109
|
+
let _std_initializers = [];
|
|
110
|
+
let _std_extraInitializers = [];
|
|
106
111
|
return class EdgelessNoteShadowPanel extends _classSuper {
|
|
107
112
|
static {
|
|
108
113
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
@@ -110,10 +115,12 @@ let EdgelessNoteShadowPanel = (() => {
|
|
|
110
115
|
_onSelect_decorators = [property({ attribute: false })];
|
|
111
116
|
_theme_decorators = [property({ attribute: false })];
|
|
112
117
|
_value_decorators = [property({ attribute: false })];
|
|
118
|
+
_std_decorators = [property({ attribute: false })];
|
|
113
119
|
__esDecorate(this, null, _background_decorators, { kind: "accessor", name: "background", static: false, private: false, access: { has: obj => "background" in obj, get: obj => obj.background, set: (obj, value) => { obj.background = value; } }, metadata: _metadata }, _background_initializers, _background_extraInitializers);
|
|
114
120
|
__esDecorate(this, null, _onSelect_decorators, { kind: "accessor", name: "onSelect", static: false, private: false, access: { has: obj => "onSelect" in obj, get: obj => obj.onSelect, set: (obj, value) => { obj.onSelect = value; } }, metadata: _metadata }, _onSelect_initializers, _onSelect_extraInitializers);
|
|
115
121
|
__esDecorate(this, null, _theme_decorators, { kind: "accessor", name: "theme", static: false, private: false, access: { has: obj => "theme" in obj, get: obj => obj.theme, set: (obj, value) => { obj.theme = value; } }, metadata: _metadata }, _theme_initializers, _theme_extraInitializers);
|
|
116
122
|
__esDecorate(this, null, _value_decorators, { kind: "accessor", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
123
|
+
__esDecorate(this, null, _std_decorators, { kind: "accessor", name: "std", static: false, private: false, access: { has: obj => "std" in obj, get: obj => obj.std, set: (obj, value) => { obj.std = value; } }, metadata: _metadata }, _std_initializers, _std_extraInitializers);
|
|
117
124
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
118
125
|
}
|
|
119
126
|
static { this.styles = css `
|
|
@@ -144,6 +151,7 @@ let EdgelessNoteShadowPanel = (() => {
|
|
|
144
151
|
}
|
|
145
152
|
`; }
|
|
146
153
|
render() {
|
|
154
|
+
const { std } = this;
|
|
147
155
|
return repeat(SHADOWS, shadow => shadow, (shadow, index) => html `<style>
|
|
148
156
|
.item-icon svg rect:first-of-type {
|
|
149
157
|
fill: ${this.background.startsWith('--')
|
|
@@ -163,7 +171,9 @@ let EdgelessNoteShadowPanel = (() => {
|
|
|
163
171
|
<edgeless-tool-icon-button
|
|
164
172
|
class="item-icon"
|
|
165
173
|
data-testid=${shadow.type.replace('--', '')}
|
|
166
|
-
.tooltip=${
|
|
174
|
+
.tooltip=${std
|
|
175
|
+
? translateKey(std, ...shadow.tooltipWording)
|
|
176
|
+
: shadow.tooltipWording[1]}
|
|
167
177
|
.tipPosition=${'bottom'}
|
|
168
178
|
.iconContainerPadding=${0}
|
|
169
179
|
style=${styleMap({
|
|
@@ -186,9 +196,19 @@ let EdgelessNoteShadowPanel = (() => {
|
|
|
186
196
|
#value_accessor_storage = (__runInitializers(this, _theme_extraInitializers), __runInitializers(this, _value_initializers, void 0));
|
|
187
197
|
get value() { return this.#value_accessor_storage; }
|
|
188
198
|
set value(value) { this.#value_accessor_storage = value; }
|
|
199
|
+
#std_accessor_storage = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _std_initializers, undefined));
|
|
200
|
+
/**
|
|
201
|
+
* Optional: no renderer in this repo currently instantiates
|
|
202
|
+
* `edgeless-note-shadow-panel` (registered in `../effects.ts`, but unused
|
|
203
|
+
* elsewhere) — so there is no call site yet to thread `std` from. Without
|
|
204
|
+
* one the English fallback keeps showing, same as before this wording
|
|
205
|
+
* existed.
|
|
206
|
+
*/
|
|
207
|
+
get std() { return this.#std_accessor_storage; }
|
|
208
|
+
set std(value) { this.#std_accessor_storage = value; }
|
|
189
209
|
constructor() {
|
|
190
210
|
super(...arguments);
|
|
191
|
-
__runInitializers(this,
|
|
211
|
+
__runInitializers(this, _std_extraInitializers);
|
|
192
212
|
}
|
|
193
213
|
};
|
|
194
214
|
})();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type ChromeWording } from '../../affine-shared/services/index.js';
|
|
1
2
|
import type { NoteChildrenFlavour } from '../../affine-shared/types/index.js';
|
|
2
3
|
import type { TemplateResult } from 'lit';
|
|
3
4
|
export declare const BUTTON_GROUP_LENGTH = 10;
|
|
4
5
|
export type NoteMenuItem = {
|
|
5
6
|
icon: TemplateResult<1>;
|
|
6
|
-
|
|
7
|
+
tooltipWording: ChromeWording;
|
|
7
8
|
childFlavour: NoteChildrenFlavour;
|
|
8
9
|
childType: string | null;
|
|
9
10
|
};
|
|
@@ -1,123 +1,92 @@
|
|
|
1
|
-
import { BulletedListIcon, CheckBoxIcon, CodeBlockIcon,
|
|
1
|
+
import { BulletedListIcon, CheckBoxIcon, CodeBlockIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, NumberedListIcon, QuoteIcon, TextIcon, } from '../../affine-components/icons/index.js';
|
|
2
|
+
import { BLOCK_NAME_BULLETED_LIST, BLOCK_NAME_CODE_BLOCK, BLOCK_NAME_HEADING_1, BLOCK_NAME_HEADING_2, BLOCK_NAME_HEADING_3, BLOCK_NAME_HEADING_4, BLOCK_NAME_HEADING_5, BLOCK_NAME_HEADING_6, BLOCK_NAME_NUMBERED_LIST, BLOCK_NAME_QUOTE, BLOCK_NAME_TEXT, BLOCK_NAME_TODO_LIST, } from '../../affine-shared/services/index.js';
|
|
2
3
|
export const BUTTON_GROUP_LENGTH = 10;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
flavour: 'affine:list',
|
|
14
|
-
type: 'numbered',
|
|
15
|
-
name: 'Numbered List',
|
|
16
|
-
description: 'A list with numbering.',
|
|
17
|
-
icon: NumberedListIcon,
|
|
18
|
-
tooltip: 'Drag/Click to insert Numbered List',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
flavour: 'affine:list',
|
|
22
|
-
type: 'todo',
|
|
23
|
-
name: 'To-do List',
|
|
24
|
-
description: 'Track tasks with a to-do list.',
|
|
25
|
-
icon: CheckBoxIcon,
|
|
26
|
-
tooltip: 'Drag/Click to insert To-do List',
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
const TEXT_ITEMS = [
|
|
4
|
+
/**
|
|
5
|
+
* The "add to note" quick-tool row's own items — text, then every heading,
|
|
6
|
+
* then the code/quote blocks, then the three list kinds. Deliberately NOT
|
|
7
|
+
* "Divider": the original menu built it and then filtered it back out
|
|
8
|
+
* (`item.name !== 'Divider'`), so it never actually reached the row; this
|
|
9
|
+
* table just never adds it, which is why there is no `BLOCK_NAME_DIVIDER`
|
|
10
|
+
* entry below.
|
|
11
|
+
*/
|
|
12
|
+
const MENU_ITEM_SOURCE = [
|
|
30
13
|
{
|
|
31
14
|
flavour: 'affine:paragraph',
|
|
32
15
|
type: 'text',
|
|
33
|
-
name: 'Text',
|
|
34
|
-
description: 'Start typing with plain text.',
|
|
35
16
|
icon: TextIcon,
|
|
36
|
-
|
|
17
|
+
wording: BLOCK_NAME_TEXT,
|
|
37
18
|
},
|
|
38
19
|
{
|
|
39
20
|
flavour: 'affine:paragraph',
|
|
40
21
|
type: 'h1',
|
|
41
|
-
name: 'Heading 1',
|
|
42
|
-
description: 'Headings in the largest font.',
|
|
43
22
|
icon: Heading1Icon,
|
|
44
|
-
|
|
23
|
+
wording: BLOCK_NAME_HEADING_1,
|
|
45
24
|
},
|
|
46
25
|
{
|
|
47
26
|
flavour: 'affine:paragraph',
|
|
48
27
|
type: 'h2',
|
|
49
|
-
name: 'Heading 2',
|
|
50
|
-
description: 'Headings in the 2nd font size.',
|
|
51
28
|
icon: Heading2Icon,
|
|
52
|
-
|
|
29
|
+
wording: BLOCK_NAME_HEADING_2,
|
|
53
30
|
},
|
|
54
31
|
{
|
|
55
32
|
flavour: 'affine:paragraph',
|
|
56
33
|
type: 'h3',
|
|
57
|
-
name: 'Heading 3',
|
|
58
|
-
description: 'Headings in the 3rd font size.',
|
|
59
34
|
icon: Heading3Icon,
|
|
60
|
-
|
|
35
|
+
wording: BLOCK_NAME_HEADING_3,
|
|
61
36
|
},
|
|
62
37
|
{
|
|
63
38
|
flavour: 'affine:paragraph',
|
|
64
39
|
type: 'h4',
|
|
65
|
-
name: 'Heading 4',
|
|
66
|
-
description: 'Heading in the 4th font size.',
|
|
67
40
|
icon: Heading4Icon,
|
|
68
|
-
|
|
41
|
+
wording: BLOCK_NAME_HEADING_4,
|
|
69
42
|
},
|
|
70
43
|
{
|
|
71
44
|
flavour: 'affine:paragraph',
|
|
72
45
|
type: 'h5',
|
|
73
|
-
name: 'Heading 5',
|
|
74
|
-
description: 'Heading in the 5th font size.',
|
|
75
46
|
icon: Heading5Icon,
|
|
76
|
-
|
|
47
|
+
wording: BLOCK_NAME_HEADING_5,
|
|
77
48
|
},
|
|
78
49
|
{
|
|
79
50
|
flavour: 'affine:paragraph',
|
|
80
51
|
type: 'h6',
|
|
81
|
-
name: 'Heading 6',
|
|
82
|
-
description: 'Heading in the 6th font size.',
|
|
83
52
|
icon: Heading6Icon,
|
|
84
|
-
|
|
53
|
+
wording: BLOCK_NAME_HEADING_6,
|
|
85
54
|
},
|
|
86
55
|
{
|
|
87
56
|
flavour: 'affine:code',
|
|
88
57
|
type: 'code',
|
|
89
|
-
name: 'Code Block',
|
|
90
|
-
description: 'Capture a code snippet.',
|
|
91
58
|
icon: CodeBlockIcon,
|
|
92
|
-
|
|
59
|
+
wording: BLOCK_NAME_CODE_BLOCK,
|
|
93
60
|
},
|
|
94
61
|
{
|
|
95
62
|
flavour: 'affine:paragraph',
|
|
96
63
|
type: 'quote',
|
|
97
|
-
name: 'Quote',
|
|
98
|
-
description: 'Capture a quote.',
|
|
99
64
|
icon: QuoteIcon,
|
|
100
|
-
|
|
65
|
+
wording: BLOCK_NAME_QUOTE,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
flavour: 'affine:list',
|
|
69
|
+
type: 'bulleted',
|
|
70
|
+
icon: BulletedListIcon,
|
|
71
|
+
wording: BLOCK_NAME_BULLETED_LIST,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
flavour: 'affine:list',
|
|
75
|
+
type: 'numbered',
|
|
76
|
+
icon: NumberedListIcon,
|
|
77
|
+
wording: BLOCK_NAME_NUMBERED_LIST,
|
|
101
78
|
},
|
|
102
79
|
{
|
|
103
|
-
flavour: 'affine:
|
|
104
|
-
type:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
icon: DividerIcon,
|
|
108
|
-
tooltip: 'A visual divider',
|
|
80
|
+
flavour: 'affine:list',
|
|
81
|
+
type: 'todo',
|
|
82
|
+
icon: CheckBoxIcon,
|
|
83
|
+
wording: BLOCK_NAME_TODO_LIST,
|
|
109
84
|
},
|
|
110
85
|
];
|
|
111
86
|
// TODO: add image, bookmark, database blocks
|
|
112
|
-
export const NOTE_MENU_ITEMS =
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
? item.tooltip.replace('Drag/Click to insert ', '')
|
|
119
|
-
: 'Text',
|
|
120
|
-
childFlavour: item.flavour,
|
|
121
|
-
childType: item.type,
|
|
122
|
-
};
|
|
123
|
-
});
|
|
87
|
+
export const NOTE_MENU_ITEMS = MENU_ITEM_SOURCE.map(item => ({
|
|
88
|
+
icon: item.icon,
|
|
89
|
+
tooltipWording: item.wording,
|
|
90
|
+
childFlavour: item.flavour,
|
|
91
|
+
childType: item.type,
|
|
92
|
+
}));
|