@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
@@ -61,8 +61,34 @@ export type ProfileSeverity = ViolationSeverity | 'off';
61
61
  * - `relative-order-along-axis` — the two elements a TYPED EDGE links must sit
62
62
  * in the order that edge states, along one axis of the frame. The first
63
63
  * family whose subject is a RELATION rather than an element or a proximity.
64
+ * - `relation-endpoints` — WHAT a typed edge is allowed to run between, and how
65
+ * many times. The grammar of a framework's relations, read off the roles at
66
+ * the two ends rather than off the geometry: the same relation between the
67
+ * same two artefacts is right or wrong wherever they happen to be drawn.
68
+ * - `element-in-zone` — the subject must sit inside (or outside) named ZONES of
69
+ * the frame it is on. `element-in-background` asks whether an artefact is on
70
+ * the map at all; this one asks whether it is in the right REGION of it.
71
+ * - `edge-degree` — how many typed edges of one role may arrive at, and leave,
72
+ * one node. The first family whose subject is a node but whose evidence is
73
+ * its RELATIONS: nothing about where it is drawn takes part.
74
+ * - `role-count` — how many subjects of one role one INSTANCE of the frame must
75
+ * carry. Existence and uniqueness, counted per frame and reported ON it.
76
+ * - `edge-locality` — a typed edge must stay inside one instance of the frame,
77
+ * or must cross between two. Where `relation-endpoints` asks what a relation
78
+ * runs between, this asks which FRAMES its two ends belong to.
79
+ * - `reachability` — every subject must be reachable from a declared root by
80
+ * following typed edges. The first family that builds a graph rather than
81
+ * walking elements, and the only one that is not local to one element or one
82
+ * relation.
83
+ * - `label-presence` — the subject must be NAMED. The first family that reads
84
+ * an element's words rather than its geometry, its role or its relations.
85
+ * - `view-admissibility` — which roles a frame ADMITS, read off a level the
86
+ * frame itself declares. The first family whose question is asked of the
87
+ * VIEW rather than of the artefact: every other one starts from a subject and
88
+ * looks around it, this one starts from the sheet and asks what has been
89
+ * drawn on it.
64
90
  */
65
- export type RuleFamily = 'element-in-background' | 'orientation-against-axis' | 'attachment' | 'no-overlap' | 'relative-order-along-axis' | 'tone-convention' | 'majority-fact';
91
+ export type RuleFamily = 'element-in-background' | 'orientation-against-axis' | 'attachment' | 'no-overlap' | 'relative-order-along-axis' | 'relation-endpoints' | 'element-in-zone' | 'tone-convention' | 'majority-fact' | 'edge-degree' | 'role-count' | 'edge-locality' | 'reachability' | 'label-presence' | 'view-admissibility';
66
92
  /**
67
93
  * WHEN a rule is evaluated (PF5.14).
68
94
  *
@@ -296,6 +322,642 @@ export interface RelativeOrderDef {
296
322
  */
297
323
  toleranceRatio?: number;
298
324
  }
325
+ /**
326
+ * One sanctioned sentence of a framework's relation grammar: `source` _edge_
327
+ * `target`, all three named by ROLE.
328
+ *
329
+ * Read exactly the way `docs/adr/0010` says an edge is read — the source is the
330
+ * subject of the verb, the target its object — so a triplet is a sentence a
331
+ * practitioner would say out loud: an actor issues a command, a command lands on
332
+ * an aggregate, an aggregate raises an event. Each side matches by
333
+ * {@link roleIsA}, so a triplet written on a parent role covers every
334
+ * specialisation of it for free.
335
+ */
336
+ export interface EndpointTriplet {
337
+ source: RoleId;
338
+ edge: RoleId;
339
+ target: RoleId;
340
+ }
341
+ /**
342
+ * `relation-endpoints` configuration — the grammar of a framework's relations.
343
+ *
344
+ * Where `relative-order-along-axis` asks whether the two ends of a relation are
345
+ * in the right PLACE, this family asks whether they are the right THINGS. It
346
+ * reads the persisted `source → target` pair and the roles the two ends carry,
347
+ * and nothing else: no coordinate takes part, so the verdict survives every
348
+ * layout of the same document.
349
+ *
350
+ * ## Four ways of failing, four sentences
351
+ *
352
+ * A relation can be wrong in ways the user fixes with four different gestures —
353
+ * re-point an end, delete a loop, delete a copy, choose between two patterns —
354
+ * so each mode carries its own {@link RuleMessage} and falls back to the rule's
355
+ * own words when a framework declares none. Same precedent as
356
+ * {@link AttachmentDef.offBoundary}, for the same reason: one sentence covering
357
+ * four mistakes describes none of them.
358
+ */
359
+ export interface RelationEndpointsDef {
360
+ /**
361
+ * The EDGE role whose ends are read. An element matching it (or specialising
362
+ * it) is one subject of the rule; every other edge on the board is none of
363
+ * its business — a free connector somebody drew to point at something is not
364
+ * a claim about the model.
365
+ */
366
+ edgeRole: RoleId;
367
+ /**
368
+ * The sanctioned sentences. Absent means the shape of the relation is not
369
+ * judged at all, which is what a rule that only forbids loops or duplicates
370
+ * declares.
371
+ *
372
+ * ## The alphabet, and why an unknown end is SILENCE
373
+ *
374
+ * The roles cited by the triplets — every `source` and every `target` — form
375
+ * the alphabet this rule speaks. An edge with an end OUTSIDE that alphabet is
376
+ * not evaluated at all: not the matrix, not the loop, not the duplicate.
377
+ *
378
+ * A hard requirement, and the one that makes the family shippable. A flow
379
+ * drawn onto an Event Storming hotspot, or onto a plain rectangle somebody
380
+ * dropped on the board to think with, is a DRAFT — the user is saying "there
381
+ * is something here", and a tool that answered "that arc is forbidden" would
382
+ * be indicting the act of sketching. The frameworks' own grammars are written
383
+ * on a handful of artefacts each; everything else on the canvas has to stay
384
+ * outside the conversation (PRD principle 8).
385
+ */
386
+ allowed?: readonly EndpointTriplet[];
387
+ /**
388
+ * Pairs of edge roles that may not BOTH be drawn between the same two
389
+ * elements. The node pair is unordered — two contexts related twice are
390
+ * related twice whichever end each relation starts from — and so is the role
391
+ * pair: `[acl, conformist]` and `[conformist, acl]` are one requirement.
392
+ *
393
+ * The Context Mapping case: a downstream context protecting itself with an
394
+ * anti-corruption layer is not simultaneously conforming to its upstream. Both
395
+ * relations are legitimate on their own; together they are a contradiction,
396
+ * and only the pair can say so.
397
+ */
398
+ exclusivePairs?: readonly (readonly [RoleId, RoleId])[];
399
+ /**
400
+ * Whether an edge whose two ends are the SAME element is a finding.
401
+ *
402
+ * Absent, a self-loop is silence — total silence, even when the matrix says
403
+ * nothing about it. A loop is either a deliberate notation (a process that
404
+ * feeds itself) or a hand that dropped the second end on the first, and a
405
+ * framework that has not decided which has not asked to be told about it.
406
+ */
407
+ forbidSelfLoop?: boolean;
408
+ /** Whether the SAME relation drawn twice between the same ordered pair is a finding. */
409
+ forbidDuplicate?: boolean;
410
+ /** Words for an edge whose sentence is not in {@link allowed}. */
411
+ offMatrix?: RuleMessage;
412
+ /** Words for an edge that loops back onto its own source. */
413
+ selfLoop?: RuleMessage;
414
+ /** Words for the second copy of a relation that already exists. */
415
+ duplicate?: RuleMessage;
416
+ /** Words for two relations of {@link exclusivePairs} drawn between one pair. */
417
+ exclusive?: RuleMessage;
418
+ /**
419
+ * Words for a NEUTRAL connector drawn between two artefacts of this rule's
420
+ * own vocabulary — and, by being present at all, the request to look for one.
421
+ * Absent, a role-less link is invisible to this family, which is what every
422
+ * rule written before this field means.
423
+ *
424
+ * ## The gap this closes
425
+ *
426
+ * A framework's edge tool stamps a role. Quick-connect and auto-complete do
427
+ * not: releasing the canvas' own link gesture between two artefacts produces a
428
+ * connector carrying NO role, so it says nothing to any of the four verdicts
429
+ * above — the grammar reads it as absent, and the user reads it as drawn. A
430
+ * process whose steps are joined by such links looks connected and validates
431
+ * as if nobody had joined anything.
432
+ *
433
+ * ## Why BOTH ends must be artefacts this grammar could have related
434
+ *
435
+ * The same proportionality that makes {@link allowed}'s alphabet a hard
436
+ * requirement, applied one level up. A plain connector from an artefact to a
437
+ * sticky note, to a legend glyph, to a shape somebody dropped on the board, is
438
+ * an annotation and none of the framework's business — pointing at things is
439
+ * what a whiteboard is for. A plain connector between two artefacts this
440
+ * rule's own sentences run between is the only case where the user can be
441
+ * presumed to have meant a typed relation and reached for the wrong gesture.
442
+ *
443
+ * "Could have related" is read off {@link allowed}'s own ALPHABET when the
444
+ * rule declares a matrix: the roles its triplets name as a source or a target,
445
+ * matched with {@link roleIsA} so a specialisation counts. That is the
446
+ * tightest honest reading, and it excludes — with nothing for an author to
447
+ * remember — every role a framework declares for something that is not an
448
+ * endpoint of anything: the background role, a legend glyph, a lane. Presuming
449
+ * somebody meant to draw a typed relation onto a POOL is exactly the
450
+ * over-firing this test exists to prevent.
451
+ *
452
+ * A rule declaring NO matrix has no alphabet to read, so it falls back to
453
+ * membership in its own {@link ValidationRule.roles} — never to a prefix match
454
+ * on the `framework:` half of the role id. The namespace is a naming
455
+ * CONVENTION (`role.ts` says so, and types the id as a bare string); the
456
+ * vocabulary is DATA the framework hands the engine. Reading the data cannot
457
+ * be wrong about a framework that spells its own prefix differently, and it
458
+ * keeps this file free of string surgery on ids it does not own.
459
+ *
460
+ * `roles` stays purely the dictionary the inheritance walk reads either way.
461
+ * It is never overloaded into a filter, so an author never has to shrink the
462
+ * vocabulary a rule's other clauses depend on in order to change what this
463
+ * one flags.
464
+ */
465
+ flagNeutral?: RuleMessage;
466
+ }
467
+ /**
468
+ * `edge-degree` configuration — the CARDINALITY of a framework's relations, read
469
+ * at a node.
470
+ *
471
+ * "A start event has no incoming sequence flow"; "a task has at least one".
472
+ * Where {@link RelationEndpointsDef} judges one relation against the roles at
473
+ * its ends, this judges one NODE against how many relations reach it — the other
474
+ * half of a relation grammar, and the half no per-edge rule can express, because
475
+ * the mistake is a COUNT and nothing is wrong with any single link.
476
+ *
477
+ * ## Read off the persisted ends, never off the geometry
478
+ *
479
+ * Same reading as `docs/adr/0010`: an edge's `source` is the subject of its
480
+ * verb and its `target` the object, so "incoming" and "outgoing" are properties
481
+ * of the document and not of which way somebody dragged. Nothing here consults a
482
+ * coordinate, so the verdict survives every layout of the same process.
483
+ */
484
+ export interface EdgeDegreeDef {
485
+ /**
486
+ * The EDGE role being counted. An element matching it (or specialising it)
487
+ * counts; every other link on the board is none of this rule's business — a
488
+ * message flow arriving at a task says nothing about how many sequence flows
489
+ * do.
490
+ */
491
+ edgeRole: RoleId;
492
+ /** Fewest edges of that role that may ARRIVE at the subject. */
493
+ minIn?: number;
494
+ /** Most edges of that role that may ARRIVE at the subject. */
495
+ maxIn?: number;
496
+ /** Fewest edges of that role that may LEAVE the subject. */
497
+ minOut?: number;
498
+ /** Most edges of that role that may LEAVE the subject. */
499
+ maxOut?: number;
500
+ /**
501
+ * A DISJUNCTIVE floor: the subject must reach this count on at least ONE
502
+ * side. The finding falls only when BOTH the incoming and the outgoing count
503
+ * are short of it.
504
+ *
505
+ * ## Why a fifth bound rather than two of the four
506
+ *
507
+ * The four above are conjunctive — declare `minIn` and `minOut` together and
508
+ * the subject has to satisfy both — and there is a whole class of normative
509
+ * shape that says the opposite: an artefact must do one thing OR the other,
510
+ * and doing either is enough. A branching artefact that neither splits nor
511
+ * merges is the canonical one: it takes one thing in, puts one thing out and
512
+ * decides nothing, which is a node somebody drew and then never gave a job.
513
+ * `minIn: 2` would indict every split, `minOut: 2` every merge; the
514
+ * requirement is genuinely "at least one of the two", and no conjunction of
515
+ * per-direction bounds expresses it.
516
+ *
517
+ * ## Composition
518
+ *
519
+ * Orthogonal to the four, and evaluated after them: a rule may cap one side
520
+ * with `maxIn` and still ask for two on either side, and each bound keeps its
521
+ * own sentence. Absent — the case for every rule written before it existed —
522
+ * nothing is asked and nothing is counted.
523
+ */
524
+ eitherMin?: number;
525
+ /**
526
+ * A FORBIDDEN ZONE: the shape of degree a subject may not have, declared as
527
+ * the bounds it must NOT all satisfy at once.
528
+ *
529
+ * The inverse polarity of every bound above. `minIn`/`maxIn`/`minOut`/`maxOut`
530
+ * here read exactly as they do there — `minIn: 2` means "two or more arrive" —
531
+ * but the rule fires when the node matches ALL of the ones supplied, instead of
532
+ * when it misses one.
533
+ *
534
+ * ## Why the inverse cannot be written with the bounds
535
+ *
536
+ * Two shapes want it, and neither is expressible as a floor or a ceiling:
537
+ *
538
+ * - an artefact that MERGES and SPLITS at once — `{ minIn: 2, minOut: 2 }`.
539
+ * Both halves are individually fine and their conjunction is ambiguous, so
540
+ * the rule is about the pair and about nothing else;
541
+ * - an artefact that does NEITHER — `{ maxIn: 1, maxOut: 1 }`. A ceiling on
542
+ * each side alone forbids the legitimate split and the legitimate merge; only
543
+ * their conjunction describes the artefact that decides nothing.
544
+ *
545
+ * The second one is the same requirement {@link eitherMin} states from the
546
+ * other side, and a framework may write it either way — `eitherMin: 2` and
547
+ * `forbidPattern: { maxIn: 1, maxOut: 1 }` are the same set of nodes. Both are
548
+ * offered because a rule reads best when its data says what its sentence says,
549
+ * and the two sentences a notation actually writes are "a gateway must branch"
550
+ * and "a gateway that does nothing is superfluous".
551
+ *
552
+ * ## A pattern of ONE bound is legal, and always redundant
553
+ *
554
+ * `{ minIn: 2 }` fires on `in >= 2`, which is what `maxIn: 1` already says, and
555
+ * `{ maxIn: 1 }` alone is `minIn: 2`. Coherent under the rule above and left
556
+ * legal rather than warned about — the conjunction of one is still a
557
+ * conjunction, and a framework mid-edit should not be shouted at. But a
558
+ * one-bound pattern is never the reason to reach for this field: write the
559
+ * plain inverse bound, which carries a per-direction sentence naming the side
560
+ * the user has to act on.
561
+ *
562
+ * ## Words, and the empty pattern
563
+ *
564
+ * The pattern carries its OWN message rather than a slot beside the others: a
565
+ * forbidden zone is not a bound that failed, and its sentence never reads like
566
+ * one. `RuleMessage` is intersected rather than optional, so the type system
567
+ * requires that sentence — this is the one bound with no `?? rule` fallback,
568
+ * because it is the one that can never borrow the rule's own words honestly.
569
+ *
570
+ * A pattern supplying no bound at all is satisfied by every node, which would
571
+ * indict the whole board — it warns once and is not evaluated.
572
+ */
573
+ forbidPattern?: RuleMessage & {
574
+ minIn?: number;
575
+ maxIn?: number;
576
+ minOut?: number;
577
+ maxOut?: number;
578
+ };
579
+ /**
580
+ * Words for each bound, when a rule declaring more than one wants to say
581
+ * something other than its own message.
582
+ *
583
+ * The {@link AttachmentDef.offBoundary} precedent, for the same reason: "a
584
+ * start event begins the process" covers both "something points at it" and
585
+ * "nothing leaves it", and the two are fixed by opposite gestures. A rule
586
+ * declaring a single bound needs none — its own message is the only thing it
587
+ * can be saying.
588
+ */
589
+ tooFewIn?: RuleMessage;
590
+ /** Words for {@link maxIn}. */
591
+ tooManyIn?: RuleMessage;
592
+ /** Words for {@link minOut}. */
593
+ tooFewOut?: RuleMessage;
594
+ /** Words for {@link maxOut}. */
595
+ tooManyOut?: RuleMessage;
596
+ /**
597
+ * Words for {@link eitherMin} — the one bound whose sentence is genuinely
598
+ * about NEITHER side, and therefore the one a per-direction message could
599
+ * never carry.
600
+ */
601
+ neither?: RuleMessage;
602
+ }
603
+ /**
604
+ * `role-count` configuration — existence and uniqueness, counted per INSTANCE of
605
+ * the frame.
606
+ *
607
+ * "A pool holds exactly one start event." The subject of the finding is not any
608
+ * one element — no start event is wrong, there are simply none or three — so the
609
+ * finding is raised ON THE FRAME, exactly like {@link MajorityDef}'s remark
610
+ * about a map. That is what puts the bracket on the pool, and what makes the
611
+ * `map` exemption scope reach it: `raise` stamps the frame as the finding's own
612
+ * {@link Violation.backgroundId}, so an arbitration made on one pool covers that
613
+ * pool and no other on the board.
614
+ */
615
+ export interface RoleCountDef {
616
+ /**
617
+ * The role being counted, matched by {@link roleIsA} — a rule counting
618
+ * `bpmn:start-event` counts its message and timer variants too, which is the
619
+ * only reading under which "one start event" stays one requirement as the
620
+ * vocabulary grows.
621
+ */
622
+ subject: RoleId;
623
+ /**
624
+ * Count only the elements whose role IS {@link subject}, without descending
625
+ * into its specialisations.
626
+ *
627
+ * The default — `roleIsA`, the reading every other role test in this engine
628
+ * uses — is right whenever the requirement is about the FAMILY: "one
629
+ * beginning" means one beginning of any kind, and a vocabulary that grows a
630
+ * new variant inherits the rule for free.
631
+ *
632
+ * It is wrong when the requirement is about the PLAIN member of a family, as
633
+ * distinct from its qualified siblings: "at most one UNQUALIFIED beginning per
634
+ * frame" is a statement about the artefact that carries no qualifier, and
635
+ * several qualified ones beside it are exactly what the notation is for. Under
636
+ * the descending reading that rule cannot be written at all — every variant
637
+ * would count towards a bound meant for the plain one alone.
638
+ *
639
+ * Applies to the SUBJECT only. {@link ifPresent} keeps descending, and
640
+ * deliberately: a guard asks "is there one of these at all", which is a
641
+ * question about the family whatever the bound beside it counts. A framework
642
+ * needing the exact reading on both sides has not turned up yet, and inventing
643
+ * a second flag for it would be data nobody can read.
644
+ */
645
+ exact?: boolean;
646
+ /** Fewest subjects one instance of the frame must carry. */
647
+ min?: number;
648
+ /** Most subjects one instance of the frame may carry. */
649
+ max?: number;
650
+ /**
651
+ * A GUARD: the bounds apply to a frame only while that frame also holds at
652
+ * least one element whose role is (or specialises) this one. A frame holding
653
+ * none is not judged at all — not "judged and found compliant", not walked.
654
+ *
655
+ * ## Why a notation needs this, and why it is not `min` with a different face
656
+ *
657
+ * Whole families of artefact are OPTIONAL on their own and NORMATIVE in
658
+ * pairs. A sketch may legitimately show neither a beginning nor an end; what
659
+ * it may not show is one without the other, because a reader who sees where
660
+ * the work finishes will look for where it starts, and finding nothing is a
661
+ * question the drawing cannot answer.
662
+ *
663
+ * An unconditional `min: 1` would state the wrong thing twice over: it would
664
+ * indict the perfectly legitimate sketch that declares neither, and it would
665
+ * be doing so in the name of a requirement the notation does not make. The
666
+ * PAIRING is the requirement, and a pairing is exactly a bound plus a guard.
667
+ *
668
+ * Two rules, mirrored, then say the whole of it — "if there is an end there
669
+ * must be a start", "if there is a start there must be an end" — and each is
670
+ * one line of data. That is the shape this field is for.
671
+ *
672
+ * ## Same attribution as the subject
673
+ *
674
+ * The guard element must be IN the frame, on the same containment-only
675
+ * reading {@link evaluateRoleCount} uses for the subjects it counts: an
676
+ * artefact floating beside a pool no more arms a requirement about that pool
677
+ * than it satisfies one. Absent, the bounds apply to every instance, which is
678
+ * what every rule written before this field means.
679
+ */
680
+ ifPresent?: RoleId;
681
+ /** Words for {@link min} — see {@link EdgeDegreeDef.tooFewIn}. */
682
+ tooFew?: RuleMessage;
683
+ /** Words for {@link max}. */
684
+ tooMany?: RuleMessage;
685
+ }
686
+ /**
687
+ * `edge-locality` configuration — a relation constrained relative to the frame
688
+ * instances its two ends sit on.
689
+ *
690
+ * The canonical pair a swimlane notation is built on, and both halves of it are
691
+ * one declaration away from each other: a sequence flow stays inside one pool
692
+ * (`same-background`), a message flow only exists BETWEEN pools
693
+ * (`cross-background`). Neither is expressible by {@link RelationEndpointsDef}:
694
+ * the two ends carry exactly the same roles in the legal case and the illegal
695
+ * one, and the only thing that differs is which frame each of them is drawn on.
696
+ */
697
+ export interface EdgeLocalityDef {
698
+ /** The EDGE role being constrained, matched by {@link roleIsA}. */
699
+ edgeRole: RoleId;
700
+ /**
701
+ * `'same-background'` — the two ends must belong to ONE instance, and two
702
+ * different ones are the finding; `'cross-background'` — the two ends must
703
+ * belong to different instances, and one instance is the finding.
704
+ */
705
+ mode: 'same-background' | 'cross-background';
706
+ }
707
+ /**
708
+ * `reachability` configuration — every subject must be reachable from a declared
709
+ * ROOT by following typed edges.
710
+ *
711
+ * The orphan question, and the first one in this engine that no amount of
712
+ * looking at an element or at a relation can answer: a task with a perfectly
713
+ * good sequence flow on either side is still unreachable if the chain it belongs
714
+ * to never starts anywhere. Only the graph knows.
715
+ */
716
+ export interface ReachabilityDef {
717
+ /**
718
+ * Where the traversal STARTS. Every element whose role is (or specialises)
719
+ * this one is a root, and a board carrying none silences the rule whole — see
720
+ * {@link evaluateReachability}, and {@link implicitRoots} for the second kind
721
+ * of root a notation with an optional start marker needs.
722
+ */
723
+ rootRole: RoleId;
724
+ /** The role whose elements must be reachable. */
725
+ subjectRole: RoleId;
726
+ /** The edge role that is FOLLOWED, source → target, and only that way. */
727
+ edgeRole: RoleId;
728
+ /**
729
+ * Also treat every SUBJECT that nothing points at as a root — in-degree zero
730
+ * along {@link edgeRole}.
731
+ *
732
+ * ## What this changes, and what it is for
733
+ *
734
+ * A notation where the explicit start marker is OPTIONAL has a second, silent
735
+ * way of saying "the work begins here": draw the artefact and point nothing at
736
+ * it. Two branches of a process running side by side, only one of them given a
737
+ * start marker, are both perfectly well-formed — and a traversal that only
738
+ * left from the marker would report the whole of the second branch as
739
+ * unreachable, which is a wall of brackets over a drawing that is right.
740
+ *
741
+ * ## What is left, exactly
742
+ *
743
+ * A subject fires when it has an incoming counted edge — so it is not an
744
+ * implicit root — and no root ever reaches it. Two shapes satisfy that, and
745
+ * the second one is easy to forget:
746
+ *
747
+ * 1. a RING entered from nowhere: artefacts pointing round at each other, each
748
+ * with an incoming edge and none of them reachable from outside. The real
749
+ * defect, and the one this reading exists to keep visible — work that can
750
+ * never begin;
751
+ * 2. a subject fed ONLY by an edge the walk can never leave from: one whose
752
+ * `source` is a dangling id, or an element whose role is neither
753
+ * {@link rootRole} nor {@link subjectRole}. The edge disqualifies the
754
+ * subject as an implicit root, and its source is never enqueued, so nothing
755
+ * reaches it.
756
+ *
757
+ * The second shape is a BROKEN or FOREIGN edge, which is
758
+ * `relation-endpoints`' subject rather than this family's, and this family
759
+ * reports the consequence rather than the cause. It behaves identically with
760
+ * the flag off — it is inherited, not introduced here — so a framework that
761
+ * finds the report confusing wants a `relation-endpoints` rule beside this
762
+ * one, not a change to this flag.
763
+ *
764
+ * ## The zero-root gate still holds
765
+ *
766
+ * "No root on the board" becomes "no root of EITHER kind", and it is still
767
+ * total silence. In practice a board with any subject at all has an implicit
768
+ * root unless every subject is pointed at, so the gate stops being the thing
769
+ * that saves a blank sketch and becomes the thing that saves a board where the
770
+ * question genuinely does not arise.
771
+ *
772
+ * Absent or `false` is the original reading: only the declared role starts a
773
+ * traversal, and a board carrying no such element says nothing at all.
774
+ */
775
+ implicitRoots?: boolean;
776
+ }
777
+ /**
778
+ * `label-presence` configuration — the first brick of the PRD's *étiquetage*
779
+ * family, and the first family in this engine that reads an element's WORDS.
780
+ *
781
+ * "This step has no name." Every other family asks about geometry, roles or
782
+ * relations; this one asks whether the artefact says what it is. An unnamed box
783
+ * in the middle of a diagram is the one defect a reader cannot work around —
784
+ * they can infer a missing arrow from the layout, and they can infer nothing at
785
+ * all from an empty rectangle.
786
+ *
787
+ * ## Where the words come from
788
+ *
789
+ * The element's own `text`, read duck-typed exactly as {@link textInkBound}
790
+ * already reads it — the one property every artefact-bearing element model
791
+ * carries (a `Y.Text` on a shape, a connector label, a free text) and the only
792
+ * one the engine can read without importing a model. See {@link elementLabel}
793
+ * for what counts as empty.
794
+ *
795
+ * A framework whose artefacts are named by a SEPARATE element beside them — a
796
+ * text element sitting next to a node, the way a Wardley label does — is not
797
+ * asking this question, and this family cannot answer it: it reads the subject's
798
+ * own words and nothing else. That is a different family (a proximity between
799
+ * two roles), not a flag on this one.
800
+ */
801
+ export interface LabelPresenceDef {
802
+ /**
803
+ * The subject must carry a label. Written as a literal rather than a boolean
804
+ * because it is a DISCRIMINANT and not a switch: `present: false` would mean
805
+ * "this artefact must stay unnamed", which no notation asks for. The field
806
+ * exists so the questions this family grows next — a maximum length, a
807
+ * pattern, a name that must match the zone it sits in — arrive as siblings
808
+ * beside it rather than as a second family.
809
+ */
810
+ present: true;
811
+ }
812
+ /**
813
+ * `view-admissibility` configuration — WHICH ROLES the frame admits, given the
814
+ * level the frame itself declares.
815
+ *
816
+ * The engine names no framework and no level. It is handed the PROP the frame
817
+ * writes its level in, and a table keyed by the VALUES that prop can take: the
818
+ * same idiom `backgroundLabelText` and `backgroundInVariant` already use to read
819
+ * a declared prop off an instance, promoted to a rule so a verdict can turn on
820
+ * it. C4 is the first consumer — `levelProp: 'level'`, keyed by
821
+ * `context` / `container` / `component` — and nothing here knows that.
822
+ *
823
+ * ## Why the table is FORBIDDEN and not ADMITTED
824
+ *
825
+ * Because the honest default for a view is permissive. A C4 context diagram
826
+ * legitimately shows the people and the neighbouring systems around the one it
827
+ * is about; a container diagram legitimately shows the persons, the systems and
828
+ * the system boundary it zooms into. An allow-list would have to enumerate
829
+ * every one of those, and would indict every artefact the framework's author
830
+ * forgot — including the free rectangles, the notes and the legend glyphs a
831
+ * whiteboard is made of. A deny-list says only what the notation actually
832
+ * refuses, and everything it does not name is left alone (PRD principle 8).
833
+ *
834
+ * A level the table has no entry for — or whose entry is empty — is a level the
835
+ * rule has nothing to say about, and it evaluates NOTHING there. That is what
836
+ * lets a framework declare the two levels that forbid something and stay silent
837
+ * on the one that forbids nothing, rather than shipping a rule that can never
838
+ * fire.
839
+ */
840
+ export interface ViewAdmissibilityDef {
841
+ /**
842
+ * The prop the FRAME writes its level in, on the instance itself — `'level'`
843
+ * for a C4 board.
844
+ *
845
+ * A prop name and not a declared axis, a zone or a variant, because the level
846
+ * of a view is none of those: it is a fact the author states about the sheet,
847
+ * and the engine's job is to read it back where the framework says it is
848
+ * written. A frame whose prop holds nothing, or holds something that is not a
849
+ * non-empty string, has stated no level and is not judged.
850
+ */
851
+ levelProp: string;
852
+ /**
853
+ * Per level VALUE, the roles that view does not admit — matched by
854
+ * {@link roleIsA}, so naming a parent role covers its specialisations (C4's
855
+ * `c4:container` reaches `c4:database`, `c4:boundary` reaches both of its
856
+ * children).
857
+ *
858
+ * Own keys only when it is read: the table is an object literal shipped by a
859
+ * framework, so a frame whose level happened to say `'constructor'` must not
860
+ * resolve to something off the prototype.
861
+ */
862
+ forbidden: Readonly<Record<string, readonly RoleId[]>>;
863
+ }
864
+ /**
865
+ * `element-in-zone` configuration — the artefact is on the map, but is it in the
866
+ * right REGION of it?
867
+ *
868
+ * `element-in-background` frames a subject against the whole card; this frames
869
+ * it against the named zones the declaration already carries — the four
870
+ * quadrants of a Core Domain Chart, the phases of a Wardley map — so a rule can
871
+ * say "an outsourced subdomain has no business in the Core quadrant" without a
872
+ * single coordinate being restated anywhere.
873
+ *
874
+ * The zone rectangles come from the DECLARATION (ratios of the plot) resolved
875
+ * against the bounds of the instance the subject actually sits on, so the
876
+ * verdict survives the map being moved and resized, exactly like every other
877
+ * geometry in this engine.
878
+ */
879
+ export interface ElementInZoneDef {
880
+ /**
881
+ * The zones this rule is about, by their id in
882
+ * {@link FrameworkBackgroundDef.zones}. An id the frame does not declare is a
883
+ * typo in the data: the rule warns once and evaluates NOTHING rather than
884
+ * quietly measuring against the zones it happened to recognise — a smaller
885
+ * union is a different rule, and nobody would see the difference.
886
+ */
887
+ zoneIds: readonly string[];
888
+ /**
889
+ * `'inside'` — the subject belongs in one of those zones and is indicted
890
+ * anywhere else on the map; `'outside'` — the zones are forbidden ground.
891
+ */
892
+ expect: 'inside' | 'outside';
893
+ /**
894
+ * WHAT of the subject is measured. `'center'` (the default) reads the centre
895
+ * of its bounds — where the eye puts the artefact, and the only honest answer
896
+ * for something bigger than a cell. `'extent'` reads the whole box: `inside`
897
+ * then asks for full containment in ONE cited zone and `outside` for no shared
898
+ * area at all.
899
+ *
900
+ * Containment is tested zone by zone rather than against their union: a
901
+ * subject straddling two adjacent cited zones is precisely the ambiguous case
902
+ * a strict rule wants to hear about, and a union test would swallow it.
903
+ */
904
+ measure?: 'center' | 'extent';
905
+ }
906
+ /**
907
+ * WHERE a rule's authority comes from.
908
+ *
909
+ * - `standard` — the rule restates a normative sentence of a published
910
+ * specification. The tool is reporting a conformance defect.
911
+ * - `recommendation` — a SHOULD of the specification, or an industry linter's
912
+ * rule (bpmnlint, and its equivalents elsewhere). Widely agreed practice; not
913
+ * a conformance defect.
914
+ * - `labre-convention` — a house style of this editor, and nothing else. No
915
+ * norm speaks of it, and the rule must never let a user believe one does.
916
+ * - `organization` — a level of requirement an ORGANISATION adds on top, which
917
+ * the PRD names as future org profiles. Reserved: nothing declares it today.
918
+ */
919
+ export type ProvenanceSource = 'standard' | 'recommendation' | 'labre-convention' | 'organization';
920
+ /**
921
+ * Where a rule's authority comes from, as DATA rather than as prose buried in
922
+ * its message.
923
+ *
924
+ * A Labre convention presented as a norm violation is the one thing an
925
+ * architecture review will not forgive, and until now the distinction lived
926
+ * only in each rule's wording and in the comment above it — invisible to the
927
+ * UI, unqueryable by a host, unassertable by a test. Promoting it to a field is
928
+ * the same move the platform already made for severity and for moment: a rule
929
+ * says once, in its own declaration, what kind of thing it is.
930
+ *
931
+ * ## Purely descriptive
932
+ *
933
+ * **No evaluator reads it.** Not one of the fourteen family functions branches
934
+ * on it, `evaluateRules` and `evaluateCheckup` never look at it, and a rule
935
+ * declaring it evaluates identically to the same rule with the field removed
936
+ * ({@link ValidationRule.provenance} is pinned inert by a test). It exists for
937
+ * the violation bubble, for a conformance report, and for a host that wants to
938
+ * separate "your diagram breaks the standard" from "we suggest".
939
+ *
940
+ * ## One rule, one provenance
941
+ *
942
+ * The field describes THE RULE, so a rule whose clauses would answer
943
+ * differently is a rule that should be two — BPMN's sequence-flow endpoints
944
+ * (p.95, standard) and its no-self-loop house style split for exactly that
945
+ * reason, rather than declaring one provenance that is wrong half the time.
946
+ */
947
+ export interface RuleProvenance {
948
+ /** Where this rule's authority comes from. */
949
+ source: ProvenanceSource;
950
+ /**
951
+ * Human-readable citation — e.g. `'OMG BPMN 2.0.2 (ISO/IEC 19510) p.244'` or
952
+ * `'bpmnlint no-duplicate-sequence-flows'`.
953
+ *
954
+ * Prose, deliberately, and displayed VERBATIM: a page number, a clause, a
955
+ * linter rule name and a book chapter have nothing in common but being
956
+ * readable, and a schema that tried to model all four would model none of
957
+ * them. It is never translated — a citation is the same in every language.
958
+ */
959
+ reference?: string;
960
+ }
299
961
  /**
300
962
  * A rule is declarative, versioned data owned by its framework (PRD principle
301
963
  * 5) — never a subclass, never a closure. It is comparable, serializable and
@@ -324,14 +986,25 @@ export interface ValidationRule extends RuleMessage {
324
986
  * role (a generalist square, a free text) never matches — proportionality,
325
987
  * PRD principle 8.
326
988
  *
327
- * Absent for `no-overlap`, whose subjects are declared per PAIR: the rule has
328
- * no single subject role, and naming one would be data that lies.
989
+ * Absent for `no-overlap`, whose subjects are declared per PAIR, and for
990
+ * `view-admissibility`, whose subjects are declared per LEVEL: in both cases
991
+ * the rule has no single subject role, and naming one would be data that
992
+ * lies.
329
993
  */
330
994
  appliesTo?: RoleId;
331
995
  /** The framework's role vocabulary, for the inheritance walk. */
332
996
  roles: RoleDefs;
333
997
  /** Bumped when the rule's meaning changes, so a host can pin behaviour. */
334
998
  version: number;
999
+ /**
1000
+ * Where this rule's authority comes from — see {@link RuleProvenance}.
1001
+ *
1002
+ * Optional, framework-agnostic and purely DESCRIPTIVE: the engine's
1003
+ * evaluators never read it, so declaring it changes no verdict, no severity
1004
+ * and no message. A rule that omits it simply says nothing about its
1005
+ * authority, exactly as every rule did before the field existed.
1006
+ */
1007
+ provenance?: RuleProvenance;
335
1008
  /**
336
1009
  * The ROLE of the framework's background (`wardley:map`), i.e. the frame the
337
1010
  * subject roles are measured against.
@@ -364,6 +1037,10 @@ export interface ValidationRule extends RuleMessage {
364
1037
  overlap?: readonly OverlapPair[];
365
1038
  /** `relative-order-along-axis` only. */
366
1039
  relativeOrder?: RelativeOrderDef;
1040
+ /** `relation-endpoints` only. */
1041
+ endpoints?: RelationEndpointsDef;
1042
+ /** `element-in-zone` only. */
1043
+ inZone?: ElementInZoneDef;
367
1044
  /**
368
1045
  * `no-overlap` only: how DEEP a collision has to be, in model units, before
369
1046
  * it is worth reporting. Absent or `0` means any shared area at all.
@@ -383,6 +1060,21 @@ export interface ValidationRule extends RuleMessage {
383
1060
  tone?: ToneConventionDef;
384
1061
  /** `majority-fact` only. */
385
1062
  majority?: MajorityDef;
1063
+ /** `edge-degree` only: the subject nodes are named by {@link appliesTo}. */
1064
+ degree?: EdgeDegreeDef;
1065
+ /** `role-count` only: the frames are named by {@link backgroundRole}. */
1066
+ roleCount?: RoleCountDef;
1067
+ /** `edge-locality` only: the frames are named by {@link backgroundRole}. */
1068
+ locality?: EdgeLocalityDef;
1069
+ /** `reachability` only. */
1070
+ reachability?: ReachabilityDef;
1071
+ /** `label-presence` only: the subjects are named by {@link appliesTo}. */
1072
+ label?: LabelPresenceDef;
1073
+ /**
1074
+ * `view-admissibility` only: the views are named by {@link backgroundRole},
1075
+ * and the subjects by the level the view declares.
1076
+ */
1077
+ admissibility?: ViewAdmissibilityDef;
386
1078
  }
387
1079
  /**
388
1080
  * A level of requirement, as DATA (PF9) — the same declarative, versioned,
@@ -406,8 +1098,13 @@ export interface ValidationRule extends RuleMessage {
406
1098
  *
407
1099
  * A profile is CHOSEN per root instance, on the framework's background element
408
1100
  * (`GfxPrimitiveElementModel.validationProfile`) — see PF9.1. Two maps on one
409
- * canvas therefore hold two independent levels of requirement, and a background
410
- * that names none is checked against its framework's {@link isDefault} profile.
1101
+ * canvas therefore hold two independent levels of requirement.
1102
+ *
1103
+ * A background that names none INHERITS the choice made on the frame it is
1104
+ * drawn inside ({@link inheritChosenProfiles}), and falls back to its
1105
+ * framework's {@link isDefault} profile only when it sits inside nothing that
1106
+ * chose. That is what lets a framework offer the picker on its outer frame
1107
+ * alone and still govern the rules it frames against an inner one.
411
1108
  */
412
1109
  export interface ValidationProfile {
413
1110
  /** Stable id, namespaced by framework: `wardley.sketch`. */
@@ -759,6 +1456,78 @@ export declare const ValidationProfileIdentifier: import("../../global/di/types.
759
1456
  * ```
760
1457
  */
761
1458
  export declare function ValidationProfileExtension(profiles: readonly ValidationProfile[]): ExtensionType;
1459
+ /**
1460
+ * A framework declaring that a ROLE is one of its root instances — with no rule
1461
+ * to derive it from.
1462
+ *
1463
+ * ## Why this exists
1464
+ *
1465
+ * Until now, "is this element a framework's frame" was read off the registered
1466
+ * rules: a rule names the role of the background it measures against, so the
1467
+ * answer came for free and no framework had to say the same thing twice. It is
1468
+ * still the answer for every framework that ships a rule, and this declaration
1469
+ * changes none of it.
1470
+ *
1471
+ * What it fixes is the framework that ships NONE. Estuarine has nudges and a
1472
+ * quality panel and nothing the tool can compute — a map's constraints are
1473
+ * negotiated, not measured — so under the derived-only gate its background was a
1474
+ * root instance of nothing, its checklist was offered on no element, and the
1475
+ * only way to give it one would have been to invent a rule that never fires.
1476
+ * Data claiming an effect it does not have is the one thing this engine has
1477
+ * refused everywhere else (see the Wardley `blocking-overridable` note); so the
1478
+ * gate gets a second, explicit source instead.
1479
+ *
1480
+ * Registered from the FLAG-GATED view extension, beside the rules and the
1481
+ * nudges: being a root instance is what the tooling is offered ON, so it goes
1482
+ * off with the tooling and the ids already written on the element go unread
1483
+ * until the flag comes back.
1484
+ */
1485
+ export interface ValidationFrameworkDef {
1486
+ /** Owning framework, `estuarine`. */
1487
+ framework: string;
1488
+ /** The role its background carries — the same thing a rule's `backgroundRole` names. */
1489
+ backgroundRole: RoleId;
1490
+ /** The framework's role vocabulary, for the inheritance walk. */
1491
+ roles: RoleDefs;
1492
+ }
1493
+ /** A framework declares its root instances here, when no rule already does. */
1494
+ export declare const ValidationFrameworkIdentifier: import("../../global/di/types.js").ServiceIdentifier<ValidationFrameworkDef> & (<U extends ValidationFrameworkDef = ValidationFrameworkDef>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
1495
+ /**
1496
+ * Register a framework's root-instance declaration.
1497
+ *
1498
+ * ```ts
1499
+ * context.register(
1500
+ * ValidationFrameworkExtension([
1501
+ * { framework: 'estuarine', backgroundRole: 'estuarine:map', roles: ESTUARINE_ROLES },
1502
+ * ])
1503
+ * );
1504
+ * ```
1505
+ *
1506
+ * Keyed by framework AND role, so a framework with two kinds of board declares
1507
+ * both and neither silently replaces the other.
1508
+ */
1509
+ export declare function ValidationFrameworkExtension(defs: readonly ValidationFrameworkDef[]): ExtensionType;
1510
+ /**
1511
+ * The frameworks `role` is a ROOT INSTANCE of — the one test that decides
1512
+ * whether an element is somebody's frame, and the only one.
1513
+ *
1514
+ * TWO sources, and they answer the same question:
1515
+ *
1516
+ * - a registered RULE naming this role as the background it measures against.
1517
+ * A rule that frames against a role is a framework saying "this is my map",
1518
+ * with no second registry to keep in step;
1519
+ * - a registered {@link ValidationFrameworkDef}, for the framework whose whole
1520
+ * contribution is nudges and which therefore has no rule to be derived from.
1521
+ *
1522
+ * Pure, and exported, because every per-instance surface downstream — the
1523
+ * profile picker, the nudge checklist, the check-up — is built on this answer,
1524
+ * and a function taking its inputs is testable without a DI container, a
1525
+ * surface or an editor.
1526
+ *
1527
+ * Empty for a neutral element, and for a background authored before its role
1528
+ * existed: no role, no framework, no tooling.
1529
+ */
1530
+ export declare function frameworksOfRole(role: RoleId | undefined, rules: readonly ValidationRule[], frameworkDefs?: readonly ValidationFrameworkDef[]): ReadonlySet<string>;
762
1531
  /**
763
1532
  * Element props that can change a verdict, WHATEVER the registered rules are.
764
1533
  * Everything else — `opacity` and the other `@local()` fields, colours,
@@ -785,6 +1554,20 @@ export declare const VERDICT_PROPS: string[];
785
1554
  * knows: `backgroundTransitionVisibleProps` reads the prop each framework
786
1555
  * writes beside the line it gates. A framework whose background declares no
787
1556
  * toggle contributes nothing and the set is the constant.
1557
+ *
1558
+ * ## `text`, and why it is not in the constant
1559
+ *
1560
+ * `label-presence` is the one family whose verdict turns on an element's words,
1561
+ * and words are what a user changes by TYPING. Watched unconditionally, every
1562
+ * keystroke in every shape on the board would wake the debounced evaluation —
1563
+ * a cost paid by every document, for a question most of them never ask.
1564
+ *
1565
+ * So it is added exactly when a REAL-TIME rule of that family is registered.
1566
+ * The moment filter is deliberate and mirrors {@link backgroundElementIds}: an
1567
+ * on-demand rule is never evaluated on the gesture path, so waking that path for
1568
+ * it would hand back precisely what declaring the second moment bought — and a
1569
+ * framework that wants its naming checked while the user types says so by
1570
+ * declaring the rule real-time, which is the one place that decision belongs.
788
1571
  */
789
1572
  export declare function verdictPropsOf(rules: readonly ValidationRule[]): ReadonlySet<string>;
790
1573
  /**
@@ -948,6 +1731,13 @@ export declare class ValidationManager extends InteractivityExtension {
948
1731
  * when every framework is flagged off.
949
1732
  */
950
1733
  private get _activeNudges();
1734
+ private _frameworks;
1735
+ /**
1736
+ * Registered root-instance declarations, resolved once. Empty when every
1737
+ * framework derives its frames from its rules, which is all of them but the
1738
+ * ones that ship no rule at all — see {@link ValidationFrameworkDef}.
1739
+ */
1740
+ private get _activeFrameworks();
951
1741
  private _profiles;
952
1742
  /**
953
1743
  * Registered profiles, resolved once. Empty when no framework ships one, in
@@ -975,30 +1765,29 @@ export declare class ValidationManager extends InteractivityExtension {
975
1765
  /** The registered rule with this id, if its framework is enabled. */
976
1766
  ruleOf(ruleId: string): ValidationRule | undefined;
977
1767
  /**
978
- * The profiles selectable on `element`, i.e. those of every framework that
979
- * measures against a background carrying this element's ROLE.
1768
+ * The profiles selectable on `element`, i.e. those of every framework it is a
1769
+ * ROOT INSTANCE of ({@link frameworksOf}).
980
1770
  *
981
- * Derived from the registered rules rather than from a second registry: a
982
- * rule already names the role of the frame it measures against
983
- * (`backgroundRole`), which is the only thing that makes an element a root
984
- * instance in the engine's eyes. So the answer is gated for free — flag off,
985
- * no rule, no profile offered — and a framework that ships profiles but no
986
- * rule offers nothing to choose between, correctly.
1771
+ * Gated for free: flag off, nothing registered, no framework, no profile
1772
+ * offered. A framework that ships profiles and is a root instance of nothing —
1773
+ * neither a rule framing against the role nor a declaration naming it —
1774
+ * offers nothing to choose between, correctly.
987
1775
  *
988
1776
  * Empty for a neutral element, and for a background authored before its role
989
1777
  * existed: no role, no framework, no profile.
990
1778
  */
991
1779
  profilesFor(element: GfxPrimitiveElementModel): readonly ValidationProfile[];
992
1780
  /**
993
- * The frameworks `element` is a ROOT INSTANCE of, i.e. those with a registered
994
- * rule measuring against a background carrying this element's role.
1781
+ * The frameworks `element` is a ROOT INSTANCE of — those with a registered
1782
+ * rule measuring against a background carrying this element's role, and those
1783
+ * that declared the role outright ({@link ValidationFrameworkDef}).
995
1784
  *
996
1785
  * The one test that decides whether an element is a framework's frame, and the
997
- * only one: it is derived from the registered rules rather than from a second
998
- * registry, so it is gated for free — flag off, no rule, no framework — and
999
- * every per-instance surface (the profile picker, the nudge checklist, the
1000
- * check-up) agrees about what a root instance is without any of them saying so
1001
- * twice.
1786
+ * only one: every per-instance surface (the profile picker, the nudge
1787
+ * checklist, the check-up) agrees about what a root instance is without any of
1788
+ * them saying so twice. Both sources are registered from the flag-gated view
1789
+ * extension, so it stays gated for free — flag off, nothing registered, no
1790
+ * framework.
1002
1791
  *
1003
1792
  * Empty for a neutral element, and for a background authored before its role
1004
1793
  * existed.