@likec4/diagram 1.27.0 → 1.27.2

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 (151) hide show
  1. package/bundle/index.js +2343 -6880
  2. package/dist/LikeC4Diagram.js +3 -9
  3. package/dist/LikeC4Diagram.props.d.ts +5 -3
  4. package/dist/StaticLikeC4Diagram.js +1 -1
  5. package/dist/_virtual/set.js +5 -0
  6. package/dist/_virtual/set2.js +3 -0
  7. package/dist/base/BaseXYFlow.d.ts +2 -1
  8. package/dist/base/primitives/compound/CompoundNodeContainer.d.ts +1 -1
  9. package/dist/base/primitives/compound/CompoundNodeContainer.js +1 -2
  10. package/dist/base/primitives/edge/EdgeLabel.css.js +1 -4
  11. package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -1
  12. package/dist/base/primitives/edge/EdgePath.js +0 -3
  13. package/dist/base/primitives/edge/edge.css.js +2 -0
  14. package/dist/base/primitives/element/ElementActionButtons.js +5 -10
  15. package/dist/base/primitives/element/ElementNodeContainer.css.js +5 -4
  16. package/dist/base/primitives/element/ElementShape.css.js +1 -12
  17. package/dist/base/primitives/element/ElementTitle.css.js +3 -2
  18. package/dist/base/types.js +2 -2
  19. package/dist/base/updateEdges.js +1 -9
  20. package/dist/base/updateNodes.js +1 -12
  21. package/dist/bundle/LikeC4View.js +2 -2
  22. package/dist/bundle/LikeC4View.props.d.ts +7 -7
  23. package/dist/components/Link.js +1 -1
  24. package/dist/hooks/useCurrentViewId.js +8 -2
  25. package/dist/hooks/useDiagram.d.ts +2659 -1996
  26. package/dist/hooks/useDiagram.js +16 -8
  27. package/dist/likec4diagram/DiagramXYFlow.js +10 -9
  28. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +30 -41
  29. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +1 -1
  30. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +6 -1
  31. package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +13 -5
  32. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +3 -3
  33. package/dist/likec4diagram/ui/notation/NotationPanel.js +10 -4
  34. package/dist/likec4diagram/useLayoutConstraints.d.ts +11 -10
  35. package/dist/likec4diagram/useLayoutConstraints.js +64 -61
  36. package/dist/node_modules/.pnpm/mnemonist@0.40.3_patch_hash_5c12abb43fcff6fd81e53021b89075d53249640d165a2556cc1e58d71201a13a/node_modules/mnemonist/set.js +369 -0
  37. package/dist/overlays/Overlays.js +5 -3
  38. package/dist/overlays/element-details/actor.d.ts +2769 -173
  39. package/dist/overlays/overlay/Overlay.css.d.ts +26 -2
  40. package/dist/overlays/overlay/Overlay.css.js +83 -16
  41. package/dist/overlays/overlay/Overlay.d.ts +7 -6
  42. package/dist/overlays/overlay/Overlay.js +39 -32
  43. package/dist/overlays/overlaysActor.js +2 -2
  44. package/dist/overlays/relationship-details/RelationshipDetails.js +113 -70
  45. package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
  46. package/dist/overlays/relationship-details/SelectEdge.js +15 -9
  47. package/dist/overlays/relationship-details/_types.d.ts +4 -1
  48. package/dist/overlays/relationship-details/actor.d.ts +415 -128
  49. package/dist/overlays/relationship-details/actor.js +162 -53
  50. package/dist/overlays/relationship-details/compute.d.ts +12 -0
  51. package/dist/overlays/relationship-details/compute.js +139 -0
  52. package/dist/overlays/relationship-details/custom/ElementActions.js +27 -5
  53. package/dist/overlays/relationship-details/custom/edgeTypes.js +1 -1
  54. package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +2 -1
  55. package/dist/overlays/relationship-details/hooks.d.ts +336 -6
  56. package/dist/overlays/relationship-details/hooks.js +9 -7
  57. package/dist/overlays/relationship-details/layout-to-xyflow.d.ts +12 -0
  58. package/dist/overlays/relationship-details/layout-to-xyflow.js +149 -0
  59. package/dist/overlays/relationship-details/layout.d.ts +22 -0
  60. package/dist/overlays/relationship-details/layout.js +314 -0
  61. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +3 -1
  62. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +2 -2
  63. package/dist/overlays/relationships-browser/SelectElement.js +4 -4
  64. package/dist/overlays/relationships-browser/_types.d.ts +2 -0
  65. package/dist/overlays/relationships-browser/actor.d.ts +130 -14
  66. package/dist/overlays/relationships-browser/actor.js +30 -16
  67. package/dist/overlays/relationships-browser/custom/ElementActions.js +5 -3
  68. package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +3 -1
  69. package/dist/overlays/relationships-browser/custom/edgeTypes.js +1 -1
  70. package/dist/overlays/relationships-browser/hooks.d.ts +3 -1
  71. package/dist/overlays/relationships-browser/hooks.js +1 -1
  72. package/dist/overlays/relationships-browser/{-useRelationshipsView.d.ts → layout.d.ts} +2 -0
  73. package/dist/overlays/relationships-browser/{-useRelationshipsView.js → layout.js} +19 -2
  74. package/dist/overlays/relationships-browser/useViewToNodesEdges.d.ts +1 -1
  75. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +3 -1
  76. package/dist/packages/core/src/compute-view/relationships-view/compute.js +1 -1
  77. package/dist/packages/core/src/model/connection/model/ConnectionModel.js +121 -0
  78. package/dist/packages/core/src/model/connection/model/find.js +39 -0
  79. package/dist/packages/core/src/model/connection/ops.js +7 -0
  80. package/dist/packages/core/src/utils/const.js +3 -0
  81. package/dist/packages/core/src/utils/fqn.js +9 -1
  82. package/dist/packages/core/src/utils/iterable/find.js +21 -0
  83. package/dist/packages/core/src/utils/iterable/some.js +21 -0
  84. package/dist/packages/core/src/utils/set.js +48 -0
  85. package/dist/packages/core/src/utils/string-hash.js +13 -0
  86. package/dist/state/DiagramActorProvider.d.ts +4 -2
  87. package/dist/state/DiagramActorProvider.js +30 -37
  88. package/dist/state/assign.js +2 -2
  89. package/dist/state/diagram-machine.d.ts +1731 -1040
  90. package/dist/state/diagram-machine.js +126 -60
  91. package/dist/state/syncManualLayoutActor.d.ts +1 -1
  92. package/dist/styles.css.js +1 -1
  93. package/package.json +11 -11
  94. package/src/LikeC4Diagram.props.ts +7 -3
  95. package/src/LikeC4Diagram.tsx +2 -8
  96. package/src/StaticLikeC4Diagram.tsx +1 -1
  97. package/src/base/BaseXYFlow.tsx +2 -1
  98. package/src/base/primitives/compound/CompoundNodeContainer.tsx +1 -3
  99. package/src/base/primitives/edge/EdgeLabel.css.ts +1 -4
  100. package/src/base/primitives/edge/EdgeLabelContainer.tsx +1 -1
  101. package/src/base/primitives/edge/EdgePath.tsx +0 -3
  102. package/src/base/primitives/edge/edge.css.ts +2 -0
  103. package/src/base/primitives/element/ElementActionButtons.tsx +6 -7
  104. package/src/base/primitives/element/ElementNodeContainer.css.ts +5 -4
  105. package/src/base/primitives/element/ElementShape.css.ts +1 -12
  106. package/src/base/primitives/element/ElementTitle.css.ts +3 -2
  107. package/src/base/types.ts +2 -7
  108. package/src/base/updateEdges.ts +8 -8
  109. package/src/base/updateNodes.ts +11 -11
  110. package/src/bundle/LikeC4View.props.ts +7 -7
  111. package/src/bundle/LikeC4View.tsx +2 -2
  112. package/src/components/Link.tsx +3 -1
  113. package/src/hooks/useCurrentViewId.ts +4 -2
  114. package/src/hooks/useDiagram.ts +18 -9
  115. package/src/likec4diagram/DiagramXYFlow.tsx +11 -9
  116. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +39 -48
  117. package/src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx +2 -2
  118. package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +5 -0
  119. package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +8 -4
  120. package/src/likec4diagram/ui/notation/NotationPanel.css.ts +2 -2
  121. package/src/likec4diagram/ui/notation/NotationPanel.tsx +8 -6
  122. package/src/likec4diagram/useLayoutConstraints.ts +84 -89
  123. package/src/overlays/Overlays.tsx +5 -3
  124. package/src/overlays/overlay/Overlay.css.ts +83 -15
  125. package/src/overlays/overlay/Overlay.tsx +52 -41
  126. package/src/overlays/overlaysActor.ts +1 -1
  127. package/src/overlays/relationship-details/RelationshipDetails.tsx +131 -68
  128. package/src/overlays/relationship-details/SelectEdge.tsx +19 -12
  129. package/src/overlays/relationship-details/_types.ts +3 -1
  130. package/src/overlays/relationship-details/actor.ts +217 -68
  131. package/src/overlays/relationship-details/compute.ts +186 -0
  132. package/src/overlays/relationship-details/custom/ElementActions.tsx +27 -18
  133. package/src/overlays/relationship-details/custom/edgeTypes.tsx +1 -1
  134. package/src/overlays/relationship-details/hooks.ts +10 -8
  135. package/src/overlays/relationship-details/layout-to-xyflow.ts +195 -0
  136. package/src/overlays/relationship-details/layout.ts +470 -0
  137. package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +2 -2
  138. package/src/overlays/relationships-browser/SelectElement.tsx +5 -5
  139. package/src/overlays/relationships-browser/_types.ts +2 -0
  140. package/src/overlays/relationships-browser/actor.ts +39 -14
  141. package/src/overlays/relationships-browser/custom/ElementActions.tsx +5 -3
  142. package/src/overlays/relationships-browser/custom/edgeTypes.tsx +1 -1
  143. package/src/overlays/relationships-browser/hooks.ts +2 -2
  144. package/src/overlays/relationships-browser/{-useRelationshipsView.ts → layout.ts} +23 -13
  145. package/src/overlays/relationships-browser/useViewToNodesEdges.ts +3 -1
  146. package/src/state/DiagramActorProvider.tsx +40 -50
  147. package/src/state/assign.ts +2 -2
  148. package/src/state/diagram-machine.ts +151 -75
  149. package/dist/overlays/relationship-details/useLayoutedDetails.d.ts +0 -19
  150. package/dist/overlays/relationship-details/useLayoutedDetails.js +0 -267
  151. package/src/overlays/relationship-details/useLayoutedDetails.ts +0 -376
@@ -1,24 +1,48 @@
1
- import { BBox, DiagramView, EdgeId, RelationId, Color, ViewId, RelationshipLineType } from '@likec4/core';
2
- import { EdgeChange, NodeChange, ReactFlowInstance } from '@xyflow/react';
3
- import { ActorLogicFrom, ActorRefFromLogic, SnapshotFrom, StateMachine, NonReducibleUnknown, EventObject, MetaObject, AnyActorLogic, ConditionalRequired, InputFrom, RequiredLogicInput, IsNotNever, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction, CancelAction } from 'xstate';
1
+ import { BBox, EdgeId, ExclusiveUnion, Fqn, ViewId, RelationId, Color, RelationshipLineType } from '@likec4/core';
2
+ import { EdgeChange, NodeChange, ReactFlowInstance, useStoreApi } from '@xyflow/react';
3
+ import { ActorLogicFrom, ActorRefFromLogic, SnapshotFrom, StateMachine, Values, NonReducibleUnknown, EventObject, MetaObject, AnyActorLogic, ConditionalRequired, InputFrom, RequiredLogicInput, IsNotNever, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction, CancelAction } from 'xstate';
4
4
  import { Base } from '../../base';
5
5
  import { RelationshipDetailsTypes } from './_types';
6
+ import { LayoutResult } from './layout';
6
7
  import { EdgeMarkerType, HandleType } from '@xyflow/system';
7
8
  import { ReactNode, CSSProperties } from 'react';
8
9
  type XYFLowInstance = ReactFlowInstance<RelationshipDetailsTypes.Node, RelationshipDetailsTypes.Edge>;
9
- export type Input = {
10
+ type XYStoreApi = ReturnType<typeof useStoreApi<RelationshipDetailsTypes.Node, RelationshipDetailsTypes.Edge>>;
11
+ export type Input = ExclusiveUnion<{
12
+ Edge: {
13
+ edgeId: EdgeId;
14
+ viewId: ViewId;
15
+ };
16
+ Between: {
17
+ source: Fqn;
18
+ target: Fqn;
19
+ viewId: ViewId;
20
+ };
21
+ }>;
22
+ type Subject = {
10
23
  edgeId: EdgeId;
11
- view: DiagramView;
24
+ } | {
25
+ source: Fqn;
26
+ target: Fqn;
27
+ edgeId?: never;
12
28
  };
13
- export type Context = Readonly<Input & {
29
+ export type Context = Readonly<{
30
+ subject: Subject;
31
+ viewId: ViewId;
14
32
  xyflow: XYFLowInstance | null;
15
- initialized: boolean;
33
+ xystore: XYStoreApi | null;
34
+ initialized: {
35
+ xydata: boolean;
36
+ xyflow: boolean;
37
+ };
16
38
  xynodes: RelationshipDetailsTypes.Node[];
17
39
  xyedges: RelationshipDetailsTypes.Edge[];
40
+ bounds: BBox;
18
41
  }>;
19
42
  export type Events = {
20
43
  type: 'xyflow.init';
21
44
  instance: XYFLowInstance;
45
+ store: XYStoreApi;
22
46
  } | {
23
47
  type: 'xyflow.nodeClick';
24
48
  node: RelationshipDetailsTypes.Node;
@@ -47,38 +71,85 @@ export type Events = {
47
71
  changes: EdgeChange<RelationshipDetailsTypes.Edge>[];
48
72
  } | {
49
73
  type: 'xyflow.paneClick';
74
+ } | {
75
+ type: 'xyflow.paneDblClick';
50
76
  } | {
51
77
  type: 'xyflow.resized';
52
78
  } | {
53
- type: 'update.xydata';
54
- xynodes: RelationshipDetailsTypes.Node[];
55
- xyedges: RelationshipDetailsTypes.Edge[];
79
+ type: 'xyflow.updateNodeInternals';
80
+ } | {
81
+ type: 'update.layoutData';
82
+ data: LayoutResult;
56
83
  } | {
57
84
  type: 'fitDiagram';
58
85
  duration?: number;
59
86
  bounds?: BBox;
60
87
  } | {
61
88
  type: 'navigate.to';
62
- edgeId: EdgeId;
89
+ params: {
90
+ edgeId: EdgeId;
91
+ viewId?: ViewId;
92
+ } | {
93
+ source: Fqn;
94
+ target: Fqn;
95
+ viewId?: ViewId;
96
+ };
63
97
  } | {
64
98
  type: 'close';
65
99
  };
66
- export declare const relationshipDetailsLogic: StateMachine<Readonly<Input & {
100
+ export declare const relationshipDetailsLogic: StateMachine<Readonly<{
101
+ subject: Subject;
102
+ viewId: ViewId;
67
103
  xyflow: XYFLowInstance | null;
68
- initialized: boolean;
104
+ xystore: XYStoreApi | null;
105
+ initialized: {
106
+ xydata: boolean;
107
+ xyflow: boolean;
108
+ };
69
109
  xynodes: RelationshipDetailsTypes.Node[];
70
110
  xyedges: RelationshipDetailsTypes.Edge[];
71
- }>, Events, {}, never, {
72
- type: "xyflow:fitDiagram";
73
- params: {
74
- duration?: number;
75
- bounds?: BBox;
76
- } | undefined;
77
- }, {
78
- type: "enable: navigate.to";
79
- params: unknown;
80
- }, never, "active" | "closed" | "opening", string, Input, NonReducibleUnknown, EventObject, MetaObject, {
81
- readonly initial: "opening";
111
+ bounds: BBox;
112
+ }>, Events, {}, never, Values<{
113
+ "xyflow:fitDiagram": {
114
+ type: "xyflow:fitDiagram";
115
+ params: {
116
+ duration?: number;
117
+ bounds?: BBox;
118
+ } | undefined;
119
+ };
120
+ "xyflow:updateNodeInternals": {
121
+ type: "xyflow:updateNodeInternals";
122
+ params: unknown;
123
+ };
124
+ updateXYFlow: {
125
+ type: "updateXYFlow";
126
+ params: NonReducibleUnknown;
127
+ };
128
+ updateLayoutData: {
129
+ type: "updateLayoutData";
130
+ params: NonReducibleUnknown;
131
+ };
132
+ }>, Values<{
133
+ isReady: {
134
+ type: "isReady";
135
+ params: unknown;
136
+ };
137
+ "enable: navigate.to": {
138
+ type: "enable: navigate.to";
139
+ params: unknown;
140
+ };
141
+ }>, never, "ready" | "closed" | "isReady" | "initializing", string, {
142
+ source?: never;
143
+ target?: never;
144
+ edgeId: EdgeId;
145
+ viewId: ViewId;
146
+ } | {
147
+ edgeId?: never;
148
+ source: Fqn;
149
+ target: Fqn;
150
+ viewId: ViewId;
151
+ }, NonReducibleUnknown, EventObject, MetaObject, {
152
+ readonly initial: "initializing";
82
153
  readonly context: ({ input }: {
83
154
  spawn: {
84
155
  <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
@@ -89,180 +160,406 @@ export declare const relationshipDetailsLogic: StateMachine<Readonly<Input & {
89
160
  syncSnapshot?: boolean;
90
161
  } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
91
162
  };
92
- input: Input;
93
- self: ActorRef<MachineSnapshot<Readonly<Input & {
163
+ input: {
164
+ source?: never;
165
+ target?: never;
166
+ edgeId: EdgeId;
167
+ viewId: ViewId;
168
+ } | {
169
+ edgeId?: never;
170
+ source: Fqn;
171
+ target: Fqn;
172
+ viewId: ViewId;
173
+ };
174
+ self: ActorRef<MachineSnapshot<Readonly<{
175
+ subject: Subject;
176
+ viewId: ViewId;
94
177
  xyflow: XYFLowInstance | null;
95
- initialized: boolean;
178
+ xystore: XYStoreApi | null;
179
+ initialized: {
180
+ xydata: boolean;
181
+ xyflow: boolean;
182
+ };
96
183
  xynodes: RelationshipDetailsTypes.Node[];
97
184
  xyedges: RelationshipDetailsTypes.Edge[];
185
+ bounds: BBox;
98
186
  }>, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
99
187
  }) => {
100
- initialized: false;
188
+ subject: Subject;
189
+ viewId: ViewId;
190
+ bounds: {
191
+ x: number;
192
+ y: number;
193
+ width: number;
194
+ height: number;
195
+ };
196
+ initialized: {
197
+ xydata: false;
198
+ xyflow: false;
199
+ };
101
200
  xyflow: null;
201
+ xystore: null;
102
202
  xynodes: never[];
103
203
  xyedges: never[];
104
- edgeId: EdgeId;
105
- view: DiagramView;
106
204
  };
107
205
  readonly states: {
108
- readonly opening: {
206
+ readonly initializing: {
109
207
  readonly on: {
110
208
  readonly 'xyflow.init': {
111
- readonly actions: ActionFunction<Readonly<Input & {
112
- xyflow: XYFLowInstance | null;
113
- initialized: boolean;
114
- xynodes: RelationshipDetailsTypes.Node[];
115
- xyedges: RelationshipDetailsTypes.Edge[];
116
- }>, {
117
- type: "xyflow.init";
118
- instance: XYFLowInstance;
119
- }, Events, undefined, never, never, never, never, never>;
120
- readonly target: "active";
209
+ readonly actions: "updateXYFlow";
210
+ readonly target: "isReady";
211
+ };
212
+ readonly 'update.layoutData': {
213
+ readonly actions: "updateLayoutData";
214
+ readonly target: "isReady";
121
215
  };
122
216
  readonly close: {
123
217
  readonly target: "closed";
124
218
  };
125
219
  };
126
220
  };
127
- readonly active: {
128
- readonly entry: {
129
- readonly type: "xyflow:fitDiagram";
130
- readonly params: {
131
- readonly duration: 0;
132
- };
133
- };
221
+ readonly isReady: {
222
+ readonly always: readonly [{
223
+ readonly guard: "isReady";
224
+ readonly actions: readonly [{
225
+ readonly type: "xyflow:fitDiagram";
226
+ readonly params: {
227
+ readonly duration: 0;
228
+ };
229
+ }, ActionFunction<Readonly<{
230
+ subject: Subject;
231
+ viewId: ViewId;
232
+ xyflow: XYFLowInstance | null;
233
+ xystore: XYStoreApi | null;
234
+ initialized: {
235
+ xydata: boolean;
236
+ xyflow: boolean;
237
+ };
238
+ xynodes: RelationshipDetailsTypes.Node[];
239
+ xyedges: RelationshipDetailsTypes.Edge[];
240
+ bounds: BBox;
241
+ }>, Events, Events, undefined, never, never, never, never, never>];
242
+ readonly target: "ready";
243
+ }, {
244
+ readonly target: "initializing";
245
+ }];
246
+ };
247
+ readonly ready: {
134
248
  readonly on: {
135
249
  readonly 'xyflow.edgeMouseEnter': {
136
- readonly actions: readonly [ ActionFunction<Readonly<Input & {
250
+ readonly actions: readonly [ ActionFunction<Readonly<{
251
+ subject: Subject;
252
+ viewId: ViewId;
137
253
  xyflow: XYFLowInstance | null;
138
- initialized: boolean;
254
+ xystore: XYStoreApi | null;
255
+ initialized: {
256
+ xydata: boolean;
257
+ xyflow: boolean;
258
+ };
139
259
  xynodes: RelationshipDetailsTypes.Node[];
140
260
  xyedges: RelationshipDetailsTypes.Edge[];
261
+ bounds: BBox;
141
262
  }>, {
142
263
  type: "xyflow.edgeMouseEnter";
143
264
  edge: RelationshipDetailsTypes.Edge;
144
- }, Events, undefined, never, never, never, never, never>, CancelAction<Readonly<Input & {
265
+ }, Events, undefined, never, never, never, never, never>, CancelAction<Readonly<{
266
+ subject: Subject;
267
+ viewId: ViewId;
145
268
  xyflow: XYFLowInstance | null;
146
- initialized: boolean;
269
+ xystore: XYStoreApi | null;
270
+ initialized: {
271
+ xydata: boolean;
272
+ xyflow: boolean;
273
+ };
147
274
  xynodes: RelationshipDetailsTypes.Node[];
148
275
  xyedges: RelationshipDetailsTypes.Edge[];
276
+ bounds: BBox;
149
277
  }>, {
150
278
  type: "xyflow.edgeMouseEnter";
151
279
  edge: RelationshipDetailsTypes.Edge;
152
- }, undefined, Events>, CancelAction<Readonly<Input & {
280
+ }, undefined, Events>, CancelAction<Readonly<{
281
+ subject: Subject;
282
+ viewId: ViewId;
153
283
  xyflow: XYFLowInstance | null;
154
- initialized: boolean;
284
+ xystore: XYStoreApi | null;
285
+ initialized: {
286
+ xydata: boolean;
287
+ xyflow: boolean;
288
+ };
155
289
  xynodes: RelationshipDetailsTypes.Node[];
156
290
  xyedges: RelationshipDetailsTypes.Edge[];
291
+ bounds: BBox;
157
292
  }>, {
158
293
  type: "xyflow.edgeMouseEnter";
159
294
  edge: RelationshipDetailsTypes.Edge;
160
- }, undefined, Events>, ActionFunction<Readonly<Input & {
295
+ }, undefined, Events>, ActionFunction<Readonly<{
296
+ subject: Subject;
297
+ viewId: ViewId;
161
298
  xyflow: XYFLowInstance | null;
162
- initialized: boolean;
299
+ xystore: XYStoreApi | null;
300
+ initialized: {
301
+ xydata: boolean;
302
+ xyflow: boolean;
303
+ };
163
304
  xynodes: RelationshipDetailsTypes.Node[];
164
305
  xyedges: RelationshipDetailsTypes.Edge[];
306
+ bounds: BBox;
165
307
  }>, {
166
308
  type: "xyflow.edgeMouseEnter";
167
309
  edge: RelationshipDetailsTypes.Edge;
168
310
  }, Events, undefined, never, never, never, never, never>];
169
311
  };
170
312
  readonly 'xyflow.edgeMouseLeave': {
171
- readonly actions: readonly [ ActionFunction<Readonly<Input & {
313
+ readonly actions: readonly [ ActionFunction<Readonly<{
314
+ subject: Subject;
315
+ viewId: ViewId;
172
316
  xyflow: XYFLowInstance | null;
173
- initialized: boolean;
317
+ xystore: XYStoreApi | null;
318
+ initialized: {
319
+ xydata: boolean;
320
+ xyflow: boolean;
321
+ };
174
322
  xynodes: RelationshipDetailsTypes.Node[];
175
323
  xyedges: RelationshipDetailsTypes.Edge[];
324
+ bounds: BBox;
176
325
  }>, {
177
326
  type: "xyflow.edgeMouseLeave";
178
327
  edge: RelationshipDetailsTypes.Edge;
179
- }, Events, undefined, never, never, never, never, never>, CancelAction<Readonly<Input & {
328
+ }, Events, undefined, never, never, never, never, never>, CancelAction<Readonly<{
329
+ subject: Subject;
330
+ viewId: ViewId;
180
331
  xyflow: XYFLowInstance | null;
181
- initialized: boolean;
332
+ xystore: XYStoreApi | null;
333
+ initialized: {
334
+ xydata: boolean;
335
+ xyflow: boolean;
336
+ };
182
337
  xynodes: RelationshipDetailsTypes.Node[];
183
338
  xyedges: RelationshipDetailsTypes.Edge[];
339
+ bounds: BBox;
184
340
  }>, {
185
341
  type: "xyflow.edgeMouseLeave";
186
342
  edge: RelationshipDetailsTypes.Edge;
187
- }, undefined, Events>, ActionFunction<Readonly<Input & {
343
+ }, undefined, Events>, ActionFunction<Readonly<{
344
+ subject: Subject;
345
+ viewId: ViewId;
188
346
  xyflow: XYFLowInstance | null;
189
- initialized: boolean;
347
+ xystore: XYStoreApi | null;
348
+ initialized: {
349
+ xydata: boolean;
350
+ xyflow: boolean;
351
+ };
190
352
  xynodes: RelationshipDetailsTypes.Node[];
191
353
  xyedges: RelationshipDetailsTypes.Edge[];
354
+ bounds: BBox;
192
355
  }>, {
193
356
  type: "xyflow.edgeMouseLeave";
194
357
  edge: RelationshipDetailsTypes.Edge;
195
358
  }, Events, undefined, never, never, never, never, never>];
196
359
  };
197
360
  readonly 'dim.nonhovered.edges': {
198
- readonly actions: ActionFunction<Readonly<Input & {
361
+ readonly actions: ActionFunction<Readonly<{
362
+ subject: Subject;
363
+ viewId: ViewId;
199
364
  xyflow: XYFLowInstance | null;
200
- initialized: boolean;
365
+ xystore: XYStoreApi | null;
366
+ initialized: {
367
+ xydata: boolean;
368
+ xyflow: boolean;
369
+ };
201
370
  xynodes: RelationshipDetailsTypes.Node[];
202
371
  xyedges: RelationshipDetailsTypes.Edge[];
372
+ bounds: BBox;
203
373
  }>, {
204
374
  type: "dim.nonhovered.edges";
205
375
  }, Events, undefined, never, never, never, never, never>;
206
376
  };
207
377
  readonly 'undim.edges': {
208
- readonly actions: ActionFunction<Readonly<Input & {
378
+ readonly actions: ActionFunction<Readonly<{
379
+ subject: Subject;
380
+ viewId: ViewId;
209
381
  xyflow: XYFLowInstance | null;
210
- initialized: boolean;
382
+ xystore: XYStoreApi | null;
383
+ initialized: {
384
+ xydata: boolean;
385
+ xyflow: boolean;
386
+ };
211
387
  xynodes: RelationshipDetailsTypes.Node[];
212
388
  xyedges: RelationshipDetailsTypes.Edge[];
389
+ bounds: BBox;
213
390
  }>, {
214
391
  type: "undim.edges";
215
392
  }, Events, undefined, never, never, never, never, never>;
216
393
  };
217
394
  readonly 'xyflow.selectionChange': {
218
- readonly actions: ActionFunction<Readonly<Input & {
395
+ readonly actions: ActionFunction<Readonly<{
396
+ subject: Subject;
397
+ viewId: ViewId;
219
398
  xyflow: XYFLowInstance | null;
220
- initialized: boolean;
399
+ xystore: XYStoreApi | null;
400
+ initialized: {
401
+ xydata: boolean;
402
+ xyflow: boolean;
403
+ };
221
404
  xynodes: RelationshipDetailsTypes.Node[];
222
405
  xyedges: RelationshipDetailsTypes.Edge[];
406
+ bounds: BBox;
223
407
  }>, {
224
408
  type: "xyflow.selectionChange";
225
409
  nodes: RelationshipDetailsTypes.Node[];
226
410
  edges: RelationshipDetailsTypes.Edge[];
227
- }, Events, undefined, never, {
228
- type: "xyflow:fitDiagram";
229
- params: {
230
- duration?: number;
231
- bounds?: BBox;
232
- } | undefined;
233
- }, {
234
- type: "enable: navigate.to";
235
- params: unknown;
236
- }, never, EventObject>;
411
+ }, Events, undefined, never, Values<{
412
+ "xyflow:fitDiagram": {
413
+ type: "xyflow:fitDiagram";
414
+ params: {
415
+ duration?: number;
416
+ bounds?: BBox;
417
+ } | undefined;
418
+ };
419
+ "xyflow:updateNodeInternals": {
420
+ type: "xyflow:updateNodeInternals";
421
+ params: unknown;
422
+ };
423
+ updateXYFlow: {
424
+ type: "updateXYFlow";
425
+ params: NonReducibleUnknown;
426
+ };
427
+ updateLayoutData: {
428
+ type: "updateLayoutData";
429
+ params: NonReducibleUnknown;
430
+ };
431
+ }>, Values<{
432
+ isReady: {
433
+ type: "isReady";
434
+ params: unknown;
435
+ };
436
+ "enable: navigate.to": {
437
+ type: "enable: navigate.to";
438
+ params: unknown;
439
+ };
440
+ }>, never, EventObject>;
237
441
  };
238
- readonly 'navigate.to': {
239
- readonly actions: readonly [ ActionFunction<Readonly<Input & {
442
+ readonly 'update.layoutData': {
443
+ readonly actions: readonly ["updateLayoutData", CancelAction<Readonly<{
444
+ subject: Subject;
445
+ viewId: ViewId;
240
446
  xyflow: XYFLowInstance | null;
241
- initialized: boolean;
447
+ xystore: XYStoreApi | null;
448
+ initialized: {
449
+ xydata: boolean;
450
+ xyflow: boolean;
451
+ };
242
452
  xynodes: RelationshipDetailsTypes.Node[];
243
453
  xyedges: RelationshipDetailsTypes.Edge[];
454
+ bounds: BBox;
244
455
  }>, {
245
- type: "navigate.to";
246
- edgeId: EdgeId;
247
- }, Events, undefined, never, never, never, never, never>, ActionFunction<Readonly<Input & {
456
+ type: "update.layoutData";
457
+ data: LayoutResult;
458
+ }, undefined, Events>, {
459
+ readonly type: "xyflow:fitDiagram";
460
+ readonly params: {
461
+ readonly duration: 0;
462
+ };
463
+ }, ActionFunction<Readonly<{
464
+ subject: Subject;
465
+ viewId: ViewId;
248
466
  xyflow: XYFLowInstance | null;
249
- initialized: boolean;
467
+ xystore: XYStoreApi | null;
468
+ initialized: {
469
+ xydata: boolean;
470
+ xyflow: boolean;
471
+ };
250
472
  xynodes: RelationshipDetailsTypes.Node[];
251
473
  xyedges: RelationshipDetailsTypes.Edge[];
474
+ bounds: BBox;
252
475
  }>, {
253
- type: "navigate.to";
254
- edgeId: EdgeId;
476
+ type: "update.layoutData";
477
+ data: LayoutResult;
255
478
  }, Events, undefined, never, never, never, never, never>];
256
479
  };
480
+ readonly 'xyflow.init': {
481
+ readonly actions: "updateXYFlow";
482
+ };
483
+ readonly 'xyflow.applyNodeChanges': {
484
+ readonly actions: ActionFunction<Readonly<{
485
+ subject: Subject;
486
+ viewId: ViewId;
487
+ xyflow: XYFLowInstance | null;
488
+ xystore: XYStoreApi | null;
489
+ initialized: {
490
+ xydata: boolean;
491
+ xyflow: boolean;
492
+ };
493
+ xynodes: RelationshipDetailsTypes.Node[];
494
+ xyedges: RelationshipDetailsTypes.Edge[];
495
+ bounds: BBox;
496
+ }>, {
497
+ type: "xyflow.applyNodeChanges";
498
+ changes: NodeChange<RelationshipDetailsTypes.Node>[];
499
+ }, Events, undefined, never, never, never, never, never>;
500
+ };
501
+ readonly 'xyflow.applyEdgeChanges': {
502
+ readonly actions: ActionFunction<Readonly<{
503
+ subject: Subject;
504
+ viewId: ViewId;
505
+ xyflow: XYFLowInstance | null;
506
+ xystore: XYStoreApi | null;
507
+ initialized: {
508
+ xydata: boolean;
509
+ xyflow: boolean;
510
+ };
511
+ xynodes: RelationshipDetailsTypes.Node[];
512
+ xyedges: RelationshipDetailsTypes.Edge[];
513
+ bounds: BBox;
514
+ }>, {
515
+ type: "xyflow.applyEdgeChanges";
516
+ changes: EdgeChange<RelationshipDetailsTypes.Edge>[];
517
+ }, Events, undefined, never, never, never, never, never>;
518
+ };
519
+ readonly 'xyflow.paneDblClick': {
520
+ readonly actions: "xyflow:fitDiagram";
521
+ };
522
+ readonly 'navigate.to': {
523
+ readonly actions: ActionFunction<Readonly<{
524
+ subject: Subject;
525
+ viewId: ViewId;
526
+ xyflow: XYFLowInstance | null;
527
+ xystore: XYStoreApi | null;
528
+ initialized: {
529
+ xydata: boolean;
530
+ xyflow: boolean;
531
+ };
532
+ xynodes: RelationshipDetailsTypes.Node[];
533
+ xyedges: RelationshipDetailsTypes.Edge[];
534
+ bounds: BBox;
535
+ }>, {
536
+ type: "navigate.to";
537
+ params: {
538
+ edgeId: EdgeId;
539
+ viewId?: ViewId;
540
+ } | {
541
+ source: Fqn;
542
+ target: Fqn;
543
+ viewId?: ViewId;
544
+ };
545
+ }, Events, undefined, never, never, never, never, never>;
546
+ };
257
547
  readonly close: {
258
548
  readonly target: "closed";
259
549
  };
260
550
  };
261
- readonly exit: ActionFunction<Readonly<Input & {
551
+ readonly exit: ActionFunction<Readonly<{
552
+ subject: Subject;
553
+ viewId: ViewId;
262
554
  xyflow: XYFLowInstance | null;
263
- initialized: boolean;
555
+ xystore: XYStoreApi | null;
556
+ initialized: {
557
+ xydata: boolean;
558
+ xyflow: boolean;
559
+ };
264
560
  xynodes: RelationshipDetailsTypes.Node[];
265
561
  xyedges: RelationshipDetailsTypes.Edge[];
562
+ bounds: BBox;
266
563
  }>, Events, Events, undefined, never, never, never, never, never>;
267
564
  };
268
565
  readonly closed: {
@@ -274,9 +571,15 @@ export declare const relationshipDetailsLogic: StateMachine<Readonly<Input & {
274
571
  readonly actions: {
275
572
  readonly type: "xyflow:fitDiagram";
276
573
  readonly params: (data: {
277
- context: Readonly<Input & {
574
+ context: Readonly<{
575
+ subject: Subject;
576
+ viewId: ViewId;
278
577
  xyflow: XYFLowInstance | null;
279
- initialized: boolean;
578
+ xystore: XYStoreApi | null;
579
+ initialized: {
580
+ xydata: boolean;
581
+ xyflow: boolean;
582
+ };
280
583
  xynodes: RelationshipDetailsTypes.Node[];
281
584
  xyedges: {
282
585
  id: string;
@@ -318,6 +621,7 @@ export declare const relationshipDetailsLogic: StateMachine<Readonly<Input & {
318
621
  dimmed?: Base.Dimmed;
319
622
  };
320
623
  }[];
624
+ bounds: BBox;
321
625
  }>;
322
626
  event: {
323
627
  type: "fitDiagram";
@@ -332,55 +636,38 @@ export declare const relationshipDetailsLogic: StateMachine<Readonly<Input & {
332
636
  };
333
637
  };
334
638
  readonly 'xyflow.resized': {
335
- readonly actions: readonly [ CancelAction<Readonly<Input & {
639
+ readonly actions: readonly [ CancelAction<Readonly<{
640
+ subject: Subject;
641
+ viewId: ViewId;
336
642
  xyflow: XYFLowInstance | null;
337
- initialized: boolean;
643
+ xystore: XYStoreApi | null;
644
+ initialized: {
645
+ xydata: boolean;
646
+ xyflow: boolean;
647
+ };
338
648
  xynodes: RelationshipDetailsTypes.Node[];
339
649
  xyedges: RelationshipDetailsTypes.Edge[];
650
+ bounds: BBox;
340
651
  }>, {
341
652
  type: "xyflow.resized";
342
- }, undefined, Events>, ActionFunction<Readonly<Input & {
653
+ }, undefined, Events>, ActionFunction<Readonly<{
654
+ subject: Subject;
655
+ viewId: ViewId;
343
656
  xyflow: XYFLowInstance | null;
344
- initialized: boolean;
657
+ xystore: XYStoreApi | null;
658
+ initialized: {
659
+ xydata: boolean;
660
+ xyflow: boolean;
661
+ };
345
662
  xynodes: RelationshipDetailsTypes.Node[];
346
663
  xyedges: RelationshipDetailsTypes.Edge[];
664
+ bounds: BBox;
347
665
  }>, {
348
666
  type: "xyflow.resized";
349
667
  }, Events, undefined, never, never, never, never, never>];
350
668
  };
351
- readonly 'update.xydata': {
352
- readonly actions: ActionFunction<Readonly<Input & {
353
- xyflow: XYFLowInstance | null;
354
- initialized: boolean;
355
- xynodes: RelationshipDetailsTypes.Node[];
356
- xyedges: RelationshipDetailsTypes.Edge[];
357
- }>, {
358
- type: "update.xydata";
359
- xynodes: RelationshipDetailsTypes.Node[];
360
- xyedges: RelationshipDetailsTypes.Edge[];
361
- }, Events, undefined, never, never, never, never, never>;
362
- };
363
- readonly 'xyflow.applyNodeChanges': {
364
- readonly actions: ActionFunction<Readonly<Input & {
365
- xyflow: XYFLowInstance | null;
366
- initialized: boolean;
367
- xynodes: RelationshipDetailsTypes.Node[];
368
- xyedges: RelationshipDetailsTypes.Edge[];
369
- }>, {
370
- type: "xyflow.applyNodeChanges";
371
- changes: NodeChange<RelationshipDetailsTypes.Node>[];
372
- }, Events, undefined, never, never, never, never, never>;
373
- };
374
- readonly 'xyflow.applyEdgeChanges': {
375
- readonly actions: ActionFunction<Readonly<Input & {
376
- xyflow: XYFLowInstance | null;
377
- initialized: boolean;
378
- xynodes: RelationshipDetailsTypes.Node[];
379
- xyedges: RelationshipDetailsTypes.Edge[];
380
- }>, {
381
- type: "xyflow.applyEdgeChanges";
382
- changes: EdgeChange<RelationshipDetailsTypes.Edge>[];
383
- }, Events, undefined, never, never, never, never, never>;
669
+ readonly 'xyflow.updateNodeInternals': {
670
+ readonly actions: "xyflow:updateNodeInternals";
384
671
  };
385
672
  };
386
673
  }>;