@motifx-community/ui 0.1.0-beta.14 → 0.1.0-beta.16

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 (330) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/README.md +2 -2
  3. package/dist/components/diagram/Diagram.d.ts +607 -0
  4. package/dist/components/diagram/DiagramAutoPan.d.ts +17 -0
  5. package/dist/components/diagram/DiagramBends.d.ts +70 -0
  6. package/dist/components/diagram/DiagramDragging.d.ts +66 -0
  7. package/dist/components/diagram/DiagramEdgeView.d.ts +78 -0
  8. package/dist/components/diagram/DiagramGrid.d.ts +13 -0
  9. package/dist/components/diagram/DiagramHistory.d.ts +16 -0
  10. package/dist/components/diagram/DiagramLinks.d.ts +177 -0
  11. package/dist/components/diagram/DiagramMap.d.ts +62 -0
  12. package/dist/components/diagram/DiagramNodeView.d.ts +143 -0
  13. package/dist/components/diagram/DiagramOverview.d.ts +20 -0
  14. package/dist/components/diagram/DiagramPanning.d.ts +34 -0
  15. package/dist/components/diagram/diagram-alignment.d.ts +2 -0
  16. package/dist/components/diagram/diagram-auto-pan-host.d.ts +8 -0
  17. package/dist/components/diagram/diagram-background.d.ts +2 -0
  18. package/dist/components/diagram/diagram-bends-host.d.ts +17 -0
  19. package/dist/components/diagram/diagram-card-kind.d.ts +42 -0
  20. package/dist/components/diagram/diagram-card-node.d.ts +11 -0
  21. package/dist/components/diagram/diagram-center-options.d.ts +6 -0
  22. package/dist/components/diagram/diagram-change.d.ts +11 -0
  23. package/dist/components/diagram/diagram-class-member.d.ts +13 -0
  24. package/dist/components/diagram/diagram-class-node.d.ts +12 -0
  25. package/dist/components/diagram/diagram-column-checked-event-args.d.ts +9 -0
  26. package/dist/components/diagram/diagram-connected-event-args.d.ts +6 -0
  27. package/dist/components/diagram/diagram-connecting-event-args.d.ts +9 -0
  28. package/dist/components/diagram/diagram-connection.d.ts +7 -0
  29. package/dist/components/diagram/diagram-data.d.ts +12 -0
  30. package/dist/components/diagram/diagram-deleted-event-args.d.ts +8 -0
  31. package/dist/components/diagram/diagram-deleting-event-args.d.ts +9 -0
  32. package/dist/components/diagram/diagram-dragging-host.d.ts +47 -0
  33. package/dist/components/diagram/diagram-drawn-node.d.ts +10 -0
  34. package/dist/components/diagram/diagram-edge-end.d.ts +2 -0
  35. package/dist/components/diagram/diagram-edge-path.d.ts +5 -0
  36. package/dist/components/diagram/diagram-edge-reshaped-event-args.d.ts +8 -0
  37. package/dist/components/diagram/diagram-edge-reshaping-event-args.d.ts +6 -0
  38. package/dist/components/diagram/diagram-edge.d.ts +49 -0
  39. package/dist/components/diagram/diagram-edit.d.ts +10 -0
  40. package/dist/components/diagram/diagram-export-options.d.ts +14 -0
  41. package/dist/components/diagram/diagram-export.d.ts +28 -0
  42. package/dist/components/diagram/diagram-fit-options.d.ts +12 -0
  43. package/dist/components/diagram/diagram-history-changed-event-args.d.ts +14 -0
  44. package/dist/components/diagram/diagram-history-step.d.ts +9 -0
  45. package/dist/components/diagram/diagram-kinds.d.ts +9 -0
  46. package/dist/components/diagram/diagram-layered.d.ts +39 -0
  47. package/dist/components/diagram/diagram-layout-direction.d.ts +2 -0
  48. package/dist/components/diagram/diagram-layout-options.d.ts +24 -0
  49. package/dist/components/diagram/diagram-layout-type.d.ts +5 -0
  50. package/dist/components/diagram/diagram-layout.d.ts +33 -0
  51. package/dist/components/diagram/diagram-line-look.d.ts +6 -0
  52. package/dist/components/diagram/diagram-line.d.ts +11 -0
  53. package/dist/components/diagram/diagram-links-host.d.ts +45 -0
  54. package/dist/components/diagram/diagram-links-options.d.ts +7 -0
  55. package/dist/components/diagram/diagram-map-props.d.ts +10 -0
  56. package/dist/components/diagram/diagram-map-target.d.ts +27 -0
  57. package/dist/components/diagram/diagram-marker.d.ts +6 -0
  58. package/dist/components/diagram/diagram-mini-map-options.d.ts +13 -0
  59. package/dist/components/diagram/diagram-mini-map-position.d.ts +2 -0
  60. package/dist/components/diagram/diagram-node-context.d.ts +26 -0
  61. package/dist/components/diagram/diagram-node-host.d.ts +23 -0
  62. package/dist/components/diagram/diagram-node-kind.d.ts +43 -0
  63. package/dist/components/diagram/diagram-node-move.d.ts +11 -0
  64. package/dist/components/diagram/diagram-node-resized-event-args.d.ts +8 -0
  65. package/dist/components/diagram/diagram-node-resizing-event-args.d.ts +6 -0
  66. package/dist/components/diagram/diagram-node-size.d.ts +8 -0
  67. package/dist/components/diagram/diagram-node-status.d.ts +2 -0
  68. package/dist/components/diagram/diagram-node-toggled-event-args.d.ts +7 -0
  69. package/dist/components/diagram/diagram-node.d.ts +56 -0
  70. package/dist/components/diagram/diagram-nodes-moved-event-args.d.ts +6 -0
  71. package/dist/components/diagram/diagram-nodes-moving-event-args.d.ts +6 -0
  72. package/dist/components/diagram/diagram-panning-host.d.ts +19 -0
  73. package/dist/components/diagram/diagram-pasted-event-args.d.ts +7 -0
  74. package/dist/components/diagram/diagram-pasting-event-args.d.ts +11 -0
  75. package/dist/components/diagram/diagram-path-ends.d.ts +11 -0
  76. package/dist/components/diagram/diagram-path-result.d.ts +6 -0
  77. package/dist/components/diagram/diagram-paths.d.ts +35 -0
  78. package/dist/components/diagram/diagram-point.d.ts +5 -0
  79. package/dist/components/diagram/diagram-port-place.d.ts +9 -0
  80. package/dist/components/diagram/diagram-port.d.ts +27 -0
  81. package/dist/components/diagram/diagram-props.d.ts +159 -0
  82. package/dist/components/diagram/diagram-reconnected-event-args.d.ts +10 -0
  83. package/dist/components/diagram/diagram-reconnecting-event-args.d.ts +11 -0
  84. package/dist/components/diagram/diagram-rect.d.ts +7 -0
  85. package/dist/components/diagram/diagram-resize-side.d.ts +2 -0
  86. package/dist/components/diagram/diagram-route.d.ts +10 -0
  87. package/dist/components/diagram/diagram-selection-changed-event-args.d.ts +9 -0
  88. package/dist/components/diagram/diagram-selection.d.ts +5 -0
  89. package/dist/components/diagram/diagram-side.d.ts +2 -0
  90. package/dist/components/diagram/diagram-table-column.d.ts +13 -0
  91. package/dist/components/diagram/diagram-table-node.d.ts +12 -0
  92. package/dist/components/diagram/diagram-tree.d.ts +14 -0
  93. package/dist/components/diagram/diagram-viewport-changed-event-args.d.ts +8 -0
  94. package/dist/components/diagram/diagram-viewport-options.d.ts +5 -0
  95. package/dist/components/diagram/diagram-viewport.d.ts +6 -0
  96. package/dist/components/diagram/index.d.ts +65 -0
  97. package/dist/components/diagram/swallow-next-click.d.ts +5 -0
  98. package/dist/components/expressioneditor/ExpressionEditor.d.ts +111 -0
  99. package/dist/components/expressioneditor/expression-editor-props.d.ts +24 -0
  100. package/dist/components/expressioneditor/index.d.ts +2 -0
  101. package/dist/components/formlayout/FormLayout.d.ts +10 -3
  102. package/dist/components/formlayout/form-editor-type.d.ts +1 -1
  103. package/dist/components/formlayout/form-item.d.ts +4 -1
  104. package/dist/components/formlayout/form-layout-props.d.ts +1 -1
  105. package/dist/components/formlayout/index.d.ts +1 -0
  106. package/dist/components/formlayout/schema-items.d.ts +26 -0
  107. package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +53 -1
  108. package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +2 -0
  109. package/dist/components/pivotgrid/model/PivotWindows.d.ts +3 -6
  110. package/dist/components/toolbar/Toolbar.d.ts +5 -3
  111. package/dist/core/control.d.ts +2 -0
  112. package/dist/core/keyboard.d.ts +5 -0
  113. package/dist/core/measure/index.d.ts +2 -0
  114. package/dist/core/measure/picture.d.ts +27 -0
  115. package/dist/core/shortcut-options.d.ts +5 -2
  116. package/dist/core/ui-strings.d.ts +191 -0
  117. package/dist/generated/tokens.d.ts +1615 -0
  118. package/dist/index.d.ts +2 -0
  119. package/dist/index.js +11501 -705
  120. package/dist/index.js.map +1 -1
  121. package/dist/locales/en.json +180 -1
  122. package/dist/locales/tr.json +180 -1
  123. package/dist/styles.css +2262 -3
  124. package/dist/tokens/index.d.ts +1615 -0
  125. package/dist/tokens/index.js +1615 -0
  126. package/dist/tokens/index.js.map +1 -1
  127. package/dist/{tr-BGbF9uCs.js → tr-4GNbFdQh.js} +361 -3
  128. package/dist/{tr-BGbF9uCs.js.map → tr-4GNbFdQh.js.map} +1 -1
  129. package/docs/accordion.md +1 -1
  130. package/docs/actionsheet.md +1 -1
  131. package/docs/appbar.md +1 -1
  132. package/docs/appmenu-api.md +1 -1
  133. package/docs/appmenu-programmatic.md +1 -1
  134. package/docs/appmenu-search.md +1 -1
  135. package/docs/appmenu.md +1 -1
  136. package/docs/avatar.md +1 -1
  137. package/docs/badge.md +1 -1
  138. package/docs/bar-gauge-angles.md +1 -1
  139. package/docs/bar-gauge-data.md +1 -1
  140. package/docs/bar-gauge-labels.md +1 -1
  141. package/docs/bar-gauge.md +1 -1
  142. package/docs/barcode.md +1 -1
  143. package/docs/bottomnavigation.md +1 -1
  144. package/docs/bottomsheet.md +1 -1
  145. package/docs/breadcrumb.md +1 -1
  146. package/docs/button.md +1 -1
  147. package/docs/buttongroup.md +1 -1
  148. package/docs/buttons.md +1 -1
  149. package/docs/calendar.md +1 -1
  150. package/docs/card.md +1 -1
  151. package/docs/chart-bars.md +1 -1
  152. package/docs/chart-candles.md +1 -1
  153. package/docs/chart-funnel.md +1 -1
  154. package/docs/chart-heatmap.md +1 -1
  155. package/docs/chart-lines.md +1 -1
  156. package/docs/chart-live.md +1 -1
  157. package/docs/chart-pie.md +1 -1
  158. package/docs/chart-radar.md +1 -1
  159. package/docs/chart-ranges.md +1 -1
  160. package/docs/chart-references.md +1 -1
  161. package/docs/chart-scatter.md +1 -1
  162. package/docs/chart-waterfall.md +1 -1
  163. package/docs/chart-zoom.md +1 -1
  164. package/docs/chart.md +1 -1
  165. package/docs/chat.md +1 -1
  166. package/docs/checkbox.md +1 -1
  167. package/docs/chip.md +1 -1
  168. package/docs/choice.md +1 -1
  169. package/docs/colorbox.md +1 -1
  170. package/docs/combobox.md +1 -1
  171. package/docs/commands.md +1 -1
  172. package/docs/control.md +1 -1
  173. package/docs/data.md +2 -2
  174. package/docs/datagrid-api.md +1 -1
  175. package/docs/datagrid-bands.md +1 -1
  176. package/docs/datagrid-drag-select.md +1 -1
  177. package/docs/datagrid-drag.md +1 -1
  178. package/docs/datagrid-editing.md +1 -1
  179. package/docs/datagrid-filtering.md +1 -1
  180. package/docs/datagrid-forms.md +1 -1
  181. package/docs/datagrid-grouping.md +1 -1
  182. package/docs/datagrid-layout.md +1 -1
  183. package/docs/datagrid-lookups.md +1 -1
  184. package/docs/datagrid-master-detail.md +1 -1
  185. package/docs/datagrid-scrolling.md +1 -1
  186. package/docs/datagrid-selection.md +1 -1
  187. package/docs/datagrid.md +1 -1
  188. package/docs/datalayer-api.md +491 -0
  189. package/docs/datalayer-changes.md +501 -0
  190. package/docs/datalayer-odata.md +998 -0
  191. package/docs/datalayer-pivot.md +850 -0
  192. package/docs/datalayer-queries.md +516 -0
  193. package/docs/datalayer-rest.md +529 -0
  194. package/docs/datalayer-soap.md +576 -0
  195. package/docs/datalayer-source.md +464 -0
  196. package/docs/datalayer.md +264 -0
  197. package/docs/datebox.md +1 -1
  198. package/docs/daterangebox.md +1 -1
  199. package/docs/diagram-api.md +200 -0
  200. package/docs/diagram-commands.md +79 -0
  201. package/docs/diagram-connections.md +157 -0
  202. package/docs/diagram-custom-nodes.md +325 -0
  203. package/docs/diagram-designer.md +816 -0
  204. package/docs/diagram-editing.md +62 -0
  205. package/docs/diagram-flow.md +157 -0
  206. package/docs/diagram-keyboard.md +58 -0
  207. package/docs/diagram-layout.md +354 -0
  208. package/docs/diagram-nodes.md +206 -0
  209. package/docs/diagram-tables.md +212 -0
  210. package/docs/diagram.md +217 -0
  211. package/docs/display.md +1 -1
  212. package/docs/draggable.md +1 -1
  213. package/docs/drawer.md +1 -1
  214. package/docs/dropdown.md +1 -1
  215. package/docs/editors.md +1 -1
  216. package/docs/expressioneditor.md +469 -0
  217. package/docs/expressions.md +431 -0
  218. package/docs/feedback.md +1 -1
  219. package/docs/fileuploader.md +1 -1
  220. package/docs/filterbuilder.md +1 -1
  221. package/docs/formlayout-schema.md +143 -0
  222. package/docs/formlayout.md +16 -4
  223. package/docs/foundations.md +1 -1
  224. package/docs/gallery.md +1 -1
  225. package/docs/gauge-base.md +1 -1
  226. package/docs/gauge-circular.md +1 -1
  227. package/docs/gauge-dashboards.md +1 -1
  228. package/docs/gauge-linear.md +1 -1
  229. package/docs/gauge-markers.md +1 -1
  230. package/docs/gauge-marks.md +1 -1
  231. package/docs/gauge-ranges.md +1 -1
  232. package/docs/gauge-scales.md +1 -1
  233. package/docs/gauge.md +1 -1
  234. package/docs/home.md +1 -1
  235. package/docs/keyboard.md +2 -2
  236. package/docs/language.md +1 -1
  237. package/docs/layout.md +1 -1
  238. package/docs/listbox.md +1 -1
  239. package/docs/loadpanel.md +1 -1
  240. package/docs/lookup.md +1 -1
  241. package/docs/markdown.md +1 -1
  242. package/docs/menus-api.md +1 -1
  243. package/docs/menus-context.md +1 -1
  244. package/docs/menus-customization.md +1 -1
  245. package/docs/menus-merging.md +1 -1
  246. package/docs/menus-programmatic.md +1 -1
  247. package/docs/menus.md +1 -1
  248. package/docs/multiview.md +1 -1
  249. package/docs/navigation.md +1 -1
  250. package/docs/numberbox.md +1 -1
  251. package/docs/otpinput.md +1 -1
  252. package/docs/pagination.md +1 -1
  253. package/docs/pivotgrid-api.md +1 -1
  254. package/docs/pivotgrid-chart.md +1 -1
  255. package/docs/pivotgrid-drilldown.md +1 -1
  256. package/docs/pivotgrid-export.md +1 -1
  257. package/docs/pivotgrid-fields.md +1 -1
  258. package/docs/pivotgrid-keyboard.md +1 -1
  259. package/docs/pivotgrid-layout.md +1 -1
  260. package/docs/pivotgrid-panel.md +1 -1
  261. package/docs/pivotgrid-remote.md +122 -44
  262. package/docs/pivotgrid-sorting.md +3 -3
  263. package/docs/pivotgrid-state.md +1 -1
  264. package/docs/pivotgrid-summaries.md +1 -1
  265. package/docs/pivotgrid.md +1 -1
  266. package/docs/popover.md +1 -1
  267. package/docs/progress.md +1 -1
  268. package/docs/qrcode.md +1 -1
  269. package/docs/radiogroup.md +1 -1
  270. package/docs/rating.md +1 -1
  271. package/docs/resizable.md +1 -1
  272. package/docs/ribbonmenu-api.md +1 -1
  273. package/docs/ribbonmenu-commands.md +1 -1
  274. package/docs/ribbonmenu-customization.md +1 -1
  275. package/docs/ribbonmenu-display.md +1 -1
  276. package/docs/ribbonmenu-layouts.md +1 -1
  277. package/docs/ribbonmenu-programmatic.md +1 -1
  278. package/docs/ribbonmenu.md +1 -1
  279. package/docs/scheduler-agenda.md +1 -1
  280. package/docs/scheduler-big-data.md +1 -1
  281. package/docs/scheduler-editing.md +1 -1
  282. package/docs/scheduler-form.md +1 -1
  283. package/docs/scheduler-icalendar.md +1 -1
  284. package/docs/scheduler-mobile.md +1 -1
  285. package/docs/scheduler-recurrence.md +1 -1
  286. package/docs/scheduler-resources.md +1 -1
  287. package/docs/scheduler-timeline.md +1 -1
  288. package/docs/scheduler.md +1 -1
  289. package/docs/scrollview.md +1 -1
  290. package/docs/shortcuteditor.md +1 -1
  291. package/docs/showcase-flowstudio.md +61 -0
  292. package/docs/showcase-home.md +1 -1
  293. package/docs/showcase-mail.md +1 -1
  294. package/docs/showcase.md +1 -1
  295. package/docs/signature.md +1 -1
  296. package/docs/skeleton.md +1 -1
  297. package/docs/slider.md +1 -1
  298. package/docs/sortable.md +1 -1
  299. package/docs/sparkline.md +1 -1
  300. package/docs/speeddial.md +1 -1
  301. package/docs/splitter.md +1 -1
  302. package/docs/stepper.md +1 -1
  303. package/docs/switch.md +1 -1
  304. package/docs/tabdocs-dock.md +1 -1
  305. package/docs/tabdocs-drag.md +1 -1
  306. package/docs/tabdocs-menus.md +1 -1
  307. package/docs/tabdocs-mobile.md +1 -1
  308. package/docs/tabdocs-tabs.md +1 -1
  309. package/docs/tabdocs-windows.md +1 -1
  310. package/docs/tabdocs-workspace.md +1 -1
  311. package/docs/tabdocs.md +1 -1
  312. package/docs/tabs.md +1 -1
  313. package/docs/tagbox.md +1 -1
  314. package/docs/textarea.md +1 -1
  315. package/docs/textbox.md +1 -1
  316. package/docs/tileview.md +1 -1
  317. package/docs/timeline.md +1 -1
  318. package/docs/toast.md +1 -1
  319. package/docs/tokens.md +324 -1
  320. package/docs/toolbar-api.md +1 -1
  321. package/docs/toolbar-customization.md +1 -1
  322. package/docs/toolbar.md +1 -1
  323. package/docs/tooltip.md +1 -1
  324. package/docs/treeview.md +1 -1
  325. package/docs/validationsummary.md +1 -1
  326. package/docs/window.md +1 -1
  327. package/docs/wizard.md +1 -1
  328. package/llms-full.txt +10142 -462
  329. package/llms.txt +32 -1
  330. package/package.json +2 -2
@@ -0,0 +1,607 @@
1
+ import { type Bind, type Component, type ComponentBase, type Event as MotifEvent, type IBaseProp } from '@motifx/core';
2
+ import { Control } from '../../core/control';
3
+ import type { DiagramAlignment } from './diagram-alignment';
4
+ import type { DiagramBackground } from './diagram-background';
5
+ import type { DiagramNodeToggledEventArgs } from './diagram-node-toggled-event-args';
6
+ import type { DiagramColumnCheckedEventArgs } from './diagram-column-checked-event-args';
7
+ import type { DiagramHistoryChangedEventArgs } from './diagram-history-changed-event-args';
8
+ import type { DiagramLinksOptions } from './diagram-links-options';
9
+ import type { DiagramNodeStatus } from './diagram-node-status';
10
+ import type { DiagramNodeKind } from './diagram-node-kind';
11
+ import type { DiagramNodeResizedEventArgs } from './diagram-node-resized-event-args';
12
+ import type { DiagramNodeResizingEventArgs } from './diagram-node-resizing-event-args';
13
+ import type { DiagramPastedEventArgs } from './diagram-pasted-event-args';
14
+ import type { DiagramPastingEventArgs } from './diagram-pasting-event-args';
15
+ import type { DiagramCenterOptions } from './diagram-center-options';
16
+ import type { DiagramConnectedEventArgs } from './diagram-connected-event-args';
17
+ import type { DiagramConnectingEventArgs } from './diagram-connecting-event-args';
18
+ import type { DiagramConnection } from './diagram-connection';
19
+ import type { DiagramData } from './diagram-data';
20
+ import type { DiagramDeletedEventArgs } from './diagram-deleted-event-args';
21
+ import type { DiagramDeletingEventArgs } from './diagram-deleting-event-args';
22
+ import type { DiagramDrawnNode } from './diagram-drawn-node';
23
+ import type { DiagramEdgeReshapedEventArgs } from './diagram-edge-reshaped-event-args';
24
+ import type { DiagramEdgeReshapingEventArgs } from './diagram-edge-reshaping-event-args';
25
+ import type { DiagramEdge } from './diagram-edge';
26
+ import type { DiagramEdit } from './diagram-edit';
27
+ import type { DiagramEdgePath } from './diagram-edge-path';
28
+ import type { DiagramExportOptions } from './diagram-export-options';
29
+ import type { DiagramFitOptions } from './diagram-fit-options';
30
+ import type { DiagramLayoutOptions } from './diagram-layout-options';
31
+ import type { DiagramMiniMapOptions } from './diagram-mini-map-options';
32
+ import type { DiagramNode } from './diagram-node';
33
+ import type { DiagramNodesMovedEventArgs } from './diagram-nodes-moved-event-args';
34
+ import type { DiagramNodesMovingEventArgs } from './diagram-nodes-moving-event-args';
35
+ import type { DiagramPoint } from './diagram-point';
36
+ import type { DiagramProps } from './diagram-props';
37
+ import type { DiagramReconnectedEventArgs } from './diagram-reconnected-event-args';
38
+ import type { DiagramReconnectingEventArgs } from './diagram-reconnecting-event-args';
39
+ import type { DiagramRect } from './diagram-rect';
40
+ import type { DiagramSelection } from './diagram-selection';
41
+ import type { DiagramSelectionChangedEventArgs } from './diagram-selection-changed-event-args';
42
+ import type { DiagramViewport } from './diagram-viewport';
43
+ import type { DiagramViewportChangedEventArgs } from './diagram-viewport-changed-event-args';
44
+ import type { DiagramViewportOptions } from './diagram-viewport-options';
45
+ /**
46
+ * Nodes and the connections between them on a surface the user pans and zooms. The diagram is only the surface: the
47
+ * app adds its own toolbars and menus and calls the diagram's methods. Nodes are matched by `id`, so a node given again
48
+ * keeps its part and only what changed is written.
49
+ *
50
+ * @example
51
+ * <Diagram autoFit nodes={[{ id: 'a', x: 0, y: 0, text: 'Start' }, { id: 'b', x: 240, y: 0, text: 'End' }]} />
52
+ */
53
+ export declare class Diagram<N extends DiagramNode = DiagramNode, E extends DiagramEdge = DiagramEdge> extends Control<HTMLDivElement, DiagramProps<N, E>> {
54
+ /** The layer that moves and scales with the view: the connections, their labels, and the nodes over them. */
55
+ readonly viewLayer: Component<HTMLDivElement>;
56
+ readonly edgeLayer: Component<SVGSVGElement>;
57
+ readonly labelLayer: Component<HTMLDivElement>;
58
+ readonly nodeLayer: Component<HTMLDivElement>;
59
+ /** Over the nodes: the handles of the selected connections' ends, and the guides a dragged node lines up with. */
60
+ readonly handleLayer: Component<HTMLDivElement>;
61
+ private readonly guideLayer;
62
+ private readonly guideLine;
63
+ /** Says to a screen reader what the user did. */
64
+ private readonly live;
65
+ private readonly steps;
66
+ /** The node the keys are on, and the node a connection made with the keys starts at, by `id`. */
67
+ private active;
68
+ private connectingFrom;
69
+ /** The end of a connection the keys move, by the connection's `id`, and the node the keys come back to. */
70
+ private keyMove;
71
+ /** The place of the selected line the keys are on, a point of its own or a run of a right-angled line, by its order along it. */
72
+ private keyBend;
73
+ /** How many times the same copies were pasted: each paste lands a step farther. */
74
+ private pastes;
75
+ /**
76
+ * What the diagram's commands read to be on or off; reactive, for the menus and toolbars that name them. `typing`
77
+ * while focus is in a text field of a node.
78
+ */
79
+ private readonly commandState;
80
+ /** What takes the diagram's commands away. */
81
+ private readonly commandStops;
82
+ /** The app's own rule for a connection the user draws or `connect` makes, on top of the diagram's. */
83
+ canConnect: ((connection: DiagramConnection) => boolean) | null;
84
+ private readonly grid;
85
+ private readonly panning;
86
+ private readonly links;
87
+ private readonly dragging;
88
+ private readonly views;
89
+ /** The parts of the nodes, in the order of `nodes`, and in the order they lie: groups under the nodes in them. */
90
+ private shown;
91
+ private ordered;
92
+ /** Set when nodes moved, came, went or were hidden, or the surface changed its size: told once the frame is drawn. */
93
+ private contentMoved;
94
+ /** Set when nodes were laid out since the last frame. */
95
+ private sizedSince;
96
+ /**
97
+ * A large diagram (more nodes than `detailLimit`) puts on the page only the nodes and lines in view; `far` while more
98
+ * nodes than that are in view and a sketch stands for them; `culled` while not every node is on the page.
99
+ */
100
+ private lazy;
101
+ private far;
102
+ private culled;
103
+ /** Set while every node of a large diagram is put on the page to be laid out, for a layout that needs their sizes. */
104
+ private measuringAll;
105
+ private readonly overview;
106
+ private overviewDirty;
107
+ /** The sizes of the nodes laid out so far, by kind, for the size of a node not laid out yet; each node counted once. */
108
+ private readonly kindSizes;
109
+ private readonly counted;
110
+ /** The lengths of the look as last read, for lines drawn at once (an image). */
111
+ private look;
112
+ private readonly contentChangedEmitter;
113
+ /** The selected nodes and connections, by `id`. */
114
+ private readonly chosen;
115
+ private readonly viewportChangedEmitter;
116
+ private readonly connectingEmitter;
117
+ private readonly connectedEmitter;
118
+ private readonly reconnectingEmitter;
119
+ private readonly reconnectedEmitter;
120
+ private readonly selectionChangedEmitter;
121
+ private readonly nodesMovingEmitter;
122
+ private readonly nodesMovedEmitter;
123
+ private readonly deletingEmitter;
124
+ private readonly deletedEmitter;
125
+ private readonly nodeResizingEmitter;
126
+ private readonly nodeResizedEmitter;
127
+ private readonly nodeToggledEmitter;
128
+ private readonly columnCheckedEmitter;
129
+ private readonly edgeReshapingEmitter;
130
+ private readonly edgeReshapedEmitter;
131
+ /** The points of the lines whose two nodes are moving, as they were when the move began, and where the source node stood. */
132
+ private carried;
133
+ /** The kinds every diagram knows, under the app's own. */
134
+ private readonly builtIn;
135
+ /** Counts the changes of the connections, so `edgesOf` and `nodesOf` read in a getter follow them. */
136
+ private readonly linksRead;
137
+ /** The node of a text: what a node without a kind, or of a kind nobody knows, is. */
138
+ private readonly plainKind;
139
+ private readonly pastingEmitter;
140
+ private readonly pastedEmitter;
141
+ private readonly historyChangedEmitter;
142
+ /** The size of the surface, from its size observer; 0 until it is laid out. */
143
+ private room;
144
+ /** The view last told: a change is told from it. */
145
+ private toldViewport;
146
+ /** Set while the user's own pan or zoom is stored, for `byUser`. */
147
+ private movingByUser;
148
+ private stopGlide;
149
+ /** A fit asked for before its nodes and the surface were laid out, made once they are. */
150
+ private pendingFit;
151
+ private fitted;
152
+ /** A layout asked for before its nodes were laid out, made once they are; whether a layout was made, so `autoLayout` makes none. */
153
+ private pendingLayout;
154
+ private laidOut;
155
+ /** The map `miniMap` shows in a corner, while it shows one. */
156
+ private map;
157
+ /** Ends the glide of the nodes to the places of a layout at once, with the nodes in their places. */
158
+ private finishLayout;
159
+ constructor(props?: IBaseProp<DiagramProps<N, E>>);
160
+ get nodes(): N[];
161
+ set nodes(value: Bind<N[]>);
162
+ get edges(): E[];
163
+ set edges(value: Bind<E[]>);
164
+ get kinds(): Record<string, DiagramNodeKind<N>>;
165
+ set kinds(value: Bind<Record<string, DiagramNodeKind<N>>>);
166
+ get edgePath(): DiagramEdgePath;
167
+ set edgePath(value: Bind<DiagramEdgePath>);
168
+ get connectable(): boolean;
169
+ set connectable(value: Bind<boolean>);
170
+ get draggable(): boolean;
171
+ set draggable(value: Bind<boolean>);
172
+ get selectable(): boolean;
173
+ set selectable(value: Bind<boolean>);
174
+ get deletable(): boolean;
175
+ set deletable(value: Bind<boolean>);
176
+ get readOnly(): boolean;
177
+ set readOnly(value: Bind<boolean>);
178
+ /** Whether the user may change the diagram: it is on and not read-only. */
179
+ private get changeable();
180
+ get snapToGrid(): boolean;
181
+ set snapToGrid(value: Bind<boolean>);
182
+ get guides(): boolean;
183
+ set guides(value: Bind<boolean>);
184
+ get history(): boolean;
185
+ set history(value: Bind<boolean>);
186
+ get commandScope(): ComponentBase | null;
187
+ set commandScope(value: Bind<ComponentBase | null>);
188
+ /** Whether there is a step to undo, and one to redo. */
189
+ get canUndo(): boolean;
190
+ get canRedo(): boolean;
191
+ /** The selected nodes, in the order of `nodes`. */
192
+ get selectedNodes(): N[];
193
+ /** The selected connections, in the order of `edges`. */
194
+ get selectedEdges(): E[];
195
+ get viewport(): DiagramViewport;
196
+ set viewport(value: Bind<DiagramViewport>);
197
+ get minZoom(): number;
198
+ set minZoom(value: Bind<number>);
199
+ get maxZoom(): number;
200
+ set maxZoom(value: Bind<number>);
201
+ get bounds(): DiagramRect | null;
202
+ set bounds(value: Bind<DiagramRect | null>);
203
+ get background(): DiagramBackground;
204
+ set background(value: Bind<DiagramBackground>);
205
+ get gridSize(): number;
206
+ set gridSize(value: Bind<number>);
207
+ get pannable(): boolean;
208
+ set pannable(value: Bind<boolean>);
209
+ get zoomable(): boolean;
210
+ set zoomable(value: Bind<boolean>);
211
+ get autoFit(): boolean;
212
+ set autoFit(value: Bind<boolean>);
213
+ get autoLayout(): boolean;
214
+ set autoLayout(value: Bind<boolean>);
215
+ get detailLimit(): number;
216
+ set detailLimit(value: Bind<number>);
217
+ get miniMap(): boolean | DiagramMiniMapOptions;
218
+ set miniMap(value: Bind<boolean | DiagramMiniMapOptions>);
219
+ get layoutOptions(): DiagramLayoutOptions;
220
+ set layoutOptions(value: Bind<DiagramLayoutOptions>);
221
+ get label(): string;
222
+ set label(value: Bind<string>);
223
+ /** Moves the view to `viewport`, held to the zoom limits and the bounds. */
224
+ setViewport(viewport: DiagramViewport, options?: DiagramViewportOptions): void;
225
+ /** Zooms in one step around the middle of the view. */
226
+ zoomIn(options?: DiagramViewportOptions): void;
227
+ /** Zooms out one step around the middle of the view. */
228
+ zoomOut(options?: DiagramViewportOptions): void;
229
+ /** Zooms to `zoom` around the middle of the view. */
230
+ zoomTo(zoom: number, options?: DiagramViewportOptions): void;
231
+ /** Fits the nodes into view: now, or once they and the surface are laid out. */
232
+ fit(options?: DiagramFitOptions): void;
233
+ /** Brings a node, by `id`, or a point of the diagram to the middle of the view. */
234
+ centerOn(target: string | DiagramPoint, options?: DiagramCenterOptions): void;
235
+ /** A node's place and size in the diagram's units; `null` for an `id` the diagram does not hold. */
236
+ nodeRect(id: string): DiagramRect | null;
237
+ /**
238
+ * The nodes on the surface now, in the order they lie (groups under the nodes in them), each with its place and size
239
+ * and whether it holds other nodes: for a map, or marks of the app's own over the nodes. A node hidden in a collapsed
240
+ * group, or not laid out yet, is left out.
241
+ */
242
+ drawnNodes(): DiagramDrawnNode<N>[];
243
+ /** The part of the diagram in view, in its units; empty until the surface is laid out. */
244
+ get visibleArea(): DiagramRect;
245
+ /** What the diagram shows, as plain data that `JSON.stringify` writes and `load` takes back: copies of its nodes and connections, and the view. */
246
+ save(): DiagramData<N, E>;
247
+ /**
248
+ * Shows what `save` gave, as data or as its JSON text: copies of its nodes and connections fill the arrays of the
249
+ * diagram in place of theirs (the same arrays), the view moves to the one saved (the nodes are fitted into view when
250
+ * none was), and the selection and the history are cleared. Data that cannot be read is reported and changes nothing.
251
+ * Returns whether it was shown.
252
+ */
253
+ load(data: DiagramData<N, E> | string): boolean;
254
+ /** The diagram as an SVG document that stands alone: its lines, labels and nodes as shapes and texts, as they look now, without the selection. */
255
+ toSVG(options?: DiagramExportOptions): string;
256
+ /** The diagram as a data URL, a PNG by default. It takes a moment: the browser draws the image first. */
257
+ toDataURL(type?: string, options?: DiagramExportOptions): Promise<string>;
258
+ /** The diagram as an image file, a PNG by default. */
259
+ toBlob(type?: string, options?: DiagramExportOptions): Promise<Blob | null>;
260
+ /** The point of the diagram, in its units, under a point of the page in pixels (an event's `clientX` and `clientY`). */
261
+ toDiagram(point: DiagramPoint): DiagramPoint;
262
+ /** The point of the page, in pixels, where a point of the diagram is. */
263
+ toClient(point: DiagramPoint): DiagramPoint;
264
+ /**
265
+ * Connects two nodes when the rules allow it: a port's direction, type and most connections, no second connection
266
+ * between the same ends, and `canConnect`. The connection is added to `edges` after `onConnecting`; returns it, or `null`.
267
+ */
268
+ connect(connection: DiagramConnection): E | null;
269
+ /**
270
+ * Selects nodes and connections by `id`, in place of the selection, or added to it with `add`. A node selected alone is
271
+ * where the keys go on from.
272
+ */
273
+ select(selection: DiagramSelection, add?: boolean): void;
274
+ /** Selects every node and connection that may be selected. */
275
+ selectAll(): void;
276
+ clearSelection(): void;
277
+ /**
278
+ * Deletes the selected nodes, with their connections, and the selected connections, all but those that may not be
279
+ * deleted: after `onDeleting`, they are taken out of `nodes` and `edges`. Returns whether anything was deleted.
280
+ */
281
+ deleteSelection(): boolean;
282
+ /**
283
+ * Adds a change the app made to the history, as a step the user undoes and redoes like the diagram's own: `undo` puts
284
+ * it back and `redo` makes it again, and the diagram is drawn again after each. `onHistoryChanged` tells it as an
285
+ * `'edit'` of the nodes and connections it names. Returns whether it was kept: not while `history` is off.
286
+ */
287
+ record(edit: DiagramEdit<N, E>): boolean;
288
+ /** Undoes the last step: nodes moved, a connection made or moved, items deleted or pasted. Returns whether there was one. */
289
+ undo(): boolean;
290
+ /** Makes the last step undone again. Returns whether there was one. */
291
+ redo(): boolean;
292
+ clearHistory(): void;
293
+ /**
294
+ * Copies the selected nodes and the connections between them: to the clipboard as text, and in the page for `paste`.
295
+ * Returns whether anything was copied.
296
+ */
297
+ copy(): boolean;
298
+ /** Copies the selection, then deletes it. Returns whether anything was cut. */
299
+ cut(): boolean;
300
+ /** Pastes the nodes and connections copied last in the page, a step of the grid away, as new items. Returns whether it pasted. */
301
+ paste(): boolean;
302
+ /** Copies the selected nodes and the connections between them next to them, without the clipboard. Returns whether it did. */
303
+ duplicate(): boolean;
304
+ /**
305
+ * Lines the selected nodes that may move up by their left, centre or right edges, or their top, middle or bottom ones,
306
+ * on the edge of all of them (the middle of all of them for `center` and `middle`). Returns whether any moved.
307
+ */
308
+ align(how: DiagramAlignment): boolean;
309
+ /**
310
+ * Places the nodes: in layers the connections run across, as a tree, or in rows (`options`, else `layoutOptions`), now
311
+ * or once they are laid out. The nodes keep the top left corner of the place they took; a group takes the nodes in it
312
+ * along, and a node that may not be dragged stays. A line whose node moved loses its points of its own, and a long line
313
+ * of a layered layout passes the layers at points beside the nodes, unless it turns at right angles. After
314
+ * `onNodesMoving`, it is a step of the history and `onNodesMoved` tells it.
315
+ */
316
+ layout(options?: DiagramLayoutOptions): void;
317
+ /** Reads the nodes and the connections again: changes made in place, and items added or taken out of the same arrays. */
318
+ refresh(): void;
319
+ /** Occurs whenever the view moves: the user pans or zooms, or code moves it. */
320
+ get onViewportChanged(): MotifEvent<DiagramViewportChangedEventArgs>;
321
+ /** Occurs before a new connection is added; change the edge it adds, or cancel it. */
322
+ get onConnecting(): MotifEvent<DiagramConnectingEventArgs<E>>;
323
+ /** Occurs after a new connection was added to `edges`. */
324
+ get onConnected(): MotifEvent<DiagramConnectedEventArgs<E>>;
325
+ /** Occurs before an end of a connection moves to another node or port; `cancel` keeps it. */
326
+ get onReconnecting(): MotifEvent<DiagramReconnectingEventArgs<E>>;
327
+ /** Occurs after an end of a connection moved. */
328
+ get onReconnected(): MotifEvent<DiagramReconnectedEventArgs<E>>;
329
+ /** Occurs whenever the selected nodes or connections change. */
330
+ get onSelectionChanged(): MotifEvent<DiagramSelectionChangedEventArgs<N, E>>;
331
+ /** Occurs when the user starts to drag nodes, or moves them with the keys; `cancel` keeps them. */
332
+ get onNodesMoving(): MotifEvent<DiagramNodesMovingEventArgs<N>>;
333
+ /** Occurs after the user dropped the nodes they dragged, or moved them with the keys. */
334
+ get onNodesMoved(): MotifEvent<DiagramNodesMovedEventArgs<N>>;
335
+ /** Occurs before nodes and connections are deleted; `cancel` keeps them. */
336
+ get onDeleting(): MotifEvent<DiagramDeletingEventArgs<N, E>>;
337
+ /** Occurs after nodes and connections were taken out of `nodes` and `edges`. */
338
+ get onDeleted(): MotifEvent<DiagramDeletedEventArgs<N, E>>;
339
+ /** Occurs when the user starts to resize a node; `cancel` keeps its size. */
340
+ get onNodeResizing(): MotifEvent<DiagramNodeResizingEventArgs<N>>;
341
+ /** Occurs after the user resized a node. */
342
+ get onNodeResized(): MotifEvent<DiagramNodeResizedEventArgs<N>>;
343
+ /** Occurs after a node collapsed to its header or opened: a group, or a node of a kind that collapses. */
344
+ get onNodeToggled(): MotifEvent<DiagramNodeToggledEventArgs<N>>;
345
+ /** Occurs after the box of a column of a table was ticked or cleared (see `DiagramTableNode.checkable`). */
346
+ get onColumnChecked(): MotifEvent<DiagramColumnCheckedEventArgs<N>>;
347
+ /** Occurs when the user starts to move, add or remove a point of a connection's line; `cancel` keeps the line. */
348
+ get onEdgeReshaping(): MotifEvent<DiagramEdgeReshapingEventArgs<E>>;
349
+ /** Occurs after the user moved, added or removed points of a connection's line. */
350
+ get onEdgeReshaped(): MotifEvent<DiagramEdgeReshapedEventArgs<E>>;
351
+ /** Occurs before copies are added by a paste or a duplicate; change them, or cancel. */
352
+ get onPasting(): MotifEvent<DiagramPastingEventArgs<N, E>>;
353
+ /** Occurs after copies were added to `nodes` and `edges`; they are the selection now. */
354
+ get onPasted(): MotifEvent<DiagramPastedEventArgs<N, E>>;
355
+ /** Occurs whenever the history changes: a step added, undone or redone, or the history cleared. */
356
+ get onHistoryChanged(): MotifEvent<DiagramHistoryChangedEventArgs<N, E>>;
357
+ /**
358
+ * Occurs at most once a frame, after what the diagram shows changed: nodes moved or changed their size, came, went or
359
+ * were hidden in a group or shown again, or the surface changed its size. A map follows the diagram with it.
360
+ */
361
+ get onContentChanged(): MotifEvent<void>;
362
+ /** Makes the selection these nodes and connections, the ones that exist and may be selected; tells when it changed. */
363
+ private choose;
364
+ private edgeClicked;
365
+ private canMove;
366
+ /** Asks `onNodesMoving` before nodes move; `false` when it cancels. */
367
+ private startMoving;
368
+ /** Moves the points of the lines that start at `node` and end at a node moving with it, as far as `node` moved. */
369
+ private carry;
370
+ /** The user moved, added or removed points of a line: a step of the history, said. */
371
+ private recordReshape;
372
+ /** Puts a node at a point: its object, its part and its lines. */
373
+ private place;
374
+ /** The user moved nodes (a drag, the keys, an alignment): a step of the history, said, and told. */
375
+ private movedNodes;
376
+ /** Moves the selected nodes that may move by `dx`, `dy`, as the user's move with the keys. */
377
+ private moveChosen;
378
+ private deleteChosen;
379
+ /** Takes nodes and connections out of the arrays, and their parts off the surface. */
380
+ private takeOut;
381
+ /** Puts nodes and connections back where they stood in the arrays. */
382
+ private putBack;
383
+ private edgesChanged;
384
+ /** Adds a step the user took, while the history is kept. */
385
+ private addStep;
386
+ private afterHistory;
387
+ private recordConnect;
388
+ private recordReconnect;
389
+ /** The connections that join two of `nodes`. */
390
+ private edgesBetween;
391
+ /** Copies the selected nodes and the connections between them in the page; returns the text for the clipboard, or `null`. */
392
+ /** The nodes and the nodes inside those of them that are groups, in the order of `nodes`. */
393
+ private withInner;
394
+ private copySelection;
395
+ /** The browser's copy, cut and paste, while the surface itself has focus (a field inside a node keeps its own). */
396
+ private clipboardEvent;
397
+ /**
398
+ * Adds copies of nodes and of the connections between them: new objects with new ids, a step of the grid away (farther
399
+ * at each paste of the same copies), after `onPasting`. They become the selection, and a step of the history.
400
+ */
401
+ private pasteCopies;
402
+ /** Says something to a screen reader; the same words twice are said twice. */
403
+ private announce;
404
+ /** Puts the keys on a node (or none): it shows it, and a screen reader hears it with `say`. */
405
+ private setActive;
406
+ /**
407
+ * The node nearest the active one in the way of an arrow key, its middle within 45 degrees of that way: the farther to
408
+ * the side, the farther it counts.
409
+ */
410
+ private nodeToward;
411
+ /** Moves the keys to a node, selects it and brings it into view. */
412
+ private keysTo;
413
+ /** Brings a node into view; from the sketch of a far view, at its actual size. */
414
+ private reveal;
415
+ /** Whether a rectangle of the diagram lies wholly in view. */
416
+ private shows;
417
+ /** The connections at a node the keys go through: those drawn there that may be selected, clockwise from the top. */
418
+ private linesOf;
419
+ /** The connection the keys are on: the only thing selected, drawn at the node under the keys. */
420
+ private lineUnderKeys;
421
+ /** `]` and `[`: selects the next or the previous connection of the node under the keys, says it and brings it into view. */
422
+ private walkLines;
423
+ /** Says a connection of the node under the keys: its label, its two nodes and where it stands among the node's connections. */
424
+ private sayLine;
425
+ /**
426
+ * Brings a connection into view when its ends are out of view and it fits in the view; from the sketch of a far view,
427
+ * the node under the keys at its actual size.
428
+ */
429
+ private revealLine;
430
+ /**
431
+ * Enter on a connection of the node under the keys: takes its other end, which the arrows aim at a node and Enter
432
+ * moves there; the end at the node under the keys stays.
433
+ */
434
+ private startKeyMove;
435
+ /** The keys while an end of a connection is moved with them: the arrows aim it at a node, Enter moves it, Escape and Tab drop it. */
436
+ private moveKey;
437
+ private stopKeyMove;
438
+ /** The line whose points the keys go through: the only thing selected. */
439
+ private lineChosen;
440
+ /** Whether the user may move the points of a line, as the handles on it allow. */
441
+ private reshapable;
442
+ /** Where the places of a line the keys go through stand (see `DiagramBends.places`); none on a line that may not be reshaped. */
443
+ private placesOf;
444
+ /** The place of the selected line the keys are on, with the line, while it is still there. */
445
+ private bendUnderKeys;
446
+ /** Puts the keys on a place of a line, which shows it; with no line, on none. */
447
+ private setKeyBend;
448
+ /** `.` and `,`: puts the keys on the next or the previous place of the selected line, says it and brings it into view. */
449
+ private walkBends;
450
+ /** Ctrl and an arrow on a place of the selected line moves it, a run of a right-angled line only sideways. */
451
+ private nudgeBend;
452
+ /** Insert: adds a point to the selected line after the one the keys are on, halfway along the run there, and puts the keys on it. */
453
+ private addBend;
454
+ /**
455
+ * Delete on a place of the selected line: takes the point away, the keys going to the one before it, or gives a
456
+ * right-angled line back to its own way. Returns whether the keys were on a place, so that the line stays.
457
+ */
458
+ private dropBend;
459
+ /**
460
+ * Whether focus is in a text field of a node, whose keys are its own. Read through `typing`, so that the menus and
461
+ * toolbars follow it, and checked again, as a field taken off the page while it had focus tells nothing.
462
+ */
463
+ private typingInNode;
464
+ /** Adds the diagram's commands, held to its command scope, in place of those added before. */
465
+ private addCommands;
466
+ /** The commands of the diagram, held to `scope`: their keys work while focus is inside it, and its menus and toolbars run them. */
467
+ private commandList;
468
+ /**
469
+ * Enter: with no node under the keys, puts them on the node nearest the middle of the view; on a node, starts a
470
+ * connection from it, which the arrows aim and Enter makes; on a connection of the node, takes its other end to move
471
+ * it. Returns whether it did anything.
472
+ */
473
+ private enterKey;
474
+ /**
475
+ * The keys while a connection is made with them: the arrows aim it at a node and bring it into view, Enter makes it
476
+ * on the ports that allow it (a node not allowed is said, and the aim goes on), Escape and Tab drop it.
477
+ */
478
+ private connectKey;
479
+ private stopKeyConnect;
480
+ /** The point of the page where a point of the surface is. */
481
+ private toClientOfSurface;
482
+ /** Selects every node and connection that may be selected, as the user's choice. */
483
+ private chooseAll;
484
+ /** Matches the nodes to their parts by `id`: a new node gets a part, a node gone loses it, the rest write what changed. */
485
+ private nodesChanged;
486
+ /** The kinds changed: each node draws the content of its kind, and the groups may be others. */
487
+ private kindsChanged;
488
+ /** Lays the parts of the nodes over one another, hides those in a collapsed group, and draws the connections again. */
489
+ private arrange;
490
+ /** Puts the parts of the nodes on the page in the order they lie; a node not made yet has none there. */
491
+ private orderParts;
492
+ /** The size a node not laid out yet is likely to have in a large diagram: as large as the nodes of its kind laid out so far. */
493
+ private estimate;
494
+ /** Counts a node laid out for the first time into the sizes of its kind. */
495
+ private noteSize;
496
+ /**
497
+ * What is on the page. A diagram of few nodes keeps every node and line there. A large one keeps the nodes and lines in
498
+ * view and near it: a node coming into view for the first time is made then, those far out of it leave the page and
499
+ * are kept for when they come back. With more nodes in view than `detailLimit`, a sketch of them all stands instead.
500
+ */
501
+ private cull;
502
+ /** Shows the sketch of a far view in place of the nodes and lines, or takes it away. */
503
+ private setFar;
504
+ private drawOverview;
505
+ /**
506
+ * Puts every node and line on the page for an image of a large diagram, and lays out at once the nodes not laid out
507
+ * yet, their lines drawn again with their sizes; the next frame takes off again what is out of view.
508
+ */
509
+ private showAll;
510
+ /** The kind of a node: the app's, a built-in one, or the node of a text. */
511
+ private kindOf;
512
+ /** How many groups a node is in. */
513
+ private depthOf;
514
+ /** Whether a group above the node is collapsed. */
515
+ private isInCollapsed;
516
+ /** The part a connection to a node is drawn to: the node, or the outermost collapsed group it is hidden in. */
517
+ private shownView;
518
+ /** The nodes inside a group, at every depth, in the order of `nodes`. */
519
+ private descendantsOf;
520
+ /** The innermost group a dragged node is over (its middle inside the group), that is not dragged with it; `null` for none. */
521
+ private groupUnder;
522
+ /** Resizes the node under the keys by `dw`, `dh`, as the user's resize with the keys; no smaller than its kind allows. */
523
+ private resizeActive;
524
+ /** Asks `onNodeResizing` before the user resizes a node; `false` when it cancels. */
525
+ private startResizing;
526
+ /** The user resized a node: a step of the history (an undo gives back the size it gave, or none), said, and told. */
527
+ private resizedNode;
528
+ /**
529
+ * Collapses a node to its header or opens it: a group, whose nodes leave the surface or come back and whose
530
+ * connections end at it meanwhile, or a node of a kind that collapses, such as a table. Returns whether it changed.
531
+ */
532
+ setCollapsed(id: string, collapsed: boolean): boolean;
533
+ private collapse;
534
+ /**
535
+ * Ticks or clears the box of a column of a table that shows one (`checkable`), as the user does: a step of the
536
+ * history, which `onColumnChecked` tells. Returns whether it changed.
537
+ */
538
+ setColumnChecked(id: string, column: string, checked: boolean): boolean;
539
+ private checkColumn;
540
+ /**
541
+ * Shows what a node is doing as a run goes through it (`null` takes the status away): the mark in its corner and its
542
+ * frame, and a screen reader hears it with the node's name. Not a step of the history: the node's `status` and
543
+ * `statusText` are written, and saved with it unless the app leaves them out. Returns whether it changed.
544
+ */
545
+ setNodeStatus(id: string, status: DiagramNodeStatus | null, text?: string): boolean;
546
+ /**
547
+ * The connections of a node: those that end at it (`direction: 'in'`), start at it (`'out'`) or either, at one of its
548
+ * ports or any. Read in a getter, it follows the connections as they are drawn, taken away and moved.
549
+ */
550
+ edgesOf(id: string, options?: DiagramLinksOptions): E[];
551
+ /**
552
+ * The nodes at the other ends of a node's connections, each once, in the order of the connections: those it comes from
553
+ * (`direction: 'in'`), those it goes to (`'out'`), or either. Read in a getter, it follows them.
554
+ */
555
+ nodesOf(id: string, options?: DiagramLinksOptions): N[];
556
+ /** The connections changed: what reads them follows. */
557
+ private linksChanged;
558
+ /** The array of nodes the diagram holds: the one given, or one it keeps when none was. */
559
+ private ownNodes;
560
+ /** The array of connections the diagram holds: the one given, or one it keeps when none was. */
561
+ private ownEdges;
562
+ private viewportChanged;
563
+ private resized;
564
+ private askDraw;
565
+ private readonly readLook;
566
+ private readonly drawView;
567
+ /** The parts an image of the diagram draws: the nodes asked for, else all on the surface, in the order they lie, and the lines between them. */
568
+ private imageSource;
569
+ /**
570
+ * Runs `draw`, an image of the diagram, while every node and line is on the page and nothing is marked selected or
571
+ * under the keys; the marks come back after.
572
+ */
573
+ private plainly;
574
+ private writeLabel;
575
+ /** Stores a view held to the zoom limits and the bounds; it is drawn with the next frame and told. */
576
+ private moveView;
577
+ private goTo;
578
+ /** Glides the view to `to`: the point in the middle of the view travels in a line while the zoom changes evenly. */
579
+ private glide;
580
+ private stopMotion;
581
+ /** The view held to the zoom limits, and to the bounds once the surface has a size. */
582
+ private limit;
583
+ /** `from` zoomed to `zoom` around `at`, a point of the surface in pixels that stays where it is. */
584
+ private zoomed;
585
+ private fitIfReady;
586
+ /** The view that shows `rects` whole in the middle of the surface, as `fit` makes it. */
587
+ private fitView;
588
+ /**
589
+ * Makes the layout asked for once every node it places is laid out; with `autoLayout`, the first layout of
590
+ * `layoutOptions` once the first nodes are, as a part of showing them: neither a step of the history nor told.
591
+ */
592
+ private layoutIfReady;
593
+ /** The nodes a layout places: those asked for, else every node in no group; not one hidden or one that may not be dragged, nor one in a group placed with it. */
594
+ private layoutViews;
595
+ /** Places `views` as `options` say; `told`: after `onNodesMoving`, as a step of the history, said and told. */
596
+ private runLayout;
597
+ /** Shows the map of `miniMap` in its corner, or takes it away. */
598
+ private drawMiniMap;
599
+ /** Whether an event comes from the map: the map's own, which the surface does not take as its own too. */
600
+ private fromMap;
601
+ /** Glides nodes from where they stand to where `moves` take them, with the design language's motion; `done` runs once they stand there. */
602
+ private glideNodes;
603
+ private middle;
604
+ /** Where the inside of the surface starts on the page: the view is placed from there. */
605
+ private origin;
606
+ private keyDown;
607
+ }
@@ -0,0 +1,17 @@
1
+ import type { ComponentBase } from '@motifx/core';
2
+ import type { DiagramAutoPanHost } from './diagram-auto-pan-host';
3
+ import type { DiagramPoint } from './diagram-point';
4
+ /** Pans the view while a drag holds the pointer near an edge of the surface, or past it: faster the farther in it is. */
5
+ export declare class DiagramAutoPan {
6
+ private readonly surface;
7
+ private readonly host;
8
+ private readonly panned;
9
+ private origin;
10
+ private pointer;
11
+ private stopFrames;
12
+ constructor(surface: ComponentBase, host: DiagramAutoPanHost, panned: () => void);
13
+ /** Follows the pointer of a drag, a point of the page; `origin` is where the inside of the surface starts. */
14
+ follow(pointer: DiagramPoint, origin: DiagramPoint): void;
15
+ stop(): void;
16
+ private step;
17
+ }