@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
@@ -79,6 +79,27 @@ const FileTypes = [
79
79
  },
80
80
  ];
81
81
  export async function openFilesWith(acceptType = 'Any', multiple = true) {
82
+ if (acceptType === 'Any')
83
+ return openFilesWithSpec(undefined, multiple);
84
+ const fileType = FileTypes.find(i => i.description === acceptType);
85
+ if (!fileType) {
86
+ // Unreachable through the closed `AcceptTypes` union, and reported rather
87
+ // than thrown for the same reason it always was: the picker branch used to
88
+ // throw this inside its own try/catch, log it and answer `null`. A caller
89
+ // asking for a filter that does not exist gets no dialog, not an exception
90
+ // it never had to handle.
91
+ console.error(new BlockSuiteError(ErrorCode.DefaultRuntimeError, `Unexpected acceptType "${acceptType}"`));
92
+ return null;
93
+ }
94
+ return openFilesWithSpec(fileType, multiple);
95
+ }
96
+ /**
97
+ * The picker itself, over a filter rather than over a name in the table.
98
+ *
99
+ * `undefined` is "Any": no filter at all, which is what the dialog shows when
100
+ * nobody narrowed it.
101
+ */
102
+ async function openFilesWithSpec(spec, multiple) {
82
103
  // Feature detection. The API needs to be supported
83
104
  // and the app not run in an iframe.
84
105
  const supportsFileSystemAccess = 'showOpenFilePicker' in window &&
@@ -93,11 +114,8 @@ export async function openFilesWith(acceptType = 'Any', multiple = true) {
93
114
  // If the File System Access API is supported…
94
115
  if (supportsFileSystemAccess && window.showOpenFilePicker) {
95
116
  try {
96
- const fileType = FileTypes.find(i => i.description === acceptType);
97
- if (acceptType !== 'Any' && !fileType)
98
- throw new BlockSuiteError(ErrorCode.DefaultRuntimeError, `Unexpected acceptType "${acceptType}"`);
99
117
  const pickerOpts = {
100
- types: fileType ? [fileType] : undefined,
118
+ types: spec ? [spec] : undefined,
101
119
  multiple,
102
120
  };
103
121
  // Show the file picker, optionally allowing multiple files.
@@ -117,9 +135,19 @@ export async function openFilesWith(acceptType = 'Any', multiple = true) {
117
135
  input.style.display = 'none';
118
136
  input.type = 'file';
119
137
  input.multiple = multiple;
120
- if (acceptType !== 'Any') {
121
- // For example, `accept="image/*"` or `accept="video/*,audio/*"`.
122
- input.accept = Object.keys(FileTypes.find(i => i.description === acceptType)?.accept ?? '').join(',');
138
+ if (spec) {
139
+ // For example, `accept="image/*,.png,.jpg"` or `accept="video/*,.mp4"`.
140
+ //
141
+ // The EXTENSIONS as well as the MIME types, and the extensions are the
142
+ // half that matters for anything the OS has no type for: `.bpmn`, `.mm`
143
+ // and `.opml` are registered nowhere, so a filter built from
144
+ // `application/xml` alone greys them out in the native dialog and the
145
+ // file cannot be picked at all. This is the branch every browser without
146
+ // the File System Access API takes — Firefox and Safari — and
147
+ // `showOpenFilePicker` above already reads both halves of the same
148
+ // filter.
149
+ const type = spec.accept;
150
+ input.accept = [...Object.keys(type), ...Object.values(type).flat()].join(',');
123
151
  }
124
152
  document.body.append(input);
125
153
  // The `change` event fires when the user interacts with the dialog.
@@ -143,6 +171,19 @@ export async function openSingleFileWith(acceptType) {
143
171
  const files = await openFilesWith(acceptType, false);
144
172
  return files?.at(0) ?? null;
145
173
  }
174
+ /**
175
+ * One file, filtered by a spec the caller built rather than by a name in
176
+ * {@link FileTypes}.
177
+ *
178
+ * What {@link openSingleFileWith} is for the editor's own dialogs, this is for
179
+ * anything whose filter is DECLARED somewhere else — today the interchange
180
+ * registry, whose formats each carry their extensions and their mime and are
181
+ * added by a framework, not by editing the table above.
182
+ */
183
+ export async function openSingleFileWithSpec(spec) {
184
+ const files = await openFilesWithSpec(spec, false);
185
+ return files?.at(0) ?? null;
186
+ }
146
187
  export async function getImageFilesFromLocal() {
147
188
  const files = await openFilesWith('Images');
148
189
  return files ?? [];
@@ -187,7 +187,5 @@ export function pickStylePropsForKey(key, props) {
187
187
  picked[prop] = parsed.data;
188
188
  }
189
189
  }
190
- return Object.keys(picked).length
191
- ? picked
192
- : null;
190
+ return Object.keys(picked).length ? picked : null;
193
191
  }
@@ -4,7 +4,7 @@ import { ParagraphBlockComponent } from '../affine-block-paragraph/index.js';
4
4
  import { DatabaseBlockModel, ListBlockModel, ParagraphBlockModel, } from '../affine-model/index.js';
5
5
  import { DocModeProvider } from '../affine-shared/services/index.js';
6
6
  import { calcDropTarget, findClosestBlockComponent, getBlockProps, getClosestBlockComponentByPoint, matchModels, } from '../affine-shared/utils/index.js';
7
- import { Bound, Point, Rect, } from '../global/gfx/index.js';
7
+ import { Bound, Point, Rect } from '../global/gfx/index.js';
8
8
  import { DRAG_HANDLE_CONTAINER_HEIGHT, DRAG_HANDLE_CONTAINER_OFFSET_LEFT, DRAG_HANDLE_CONTAINER_OFFSET_LEFT_LIST, EDGELESS_NOTE_EXTRA_PADDING, NOTE_CONTAINER_PADDING, } from './config.js';
9
9
  const heightMap = {
10
10
  text: 23,
@@ -40,7 +40,7 @@ import { matchModels, stopPropagation } from '../affine-shared/utils/index.js';
40
40
  import { Bound } from '../global/gfx/index.js';
41
41
  import { ArrowLeftSmallIcon, ArrowRightSmallIcon, InvisibleIcon, } from '@blocksuite/icons/lit';
42
42
  import { WidgetComponent, WidgetViewExtension } from '../std/index.js';
43
- import { GfxControllerIdentifier, } from '../std/gfx/index.js';
43
+ import { GfxControllerIdentifier } from '../std/gfx/index.js';
44
44
  import { css, html, nothing } from 'lit';
45
45
  import { state } from 'lit/decorators.js';
46
46
  import { repeat } from 'lit/directives/repeat.js';
@@ -1,4 +1,4 @@
1
- import { DefaultModeDragType, DefaultTool, } from '../affine-block-surface/index.js';
1
+ import { DefaultModeDragType, DefaultTool } from '../affine-block-surface/index.js';
2
2
  import { WidgetComponent, WidgetViewExtension } from '../std/index.js';
3
3
  import { GfxControllerIdentifier } from '../std/gfx/index.js';
4
4
  import { cssVarV2 } from '@toeverything/theme/v2';
@@ -0,0 +1,14 @@
1
+ import type { ExtensionType } from '../../store/index.js';
2
+ /**
3
+ * The DEFAULT `ArtefactCatalogueProvider`: the library's own left sidepanel.
4
+ *
5
+ * Registered next to the widget itself (`EdgelessToolbarViewExtension`), and
6
+ * unconditionally — a catalogue is core chrome, not a framework's tooling. ADR
7
+ * 0009's gating is carried by the frameworks: a framework whose flag is off
8
+ * shows no senior button, so its owner is never passed to `open`, and the panel
9
+ * simply never opens for it.
10
+ *
11
+ * `di.addImpl`, so a host's `ArtefactCatalogueExtension(service)` — which uses
12
+ * `di.override` — wins whatever the registration order.
13
+ */
14
+ export declare const artefactCatalogueDefaultExtension: ExtensionType;
@@ -0,0 +1,40 @@
1
+ import { ArtefactCatalogueProvider, } from '../../affine-shared/services/index.js';
2
+ import { StdIdentifier } from '../../std/index.js';
3
+ import { EDGELESS_ARTEFACT_CATALOGUE_WIDGET, } from './artefact-catalogue-widget.js';
4
+ /**
5
+ * The widget, found on the editor host — or `null` before it has mounted, and
6
+ * on a page-mode editor where it is not registered at all.
7
+ *
8
+ * A DOM lookup rather than a reference held at registration time, because the
9
+ * widget is created and destroyed by lit as the root block renders: the same
10
+ * lookup `EditorAnchoredPanel` makes for the toolbar it measures against. A
11
+ * `null` here is not an error — it is a catalogue nobody can open yet, and the
12
+ * `open` below is then a no-op rather than a throw in a menu click handler.
13
+ */
14
+ function catalogueWidget(std) {
15
+ return (std.host.querySelector(EDGELESS_ARTEFACT_CATALOGUE_WIDGET) ?? null);
16
+ }
17
+ /**
18
+ * The DEFAULT `ArtefactCatalogueProvider`: the library's own left sidepanel.
19
+ *
20
+ * Registered next to the widget itself (`EdgelessToolbarViewExtension`), and
21
+ * unconditionally — a catalogue is core chrome, not a framework's tooling. ADR
22
+ * 0009's gating is carried by the frameworks: a framework whose flag is off
23
+ * shows no senior button, so its owner is never passed to `open`, and the panel
24
+ * simply never opens for it.
25
+ *
26
+ * `di.addImpl`, so a host's `ArtefactCatalogueExtension(service)` — which uses
27
+ * `di.override` — wins whatever the registration order.
28
+ */
29
+ export const artefactCatalogueDefaultExtension = {
30
+ setup: di => {
31
+ di.addImpl(ArtefactCatalogueProvider, provider => {
32
+ const std = provider.get(StdIdentifier);
33
+ const service = {
34
+ open: owner => catalogueWidget(std)?.openFor(owner),
35
+ close: () => catalogueWidget(std)?.closePanel(),
36
+ };
37
+ return service;
38
+ });
39
+ },
40
+ };
@@ -0,0 +1,158 @@
1
+ import type { RootBlockModel } from '../../affine-model/index.js';
2
+ import { type CommandOwner, WidgetComponent } from '../../std/index.js';
3
+ import { nothing } from 'lit';
4
+ export declare const EDGELESS_ARTEFACT_CATALOGUE_WIDGET = "edgeless-artefact-catalogue-widget";
5
+ /**
6
+ * The **artefact catalogue** sidepanel (PF6).
7
+ *
8
+ * A framework's senior sub-menu is a row of icons, and a row of icons stops
9
+ * working somewhere around fourteen. The BPMN pack is the first framework to
10
+ * pass that line, so the sub-menu shows the thirteen the ranking put first and
11
+ * hands the rest to this panel: everything the owner declares on the
12
+ * `'catalogue'` surface, grouped by the categories the framework itself
13
+ * declared, with the label and the chord spelled out instead of guessed from a
14
+ * glyph.
15
+ *
16
+ * ## Left, full height, inside the editor
17
+ *
18
+ * Not a popover, not a modal. It is a column down the left edge of the editor
19
+ * host — the side no toolbar occupies — the canvas stays live to its right, and
20
+ * a click on the canvas puts it away. Twenty artefacts want a list you scroll,
21
+ * and a list you scroll wants height; a floating box would have had to choose
22
+ * between covering the board and showing four rows at a time.
23
+ *
24
+ * ## Not an `EditorAnchoredPanel`
25
+ *
26
+ * The shared base (ADR 0011) exists for panels pinned ABOVE the senior button
27
+ * bar and measured against it: its host is bottom-left and zero-sized, and
28
+ * `anchorBox()` returns a `bottom` and a width read off the bar. None of that
29
+ * is expressible for a full-height column, so the geometry is this file's own —
30
+ * but the WISDOM is not reinvented. The layer constant is imported from there
31
+ * rather than copied, and the host is zero-WIDTH for the same reason its host is
32
+ * zero-sized (`.widgets-container > * { pointer-events: auto }` is an outer-tree
33
+ * rule that beats `:host { pointer-events: none }`, so a host with a real box
34
+ * would swallow canvas clicks down the whole left side of the board). The
35
+ * click-away, the Escape-on-`std.host` scope and the disconnect cleanup are the
36
+ * same contracts, replicated in about thirty lines.
37
+ *
38
+ * ## What closing does, and does not
39
+ *
40
+ * X, Escape and click-away all close, on the FIRST gesture, and none of them
41
+ * touches the active senior tool: the panel is a way of reaching a command, not
42
+ * a mode. Invoking a row closes it too — the PO's default is one tap and back
43
+ * to the canvas.
44
+ *
45
+ * ## Who opens it
46
+ *
47
+ * `ArtefactCatalogueProvider`. This widget registers itself as the DEFAULT
48
+ * implementation ({@link artefactCatalogueDefaultExtension}); a host with its
49
+ * own sidebar registers `ArtefactCatalogueExtension(service)`, whose
50
+ * `di.override` wins, and this panel is then never asked to open.
51
+ */
52
+ export declare class EdgelessArtefactCatalogueWidget extends WidgetComponent<RootBlockModel> {
53
+ static styles: import("lit").CSSResult;
54
+ /** Which framework's catalogue is on screen, or `null` when it is away. */
55
+ private accessor _owner;
56
+ /** The owner the body was last scrolled to the top for. */
57
+ private _scrolledFor;
58
+ get catalogueOpen(): boolean;
59
+ /**
60
+ * Show `owner`'s catalogue. Called through `ArtefactCatalogueProvider`, never
61
+ * from another widget's DOM — the sub-menu that opens it lives in a different
62
+ * tree, and the seam is what keeps a host's own sidebar substitutable.
63
+ */
64
+ openFor(owner: CommandOwner): void;
65
+ /**
66
+ * Put the panel away. Deliberately writes NOTHING but its own state: the
67
+ * senior tool the user armed before opening the catalogue is still armed
68
+ * after, whichever gesture closed it.
69
+ */
70
+ readonly closePanel: () => void;
71
+ /** Keep a gesture inside the panel from reaching the canvas behind it. */
72
+ private readonly _swallow;
73
+ private readonly _onDocumentPointerDown;
74
+ /**
75
+ * Escape is listened for on the EDITOR HOST, not on `document`: a host
76
+ * application keeps its own global Escape, and with the catalogue open the
77
+ * key dismisses the catalogue rather than clearing the canvas selection
78
+ * behind it. Same scope and same reasoning as `EditorAnchoredPanel`.
79
+ */
80
+ private readonly _onHostKeydown;
81
+ /**
82
+ * A wheel OVER THE PANEL scrolls the panel, never the board.
83
+ *
84
+ * Same bug and same fix as the violation bubble (PR #103, PO 02/08):
85
+ * `EdgelessRootBlock` takes `wheel` off the event dispatcher on the editor
86
+ * host and `preventDefault()`s unconditionally before panning — so a wheel
87
+ * over the catalogue's overflowing list panned the canvas instead of
88
+ * scrolling the twenty artefacts under the pointer (PO recette, 27/08/2026).
89
+ * One CAPTURE-phase listener on the host stops the event before the
90
+ * dispatcher sees it; no `preventDefault`, because the default action IS the
91
+ * panel scrolling.
92
+ *
93
+ * Narrower than the bubble's freeze, deliberately: the bubble owns the wheel
94
+ * everywhere while open (a reading gesture); the catalogue only claims the
95
+ * wheel over its own box — `composedPath` gate — and the canvas to its right
96
+ * keeps panning, because furnishing a diagram means looking around it.
97
+ */
98
+ private readonly _onHostWheel;
99
+ /**
100
+ * Idempotent, and called from both `firstUpdated` and a later
101
+ * `connectedCallback`: `WithDisposable` throws the group away on disconnect
102
+ * while lit runs `firstUpdated` exactly once.
103
+ */
104
+ private _wire;
105
+ connectedCallback(): void;
106
+ firstUpdated(): void;
107
+ /**
108
+ * On open: the panel takes the focus and the list starts at the top.
109
+ *
110
+ * The focus is what makes the panel reachable from a keyboard and audible to
111
+ * a screen reader — it carries the dialog's label, so the framework's name is
112
+ * read before the first artefact. `preventScroll` because the host is a
113
+ * zero-width box at the editor's origin and the browser would otherwise
114
+ * scroll the editor to "reveal" it.
115
+ *
116
+ * The scroll reset matters on the second open: a user who scrolled to the
117
+ * bottom of BPMN's twenty artefacts, closed, and opened the panel again for
118
+ * another framework would otherwise land mid-list with no idea what is above.
119
+ */
120
+ updated(): void;
121
+ /**
122
+ * The commands this panel draws: the owner's `'catalogue'` surface, minus the
123
+ * ones whose preconditions do not hold.
124
+ *
125
+ * Unavailable commands are DROPPED, not greyed out. A disabled row in a list
126
+ * of twenty is noise a reader has to step over on every pass, and the panel
127
+ * has no room to say why it is disabled; a command that comes back when the
128
+ * selection changes simply reappears.
129
+ */
130
+ private _commands;
131
+ /**
132
+ * The chord this command answers to on this platform, as the user would type
133
+ * it — or `null` for the many commands that ship keyless (and stay bindable).
134
+ *
135
+ * The host's override table is consulted, so a rebound command shows what it
136
+ * is actually bound to rather than what it shipped with, and a `'disabled'`
137
+ * entry shows nothing at all.
138
+ */
139
+ private _chord;
140
+ /**
141
+ * Run the command. The panel STAYS OPEN.
142
+ *
143
+ * `runCommand` is the one bottleneck (ADR 0008): the telemetry and the usage
144
+ * measure are emitted there, and `surface: 'catalogue'` is what makes this
145
+ * panel distinguishable from the sub-menu in the numbers.
146
+ *
147
+ * Staying open is the PO's call (recette, 27/08/2026), reversing the first
148
+ * default: a catalogue is where a user furnishes a diagram, and furnishing is
149
+ * several artefacts in a row — closing after each one turned that into
150
+ * open-click-reopen. The exits are unchanged and all one gesture: ×, Escape,
151
+ * or a click on the canvas.
152
+ */
153
+ private _invoke;
154
+ private _groupLabel;
155
+ private _renderEntry;
156
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
157
+ }
158
+ export declare const edgelessArtefactCatalogueWidget: import("../../store/index.js").ExtensionType;