@metadev/daga 1.5.7 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/Changelog.md +40 -1
  2. package/README.md +67 -30
  3. package/assets/daga-logo.svg +10 -0
  4. package/index.cjs.d.ts +1 -0
  5. package/index.cjs.default.js +1 -0
  6. package/index.cjs.js +8099 -0
  7. package/index.cjs.mjs +2 -0
  8. package/index.esm.d.ts +1 -0
  9. package/index.esm.js +8013 -0
  10. package/package.json +19 -37
  11. package/src/index.d.ts +49 -0
  12. package/src/lib/core.d.ts +1 -0
  13. package/{lib/diagram-editor/diagram → src/lib/diagram/canvas}/diagram-canvas.d.ts +72 -67
  14. package/src/lib/diagram/canvas/diagram-context-menu.d.ts +27 -0
  15. package/src/lib/diagram/canvas/diagram-user-highlight.d.ts +30 -0
  16. package/src/lib/diagram/canvas/diagram-user-selection.d.ts +74 -0
  17. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-action.d.ts +36 -12
  18. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-client.d.ts +1 -1
  19. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-engine.d.ts +1 -1
  20. package/{lib/diagram-editor → src/lib}/diagram/collab/message-types.d.ts +3 -8
  21. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-exporter.d.ts +6 -6
  22. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-importer.d.ts +6 -4
  23. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-model.d.ts +3 -3
  24. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-exporter.d.ts +2 -2
  25. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-importer.d.ts +2 -2
  26. package/{lib/diagram-editor → src/lib}/diagram/diagram-action.d.ts +75 -55
  27. package/{lib/diagram-editor → src/lib}/diagram/diagram-config.d.ts +148 -84
  28. package/{lib/diagram-editor → src/lib}/diagram/diagram-event.d.ts +3 -3
  29. package/{lib/diagram-editor → src/lib}/diagram/layout/adjacency-layout.d.ts +1 -1
  30. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-adjacency-layout.d.ts +1 -1
  31. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-layout.d.ts +1 -1
  32. package/{lib/diagram-editor → src/lib}/diagram/layout/diagram-layout.d.ts +1 -1
  33. package/{lib/diagram-editor → src/lib}/diagram/layout/force-layout.d.ts +1 -1
  34. package/{lib/diagram-editor → src/lib}/diagram/layout/horizontal-layout.d.ts +1 -1
  35. package/{lib/diagram-editor → src/lib}/diagram/layout/priority-layout.d.ts +1 -1
  36. package/{lib/diagram-editor → src/lib}/diagram/layout/tree-layout.d.ts +1 -1
  37. package/{lib/diagram-editor → src/lib}/diagram/layout/vertical-layout.d.ts +1 -1
  38. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-connection.d.ts +4 -4
  39. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-element.d.ts +7 -11
  40. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-entity.d.ts +2 -2
  41. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-field.d.ts +10 -10
  42. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-model.d.ts +15 -15
  43. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-node.d.ts +9 -9
  44. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-port.d.ts +4 -4
  45. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-property.d.ts +46 -31
  46. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-section.d.ts +10 -10
  47. package/{lib → src/lib}/errors/diagram-validator.d.ts +1 -1
  48. package/{lib → src/lib}/interfaces/canvas.d.ts +79 -107
  49. package/{lib → src/lib}/interfaces/diagram-buttons.d.ts +8 -8
  50. package/{lib → src/lib}/interfaces/diagram-editor.d.ts +4 -11
  51. package/{lib → src/lib}/interfaces/palette.d.ts +2 -2
  52. package/{lib → src/lib}/interfaces/property-editor.d.ts +5 -5
  53. package/{lib → src/lib}/util/canvas-util.d.ts +20 -5
  54. package/src/lib/util/device-util.d.ts +5 -0
  55. package/{lib → src/lib}/util/events.d.ts +6 -4
  56. package/{lib → src/lib}/util/style.d.ts +1 -0
  57. package/src/lib/util/test-util.d.ts +11 -0
  58. package/assets/fonts/DMMono-Medium.ttf +0 -0
  59. package/assets/fonts/DMMono-Medium.woff +0 -0
  60. package/assets/fonts/DMMono-Medium.woff2 +0 -0
  61. package/assets/fonts/WonderUnitSans-Medium.ttf +0 -0
  62. package/assets/fonts/WonderUnitSans-Medium.woff +0 -0
  63. package/assets/fonts/WonderUnitSans-Medium.woff2 +0 -0
  64. package/assets/icon/action/drop-down-arrow.svg +0 -8
  65. package/assets/icon/action/drop-horizontal-left.svg +0 -14
  66. package/assets/icon/action/drop-horizontal-none.svg +0 -13
  67. package/assets/icon/action/drop-horizontal-right.svg +0 -14
  68. package/assets/icon/action/drop-vertical-down.svg +0 -14
  69. package/assets/icon/action/drop-vertical-none.svg +0 -13
  70. package/assets/icon/action/drop-vertical-up.svg +0 -14
  71. package/assets/icon/action/filter-clear.png +0 -0
  72. package/assets/icon/buttons/center-hover.svg +0 -10
  73. package/assets/icon/buttons/center.svg +0 -10
  74. package/assets/icon/buttons/ellipsis-hover.svg +0 -7
  75. package/assets/icon/buttons/ellipsis.svg +0 -7
  76. package/assets/icon/buttons/filter-off-hover.svg +0 -5
  77. package/assets/icon/buttons/filter-off.svg +0 -5
  78. package/assets/icon/buttons/filter-on-hover.svg +0 -5
  79. package/assets/icon/buttons/filter-on.svg +0 -5
  80. package/assets/icon/buttons/layout-hover.svg +0 -8
  81. package/assets/icon/buttons/layout.svg +0 -8
  82. package/assets/icon/buttons/redo-hover.svg +0 -5
  83. package/assets/icon/buttons/redo.svg +0 -5
  84. package/assets/icon/buttons/undo-hover.svg +0 -5
  85. package/assets/icon/buttons/undo.svg +0 -5
  86. package/assets/icon/buttons/zoom-in-hover.svg +0 -8
  87. package/assets/icon/buttons/zoom-in.svg +0 -8
  88. package/assets/icon/buttons/zoom-out-hover.svg +0 -7
  89. package/assets/icon/buttons/zoom-out.svg +0 -7
  90. package/assets/icon/context/copy.svg +0 -4
  91. package/assets/icon/context/cross.svg +0 -3
  92. package/assets/icon/context/cut.svg +0 -4
  93. package/assets/icon/context/delete.svg +0 -4
  94. package/assets/icon/context/paste.svg +0 -4
  95. package/assets/icon/property/add.svg +0 -23
  96. package/assets/icon/property/close.svg +0 -3
  97. package/assets/icon/property/ellipsis.svg +0 -5
  98. package/assets/icon/property/gear.svg +0 -3
  99. package/assets/icon/property/hide.svg +0 -10
  100. package/assets/icon/property/move.svg +0 -35
  101. package/assets/styles/_collapse-button.scss +0 -37
  102. package/assets/styles/_context-menu.scss +0 -32
  103. package/assets/styles/_diagram-buttons.scss +0 -166
  104. package/assets/styles/_diagram.scss +0 -15
  105. package/assets/styles/_errors.scss +0 -83
  106. package/assets/styles/_palette.scss +0 -20
  107. package/assets/styles/_property-editor.scss +0 -285
  108. package/assets/styles/daga.scss +0 -150
  109. package/fesm2022/metadev-daga.mjs +0 -10977
  110. package/fesm2022/metadev-daga.mjs.map +0 -1
  111. package/index.d.ts +0 -55
  112. package/lib/collapse-button/collapse-button.component.d.ts +0 -22
  113. package/lib/daga.module.d.ts +0 -18
  114. package/lib/diagram/diagram.component.d.ts +0 -44
  115. package/lib/diagram-buttons/diagram-buttons.component.d.ts +0 -44
  116. package/lib/diagram-editor/diagram-editor.component.d.ts +0 -38
  117. package/lib/errors/errors.component.d.ts +0 -26
  118. package/lib/palette/palette.component.d.ts +0 -39
  119. package/lib/property-editor/autocomplete/autocomplete.component.d.ts +0 -39
  120. package/lib/property-editor/object-editor/object-editor.component.d.ts +0 -30
  121. package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +0 -33
  122. package/lib/property-editor/property-editor.component.d.ts +0 -34
  123. package/lib/property-editor/property-settings/property-settings.component.d.ts +0 -35
  124. package/lib/property-editor/text-list-editor/text-list-editor.component.d.ts +0 -29
  125. package/lib/property-editor/text-map-editor/text-map-editor.component.d.ts +0 -36
  126. package/lib/services/canvas-provider.service.d.ts +0 -32
  127. package/lib/services/daga-configuration.service.d.ts +0 -23
  128. package/{lib/diagram-editor → src/lib}/diagram/collab/primitives.d.ts +0 -0
  129. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-decorator.d.ts +1 -1
  130. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-object.d.ts +0 -0
  131. package/{lib → src/lib}/errors/diagram-error.d.ts +3 -3
  132. package/{lib → src/lib}/util/grid.d.ts +0 -0
  133. package/{lib → src/lib}/util/line.d.ts +0 -0
  134. package/{lib → src/lib}/util/list-util.d.ts +0 -0
  135. package/{lib → src/lib}/util/shape.d.ts +10 -10
  136. /package/{lib → src/lib}/util/svg-util.d.ts +0 -0
  137. /package/{lib → src/lib}/util/text-util.d.ts +0 -0
@@ -1,9 +1,9 @@
1
- import { Point } from '../../util/canvas-util';
2
- import { LineShape, LineStyle } from '../../util/line';
3
- import { ClosedShape } from '../../util/shape';
4
- import { Corner, HorizontalAlign, Side, VerticalAlign } from '../../util/svg-util';
1
+ import { Point } from '../util/canvas-util';
2
+ import { LineShape, LineStyle } from '../util/line';
3
+ import { ClosedShape } from '../util/shape';
4
+ import { Corner, HorizontalAlign, Side, VerticalAlign } from '../util/svg-util';
5
5
  import { DiagramActions } from './diagram-action';
6
- import { Property } from './diagram-property';
6
+ import { Property } from './model/diagram-property';
7
7
  /**
8
8
  * The configuration for a diagram.
9
9
  * @public
@@ -20,40 +20,24 @@ export interface DiagramConfig {
20
20
  */
21
21
  name?: string;
22
22
  /**
23
- * Background color of this diagram.
24
- * @default "#FFFFFF"
25
- */
26
- backgroundColor?: string;
27
- /**
28
- * Distance between each point of the grid of this diagram in pixels. 0 or negative is interpreted as no grid.
29
- * @default 0
30
- */
31
- gridSize?: number;
32
- /**
33
- * When true, nodes moved by the user will be moved to the closest point where the top left corner matches a grid point.
34
- * @default false
23
+ * Configuration regarding the canvas.
24
+ * @default {}
35
25
  */
36
- snapToGrid?: boolean;
26
+ canvas?: CanvasConfig;
37
27
  /**
38
28
  * When true, connections made by the user will have their type assumed based on the type of the source and target nodes.
39
29
  * @default false
40
30
  */
41
- guessConnectionType?: boolean;
31
+ inferConnectionType?: boolean;
42
32
  /**
43
- * Id of the type of connection that is selected by default initially for the user to make.
33
+ * Id of the type of connection that is initially selected for the user to draw when drawing connections. By default, no type is selected.
44
34
  * @default undefined
45
35
  */
46
36
  defaultConnection?: string;
47
- /**
48
- * Possible values of the priority threshold that the user can toggle between to hide nodes whose priority value is below it.
49
- * If it is possible to toggle the priority threshold via the filter button, it should have at least two values.
50
- * @default []
51
- */
52
- priorityThresholds?: number[];
53
37
  /**
54
38
  * Name of the layout format used to arrange the nodes of this diagram when pressing the layout button in the diagram buttons component.
55
- * @see DiagramButtonsComponent
56
39
  * @default undefined
40
+ * @see DiagramButtonsComponent
57
41
  */
58
42
  layoutFormat?: string;
59
43
  /**
@@ -67,32 +51,95 @@ export interface DiagramConfig {
67
51
  */
68
52
  components?: ComponentsConfig;
69
53
  /**
70
- * Default attributes for each of the types of node of this diagram.
54
+ * Default attributes for each of the types of node of this diagram. By default, no attributes are set.
71
55
  * @default undefined
72
56
  */
73
57
  nodeTypeDefaults?: Partial<NodeTypeConfig>;
74
58
  /**
75
- * List of the types of node that can be used in this diagram.
59
+ * List of the types of node that can be used in this diagram. By default, no types are created.
76
60
  * @default undefined
77
61
  */
78
62
  nodeTypes?: NodeTypeConfig[];
79
63
  /**
80
- * Default attributes for each of the types of connection of this diagram.
64
+ * Default attributes for each of the types of connection of this diagram. By default, no attributes are set.
81
65
  * @default undefined
82
66
  */
83
67
  connectionTypeDefaults?: Partial<ConnectionTypeConfig>;
84
68
  /**
85
- * List of the types of connection that can be used in this diagram.
69
+ * List of the types of connection that can be used in this diagram. By default, no types are created.
86
70
  * @default undefined
87
71
  */
88
72
  connectionTypes?: ConnectionTypeConfig[];
89
73
  /**
90
74
  * Properties of this diagram that can be edited in the property editor component.
91
- * @see PropertyEditorComponent
92
75
  * @default []
76
+ * @see PropertyEditorComponent
93
77
  */
94
78
  properties?: Property[];
95
79
  }
80
+ /**
81
+ * The configuration for the visual behavior of a diagram in the user interface.
82
+ * @public
83
+ */
84
+ export interface CanvasConfig {
85
+ /**
86
+ * Configuration for the grid in the canvas.
87
+ * If left undefined, it is interpreted as disabling the grid,
88
+ * same as if the attribute `enabled` in its configuration was set to `false`.
89
+ */
90
+ grid?: GridConfig;
91
+ /**
92
+ * Background color of this diagram.
93
+ * @default "#FFFFFF"
94
+ */
95
+ backgroundColor?: string;
96
+ /**
97
+ * The factor by which the zoom level increases or decreases when the user users buttons or keys to zoom in or out. Should be above 1.
98
+ * @default 2
99
+ */
100
+ zoomFactor?: number;
101
+ /**
102
+ * The rate by which the view of the canvas moves when the user users buttons or keys to pan at a default zoom level in diagram units. Should be above 1.
103
+ * @default 100
104
+ */
105
+ panRate?: number;
106
+ /**
107
+ * Possible values of the priority threshold that the user can toggle between to hide nodes whose priority value is below it.
108
+ * If it is possible to toggle the priority threshold via the filter button, it should have at least two values.
109
+ * @default []
110
+ */
111
+ priorityThresholds?: number[];
112
+ }
113
+ /**
114
+ * Configuration of the guide grid in the background of the diagram.
115
+ */
116
+ export interface GridConfig {
117
+ /**
118
+ * Whether the grid is present in the diagram.
119
+ * @default true
120
+ */
121
+ enabled?: boolean;
122
+ /**
123
+ * Color of grid elements such as the points or axes.
124
+ * @default "rgba(0, 0, 0, 0.1)"
125
+ */
126
+ color?: string;
127
+ /**
128
+ * When true, the user moving or stretching nodes will cause their corners to automatically snap to the closest grid point.
129
+ * @default false
130
+ */
131
+ snap?: boolean;
132
+ /**
133
+ * Distance between each point of the grid of this diagram in diagram units.
134
+ * @default 10
135
+ */
136
+ spacing?: number;
137
+ /**
138
+ * In a range between 0 and 1, how thick the points of the grid are relative to the distance between them.
139
+ * @default 0.05
140
+ */
141
+ thickness?: number;
142
+ }
96
143
  /**
97
144
  * Configuration for which user actions are allowed in a diagram.
98
145
  * @public
@@ -107,32 +154,40 @@ export type UserActionConfig = {
107
154
  export type ComponentsConfig = {
108
155
  /**
109
156
  * Configuration for the buttons component in the diagram.
157
+ * If left undefined, it is interpreted as disabling the buttons component,
158
+ * same as if the attribute `enabled` in its configuration was set to `false`.
110
159
  */
111
160
  buttons?: ButtonsComponentConfig;
112
161
  /**
113
162
  * Configuration for the errors component in the diagram.
163
+ * If left undefined, it is interpreted as disabling the errors component,
164
+ * same as if the attribute `enabled` in its configuration was set to `false`.
114
165
  */
115
166
  errors?: ErrorsComponentConfig;
116
167
  /**
117
168
  * Configuration for the palette component in the diagram.
169
+ * If left undefined, it is interpreted as disabling the palette component,
170
+ * same as if the attribute `enabled` in its configuration was set to `false`.
118
171
  */
119
172
  palette?: PaletteComponentConfig;
120
173
  /**
121
174
  * Configuration for the property editor component in the diagram.
175
+ * If left undefined, it is interpreted as disabling the property editor component,
176
+ * same as if the attribute `enabled` in its configuration was set to `false`.
122
177
  */
123
178
  propertyEditor?: PropertyEditorComponentConfig;
124
179
  };
125
180
  /**
126
181
  * Configuration for the buttons component in a diagram.
127
- * @see DiagramButtonsComponent
128
182
  * @public
183
+ * @see DiagramButtonsComponent
129
184
  */
130
185
  export interface ButtonsComponentConfig {
131
186
  /**
132
187
  * Whether this component is present in the diagram.
133
188
  * @default true
134
189
  */
135
- exists?: boolean;
190
+ enabled?: boolean;
136
191
  /**
137
192
  * Location of this component in the screen.
138
193
  * @default 'bottom-right'
@@ -144,54 +199,54 @@ export interface ButtonsComponentConfig {
144
199
  */
145
200
  direction?: Side;
146
201
  /**
147
- * Whether to enable the filter button in this component.
202
+ * Whether to enable the user action (undo, redo) buttons in this component.
148
203
  * @default true
149
204
  */
205
+ enableAction?: boolean;
206
+ /**
207
+ * Whether to enable the filter button in this component.
208
+ * @default false
209
+ */
150
210
  enableFilter?: boolean;
151
211
  /**
152
212
  * Whether to enable the layout button in this component.
153
- * @default true
213
+ * @default false
154
214
  */
155
215
  enableLayout?: boolean;
156
216
  /**
157
- * Whether to enable the undo and redo buttons in this component.
217
+ * Whether to enable the user selection (copy, paste, cut, delete) buttons in this component.
158
218
  * @default true
159
219
  */
160
- enableUndoRedo?: boolean;
220
+ enableSelection?: boolean;
161
221
  /**
162
- * Whether to enable the zoom button in this component.
222
+ * Whether to enable the zoom buttons in this component.
163
223
  * @default true
164
224
  */
165
225
  enableZoom?: boolean;
166
- /**
167
- * The rate by which the zoom level increases or decreses in this component.
168
- * @default 2
169
- */
170
- zoomRate?: number;
171
226
  }
172
227
  /**
173
228
  * Configuration for the errors component in a diagram.
174
- * @see ErrorsComponent
175
229
  * @public
230
+ * @see ErrorsComponent
176
231
  */
177
232
  export interface ErrorsComponentConfig {
178
233
  /**
179
234
  * Whether this component is present in the diagram.
180
235
  * @default true
181
236
  */
182
- exists?: boolean;
237
+ enabled?: boolean;
183
238
  }
184
239
  /**
185
240
  * Configuration for the palette component in a diagram.
186
- * @see PaletteComponent
187
241
  * @public
242
+ * @see PaletteComponent
188
243
  */
189
244
  export interface PaletteComponentConfig {
190
245
  /**
191
246
  * Whether this component is present in the diagram.
192
247
  * @default true
193
248
  */
194
- exists?: boolean;
249
+ enabled?: boolean;
195
250
  /**
196
251
  * Location of this component in the screen.
197
252
  * @default 'top-left'
@@ -208,22 +263,27 @@ export interface PaletteComponentConfig {
208
263
  */
209
264
  width?: string;
210
265
  /**
211
- * Configuration for the sections of this palette.
266
+ * Gap between the templates in this palette.
267
+ * @default '1rem'
268
+ */
269
+ gap?: string;
270
+ /**
271
+ * Configuration for the sections of this palette. By default, no sections are created.
212
272
  * @default undefined
213
273
  */
214
274
  sections?: PaletteSectionConfig[];
215
275
  }
216
276
  /**
217
277
  * Configuration for the property editor component in a diagram.
218
- * @see PropertyEditorComponent
219
278
  * @public
279
+ * @see PropertyEditorComponent
220
280
  */
221
281
  export interface PropertyEditorComponentConfig {
222
282
  /**
223
283
  * Whether this component is present in the diagram.
224
284
  * @default true
225
285
  */
226
- exists?: boolean;
286
+ enabled?: boolean;
227
287
  /**
228
288
  * Location of this component in the screen.
229
289
  * @default 'top-right'
@@ -242,8 +302,8 @@ export interface PropertyEditorComponentConfig {
242
302
  }
243
303
  /**
244
304
  * Configuration for a palette.
245
- * @see PaletteComponent
246
305
  * @public
306
+ * @see PaletteComponent
247
307
  */
248
308
  export interface PaletteSectionConfig {
249
309
  /**
@@ -263,8 +323,8 @@ export interface PaletteSectionConfig {
263
323
  }
264
324
  /**
265
325
  * Configuration for a template of a node in a palette.
266
- * @see PaletteComponent
267
326
  * @public
327
+ * @see PaletteComponent
268
328
  */
269
329
  export interface NodeTemplateConfig {
270
330
  /**
@@ -292,8 +352,8 @@ export interface NodeTemplateConfig {
292
352
  }
293
353
  /**
294
354
  * Configuration for a template of a connection in a palette.
295
- * @see PaletteComponent
296
355
  * @public
356
+ * @see PaletteComponent
297
357
  */
298
358
  export interface ConnectionTemplateConfig {
299
359
  /**
@@ -317,18 +377,22 @@ export interface ConnectionTemplateConfig {
317
377
  */
318
378
  icon: string;
319
379
  /**
320
- * Width of this template in pixels as it appears on the palette.
380
+ * File path of the background image of this template as it appears on the palette when this connection type is selected.
381
+ */
382
+ selectedIcon: string;
383
+ /**
384
+ * Width of this template in diagram units as it appears on the palette.
321
385
  */
322
386
  width: number;
323
387
  /**
324
- * Height of this template in pixels as it appears on the palette.
388
+ * Height of this template in diagram units as it appears on the palette.
325
389
  */
326
390
  height: number;
327
391
  }
328
392
  /**
329
393
  * Configuration for a type of node.
330
- * @see DiagramNodeType
331
394
  * @public
395
+ * @see DiagramNodeType
332
396
  */
333
397
  export interface NodeTypeConfig {
334
398
  /**
@@ -340,22 +404,22 @@ export interface NodeTypeConfig {
340
404
  */
341
405
  name?: string;
342
406
  /**
343
- * Default width of nodes of this type in pixels.
407
+ * Default width of nodes of this type in diagram units.
344
408
  * @default 1
345
409
  */
346
410
  defaultWidth?: number;
347
411
  /**
348
- * Default height of nodes of this type in pixels.
412
+ * Default height of nodes of this type in diagram units.
349
413
  * @default 1
350
414
  */
351
415
  defaultHeight?: number;
352
416
  /**
353
- * Minimum width of nodes of this type in pixels.
417
+ * Minimum width of nodes of this type in diagram units.
354
418
  * @default 1
355
419
  */
356
420
  minWidth?: number;
357
421
  /**
358
- * Minimum height of nodes of this type in pixels.
422
+ * Minimum height of nodes of this type in diagram units.
359
423
  * @default 1
360
424
  */
361
425
  minHeight?: number;
@@ -401,15 +465,15 @@ export interface NodeTypeConfig {
401
465
  priority?: number;
402
466
  /**
403
467
  * Properties of nodes of this type that can be edited in the property editor component.
404
- * @see PropertyEditorComponent
405
468
  * @default []
469
+ * @see PropertyEditorComponent
406
470
  */
407
471
  properties?: Property[];
408
472
  }
409
473
  /**
410
474
  * Configuration for a field that is part of another element.
411
- * @see DiagramField
412
475
  * @public
476
+ * @see DiagramField
413
477
  */
414
478
  export interface FieldConfig {
415
479
  /**
@@ -418,24 +482,24 @@ export interface FieldConfig {
418
482
  */
419
483
  editable?: boolean;
420
484
  /**
421
- * The size of the font of this field in pixels.
485
+ * The size of the font of this field in diagram units.
422
486
  * @default 0
423
487
  */
424
488
  fontSize?: number;
425
489
  /**
426
- * The margin around the field in pixels. May be a single value or an array, in which case the value is interpreted in the same way as in CSS margin.
490
+ * The margin around the field in diagram units. May be a single value or an array, in which case the value is interpreted in the same way as in CSS margin.
427
491
  * @default 0
428
492
  */
429
493
  margin?: number | number[];
430
494
  /**
431
- * The padding around the field in pixels. May be a single value or an array, in which case the value is interpreted in the same way as in CSS padding.
495
+ * The padding around the field in diagram units. May be a single value or an array, in which case the value is interpreted in the same way as in CSS padding.
432
496
  * @default 0
433
497
  */
434
498
  padding?: number | number[];
435
499
  /**
436
500
  * The font family of the text of this field.
437
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family |font-family}
438
501
  * @default null
502
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/font-family |font-family}
439
503
  */
440
504
  fontFamily?: string | null;
441
505
  /**
@@ -467,8 +531,8 @@ export interface FieldConfig {
467
531
  }
468
532
  /**
469
533
  * Configuration for a port that is part of another element.
470
- * @see DiagramPort
471
534
  * @public
535
+ * @see DiagramPort
472
536
  */
473
537
  export interface PortConfig {
474
538
  /**
@@ -487,28 +551,28 @@ export interface PortConfig {
487
551
  }
488
552
  /**
489
553
  * Configuration for the grid of sections of a node.
490
- * @see DiagramSection
491
554
  * @public
555
+ * @see DiagramSection
492
556
  */
493
557
  export interface SectionGridConfig {
494
558
  /**
495
- * Default widths of each column of sections of this grid in pixels.
559
+ * Default widths of each column of sections of this grid in diagram units.
496
560
  */
497
561
  defaultWidths?: number[];
498
562
  /**
499
- * Default heights of each row of sections of this grid in pixels.
563
+ * Default heights of each row of sections of this grid in diagram units.
500
564
  */
501
565
  defaultHeights?: number[];
502
566
  /**
503
- * Minimum widths of each column of sections of this grid in pixels.
567
+ * Minimum widths of each column of sections of this grid in diagram units.
504
568
  */
505
569
  minWidths?: number[];
506
570
  /**
507
- * Minimum heights of each row of sections of this grid in pixels.
571
+ * Minimum heights of each row of sections of this grid in diagram units.
508
572
  */
509
573
  minHeights?: number[];
510
574
  /**
511
- * The margin left around the sections of this grid in pixels.
575
+ * The margin left around the sections of this grid in diagram units.
512
576
  * @default 0
513
577
  */
514
578
  margin?: number;
@@ -520,8 +584,8 @@ export interface SectionGridConfig {
520
584
  }
521
585
  /**
522
586
  * Configuration for a section of a node.
523
- * @see DiagramSection
524
587
  * @public
588
+ * @see DiagramSection
525
589
  */
526
590
  export interface SectionConfig {
527
591
  /**
@@ -603,19 +667,19 @@ export interface NodeStretchableImageLook {
603
667
  */
604
668
  lookType: 'stretchable-image-look';
605
669
  /**
606
- * Width taken up by the images at the left of nodes using this look in pixels.
670
+ * Width taken up by the images at the left of nodes using this look in diagram units.
607
671
  */
608
672
  leftMargin: number;
609
673
  /**
610
- * Width taken up by the images at the right of nodes using this look in pixels.
674
+ * Width taken up by the images at the right of nodes using this look in diagram units.
611
675
  */
612
676
  rightMargin: number;
613
677
  /**
614
- * Width taken up by the images at the top of nodes using this look in pixels.
678
+ * Width taken up by the images at the top of nodes using this look in diagram units.
615
679
  */
616
680
  topMargin: number;
617
681
  /**
618
- * Width taken up by the images at the bottom of nodes using this look in pixels.
682
+ * Width taken up by the images at the bottom of nodes using this look in diagram units.
619
683
  */
620
684
  bottomMargin: number;
621
685
  /**
@@ -693,8 +757,8 @@ export interface NodeStretchableImageLook {
693
757
  }
694
758
  /**
695
759
  * Configuration for a type of connection.
696
- * @see DiagramConnectionType
697
760
  * @public
761
+ * @see DiagramConnectionType
698
762
  */
699
763
  export interface ConnectionTypeConfig {
700
764
  /**
@@ -716,7 +780,7 @@ export interface ConnectionTypeConfig {
716
780
  */
717
781
  selectedColor?: string;
718
782
  /**
719
- * Width of the line of connections of this type in pixels.
783
+ * Width of the line of connections of this type in diagram units.
720
784
  * @default 1
721
785
  */
722
786
  width?: number;
@@ -756,8 +820,8 @@ export interface ConnectionTypeConfig {
756
820
  endTypes?: string[];
757
821
  /**
758
822
  * Properties of connections of this type that can be edited in the property editor component.
759
- * @see PropertyEditorComponent
760
823
  * @default []
824
+ * @see PropertyEditorComponent
761
825
  */
762
826
  properties?: Property[];
763
827
  }
@@ -775,13 +839,13 @@ export interface ConnectionMarkerLook {
775
839
  */
776
840
  selectedImage: string;
777
841
  /**
778
- * The width of the marker in pixels.
842
+ * The width of the marker in diagram units.
779
843
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker |marker}
780
844
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerWidth |markerWidth}
781
845
  */
782
846
  markerWidth: number;
783
847
  /**
784
- * The height of the marker in pixels.
848
+ * The height of the marker in diagram units.
785
849
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker |marker}
786
850
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/markerHeight |markerHeight}
787
851
  */
@@ -1,6 +1,6 @@
1
- import { Point } from '../../util/canvas-util';
2
- import { Events } from '../../util/events';
3
- import { DiagramElement } from './diagram-element';
1
+ import { Point } from '../util/canvas-util';
2
+ import { Events } from '../util/events';
3
+ import { DiagramElement } from './model/diagram-element';
4
4
  /**
5
5
  * Represents an action taken by the user on the diagram.
6
6
  * @public
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which places adjacent nodes close by, placing nodes in order according to depth first search.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which places adjacent nodes close by, placing nodes in order according to breadth first search.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which arranges the nodes by a breadth first search system according to their distance to the first node in the list.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  /**
3
3
  * A layout algorithm that can be applied to a diagram.
4
4
  * @public
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which attracts connected nodes and repels unconnected nodes.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which arranges all the nodes in a horizontal line.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which arranges the nodes by their priority first.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which arranges the nodes in trees from left to right by depth relative to the nodes with most priority.
@@ -1,4 +1,4 @@
1
- import { DiagramModel } from '../diagram-model';
1
+ import { DiagramModel } from '../model/diagram-model';
2
2
  import { DiagramLayout } from './diagram-layout';
3
3
  /**
4
4
  * A layout which arranges all the nodes in a vertical line.
@@ -1,7 +1,7 @@
1
1
  import { Point } from '../../util/canvas-util';
2
2
  import { LineShape, LineStyle } from '../../util/line';
3
3
  import { Side } from '../../util/svg-util';
4
- import { ConnectionMarkerLook, ConnectionTypeConfig, FieldConfig } from './diagram-config';
4
+ import { ConnectionMarkerLook, ConnectionTypeConfig, FieldConfig } from '../diagram-config';
5
5
  import { DiagramElement, DiagramElementSet } from './diagram-element';
6
6
  import { DiagramEntity, DiagramEntitySet } from './diagram-entity';
7
7
  import { DiagramModel } from './diagram-model';
@@ -9,8 +9,8 @@ import { DiagramPort } from './diagram-port';
9
9
  import { PropertySet, ValueSet } from './diagram-property';
10
10
  /**
11
11
  * Default values of the parameters of a diagram connection.
12
- * @see DiagramConnection
13
12
  * @private
13
+ * @see DiagramConnection
14
14
  */
15
15
  export declare const DIAGRAM_CONNECTION_TYPE_DEFAULTS: {
16
16
  name: string;
@@ -44,8 +44,8 @@ export declare const CAN_CONNECTIONS_SHARE_PORTS = true;
44
44
  export declare const CAN_TIGHTEN_CONNECTIONS = true;
45
45
  /**
46
46
  * A connection type, which holds properties that connections of this type share in common.
47
- * @see ConnectionTypeConfig
48
47
  * @public
48
+ * @see ConnectionTypeConfig
49
49
  */
50
50
  export declare class DiagramConnectionType implements DiagramEntity {
51
51
  id: string;
@@ -67,8 +67,8 @@ export declare class DiagramConnectionType implements DiagramEntity {
67
67
  }
68
68
  /**
69
69
  * A connection which goes from one port to another.
70
- * @see DiagramPort
71
70
  * @public
71
+ * @see DiagramPort
72
72
  */
73
73
  export declare class DiagramConnection extends DiagramElement {
74
74
  type: DiagramConnectionType;