@formicoidea/labre-core 0.49.0 → 0.51.0

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 (241) hide show
  1. package/dist/_pkgs/affine-block-attachment/asset-picker.d.ts +24 -0
  2. package/dist/_pkgs/affine-block-attachment/asset-picker.js +87 -0
  3. package/dist/_pkgs/affine-block-attachment/configs/slash-menu.js +3 -20
  4. package/dist/_pkgs/affine-block-attachment/index.d.ts +1 -0
  5. package/dist/_pkgs/affine-block-attachment/index.js +1 -0
  6. package/dist/_pkgs/affine-block-attachment/utils.d.ts +9 -1
  7. package/dist/_pkgs/affine-block-attachment/utils.js +9 -0
  8. package/dist/_pkgs/affine-block-bookmark/adapters/markdown/markdown.js +14 -1
  9. package/dist/_pkgs/affine-block-bookmark/adapters/notion-html.js +5 -1
  10. package/dist/_pkgs/affine-block-database/adapters/markdown.js +5 -3
  11. package/dist/_pkgs/affine-block-embed/common/adapters/html.js +5 -3
  12. package/dist/_pkgs/affine-block-embed/common/adapters/markdown.js +11 -0
  13. package/dist/_pkgs/affine-block-frame/frame-template.d.ts +58 -0
  14. package/dist/_pkgs/affine-block-frame/frame-template.js +207 -0
  15. package/dist/_pkgs/affine-block-frame/frame-toolbar.js +19 -3
  16. package/dist/_pkgs/affine-block-frame/index.d.ts +1 -0
  17. package/dist/_pkgs/affine-block-frame/index.js +1 -0
  18. package/dist/_pkgs/affine-block-frame/translations.d.ts +7 -0
  19. package/dist/_pkgs/affine-block-frame/translations.js +16 -1
  20. package/dist/_pkgs/affine-block-frame/view.js +6 -0
  21. package/dist/_pkgs/affine-block-image/asset-picker.d.ts +63 -0
  22. package/dist/_pkgs/affine-block-image/asset-picker.js +183 -0
  23. package/dist/_pkgs/affine-block-image/commands/insert-images.d.ts +5 -0
  24. package/dist/_pkgs/affine-block-image/commands/insert-images.js +8 -8
  25. package/dist/_pkgs/affine-block-image/components/page-image-block.d.ts +11 -0
  26. package/dist/_pkgs/affine-block-image/components/page-image-block.js +81 -12
  27. package/dist/_pkgs/affine-block-image/configs/replace-action.d.ts +9 -0
  28. package/dist/_pkgs/affine-block-image/configs/replace-action.js +27 -0
  29. package/dist/_pkgs/affine-block-image/configs/toolbar.js +6 -0
  30. package/dist/_pkgs/affine-block-image/crop/crop-controller.d.ts +46 -0
  31. package/dist/_pkgs/affine-block-image/crop/crop-controller.js +104 -0
  32. package/dist/_pkgs/affine-block-image/crop/crop-math.d.ts +70 -0
  33. package/dist/_pkgs/affine-block-image/crop/crop-math.js +141 -0
  34. package/dist/_pkgs/affine-block-image/crop/crop-overlay.d.ts +57 -0
  35. package/dist/_pkgs/affine-block-image/crop/crop-overlay.js +343 -0
  36. package/dist/_pkgs/affine-block-image/crop/crop-toolbar.d.ts +12 -0
  37. package/dist/_pkgs/affine-block-image/crop/crop-toolbar.js +78 -0
  38. package/dist/_pkgs/affine-block-image/crop/write-crop.d.ts +16 -0
  39. package/dist/_pkgs/affine-block-image/crop/write-crop.js +57 -0
  40. package/dist/_pkgs/affine-block-image/edgeless-clipboard-config.js +4 -1
  41. package/dist/_pkgs/affine-block-image/effects.js +2 -0
  42. package/dist/_pkgs/affine-block-image/image-block.d.ts +2 -0
  43. package/dist/_pkgs/affine-block-image/image-block.js +2 -0
  44. package/dist/_pkgs/affine-block-image/image-edgeless-block.d.ts +2 -0
  45. package/dist/_pkgs/affine-block-image/image-edgeless-block.js +36 -8
  46. package/dist/_pkgs/affine-block-image/image-resize-manager.js +15 -0
  47. package/dist/_pkgs/affine-block-image/index.d.ts +1 -0
  48. package/dist/_pkgs/affine-block-image/index.js +1 -0
  49. package/dist/_pkgs/affine-block-image/translations.d.ts +15 -0
  50. package/dist/_pkgs/affine-block-image/translations.js +43 -0
  51. package/dist/_pkgs/affine-block-image/utils.d.ts +13 -0
  52. package/dist/_pkgs/affine-block-image/utils.js +10 -1
  53. package/dist/_pkgs/affine-block-root/clipboard/page-clipboard.js +5 -0
  54. package/dist/_pkgs/affine-block-root/commands/page-export-commands.d.ts +2 -0
  55. package/dist/_pkgs/affine-block-root/commands/page-export-commands.js +71 -0
  56. package/dist/_pkgs/affine-block-root/index.d.ts +1 -0
  57. package/dist/_pkgs/affine-block-root/index.js +1 -0
  58. package/dist/_pkgs/affine-block-root/view.js +8 -0
  59. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/capability.d.ts +30 -0
  60. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/capability.js +44 -0
  61. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/colors.d.ts +26 -0
  62. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/colors.js +82 -0
  63. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/command.d.ts +18 -0
  64. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/command.js +91 -0
  65. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/index.d.ts +3 -0
  66. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/index.js +3 -0
  67. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/writer.d.ts +50 -0
  68. package/dist/_pkgs/affine-block-surface/extensions/drawio-export/writer.js +732 -0
  69. package/dist/_pkgs/affine-block-surface/extensions/export-manager/draw-image-block.d.ts +12 -0
  70. package/dist/_pkgs/affine-block-surface/extensions/export-manager/draw-image-block.js +15 -0
  71. package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +7 -1
  72. package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.d.ts +7 -1
  73. package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.js +60 -1
  74. package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.d.ts +2 -2
  75. package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.js +2 -2
  76. package/dist/_pkgs/affine-block-surface/extensions/export-svg/marker-version.d.ts +6 -0
  77. package/dist/_pkgs/affine-block-surface/extensions/export-svg/marker-version.js +8 -0
  78. package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.d.ts +28 -1
  79. package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.js +66 -6
  80. package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.d.ts +2 -7
  81. package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.js +2 -6
  82. package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +2 -0
  83. package/dist/_pkgs/affine-block-surface/extensions/index.js +2 -0
  84. package/dist/_pkgs/affine-block-surface/extensions/interchange-export.d.ts +84 -0
  85. package/dist/_pkgs/affine-block-surface/extensions/interchange-export.js +150 -0
  86. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +24 -2
  87. package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +23 -2
  88. package/dist/_pkgs/affine-block-surface/extensions/interchange.js +4 -1
  89. package/dist/_pkgs/affine-block-surface/extensions/legend-role.d.ts +18 -0
  90. package/dist/_pkgs/affine-block-surface/extensions/legend-role.js +20 -0
  91. package/dist/_pkgs/affine-block-surface/extensions/legend.d.ts +2 -19
  92. package/dist/_pkgs/affine-block-surface/extensions/legend.js +2 -18
  93. package/dist/_pkgs/affine-block-surface/extensions/svg-sanitize.d.ts +67 -0
  94. package/dist/_pkgs/affine-block-surface/extensions/svg-sanitize.js +235 -0
  95. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.d.ts +1 -0
  96. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.js +9 -0
  97. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +17 -13
  98. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +52 -80
  99. package/dist/_pkgs/affine-block-surface/extensions/xml-element.d.ts +98 -0
  100. package/dist/_pkgs/affine-block-surface/extensions/xml-element.js +261 -0
  101. package/dist/_pkgs/affine-block-surface/extensions/xml-reader.d.ts +238 -0
  102. package/dist/_pkgs/affine-block-surface/extensions/xml-reader.js +570 -0
  103. package/dist/_pkgs/affine-block-surface/framework-background/def.js +1 -1
  104. package/dist/_pkgs/affine-block-surface/interchange-headless.d.ts +29 -0
  105. package/dist/_pkgs/affine-block-surface/interchange-headless.js +32 -0
  106. package/dist/_pkgs/affine-block-surface/view.js +22 -2
  107. package/dist/_pkgs/affine-block-table/adapters/utils.js +24 -1
  108. package/dist/_pkgs/affine-components/color-picker/color-panel.d.ts +11 -0
  109. package/dist/_pkgs/affine-components/color-picker/color-panel.js +87 -12
  110. package/dist/_pkgs/affine-components/color-picker/framework-palette.d.ts +8 -0
  111. package/dist/_pkgs/affine-components/color-picker/framework-palette.js +11 -3
  112. package/dist/_pkgs/affine-components/color-picker/icons.d.ts +9 -0
  113. package/dist/_pkgs/affine-components/color-picker/icons.js +12 -0
  114. package/dist/_pkgs/affine-gfx-note/toolbar/note-menu.js +5 -8
  115. package/dist/_pkgs/affine-gfx-template/contribute.d.ts +14 -4
  116. package/dist/_pkgs/affine-gfx-template/contribute.js +47 -6
  117. package/dist/_pkgs/affine-gfx-template/toolbar/builtin-templates.d.ts +7 -2
  118. package/dist/_pkgs/affine-gfx-template/toolbar/builtin-templates.js +14 -40
  119. package/dist/_pkgs/affine-gfx-template/toolbar/resolve-name.d.ts +1 -1
  120. package/dist/_pkgs/affine-gfx-template/toolbar/resolve-name.js +1 -1
  121. package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.d.ts +4 -4
  122. package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +9 -9
  123. package/dist/_pkgs/affine-gfx-template/toolbar/template-type.d.ts +2 -4
  124. package/dist/_pkgs/affine-gfx-template/translations.d.ts +5 -0
  125. package/dist/_pkgs/affine-gfx-template/translations.js +9 -0
  126. package/dist/_pkgs/affine-inline-footnote/adapters/markdown/inline-delta.js +6 -0
  127. package/dist/_pkgs/affine-inline-footnote/adapters/markdown/markdown-inline.js +7 -0
  128. package/dist/_pkgs/affine-inline-link/adapters/html/html-inline.js +4 -1
  129. package/dist/_pkgs/affine-inline-link/adapters/html/inline-delta.js +3 -1
  130. package/dist/_pkgs/affine-inline-link/adapters/markdown/inline-delta.js +4 -1
  131. package/dist/_pkgs/affine-inline-link/adapters/notion-html/html-inline.js +2 -1
  132. package/dist/_pkgs/affine-inline-link/link-node/affine-link.d.ts +7 -0
  133. package/dist/_pkgs/affine-inline-link/link-node/affine-link.js +37 -0
  134. package/dist/_pkgs/affine-inline-link/link-node/index.d.ts +1 -0
  135. package/dist/_pkgs/affine-inline-link/link-node/index.js +1 -0
  136. package/dist/_pkgs/affine-inline-link/link-node/propose-views.d.ts +22 -0
  137. package/dist/_pkgs/affine-inline-link/link-node/propose-views.js +59 -0
  138. package/dist/_pkgs/affine-model/blocks/database/types.d.ts +28 -0
  139. package/dist/_pkgs/affine-model/blocks/image/image-crop.d.ts +48 -0
  140. package/dist/_pkgs/affine-model/blocks/image/image-crop.js +78 -0
  141. package/dist/_pkgs/affine-model/blocks/image/image-model.d.ts +6 -0
  142. package/dist/_pkgs/affine-model/blocks/image/image-model.js +2 -0
  143. package/dist/_pkgs/affine-model/blocks/image/index.d.ts +1 -0
  144. package/dist/_pkgs/affine-model/blocks/image/index.js +1 -0
  145. package/dist/_pkgs/affine-model/consts/shape.d.ts +2 -0
  146. package/dist/_pkgs/affine-model/consts/shape.js +5 -0
  147. package/dist/_pkgs/affine-model/elements/bpmn/consts.d.ts +31 -0
  148. package/dist/_pkgs/affine-model/elements/bpmn/consts.js +31 -0
  149. package/dist/_pkgs/affine-model/elements/bpmn/index.d.ts +1 -0
  150. package/dist/_pkgs/affine-model/elements/bpmn/index.js +1 -0
  151. package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +0 -25
  152. package/dist/_pkgs/affine-model/elements/bpmn/pool.js +1 -25
  153. package/dist/_pkgs/affine-model/elements/shape/shape.d.ts +0 -2
  154. package/dist/_pkgs/affine-model/elements/shape/shape.js +1 -2
  155. package/dist/_pkgs/affine-model/elements/uml/consts.d.ts +133 -0
  156. package/dist/_pkgs/affine-model/elements/uml/consts.js +107 -0
  157. package/dist/_pkgs/affine-model/elements/uml/diagram.d.ts +1 -79
  158. package/dist/_pkgs/affine-model/elements/uml/diagram.js +1 -53
  159. package/dist/_pkgs/affine-model/elements/uml/fragment.d.ts +0 -15
  160. package/dist/_pkgs/affine-model/elements/uml/fragment.js +1 -15
  161. package/dist/_pkgs/affine-model/elements/uml/index.d.ts +1 -0
  162. package/dist/_pkgs/affine-model/elements/uml/index.js +1 -0
  163. package/dist/_pkgs/affine-model/elements/uml/partition.d.ts +0 -20
  164. package/dist/_pkgs/affine-model/elements/uml/partition.js +1 -20
  165. package/dist/_pkgs/affine-model/elements/uml/region.d.ts +0 -11
  166. package/dist/_pkgs/affine-model/elements/uml/region.js +1 -11
  167. package/dist/_pkgs/affine-model/headless.d.ts +19 -0
  168. package/dist/_pkgs/affine-model/headless.js +19 -0
  169. package/dist/_pkgs/affine-shared/headless.d.ts +10 -0
  170. package/dist/_pkgs/affine-shared/headless.js +10 -0
  171. package/dist/_pkgs/affine-shared/services/asset-picker-service.d.ts +63 -0
  172. package/dist/_pkgs/affine-shared/services/asset-picker-service.js +20 -0
  173. package/dist/_pkgs/affine-shared/services/data-source-picker-service.d.ts +6 -3
  174. package/dist/_pkgs/affine-shared/services/frame-template-service.d.ts +83 -0
  175. package/dist/_pkgs/affine-shared/services/frame-template-service.js +17 -0
  176. package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
  177. package/dist/_pkgs/affine-shared/services/index.js +2 -0
  178. package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +6 -0
  179. package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +10 -0
  180. package/dist/_pkgs/affine-widget-drag-handle/watchers/drag-event-watcher.js +8 -3
  181. package/dist/_pkgs/affine-widget-keyboard-toolbar/config.js +4 -16
  182. package/dist/_pkgs/affine-widget-linked-doc/transformers/html.d.ts +7 -0
  183. package/dist/_pkgs/affine-widget-linked-doc/transformers/html.js +25 -24
  184. package/dist/_pkgs/affine-widget-linked-doc/transformers/index.d.ts +1 -1
  185. package/dist/_pkgs/affine-widget-linked-doc/transformers/markdown.d.ts +7 -0
  186. package/dist/_pkgs/affine-widget-linked-doc/transformers/markdown.js +26 -25
  187. package/dist/_pkgs/affine-widget-linked-doc/transformers/utils.d.ts +23 -0
  188. package/dist/_pkgs/affine-widget-linked-doc/transformers/utils.js +14 -0
  189. package/dist/_pkgs/data-view/core/common/properties.d.ts +29 -0
  190. package/dist/_pkgs/data-view/core/common/properties.js +110 -8
  191. package/dist/_pkgs/data-view/core/common/property-menu.d.ts +44 -1
  192. package/dist/_pkgs/data-view/core/common/property-menu.js +100 -3
  193. package/dist/_pkgs/data-view/core/component/tags/color-carousel.d.ts +41 -0
  194. package/dist/_pkgs/data-view/core/component/tags/color-carousel.js +199 -0
  195. package/dist/_pkgs/data-view/core/component/tags/color-menu.d.ts +49 -0
  196. package/dist/_pkgs/data-view/core/component/tags/color-menu.js +123 -0
  197. package/dist/_pkgs/data-view/core/component/tags/index.d.ts +3 -0
  198. package/dist/_pkgs/data-view/core/component/tags/index.js +3 -0
  199. package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.d.ts +8 -1
  200. package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.js +21 -20
  201. package/dist/_pkgs/data-view/core/component/tags/softened-colors.d.ts +42 -0
  202. package/dist/_pkgs/data-view/core/component/tags/softened-colors.js +79 -0
  203. package/dist/_pkgs/data-view/core/data-view.d.ts +8 -1
  204. package/dist/_pkgs/data-view/core/data-view.js +18 -2
  205. package/dist/_pkgs/data-view/core/effect.js +2 -1
  206. package/dist/_pkgs/data-view/core/filter/eval.d.ts +6 -1
  207. package/dist/_pkgs/data-view/core/filter/eval.js +7 -2
  208. package/dist/_pkgs/data-view/core/group-by/renderer/select-group.d.ts +3 -0
  209. package/dist/_pkgs/data-view/core/group-by/renderer/select-group.js +119 -71
  210. package/dist/_pkgs/data-view/core/view/color-rules.d.ts +85 -0
  211. package/dist/_pkgs/data-view/core/view/color-rules.js +165 -0
  212. package/dist/_pkgs/data-view/core/view/index.d.ts +1 -0
  213. package/dist/_pkgs/data-view/core/view/index.js +1 -0
  214. package/dist/_pkgs/data-view/property-presets/multi-select/cell-renderer.js +1 -0
  215. package/dist/_pkgs/data-view/property-presets/select/cell-renderer.js +1 -0
  216. package/dist/_pkgs/data-view/translations.d.ts +34 -0
  217. package/dist/_pkgs/data-view/translations.js +80 -0
  218. package/dist/_pkgs/data-view/view-presets/gallery/gallery-view.js +7 -1
  219. package/dist/_pkgs/data-view/view-presets/kanban/mobile/card.js +6 -1
  220. package/dist/_pkgs/data-view/view-presets/kanban/pc/card.js +6 -1
  221. package/dist/_pkgs/data-view/view-presets/list/list-view.js +4 -0
  222. package/dist/_pkgs/data-view/view-presets/table/mobile/row.js +3 -0
  223. package/dist/_pkgs/data-view/view-presets/table/pc/header/database-header-column.d.ts +3 -1
  224. package/dist/_pkgs/data-view/view-presets/table/pc/header/database-header-column.js +149 -175
  225. package/dist/_pkgs/data-view/view-presets/table/pc/row/row.js +6 -0
  226. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/color-rules-menu.d.ts +12 -0
  227. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/color-rules-menu.js +206 -0
  228. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.js +16 -2
  229. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.d.ts +4 -2
  230. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.js +11 -2
  231. package/dist/commands.js +5 -2
  232. package/dist/host-panels.d.ts +21 -1
  233. package/dist/host-panels.js +50 -10
  234. package/dist/interchange.d.ts +1 -0
  235. package/dist/interchange.js +1 -0
  236. package/dist/model/headless.d.ts +1 -0
  237. package/dist/model/headless.js +1 -0
  238. package/dist/shared/headless.d.ts +1 -0
  239. package/dist/shared/headless.js +1 -0
  240. package/dist/translations.js +8 -1
  241. package/package.json +13 -1
@@ -1,2 +1,3 @@
1
1
  export * from './node.js';
2
2
  export * from './pool.js';
3
+ export * from './consts.js';
@@ -1,2 +1,3 @@
1
1
  export * from './node.js';
2
2
  export * from './pool.js';
3
+ export * from './consts.js';
@@ -2,31 +2,6 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Width of the participant band — the left margin strip the pool name is
7
- * written up, in model units.
8
- *
9
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-bpmn`
10
- * rather than the other way round. The pool's own hit test needs it (a pool is
11
- * clickable by its title bands as well as its border, the bpmn.io convention),
12
- * and `affine-model` cannot reach into `affine-block-surface` where the
13
- * declaration is resolved. One number, owned by the layer that both the
14
- * declaration and the hit test can read.
15
- */
16
- export declare const POOL_BAND_WIDTH = 28;
17
- /**
18
- * Width of a lane's own title band — the strip immediately inside the
19
- * participant band, with the lane name turned on its side.
20
- *
21
- * Four units narrower than {@link POOL_BAND_WIDTH}, and for the same reason the
22
- * lane font is two points smaller: the two strips sit side by side, so the
23
- * subordinate one has to say so. Identical widths read as a single 56-unit
24
- * gutter rather than as a participant containing lanes, which is exactly the
25
- * relationship the picture has to carry.
26
- *
27
- * NO fill, divider only — what bpmn.io, Camunda and Visio all draw.
28
- */
29
- export declare const POOL_LANE_BAND_WIDTH = 24;
30
5
  /**
31
6
  * One LANE (couloir) of a pool: a horizontal band the participant's own work is
32
7
  * divided into — "Sales", "Back office", "Automated".
@@ -35,31 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { rotatePoint } from '../../../global/gfx/index.js';
36
36
  import { field } from '../../../std/gfx/index.js';
37
37
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
38
- /**
39
- * Width of the participant band — the left margin strip the pool name is
40
- * written up, in model units.
41
- *
42
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-bpmn`
43
- * rather than the other way round. The pool's own hit test needs it (a pool is
44
- * clickable by its title bands as well as its border, the bpmn.io convention),
45
- * and `affine-model` cannot reach into `affine-block-surface` where the
46
- * declaration is resolved. One number, owned by the layer that both the
47
- * declaration and the hit test can read.
48
- */
49
- export const POOL_BAND_WIDTH = 28;
50
- /**
51
- * Width of a lane's own title band — the strip immediately inside the
52
- * participant band, with the lane name turned on its side.
53
- *
54
- * Four units narrower than {@link POOL_BAND_WIDTH}, and for the same reason the
55
- * lane font is two points smaller: the two strips sit side by side, so the
56
- * subordinate one has to say so. Identical widths read as a single 56-unit
57
- * gutter rather than as a participant containing lanes, which is exactly the
58
- * relationship the picture has to carry.
59
- *
60
- * NO fill, divider only — what bpmn.io, Camunda and Visio all draw.
61
- */
62
- export const POOL_LANE_BAND_WIDTH = 24;
38
+ import { POOL_BAND_WIDTH, POOL_LANE_BAND_WIDTH } from './consts.js';
63
39
  /**
64
40
  * A BPMN "pool": a participant container drawn as a rounded-rect frame with a
65
41
  * vertical name band on the left. It is a framework background like every other
@@ -47,8 +47,6 @@ export type ShapeProps = BaseElementProps & {
47
47
  textFitMode?: TextFitMode;
48
48
  maxWidth?: false | number;
49
49
  } & Partial<TextStyleProps>;
50
- export declare const SHAPE_TEXT_PADDING = 20;
51
- export declare const SHAPE_TEXT_VERTICAL_PADDING = 10;
52
50
  export declare class ShapeElementModel extends GfxPrimitiveElementModel<ShapeProps> {
53
51
  /**
54
52
  * The bound of the text content.
@@ -36,10 +36,9 @@ import { Bound, getBoundWithRotation } from '../../../global/gfx/index.js';
36
36
  import { field, GfxLocalElementModel, GfxPrimitiveElementModel, local, prop, } from '../../../std/gfx/index.js';
37
37
  import * as Y from 'yjs';
38
38
  import { DEFAULT_ROUGHNESS, FontFamily, FontStyle, FontWeight, ShapeStyle, ShapeTextFontSize, ShapeType, StrokeStyle, TextAlign, TextFitMode, TextResizing, TextVerticalAlign, } from '../../consts/index.js';
39
+ import { SHAPE_TEXT_PADDING, SHAPE_TEXT_VERTICAL_PADDING, } from '../../consts/shape.js';
39
40
  import { DefaultTheme } from '../../themes/index.js';
40
41
  import { shapeMethods } from './api/index.js';
41
- export const SHAPE_TEXT_PADDING = 20;
42
- export const SHAPE_TEXT_VERTICAL_PADDING = 10;
43
42
  let ShapeElementModel = (() => {
44
43
  let _classSuper = GfxPrimitiveElementModel;
45
44
  let _color_decorators;
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The UML element constants an interchange reader needs WITHOUT the element
3
+ * classes: moved out of `diagram.ts`, `fragment.ts`, `partition.ts` and `region.ts`
4
+ * unchanged, so the
5
+ * model's headless entry (`@labre/affine-model/headless`) can export them with
6
+ * no `@labre/std/gfx` behind it (ADR 0012, P3 as amended 2026-10-14). The
7
+ * package index re-exports this file, so nothing an importer reads moved.
8
+ */
9
+ /**
10
+ * Height of the diagram frame's heading band — the strip across the top of the
11
+ * frame the `<kind> <name>` tag is written in, in model units.
12
+ *
13
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`
14
+ * rather than the other way round, for the reason `C4_BOARD_TITLE_BAND_HEIGHT`
15
+ * is: the frame's own hit test needs it (a diagram is clickable by its heading
16
+ * band as well as by its border), and `affine-model` cannot reach into
17
+ * `affine-block-surface` where the declaration is resolved. One number, owned
18
+ * by the layer that both the declaration and the hit test can read.
19
+ *
20
+ * It is the frame's TOP MARGIN — the inset the drawing gives up so the heading
21
+ * has somewhere to be written — so the strip that is painted, the strip that is
22
+ * picked and the strip that opens the rename are one number rather than three.
23
+ *
24
+ * 44 is the height of the cut-corner tag UML 2.5.1 Annex A draws the heading
25
+ * in: a 20-unit label with the rest as breathing room above and below.
26
+ * Changing it moves the heading, so it is a visual decision and not a hit-test
27
+ * one.
28
+ */
29
+ export declare const UML_FRAME_BAND_HEIGHT = 44;
30
+ /**
31
+ * Which kind of UML diagram this frame draws — the DECLARED fact, as opposed to
32
+ * the name, which is free text and says whatever its author wants it to.
33
+ *
34
+ * ## Where the values come from
35
+ *
36
+ * UML 2.5.1 Annex A gives the normative frame kind names, each with the
37
+ * abbreviation that may be written in its place:
38
+ *
39
+ * - `activity` / `act`;
40
+ * - `class` — the one kind Annex A gives NO abbreviation for, so the word
41
+ * itself is the tag;
42
+ * - `component` / `cmp`;
43
+ * - `deployment` / `dep`;
44
+ * - `interaction` / `sd`;
45
+ * - `package` / `pkg`;
46
+ * - `state machine` / `stm`;
47
+ * - `use case` / `uc`.
48
+ *
49
+ * `obj` is NOT in that list. Annex A has no frame kind for the object diagram —
50
+ * the standard treats it as a class diagram showing instances — but every tool
51
+ * that draws one tags it `obj`, and an architect reading the sheet expects to
52
+ * see it. So `obj` is kept as a TOOL CONVENTION, recorded as such here so that
53
+ * nobody later "fixes" it against the spec without knowing it was a choice.
54
+ *
55
+ * ## Widening this union is additive
56
+ *
57
+ * Phase 1 shipped the first four kinds below; phase 2 APPENDED `cmp` and `dep`,
58
+ * the two structural frames of §11.6.4 and §19.2.4, then `act` and `stm`, the
59
+ * two behaviour frames of §15.2.4 and §14.2.4; phase 3 appends `sd`. Each
60
+ * arrives as a new VALUE of the existing `kind`
61
+ * string field — no new field, no schema change, no migration and no backfill.
62
+ * The same promise `C4NodeKind` and `BpmnNodeKind` already make.
63
+ *
64
+ * Appended, never reordered: the union is read as a set of strings by every
65
+ * consumer, and a document only ever stores one of them, so the ORDER below is a
66
+ * reading aid. Keeping it chronological is what lets a reviewer see at a glance
67
+ * which build a value arrived in.
68
+ *
69
+ * A value a client has never seen reads back as the string it is, and
70
+ * {@link UmlDiagramElementModel.heading} writes it verbatim, so a document
71
+ * created by a newer build still shows its own heading on an older one.
72
+ */
73
+ export type UmlDiagramKind = 'class' | 'pkg' | 'obj' | 'uc' | 'cmp' | 'dep' | 'act' | 'stm' | 'sd';
74
+ /**
75
+ * The word written in the heading tag, per kind.
76
+ *
77
+ * A table rather than the raw value so that a kind whose stored discriminant
78
+ * and whose printed tag ever diverge has one place to say so. Today they are
79
+ * the same four strings, and that is worth stating rather than assuming.
80
+ *
81
+ * `Partial` on purpose: a frame read off a document carries whatever string was
82
+ * written there, including a kind from a later phase this build has never heard
83
+ * of. Typing the lookup as total would make {@link
84
+ * UmlDiagramElementModel.heading}'s `?? this.kind` fallback look like dead
85
+ * defensive code, when it is the whole of the append-only promise.
86
+ */
87
+ export declare const UML_DIAGRAM_KIND_TAG: Partial<Record<UmlDiagramKind, string>>;
88
+ /**
89
+ * Height of a combined fragment's OPERATOR BAND — the strip across its top the
90
+ * pentagon tag is drawn in, in model units.
91
+ *
92
+ * Owned by the model for the reason {@link UML_FRAME_BAND_HEIGHT} is: the
93
+ * fragment's own hit test reads it (a fragment is clickable by its tag strip as
94
+ * well as by its border), and `affine-model` cannot reach into
95
+ * `affine-block-surface` where the declaration is resolved.
96
+ *
97
+ * The diagram frame's own 44, and deliberately: §17.6.4 draws the operator in
98
+ * the very same cut-corner pentagon Annex A draws a frame heading in — it IS a
99
+ * frame, nested in another one — and two numbers for one piece of furniture
100
+ * would drift.
101
+ */
102
+ export declare const UML_FRAGMENT_BAND = 44;
103
+ /**
104
+ * Height of a partition's NAME BAND — the strip its name is written in, in
105
+ * model units.
106
+ *
107
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`, for
108
+ * the reason {@link UML_FRAME_BAND_HEIGHT} is: the partition's own hit test
109
+ * reads it (a swimlane is clickable by its header as well as by its border),
110
+ * and `affine-model` cannot reach into `affine-block-surface` where the
111
+ * declaration is resolved. One number, owned by the layer that both the
112
+ * declaration and the hit test can read.
113
+ *
114
+ * It is the band's THICKNESS whichever edge the band is on — the top for a
115
+ * vertical lane, the left for a horizontal one — because §15.6.4 draws one
116
+ * header strip and turns it with the lane rather than resizing it.
117
+ *
118
+ * 36 against the diagram frame's 44: a partition header is a name and not a
119
+ * `<kind> <name>` heading, and it is written inside a lane that already sits on
120
+ * a sheet, so it reads as a subdivision rather than as a second sheet.
121
+ */
122
+ export declare const UML_PARTITION_BAND = 36;
123
+ /**
124
+ * Height of a region's NAME BAND — the strip its name is written in, in model
125
+ * units.
126
+ *
127
+ * Owned by the model for the reason {@link UML_PARTITION_BAND} is: the region's
128
+ * own hit test reads it, and `affine-model` cannot reach into the package where
129
+ * the declaration is resolved. The same 36 the partition uses, and deliberately
130
+ * so — the two are the same piece of furniture, a name written in a strip along
131
+ * the top of a transparent frame, and two numbers would drift.
132
+ */
133
+ export declare const UML_REGION_BAND = 36;
@@ -0,0 +1,107 @@
1
+ /**
2
+ * The UML element constants an interchange reader needs WITHOUT the element
3
+ * classes: moved out of `diagram.ts`, `fragment.ts`, `partition.ts` and `region.ts`
4
+ * unchanged, so the
5
+ * model's headless entry (`@labre/affine-model/headless`) can export them with
6
+ * no `@labre/std/gfx` behind it (ADR 0012, P3 as amended 2026-10-14). The
7
+ * package index re-exports this file, so nothing an importer reads moved.
8
+ */
9
+ /**
10
+ * Height of the diagram frame's heading band — the strip across the top of the
11
+ * frame the `<kind> <name>` tag is written in, in model units.
12
+ *
13
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`
14
+ * rather than the other way round, for the reason `C4_BOARD_TITLE_BAND_HEIGHT`
15
+ * is: the frame's own hit test needs it (a diagram is clickable by its heading
16
+ * band as well as by its border), and `affine-model` cannot reach into
17
+ * `affine-block-surface` where the declaration is resolved. One number, owned
18
+ * by the layer that both the declaration and the hit test can read.
19
+ *
20
+ * It is the frame's TOP MARGIN — the inset the drawing gives up so the heading
21
+ * has somewhere to be written — so the strip that is painted, the strip that is
22
+ * picked and the strip that opens the rename are one number rather than three.
23
+ *
24
+ * 44 is the height of the cut-corner tag UML 2.5.1 Annex A draws the heading
25
+ * in: a 20-unit label with the rest as breathing room above and below.
26
+ * Changing it moves the heading, so it is a visual decision and not a hit-test
27
+ * one.
28
+ */
29
+ export const UML_FRAME_BAND_HEIGHT = 44;
30
+ /**
31
+ * The word written in the heading tag, per kind.
32
+ *
33
+ * A table rather than the raw value so that a kind whose stored discriminant
34
+ * and whose printed tag ever diverge has one place to say so. Today they are
35
+ * the same four strings, and that is worth stating rather than assuming.
36
+ *
37
+ * `Partial` on purpose: a frame read off a document carries whatever string was
38
+ * written there, including a kind from a later phase this build has never heard
39
+ * of. Typing the lookup as total would make {@link
40
+ * UmlDiagramElementModel.heading}'s `?? this.kind` fallback look like dead
41
+ * defensive code, when it is the whole of the append-only promise.
42
+ */
43
+ export const UML_DIAGRAM_KIND_TAG = {
44
+ class: 'class',
45
+ pkg: 'pkg',
46
+ obj: 'obj',
47
+ uc: 'uc',
48
+ // Both are Annex A's own abbreviations, written exactly as the Annex writes
49
+ // them — `cmp` for the component diagram, `dep` for the deployment diagram.
50
+ cmp: 'cmp',
51
+ dep: 'dep',
52
+ // Annex A's own abbreviations again — `act` for the activity diagram, `stm`
53
+ // for the state machine diagram. `stm` is the one tag in the table that is
54
+ // NOT the kind spelled out: Annex A's frame kind is the two words `state
55
+ // machine`, and `stm` is the abbreviation it gives in their place.
56
+ act: 'act',
57
+ stm: 'stm',
58
+ // Annex A's abbreviation for the interaction frame, and the third tag in the
59
+ // table that is not the kind spelled out: the frame kind is `interaction`.
60
+ sd: 'sd',
61
+ };
62
+ /**
63
+ * Height of a combined fragment's OPERATOR BAND — the strip across its top the
64
+ * pentagon tag is drawn in, in model units.
65
+ *
66
+ * Owned by the model for the reason {@link UML_FRAME_BAND_HEIGHT} is: the
67
+ * fragment's own hit test reads it (a fragment is clickable by its tag strip as
68
+ * well as by its border), and `affine-model` cannot reach into
69
+ * `affine-block-surface` where the declaration is resolved.
70
+ *
71
+ * The diagram frame's own 44, and deliberately: §17.6.4 draws the operator in
72
+ * the very same cut-corner pentagon Annex A draws a frame heading in — it IS a
73
+ * frame, nested in another one — and two numbers for one piece of furniture
74
+ * would drift.
75
+ */
76
+ export const UML_FRAGMENT_BAND = 44;
77
+ /**
78
+ * Height of a partition's NAME BAND — the strip its name is written in, in
79
+ * model units.
80
+ *
81
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`, for
82
+ * the reason {@link UML_FRAME_BAND_HEIGHT} is: the partition's own hit test
83
+ * reads it (a swimlane is clickable by its header as well as by its border),
84
+ * and `affine-model` cannot reach into `affine-block-surface` where the
85
+ * declaration is resolved. One number, owned by the layer that both the
86
+ * declaration and the hit test can read.
87
+ *
88
+ * It is the band's THICKNESS whichever edge the band is on — the top for a
89
+ * vertical lane, the left for a horizontal one — because §15.6.4 draws one
90
+ * header strip and turns it with the lane rather than resizing it.
91
+ *
92
+ * 36 against the diagram frame's 44: a partition header is a name and not a
93
+ * `<kind> <name>` heading, and it is written inside a lane that already sits on
94
+ * a sheet, so it reads as a subdivision rather than as a second sheet.
95
+ */
96
+ export const UML_PARTITION_BAND = 36;
97
+ /**
98
+ * Height of a region's NAME BAND — the strip its name is written in, in model
99
+ * units.
100
+ *
101
+ * Owned by the model for the reason {@link UML_PARTITION_BAND} is: the region's
102
+ * own hit test reads it, and `affine-model` cannot reach into the package where
103
+ * the declaration is resolved. The same 36 the partition uses, and deliberately
104
+ * so — the two are the same piece of furniture, a name written in a strip along
105
+ * the top of a transparent frame, and two numbers would drift.
106
+ */
107
+ export const UML_REGION_BAND = 36;
@@ -2,85 +2,7 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Height of the diagram frame's heading band — the strip across the top of the
7
- * frame the `<kind> <name>` tag is written in, in model units.
8
- *
9
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`
10
- * rather than the other way round, for the reason `C4_BOARD_TITLE_BAND_HEIGHT`
11
- * is: the frame's own hit test needs it (a diagram is clickable by its heading
12
- * band as well as by its border), and `affine-model` cannot reach into
13
- * `affine-block-surface` where the declaration is resolved. One number, owned
14
- * by the layer that both the declaration and the hit test can read.
15
- *
16
- * It is the frame's TOP MARGIN — the inset the drawing gives up so the heading
17
- * has somewhere to be written — so the strip that is painted, the strip that is
18
- * picked and the strip that opens the rename are one number rather than three.
19
- *
20
- * 44 is the height of the cut-corner tag UML 2.5.1 Annex A draws the heading
21
- * in: a 20-unit label with the rest as breathing room above and below.
22
- * Changing it moves the heading, so it is a visual decision and not a hit-test
23
- * one.
24
- */
25
- export declare const UML_FRAME_BAND_HEIGHT = 44;
26
- /**
27
- * Which kind of UML diagram this frame draws — the DECLARED fact, as opposed to
28
- * the name, which is free text and says whatever its author wants it to.
29
- *
30
- * ## Where the values come from
31
- *
32
- * UML 2.5.1 Annex A gives the normative frame kind names, each with the
33
- * abbreviation that may be written in its place:
34
- *
35
- * - `activity` / `act`;
36
- * - `class` — the one kind Annex A gives NO abbreviation for, so the word
37
- * itself is the tag;
38
- * - `component` / `cmp`;
39
- * - `deployment` / `dep`;
40
- * - `interaction` / `sd`;
41
- * - `package` / `pkg`;
42
- * - `state machine` / `stm`;
43
- * - `use case` / `uc`.
44
- *
45
- * `obj` is NOT in that list. Annex A has no frame kind for the object diagram —
46
- * the standard treats it as a class diagram showing instances — but every tool
47
- * that draws one tags it `obj`, and an architect reading the sheet expects to
48
- * see it. So `obj` is kept as a TOOL CONVENTION, recorded as such here so that
49
- * nobody later "fixes" it against the spec without knowing it was a choice.
50
- *
51
- * ## Widening this union is additive
52
- *
53
- * Phase 1 shipped the first four kinds below; phase 2 APPENDED `cmp` and `dep`,
54
- * the two structural frames of §11.6.4 and §19.2.4, then `act` and `stm`, the
55
- * two behaviour frames of §15.2.4 and §14.2.4; phase 3 appends `sd`. Each
56
- * arrives as a new VALUE of the existing `kind`
57
- * string field — no new field, no schema change, no migration and no backfill.
58
- * The same promise `C4NodeKind` and `BpmnNodeKind` already make.
59
- *
60
- * Appended, never reordered: the union is read as a set of strings by every
61
- * consumer, and a document only ever stores one of them, so the ORDER below is a
62
- * reading aid. Keeping it chronological is what lets a reviewer see at a glance
63
- * which build a value arrived in.
64
- *
65
- * A value a client has never seen reads back as the string it is, and
66
- * {@link UmlDiagramElementModel.heading} writes it verbatim, so a document
67
- * created by a newer build still shows its own heading on an older one.
68
- */
69
- export type UmlDiagramKind = 'class' | 'pkg' | 'obj' | 'uc' | 'cmp' | 'dep' | 'act' | 'stm' | 'sd';
70
- /**
71
- * The word written in the heading tag, per kind.
72
- *
73
- * A table rather than the raw value so that a kind whose stored discriminant
74
- * and whose printed tag ever diverge has one place to say so. Today they are
75
- * the same four strings, and that is worth stating rather than assuming.
76
- *
77
- * `Partial` on purpose: a frame read off a document carries whatever string was
78
- * written there, including a kind from a later phase this build has never heard
79
- * of. Typing the lookup as total would make {@link
80
- * UmlDiagramElementModel.heading}'s `?? this.kind` fallback look like dead
81
- * defensive code, when it is the whole of the append-only promise.
82
- */
83
- export declare const UML_DIAGRAM_KIND_TAG: Partial<Record<UmlDiagramKind, string>>;
5
+ import { type UmlDiagramKind } from './consts.js';
84
6
  export type UmlDiagramProps = FrameworkBackgroundProps & {
85
7
  /** The diagram name, written in the heading tag — edited inline on dblclick. */
86
8
  name?: string;
@@ -35,59 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { rotatePoint } from '../../../global/gfx/index.js';
36
36
  import { field } from '../../../std/gfx/index.js';
37
37
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
38
- /**
39
- * Height of the diagram frame's heading band — the strip across the top of the
40
- * frame the `<kind> <name>` tag is written in, in model units.
41
- *
42
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`
43
- * rather than the other way round, for the reason `C4_BOARD_TITLE_BAND_HEIGHT`
44
- * is: the frame's own hit test needs it (a diagram is clickable by its heading
45
- * band as well as by its border), and `affine-model` cannot reach into
46
- * `affine-block-surface` where the declaration is resolved. One number, owned
47
- * by the layer that both the declaration and the hit test can read.
48
- *
49
- * It is the frame's TOP MARGIN — the inset the drawing gives up so the heading
50
- * has somewhere to be written — so the strip that is painted, the strip that is
51
- * picked and the strip that opens the rename are one number rather than three.
52
- *
53
- * 44 is the height of the cut-corner tag UML 2.5.1 Annex A draws the heading
54
- * in: a 20-unit label with the rest as breathing room above and below.
55
- * Changing it moves the heading, so it is a visual decision and not a hit-test
56
- * one.
57
- */
58
- export const UML_FRAME_BAND_HEIGHT = 44;
59
- /**
60
- * The word written in the heading tag, per kind.
61
- *
62
- * A table rather than the raw value so that a kind whose stored discriminant
63
- * and whose printed tag ever diverge has one place to say so. Today they are
64
- * the same four strings, and that is worth stating rather than assuming.
65
- *
66
- * `Partial` on purpose: a frame read off a document carries whatever string was
67
- * written there, including a kind from a later phase this build has never heard
68
- * of. Typing the lookup as total would make {@link
69
- * UmlDiagramElementModel.heading}'s `?? this.kind` fallback look like dead
70
- * defensive code, when it is the whole of the append-only promise.
71
- */
72
- export const UML_DIAGRAM_KIND_TAG = {
73
- class: 'class',
74
- pkg: 'pkg',
75
- obj: 'obj',
76
- uc: 'uc',
77
- // Both are Annex A's own abbreviations, written exactly as the Annex writes
78
- // them — `cmp` for the component diagram, `dep` for the deployment diagram.
79
- cmp: 'cmp',
80
- dep: 'dep',
81
- // Annex A's own abbreviations again — `act` for the activity diagram, `stm`
82
- // for the state machine diagram. `stm` is the one tag in the table that is
83
- // NOT the kind spelled out: Annex A's frame kind is the two words `state
84
- // machine`, and `stm` is the abbreviation it gives in their place.
85
- act: 'act',
86
- stm: 'stm',
87
- // Annex A's abbreviation for the interaction frame, and the third tag in the
88
- // table that is not the kind spelled out: the frame kind is `interaction`.
89
- sd: 'sd',
90
- };
38
+ import { UML_DIAGRAM_KIND_TAG, UML_FRAME_BAND_HEIGHT, } from './consts.js';
91
39
  /**
92
40
  * The UML diagram frame: the sheet one diagram is drawn on — a class diagram, a
93
41
  * package diagram, an object diagram, a use case diagram, a component diagram, a
@@ -2,21 +2,6 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Height of a combined fragment's OPERATOR BAND — the strip across its top the
7
- * pentagon tag is drawn in, in model units.
8
- *
9
- * Owned by the model for the reason {@link UML_FRAME_BAND_HEIGHT} is: the
10
- * fragment's own hit test reads it (a fragment is clickable by its tag strip as
11
- * well as by its border), and `affine-model` cannot reach into
12
- * `affine-block-surface` where the declaration is resolved.
13
- *
14
- * The diagram frame's own 44, and deliberately: §17.6.4 draws the operator in
15
- * the very same cut-corner pentagon Annex A draws a frame heading in — it IS a
16
- * frame, nested in another one — and two numbers for one piece of furniture
17
- * would drift.
18
- */
19
- export declare const UML_FRAGMENT_BAND = 44;
20
5
  /**
21
6
  * The INTERACTION OPERATOR of a combined fragment — the word written in its
22
7
  * pentagon, and the whole of what the fragment says (UML 2.5.1 §17.6.4).
@@ -35,21 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { field } from '../../../std/gfx/index.js';
36
36
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
37
37
  import { umlInNameBand } from './band.js';
38
- /**
39
- * Height of a combined fragment's OPERATOR BAND — the strip across its top the
40
- * pentagon tag is drawn in, in model units.
41
- *
42
- * Owned by the model for the reason {@link UML_FRAME_BAND_HEIGHT} is: the
43
- * fragment's own hit test reads it (a fragment is clickable by its tag strip as
44
- * well as by its border), and `affine-model` cannot reach into
45
- * `affine-block-surface` where the declaration is resolved.
46
- *
47
- * The diagram frame's own 44, and deliberately: §17.6.4 draws the operator in
48
- * the very same cut-corner pentagon Annex A draws a frame heading in — it IS a
49
- * frame, nested in another one — and two numbers for one piece of furniture
50
- * would drift.
51
- */
52
- export const UML_FRAGMENT_BAND = 44;
38
+ import { UML_FRAGMENT_BAND } from './consts.js';
53
39
  /**
54
40
  * A COMBINED FRAGMENT — the rectangle drawn round part of a sequence diagram
55
41
  * with an operator in its corner (UML 2.5.1 §17.6.4), and, under the `ref`
@@ -1,4 +1,5 @@
1
1
  export * from './band.js';
2
+ export * from './consts.js';
2
3
  export * from './diagram.js';
3
4
  export * from './fragment.js';
4
5
  export * from './lifeline.js';
@@ -1,4 +1,5 @@
1
1
  export * from './band.js';
2
+ export * from './consts.js';
2
3
  export * from './diagram.js';
3
4
  export * from './fragment.js';
4
5
  export * from './lifeline.js';
@@ -2,26 +2,6 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Height of a partition's NAME BAND — the strip its name is written in, in
7
- * model units.
8
- *
9
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`, for
10
- * the reason {@link UML_FRAME_BAND_HEIGHT} is: the partition's own hit test
11
- * reads it (a swimlane is clickable by its header as well as by its border),
12
- * and `affine-model` cannot reach into `affine-block-surface` where the
13
- * declaration is resolved. One number, owned by the layer that both the
14
- * declaration and the hit test can read.
15
- *
16
- * It is the band's THICKNESS whichever edge the band is on — the top for a
17
- * vertical lane, the left for a horizontal one — because §15.6.4 draws one
18
- * header strip and turns it with the lane rather than resizing it.
19
- *
20
- * 36 against the diagram frame's 44: a partition header is a name and not a
21
- * `<kind> <name>` heading, and it is written inside a lane that already sits on
22
- * a sheet, so it reads as a subdivision rather than as a second sheet.
23
- */
24
- export declare const UML_PARTITION_BAND = 36;
25
5
  /**
26
6
  * Which way a partition is sliced — the one thing §15.6.4 lets an author choose
27
7
  * about a swimlane, and the thing that decides which edge the header is on.
@@ -35,26 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { field } from '../../../std/gfx/index.js';
36
36
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
37
37
  import { umlInNameBand } from './band.js';
38
- /**
39
- * Height of a partition's NAME BAND — the strip its name is written in, in
40
- * model units.
41
- *
42
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-uml`, for
43
- * the reason {@link UML_FRAME_BAND_HEIGHT} is: the partition's own hit test
44
- * reads it (a swimlane is clickable by its header as well as by its border),
45
- * and `affine-model` cannot reach into `affine-block-surface` where the
46
- * declaration is resolved. One number, owned by the layer that both the
47
- * declaration and the hit test can read.
48
- *
49
- * It is the band's THICKNESS whichever edge the band is on — the top for a
50
- * vertical lane, the left for a horizontal one — because §15.6.4 draws one
51
- * header strip and turns it with the lane rather than resizing it.
52
- *
53
- * 36 against the diagram frame's 44: a partition header is a name and not a
54
- * `<kind> <name>` heading, and it is written inside a lane that already sits on
55
- * a sheet, so it reads as a subdivision rather than as a second sheet.
56
- */
57
- export const UML_PARTITION_BAND = 36;
38
+ import { UML_PARTITION_BAND } from './consts.js';
58
39
  /**
59
40
  * An activity PARTITION — the swimlane of UML 2.5.1 §15.6.4: the strip drawn
60
41
  * across an activity diagram saying who (or what) is responsible for the
@@ -2,17 +2,6 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Height of a region's NAME BAND — the strip its name is written in, in model
7
- * units.
8
- *
9
- * Owned by the model for the reason {@link UML_PARTITION_BAND} is: the region's
10
- * own hit test reads it, and `affine-model` cannot reach into the package where
11
- * the declaration is resolved. The same 36 the partition uses, and deliberately
12
- * so — the two are the same piece of furniture, a name written in a strip along
13
- * the top of a transparent frame, and two numbers would drift.
14
- */
15
- export declare const UML_REGION_BAND = 36;
16
5
  export type UmlRegionProps = FrameworkBackgroundProps & {
17
6
  /** The state name, written in the band — edited inline on dblclick. */
18
7
  name?: string;
@@ -35,17 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { field } from '../../../std/gfx/index.js';
36
36
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
37
37
  import { umlInNameBand } from './band.js';
38
- /**
39
- * Height of a region's NAME BAND — the strip its name is written in, in model
40
- * units.
41
- *
42
- * Owned by the model for the reason {@link UML_PARTITION_BAND} is: the region's
43
- * own hit test reads it, and `affine-model` cannot reach into the package where
44
- * the declaration is resolved. The same 36 the partition uses, and deliberately
45
- * so — the two are the same piece of furniture, a name written in a strip along
46
- * the top of a transparent frame, and two numbers would drift.
47
- */
48
- export const UML_REGION_BAND = 36;
38
+ import { UML_REGION_BAND } from './consts.js';
49
39
  /**
50
40
  * A COMPOSITE STATE — the region of UML 2.5.1 §14.2.4: the rounded rectangle
51
41
  * drawn round the sub-states of a state that has its own state machine inside