@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
@@ -0,0 +1,88 @@
1
+ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
+ import type { FrameworkBackgroundProps } from '../framework-background/index.js';
3
+ import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
4
+ /**
5
+ * Which of C4's levels this board draws — the DECLARED fact, as opposed to the
6
+ * title, which is free text and says whatever its author wants it to.
7
+ *
8
+ * **Four values, for the four C's the notation is named after**: Context,
9
+ * Containers, Components, Code. The vocabulary is the model's, so it says all
10
+ * of it.
11
+ *
12
+ * ## Why `code` is here although nothing draws it
13
+ *
14
+ * Because the two questions are not the same one. What the EDITOR can draw is a
15
+ * fact about this tooling — there are no code-level artefacts in the pack today,
16
+ * and C4 itself says to skip that diagram unless it is generated from the source
17
+ * — while what a SHEET may declare is a fact about the author's intent. A board
18
+ * an architect keeps for the class diagram they paste in from elsewhere is a
19
+ * code-level board, and a vocabulary that refused to let them say so would be
20
+ * this editor's limitation dressed up as the notation's.
21
+ *
22
+ * So the declaration is the author's to make, and no rule judges it: nothing in
23
+ * the pack knows what a code diagram admits, and a rule with nothing to forbid
24
+ * is data that can never fire (`rules.ts` says this at length, about `component`
25
+ * and `code` together). The level is recorded, exported and readable; it is
26
+ * simply not yet checked.
27
+ *
28
+ * ## Widening this union is additive
29
+ *
30
+ * A value added here is a value older clients have never seen, and they read it
31
+ * back as the string it is — the same promise `C4NodeKind` and
32
+ * `C4BoundaryVariant` make. No document is rewritten, no migration is owed, and
33
+ * a rule that does not name a level evaluates nothing on a board carrying it.
34
+ *
35
+ * A board that states a level is a board a rule can judge — "a container has no
36
+ * place on a context diagram" — where a board that states nothing is a free
37
+ * sketch, which is what every C4 diagram ever drawn in this editor is.
38
+ */
39
+ export type C4BoardLevel = 'context' | 'container' | 'component' | 'code';
40
+ export type C4BoardProps = FrameworkBackgroundProps & {
41
+ /** The diagram title, written top-left — edited inline on dblclick. */
42
+ name?: string;
43
+ /** Which C4 level this sheet draws. Absent means a free sketch. */
44
+ level?: C4BoardLevel;
45
+ };
46
+ /**
47
+ * The C4 board: the sheet one diagram of the model is drawn on — a context
48
+ * diagram, a container diagram, a component diagram. A framework background like
49
+ * every other one in the library: the user drops nodes on top of it, and a
50
+ * connector never snaps to it.
51
+ *
52
+ * It carries a NAME, and optionally the LEVEL it draws. A C4 diagram has no
53
+ * frame of reference — a system drawn top left says nothing more than one drawn
54
+ * bottom right — so there are no axes, no zones and no partition to declare.
55
+ *
56
+ * What it LOOKS like is declared, not coded: see `C4_BOARD_BACKGROUND` in
57
+ * `@labre/affine-gfx-c4`.
58
+ */
59
+ export declare class C4BoardElementModel extends FrameworkBackgroundElementModel<C4BoardProps> {
60
+ get type(): string;
61
+ accessor name: string;
62
+ accessor resizeEnabled: boolean;
63
+ accessor rotate: number;
64
+ accessor xywh: SerializedXYWH;
65
+ /**
66
+ * Which C4 level this sheet draws — the only OPTIONAL field of this element,
67
+ * and optional on purpose.
68
+ *
69
+ * `@field()`'s `init` writes nothing for an `undefined` default, so a board
70
+ * that never states its level stays byte-identical to one created before this
71
+ * value existed: no schema version bump, no migration, and every document
72
+ * already on disk opens and paints exactly as it did. The same call
73
+ * `C4BoundaryElementModel.variant` makes, for the same reason.
74
+ *
75
+ * ## Why there is no default to read, unlike the boundary's `variant`
76
+ *
77
+ * A boundary that says nothing still IS one of the two levels, and reading it
78
+ * as `'system'` is the only answer a reader could give. A board that says
79
+ * nothing is a different thing altogether: a free sketch, whose author has not
80
+ * told the tool which of the three sheets they are drawing. Guessing would
81
+ * hand every diagram already in existence a level nobody chose, and a rule
82
+ * reading it would start indicting drawings on the strength of that guess.
83
+ *
84
+ * So absent stays absent, and the rules that read it evaluate nothing at all
85
+ * on a board that declares none — no fact, no rule (PRD principle 8).
86
+ */
87
+ accessor level: C4BoardLevel | undefined;
88
+ }
@@ -0,0 +1,128 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { field } from '../../../std/gfx/index.js';
36
+ import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
37
+ /**
38
+ * The C4 board: the sheet one diagram of the model is drawn on — a context
39
+ * diagram, a container diagram, a component diagram. A framework background like
40
+ * every other one in the library: the user drops nodes on top of it, and a
41
+ * connector never snaps to it.
42
+ *
43
+ * It carries a NAME, and optionally the LEVEL it draws. A C4 diagram has no
44
+ * frame of reference — a system drawn top left says nothing more than one drawn
45
+ * bottom right — so there are no axes, no zones and no partition to declare.
46
+ *
47
+ * What it LOOKS like is declared, not coded: see `C4_BOARD_BACKGROUND` in
48
+ * `@labre/affine-gfx-c4`.
49
+ */
50
+ let C4BoardElementModel = (() => {
51
+ let _classSuper = FrameworkBackgroundElementModel;
52
+ let _name_decorators;
53
+ let _name_initializers = [];
54
+ let _name_extraInitializers = [];
55
+ let _resizeEnabled_decorators;
56
+ let _resizeEnabled_initializers = [];
57
+ let _resizeEnabled_extraInitializers = [];
58
+ let _rotate_decorators;
59
+ let _rotate_initializers = [];
60
+ let _rotate_extraInitializers = [];
61
+ let _xywh_decorators;
62
+ let _xywh_initializers = [];
63
+ let _xywh_extraInitializers = [];
64
+ let _level_decorators;
65
+ let _level_initializers = [];
66
+ let _level_extraInitializers = [];
67
+ return class C4BoardElementModel extends _classSuper {
68
+ static {
69
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
70
+ _name_decorators = [field('C4 diagram')];
71
+ _resizeEnabled_decorators = [field(true)];
72
+ _rotate_decorators = [field(0)];
73
+ _xywh_decorators = [field()];
74
+ _level_decorators = [field()];
75
+ __esDecorate(this, null, _name_decorators, { kind: "accessor", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
76
+ __esDecorate(this, null, _resizeEnabled_decorators, { kind: "accessor", name: "resizeEnabled", static: false, private: false, access: { has: obj => "resizeEnabled" in obj, get: obj => obj.resizeEnabled, set: (obj, value) => { obj.resizeEnabled = value; } }, metadata: _metadata }, _resizeEnabled_initializers, _resizeEnabled_extraInitializers);
77
+ __esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
78
+ __esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
79
+ __esDecorate(this, null, _level_decorators, { kind: "accessor", name: "level", static: false, private: false, access: { has: obj => "level" in obj, get: obj => obj.level, set: (obj, value) => { obj.level = value; } }, metadata: _metadata }, _level_initializers, _level_extraInitializers);
80
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
81
+ }
82
+ get type() {
83
+ return 'c4Board';
84
+ }
85
+ #name_accessor_storage = __runInitializers(this, _name_initializers, 'C4 diagram');
86
+ get name() { return this.#name_accessor_storage; }
87
+ set name(value) { this.#name_accessor_storage = value; }
88
+ #resizeEnabled_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _resizeEnabled_initializers, true));
89
+ get resizeEnabled() { return this.#resizeEnabled_accessor_storage; }
90
+ set resizeEnabled(value) { this.#resizeEnabled_accessor_storage = value; }
91
+ #rotate_accessor_storage = (__runInitializers(this, _resizeEnabled_extraInitializers), __runInitializers(this, _rotate_initializers, 0));
92
+ get rotate() { return this.#rotate_accessor_storage; }
93
+ set rotate(value) { this.#rotate_accessor_storage = value; }
94
+ #xywh_accessor_storage = (__runInitializers(this, _rotate_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,1400,900]'));
95
+ get xywh() { return this.#xywh_accessor_storage; }
96
+ set xywh(value) { this.#xywh_accessor_storage = value; }
97
+ #level_accessor_storage = (__runInitializers(this, _xywh_extraInitializers), __runInitializers(this, _level_initializers, undefined));
98
+ /**
99
+ * Which C4 level this sheet draws — the only OPTIONAL field of this element,
100
+ * and optional on purpose.
101
+ *
102
+ * `@field()`'s `init` writes nothing for an `undefined` default, so a board
103
+ * that never states its level stays byte-identical to one created before this
104
+ * value existed: no schema version bump, no migration, and every document
105
+ * already on disk opens and paints exactly as it did. The same call
106
+ * `C4BoundaryElementModel.variant` makes, for the same reason.
107
+ *
108
+ * ## Why there is no default to read, unlike the boundary's `variant`
109
+ *
110
+ * A boundary that says nothing still IS one of the two levels, and reading it
111
+ * as `'system'` is the only answer a reader could give. A board that says
112
+ * nothing is a different thing altogether: a free sketch, whose author has not
113
+ * told the tool which of the three sheets they are drawing. Guessing would
114
+ * hand every diagram already in existence a level nobody chose, and a rule
115
+ * reading it would start indicting drawings on the strength of that guess.
116
+ *
117
+ * So absent stays absent, and the rules that read it evaluate nothing at all
118
+ * on a board that declares none — no fact, no rule (PRD principle 8).
119
+ */
120
+ get level() { return this.#level_accessor_storage; }
121
+ set level(value) { this.#level_accessor_storage = value; }
122
+ constructor() {
123
+ super(...arguments);
124
+ __runInitializers(this, _level_extraInitializers);
125
+ }
126
+ };
127
+ })();
128
+ export { C4BoardElementModel };
@@ -0,0 +1,63 @@
1
+ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
+ import type { FrameworkBackgroundProps } from '../framework-background/index.js';
3
+ import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
4
+ /**
5
+ * Which level a boundary encloses. C4 draws the two identically — a dashed
6
+ * rectangle round a group of elements — and the difference is entirely in what
7
+ * the label says, which is why this is one element type with a variant rather
8
+ * than two.
9
+ */
10
+ export type C4BoundaryVariant = 'system' | 'container';
11
+ export type C4BoundaryProps = FrameworkBackgroundProps & {
12
+ /** The boundary name, written bottom-left — edited inline on dblclick. */
13
+ name?: string;
14
+ /** Which level this boundary encloses. Absent behaves as `'system'`. */
15
+ variant?: C4BoundaryVariant;
16
+ };
17
+ /**
18
+ * A C4 boundary: the dashed rectangle drawn AROUND a group of elements to say
19
+ * "all of this is one system" (or one container). A framework background, so
20
+ * nodes are dropped on it and connectors never snap to it — but a transparent
21
+ * one, unlike every other background in the library: a boundary is drawn over
22
+ * the board it sits on, and an opaque card would hide the diagram it encloses.
23
+ *
24
+ * What it LOOKS like is declared, not coded: see `C4_BOUNDARY_BACKGROUND` in
25
+ * `@labre/affine-gfx-c4`.
26
+ */
27
+ export declare class C4BoundaryElementModel extends FrameworkBackgroundElementModel<C4BoundaryProps> {
28
+ get type(): string;
29
+ accessor name: string;
30
+ accessor resizeEnabled: boolean;
31
+ accessor rotate: number;
32
+ accessor xywh: SerializedXYWH;
33
+ /**
34
+ * The level enclosed — the only OPTIONAL field of this element, and optional
35
+ * on purpose.
36
+ *
37
+ * `@field()`'s `init` writes nothing for an `undefined` default, so a boundary
38
+ * that never states its level stays byte-identical to one created before this
39
+ * value existed: no schema version bump, no migration, and every document
40
+ * already on disk opens and paints exactly as it did. The same call
41
+ * `BpmnPoolElementModel.lanes` makes, for the same reason.
42
+ *
43
+ * Absent reads as `'system'` everywhere — the outermost boundary, which is the
44
+ * one a reader draws first and the one the default wording names.
45
+ */
46
+ accessor variant: C4BoundaryVariant | undefined;
47
+ /**
48
+ * The variant every reader of this element should use — `variant` with its
49
+ * documented default already applied.
50
+ *
51
+ * Derived, not stored: nothing here reaches the document, and an element that
52
+ * never stated a level is untouched by the existence of this getter.
53
+ *
54
+ * It is what lets the declaration gate a piece of itself on the level
55
+ * (`variantProp`), which a raw optional field cannot do: an unstated `variant`
56
+ * stringifies to `"undefined"`, matches no declared variant, and would paint
57
+ * NOTHING — the trap the boundary declaration used to avoid by declaring no
58
+ * `variantProp` at all. Reading the default here removes the trap instead of
59
+ * routing round it, so the frame can finally write the bracket line the
60
+ * stencil puts under a boundary's name.
61
+ */
62
+ get variantOrDefault(): C4BoundaryVariant;
63
+ }
@@ -0,0 +1,134 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { field } from '../../../std/gfx/index.js';
36
+ import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
37
+ /**
38
+ * A C4 boundary: the dashed rectangle drawn AROUND a group of elements to say
39
+ * "all of this is one system" (or one container). A framework background, so
40
+ * nodes are dropped on it and connectors never snap to it — but a transparent
41
+ * one, unlike every other background in the library: a boundary is drawn over
42
+ * the board it sits on, and an opaque card would hide the diagram it encloses.
43
+ *
44
+ * What it LOOKS like is declared, not coded: see `C4_BOUNDARY_BACKGROUND` in
45
+ * `@labre/affine-gfx-c4`.
46
+ */
47
+ let C4BoundaryElementModel = (() => {
48
+ let _classSuper = FrameworkBackgroundElementModel;
49
+ let _name_decorators;
50
+ let _name_initializers = [];
51
+ let _name_extraInitializers = [];
52
+ let _resizeEnabled_decorators;
53
+ let _resizeEnabled_initializers = [];
54
+ let _resizeEnabled_extraInitializers = [];
55
+ let _rotate_decorators;
56
+ let _rotate_initializers = [];
57
+ let _rotate_extraInitializers = [];
58
+ let _xywh_decorators;
59
+ let _xywh_initializers = [];
60
+ let _xywh_extraInitializers = [];
61
+ let _variant_decorators;
62
+ let _variant_initializers = [];
63
+ let _variant_extraInitializers = [];
64
+ return class C4BoundaryElementModel extends _classSuper {
65
+ static {
66
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
67
+ _name_decorators = [field('Boundary')];
68
+ _resizeEnabled_decorators = [field(true)];
69
+ _rotate_decorators = [field(0)];
70
+ _xywh_decorators = [field()];
71
+ _variant_decorators = [field()];
72
+ __esDecorate(this, null, _name_decorators, { kind: "accessor", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
73
+ __esDecorate(this, null, _resizeEnabled_decorators, { kind: "accessor", name: "resizeEnabled", static: false, private: false, access: { has: obj => "resizeEnabled" in obj, get: obj => obj.resizeEnabled, set: (obj, value) => { obj.resizeEnabled = value; } }, metadata: _metadata }, _resizeEnabled_initializers, _resizeEnabled_extraInitializers);
74
+ __esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
75
+ __esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
76
+ __esDecorate(this, null, _variant_decorators, { kind: "accessor", name: "variant", static: false, private: false, access: { has: obj => "variant" in obj, get: obj => obj.variant, set: (obj, value) => { obj.variant = value; } }, metadata: _metadata }, _variant_initializers, _variant_extraInitializers);
77
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
78
+ }
79
+ get type() {
80
+ return 'c4Boundary';
81
+ }
82
+ #name_accessor_storage = __runInitializers(this, _name_initializers, 'Boundary');
83
+ get name() { return this.#name_accessor_storage; }
84
+ set name(value) { this.#name_accessor_storage = value; }
85
+ #resizeEnabled_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _resizeEnabled_initializers, true));
86
+ get resizeEnabled() { return this.#resizeEnabled_accessor_storage; }
87
+ set resizeEnabled(value) { this.#resizeEnabled_accessor_storage = value; }
88
+ #rotate_accessor_storage = (__runInitializers(this, _resizeEnabled_extraInitializers), __runInitializers(this, _rotate_initializers, 0));
89
+ get rotate() { return this.#rotate_accessor_storage; }
90
+ set rotate(value) { this.#rotate_accessor_storage = value; }
91
+ #xywh_accessor_storage = (__runInitializers(this, _rotate_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,520,360]'));
92
+ get xywh() { return this.#xywh_accessor_storage; }
93
+ set xywh(value) { this.#xywh_accessor_storage = value; }
94
+ #variant_accessor_storage = (__runInitializers(this, _xywh_extraInitializers), __runInitializers(this, _variant_initializers, undefined));
95
+ /**
96
+ * The level enclosed — the only OPTIONAL field of this element, and optional
97
+ * on purpose.
98
+ *
99
+ * `@field()`'s `init` writes nothing for an `undefined` default, so a boundary
100
+ * that never states its level stays byte-identical to one created before this
101
+ * value existed: no schema version bump, no migration, and every document
102
+ * already on disk opens and paints exactly as it did. The same call
103
+ * `BpmnPoolElementModel.lanes` makes, for the same reason.
104
+ *
105
+ * Absent reads as `'system'` everywhere — the outermost boundary, which is the
106
+ * one a reader draws first and the one the default wording names.
107
+ */
108
+ get variant() { return this.#variant_accessor_storage; }
109
+ set variant(value) { this.#variant_accessor_storage = value; }
110
+ /**
111
+ * The variant every reader of this element should use — `variant` with its
112
+ * documented default already applied.
113
+ *
114
+ * Derived, not stored: nothing here reaches the document, and an element that
115
+ * never stated a level is untouched by the existence of this getter.
116
+ *
117
+ * It is what lets the declaration gate a piece of itself on the level
118
+ * (`variantProp`), which a raw optional field cannot do: an unstated `variant`
119
+ * stringifies to `"undefined"`, matches no declared variant, and would paint
120
+ * NOTHING — the trap the boundary declaration used to avoid by declaring no
121
+ * `variantProp` at all. Reading the default here removes the trap instead of
122
+ * routing round it, so the frame can finally write the bracket line the
123
+ * stencil puts under a boundary's name.
124
+ */
125
+ get variantOrDefault() {
126
+ return this.variant ?? 'system';
127
+ }
128
+ constructor() {
129
+ super(...arguments);
130
+ __runInitializers(this, _variant_extraInitializers);
131
+ }
132
+ };
133
+ })();
134
+ export { C4BoundaryElementModel };
@@ -0,0 +1,3 @@
1
+ export * from './board.js';
2
+ export * from './boundary.js';
3
+ export * from './node.js';
@@ -0,0 +1,3 @@
1
+ export * from './board.js';
2
+ export * from './boundary.js';
3
+ export * from './node.js';
@@ -0,0 +1,97 @@
1
+ import type { PointTestOptions } from '../../../std/gfx/index.js';
2
+ import { ShapeElementModel } from '../shape/index.js';
3
+ /**
4
+ * The C4 artefacts the pack draws — the four levels of the model, plus the
5
+ * container flavours the official stencil gives a silhouette of their own:
6
+ *
7
+ * - people — `person` and `person-ext`, a head over a rounded body;
8
+ * - systems — `system` and `system-ext`, a plain rounded rectangle;
9
+ * - containers — `container`, plus `database` (a cylinder), `mobile` (a
10
+ * phone bezel down the leading edge) and `browser` (a chrome band across the
11
+ * top). All four are CONTAINERS: what differs is the picture, never the
12
+ * level;
13
+ * - components — `component`, the innermost level C4 draws.
14
+ *
15
+ * ## Why "external" is a KIND and not a flag
16
+ *
17
+ * `person-ext` and `system-ext` are separate values rather than an `external`
18
+ * boolean, mirroring {@link BpmnNodeKind}'s message and timer starts: the C4
19
+ * stencil greys an external element out entirely — fill, border and label — so
20
+ * externality is a different picture, not a modifier on one. One discriminant
21
+ * keeps the renderer's switch total and the size / palette tables keyed the same
22
+ * way; a second, orthogonal flag would multiply both by two and let a
23
+ * combination exist that the notation has no drawing for.
24
+ *
25
+ * ## Compatibility
26
+ *
27
+ * This union is only ever WIDENED, and it is widened with new VALUES of the
28
+ * existing `kind` string field — no new field, no schema change, no migration
29
+ * and no backfill. Same promise `wardley` and `bpmn` already make.
30
+ */
31
+ export type C4NodeKind = 'person' | 'person-ext' | 'system' | 'system-ext' | 'container' | 'database' | 'mobile' | 'browser' | 'component';
32
+ /**
33
+ * A C4 node. Extends {@link ShapeElementModel} (a native shape) so it inherits
34
+ * ALL shape behaviour — editable stroke width / colours, inner text, native
35
+ * resize, the shape context toolbar — for free. `kind` discriminates the
36
+ * artefacts and drives the RENDERING alone; what a node MEANS is the `role`
37
+ * stamped on it at creation (`gfx/c4/src/roles.ts`).
38
+ *
39
+ * Mirrors {@link BpmnNodeElementModel}.
40
+ */
41
+ export declare class C4NodeElementModel extends ShapeElementModel {
42
+ get type(): string;
43
+ /**
44
+ * Connector anchors are restricted to the centre, as they are for a BPMN flow
45
+ * object: a C4 relationship attaches to the node centre and clips at the
46
+ * perimeter, so an arrow between two boxes points at the boxes rather than at
47
+ * whichever of their twelve anchors the hand was nearest.
48
+ */
49
+ get centerAnchorOnly(): boolean;
50
+ /**
51
+ * A C4 node is SOLID whatever its `filled` flag says.
52
+ *
53
+ * `rect.includesPoint` (and `ellipse`'s, and `diamond`'s) skips the interior
54
+ * test for an unfilled shape and falls back to the stroke plus the tight
55
+ * bounding box of the text run — the behaviour that makes a hollow group let
56
+ * clicks through to the work it encloses. Three of the nine C4 kinds are
57
+ * created unfilled and unstroked on purpose (`person`, `person-ext`,
58
+ * `database`, and the two decorated containers): their silhouette is a head
59
+ * over a body, a cylinder, a phone or a browser window, none of which a native
60
+ * rect can be, so the GLYPH paints the body and the native shape paints
61
+ * nothing at all.
62
+ *
63
+ * The consequence, reported by the PO on 27/08/2026, is that those nodes could
64
+ * not be double-clicked into their own text editor: the body a user can
65
+ * plainly see was not a hit target, and only the border and the handful of
66
+ * characters of the label were. Pointer events reach an element view through
67
+ * this method (`GfxViewEventHandler`), so selecting, hovering, dragging and
68
+ * `dblclick` were all affected — the last one visibly.
69
+ *
70
+ * Forcing `ignoreTransparent: false` says the one thing that is true of every
71
+ * C4 artefact and of no BPMN group: it is a BOX, and its whole area belongs to
72
+ * it. Nothing here is stored — the override changes hit testing, never the
73
+ * document — so it applies to nodes drawn before it existed as well as after.
74
+ *
75
+ * The same latent gap exists for BPMN's `dataObject` / `dataStore`; it is not
76
+ * fixed there because a BPMN artifact's own answer may well be different (its
77
+ * `hollow` kinds want the click-through), and guessing on another pack's
78
+ * behalf is how a fix becomes a regression.
79
+ */
80
+ includesPoint(x: number, y: number, options: PointTestOptions): boolean;
81
+ /**
82
+ * The one field a C4 node carries, and the whole of its schema.
83
+ *
84
+ * The two other tiers of the notation — the type line and the description —
85
+ * are deliberately NOT fields here. They are canvas TEXT elements, grouped
86
+ * with the shape, and they are edited in place exactly like any other words on
87
+ * the canvas (PO recette, 28/08/2026). A field would have been a second place
88
+ * to write the same sentence, reachable only through a form, and the form is
89
+ * the mechanism the recette rejected: an architect writes on the picture.
90
+ *
91
+ * What that buys the document format is that this model stays exactly what it
92
+ * was — `kind`, on a native shape — while the component grows two more tiers.
93
+ * See `gfx/c4/src/actions.ts` for how the group is assembled and
94
+ * `gfx/c4/src/export.ts` for how it is read back.
95
+ */
96
+ accessor kind: C4NodeKind;
97
+ }
@@ -0,0 +1,130 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { field } from '../../../std/gfx/index.js';
36
+ import { ShapeElementModel } from '../shape/index.js';
37
+ /**
38
+ * A C4 node. Extends {@link ShapeElementModel} (a native shape) so it inherits
39
+ * ALL shape behaviour — editable stroke width / colours, inner text, native
40
+ * resize, the shape context toolbar — for free. `kind` discriminates the
41
+ * artefacts and drives the RENDERING alone; what a node MEANS is the `role`
42
+ * stamped on it at creation (`gfx/c4/src/roles.ts`).
43
+ *
44
+ * Mirrors {@link BpmnNodeElementModel}.
45
+ */
46
+ let C4NodeElementModel = (() => {
47
+ let _classSuper = ShapeElementModel;
48
+ let _kind_decorators;
49
+ let _kind_initializers = [];
50
+ let _kind_extraInitializers = [];
51
+ return class C4NodeElementModel extends _classSuper {
52
+ static {
53
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
54
+ _kind_decorators = [field('system')];
55
+ __esDecorate(this, null, _kind_decorators, { kind: "accessor", name: "kind", static: false, private: false, access: { has: obj => "kind" in obj, get: obj => obj.kind, set: (obj, value) => { obj.kind = value; } }, metadata: _metadata }, _kind_initializers, _kind_extraInitializers);
56
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
57
+ }
58
+ get type() {
59
+ return 'c4Node';
60
+ }
61
+ /**
62
+ * Connector anchors are restricted to the centre, as they are for a BPMN flow
63
+ * object: a C4 relationship attaches to the node centre and clips at the
64
+ * perimeter, so an arrow between two boxes points at the boxes rather than at
65
+ * whichever of their twelve anchors the hand was nearest.
66
+ */
67
+ get centerAnchorOnly() {
68
+ return true;
69
+ }
70
+ /**
71
+ * A C4 node is SOLID whatever its `filled` flag says.
72
+ *
73
+ * `rect.includesPoint` (and `ellipse`'s, and `diamond`'s) skips the interior
74
+ * test for an unfilled shape and falls back to the stroke plus the tight
75
+ * bounding box of the text run — the behaviour that makes a hollow group let
76
+ * clicks through to the work it encloses. Three of the nine C4 kinds are
77
+ * created unfilled and unstroked on purpose (`person`, `person-ext`,
78
+ * `database`, and the two decorated containers): their silhouette is a head
79
+ * over a body, a cylinder, a phone or a browser window, none of which a native
80
+ * rect can be, so the GLYPH paints the body and the native shape paints
81
+ * nothing at all.
82
+ *
83
+ * The consequence, reported by the PO on 27/08/2026, is that those nodes could
84
+ * not be double-clicked into their own text editor: the body a user can
85
+ * plainly see was not a hit target, and only the border and the handful of
86
+ * characters of the label were. Pointer events reach an element view through
87
+ * this method (`GfxViewEventHandler`), so selecting, hovering, dragging and
88
+ * `dblclick` were all affected — the last one visibly.
89
+ *
90
+ * Forcing `ignoreTransparent: false` says the one thing that is true of every
91
+ * C4 artefact and of no BPMN group: it is a BOX, and its whole area belongs to
92
+ * it. Nothing here is stored — the override changes hit testing, never the
93
+ * document — so it applies to nodes drawn before it existed as well as after.
94
+ *
95
+ * The same latent gap exists for BPMN's `dataObject` / `dataStore`; it is not
96
+ * fixed there because a BPMN artifact's own answer may well be different (its
97
+ * `hollow` kinds want the click-through), and guessing on another pack's
98
+ * behalf is how a fix becomes a regression.
99
+ */
100
+ includesPoint(x, y, options) {
101
+ return super.includesPoint(x, y, {
102
+ ...options,
103
+ ignoreTransparent: false,
104
+ });
105
+ }
106
+ #kind_accessor_storage = __runInitializers(this, _kind_initializers, 'system');
107
+ /**
108
+ * The one field a C4 node carries, and the whole of its schema.
109
+ *
110
+ * The two other tiers of the notation — the type line and the description —
111
+ * are deliberately NOT fields here. They are canvas TEXT elements, grouped
112
+ * with the shape, and they are edited in place exactly like any other words on
113
+ * the canvas (PO recette, 28/08/2026). A field would have been a second place
114
+ * to write the same sentence, reachable only through a form, and the form is
115
+ * the mechanism the recette rejected: an architect writes on the picture.
116
+ *
117
+ * What that buys the document format is that this model stays exactly what it
118
+ * was — `kind`, on a native shape — while the component grows two more tiers.
119
+ * See `gfx/c4/src/actions.ts` for how the group is assembled and
120
+ * `gfx/c4/src/export.ts` for how it is read back.
121
+ */
122
+ get kind() { return this.#kind_accessor_storage; }
123
+ set kind(value) { this.#kind_accessor_storage = value; }
124
+ constructor() {
125
+ super(...arguments);
126
+ __runInitializers(this, _kind_extraInitializers);
127
+ }
128
+ };
129
+ })();
130
+ export { C4NodeElementModel };