@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
@@ -180,67 +180,67 @@ let ReadingProposalWidget = (() => {
180
180
  static { this.styles = [
181
181
  editorAnchoredPanelStyles,
182
182
  css `
183
- .reading-title {
184
- font-weight: 600;
185
- margin-bottom: 8px;
186
- }
183
+ .reading-title {
184
+ font-weight: 600;
185
+ margin-bottom: 8px;
186
+ }
187
187
 
188
- .reading-field + .reading-field {
189
- margin-top: 10px;
190
- padding-top: 10px;
191
- border-top: 1px solid var(--affine-border-color);
192
- }
188
+ .reading-field + .reading-field {
189
+ margin-top: 10px;
190
+ padding-top: 10px;
191
+ border-top: 1px solid var(--affine-border-color);
192
+ }
193
193
 
194
- .reading-label {
195
- color: var(--affine-text-secondary-color);
196
- font-size: 11px;
197
- text-transform: uppercase;
198
- letter-spacing: 0.04em;
199
- }
194
+ .reading-label {
195
+ color: var(--affine-text-secondary-color);
196
+ font-size: 11px;
197
+ text-transform: uppercase;
198
+ letter-spacing: 0.04em;
199
+ }
200
200
 
201
- .reading-value {
202
- overflow-wrap: anywhere;
203
- }
201
+ .reading-value {
202
+ overflow-wrap: anywhere;
203
+ }
204
204
 
205
- .reading-empty {
206
- color: var(--affine-text-secondary-color);
207
- font-style: italic;
208
- }
205
+ .reading-empty {
206
+ color: var(--affine-text-secondary-color);
207
+ font-style: italic;
208
+ }
209
209
 
210
- .reading-note {
211
- margin-top: 2px;
212
- color: var(--affine-text-secondary-color);
213
- font-size: 13px;
214
- overflow-wrap: anywhere;
215
- }
210
+ .reading-note {
211
+ margin-top: 2px;
212
+ color: var(--affine-text-secondary-color);
213
+ font-size: 13px;
214
+ overflow-wrap: anywhere;
215
+ }
216
216
 
217
- .reading-actions {
218
- display: flex;
219
- flex-wrap: wrap;
220
- gap: 8px;
221
- margin-top: 8px;
222
- }
217
+ .reading-actions {
218
+ display: flex;
219
+ flex-wrap: wrap;
220
+ gap: 8px;
221
+ margin-top: 8px;
222
+ }
223
223
 
224
- .reading-action {
225
- padding: 2px 8px;
226
- border-radius: 4px;
227
- border: 1px solid var(--affine-border-color);
228
- background: transparent;
229
- color: var(--affine-text-secondary-color);
230
- font-family: inherit;
231
- font-size: 12px;
232
- cursor: pointer;
233
- }
224
+ .reading-action {
225
+ padding: 2px 8px;
226
+ border-radius: 4px;
227
+ border: 1px solid var(--affine-border-color);
228
+ background: transparent;
229
+ color: var(--affine-text-secondary-color);
230
+ font-family: inherit;
231
+ font-size: 12px;
232
+ cursor: pointer;
233
+ }
234
234
 
235
- .reading-action:hover {
236
- background: var(--affine-hover-color);
237
- color: var(--affine-text-primary-color);
238
- }
235
+ .reading-action:hover {
236
+ background: var(--affine-hover-color);
237
+ color: var(--affine-text-primary-color);
238
+ }
239
239
 
240
- .reading-action:focus-visible {
241
- outline: 2px solid var(--affine-primary-color);
242
- outline-offset: 1px;
243
- }
240
+ .reading-action:focus-visible {
241
+ outline: 2px solid var(--affine-primary-color);
242
+ outline-offset: 1px;
243
+ }
244
244
  `,
245
245
  ]; }
246
246
  #_revision_accessor_storage;
@@ -389,8 +389,7 @@ let ReadingProposalWidget = (() => {
389
389
  @click=${this._confirmNature(reading.elementId, tagId, proposed)}
390
390
  >
391
391
  ${translateKey(this.std, 'com.labre.reading.action.confirm-nature', 'Confirm')}
392
- ·
393
- ${proposed.map(id => this._natureLabel(tagId, id)).join(', ')}
392
+ · ${proposed.map(id => this._natureLabel(tagId, id)).join(', ')}
394
393
  </button>
395
394
  </div>`
396
395
  : nothing}`);
@@ -412,8 +411,7 @@ let ReadingProposalWidget = (() => {
412
411
  ${translateKey(this.std, 'com.labre.reading.relations.none', 'No typed link touches this component.')}
413
412
  </div>`
414
413
  : nothing}
415
- ${line(consumers, 'consumers')}
416
- ${line(suppliers, 'suppliers')}
414
+ ${line(consumers, 'consumers')} ${line(suppliers, 'suppliers')}
417
415
  ${contradictions.length
418
416
  ? html `<div class="reading-note" data-testid="reading-contradiction">
419
417
  ${translateKey(this.std, 'com.labre.reading.relations.contradiction', 'A link states the opposite of what the positions show')}:
@@ -446,12 +444,12 @@ let ReadingProposalWidget = (() => {
446
444
  const from = translateKey(this.std, 'com.labre.reading.value-flow', 'Value flows up from');
447
445
  const to = translateKey(this.std, 'com.labre.reading.value-flow.to', 'to');
448
446
  return this._field('reading-value-flow', translateKey(this.std, 'com.labre.reading.field.value-flow', 'Value flow'), html `${flows.map(flow => html `<div
449
- class="reading-value"
450
- data-testid="reading-value-flow-line"
451
- data-edge-id=${flow.edgeId}
452
- >
453
- ${from} ${flow.from} ${to} ${flow.to}
454
- </div>`)}`);
447
+ class="reading-value"
448
+ data-testid="reading-value-flow-line"
449
+ data-edge-id=${flow.edgeId}
450
+ >
451
+ ${from} ${flow.from} ${to} ${flow.to}
452
+ </div>`)}`);
455
453
  }
456
454
  _renderPhase(reading) {
457
455
  const { phase } = reading;
@@ -495,25 +493,25 @@ let ReadingProposalWidget = (() => {
495
493
  const bound = isPivotBound(element);
496
494
  const picker = this.std.getOptional(PivotRecordPickerProvider);
497
495
  return this._field('reading-record', translateKey(this.std, 'com.labre.reading.field.record', 'Record'), html `<div class="reading-value">
498
- ${bound
496
+ ${bound
499
497
  ? translateKey(this.std, 'com.labre.reading.record.linked', 'Linked')
500
498
  : html `<span class="reading-empty"
501
- >${translateKey(this.std, 'com.labre.reading.record.none', 'Not linked to a record.')}</span
502
- >`}
503
- </div>
504
- ${!bound && picker && writable
499
+ >${translateKey(this.std, 'com.labre.reading.record.none', 'Not linked to a record.')}</span
500
+ >`}
501
+ </div>
502
+ ${!bound && picker && writable
505
503
  ? html `<div class="reading-actions">
506
- <button
507
- class="reading-action"
508
- type="button"
509
- data-testid="reading-link-record"
510
- @pointerdown=${this.swallow}
511
- @pointerup=${this.swallow}
512
- @click=${this._linkRecord(reading.elementId)}
513
- >
514
- ${translateKey(this.std, 'com.labre.reading.action.link', 'Link to a record')}
515
- </button>
516
- </div>`
504
+ <button
505
+ class="reading-action"
506
+ type="button"
507
+ data-testid="reading-link-record"
508
+ @pointerdown=${this.swallow}
509
+ @pointerup=${this.swallow}
510
+ @click=${this._linkRecord(reading.elementId)}
511
+ >
512
+ ${translateKey(this.std, 'com.labre.reading.action.link', 'Link to a record')}
513
+ </button>
514
+ </div>`
517
515
  : nothing}`);
518
516
  }
519
517
  /** The drift line: informative, never blocking, with one way to settle it. */
@@ -580,8 +578,8 @@ let ReadingProposalWidget = (() => {
580
578
  ${this._renderNodeType(reading, profile)}
581
579
  ${this._renderNature(reading, profile, record, writable)}
582
580
  ${this._renderRelations(reading)} ${this._renderValueFlow(reading)}
583
- ${this._renderPhase(reading)}
584
- ${this._renderNaming(reading)} ${this._renderRecord(reading, writable)}
581
+ ${this._renderPhase(reading)} ${this._renderNaming(reading)}
582
+ ${this._renderRecord(reading, writable)}
585
583
  ${writable ? this._renderDrift(reading) : nothing}`);
586
584
  }
587
585
  };
@@ -1,13 +1,13 @@
1
1
  import { getUniverseRegistry, hostLanguage, queryPivotProperties, } from '../../affine-shared/services/index.js';
2
2
  import { createIdentifier } from '../../global/di/index.js';
3
- import { LifeCycleWatcher } from '../../std/index.js';
3
+ import { LifeCycleWatcher, } from '../../std/index.js';
4
4
  import { GfxControllerIdentifier, GfxPrimitiveElementModel, isPivotBound, readElementTags, roleIsA, } from '../../std/gfx/index.js';
5
5
  import { effect, signal } from '@preact/signals-core';
6
6
  // Straight at the two leaf modules rather than at the barrel, for the reason
7
7
  // `validation.ts` states: `index.js` also re-exports the RENDERER, and a
8
8
  // reading is a one-way read of pure declaration data that must never pull a
9
9
  // canvas in.
10
- import { backgroundPlot } from '../framework-background/def.js';
10
+ import { backgroundPlot, } from '../framework-background/def.js';
11
11
  import { backgroundTransitionBands } from '../framework-background/facts.js';
12
12
  /** Deepest role chain reported by {@link ReadingNodeType.specialises}. */
13
13
  const MAX_ROLE_DEPTH = 32;
@@ -1,4 +1,5 @@
1
1
  import type { ConnectorElementModel } from '../../affine-model/index.js';
2
+ import type { Bound } from '../../global/gfx/index.js';
2
3
  import type { GfxModel } from '../../std/gfx/index.js';
3
4
  import { InteractivityExtension } from '../../std/gfx/index.js';
4
5
  import type { ExtensionType } from '../../store/index.js';
@@ -25,6 +26,26 @@ export declare function SpotlightHostExtension(elementType: string): ExtensionTy
25
26
  * two endpoints). Pure — exported for unit tests.
26
27
  */
27
28
  export declare function spotlightSet(target: GfxModel, getConnectors: (id: string) => ConnectorElementModel[]): Set<string>;
29
+ /** The shape {@link findSpotlightHost} needs of a candidate host. */
30
+ export type SpotlightHostCandidate = {
31
+ type: string;
32
+ elementBound: Bound;
33
+ spotlightEnabled?: boolean;
34
+ };
35
+ /**
36
+ * The host that grants `target` the spotlight, or `null` when none does.
37
+ *
38
+ * A host qualifies when its type was REGISTERED as a spotlight host
39
+ * (`SpotlightHostExtension`), when it did not opt out (`spotlightEnabled:
40
+ * false`, its toolbar toggle) and when its bounds contain the target. A
41
+ * background whose type is not registered grants nothing, whatever fields it
42
+ * carries — that is how the EDGY facets Venn stopped spotlighting (#195).
43
+ *
44
+ * Pure — exported for unit tests.
45
+ */
46
+ export declare function findSpotlightHost<T extends SpotlightHostCandidate>(target: {
47
+ elementBound: Bound;
48
+ }, elements: readonly T[], hostTypes: readonly string[]): T | null;
28
49
  export declare class SpotlightManager extends InteractivityExtension {
29
50
  static key: string;
30
51
  /** Elements currently faded, restored on leave. */
@@ -47,6 +47,22 @@ export function spotlightSet(target, getConnectors) {
47
47
  }
48
48
  return keep;
49
49
  }
50
+ /**
51
+ * The host that grants `target` the spotlight, or `null` when none does.
52
+ *
53
+ * A host qualifies when its type was REGISTERED as a spotlight host
54
+ * (`SpotlightHostExtension`), when it did not opt out (`spotlightEnabled:
55
+ * false`, its toolbar toggle) and when its bounds contain the target. A
56
+ * background whose type is not registered grants nothing, whatever fields it
57
+ * carries — that is how the EDGY facets Venn stopped spotlighting (#195).
58
+ *
59
+ * Pure — exported for unit tests.
60
+ */
61
+ export function findSpotlightHost(target, elements, hostTypes) {
62
+ return (elements.find(el => hostTypes.includes(el.type) &&
63
+ el.spotlightEnabled !== false &&
64
+ el.elementBound.contains(target.elementBound)) ?? null);
65
+ }
50
66
  /** Delay before a new spotlight is applied / cleared, so brushing across
51
67
  * elements doesn't flash the fade on and off. */
52
68
  const SPOTLIGHT_DELAY_MS = 140;
@@ -120,9 +136,7 @@ export class SpotlightManager extends InteractivityExtension {
120
136
  // The behavior is granted by a host whose bounds contain the target —
121
137
  // unless that host opted out (`spotlightEnabled: false`, toolbar toggle).
122
138
  const host = target
123
- ? surface.elementModels.find(el => hostTypes.includes(el.type) &&
124
- el.spotlightEnabled !== false &&
125
- el.elementBound.contains(target.elementBound))
139
+ ? findSpotlightHost(target, surface.elementModels, hostTypes)
126
140
  : null;
127
141
  if (!target || !host) {
128
142
  // Debounced restore: brushing across the gaps between elements must not
@@ -0,0 +1,107 @@
1
+ import type { InterchangeImportContext, InterchangeImportResult } from './interchange.js';
2
+ /**
3
+ * **SVG → a canvas sketch.** The platform's VISUAL-tier importer, shared by
4
+ * every framework that declares it (`docs/adr/0012`, P2).
5
+ *
6
+ * ## The heuristics statement, and its known failure modes
7
+ *
8
+ * _This paragraph is ADR 0012's open question 2 — "each visual capability owes
9
+ * a one-paragraph statement of its heuristics and its known failure modes" —
10
+ * answered ONCE, here, because every framework that declares `…:svg:import`
11
+ * wraps this one function and therefore owes the same statement. It is
12
+ * referenced by `bpmn:svg:import` and by `wardley:svg:import`; a framework that
13
+ * ever wants a narrower or wider guess writes its own parser and its own
14
+ * paragraph beside it._
15
+ *
16
+ * **What it guesses.** An SVG carries a rendering, not a model, so this reader
17
+ * recognises GEOMETRY and nothing else: `<rect>` becomes a rectangle,
18
+ * `<circle>` and `<ellipse>` an ellipse, `<polygon>` a polygon, `<line>`,
19
+ * `<polyline>` and `<path>` a brush stroke sampled at its vertices, and
20
+ * `<text>` an editable free-text element. Fill, stroke, stroke width, font size
21
+ * and text anchor are carried across where the shape model has a direct
22
+ * equivalent, with CSS inheritance down `<g>` honoured and colours passed
23
+ * through verbatim. Coordinates are user units placed by the outermost
24
+ * viewport: the `viewBox` origin is subtracted and the `viewBox`-to-`width`
25
+ * scale is applied uniformly (`min(width / viewBox width, height / viewBox
26
+ * height)`, which is what the default `preserveAspectRatio` means), then every
27
+ * `translate(…)` on the way down. Everything it emits is an ADR 0007 **level 1**
28
+ * element — a plain shape on the free surface, which the author then PROMOTES.
29
+ * It recognises no role, no relation and no framework vocabulary, and it never
30
+ * claims to: a Wardley component and a text box are both `<rect>` plus
31
+ * `<text>`, and deciding which is which is the one question only the author can
32
+ * answer.
33
+ *
34
+ * **Where it is known to be wrong, and the list is meant to be complete.** A
35
+ * `scale`, `rotate`, `matrix` or `skew` transform is IGNORED rather than
36
+ * applied, so anything under one lands at its untransformed position and size.
37
+ * Curves (`C`, `S`, `Q`, `T`, `A`) are flattened to their endpoints, so a
38
+ * rounded connector arrives as a polyline through its anchor points and an arc
39
+ * that doubles back arrives as a straight line. A `<path>` that outlines a
40
+ * filled region (an arrowhead, an icon glyph) arrives as an open stroke, not as
41
+ * a filled shape. `<image>`, `<defs>`, `<marker>`, gradients, filters,
42
+ * `<clipPath>` and `<mask>` are skipped by the reader, and `<use>` and
43
+ * `<foreignObject>` never reach it at all — the SANITIZER removes them, because
44
+ * they are two of the constructs an SVG can carry code in. A `<style>` sheet is
45
+ * skipped, and that one is worth naming twice: mermaid paints almost entirely
46
+ * through CSS classes, so a mermaid SVG arrives in the initial colours — mostly
47
+ * black — with only the note to say why. `<title>`, `<desc>` and `<metadata>`
48
+ * are dropped in silence, deliberately and as the only exception to the rule
49
+ * below: they render nothing, so there is nothing to have lost.
50
+ *
51
+ * **What this reader alters without a note, because a note could not help.**
52
+ * Text width and height are ESTIMATED from the font size and the character
53
+ * count, because measuring text needs a font a pure function of a string is not
54
+ * allowed to have, so a label box is approximately and not exactly the size it
55
+ * was. Whitespace inside a label is collapsed to single spaces and trimmed
56
+ * (`xml:space="preserve"` is not honoured). A `<tspan>`'s own `x`/`y`, its `dx`
57
+ * / `dy` offsets and `dominant-baseline` are ignored, so a label laid out span
58
+ * by span arrives as plain stacked lines in document order. `stroke-dasharray`
59
+ * is not read, so a dashed line arrives solid. `em` font sizes are resolved
60
+ * against the inherited size only, with no font-relative refinement.
61
+ *
62
+ * **Everything else is reported.** Every OTHER construct this reader ignores,
63
+ * alters or cannot resolve produces exactly one `warning` note per KIND — never
64
+ * one per instance — so a result that looks empty always says why.
65
+ *
66
+ * ## What it never does
67
+ *
68
+ * **It writes no `interchange` payload, on any element, ever** — P2's hard
69
+ * rule, pinned by an anti-decay test in this package's own spec. There is
70
+ * nothing to preserve that the elements do not already carry: an SVG round-trip
71
+ * would be a re-render rather than a round-trip, and a payload would advertise
72
+ * a promise this tier deliberately does not make. `carried` and `quarantined`
73
+ * are therefore `0` in every report it returns, and the surface that offers the
74
+ * import must say all of this BEFORE the file is read.
75
+ *
76
+ * ## Pure, and framework-agnostic
77
+ *
78
+ * Text in, serialized element props out (P3): no `std`, no surface, no DI, so
79
+ * labre-mcp calls the very same function the editor commands call. It produces
80
+ * only generic `shape` / `text` / `brush` props and knows the name of no
81
+ * framework — which is exactly why several frameworks can declare it. ADR 0012
82
+ * explicitly rejects inferring one framework from a `.svg`, so the capability
83
+ * is declared per framework and this parser is what each of them wraps.
84
+ */
85
+ /**
86
+ * The format id. Never used as a payload key, unlike every semantic format's —
87
+ * a visual import writes no payload at all — but it is what the report's
88
+ * headline calls itself ("SVG imported"), and what the registry's triple is
89
+ * built from.
90
+ */
91
+ export declare const SVG_SKETCH_FORMAT_ID = "svg";
92
+ export declare const SVG_SKETCH_EXTENSION = ".svg";
93
+ export declare const SVG_SKETCH_MIME = "image/svg+xml";
94
+ /**
95
+ * An SVG file as a canvas sketch — the shared VISUAL-tier importer.
96
+ *
97
+ * See this module's own documentation for the heuristics statement and the
98
+ * known failure modes (ADR 0012, open question 2). The contract in one
99
+ * sentence: the picture arrives as editable elements, and nothing else is
100
+ * promised.
101
+ *
102
+ * A blank or unrecognisable drawing is `0` elements and a note, NOT an
103
+ * exception: the file was read, it simply held nothing this reader draws, and a
104
+ * throw would show the user an error toast where the truth is a remark.
105
+ * Malformed XML is the exception, because then the file was not read at all.
106
+ */
107
+ export declare function parseSvgSketch(source: string, context?: InterchangeImportContext): InterchangeImportResult;