@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
@@ -195,7 +195,10 @@ export class DocCRUD {
195
195
  // be answered before indexing.
196
196
  if (index === 0)
197
197
  return null;
198
- return parent.get('sys:children').toArray().at(index - 1) ?? null;
198
+ return (parent
199
+ .get('sys:children')
200
+ .toArray()
201
+ .at(index - 1) ?? null);
199
202
  });
200
203
  }
201
204
  moveBlocks(blocksToMove, newParent, targetSibling = null, shouldInsertBeforeSibling = true) {
package/dist/commands.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { coreCommands, pivotCommands, readingCommands, tagCommands, } from './_pkgs/affine-block-root/index.js';
2
- import { auditCommands, mapQualityCommands, } from './_pkgs/affine-block-surface/index.js';
2
+ import { auditCommands, mapQualityCommands } from './_pkgs/affine-block-surface/index.js';
3
3
  import { edgeDirectionCommands } from './_pkgs/affine-gfx-connector/index.js';
4
4
  import { shapeCommands } from './_pkgs/affine-gfx-shape/index.js';
5
5
  import { toCommandManifestEntry, } from './_pkgs/std/index.js';
@@ -0,0 +1,23 @@
1
+ import { type ViewExtensionContext, ViewExtensionProvider } from '../_pkgs/affine-ext-loader/index.js';
2
+ import type { ExtensionType } from '../_pkgs/store/index.js';
3
+ /**
4
+ * The DEFAULT command usage measure: `localStorage`, this browser only.
5
+ *
6
+ * `runCommand` records every invocation into whatever answers
7
+ * `CommandUsageIdentifier`; without a default nothing would be measured at all
8
+ * until a host wired a store, and PF6's "seven most-recent + six most-used"
9
+ * sub-menu would have nothing to rank in a standalone editor. A host that owns
10
+ * a per-user database replaces this with `CommandUsageExtension(store)`, whose
11
+ * `di.override` beats the `addImpl` below.
12
+ */
13
+ export declare const CommandUsageDefaultExtension: ExtensionType;
14
+ /**
15
+ * Registered unconditionally by `getInternalViewExtensions`, next to
16
+ * `CommandTelemetryViewExtension` and for the same reason: measuring which
17
+ * commands a user reaches for is not a framework's business, and a framework
18
+ * toggled off simply never invokes a command.
19
+ */
20
+ export declare class CommandUsageViewExtension extends ViewExtensionProvider {
21
+ name: string;
22
+ setup(context: ViewExtensionContext): void;
23
+ }
@@ -0,0 +1,37 @@
1
+ import { ViewExtensionProvider, } from '../_pkgs/affine-ext-loader/index.js';
2
+ import { createLocalCommandUsageStore } from '../_pkgs/affine-shared/services/index.js';
3
+ import { CommandUsageIdentifier } from '../_pkgs/std/index.js';
4
+ /**
5
+ * The DEFAULT command usage measure: `localStorage`, this browser only.
6
+ *
7
+ * `runCommand` records every invocation into whatever answers
8
+ * `CommandUsageIdentifier`; without a default nothing would be measured at all
9
+ * until a host wired a store, and PF6's "seven most-recent + six most-used"
10
+ * sub-menu would have nothing to rank in a standalone editor. A host that owns
11
+ * a per-user database replaces this with `CommandUsageExtension(store)`, whose
12
+ * `di.override` beats the `addImpl` below.
13
+ */
14
+ export const CommandUsageDefaultExtension = {
15
+ // Factory form, not value form — as for the telemetry reporter: the container
16
+ // calls a function argument as a factory, so the store is built here and the
17
+ // service provider is never passed to it.
18
+ setup: di => {
19
+ di.addImpl(CommandUsageIdentifier, () => createLocalCommandUsageStore());
20
+ },
21
+ };
22
+ /**
23
+ * Registered unconditionally by `getInternalViewExtensions`, next to
24
+ * `CommandTelemetryViewExtension` and for the same reason: measuring which
25
+ * commands a user reaches for is not a framework's business, and a framework
26
+ * toggled off simply never invokes a command.
27
+ */
28
+ export class CommandUsageViewExtension extends ViewExtensionProvider {
29
+ constructor() {
30
+ super(...arguments);
31
+ this.name = 'affine-command-usage';
32
+ }
33
+ setup(context) {
34
+ super.setup(context);
35
+ context.register(CommandUsageDefaultExtension);
36
+ }
37
+ }
@@ -58,6 +58,7 @@ import { ToolbarViewExtension } from '../_pkgs/affine-widget-toolbar/view.js';
58
58
  import { ViewportOverlayViewExtension } from '../_pkgs/affine-widget-viewport-overlay/view.js';
59
59
  import { isBlockEnabled, isCapabilityEnabled, } from '../flags.js';
60
60
  import { CommandTelemetryViewExtension } from './command-telemetry.js';
61
+ import { CommandUsageViewExtension } from './command-usage.js';
61
62
  /**
62
63
  * View extensions.
63
64
  *
@@ -74,9 +75,20 @@ export function getInternalViewExtensions(flags) {
74
75
  // The single command-telemetry emitter. Unconditional: a disabled
75
76
  // framework simply never invokes a command (docs/adr/0008).
76
77
  CommandTelemetryViewExtension,
78
+ // The default (browser-local) recency/frequency measure. Unconditional for
79
+ // the same reason, and independent of telemetry: it feeds an in-editor
80
+ // ranking, not a dashboard (docs/adr/0008).
81
+ CommandUsageViewExtension,
77
82
  // Gfx — each framework contributes an always-on `…Render…` extension
78
83
  // (element view + renderer + interaction + contextual toolbar) and a
79
84
  // flag-gated tooling extension (senior button + creation shortcuts).
85
+ //
86
+ // The eight business frameworks are registered as PAIRS, in the order their
87
+ // senior buttons must read left to right: no framework declares a
88
+ // `SeniorTool.order`, so they all share the default group and the row is
89
+ // sorted stably — i.e. left in registration order. The single source of that
90
+ // order is `FRAMEWORK_DESCRIPTORS`, and `senior-row-order.unit.spec.ts` pins
91
+ // the two lists together.
80
92
  PointerViewExtension,
81
93
  GfxNoteViewExtension,
82
94
  BrushRenderViewExtension,
@@ -2,6 +2,7 @@ export const FRAMEWORK_DESCRIPTORS = [
2
2
  {
3
3
  id: 'wardley',
4
4
  labelKey: 'com.labre.framework.wardley',
5
+ labelFallback: 'Wardley map',
5
6
  iconKey: 'wardley.toolbar',
6
7
  // The only allocated chord prefix: `w` was free against
7
8
  // RESERVED_EDGELESS_KEYS. The other six frameworks ship no chord, so they
@@ -26,6 +27,7 @@ export const FRAMEWORK_DESCRIPTORS = [
26
27
  {
27
28
  id: 'edgy',
28
29
  labelKey: 'com.labre.framework.edgy',
30
+ labelFallback: 'EDGY',
29
31
  iconKey: 'edgy.toolbar',
30
32
  telemetryKey: 'edgy',
31
33
  telemetrySegment: 'edgy toolbox',
@@ -43,6 +45,7 @@ export const FRAMEWORK_DESCRIPTORS = [
43
45
  {
44
46
  id: 'cynefin-estuarine',
45
47
  labelKey: 'com.labre.framework.cynefin-estuarine',
48
+ labelFallback: 'Cynefin / Estuarine',
46
49
  iconKey: 'cynefin.toolbar',
47
50
  // Historical PostHog value; the flag and the owner say
48
51
  // `cynefin-estuarine`, the wire says `cynefin`.
@@ -66,6 +69,7 @@ export const FRAMEWORK_DESCRIPTORS = [
66
69
  {
67
70
  id: 'bpmn',
68
71
  labelKey: 'com.labre.framework.bpmn',
72
+ labelFallback: 'BPMN',
69
73
  iconKey: 'bpmn.toolbar',
70
74
  telemetryKey: 'bpmn',
71
75
  telemetrySegment: 'bpmn toolbox',
@@ -83,6 +87,7 @@ export const FRAMEWORK_DESCRIPTORS = [
83
87
  {
84
88
  id: 'ddd-event-storming',
85
89
  labelKey: 'com.labre.framework.ddd-event-storming',
90
+ labelFallback: 'Event Storming',
86
91
  iconKey: 'ddd-event-storming.toolbar',
87
92
  telemetryKey: 'event-storming',
88
93
  telemetrySegment: 'ddd toolbox',
@@ -91,6 +96,9 @@ export const FRAMEWORK_DESCRIPTORS = [
91
96
  pkg: '@labre/affine-gfx-ddd-event-storming',
92
97
  dir: 'affine/gfx/ddd-event-storming',
93
98
  extensions: [
99
+ // always-on: placed Event Storming boards must paint even with the button
100
+ // off, and their role vocabulary must stay readable
101
+ { viewExtension: 'DddEventStormingRenderViewExtension' },
94
102
  {
95
103
  flag: 'ddd-event-storming',
96
104
  viewExtension: 'DddEventStormingViewExtension',
@@ -98,9 +106,29 @@ export const FRAMEWORK_DESCRIPTORS = [
98
106
  ],
99
107
  shortcuts: true,
100
108
  },
109
+ {
110
+ id: 'c4',
111
+ labelKey: 'com.labre.framework.c4',
112
+ labelFallback: 'C4 model',
113
+ iconKey: 'c4.toolbar',
114
+ telemetryKey: 'c4',
115
+ telemetrySegment: 'c4 toolbox',
116
+ bundle: 'framework-c4',
117
+ info: 'c4Framework',
118
+ pkg: '@labre/affine-gfx-c4',
119
+ dir: 'affine/gfx/c4',
120
+ extensions: [
121
+ // always-on: placed C4 boards, boundaries and elements must paint even
122
+ // with the button off
123
+ { viewExtension: 'C4RenderViewExtension' },
124
+ { flag: 'c4', viewExtension: 'C4ViewExtension' },
125
+ ],
126
+ shortcuts: true,
127
+ },
101
128
  {
102
129
  id: 'ddd-core-domain',
103
130
  labelKey: 'com.labre.framework.ddd-core-domain',
131
+ labelFallback: 'Core Domain Chart',
104
132
  iconKey: 'ddd-core-domain.toolbar',
105
133
  telemetryKey: 'core-domain',
106
134
  telemetrySegment: 'ddd toolbox',
@@ -118,6 +146,7 @@ export const FRAMEWORK_DESCRIPTORS = [
118
146
  {
119
147
  id: 'ddd-context-map',
120
148
  labelKey: 'com.labre.framework.ddd-context-map',
149
+ labelFallback: 'Context Map',
121
150
  iconKey: 'ddd-context-map.toolbar',
122
151
  telemetryKey: 'context-map',
123
152
  telemetrySegment: 'ddd toolbox',
@@ -126,6 +155,9 @@ export const FRAMEWORK_DESCRIPTORS = [
126
155
  pkg: '@labre/affine-gfx-ddd-context-map',
127
156
  dir: 'affine/gfx/ddd-context-map',
128
157
  extensions: [
158
+ // always-on: placed Context Map boards must paint even with the button
159
+ // off, and their role vocabulary must stay readable
160
+ { viewExtension: 'DddContextMapRenderViewExtension' },
129
161
  { flag: 'ddd-context-map', viewExtension: 'DddContextMapViewExtension' },
130
162
  ],
131
163
  shortcuts: true,
@@ -1,24 +1,38 @@
1
- import type { ShortcutDescriptor } from './_pkgs/std/index.js';
1
+ import { type ShortcutManifestEntry } from './_pkgs/std/index.js';
2
2
  import type { LabreFlags } from './flags.js';
3
3
  /**
4
4
  * Manifest view of a shortcut: the metadata a host "Shortcuts" settings panel
5
5
  * needs, without the runtime `handler`.
6
6
  *
7
- * Since PF3 it is a projection of a projection: {@link CommandDescriptor} →
8
- * {@link ShortcutDescriptor} → here. It KEEPS representing shortcuts and
9
- * nothing else — no `iconKey`, no `category`; catalogue metadata travels on
10
- * `CommandManifestEntry` (`docs/adr/0008` § Icons).
7
+ * Since PF3 it is a projection of `CommandDescriptor`, and it is now declared
8
+ * ONCE, in `@labre/std` beside the projection that builds it — because the
9
+ * framework bundles publish the very same rows on their own
10
+ * `./commands-manifest` subpath, and a host composing core's manifest with a
11
+ * framework's must be handed one type, not two.
12
+ *
13
+ * It KEEPS representing shortcuts and nothing else — no `iconKey`, no
14
+ * `category`; catalogue metadata travels on `CommandManifestEntry`
15
+ * (`docs/adr/0008` § Icons). `labelFallback` is the one addition, and it is not
16
+ * catalogue metadata: it is the wording the panel SHOWS when the host has no
17
+ * translation for `labelKey`. Dropping it was why a host with no catalogue
18
+ * rendered raw keys, and why every host had to re-project from the main entry
19
+ * to recover a wording the library already knew.
11
20
  *
12
21
  * Breaking shape change for hosts: `when?: string` is gone (no descriptor in
13
22
  * the repo ever set it), `defaultKeys` is always present, and `owner` narrows
14
23
  * from `string` to `CommandOwner`.
15
24
  */
16
- export type ShortcutManifestEntry = Omit<ShortcutDescriptor, 'handler'>;
25
+ export type { ShortcutManifestEntry };
17
26
  /**
18
27
  * The enumerable shortcut manifest for a given flag set. TOTAL over the command
19
28
  * registry: every command yields a row, keyless ones included, so Settings ›
20
29
  * Shortcuts can bind precisely the commands a user most wants to bind. The
21
30
  * panel therefore grows from ~10 rows to the full command count — that is the
22
31
  * intent, and `owner` grouping is what keeps it usable.
32
+ *
33
+ * In the BUNDLED distribution this returns core's share only: each framework
34
+ * bundle's commands are stripped out of core by `scripts/build-bundles.mjs` and
35
+ * republished as that bundle's data-only `./commands-manifest` export, which
36
+ * the host concatenates for the frameworks it enables.
23
37
  */
24
38
  export declare function getShortcutManifest(flags?: LabreFlags): ShortcutManifestEntry[];
package/dist/shortcuts.js CHANGED
@@ -1,19 +1,17 @@
1
- import { toShortcutDescriptor } from './_pkgs/std/index.js';
1
+ import { toShortcutManifestEntry, } from './_pkgs/std/index.js';
2
2
  import { getCommands } from './commands.js';
3
- const toEntry = (d) => ({
4
- id: d.id,
5
- labelKey: d.labelKey,
6
- defaultKeys: d.defaultKeys,
7
- scope: d.scope,
8
- owner: d.owner,
9
- });
10
3
  /**
11
4
  * The enumerable shortcut manifest for a given flag set. TOTAL over the command
12
5
  * registry: every command yields a row, keyless ones included, so Settings ›
13
6
  * Shortcuts can bind precisely the commands a user most wants to bind. The
14
7
  * panel therefore grows from ~10 rows to the full command count — that is the
15
8
  * intent, and `owner` grouping is what keeps it usable.
9
+ *
10
+ * In the BUNDLED distribution this returns core's share only: each framework
11
+ * bundle's commands are stripped out of core by `scripts/build-bundles.mjs` and
12
+ * republished as that bundle's data-only `./commands-manifest` export, which
13
+ * the host concatenates for the frameworks it enables.
16
14
  */
17
15
  export function getShortcutManifest(flags) {
18
- return getCommands(flags).map(toShortcutDescriptor).map(toEntry);
16
+ return getCommands(flags).map(toShortcutManifestEntry);
19
17
  }
@@ -1,5 +1,6 @@
1
- import { EXEMPTION_FALLBACK, RELATION_SIDE_FALLBACK, SEVERITY_FALLBACK, } from './_pkgs/affine-block-surface/index.js';
2
- import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from './_pkgs/std/index.js';
1
+ import { EXEMPTION_FALLBACK, PROVENANCE_FALLBACK, RELATION_SIDE_FALLBACK, SEVERITY_FALLBACK, } from './_pkgs/affine-block-surface/index.js';
2
+ import { CHROME_WORDINGS } from './_pkgs/affine-shared/services/index.js';
3
+ import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from './_pkgs/std/index.js';
3
4
  import { getCommands } from './commands.js';
4
5
  import { FRAMEWORK_DESCRIPTORS } from './frameworks.js';
5
6
  const FRAMEWORK_TRANSLATION_GROUPS = [];
@@ -13,6 +14,11 @@ const FRAMEWORK_TRANSLATION_GROUPS = [];
13
14
  const CHROME_TABLES = [
14
15
  ['com.labre.validation.severity.', SEVERITY_FALLBACK],
15
16
  ['com.labre.validation.state.exempted.', EXEMPTION_FALLBACK],
17
+ // The four kinds of authority a rule can claim. `organization` is enumerated
18
+ // with the rest although nothing declares it yet: the table is the TYPE, and
19
+ // a host building a catalogue must not have to come back for a fourth word
20
+ // the day the first org profile ships.
21
+ ['com.labre.validation.provenance.', PROVENANCE_FALLBACK],
16
22
  ['com.labre.reading.relations.', RELATION_SIDE_FALLBACK],
17
23
  ];
18
24
  const chromeTableEntries = () => CHROME_TABLES.flatMap(([prefix, table]) => Object.entries(table).map(([suffix, fallback]) => ({
@@ -20,6 +26,29 @@ const chromeTableEntries = () => CHROME_TABLES.flatMap(([prefix, table]) => Obje
20
26
  fallback,
21
27
  source: 'chrome',
22
28
  })));
29
+ /**
30
+ * The artefact catalogue's group headers — one key per `category` any command
31
+ * declares, with the sidepanel's own humanised fallback.
32
+ *
33
+ * DERIVED, not restated: the categories are walked out of `getCommands()`, so a
34
+ * framework that invents a category gets its header key in the manifest by
35
+ * construction. The fallback comes from `humanizeCategory`, the very function
36
+ * the panel renders with, so the two cannot drift.
37
+ *
38
+ * Flag-independent like the rest of the manifest: `getCommands()` with no flags
39
+ * enumerates every command, so a catalogue built once covers a framework
40
+ * switched on later.
41
+ *
42
+ * In the BUNDLED distribution this walks core's commands alone — the framework
43
+ * groups are stripped from this file — which is why every framework contributes
44
+ * its OWN category headers from its `…TranslationEntries` as well (#183: a
45
+ * bundled host was offered translated catalogue ENTRIES under untranslated
46
+ * headers, because "EVENTS" and "GATEWAYS" are BPMN's categories and BPMN's
47
+ * commands are not in core). The two overlap in the monorepo and
48
+ * `mergeTranslationEntries` de-duplicates them, so both assemblies produce the
49
+ * same list.
50
+ */
51
+ const catalogueCategoryEntries = () => commandCategoryTranslationEntries(getCommands());
23
52
  /**
24
53
  * Chrome wordings: the `translateKey(std, key, fallback)` literals of the
25
54
  * library's own panels and toolbars. Restated data, guarded against drift AND
@@ -43,8 +72,23 @@ const CHROME_KEYS = [
43
72
  ['com.labre.validation.map-quality.section', 'Map quality'],
44
73
  ['com.labre.validation.map-quality.checklist.yours', 'To be checked by you:'],
45
74
  ['com.labre.validation.map-quality.close', 'Close'],
75
+ // Senior sub-menu, past the fourteen-slot cap
76
+ ['com.labre.catalogue.open', 'More artefacts…'],
77
+ [
78
+ 'com.labre.catalogue.open.description',
79
+ 'This framework offers more than the menu can show.',
80
+ ],
81
+ // Artefact catalogue sidepanel
82
+ ['com.labre.catalogue.title', 'Artefacts'],
83
+ ['com.labre.catalogue.close', 'Close'],
84
+ ['com.labre.catalogue.other', 'Other'],
85
+ ['com.labre.catalogue.ranked', 'Recent & frequent'],
46
86
  // Qualify (tags) toolbar
47
87
  ['com.labre.tags.toolbar.label', 'Qualify'],
88
+ // Morph ("Change type") toolbar — generic chrome, like the two above: the
89
+ // KINDS it offers are named by each framework's own creation commands, and
90
+ // only the drop-down's own word lives here.
91
+ ['com.labre.morph.toolbar.label', 'Change type'],
48
92
  // Reading panel
49
93
  ['com.labre.reading.toolbar.label', 'Read this component'],
50
94
  ['com.labre.reading.panel.label', 'Proposed record'],
@@ -89,6 +133,47 @@ const CHROME_KEYS = [
89
133
  ['com.labre.reading.record.linked', 'Linked'],
90
134
  ['com.labre.reading.record.none', 'Not linked to a record.'],
91
135
  ['com.labre.reading.drift.message', 'The board and the record disagree'],
136
+ // BPMN interchange: what an export could not write down. Chrome and not
137
+ // framework prose — these are the words the library's own notification puts
138
+ // around a report the writer produced, so they ship with an English default
139
+ // and a standalone playground reads correctly with no catalogue registered.
140
+ [
141
+ 'com.labre.commands.bpmn.exportXml.warnings',
142
+ 'What this export could not write down',
143
+ ],
144
+ // Wardley's own, and the same sentence: one key per WRITER, because an
145
+ // export's losses are the capability's own words and there is no generic
146
+ // pipeline writing them (the import's wordings below are shared precisely
147
+ // because there is one).
148
+ [
149
+ 'com.labre.commands.wardley.exportOwm.warnings',
150
+ 'What this export could not write down',
151
+ ],
152
+ // What an IMPORT did with the file — one set of keys for every format, not
153
+ // one per format. The format's own name is composed into the wording
154
+ // ("BPMN" + "file imported", "OWM 2.0" after the counts), which is the same
155
+ // compromise the three count labels below already make: the seam has no
156
+ // interpolation, so a proper noun and a countable noun are the largest units
157
+ // this library can hand over without inventing grammar. A key per format
158
+ // would ask a host to translate the same sentence once per reader we ship,
159
+ // and would leave every new format silently untranslated.
160
+ ['com.labre.interchange.import.done', 'file imported'],
161
+ ['com.labre.interchange.import.failed', 'This file could not be imported'],
162
+ [
163
+ 'com.labre.interchange.import.remarks',
164
+ 'What the import could not keep as it was',
165
+ ],
166
+ [
167
+ 'com.labre.interchange.import.console',
168
+ 'remarks — the full report is in the browser console.',
169
+ ],
170
+ // The three count labels of the summary line. Separate keys rather than one
171
+ // sentence with holes in it: the seam has no interpolation and no
172
+ // pluralisation (both are the host's), so a countable noun is the largest
173
+ // unit this library can hand over without inventing grammar.
174
+ ['com.labre.interchange.import.drawn', 'drawn'],
175
+ ['com.labre.interchange.import.carried', 'carried'],
176
+ ['com.labre.interchange.import.quarantined', 'quarantined'],
92
177
  ];
93
178
  /**
94
179
  * Every i18n key THIS package can ask the host for, with its English fallback
@@ -104,7 +189,17 @@ const CHROME_KEYS = [
104
189
  * not filtered either.
105
190
  */
106
191
  export function getTranslationKeyManifest() {
107
- return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), CHROME_KEYS.map(([key, fallback]) => ({
192
+ return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(),
193
+ // The editor's own shared vocabulary — the toasts, the toolbar verbs, the
194
+ // view switcher, the board tooltips — DECLARED in
195
+ // `@labre/affine-shared/services` beside nothing at all, and walked here
196
+ // rather than restated. Same rule as the tables above: a wording added to
197
+ // `CHROME_WORDINGS` reaches a host with no second edit.
198
+ CHROME_WORDINGS.map(([key, fallback]) => ({
199
+ key,
200
+ fallback,
201
+ source: 'chrome',
202
+ })), CHROME_KEYS.map(([key, fallback]) => ({
108
203
  key,
109
204
  fallback,
110
205
  source: 'chrome',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-core",
3
3
  "description": "Labre editor — the full BlockSuite-derived editor as one package.",
4
- "version": "0.32.0",
4
+ "version": "0.34.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -853,6 +853,18 @@
853
853
  "./foundation/view": {
854
854
  "types": "./dist/foundation/view.d.ts",
855
855
  "import": "./dist/foundation/view.js"
856
+ },
857
+ "./_pkgs/affine-widget-edgeless-toolbar": {
858
+ "types": "./dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts",
859
+ "import": "./dist/_pkgs/affine-widget-edgeless-toolbar/index.js"
860
+ },
861
+ "./_pkgs/global/di": {
862
+ "types": "./dist/_pkgs/global/di/index.d.ts",
863
+ "import": "./dist/_pkgs/global/di/index.js"
864
+ },
865
+ "./_pkgs/global/utils": {
866
+ "types": "./dist/_pkgs/global/utils/index.d.ts",
867
+ "import": "./dist/_pkgs/global/utils/index.js"
856
868
  }
857
869
  },
858
870
  "files": [