@formicoidea/labre-core 0.32.0 → 0.34.1
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 +3 -3
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.d.ts +2 -2
- package/dist/_pkgs/affine-block-attachment/configs/toolbar.js +9 -7
- package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +12 -12
- package/dist/_pkgs/affine-block-callout/callout-block.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block.js +2 -2
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +9 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-database/data-source.js +1 -2
- package/dist/_pkgs/affine-block-database/database-block.js +2 -2
- package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +1 -1
- package/dist/_pkgs/affine-block-embed/common/render-linked-doc.js +3 -3
- package/dist/_pkgs/affine-block-embed/configs/toolbar.js +11 -11
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +5 -5
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.d.ts +7 -7
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +14 -14
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +10 -10
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +4 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/utils.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js +5 -4
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +10 -10
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-manager.js +3 -1
- package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-toolbar.js +2 -2
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
- package/dist/_pkgs/affine-block-image/configs/toolbar.js +4 -4
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
- package/dist/_pkgs/affine-block-list/utils/forward-delete.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-block.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-blocks-between.js +1 -1
- package/dist/_pkgs/affine-block-note/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-note/move-block.js +1 -1
- package/dist/_pkgs/affine-block-paragraph/utils/forward-delete.js +2 -2
- package/dist/_pkgs/affine-block-paragraph/utils/merge-with-prev.js +1 -1
- package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +6 -4
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.d.ts +10 -10
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.js +4 -4
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.d.ts +7 -7
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +9 -9
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +3 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/plain-text/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +18 -3
- package/dist/_pkgs/affine-block-surface/element-model/index.js +12 -2
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +23 -6
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +10 -5
- package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +2 -1
- package/dist/_pkgs/affine-block-surface/extensions/element-renderer.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +404 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +323 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +61 -61
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +78 -80
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.d.ts +21 -0
- package/dist/_pkgs/affine-block-surface/extensions/spotlight.js +17 -3
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +107 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +958 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +809 -20
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +1661 -50
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +50 -6
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +129 -32
- package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +289 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +126 -1
- package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +42 -2
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +80 -4
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +172 -11
- package/dist/_pkgs/affine-block-surface/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.d.ts +17 -0
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +66 -0
- package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
- package/dist/_pkgs/affine-block-surface/view.js +5 -0
- package/dist/_pkgs/affine-block-surface-ref/configs/toolbar.js +4 -4
- package/dist/_pkgs/affine-block-surface-ref/portal/note.js +2 -2
- package/dist/_pkgs/affine-block-table/commands.js +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
- package/dist/_pkgs/affine-components/filterable-list/styles.js +1 -1
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/highlight-duotone-icon.js +8 -8
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/text-duotone-icon.js +11 -11
- package/dist/_pkgs/affine-components/icons/text.js +426 -426
- package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.d.ts +2 -0
- package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
- package/dist/_pkgs/affine-components/resource/resource.js +2 -0
- package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -0
- package/dist/_pkgs/affine-components/toolbar/index.js +1 -0
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -1
- package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +55 -0
- package/dist/_pkgs/affine-components/toolbar/picker-menu.js +47 -0
- package/dist/_pkgs/affine-components/view-dropdown-menu/dropdown-menu.js +27 -14
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/mobile-outline-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +7 -10
- package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +19 -1
- package/dist/_pkgs/affine-gfx-connector/connector-tool.js +10 -2
- package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +2 -1
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +1 -3
- package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +583 -4
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +23 -23
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +5 -1
- package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-note/overlay/overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/consts.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-draggable.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/polygon.js +17 -9
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/utils.js +8 -3
- package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-vertex-editing-overlay.js +12 -7
- package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +4 -2
- package/dist/_pkgs/affine-gfx-shape/shape-tool.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +1 -3
- package/dist/_pkgs/affine-gfx-template/builtin/other.js +66 -17
- package/dist/_pkgs/affine-gfx-template/toolbar/overlay-scrollbar.js +1 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
- package/dist/_pkgs/affine-inline-link/command.js +1 -1
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.d.ts +4 -4
- package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-inline-preset/command/format-block.js +1 -1
- package/dist/_pkgs/affine-inline-preset/command/format-native.js +2 -2
- package/dist/_pkgs/affine-inline-preset/command/format-text.js +1 -1
- package/dist/_pkgs/affine-inline-preset/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.d.ts +4 -4
- package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +6 -6
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
- package/dist/_pkgs/affine-model/elements/bpmn/node.d.ts +40 -7
- package/dist/_pkgs/affine-model/elements/bpmn/node.js +4 -2
- package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +135 -17
- package/dist/_pkgs/affine-model/elements/bpmn/pool.js +148 -26
- package/dist/_pkgs/affine-model/elements/c4/board.d.ts +88 -0
- package/dist/_pkgs/affine-model/elements/c4/board.js +128 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.d.ts +63 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.js +134 -0
- package/dist/_pkgs/affine-model/elements/c4/index.d.ts +3 -0
- package/dist/_pkgs/affine-model/elements/c4/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/c4/node.d.ts +97 -0
- package/dist/_pkgs/affine-model/elements/c4/node.js +130 -0
- package/dist/_pkgs/affine-model/elements/connector/connector.js +1 -1
- package/dist/_pkgs/affine-model/elements/context-map/context-map.d.ts +27 -0
- package/dist/_pkgs/affine-model/elements/context-map/context-map.js +94 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +34 -17
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +28 -26
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/cynefin/cynefin.js +9 -4
- package/dist/_pkgs/affine-model/elements/edgy/board.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/edgy/board.js +9 -4
- package/dist/_pkgs/affine-model/elements/edgy/facets.d.ts +20 -3
- package/dist/_pkgs/affine-model/elements/edgy/facets.js +13 -4
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/estuarine/estuarine.js +9 -4
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +36 -0
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +103 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/framework-background/background.d.ts +7 -2
- package/dist/_pkgs/affine-model/elements/framework-background/background.js +9 -4
- package/dist/_pkgs/affine-model/elements/framework-background/hit-test.d.ts +48 -0
- package/dist/_pkgs/affine-model/elements/framework-background/hit-test.js +55 -0
- package/dist/_pkgs/affine-model/elements/framework-background/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/framework-background/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/index.d.ts +11 -0
- package/dist/_pkgs/affine-model/elements/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
- package/dist/_pkgs/affine-shared/adapters/html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/utils/color.js +5 -2
- package/dist/_pkgs/affine-shared/commands/model-crud/draft-selected-models.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-end.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-start.js +1 -1
- package/dist/_pkgs/affine-shared/consts/index.d.ts +10 -0
- package/dist/_pkgs/affine-shared/consts/index.js +10 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.d.ts +55 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.js +35 -0
- package/dist/_pkgs/affine-shared/services/audit-service.d.ts +11 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.d.ts +31 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.js +109 -0
- package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +1 -1
- package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +1 -1
- package/dist/_pkgs/affine-shared/services/edit-props-store.d.ts +11 -0
- package/dist/_pkgs/affine-shared/services/edit-props-store.js +15 -0
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
- package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/services/index.js +2 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +2 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +73 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.d.ts +32 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/action.js +16 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/flags.d.ts +10 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/flags.js +32 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +44 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +161 -3
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +106 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +201 -0
- package/dist/_pkgs/affine-shared/services/translation-service/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/translation-service/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +5 -3
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
- package/dist/_pkgs/affine-shared/utils/edgeless.js +1 -1
- package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +34 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.js +48 -7
- package/dist/_pkgs/affine-shared/utils/zod-schema.js +1 -3
- package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.d.ts +14 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.js +40 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +158 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +572 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.d.ts +41 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +49 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.d.ts +13 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.js +50 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.d.ts +6 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +15 -5
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/extension/index.d.ts +7 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +19 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +51 -10
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
- package/dist/_pkgs/affine-widget-keyboard-toolbar/config.js +2 -1
- package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
- package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-tool-panel.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
- package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +1 -1
- package/dist/_pkgs/affine-widget-slash-menu/config.js +2 -1
- package/dist/_pkgs/affine-widget-toolbar/toolbar.js +11 -2
- package/dist/_pkgs/affine-widget-toolbar/utils.d.ts +19 -2
- package/dist/_pkgs/affine-widget-toolbar/utils.js +28 -9
- package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +11 -11
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +8 -12
- package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +52 -40
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/group.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +18 -18
- package/dist/_pkgs/std/clipboard/utils.js +4 -1
- package/dist/_pkgs/std/extension/command-registry.d.ts +195 -5
- package/dist/_pkgs/std/extension/command-registry.js +218 -4
- package/dist/_pkgs/std/extension/shortcut.js +2 -1
- package/dist/_pkgs/std/extension/translation-manifest.d.ts +46 -1
- package/dist/_pkgs/std/extension/translation-manifest.js +58 -0
- package/dist/_pkgs/std/gfx/grid.js +1 -1
- package/dist/_pkgs/std/gfx/highlight.d.ts +84 -0
- package/dist/_pkgs/std/gfx/highlight.js +112 -0
- package/dist/_pkgs/std/gfx/index.d.ts +2 -1
- package/dist/_pkgs/std/gfx/index.js +1 -0
- package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +17 -3
- package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +160 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +75 -1
- package/dist/_pkgs/std/gfx/model/surface/role.js +5 -3
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +2 -1
- package/dist/_pkgs/std/gfx/selection.js +1 -1
- package/dist/_pkgs/std/gfx/viewport.js +1 -1
- package/dist/_pkgs/std/inline/extensions/inline-manager.js +1 -1
- package/dist/_pkgs/std/inline/extensions/markdown-matcher.js +1 -1
- package/dist/_pkgs/std/scope/std-scope.d.ts +2 -1
- package/dist/_pkgs/std/scope/std-scope.js +2 -0
- package/dist/_pkgs/std/utils/gfx.js +2 -0
- package/dist/_pkgs/store/model/store/crud.js +4 -1
- package/dist/commands.js +1 -1
- package/dist/extensions/command-usage.d.ts +23 -0
- package/dist/extensions/command-usage.js +37 -0
- package/dist/extensions/view.js +12 -0
- package/dist/frameworks.js +32 -0
- package/dist/shortcuts.d.ts +20 -6
- package/dist/shortcuts.js +7 -9
- package/dist/translations.js +98 -3
- package/package.json +13 -1
|
@@ -293,8 +293,12 @@ export class AffineToolbarWidget extends WidgetComponent {
|
|
|
293
293
|
// Chencks if block's config exists.
|
|
294
294
|
if (block) {
|
|
295
295
|
const modelFlavour = block.model.flavour;
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
// `modulesFor`, not `modules.has`: the question is whether this
|
|
297
|
+
// flavour has a row AT ALL, and since a flavour may be claimed by
|
|
298
|
+
// an owner-suffixed contributor as well as by its own key, a raw
|
|
299
|
+
// variant lookup would answer "no row" for a flavour that draws one.
|
|
300
|
+
const existed = toolbarRegistry.modulesFor(modelFlavour).length > 0 ||
|
|
301
|
+
toolbarRegistry.modulesFor(`custom:${modelFlavour}`).length > 0;
|
|
298
302
|
if (existed) {
|
|
299
303
|
flavour = modelFlavour;
|
|
300
304
|
}
|
|
@@ -487,6 +491,9 @@ export class AffineToolbarWidget extends WidgetComponent {
|
|
|
487
491
|
}));
|
|
488
492
|
disposables.add(effect(() => {
|
|
489
493
|
const value = flags.value$.value;
|
|
494
|
+
// Subscribes to forced refreshes: `flags.refresh()` keeps `value$`
|
|
495
|
+
// untouched, the revision counter is the only thing that changes.
|
|
496
|
+
void flags.revision$.value;
|
|
490
497
|
// Hides toolbar
|
|
491
498
|
if (Flag.None === value || flags.check(Flag.Hiding, value)) {
|
|
492
499
|
this.fitter.reset();
|
|
@@ -522,6 +529,8 @@ export class AffineToolbarWidget extends WidgetComponent {
|
|
|
522
529
|
abortController.abort();
|
|
523
530
|
}
|
|
524
531
|
const value = flags.value$.value;
|
|
532
|
+
// Subscribes to forced refreshes, see above.
|
|
533
|
+
void flags.revision$.value;
|
|
525
534
|
if (!context.activated)
|
|
526
535
|
return;
|
|
527
536
|
if (Flag.None === value || flags.contains(Flag.Hiding, value))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EditorToolbar } from '../affine-components/toolbar/index.js';
|
|
2
|
-
import { type ToolbarActions, type ToolbarContext, type ToolbarLayoutStep, type ToolbarPlacement } from '../affine-shared/services/index.js';
|
|
2
|
+
import { ActionPlacement, type ToolbarActions, type ToolbarContext, type ToolbarLayoutStep, type ToolbarPlacement } from '../affine-shared/services/index.js';
|
|
3
3
|
import type { AutoUpdateOptions, ReferenceElement, SideObject } from '@floating-ui/dom';
|
|
4
4
|
export declare const sideMap: Map<string, {
|
|
5
5
|
top: number;
|
|
@@ -15,7 +15,24 @@ export declare function autoUpdatePosition(signal: AbortSignal, toolbar: EditorT
|
|
|
15
15
|
* scroll, resize and flip.
|
|
16
16
|
*/
|
|
17
17
|
onAvailableWidth?: () => void): () => void;
|
|
18
|
-
export declare function combine(actions: ToolbarActions, context: ToolbarContext):
|
|
18
|
+
export declare function combine(actions: ToolbarActions, context: ToolbarContext): {
|
|
19
|
+
placement: ActionPlacement;
|
|
20
|
+
id: string;
|
|
21
|
+
score?: number;
|
|
22
|
+
when?: ((cx: ToolbarContext) => boolean) | boolean;
|
|
23
|
+
active?: ((cx: ToolbarContext) => boolean) | boolean;
|
|
24
|
+
priority?: number;
|
|
25
|
+
label?: string;
|
|
26
|
+
labelWording?: import("../affine-shared/services/index.js").ChromeWording;
|
|
27
|
+
showLabel?: boolean;
|
|
28
|
+
icon?: import("lit-html").TemplateResult;
|
|
29
|
+
tooltip?: string | import("lit-html").TemplateResult;
|
|
30
|
+
tooltipWording?: import("../affine-shared/services/index.js").ChromeWording;
|
|
31
|
+
variant?: "destructive";
|
|
32
|
+
disabled?: ((cx: ToolbarContext) => boolean) | boolean;
|
|
33
|
+
content?: ((cx: ToolbarContext) => import("lit-html").TemplateResult | null) | (import("lit-html").TemplateResult | null);
|
|
34
|
+
run?: (cx: ToolbarContext) => void;
|
|
35
|
+
}[];
|
|
19
36
|
/**
|
|
20
37
|
* How much of the row an entry has given up, decided by {@link ToolbarFitter}
|
|
21
38
|
* and re-applied by every render until the room changes again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renderToolbarSeparator, } from '../affine-components/toolbar/index.js';
|
|
2
|
-
import { ActionPlacement, planToolbarLayout, TOOLBAR_SETTLE_DELAY, toolbarDegradationSteps, toolbarRoomChanged, } from '../affine-shared/services/index.js';
|
|
2
|
+
import { ActionPlacement, planToolbarLayout, TOOLBAR_MORE, TOOLBAR_SETTLE_DELAY, toolbarDegradationSteps, toolbarRoomChanged, translateKey, } from '../affine-shared/services/index.js';
|
|
3
3
|
import { nextTick } from '../global/utils/index.js';
|
|
4
4
|
import { GfxControllerIdentifier } from '../std/gfx/index.js';
|
|
5
5
|
import { MoreVerticalIcon } from '@blocksuite/icons/lit';
|
|
@@ -144,10 +144,22 @@ export function combine(actions, context) {
|
|
|
144
144
|
};
|
|
145
145
|
if ('generate' in action && typeof action.generate === 'function') {
|
|
146
146
|
// TODO(@fundon): should delete `generate` fn
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
Object.assign(newAction, action.generate(context));
|
|
148
|
+
}
|
|
149
|
+
// The i18n seam, applied HERE and only here: every path that draws an
|
|
150
|
+
// entry — the row, a group's children, the "⋮" — goes through `combine`
|
|
151
|
+
// first, and the row's own signature (`renderToolbar`) reads the resolved
|
|
152
|
+
// `label` a few lines later, so an entry that changes language is a row
|
|
153
|
+
// that is re-planned rather than one drawn at the wrong width.
|
|
154
|
+
//
|
|
155
|
+
// A declared wording WINS over a static `label` / `tooltip` left beside it:
|
|
156
|
+
// the static one is the English default and is already the wording's own
|
|
157
|
+
// fallback, so the two can never disagree.
|
|
158
|
+
if (newAction.labelWording) {
|
|
159
|
+
newAction.label = translateKey(context.std, ...newAction.labelWording);
|
|
160
|
+
}
|
|
161
|
+
if (newAction.tooltipWording) {
|
|
162
|
+
newAction.tooltip = translateKey(context.std, ...newAction.tooltipWording);
|
|
151
163
|
}
|
|
152
164
|
return newAction;
|
|
153
165
|
});
|
|
@@ -364,8 +376,12 @@ export function renderToolbar(toolbar, context, flavour, source = () => emptyToo
|
|
|
364
376
|
'custom:affine:*',
|
|
365
377
|
]
|
|
366
378
|
.flat()
|
|
367
|
-
|
|
368
|
-
|
|
379
|
+
// Every module of each key, not just one: a flavour may be shared by
|
|
380
|
+
// several contributors (`custom:affine:surface:group` carries Wardley's
|
|
381
|
+
// qualification dropdown AND C4's morph), and they are told apart by the
|
|
382
|
+
// owner suffix on their DI variant — see `toolbarModuleKey`.
|
|
383
|
+
.map(key => toolbarRegistry.modulesFor(key))
|
|
384
|
+
.flat()
|
|
369
385
|
.filter(module => typeof module.config.when === 'function'
|
|
370
386
|
? module.config.when(context)
|
|
371
387
|
: (module.config.when ?? true))
|
|
@@ -430,6 +446,9 @@ export function renderToolbar(toolbar, context, flavour, source = () => emptyToo
|
|
|
430
446
|
if (moreMenuItems.length) {
|
|
431
447
|
const key = `${context.getCurrentModel()?.id}`;
|
|
432
448
|
hasMenu = true;
|
|
449
|
+
// The one word the WIDGET says on its own account, so it is the one
|
|
450
|
+
// wording no entry can declare for it (#183).
|
|
451
|
+
const moreLabel = translateKey(context.std, ...TOOLBAR_MORE);
|
|
433
452
|
primary.push({
|
|
434
453
|
kind: 'template',
|
|
435
454
|
// Not an entry of the row's signature: the "⋮" is DERIVED from the
|
|
@@ -441,8 +460,8 @@ export function renderToolbar(toolbar, context, flavour, source = () => emptyToo
|
|
|
441
460
|
.contentPadding="${'8px'}"
|
|
442
461
|
.button=${html `
|
|
443
462
|
<editor-icon-button
|
|
444
|
-
aria-label
|
|
445
|
-
.tooltip="${
|
|
463
|
+
aria-label=${moreLabel}
|
|
464
|
+
.tooltip="${moreLabel}"
|
|
446
465
|
.iconContainerPadding=${innerToolbar ? 4 : 2}
|
|
447
466
|
.iconSize=${innerToolbar ? '16px' : undefined}
|
|
448
467
|
>
|
|
@@ -2,21 +2,21 @@ import { CheckBoxCheckSolidIcon, CheckBoxUnIcon } from '@blocksuite/icons/lit';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { BaseGroup } from './base.js';
|
|
4
4
|
export class BooleanGroupView extends BaseGroup {
|
|
5
|
-
static { this.styles = css `
|
|
6
|
-
.data-view-group-title-boolean-view {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
.data-view-group-title-boolean-view svg {
|
|
11
|
-
width: 20px;
|
|
12
|
-
height: 20px;
|
|
13
|
-
}
|
|
5
|
+
static { this.styles = css `
|
|
6
|
+
.data-view-group-title-boolean-view {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
.data-view-group-title-boolean-view svg {
|
|
11
|
+
width: 20px;
|
|
12
|
+
height: 20px;
|
|
13
|
+
}
|
|
14
14
|
`; }
|
|
15
15
|
render() {
|
|
16
|
-
return html ` <div class="data-view-group-title-boolean-view">
|
|
16
|
+
return html ` <div class="data-view-group-title-boolean-view">
|
|
17
17
|
${this.value
|
|
18
18
|
? CheckBoxCheckSolidIcon({ style: `color:#1E96EB` })
|
|
19
|
-
: CheckBoxUnIcon()}
|
|
19
|
+
: CheckBoxUnIcon()}
|
|
20
20
|
</div>`;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { ArrowLeftBigIcon } from '@blocksuite/icons/lit';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
export const menuTitle = (name, onBack) => {
|
|
4
|
-
return html `
|
|
5
|
-
<div
|
|
6
|
-
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
@click=${onBack}
|
|
10
|
-
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
-
style="display:flex;"
|
|
12
|
-
>
|
|
13
|
-
${ArrowLeftBigIcon()}
|
|
14
|
-
</div>
|
|
15
|
-
<div
|
|
16
|
-
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
-
>
|
|
18
|
-
${name}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
4
|
+
return html `
|
|
5
|
+
<div
|
|
6
|
+
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
@click=${onBack}
|
|
10
|
+
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
+
style="display:flex;"
|
|
12
|
+
>
|
|
13
|
+
${ArrowLeftBigIcon()}
|
|
14
|
+
</div>
|
|
15
|
+
<div
|
|
16
|
+
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
+
>
|
|
18
|
+
${name}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
21
|
`;
|
|
22
22
|
};
|
|
@@ -44,21 +44,17 @@ export const openCalendarEntry = (root, view, entry, target, options) => {
|
|
|
44
44
|
</div>
|
|
45
45
|
${entry.location
|
|
46
46
|
? html `<div class="calendar-event-popover-row">
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<span>${entry.location}</span>
|
|
51
|
-
</div>`
|
|
47
|
+
<span class="calendar-event-popover-icon">${PinIcon()}</span>
|
|
48
|
+
<span>${entry.location}</span>
|
|
49
|
+
</div>`
|
|
52
50
|
: ''}
|
|
53
51
|
${entry.description
|
|
54
52
|
? html `<div class="calendar-event-popover-row">
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
>
|
|
61
|
-
</div>`
|
|
53
|
+
<span class="calendar-event-popover-icon">${TextIcon()}</span>
|
|
54
|
+
<span class="calendar-event-popover-description"
|
|
55
|
+
>${entry.description}</span
|
|
56
|
+
>
|
|
57
|
+
</div>`
|
|
62
58
|
: ''}
|
|
63
59
|
</div>
|
|
64
60
|
`,
|
|
@@ -532,7 +532,10 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
532
532
|
return html `
|
|
533
533
|
<div
|
|
534
534
|
${ref(element => this.logic.bindEntryDraggable(dndKey, entry, element))}
|
|
535
|
-
class="calendar-entry ${entry.kind} ${segmentClass} ${this.logic
|
|
535
|
+
class="calendar-entry ${entry.kind} ${segmentClass} ${this.logic
|
|
536
|
+
.selectedEntryId === entry.id
|
|
537
|
+
? 'selected'
|
|
538
|
+
: ''}"
|
|
536
539
|
role="button"
|
|
537
540
|
tabindex="0"
|
|
538
541
|
aria-label=${entry.title || 'Untitled'}
|
|
@@ -546,23 +549,23 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
546
549
|
>
|
|
547
550
|
${showLeftHandle
|
|
548
551
|
? html `<span
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
+
class="calendar-resize-handle left"
|
|
553
|
+
@pointerdown=${(event) => this.logic.startResize(entry, 'start', event)}
|
|
554
|
+
></span>`
|
|
552
555
|
: nothing}
|
|
553
556
|
${this.renderEntryTitle(entry)}
|
|
554
557
|
${entry.kind === 'row' && entry.cardProperties.length
|
|
555
558
|
? html `<span class="calendar-entry-properties">
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
559
|
+
${entry.cardProperties.map(property => html `<span class="calendar-entry-property"
|
|
560
|
+
>${property.value}</span
|
|
561
|
+
>`)}
|
|
562
|
+
</span>`
|
|
560
563
|
: nothing}
|
|
561
564
|
${showRightHandle
|
|
562
565
|
? html `<span
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
+
class="calendar-resize-handle right"
|
|
567
|
+
@pointerdown=${(event) => this.logic.startResize(entry, 'end', event)}
|
|
568
|
+
></span>`
|
|
566
569
|
: nothing}
|
|
567
570
|
</div>
|
|
568
571
|
`;
|
|
@@ -577,13 +580,15 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
577
580
|
if (entry.titleSegments?.length) {
|
|
578
581
|
return html `<span class="calendar-entry-title title-segments">
|
|
579
582
|
${entry.titleSegments.map(segment => html `<span
|
|
580
|
-
class="calendar-entry-title-segment ${segment.linkedDoc
|
|
583
|
+
class="calendar-entry-title-segment ${segment.linkedDoc
|
|
584
|
+
? 'linked-doc-segment'
|
|
585
|
+
: ''}"
|
|
581
586
|
>
|
|
582
587
|
${segment.linkedDoc ? LinkedPageIcon() : nothing}
|
|
583
588
|
${segment.text
|
|
584
589
|
? html `<span class="calendar-entry-title-text"
|
|
585
|
-
|
|
586
|
-
|
|
590
|
+
>${segment.text}</span
|
|
591
|
+
>`
|
|
587
592
|
: nothing}
|
|
588
593
|
</span>`)}
|
|
589
594
|
</span>`;
|
|
@@ -667,8 +672,11 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
667
672
|
if (!preview)
|
|
668
673
|
return nothing;
|
|
669
674
|
return html `<div
|
|
670
|
-
class="calendar-entry-preview ${preview.continuesLeft
|
|
671
|
-
|
|
675
|
+
class="calendar-entry-preview ${preview.continuesLeft
|
|
676
|
+
? 'continues-left'
|
|
677
|
+
: ''} ${preview.continuesRight ? 'continues-right' : ''}"
|
|
678
|
+
style="grid-column:${preview.sIdx +
|
|
679
|
+
1} / span ${preview.span};grid-row:${preview.slot + 1};"
|
|
672
680
|
>
|
|
673
681
|
${preview.title}
|
|
674
682
|
</div>`;
|
|
@@ -688,11 +696,11 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
688
696
|
${this.logic.view.readonly$.value
|
|
689
697
|
? nothing
|
|
690
698
|
: html `<button
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
699
|
+
class="calendar-empty-month-hint-action"
|
|
700
|
+
@click=${() => this.logic.createRowOnDate(getDefaultCreateDate(this.logic.currentMonth))}
|
|
701
|
+
>
|
|
702
|
+
${PlusIcon()}<span>New row</span>
|
|
703
|
+
</button>`}
|
|
696
704
|
<button
|
|
697
705
|
class="calendar-empty-month-hint-close"
|
|
698
706
|
aria-label="Dismiss"
|
|
@@ -727,11 +735,11 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
727
735
|
${this.logic.isCurrentMonth()
|
|
728
736
|
? nothing
|
|
729
737
|
: html `<button
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
738
|
+
class="calendar-today-button"
|
|
739
|
+
@click=${() => this.logic.goToday()}
|
|
740
|
+
>
|
|
741
|
+
<span>Today</span>
|
|
742
|
+
</button>`}
|
|
735
743
|
<button
|
|
736
744
|
class="calendar-icon-button"
|
|
737
745
|
aria-label="Previous month"
|
|
@@ -769,7 +777,11 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
769
777
|
return html `
|
|
770
778
|
<div
|
|
771
779
|
data-date=${day.date}
|
|
772
|
-
class="calendar-day ${day.inMonth
|
|
780
|
+
class="calendar-day ${day.inMonth
|
|
781
|
+
? ''
|
|
782
|
+
: 'is-outside'} ${day.date === today
|
|
783
|
+
? 'is-today'
|
|
784
|
+
: ''} ${this.logic.isDayInPreview(day.date)
|
|
773
785
|
? 'is-drop-target'
|
|
774
786
|
: ''}"
|
|
775
787
|
style="--calendar-segment-slots:${getCalendarDaySegmentSlots(day, movingEntryId)};"
|
|
@@ -786,13 +798,13 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
786
798
|
</div>
|
|
787
799
|
${canReserveNewRow
|
|
788
800
|
? html `<button
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
801
|
+
class="calendar-new-row"
|
|
802
|
+
aria-label="+ New row"
|
|
803
|
+
?disabled=${this.logic.isInteracting}
|
|
804
|
+
@click=${() => this.logic.createRowOnDate(day.date)}
|
|
805
|
+
>
|
|
806
|
+
${PlusIcon()}<span>New row</span>
|
|
807
|
+
</button>`
|
|
796
808
|
: nothing}
|
|
797
809
|
</div>
|
|
798
810
|
`;
|
|
@@ -824,12 +836,12 @@ export class CalendarViewUI extends DataViewUIBase {
|
|
|
824
836
|
</div>
|
|
825
837
|
${setup
|
|
826
838
|
? html `<div class="calendar-setup">
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
839
|
+
<button
|
|
840
|
+
@click=${(event) => this.logic.openSetupMenu(event.currentTarget)}
|
|
841
|
+
>
|
|
842
|
+
${TodayIcon()}<span>Select or create date property</span>
|
|
843
|
+
</button>
|
|
844
|
+
</div>`
|
|
833
845
|
: nothing}
|
|
834
846
|
</div>
|
|
835
847
|
`;
|
|
@@ -246,7 +246,9 @@ let MobileTableGroup = (() => {
|
|
|
246
246
|
class="group-toggle-btn"
|
|
247
247
|
role="button"
|
|
248
248
|
aria-expanded=${this.collapsed$.value ? 'false' : 'true'}
|
|
249
|
-
aria-label=${this.collapsed$.value
|
|
249
|
+
aria-label=${this.collapsed$.value
|
|
250
|
+
? 'Expand group'
|
|
251
|
+
: 'Collapse group'}
|
|
250
252
|
tabindex="0"
|
|
251
253
|
@click=${this._toggleCollapse}
|
|
252
254
|
@keydown=${(e) => {
|
|
@@ -303,7 +303,9 @@ let TableGroup = (() => {
|
|
|
303
303
|
class="group-toggle-btn"
|
|
304
304
|
role="button"
|
|
305
305
|
aria-expanded=${this.collapsed$.value ? 'false' : 'true'}
|
|
306
|
-
aria-label=${this.collapsed$.value
|
|
306
|
+
aria-label=${this.collapsed$.value
|
|
307
|
+
? 'Expand group'
|
|
308
|
+
: 'Collapse group'}
|
|
307
309
|
tabindex="0"
|
|
308
310
|
@click=${this._toggleCollapse}
|
|
309
311
|
@keydown=${(e) => {
|
|
@@ -19,9 +19,9 @@ export const GroupTitle = (groupData, ops) => {
|
|
|
19
19
|
}
|
|
20
20
|
const icon = groupData.value == null
|
|
21
21
|
? ''
|
|
22
|
-
: html ` <uni-lit
|
|
23
|
-
class="${groupHeaderIcon}"
|
|
24
|
-
.uni="${groupData.property.icon}"
|
|
22
|
+
: html ` <uni-lit
|
|
23
|
+
class="${groupHeaderIcon}"
|
|
24
|
+
.uni="${groupData.property.icon}"
|
|
25
25
|
></uni-lit>`;
|
|
26
26
|
const props = {
|
|
27
27
|
group: groupData,
|
|
@@ -29,25 +29,25 @@ export const GroupTitle = (groupData, ops) => {
|
|
|
29
29
|
};
|
|
30
30
|
const showColumnName = groupData.property.type$.value === 'checkbox';
|
|
31
31
|
const columnName = showColumnName
|
|
32
|
-
? html `<span class="${groupHeaderTitle}"
|
|
33
|
-
>${groupData.property.name$.value}</span
|
|
32
|
+
? html `<span class="${groupHeaderTitle}"
|
|
33
|
+
>${groupData.property.name$.value}</span
|
|
34
34
|
>`
|
|
35
35
|
: nothing;
|
|
36
36
|
const opsClass = clsx(ops.groupHover && show, groupHeaderOps);
|
|
37
|
-
return html `
|
|
38
|
-
<div class="${groupTitleRow}">
|
|
39
|
-
${icon} ${renderUniLit(view, props)} ${columnName}
|
|
40
|
-
${GroupHeaderCount(groupData)}
|
|
41
|
-
</div>
|
|
37
|
+
return html `
|
|
38
|
+
<div class="${groupTitleRow}">
|
|
39
|
+
${icon} ${renderUniLit(view, props)} ${columnName}
|
|
40
|
+
${GroupHeaderCount(groupData)}
|
|
41
|
+
</div>
|
|
42
42
|
${!ops.readonly
|
|
43
|
-
? html ` <div class="${opsClass}">
|
|
44
|
-
<div @click="${ops.clickAdd}" class="${groupHeaderOp}">
|
|
45
|
-
${PlusIcon()}
|
|
46
|
-
</div>
|
|
47
|
-
<div @click="${ops.clickOps}" class="${groupHeaderOp}">
|
|
48
|
-
${MoreHorizontalIcon()}
|
|
49
|
-
</div>
|
|
43
|
+
? html ` <div class="${opsClass}">
|
|
44
|
+
<div @click="${ops.clickAdd}" class="${groupHeaderOp}">
|
|
45
|
+
${PlusIcon()}
|
|
46
|
+
</div>
|
|
47
|
+
<div @click="${ops.clickOps}" class="${groupHeaderOp}">
|
|
48
|
+
${MoreHorizontalIcon()}
|
|
49
|
+
</div>
|
|
50
50
|
</div>`
|
|
51
|
-
: nothing}
|
|
51
|
+
: nothing}
|
|
52
52
|
`;
|
|
53
53
|
};
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* Used to embed plain text in the clipboard snapshot wrapper.
|
|
4
4
|
*/
|
|
5
5
|
export function escapeHTML(value) {
|
|
6
|
-
return value
|
|
6
|
+
return value
|
|
7
|
+
.replace(/&/g, '&')
|
|
8
|
+
.replace(/</g, '<')
|
|
9
|
+
.replace(/>/g, '>');
|
|
7
10
|
}
|
|
8
11
|
export function onlyContainImgElement(ast) {
|
|
9
12
|
if (ast.type === 'element') {
|