@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.
Files changed (308) hide show
  1. package/dist/_pkgs/affine-block-attachment/attachment-block.js +3 -3
  2. package/dist/_pkgs/affine-block-attachment/configs/toolbar.d.ts +2 -2
  3. package/dist/_pkgs/affine-block-attachment/configs/toolbar.js +9 -7
  4. package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +12 -12
  5. package/dist/_pkgs/affine-block-callout/callout-block.js +1 -1
  6. package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
  7. package/dist/_pkgs/affine-block-code/code-block.js +2 -2
  8. package/dist/_pkgs/affine-block-code/code-toolbar/config.js +9 -1
  9. package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
  10. package/dist/_pkgs/affine-block-database/data-source.js +1 -2
  11. package/dist/_pkgs/affine-block-database/database-block.js +2 -2
  12. package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
  13. package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +1 -1
  14. package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +1 -1
  15. package/dist/_pkgs/affine-block-embed/common/render-linked-doc.js +3 -3
  16. package/dist/_pkgs/affine-block-embed/configs/toolbar.js +11 -11
  17. package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
  18. package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +5 -5
  19. package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.d.ts +7 -7
  20. package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +14 -14
  21. package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +2 -2
  22. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +10 -10
  23. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +4 -4
  24. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/utils.js +1 -1
  25. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/components/embed-synced-doc-card.js +5 -4
  26. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +10 -10
  27. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +1 -1
  28. package/dist/_pkgs/affine-block-frame/frame-manager.js +3 -1
  29. package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
  30. package/dist/_pkgs/affine-block-frame/frame-toolbar.js +2 -2
  31. package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
  32. package/dist/_pkgs/affine-block-image/configs/toolbar.js +4 -4
  33. package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
  34. package/dist/_pkgs/affine-block-list/utils/forward-delete.js +1 -1
  35. package/dist/_pkgs/affine-block-note/commands/select-block.js +1 -1
  36. package/dist/_pkgs/affine-block-note/commands/select-blocks-between.js +1 -1
  37. package/dist/_pkgs/affine-block-note/configs/toolbar.js +2 -2
  38. package/dist/_pkgs/affine-block-note/move-block.js +1 -1
  39. package/dist/_pkgs/affine-block-paragraph/utils/forward-delete.js +2 -2
  40. package/dist/_pkgs/affine-block-paragraph/utils/merge-with-prev.js +1 -1
  41. package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +6 -4
  42. package/dist/_pkgs/affine-block-root/configs/toolbar.js +6 -6
  43. package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.d.ts +10 -10
  44. package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.js +4 -4
  45. package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.d.ts +7 -7
  46. package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +9 -9
  47. package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +1 -1
  48. package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +3 -1
  49. package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
  50. package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.js +1 -1
  51. package/dist/_pkgs/affine-block-surface/adapters/plain-text/element-adapter/type.js +1 -1
  52. package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +18 -3
  53. package/dist/_pkgs/affine-block-surface/element-model/index.js +12 -2
  54. package/dist/_pkgs/affine-block-surface/extensions/audit.js +23 -6
  55. package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +10 -5
  56. package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +2 -1
  57. package/dist/_pkgs/affine-block-surface/extensions/element-renderer.js +1 -1
  58. package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +1 -1
  59. package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +4 -0
  60. package/dist/_pkgs/affine-block-surface/extensions/index.js +4 -0
  61. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
  62. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +404 -0
  63. package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +323 -0
  64. package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
  65. package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +61 -61
  66. package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +248 -0
  67. package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +248 -0
  68. package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +78 -80
  69. package/dist/_pkgs/affine-block-surface/extensions/reading.js +2 -2
  70. package/dist/_pkgs/affine-block-surface/extensions/spotlight.d.ts +21 -0
  71. package/dist/_pkgs/affine-block-surface/extensions/spotlight.js +17 -3
  72. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +107 -0
  73. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +958 -0
  74. package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +809 -20
  75. package/dist/_pkgs/affine-block-surface/extensions/validation.js +1661 -50
  76. package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +50 -6
  77. package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +129 -32
  78. package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +289 -0
  79. package/dist/_pkgs/affine-block-surface/framework-background/def.js +126 -1
  80. package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +42 -2
  81. package/dist/_pkgs/affine-block-surface/framework-background/labels.js +80 -4
  82. package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +172 -11
  83. package/dist/_pkgs/affine-block-surface/index.d.ts +1 -0
  84. package/dist/_pkgs/affine-block-surface/index.js +1 -0
  85. package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.d.ts +17 -0
  86. package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +66 -0
  87. package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
  88. package/dist/_pkgs/affine-block-surface/view.js +5 -0
  89. package/dist/_pkgs/affine-block-surface-ref/configs/toolbar.js +4 -4
  90. package/dist/_pkgs/affine-block-surface-ref/portal/note.js +2 -2
  91. package/dist/_pkgs/affine-block-table/commands.js +1 -1
  92. package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
  93. package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
  94. package/dist/_pkgs/affine-components/filterable-list/styles.js +1 -1
  95. package/dist/_pkgs/affine-components/highlight-dropdown-menu/highlight-duotone-icon.js +8 -8
  96. package/dist/_pkgs/affine-components/highlight-dropdown-menu/text-duotone-icon.js +11 -11
  97. package/dist/_pkgs/affine-components/icons/text.js +426 -426
  98. package/dist/_pkgs/affine-components/open-doc-dropdown-menu/dropdown-menu.d.ts +2 -0
  99. package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
  100. package/dist/_pkgs/affine-components/resource/resource.js +2 -0
  101. package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -0
  102. package/dist/_pkgs/affine-components/toolbar/index.js +1 -0
  103. package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -1
  104. package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +55 -0
  105. package/dist/_pkgs/affine-components/toolbar/picker-menu.js +47 -0
  106. package/dist/_pkgs/affine-components/view-dropdown-menu/dropdown-menu.js +27 -14
  107. package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +2 -2
  108. package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +2 -2
  109. package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +1 -1
  110. package/dist/_pkgs/affine-fragment-outline/mobile-outline-panel.js +1 -1
  111. package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
  112. package/dist/_pkgs/affine-gfx-connector/connector-manager.js +7 -10
  113. package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +19 -1
  114. package/dist/_pkgs/affine-gfx-connector/connector-tool.js +10 -2
  115. package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
  116. package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +2 -1
  117. package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +1 -3
  118. package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +1 -1
  119. package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +1 -1
  120. package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
  121. package/dist/_pkgs/affine-gfx-mindmap/adapter/markdown/index.js +1 -1
  122. package/dist/_pkgs/affine-gfx-mindmap/adapter/utils.js +1 -1
  123. package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +583 -4
  124. package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +23 -23
  125. package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +5 -1
  126. package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +1 -1
  127. package/dist/_pkgs/affine-gfx-note/overlay/overlay.js +1 -1
  128. package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +1 -1
  129. package/dist/_pkgs/affine-gfx-shape/consts.js +1 -1
  130. package/dist/_pkgs/affine-gfx-shape/draggable/shape-draggable.js +1 -1
  131. package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/polygon.js +17 -9
  132. package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/utils.js +8 -3
  133. package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
  134. package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +1 -1
  135. package/dist/_pkgs/affine-gfx-shape/overlay/polygon-vertex-editing-overlay.js +12 -7
  136. package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +1 -1
  137. package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +4 -2
  138. package/dist/_pkgs/affine-gfx-shape/shape-tool.js +1 -1
  139. package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +1 -3
  140. package/dist/_pkgs/affine-gfx-template/builtin/other.js +66 -17
  141. package/dist/_pkgs/affine-gfx-template/toolbar/overlay-scrollbar.js +1 -1
  142. package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +1 -1
  143. package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
  144. package/dist/_pkgs/affine-inline-link/command.js +1 -1
  145. package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.d.ts +4 -4
  146. package/dist/_pkgs/affine-inline-link/link-node/configs/toolbar.js +6 -6
  147. package/dist/_pkgs/affine-inline-preset/command/format-block.js +1 -1
  148. package/dist/_pkgs/affine-inline-preset/command/format-native.js +2 -2
  149. package/dist/_pkgs/affine-inline-preset/command/format-text.js +1 -1
  150. package/dist/_pkgs/affine-inline-preset/inline-spec.js +1 -1
  151. package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.d.ts +4 -4
  152. package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +6 -6
  153. package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
  154. package/dist/_pkgs/affine-model/elements/bpmn/node.d.ts +40 -7
  155. package/dist/_pkgs/affine-model/elements/bpmn/node.js +4 -2
  156. package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +135 -17
  157. package/dist/_pkgs/affine-model/elements/bpmn/pool.js +148 -26
  158. package/dist/_pkgs/affine-model/elements/c4/board.d.ts +88 -0
  159. package/dist/_pkgs/affine-model/elements/c4/board.js +128 -0
  160. package/dist/_pkgs/affine-model/elements/c4/boundary.d.ts +63 -0
  161. package/dist/_pkgs/affine-model/elements/c4/boundary.js +134 -0
  162. package/dist/_pkgs/affine-model/elements/c4/index.d.ts +3 -0
  163. package/dist/_pkgs/affine-model/elements/c4/index.js +3 -0
  164. package/dist/_pkgs/affine-model/elements/c4/node.d.ts +97 -0
  165. package/dist/_pkgs/affine-model/elements/c4/node.js +130 -0
  166. package/dist/_pkgs/affine-model/elements/connector/connector.js +1 -1
  167. package/dist/_pkgs/affine-model/elements/context-map/context-map.d.ts +27 -0
  168. package/dist/_pkgs/affine-model/elements/context-map/context-map.js +94 -0
  169. package/dist/_pkgs/affine-model/elements/context-map/index.d.ts +1 -0
  170. package/dist/_pkgs/affine-model/elements/context-map/index.js +1 -0
  171. package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +34 -17
  172. package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +28 -26
  173. package/dist/_pkgs/affine-model/elements/cynefin/cynefin.d.ts +7 -2
  174. package/dist/_pkgs/affine-model/elements/cynefin/cynefin.js +9 -4
  175. package/dist/_pkgs/affine-model/elements/edgy/board.d.ts +7 -2
  176. package/dist/_pkgs/affine-model/elements/edgy/board.js +9 -4
  177. package/dist/_pkgs/affine-model/elements/edgy/facets.d.ts +20 -3
  178. package/dist/_pkgs/affine-model/elements/edgy/facets.js +13 -4
  179. package/dist/_pkgs/affine-model/elements/estuarine/estuarine.d.ts +7 -2
  180. package/dist/_pkgs/affine-model/elements/estuarine/estuarine.js +9 -4
  181. package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +36 -0
  182. package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +103 -0
  183. package/dist/_pkgs/affine-model/elements/event-storming/index.d.ts +1 -0
  184. package/dist/_pkgs/affine-model/elements/event-storming/index.js +1 -0
  185. package/dist/_pkgs/affine-model/elements/framework-background/background.d.ts +7 -2
  186. package/dist/_pkgs/affine-model/elements/framework-background/background.js +9 -4
  187. package/dist/_pkgs/affine-model/elements/framework-background/hit-test.d.ts +48 -0
  188. package/dist/_pkgs/affine-model/elements/framework-background/hit-test.js +55 -0
  189. package/dist/_pkgs/affine-model/elements/framework-background/index.d.ts +1 -0
  190. package/dist/_pkgs/affine-model/elements/framework-background/index.js +1 -0
  191. package/dist/_pkgs/affine-model/elements/index.d.ts +11 -0
  192. package/dist/_pkgs/affine-model/elements/index.js +3 -0
  193. package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
  194. package/dist/_pkgs/affine-shared/adapters/html/block-adapter.js +1 -1
  195. package/dist/_pkgs/affine-shared/adapters/markdown/block-adapter.js +1 -1
  196. package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +1 -1
  197. package/dist/_pkgs/affine-shared/adapters/notion-html/block-adapter.js +1 -1
  198. package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
  199. package/dist/_pkgs/affine-shared/adapters/plain-text/block-adapter.js +1 -1
  200. package/dist/_pkgs/affine-shared/adapters/plain-text/delta-converter.js +1 -1
  201. package/dist/_pkgs/affine-shared/adapters/utils/color.js +5 -2
  202. package/dist/_pkgs/affine-shared/commands/model-crud/draft-selected-models.js +1 -1
  203. package/dist/_pkgs/affine-shared/commands/selection/focus-block-end.js +1 -1
  204. package/dist/_pkgs/affine-shared/commands/selection/focus-block-start.js +1 -1
  205. package/dist/_pkgs/affine-shared/consts/index.d.ts +10 -0
  206. package/dist/_pkgs/affine-shared/consts/index.js +10 -0
  207. package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.d.ts +55 -0
  208. package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.js +35 -0
  209. package/dist/_pkgs/affine-shared/services/audit-service.d.ts +11 -0
  210. package/dist/_pkgs/affine-shared/services/command-usage-service.d.ts +31 -0
  211. package/dist/_pkgs/affine-shared/services/command-usage-service.js +109 -0
  212. package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +1 -1
  213. package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +1 -1
  214. package/dist/_pkgs/affine-shared/services/edit-props-store.d.ts +11 -0
  215. package/dist/_pkgs/affine-shared/services/edit-props-store.js +15 -0
  216. package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
  217. package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
  218. package/dist/_pkgs/affine-shared/services/index.js +2 -0
  219. package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +2 -1
  220. package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +73 -1
  221. package/dist/_pkgs/affine-shared/services/toolbar-service/action.d.ts +32 -0
  222. package/dist/_pkgs/affine-shared/services/toolbar-service/action.js +16 -0
  223. package/dist/_pkgs/affine-shared/services/toolbar-service/flags.d.ts +10 -0
  224. package/dist/_pkgs/affine-shared/services/toolbar-service/flags.js +32 -1
  225. package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +44 -0
  226. package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +161 -3
  227. package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +106 -0
  228. package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +201 -0
  229. package/dist/_pkgs/affine-shared/services/translation-service/index.d.ts +1 -0
  230. package/dist/_pkgs/affine-shared/services/translation-service/index.js +1 -0
  231. package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +5 -3
  232. package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
  233. package/dist/_pkgs/affine-shared/utils/edgeless.js +1 -1
  234. package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +34 -0
  235. package/dist/_pkgs/affine-shared/utils/file/filesys.js +48 -7
  236. package/dist/_pkgs/affine-shared/utils/zod-schema.js +1 -3
  237. package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
  238. package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +1 -1
  239. package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +1 -1
  240. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.d.ts +14 -0
  241. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.js +40 -0
  242. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +158 -0
  243. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +572 -0
  244. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.d.ts +41 -0
  245. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +49 -0
  246. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.d.ts +13 -0
  247. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.js +50 -0
  248. package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.d.ts +6 -0
  249. package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +15 -5
  250. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +2 -0
  251. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +2 -0
  252. package/dist/_pkgs/affine-widget-edgeless-toolbar/extension/index.d.ts +7 -0
  253. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
  254. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
  255. package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +19 -0
  256. package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +51 -10
  257. package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
  258. package/dist/_pkgs/affine-widget-keyboard-toolbar/config.js +2 -1
  259. package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
  260. package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-tool-panel.js +1 -1
  261. package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +1 -1
  262. package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +1 -1
  263. package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
  264. package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +1 -1
  265. package/dist/_pkgs/affine-widget-slash-menu/config.js +2 -1
  266. package/dist/_pkgs/affine-widget-toolbar/toolbar.js +11 -2
  267. package/dist/_pkgs/affine-widget-toolbar/utils.d.ts +19 -2
  268. package/dist/_pkgs/affine-widget-toolbar/utils.js +28 -9
  269. package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +11 -11
  270. package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
  271. package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +8 -12
  272. package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +52 -40
  273. package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +3 -1
  274. package/dist/_pkgs/data-view/view-presets/table/pc/group.js +3 -1
  275. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +18 -18
  276. package/dist/_pkgs/std/clipboard/utils.js +4 -1
  277. package/dist/_pkgs/std/extension/command-registry.d.ts +195 -5
  278. package/dist/_pkgs/std/extension/command-registry.js +218 -4
  279. package/dist/_pkgs/std/extension/shortcut.js +2 -1
  280. package/dist/_pkgs/std/extension/translation-manifest.d.ts +46 -1
  281. package/dist/_pkgs/std/extension/translation-manifest.js +58 -0
  282. package/dist/_pkgs/std/gfx/grid.js +1 -1
  283. package/dist/_pkgs/std/gfx/highlight.d.ts +84 -0
  284. package/dist/_pkgs/std/gfx/highlight.js +112 -0
  285. package/dist/_pkgs/std/gfx/index.d.ts +2 -1
  286. package/dist/_pkgs/std/gfx/index.js +1 -0
  287. package/dist/_pkgs/std/gfx/interactivity/gfx-view-event-handler.js +17 -3
  288. package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +160 -0
  289. package/dist/_pkgs/std/gfx/model/surface/element-model.js +75 -1
  290. package/dist/_pkgs/std/gfx/model/surface/role.js +5 -3
  291. package/dist/_pkgs/std/gfx/model/surface/surface-model.js +2 -1
  292. package/dist/_pkgs/std/gfx/selection.js +1 -1
  293. package/dist/_pkgs/std/gfx/viewport.js +1 -1
  294. package/dist/_pkgs/std/inline/extensions/inline-manager.js +1 -1
  295. package/dist/_pkgs/std/inline/extensions/markdown-matcher.js +1 -1
  296. package/dist/_pkgs/std/scope/std-scope.d.ts +2 -1
  297. package/dist/_pkgs/std/scope/std-scope.js +2 -0
  298. package/dist/_pkgs/std/utils/gfx.js +2 -0
  299. package/dist/_pkgs/store/model/store/crud.js +4 -1
  300. package/dist/commands.js +1 -1
  301. package/dist/extensions/command-usage.d.ts +23 -0
  302. package/dist/extensions/command-usage.js +37 -0
  303. package/dist/extensions/view.js +12 -0
  304. package/dist/frameworks.js +32 -0
  305. package/dist/shortcuts.d.ts +20 -6
  306. package/dist/shortcuts.js +7 -9
  307. package/dist/translations.js +98 -3
  308. package/package.json +13 -1
@@ -0,0 +1,50 @@
1
+ /** Modifier tokens as a Mac spells them. */
2
+ const MAC_SYMBOLS = {
3
+ mod: '⌘',
4
+ meta: '⌘',
5
+ cmd: '⌘',
6
+ ctrl: '⌃',
7
+ control: '⌃',
8
+ alt: '⌥',
9
+ shift: '⇧',
10
+ };
11
+ /** …and as everything else spells them. */
12
+ const OTHER_NAMES = {
13
+ mod: 'Ctrl',
14
+ meta: 'Win',
15
+ cmd: 'Win',
16
+ ctrl: 'Ctrl',
17
+ control: 'Ctrl',
18
+ alt: 'Alt',
19
+ shift: 'Shift',
20
+ };
21
+ /**
22
+ * A keystroke sequence (`ShortcutDescriptor.defaultKeys`) spelled the way the
23
+ * platform spells it: `⌘⇧Z` on a Mac, `Ctrl+Shift+Z` elsewhere, and a chord as
24
+ * its keystrokes separated by a space (`['w', 'c']` → `W C`).
25
+ *
26
+ * Symbols and `+` rather than words, because this line is NOT translated — the
27
+ * catalogue's rows carry it beside a label the host did translate, and a
28
+ * hard-coded "then" would be the one English word left in a French panel.
29
+ *
30
+ * `isMac` is a parameter rather than a read of `IS_MAC` so the spelling is
31
+ * testable on either platform from either platform.
32
+ */
33
+ export function formatChord(keys, isMac) {
34
+ const table = isMac ? MAC_SYMBOLS : OTHER_NAMES;
35
+ const part = (token) => {
36
+ const symbol = table[token.toLowerCase()];
37
+ if (symbol)
38
+ return symbol;
39
+ // A bare key: `'w'` reads as `W`; `'ArrowUp'` and `'Space'` as they are.
40
+ return token.length === 1 ? token.toUpperCase() : token;
41
+ };
42
+ return keys
43
+ .map(keystroke =>
44
+ // `-(?!$)` so a literal `-` key survives being the separator too.
45
+ keystroke
46
+ .split(/-(?!$)/)
47
+ .map(part)
48
+ .join(isMac ? '' : '+'))
49
+ .join(' ');
50
+ }
@@ -27,6 +27,12 @@ export declare class EdgelessToolbarWidget extends WidgetComponent<RootBlockMode
27
27
  private get _hiddenQuickTools();
28
28
  private get _quickTools();
29
29
  private get _quickToolsWidthTotal();
30
+ /**
31
+ * The wording shown for a senior tool. A framework declares an i18n key and
32
+ * the host catalogue answers it; `name` is the English fallback, and the only
33
+ * thing the core tools have.
34
+ */
35
+ private _seniorToolLabel;
30
36
  private get _seniorNextTooltip();
31
37
  private get _seniorPrevTooltip();
32
38
  private get _seniorScrollNextDisabled();
@@ -37,7 +37,7 @@ import { DefaultTool, EdgelessLegacySlotIdentifier, } from '../affine-block-surf
37
37
  import { popMenu, popupTargetFromElement, } from '../affine-components/context-menu/index.js';
38
38
  import { darkToolbarStyles, lightToolbarStyles, } from '../affine-components/toolbar/index.js';
39
39
  import { ColorScheme } from '../affine-model/index.js';
40
- import { EditPropsStore, ThemeProvider, } from '../affine-shared/services/index.js';
40
+ import { EditPropsStore, ThemeProvider, translateKey, } from '../affine-shared/services/index.js';
41
41
  import { stopPropagation } from '../affine-shared/utils/index.js';
42
42
  import { ArrowLeftSmallIcon, ArrowRightSmallIcon, MoreHorizontalIcon, } from '@blocksuite/icons/lit';
43
43
  import { WidgetComponent, WidgetViewExtension } from '../std/index.js';
@@ -318,17 +318,27 @@ let EdgelessToolbarWidget = (() => {
318
318
  return (this._quickTools.length * (QUICK_TOOL_SIZE + QUICK_TOOLS_GAP) -
319
319
  QUICK_TOOLS_GAP);
320
320
  }
321
+ /**
322
+ * The wording shown for a senior tool. A framework declares an i18n key and
323
+ * the host catalogue answers it; `name` is the English fallback, and the only
324
+ * thing the core tools have.
325
+ */
326
+ _seniorToolLabel(tool) {
327
+ if (!tool)
328
+ return '';
329
+ return tool.labelKey
330
+ ? translateKey(this.std, tool.labelKey, tool.name)
331
+ : tool.name;
332
+ }
321
333
  get _seniorNextTooltip() {
322
334
  if (this._seniorScrollNextDisabled)
323
335
  return '';
324
- const nextTool = this._seniorTools[this.scrollSeniorToolIndex + this.scrollSeniorToolSize];
325
- return nextTool?.name ?? '';
336
+ return this._seniorToolLabel(this._seniorTools[this.scrollSeniorToolIndex + this.scrollSeniorToolSize]);
326
337
  }
327
338
  get _seniorPrevTooltip() {
328
339
  if (this._seniorScrollPrevDisabled)
329
340
  return '';
330
- const prevTool = this._seniorTools[this.scrollSeniorToolIndex - 1];
331
- return prevTool?.name ?? '';
341
+ return this._seniorToolLabel(this._seniorTools[this.scrollSeniorToolIndex - 1]);
332
342
  }
333
343
  get _seniorScrollNextDisabled() {
334
344
  return (this.scrollSeniorToolIndex + this.scrollSeniorToolSize >=
@@ -1,5 +1,6 @@
1
1
  import { EdgelessToolIconButton } from './button/tool-icon-button.js';
2
2
  import { EdgelessToolbarButton } from './button/toolbar-button.js';
3
+ import { EdgelessArtefactCatalogueWidget } from './catalogue/artefact-catalogue-widget.js';
3
4
  import { EdgelessToolbarWidget } from './edgeless-toolbar.js';
4
5
  import { EdgelessSlideMenu } from './menu/slide-menu.js';
5
6
  import { ToolbarArrowUpIcon } from './menu/toolbar-arrow-up-icon.js';
@@ -8,6 +9,7 @@ import { EdgelessFontWeightAndStylePanel } from './panel/font-weight-and-style-p
8
9
  export declare function effects(): void;
9
10
  declare global {
10
11
  interface HTMLElementTagNameMap {
12
+ 'edgeless-artefact-catalogue-widget': EdgelessArtefactCatalogueWidget;
11
13
  'edgeless-tool-icon-button': EdgelessToolIconButton;
12
14
  'edgeless-toolbar-button': EdgelessToolbarButton;
13
15
  'edgeless-toolbar-widget': EdgelessToolbarWidget;
@@ -1,5 +1,6 @@
1
1
  import { EdgelessToolIconButton } from './button/tool-icon-button.js';
2
2
  import { EdgelessToolbarButton } from './button/toolbar-button.js';
3
+ import { EDGELESS_ARTEFACT_CATALOGUE_WIDGET, EdgelessArtefactCatalogueWidget, } from './catalogue/artefact-catalogue-widget.js';
3
4
  import { EDGELESS_TOOLBAR_WIDGET, EdgelessToolbarWidget, } from './edgeless-toolbar.js';
4
5
  import { EdgelessSlideMenu } from './menu/slide-menu.js';
5
6
  import { ToolbarArrowUpIcon } from './menu/toolbar-arrow-up-icon.js';
@@ -7,6 +8,7 @@ import { EdgelessFontFamilyPanel } from './panel/font-family-panel.js';
7
8
  import { EdgelessFontWeightAndStylePanel } from './panel/font-weight-and-style-panel.js';
8
9
  export function effects() {
9
10
  customElements.define(EDGELESS_TOOLBAR_WIDGET, EdgelessToolbarWidget);
11
+ customElements.define(EDGELESS_ARTEFACT_CATALOGUE_WIDGET, EdgelessArtefactCatalogueWidget);
10
12
  customElements.define('edgeless-toolbar-button', EdgelessToolbarButton);
11
13
  customElements.define('edgeless-tool-icon-button', EdgelessToolIconButton);
12
14
  customElements.define('edgeless-font-weight-and-style-panel', EdgelessFontWeightAndStylePanel);
@@ -18,6 +18,13 @@ export interface SeniorTool {
18
18
  * Used to show in nav-button's tooltip
19
19
  */
20
20
  name: string;
21
+ /**
22
+ * i18n key resolved through the house `TranslationProvider` seam, so a
23
+ * framework's button reads in the user's language. `name` remains the
24
+ * fallback and stays required: the core tools (note, shape, template…) have
25
+ * no framework descriptor and therefore no key to declare.
26
+ */
27
+ labelKey?: string;
21
28
  content: TemplateResult;
22
29
  enable?: boolean;
23
30
  /**
@@ -1,3 +1,7 @@
1
+ export * from './catalogue/artefact-catalogue-default.js';
2
+ export * from './catalogue/artefact-catalogue-widget.js';
3
+ export * from './catalogue/catalogue-groups.js';
4
+ export * from './catalogue/chord-format.js';
1
5
  export * from './config/index.js';
2
6
  export * from './context.js';
3
7
  export * from './create-popper.js';
@@ -1,3 +1,7 @@
1
+ export * from './catalogue/artefact-catalogue-default.js';
2
+ export * from './catalogue/artefact-catalogue-widget.js';
3
+ export * from './catalogue/catalogue-groups.js';
4
+ export * from './catalogue/chord-format.js';
1
5
  export * from './config/index.js';
2
6
  export * from './context.js';
3
7
  export * from './create-popper.js';
@@ -20,6 +20,15 @@ export declare abstract class EdgelessCommandMenu extends EdgelessCommandMenu_ba
20
20
  static styles: CSSResultGroup;
21
21
  /** Which framework's commands this popover shows. */
22
22
  protected abstract owner: CommandOwner;
23
+ /**
24
+ * The buttons, and whether the owner outgrew the fourteen slots.
25
+ *
26
+ * Recomputed per render on purpose: it opens with the popover, not with a
27
+ * frame, and the usage measure it reads is the whole point — a list cached
28
+ * across openings would show the user yesterday's ranking of what they did
29
+ * this morning.
30
+ */
31
+ private get _selection();
23
32
  get commands(): CommandDescriptor[];
24
33
  private _invoke;
25
34
  /**
@@ -33,6 +42,16 @@ export declare abstract class EdgelessCommandMenu extends EdgelessCommandMenu_ba
33
42
  * fallbacks, resolved through the host's catalogue.
34
43
  */
35
44
  private _tooltip;
45
+ /**
46
+ * The way out of a menu that no longer shows everything.
47
+ *
48
+ * It appears only past the cap, and only when something answers
49
+ * {@link ArtefactCatalogueProvider}: a button that opens nothing is a dead
50
+ * control, and the thirteen ranked slots are only defensible as a *shortcut*
51
+ * to a catalogue the user can still reach in full. Thirteen plus this one is
52
+ * fourteen — the overflowed row is exactly as wide as the cap.
53
+ */
54
+ private _renderCatalogueButton;
36
55
  render(): import("lit-html").TemplateResult<1>;
37
56
  }
38
57
  export {};
@@ -1,6 +1,7 @@
1
- import { translateKey } from '../../affine-shared/services/index.js';
2
- import { getCommandIcon, getCommandsForSurface, runCommand, } from '../../std/index.js';
3
- import { css, html, LitElement } from 'lit';
1
+ import { ArtefactCatalogueProvider, translateKey, } from '../../affine-shared/services/index.js';
2
+ import { CommandUsageIdentifier, getCommandIcon, getCommandsForSurface, runCommand, selectSeniorMenuCommands, } from '../../std/index.js';
3
+ import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
4
+ import { css, html, LitElement, nothing } from 'lit';
4
5
  import { EdgelessToolbarToolMixin } from '../mixins/tool.mixin.js';
5
6
  /**
6
7
  * The senior button sub-menu, rendered FROM the command registry.
@@ -40,8 +41,21 @@ export class EdgelessCommandMenu extends EdgelessToolbarToolMixin(LitElement) {
40
41
  height: 24px;
41
42
  }
42
43
  `; }
44
+ /**
45
+ * The buttons, and whether the owner outgrew the fourteen slots.
46
+ *
47
+ * Recomputed per render on purpose: it opens with the popover, not with a
48
+ * frame, and the usage measure it reads is the whole point — a list cached
49
+ * across openings would show the user yesterday's ranking of what they did
50
+ * this morning.
51
+ */
52
+ get _selection() {
53
+ const std = this.edgeless.std;
54
+ const usage = std.getOptional(CommandUsageIdentifier);
55
+ return selectSeniorMenuCommands(getCommandsForSurface(std, this.owner, 'senior-menu'), getCommandsForSurface(std, this.owner, 'catalogue'), id => usage?.statsOf(id));
56
+ }
43
57
  get commands() {
44
- return getCommandsForSurface(this.edgeless.std, this.owner, 'senior-menu');
58
+ return this._selection.commands;
45
59
  }
46
60
  _invoke(command) {
47
61
  // The ONE emission point: no `_track()` helper anywhere in the menus.
@@ -79,18 +93,45 @@ export class EdgelessCommandMenu extends EdgelessToolbarToolMixin(LitElement) {
79
93
  >${hint}</span
80
94
  >`;
81
95
  }
96
+ /**
97
+ * The way out of a menu that no longer shows everything.
98
+ *
99
+ * It appears only past the cap, and only when something answers
100
+ * {@link ArtefactCatalogueProvider}: a button that opens nothing is a dead
101
+ * control, and the thirteen ranked slots are only defensible as a *shortcut*
102
+ * to a catalogue the user can still reach in full. Thirteen plus this one is
103
+ * fourteen — the overflowed row is exactly as wide as the cap.
104
+ */
105
+ _renderCatalogueButton() {
106
+ const std = this.edgeless.std;
107
+ const catalogue = std.getOptional(ArtefactCatalogueProvider);
108
+ if (!catalogue)
109
+ return nothing;
110
+ const label = translateKey(std, 'com.labre.catalogue.open', 'More artefacts…');
111
+ return html `<edgeless-tool-icon-button
112
+ .tooltip=${html `${label}<span
113
+ style="display:block;max-width:220px;margin-top:2px;opacity:0.75;font-size:11px;line-height:1.35;white-space:normal"
114
+ >${translateKey(std, 'com.labre.catalogue.open.description', 'This framework offers more than the menu can show.')}</span
115
+ >`}
116
+ @click=${() => catalogue.open(this.owner)}
117
+ >
118
+ ${MoreHorizontalIcon()}
119
+ </edgeless-tool-icon-button>`;
120
+ }
82
121
  render() {
83
122
  const std = this.edgeless.std;
123
+ const { commands, overflow } = this._selection;
84
124
  return html `
85
125
  <edgeless-slide-menu>
86
126
  <div class="menu-content">
87
127
  <div class="button-group-container">
88
- ${this.commands.map(command => html `<edgeless-tool-icon-button
89
- .tooltip=${this._tooltip(command)}
90
- @click=${() => this._invoke(command)}
91
- >
92
- ${getCommandIcon(std, command.iconKey)}
93
- </edgeless-tool-icon-button>`)}
128
+ ${commands.map(command => html `<edgeless-tool-icon-button
129
+ .tooltip=${this._tooltip(command)}
130
+ @click=${() => this._invoke(command)}
131
+ >
132
+ ${getCommandIcon(std, command.iconKey)}
133
+ </edgeless-tool-icon-button>`)}
134
+ ${overflow ? this._renderCatalogueButton() : nothing}
94
135
  </div>
95
136
  </div>
96
137
  </edgeless-slide-menu>
@@ -1,4 +1,6 @@
1
1
  import { ViewExtensionProvider, } from '../affine-ext-loader/index.js';
2
+ import { artefactCatalogueDefaultExtension } from './catalogue/artefact-catalogue-default.js';
3
+ import { edgelessArtefactCatalogueWidget } from './catalogue/artefact-catalogue-widget.js';
2
4
  import { edgelessToolbarWidget } from './edgeless-toolbar.js';
3
5
  import { effects } from './effects.js';
4
6
  export class EdgelessToolbarViewExtension extends ViewExtensionProvider {
@@ -14,6 +16,13 @@ export class EdgelessToolbarViewExtension extends ViewExtensionProvider {
14
16
  super.setup(context);
15
17
  if (this.isEdgeless(context.scope)) {
16
18
  context.register(edgelessToolbarWidget);
19
+ // The artefact catalogue and the default implementation of the seam that
20
+ // opens it, side by side and unconditionally: the panel is core chrome,
21
+ // and ADR 0009's gating is carried by the frameworks — a framework whose
22
+ // flag is off never passes its owner to `open`. A host with its own
23
+ // sidebar overrides the seam and the widget then never opens.
24
+ context.register(edgelessArtefactCatalogueWidget);
25
+ context.register(artefactCatalogueDefaultExtension);
17
26
  }
18
27
  }
19
28
  }
@@ -22,6 +22,7 @@ import { assertType } from '../global/utils/index.js';
22
22
  import { AttachmentIcon, BoldIcon, BulletedListIcon, CheckBoxCheckLinearIcon, CloseIcon, CodeBlockIcon, CodeIcon, CollapseTabIcon, CopyIcon, DatabaseKanbanViewIcon, DatabaseTableViewIcon, DeleteIcon, DividerIcon, DuplicateIcon, EmbedIcon, FontIcon, FrameIcon, GithubIcon, GroupIcon, ImageIcon, ItalicIcon, LinkedPageIcon, LinkIcon, LoomLogoIcon, NewPageIcon, NowIcon, NumberedListIcon, PlusIcon, QuoteIcon, RedoIcon, RightTabIcon, StrikeThroughIcon, TeXIcon, TextIcon, TodayIcon, TomorrowIcon, UnderLineIcon, UndoIcon, YesterdayIcon, YoutubeDuotoneIcon, } from '@blocksuite/icons/lit';
23
23
  import { ConfigExtensionFactory, } from '../std/index.js';
24
24
  import { GfxControllerIdentifier } from '../std/gfx/index.js';
25
+ import { TOAST_COPIED_TO_CLIPBOARD, translateKey, } from '../affine-shared/services/index.js';
25
26
  import { computed } from '@preact/signals-core';
26
27
  import { cssVarV2 } from '@toeverything/theme/v2';
27
28
  import { FigmaDuotoneIcon, HeadingIcon, HighLightDuotoneIcon, TextBackgroundDuotoneIcon, TextColorIcon, } from './icons.js';
@@ -859,7 +860,7 @@ export const defaultKeyboardToolbarConfig = {
859
860
  .pipe(getSelectedModelsCommand)
860
861
  .with({
861
862
  onCopy: () => {
862
- toast(std.host, 'Copied to clipboard');
863
+ toast(std.host, translateKey(std, ...TOAST_COPIED_TO_CLIPBOARD));
863
864
  },
864
865
  })
865
866
  .pipe(draftSelectedModelsCommand)
@@ -19,105 +19,105 @@ export function HeadingIcon(i) {
19
19
  return Heading1Icon();
20
20
  }
21
21
  }
22
- export const HighLightDuotoneIcon = (color) => html `<svg
23
- xmlns="http://www.w3.org/2000/svg"
24
- width="24"
25
- height="24"
26
- viewBox="0 0 24 24"
27
- fill="none"
28
- >
29
- <path
30
- d="M5.8291 16.441L7.91757 18.5295L6.57811 19.8689C6.53119 19.9158 6.46406 19.9364 6.3989 19.9239L3.37036 19.3412C3.21285 19.3109 3.15331 19.1168 3.26673 19.0034L5.8291 16.441Z"
31
- fill="${color}"
32
- />
33
- <path
34
- fill-rule="evenodd"
35
- clip-rule="evenodd"
36
- d="M19.0095 3.63759C17.9526 2.58067 16.26 2.516 15.1255 3.48919L7.32135 10.1837C6.35438 11.0132 6.05275 12.3823 6.58163 13.5414L6.73501 13.8775L5.67697 14.9356C5.30169 15.3108 5.30169 15.9193 5.67697 16.2946L8.06379 18.6814C8.43907 19.0567 9.04752 19.0567 9.4228 18.6814L10.4808 17.6234L10.8171 17.7768C11.9761 18.3057 13.3452 18.0041 14.1747 17.0371L20.8692 9.23294C21.8424 8.09846 21.7778 6.40588 20.7208 5.34896L19.0095 3.63759ZM16.1021 4.62769C16.6415 4.16498 17.4463 4.19572 17.9488 4.69825L19.6602 6.40962C20.1627 6.91215 20.1935 7.7169 19.7307 8.25631L14.6424 14.188L10.1704 9.71604L16.1021 4.62769ZM9.02857 10.6955L8.29798 11.3222C7.83822 11.7166 7.6948 12.3676 7.94627 12.9187L8.29785 13.6892C8.4348 13.9893 8.37947 14.3544 8.13372 14.6001L7.11878 15.6151L8.74329 17.2396L9.75812 16.2247C10.004 15.9789 10.3691 15.9236 10.6693 16.0606L11.4398 16.4122C11.9908 16.6636 12.6418 16.5202 13.0362 16.0605L13.6629 15.3299L9.02857 10.6955Z"
37
- fill="${cssVarV2('icon/primary')}"
38
- />
22
+ export const HighLightDuotoneIcon = (color) => html `<svg
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ width="24"
25
+ height="24"
26
+ viewBox="0 0 24 24"
27
+ fill="none"
28
+ >
29
+ <path
30
+ d="M5.8291 16.441L7.91757 18.5295L6.57811 19.8689C6.53119 19.9158 6.46406 19.9364 6.3989 19.9239L3.37036 19.3412C3.21285 19.3109 3.15331 19.1168 3.26673 19.0034L5.8291 16.441Z"
31
+ fill="${color}"
32
+ />
33
+ <path
34
+ fill-rule="evenodd"
35
+ clip-rule="evenodd"
36
+ d="M19.0095 3.63759C17.9526 2.58067 16.26 2.516 15.1255 3.48919L7.32135 10.1837C6.35438 11.0132 6.05275 12.3823 6.58163 13.5414L6.73501 13.8775L5.67697 14.9356C5.30169 15.3108 5.30169 15.9193 5.67697 16.2946L8.06379 18.6814C8.43907 19.0567 9.04752 19.0567 9.4228 18.6814L10.4808 17.6234L10.8171 17.7768C11.9761 18.3057 13.3452 18.0041 14.1747 17.0371L20.8692 9.23294C21.8424 8.09846 21.7778 6.40588 20.7208 5.34896L19.0095 3.63759ZM16.1021 4.62769C16.6415 4.16498 17.4463 4.19572 17.9488 4.69825L19.6602 6.40962C20.1627 6.91215 20.1935 7.7169 19.7307 8.25631L14.6424 14.188L10.1704 9.71604L16.1021 4.62769ZM9.02857 10.6955L8.29798 11.3222C7.83822 11.7166 7.6948 12.3676 7.94627 12.9187L8.29785 13.6892C8.4348 13.9893 8.37947 14.3544 8.13372 14.6001L7.11878 15.6151L8.74329 17.2396L9.75812 16.2247C10.004 15.9789 10.3691 15.9236 10.6693 16.0606L11.4398 16.4122C11.9908 16.6636 12.6418 16.5202 13.0362 16.0605L13.6629 15.3299L9.02857 10.6955Z"
37
+ fill="${cssVarV2('icon/primary')}"
38
+ />
39
39
  </svg>`;
40
- export const TextColorIcon = (color) => html `<svg
41
- xmlns="http://www.w3.org/2000/svg"
42
- width="32"
43
- height="32"
44
- viewBox="0 0 32 32"
45
- fill="none"
46
- >
47
- <path
48
- fill-rule="evenodd"
49
- clip-rule="evenodd"
50
- d="M14.0627 6.16255C14.385 5.30291 15.2068 4.7334 16.1249 4.7334C17.043 4.7334 17.8648 5.30291 18.1872 6.16255L23.7279 20.9378C23.9219 21.455 23.6599 22.0314 23.1427 22.2253C22.6256 22.4192 22.0492 22.1572 21.8553 21.6401L20.2289 17.3031H12.021L10.3946 21.6401C10.2007 22.1572 9.62428 22.4192 9.10716 22.2253C8.59004 22.0314 8.32803 21.455 8.52195 20.9378L14.0627 6.16255ZM12.771 15.3031H19.4789L16.3146 6.8648C16.2849 6.78576 16.2094 6.7334 16.1249 6.7334C16.0405 6.7334 15.965 6.78576 15.9353 6.8648L12.771 15.3031Z"
51
- fill="${cssVarV2('icon/primary')}"
52
- />
53
- <rect
54
- x="5.45837"
55
- y="24"
56
- width="21.3333"
57
- height="3.33333"
58
- rx="1"
59
- fill=${color}
60
- />
40
+ export const TextColorIcon = (color) => html `<svg
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ width="32"
43
+ height="32"
44
+ viewBox="0 0 32 32"
45
+ fill="none"
46
+ >
47
+ <path
48
+ fill-rule="evenodd"
49
+ clip-rule="evenodd"
50
+ d="M14.0627 6.16255C14.385 5.30291 15.2068 4.7334 16.1249 4.7334C17.043 4.7334 17.8648 5.30291 18.1872 6.16255L23.7279 20.9378C23.9219 21.455 23.6599 22.0314 23.1427 22.2253C22.6256 22.4192 22.0492 22.1572 21.8553 21.6401L20.2289 17.3031H12.021L10.3946 21.6401C10.2007 22.1572 9.62428 22.4192 9.10716 22.2253C8.59004 22.0314 8.32803 21.455 8.52195 20.9378L14.0627 6.16255ZM12.771 15.3031H19.4789L16.3146 6.8648C16.2849 6.78576 16.2094 6.7334 16.1249 6.7334C16.0405 6.7334 15.965 6.78576 15.9353 6.8648L12.771 15.3031Z"
51
+ fill="${cssVarV2('icon/primary')}"
52
+ />
53
+ <rect
54
+ x="5.45837"
55
+ y="24"
56
+ width="21.3333"
57
+ height="3.33333"
58
+ rx="1"
59
+ fill=${color}
60
+ />
61
61
  </svg>`;
62
- export const TextBackgroundDuotoneIcon = (color) => html `<svg
63
- xmlns="http://www.w3.org/2000/svg"
64
- width="32"
65
- height="32"
66
- viewBox="0 0 32 32"
67
- fill="none"
68
- >
69
- <path
70
- fill-rule="evenodd"
71
- clip-rule="evenodd"
72
- d="M4.57507 7.33336C4.57507 5.60287 5.97791 4.20003 7.70841 4.20003H25.0417C26.7722 4.20003 28.1751 5.60287 28.1751 7.33336V24.6667C28.1751 26.3972 26.7722 27.8 25.0417 27.8H7.70841C5.97791 27.8 4.57507 26.3972 4.57507 24.6667V7.33336Z"
73
- fill="${color}"
74
- />
75
- <path
76
- fill-rule="evenodd"
77
- clip-rule="evenodd"
78
- d="M4.57495 7.33333C4.57495 5.60284 5.97779 4.2 7.70828 4.2H25.0416C26.7721 4.2 28.175 5.60284 28.175 7.33333V24.6667C28.175 26.3972 26.7721 27.8 25.0416 27.8H7.70828C5.97779 27.8 4.57495 26.3972 4.57495 24.6667V7.33333ZM7.70828 5.13333C6.49326 5.13333 5.50828 6.1183 5.50828 7.33333V24.6667C5.50828 25.8817 6.49326 26.8667 7.70828 26.8667H25.0416C26.2566 26.8667 27.2416 25.8817 27.2416 24.6667V7.33333C27.2416 6.1183 26.2566 5.13333 25.0416 5.13333H7.70828Z"
79
- fill="black"
80
- fill-opacity="0.22"
81
- />
82
- <path
83
- fill-rule="evenodd"
84
- clip-rule="evenodd"
85
- d="M14.5379 10.0064C14.8251 9.24064 15.5571 8.73332 16.375 8.73332C17.1928 8.73332 17.9249 9.24064 18.2121 10.0064L22.6446 21.8266C22.8386 22.3438 22.5766 22.9202 22.0594 23.1141C21.5423 23.308 20.9659 23.046 20.772 22.5289L19.5196 19.1891H13.2304L11.978 22.5289C11.7841 23.046 11.2076 23.308 10.6905 23.1141C10.1734 22.9202 9.9114 22.3438 10.1053 21.8266L14.5379 10.0064ZM13.9804 17.1891H18.7696L16.375 10.8035L13.9804 17.1891Z"
86
- fill="${cssVarV2('text/primary')}"
87
- />
62
+ export const TextBackgroundDuotoneIcon = (color) => html `<svg
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ width="32"
65
+ height="32"
66
+ viewBox="0 0 32 32"
67
+ fill="none"
68
+ >
69
+ <path
70
+ fill-rule="evenodd"
71
+ clip-rule="evenodd"
72
+ d="M4.57507 7.33336C4.57507 5.60287 5.97791 4.20003 7.70841 4.20003H25.0417C26.7722 4.20003 28.1751 5.60287 28.1751 7.33336V24.6667C28.1751 26.3972 26.7722 27.8 25.0417 27.8H7.70841C5.97791 27.8 4.57507 26.3972 4.57507 24.6667V7.33336Z"
73
+ fill="${color}"
74
+ />
75
+ <path
76
+ fill-rule="evenodd"
77
+ clip-rule="evenodd"
78
+ d="M4.57495 7.33333C4.57495 5.60284 5.97779 4.2 7.70828 4.2H25.0416C26.7721 4.2 28.175 5.60284 28.175 7.33333V24.6667C28.175 26.3972 26.7721 27.8 25.0416 27.8H7.70828C5.97779 27.8 4.57495 26.3972 4.57495 24.6667V7.33333ZM7.70828 5.13333C6.49326 5.13333 5.50828 6.1183 5.50828 7.33333V24.6667C5.50828 25.8817 6.49326 26.8667 7.70828 26.8667H25.0416C26.2566 26.8667 27.2416 25.8817 27.2416 24.6667V7.33333C27.2416 6.1183 26.2566 5.13333 25.0416 5.13333H7.70828Z"
79
+ fill="black"
80
+ fill-opacity="0.22"
81
+ />
82
+ <path
83
+ fill-rule="evenodd"
84
+ clip-rule="evenodd"
85
+ d="M14.5379 10.0064C14.8251 9.24064 15.5571 8.73332 16.375 8.73332C17.1928 8.73332 17.9249 9.24064 18.2121 10.0064L22.6446 21.8266C22.8386 22.3438 22.5766 22.9202 22.0594 23.1141C21.5423 23.308 20.9659 23.046 20.772 22.5289L19.5196 19.1891H13.2304L11.978 22.5289C11.7841 23.046 11.2076 23.308 10.6905 23.1141C10.1734 22.9202 9.9114 22.3438 10.1053 21.8266L14.5379 10.0064ZM13.9804 17.1891H18.7696L16.375 10.8035L13.9804 17.1891Z"
86
+ fill="${cssVarV2('text/primary')}"
87
+ />
88
88
  </svg>`;
89
- export const FigmaDuotoneIcon = html `<svg
90
- width="32"
91
- height="32"
92
- viewBox="0 0 24 24"
93
- fill="none"
94
- xmlns="http://www.w3.org/2000/svg"
95
- >
96
- <g id="Figma_Duotone">
97
- <path
98
- id="Vector"
99
- d="M8.41842 22.5027C10.3047 22.5027 11.8356 20.9719 11.8356 19.0856V15.6685H8.41842C6.53216 15.6685 5.00128 17.1993 5.00128 19.0856C5.00128 20.9719 6.53216 22.5027 8.41842 22.5027Z"
100
- fill="#0ACF83"
101
- />
102
- <path
103
- id="Vector_2"
104
- d="M5.00128 12.2514C5.00128 10.3651 6.53216 8.83423 8.41842 8.83423H11.8356V15.6685H8.41842C6.53216 15.6685 5.00128 14.1376 5.00128 12.2514Z"
105
- fill="#A259FF"
106
- />
107
- <path
108
- id="Vector_3"
109
- d="M5.00146 5.41714C5.00146 3.53088 6.53234 2 8.4186 2H11.8357V8.83428H8.4186C6.53234 8.83428 5.00146 7.3034 5.00146 5.41714Z"
110
- fill="#F24E1E"
111
- />
112
- <path
113
- id="Vector_4"
114
- d="M11.8356 2H15.2527C17.139 2 18.6699 3.53088 18.6699 5.41714C18.6699 7.3034 17.139 8.83428 15.2527 8.83428H11.8356V2Z"
115
- fill="#FF7262"
116
- />
117
- <path
118
- id="Vector_5"
119
- d="M18.6699 12.2514C18.6699 14.1376 17.139 15.6685 15.2527 15.6685C13.3665 15.6685 11.8356 14.1376 11.8356 12.2514C11.8356 10.3651 13.3665 8.83423 15.2527 8.83423C17.139 8.83423 18.6699 10.3651 18.6699 12.2514Z"
120
- fill="#1ABCFE"
121
- />
122
- </g>
89
+ export const FigmaDuotoneIcon = html `<svg
90
+ width="32"
91
+ height="32"
92
+ viewBox="0 0 24 24"
93
+ fill="none"
94
+ xmlns="http://www.w3.org/2000/svg"
95
+ >
96
+ <g id="Figma_Duotone">
97
+ <path
98
+ id="Vector"
99
+ d="M8.41842 22.5027C10.3047 22.5027 11.8356 20.9719 11.8356 19.0856V15.6685H8.41842C6.53216 15.6685 5.00128 17.1993 5.00128 19.0856C5.00128 20.9719 6.53216 22.5027 8.41842 22.5027Z"
100
+ fill="#0ACF83"
101
+ />
102
+ <path
103
+ id="Vector_2"
104
+ d="M5.00128 12.2514C5.00128 10.3651 6.53216 8.83423 8.41842 8.83423H11.8356V15.6685H8.41842C6.53216 15.6685 5.00128 14.1376 5.00128 12.2514Z"
105
+ fill="#A259FF"
106
+ />
107
+ <path
108
+ id="Vector_3"
109
+ d="M5.00146 5.41714C5.00146 3.53088 6.53234 2 8.4186 2H11.8357V8.83428H8.4186C6.53234 8.83428 5.00146 7.3034 5.00146 5.41714Z"
110
+ fill="#F24E1E"
111
+ />
112
+ <path
113
+ id="Vector_4"
114
+ d="M11.8356 2H15.2527C17.139 2 18.6699 3.53088 18.6699 5.41714C18.6699 7.3034 17.139 8.83428 15.2527 8.83428H11.8356V2Z"
115
+ fill="#FF7262"
116
+ />
117
+ <path
118
+ id="Vector_5"
119
+ d="M18.6699 12.2514C18.6699 14.1376 17.139 15.6685 15.2527 15.6685C13.3665 15.6685 11.8356 14.1376 11.8356 12.2514C11.8356 10.3651 13.3665 8.83423 15.2527 8.83423C17.139 8.83423 18.6699 10.3651 18.6699 12.2514Z"
120
+ fill="#1ABCFE"
121
+ />
122
+ </g>
123
123
  </svg> `;
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { SignalWatcher, WithDisposable } from '../global/lit/index.js';
36
- import { PropTypes, requiredProperties, ShadowlessElement, } from '../std/index.js';
36
+ import { PropTypes, requiredProperties, ShadowlessElement } from '../std/index.js';
37
37
  import { html, nothing } from 'lit';
38
38
  import { property } from 'lit/decorators.js';
39
39
  import { repeat } from 'lit/directives/repeat.js';
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { CloseIcon, ExportToHTMLIcon, ExportToMarkdownIcon, HelpIcon, NewIcon, NotionIcon, } from '../../affine-components/icons/index.js';
36
- import { openFilesWith, openSingleFileWith, } from '../../affine-shared/utils/index.js';
36
+ import { openFilesWith, openSingleFileWith } from '../../affine-shared/utils/index.js';
37
37
  import { WithDisposable } from '../../global/lit/index.js';
38
38
  import { html, LitElement } from 'lit';
39
39
  import { query, state } from 'lit/decorators.js';
@@ -46,7 +46,7 @@ import { property, query, queryAll, state } from 'lit/decorators.js';
46
46
  import { styleMap } from 'lit/directives/style-map.js';
47
47
  import throttle from 'lodash-es/throttle.js';
48
48
  import { linkedDocPopoverStyles } from './styles.js';
49
- import { createLinkedDocKeydownInterceptor, resolveSignal, } from './utils.js';
49
+ import { createLinkedDocKeydownInterceptor, resolveSignal } from './utils.js';
50
50
  let LinkedDocPopover = (() => {
51
51
  let _classDecorators = [requiredProperties({
52
52
  context: PropTypes.object,
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { ViewportElementProvider } from '../affine-shared/services/index.js';
36
- import { autoScroll, getScrollContainer, } from '../affine-shared/utils/index.js';
36
+ import { autoScroll, getScrollContainer } from '../affine-shared/utils/index.js';
37
37
  import { BlockComponent, BlockSelection, WidgetComponent, WidgetViewExtension, } from '../std/index.js';
38
38
  import { html, nothing } from 'lit';
39
39
  import { state } from 'lit/decorators.js';
@@ -36,7 +36,7 @@ import { AttachmentBlockModel, BookmarkBlockModel, CodeBlockModel, DatabaseBlock
36
36
  import { getSelectionRectsCommand } from '../../affine-shared/commands/index.js';
37
37
  import { EMBED_BLOCK_MODEL_LIST } from '../../affine-shared/consts/index.js';
38
38
  import { matchModels } from '../../affine-shared/utils/index.js';
39
- import { BlockSelection, TextSelection, WidgetComponent, } from '../../std/index.js';
39
+ import { BlockSelection, TextSelection, WidgetComponent } from '../../std/index.js';
40
40
  import { GfxControllerIdentifier } from '../../std/gfx/index.js';
41
41
  import { computed, effect } from '@preact/signals-core';
42
42
  import { css, html, nothing } from 'lit';
@@ -2,6 +2,7 @@ import { toast } from '../affine-components/toast/index.js';
2
2
  import { insertContent } from '../affine-rich-text/index.js';
3
3
  import { ArrowDownBigIcon, ArrowUpBigIcon, CopyIcon, DeleteIcon, DualLinkIcon, NowIcon, TodayIcon, TomorrowIcon, YesterdayIcon, } from '@blocksuite/icons/lit';
4
4
  import { Slice, Text } from '../store/index.js';
5
+ import { TOAST_COPIED_TO_CLIPBOARD, translateKey, } from '../affine-shared/services/index.js';
5
6
  import { slashMenuToolTips } from './tooltips/index.js';
6
7
  import { formatDate, formatTime } from './utils.js';
7
8
  export const defaultSlashMenuConfig = {
@@ -101,7 +102,7 @@ export const defaultSlashMenuConfig = {
101
102
  std.clipboard
102
103
  .copy(slice)
103
104
  .then(() => {
104
- toast(std.host, 'Copied to clipboard');
105
+ toast(std.host, translateKey(std, ...TOAST_COPIED_TO_CLIPBOARD));
105
106
  })
106
107
  .catch(e => {
107
108
  console.error(e);