@likec4/diagram 1.1.0 → 1.2.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 (76) hide show
  1. package/dist/KeepAspectRatioContainer.d.ts +1 -1
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.props.d.ts +22 -12
  4. package/dist/StaticLikeC4Diagram.d.ts +1 -1
  5. package/dist/index.d.ts +0 -1
  6. package/dist/index.mjs +2209 -706
  7. package/dist/mantine/EnsureMantine.d.ts +1 -1
  8. package/dist/state/DiagramContext.d.ts +2143 -19
  9. package/dist/state/WhenInitialized.d.ts +1 -1
  10. package/dist/state/diagramStore.d.ts +2152 -19
  11. package/dist/state/useDiagramStore.d.ts +2142 -18
  12. package/dist/style.css +256 -118
  13. package/dist/theme.css.d.ts +1 -0
  14. package/dist/ui/DiagramTitlePanel.css.d.ts +4 -0
  15. package/dist/ui/DiagramTitlePanel.d.ts +1 -0
  16. package/dist/ui/DynamicViewWalkthrough.css.d.ts +3 -0
  17. package/dist/ui/DynamicViewWalkthrough.d.ts +1 -0
  18. package/dist/ui/OptionsPanel.d.ts +1 -3
  19. package/dist/ui/index.d.ts +1 -0
  20. package/dist/ui/options/NodeOptions.d.ts +1 -2
  21. package/dist/xyflow/FitviewOnDiagramChange.d.ts +4 -2
  22. package/dist/xyflow/SelectEdgesOnNodeFocus.d.ts +1 -0
  23. package/dist/xyflow/SyncWithDiagram.d.ts +1 -2
  24. package/dist/xyflow/XYFlow.d.ts +4 -7
  25. package/dist/xyflow/XYFlowBackground.d.ts +5 -4
  26. package/dist/xyflow/XYFlowEvents.d.ts +84 -84
  27. package/dist/xyflow/XYFlowInner.d.ts +11 -0
  28. package/dist/xyflow/diagram-to-xyflow.d.ts +1 -1
  29. package/dist/xyflow/edges/RelationshipEdge.d.ts +14 -14
  30. package/dist/xyflow/edges/edges.css.d.ts +5 -2
  31. package/dist/xyflow/edges/utils.d.ts +2 -0
  32. package/dist/xyflow/hooks/useXYFlow.d.ts +126 -126
  33. package/dist/xyflow/nodes/compound/CompoundNode.css.d.ts +1 -0
  34. package/dist/xyflow/nodes/element/ElementIcon.d.ts +1 -1
  35. package/dist/xyflow/nodes/element/ElementLink.d.ts +1 -1
  36. package/dist/xyflow/nodes/element/ElementNode.d.ts +1 -1
  37. package/dist/xyflow/nodes/element/ElementShapeSvg.d.ts +2 -2
  38. package/dist/xyflow/nodes/element/element.css.d.ts +2 -1
  39. package/dist/xyflow/nodes/shared/NavigateToBtn.d.ts +1 -2
  40. package/dist/xyflow/types.d.ts +18 -18
  41. package/package.json +21 -16
  42. package/src/KeepAspectRatioContainer.tsx +1 -1
  43. package/src/LikeC4Diagram.css.ts +4 -1
  44. package/src/LikeC4Diagram.props.ts +24 -14
  45. package/src/LikeC4Diagram.tsx +18 -9
  46. package/src/StaticLikeC4Diagram.tsx +2 -0
  47. package/src/globals.css.ts +7 -1
  48. package/src/index.ts +0 -3
  49. package/src/state/DiagramContext.tsx +21 -12
  50. package/src/state/diagramStore.ts +275 -98
  51. package/src/theme.css.ts +1 -0
  52. package/src/ui/DiagramTitlePanel.css.ts +33 -0
  53. package/src/ui/DiagramTitlePanel.tsx +138 -0
  54. package/src/ui/DynamicViewWalkthrough.css.ts +46 -0
  55. package/src/ui/DynamicViewWalkthrough.tsx +86 -0
  56. package/src/ui/OptionsPanel.tsx +7 -24
  57. package/src/ui/index.ts +1 -0
  58. package/src/ui/options/NodeOptions.tsx +103 -27
  59. package/src/xyflow/FitviewOnDiagramChange.tsx +89 -69
  60. package/src/xyflow/SelectEdgesOnNodeFocus.tsx +75 -0
  61. package/src/xyflow/SyncWithDiagram.tsx +55 -101
  62. package/src/xyflow/XYFlow.tsx +52 -32
  63. package/src/xyflow/XYFlowBackground.tsx +7 -5
  64. package/src/xyflow/XYFlowEvents.tsx +150 -104
  65. package/src/xyflow/XYFlowInner.tsx +50 -0
  66. package/src/xyflow/diagram-to-xyflow.ts +16 -21
  67. package/src/xyflow/edges/RelationshipEdge.tsx +102 -70
  68. package/src/xyflow/edges/edges.css.ts +128 -53
  69. package/src/xyflow/edges/utils.ts +31 -0
  70. package/src/xyflow/nodes/compound/CompoundNode.css.ts +20 -12
  71. package/src/xyflow/nodes/compound/CompoundNode.tsx +6 -3
  72. package/src/xyflow/nodes/element/ElementLink.tsx +13 -3
  73. package/src/xyflow/nodes/element/ElementNode.tsx +24 -19
  74. package/src/xyflow/nodes/element/element.css.ts +10 -2
  75. package/src/xyflow/nodes/shared/NavigateToBtn.tsx +1 -0
  76. package/src/xyflow/types.ts +7 -8
@@ -13,11 +13,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
13
13
  nodesSelectable: boolean;
14
14
  xyflow: import("..").XYFlowInstance;
15
15
  initialized: boolean;
16
+ xyflowSynced: boolean;
17
+ activeDynamicViewStep: number | null;
16
18
  lastClickedNodeId: string | null;
17
19
  lastClickedEdgeId: string | null;
18
20
  focusedNodeId: string | null;
19
21
  hoveredNodeId: string | null;
20
22
  hoveredEdgeId: string | null;
23
+ dimmed: ReadonlySet<string>;
21
24
  previousViews: import("@likec4/core").DiagramView[];
22
25
  lastOnNavigate: {
23
26
  fromView: import("@likec4/core").ViewID;
@@ -36,15 +39,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
36
39
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
37
40
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
38
41
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
42
+ isDynamicView: () => boolean;
39
43
  updateView: (view: import("@likec4/core").DiagramView) => void;
44
+ focusOnNode: (nodeId: string) => void;
40
45
  setHoveredNode: (nodeId: string | null) => void;
41
46
  setHoveredEdge: (edgeId: string | null) => void;
42
47
  setLastClickedNode: (nodeId: string | null) => void;
43
48
  setLastClickedEdge: (edgeId: string | null) => void;
49
+ resetLastClicked: () => void;
44
50
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
45
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
51
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
46
52
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
47
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
53
+ fitDiagram: (xyStore: {
54
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
55
+ source: string;
56
+ target: string;
57
+ sourceHandle?: string | null;
58
+ targetHandle?: string | null;
59
+ animated?: boolean;
60
+ hidden?: boolean;
61
+ deletable?: boolean;
62
+ selectable?: boolean;
63
+ selected?: boolean;
64
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
65
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
66
+ zIndex?: number;
67
+ ariaLabel?: string;
68
+ interactionWidth?: number;
69
+ label?: import("react").ReactNode;
70
+ labelStyle?: import("react").CSSProperties;
71
+ labelShowBg?: boolean;
72
+ labelBgStyle?: import("react").CSSProperties;
73
+ labelBgPadding?: [number, number];
74
+ labelBgBorderRadius?: number;
75
+ style?: import("react").CSSProperties;
76
+ className?: string;
77
+ updatable?: import("@xyflow/react").EdgeUpdatable;
78
+ focusable?: boolean;
79
+ data: import("..").RelationshipData;
80
+ readonly id: string;
81
+ readonly type: "relationship";
82
+ }>;
83
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
84
+ source: string;
85
+ target: string;
86
+ sourceHandle?: string | null;
87
+ targetHandle?: string | null;
88
+ animated?: boolean;
89
+ hidden?: boolean;
90
+ deletable?: boolean;
91
+ selectable?: boolean;
92
+ selected?: boolean;
93
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
94
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
95
+ zIndex?: number;
96
+ ariaLabel?: string;
97
+ interactionWidth?: number;
98
+ label?: import("react").ReactNode;
99
+ labelStyle?: import("react").CSSProperties;
100
+ labelShowBg?: boolean;
101
+ labelBgStyle?: import("react").CSSProperties;
102
+ labelBgPadding?: [number, number];
103
+ labelBgBorderRadius?: number;
104
+ style?: import("react").CSSProperties;
105
+ className?: string;
106
+ updatable?: import("@xyflow/react").EdgeUpdatable;
107
+ focusable?: boolean;
108
+ data: import("..").RelationshipData;
109
+ readonly id: string;
110
+ readonly type: "relationship";
111
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
112
+ source: string;
113
+ target: string;
114
+ sourceHandle?: string | null;
115
+ targetHandle?: string | null;
116
+ animated?: boolean;
117
+ hidden?: boolean;
118
+ deletable?: boolean;
119
+ selectable?: boolean;
120
+ selected?: boolean;
121
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
122
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
123
+ zIndex?: number;
124
+ ariaLabel?: string;
125
+ interactionWidth?: number;
126
+ label?: import("react").ReactNode;
127
+ labelStyle?: import("react").CSSProperties;
128
+ labelShowBg?: boolean;
129
+ labelBgStyle?: import("react").CSSProperties;
130
+ labelBgPadding?: [number, number];
131
+ labelBgBorderRadius?: number;
132
+ style?: import("react").CSSProperties;
133
+ className?: string;
134
+ updatable?: import("@xyflow/react").EdgeUpdatable;
135
+ focusable?: boolean;
136
+ data: import("..").RelationshipData;
137
+ readonly id: string;
138
+ readonly type: "relationship";
139
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
140
+ source: string;
141
+ target: string;
142
+ sourceHandle?: string | null;
143
+ targetHandle?: string | null;
144
+ animated?: boolean;
145
+ hidden?: boolean;
146
+ deletable?: boolean;
147
+ selectable?: boolean;
148
+ selected?: boolean;
149
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
150
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
151
+ zIndex?: number;
152
+ ariaLabel?: string;
153
+ interactionWidth?: number;
154
+ label?: import("react").ReactNode;
155
+ labelStyle?: import("react").CSSProperties;
156
+ labelShowBg?: boolean;
157
+ labelBgStyle?: import("react").CSSProperties;
158
+ labelBgPadding?: [number, number];
159
+ labelBgBorderRadius?: number;
160
+ style?: import("react").CSSProperties;
161
+ className?: string;
162
+ updatable?: import("@xyflow/react").EdgeUpdatable;
163
+ focusable?: boolean;
164
+ data: import("..").RelationshipData;
165
+ readonly id: string;
166
+ readonly type: "relationship";
167
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
168
+ source: string;
169
+ target: string;
170
+ sourceHandle?: string | null;
171
+ targetHandle?: string | null;
172
+ animated?: boolean;
173
+ hidden?: boolean;
174
+ deletable?: boolean;
175
+ selectable?: boolean;
176
+ selected?: boolean;
177
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
178
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
179
+ zIndex?: number;
180
+ ariaLabel?: string;
181
+ interactionWidth?: number;
182
+ label?: import("react").ReactNode;
183
+ labelStyle?: import("react").CSSProperties;
184
+ labelShowBg?: boolean;
185
+ labelBgStyle?: import("react").CSSProperties;
186
+ labelBgPadding?: [number, number];
187
+ labelBgBorderRadius?: number;
188
+ style?: import("react").CSSProperties;
189
+ className?: string;
190
+ updatable?: import("@xyflow/react").EdgeUpdatable;
191
+ focusable?: boolean;
192
+ data: import("..").RelationshipData;
193
+ readonly id: string;
194
+ readonly type: "relationship";
195
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
196
+ source: string;
197
+ target: string;
198
+ sourceHandle?: string | null;
199
+ targetHandle?: string | null;
200
+ animated?: boolean;
201
+ hidden?: boolean;
202
+ deletable?: boolean;
203
+ selectable?: boolean;
204
+ selected?: boolean;
205
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
206
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
207
+ zIndex?: number;
208
+ ariaLabel?: string;
209
+ interactionWidth?: number;
210
+ label?: import("react").ReactNode;
211
+ labelStyle?: import("react").CSSProperties;
212
+ labelShowBg?: boolean;
213
+ labelBgStyle?: import("react").CSSProperties;
214
+ labelBgPadding?: [number, number];
215
+ labelBgBorderRadius?: number;
216
+ style?: import("react").CSSProperties;
217
+ className?: string;
218
+ updatable?: import("@xyflow/react").EdgeUpdatable;
219
+ focusable?: boolean;
220
+ data: import("..").RelationshipData;
221
+ readonly id: string;
222
+ readonly type: "relationship";
223
+ }>>), replace?: boolean | undefined) => void;
224
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
225
+ source: string;
226
+ target: string;
227
+ sourceHandle?: string | null;
228
+ targetHandle?: string | null;
229
+ animated?: boolean;
230
+ hidden?: boolean;
231
+ deletable?: boolean;
232
+ selectable?: boolean;
233
+ selected?: boolean;
234
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
235
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
236
+ zIndex?: number;
237
+ ariaLabel?: string;
238
+ interactionWidth?: number;
239
+ label?: import("react").ReactNode;
240
+ labelStyle?: import("react").CSSProperties;
241
+ labelShowBg?: boolean;
242
+ labelBgStyle?: import("react").CSSProperties;
243
+ labelBgPadding?: [number, number];
244
+ labelBgBorderRadius?: number;
245
+ style?: import("react").CSSProperties;
246
+ className?: string;
247
+ updatable?: import("@xyflow/react").EdgeUpdatable;
248
+ focusable?: boolean;
249
+ data: import("..").RelationshipData;
250
+ readonly id: string;
251
+ readonly type: "relationship";
252
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
253
+ source: string;
254
+ target: string;
255
+ sourceHandle?: string | null;
256
+ targetHandle?: string | null;
257
+ animated?: boolean;
258
+ hidden?: boolean;
259
+ deletable?: boolean;
260
+ selectable?: boolean;
261
+ selected?: boolean;
262
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
263
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
264
+ zIndex?: number;
265
+ ariaLabel?: string;
266
+ interactionWidth?: number;
267
+ label?: import("react").ReactNode;
268
+ labelStyle?: import("react").CSSProperties;
269
+ labelShowBg?: boolean;
270
+ labelBgStyle?: import("react").CSSProperties;
271
+ labelBgPadding?: [number, number];
272
+ labelBgBorderRadius?: number;
273
+ style?: import("react").CSSProperties;
274
+ className?: string;
275
+ updatable?: import("@xyflow/react").EdgeUpdatable;
276
+ focusable?: boolean;
277
+ data: import("..").RelationshipData;
278
+ readonly id: string;
279
+ readonly type: "relationship";
280
+ }>) => void) => () => void;
281
+ }) => void;
282
+ nextDynamicStep: (increment?: number | undefined) => void;
283
+ stopDynamicView: () => void;
48
284
  }>, "subscribe"> & {
49
285
  subscribe: {
50
286
  (listener: (selectedState: {
@@ -59,11 +295,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
59
295
  nodesSelectable: boolean;
60
296
  xyflow: import("..").XYFlowInstance;
61
297
  initialized: boolean;
298
+ xyflowSynced: boolean;
299
+ activeDynamicViewStep: number | null;
62
300
  lastClickedNodeId: string | null;
63
301
  lastClickedEdgeId: string | null;
64
302
  focusedNodeId: string | null;
65
303
  hoveredNodeId: string | null;
66
304
  hoveredEdgeId: string | null;
305
+ dimmed: ReadonlySet<string>;
67
306
  previousViews: import("@likec4/core").DiagramView[];
68
307
  lastOnNavigate: {
69
308
  fromView: import("@likec4/core").ViewID;
@@ -82,15 +321,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
82
321
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
83
322
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
84
323
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
324
+ isDynamicView: () => boolean;
85
325
  updateView: (view: import("@likec4/core").DiagramView) => void;
326
+ focusOnNode: (nodeId: string) => void;
86
327
  setHoveredNode: (nodeId: string | null) => void;
87
328
  setHoveredEdge: (edgeId: string | null) => void;
88
329
  setLastClickedNode: (nodeId: string | null) => void;
89
330
  setLastClickedEdge: (edgeId: string | null) => void;
331
+ resetLastClicked: () => void;
90
332
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
91
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
333
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
92
334
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
93
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
335
+ fitDiagram: (xyStore: {
336
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
337
+ source: string;
338
+ target: string;
339
+ sourceHandle?: string | null;
340
+ targetHandle?: string | null;
341
+ animated?: boolean;
342
+ hidden?: boolean;
343
+ deletable?: boolean;
344
+ selectable?: boolean;
345
+ selected?: boolean;
346
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
347
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
348
+ zIndex?: number;
349
+ ariaLabel?: string;
350
+ interactionWidth?: number;
351
+ label?: import("react").ReactNode;
352
+ labelStyle?: import("react").CSSProperties;
353
+ labelShowBg?: boolean;
354
+ labelBgStyle?: import("react").CSSProperties;
355
+ labelBgPadding?: [number, number];
356
+ labelBgBorderRadius?: number;
357
+ style?: import("react").CSSProperties;
358
+ className?: string;
359
+ updatable?: import("@xyflow/react").EdgeUpdatable;
360
+ focusable?: boolean;
361
+ data: import("..").RelationshipData;
362
+ readonly id: string;
363
+ readonly type: "relationship";
364
+ }>;
365
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
366
+ source: string;
367
+ target: string;
368
+ sourceHandle?: string | null;
369
+ targetHandle?: string | null;
370
+ animated?: boolean;
371
+ hidden?: boolean;
372
+ deletable?: boolean;
373
+ selectable?: boolean;
374
+ selected?: boolean;
375
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
376
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
377
+ zIndex?: number;
378
+ ariaLabel?: string;
379
+ interactionWidth?: number;
380
+ label?: import("react").ReactNode;
381
+ labelStyle?: import("react").CSSProperties;
382
+ labelShowBg?: boolean;
383
+ labelBgStyle?: import("react").CSSProperties;
384
+ labelBgPadding?: [number, number];
385
+ labelBgBorderRadius?: number;
386
+ style?: import("react").CSSProperties;
387
+ className?: string;
388
+ updatable?: import("@xyflow/react").EdgeUpdatable;
389
+ focusable?: boolean;
390
+ data: import("..").RelationshipData;
391
+ readonly id: string;
392
+ readonly type: "relationship";
393
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
394
+ source: string;
395
+ target: string;
396
+ sourceHandle?: string | null;
397
+ targetHandle?: string | null;
398
+ animated?: boolean;
399
+ hidden?: boolean;
400
+ deletable?: boolean;
401
+ selectable?: boolean;
402
+ selected?: boolean;
403
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
404
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
405
+ zIndex?: number;
406
+ ariaLabel?: string;
407
+ interactionWidth?: number;
408
+ label?: import("react").ReactNode;
409
+ labelStyle?: import("react").CSSProperties;
410
+ labelShowBg?: boolean;
411
+ labelBgStyle?: import("react").CSSProperties;
412
+ labelBgPadding?: [number, number];
413
+ labelBgBorderRadius?: number;
414
+ style?: import("react").CSSProperties;
415
+ className?: string;
416
+ updatable?: import("@xyflow/react").EdgeUpdatable;
417
+ focusable?: boolean;
418
+ data: import("..").RelationshipData;
419
+ readonly id: string;
420
+ readonly type: "relationship";
421
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
422
+ source: string;
423
+ target: string;
424
+ sourceHandle?: string | null;
425
+ targetHandle?: string | null;
426
+ animated?: boolean;
427
+ hidden?: boolean;
428
+ deletable?: boolean;
429
+ selectable?: boolean;
430
+ selected?: boolean;
431
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
432
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
433
+ zIndex?: number;
434
+ ariaLabel?: string;
435
+ interactionWidth?: number;
436
+ label?: import("react").ReactNode;
437
+ labelStyle?: import("react").CSSProperties;
438
+ labelShowBg?: boolean;
439
+ labelBgStyle?: import("react").CSSProperties;
440
+ labelBgPadding?: [number, number];
441
+ labelBgBorderRadius?: number;
442
+ style?: import("react").CSSProperties;
443
+ className?: string;
444
+ updatable?: import("@xyflow/react").EdgeUpdatable;
445
+ focusable?: boolean;
446
+ data: import("..").RelationshipData;
447
+ readonly id: string;
448
+ readonly type: "relationship";
449
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
450
+ source: string;
451
+ target: string;
452
+ sourceHandle?: string | null;
453
+ targetHandle?: string | null;
454
+ animated?: boolean;
455
+ hidden?: boolean;
456
+ deletable?: boolean;
457
+ selectable?: boolean;
458
+ selected?: boolean;
459
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
460
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
461
+ zIndex?: number;
462
+ ariaLabel?: string;
463
+ interactionWidth?: number;
464
+ label?: import("react").ReactNode;
465
+ labelStyle?: import("react").CSSProperties;
466
+ labelShowBg?: boolean;
467
+ labelBgStyle?: import("react").CSSProperties;
468
+ labelBgPadding?: [number, number];
469
+ labelBgBorderRadius?: number;
470
+ style?: import("react").CSSProperties;
471
+ className?: string;
472
+ updatable?: import("@xyflow/react").EdgeUpdatable;
473
+ focusable?: boolean;
474
+ data: import("..").RelationshipData;
475
+ readonly id: string;
476
+ readonly type: "relationship";
477
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
478
+ source: string;
479
+ target: string;
480
+ sourceHandle?: string | null;
481
+ targetHandle?: string | null;
482
+ animated?: boolean;
483
+ hidden?: boolean;
484
+ deletable?: boolean;
485
+ selectable?: boolean;
486
+ selected?: boolean;
487
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
488
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
489
+ zIndex?: number;
490
+ ariaLabel?: string;
491
+ interactionWidth?: number;
492
+ label?: import("react").ReactNode;
493
+ labelStyle?: import("react").CSSProperties;
494
+ labelShowBg?: boolean;
495
+ labelBgStyle?: import("react").CSSProperties;
496
+ labelBgPadding?: [number, number];
497
+ labelBgBorderRadius?: number;
498
+ style?: import("react").CSSProperties;
499
+ className?: string;
500
+ updatable?: import("@xyflow/react").EdgeUpdatable;
501
+ focusable?: boolean;
502
+ data: import("..").RelationshipData;
503
+ readonly id: string;
504
+ readonly type: "relationship";
505
+ }>>), replace?: boolean | undefined) => void;
506
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
507
+ source: string;
508
+ target: string;
509
+ sourceHandle?: string | null;
510
+ targetHandle?: string | null;
511
+ animated?: boolean;
512
+ hidden?: boolean;
513
+ deletable?: boolean;
514
+ selectable?: boolean;
515
+ selected?: boolean;
516
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
517
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
518
+ zIndex?: number;
519
+ ariaLabel?: string;
520
+ interactionWidth?: number;
521
+ label?: import("react").ReactNode;
522
+ labelStyle?: import("react").CSSProperties;
523
+ labelShowBg?: boolean;
524
+ labelBgStyle?: import("react").CSSProperties;
525
+ labelBgPadding?: [number, number];
526
+ labelBgBorderRadius?: number;
527
+ style?: import("react").CSSProperties;
528
+ className?: string;
529
+ updatable?: import("@xyflow/react").EdgeUpdatable;
530
+ focusable?: boolean;
531
+ data: import("..").RelationshipData;
532
+ readonly id: string;
533
+ readonly type: "relationship";
534
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
535
+ source: string;
536
+ target: string;
537
+ sourceHandle?: string | null;
538
+ targetHandle?: string | null;
539
+ animated?: boolean;
540
+ hidden?: boolean;
541
+ deletable?: boolean;
542
+ selectable?: boolean;
543
+ selected?: boolean;
544
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
545
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
546
+ zIndex?: number;
547
+ ariaLabel?: string;
548
+ interactionWidth?: number;
549
+ label?: import("react").ReactNode;
550
+ labelStyle?: import("react").CSSProperties;
551
+ labelShowBg?: boolean;
552
+ labelBgStyle?: import("react").CSSProperties;
553
+ labelBgPadding?: [number, number];
554
+ labelBgBorderRadius?: number;
555
+ style?: import("react").CSSProperties;
556
+ className?: string;
557
+ updatable?: import("@xyflow/react").EdgeUpdatable;
558
+ focusable?: boolean;
559
+ data: import("..").RelationshipData;
560
+ readonly id: string;
561
+ readonly type: "relationship";
562
+ }>) => void) => () => void;
563
+ }) => void;
564
+ nextDynamicStep: (increment?: number | undefined) => void;
565
+ stopDynamicView: () => void;
94
566
  }, previousSelectedState: {
95
567
  view: import("@likec4/core").DiagramView;
96
568
  readonly: boolean;
@@ -103,11 +575,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
103
575
  nodesSelectable: boolean;
104
576
  xyflow: import("..").XYFlowInstance;
105
577
  initialized: boolean;
578
+ xyflowSynced: boolean;
579
+ activeDynamicViewStep: number | null;
106
580
  lastClickedNodeId: string | null;
107
581
  lastClickedEdgeId: string | null;
108
582
  focusedNodeId: string | null;
109
583
  hoveredNodeId: string | null;
110
584
  hoveredEdgeId: string | null;
585
+ dimmed: ReadonlySet<string>;
111
586
  previousViews: import("@likec4/core").DiagramView[];
112
587
  lastOnNavigate: {
113
588
  fromView: import("@likec4/core").ViewID;
@@ -126,15 +601,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
126
601
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
127
602
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
128
603
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
604
+ isDynamicView: () => boolean;
129
605
  updateView: (view: import("@likec4/core").DiagramView) => void;
606
+ focusOnNode: (nodeId: string) => void;
130
607
  setHoveredNode: (nodeId: string | null) => void;
131
608
  setHoveredEdge: (edgeId: string | null) => void;
132
609
  setLastClickedNode: (nodeId: string | null) => void;
133
610
  setLastClickedEdge: (edgeId: string | null) => void;
611
+ resetLastClicked: () => void;
134
612
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
135
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
613
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
136
614
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
137
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
615
+ fitDiagram: (xyStore: {
616
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
617
+ source: string;
618
+ target: string;
619
+ sourceHandle?: string | null;
620
+ targetHandle?: string | null;
621
+ animated?: boolean;
622
+ hidden?: boolean;
623
+ deletable?: boolean;
624
+ selectable?: boolean;
625
+ selected?: boolean;
626
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
627
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
628
+ zIndex?: number;
629
+ ariaLabel?: string;
630
+ interactionWidth?: number;
631
+ label?: import("react").ReactNode;
632
+ labelStyle?: import("react").CSSProperties;
633
+ labelShowBg?: boolean;
634
+ labelBgStyle?: import("react").CSSProperties;
635
+ labelBgPadding?: [number, number];
636
+ labelBgBorderRadius?: number;
637
+ style?: import("react").CSSProperties;
638
+ className?: string;
639
+ updatable?: import("@xyflow/react").EdgeUpdatable;
640
+ focusable?: boolean;
641
+ data: import("..").RelationshipData;
642
+ readonly id: string;
643
+ readonly type: "relationship";
644
+ }>;
645
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
646
+ source: string;
647
+ target: string;
648
+ sourceHandle?: string | null;
649
+ targetHandle?: string | null;
650
+ animated?: boolean;
651
+ hidden?: boolean;
652
+ deletable?: boolean;
653
+ selectable?: boolean;
654
+ selected?: boolean;
655
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
656
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
657
+ zIndex?: number;
658
+ ariaLabel?: string;
659
+ interactionWidth?: number;
660
+ label?: import("react").ReactNode;
661
+ labelStyle?: import("react").CSSProperties;
662
+ labelShowBg?: boolean;
663
+ labelBgStyle?: import("react").CSSProperties;
664
+ labelBgPadding?: [number, number];
665
+ labelBgBorderRadius?: number;
666
+ style?: import("react").CSSProperties;
667
+ className?: string;
668
+ updatable?: import("@xyflow/react").EdgeUpdatable;
669
+ focusable?: boolean;
670
+ data: import("..").RelationshipData;
671
+ readonly id: string;
672
+ readonly type: "relationship";
673
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
674
+ source: string;
675
+ target: string;
676
+ sourceHandle?: string | null;
677
+ targetHandle?: string | null;
678
+ animated?: boolean;
679
+ hidden?: boolean;
680
+ deletable?: boolean;
681
+ selectable?: boolean;
682
+ selected?: boolean;
683
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
684
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
685
+ zIndex?: number;
686
+ ariaLabel?: string;
687
+ interactionWidth?: number;
688
+ label?: import("react").ReactNode;
689
+ labelStyle?: import("react").CSSProperties;
690
+ labelShowBg?: boolean;
691
+ labelBgStyle?: import("react").CSSProperties;
692
+ labelBgPadding?: [number, number];
693
+ labelBgBorderRadius?: number;
694
+ style?: import("react").CSSProperties;
695
+ className?: string;
696
+ updatable?: import("@xyflow/react").EdgeUpdatable;
697
+ focusable?: boolean;
698
+ data: import("..").RelationshipData;
699
+ readonly id: string;
700
+ readonly type: "relationship";
701
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
702
+ source: string;
703
+ target: string;
704
+ sourceHandle?: string | null;
705
+ targetHandle?: string | null;
706
+ animated?: boolean;
707
+ hidden?: boolean;
708
+ deletable?: boolean;
709
+ selectable?: boolean;
710
+ selected?: boolean;
711
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
712
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
713
+ zIndex?: number;
714
+ ariaLabel?: string;
715
+ interactionWidth?: number;
716
+ label?: import("react").ReactNode;
717
+ labelStyle?: import("react").CSSProperties;
718
+ labelShowBg?: boolean;
719
+ labelBgStyle?: import("react").CSSProperties;
720
+ labelBgPadding?: [number, number];
721
+ labelBgBorderRadius?: number;
722
+ style?: import("react").CSSProperties;
723
+ className?: string;
724
+ updatable?: import("@xyflow/react").EdgeUpdatable;
725
+ focusable?: boolean;
726
+ data: import("..").RelationshipData;
727
+ readonly id: string;
728
+ readonly type: "relationship";
729
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
730
+ source: string;
731
+ target: string;
732
+ sourceHandle?: string | null;
733
+ targetHandle?: string | null;
734
+ animated?: boolean;
735
+ hidden?: boolean;
736
+ deletable?: boolean;
737
+ selectable?: boolean;
738
+ selected?: boolean;
739
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
740
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
741
+ zIndex?: number;
742
+ ariaLabel?: string;
743
+ interactionWidth?: number;
744
+ label?: import("react").ReactNode;
745
+ labelStyle?: import("react").CSSProperties;
746
+ labelShowBg?: boolean;
747
+ labelBgStyle?: import("react").CSSProperties;
748
+ labelBgPadding?: [number, number];
749
+ labelBgBorderRadius?: number;
750
+ style?: import("react").CSSProperties;
751
+ className?: string;
752
+ updatable?: import("@xyflow/react").EdgeUpdatable;
753
+ focusable?: boolean;
754
+ data: import("..").RelationshipData;
755
+ readonly id: string;
756
+ readonly type: "relationship";
757
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
758
+ source: string;
759
+ target: string;
760
+ sourceHandle?: string | null;
761
+ targetHandle?: string | null;
762
+ animated?: boolean;
763
+ hidden?: boolean;
764
+ deletable?: boolean;
765
+ selectable?: boolean;
766
+ selected?: boolean;
767
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
768
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
769
+ zIndex?: number;
770
+ ariaLabel?: string;
771
+ interactionWidth?: number;
772
+ label?: import("react").ReactNode;
773
+ labelStyle?: import("react").CSSProperties;
774
+ labelShowBg?: boolean;
775
+ labelBgStyle?: import("react").CSSProperties;
776
+ labelBgPadding?: [number, number];
777
+ labelBgBorderRadius?: number;
778
+ style?: import("react").CSSProperties;
779
+ className?: string;
780
+ updatable?: import("@xyflow/react").EdgeUpdatable;
781
+ focusable?: boolean;
782
+ data: import("..").RelationshipData;
783
+ readonly id: string;
784
+ readonly type: "relationship";
785
+ }>>), replace?: boolean | undefined) => void;
786
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
787
+ source: string;
788
+ target: string;
789
+ sourceHandle?: string | null;
790
+ targetHandle?: string | null;
791
+ animated?: boolean;
792
+ hidden?: boolean;
793
+ deletable?: boolean;
794
+ selectable?: boolean;
795
+ selected?: boolean;
796
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
797
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
798
+ zIndex?: number;
799
+ ariaLabel?: string;
800
+ interactionWidth?: number;
801
+ label?: import("react").ReactNode;
802
+ labelStyle?: import("react").CSSProperties;
803
+ labelShowBg?: boolean;
804
+ labelBgStyle?: import("react").CSSProperties;
805
+ labelBgPadding?: [number, number];
806
+ labelBgBorderRadius?: number;
807
+ style?: import("react").CSSProperties;
808
+ className?: string;
809
+ updatable?: import("@xyflow/react").EdgeUpdatable;
810
+ focusable?: boolean;
811
+ data: import("..").RelationshipData;
812
+ readonly id: string;
813
+ readonly type: "relationship";
814
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
815
+ source: string;
816
+ target: string;
817
+ sourceHandle?: string | null;
818
+ targetHandle?: string | null;
819
+ animated?: boolean;
820
+ hidden?: boolean;
821
+ deletable?: boolean;
822
+ selectable?: boolean;
823
+ selected?: boolean;
824
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
825
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
826
+ zIndex?: number;
827
+ ariaLabel?: string;
828
+ interactionWidth?: number;
829
+ label?: import("react").ReactNode;
830
+ labelStyle?: import("react").CSSProperties;
831
+ labelShowBg?: boolean;
832
+ labelBgStyle?: import("react").CSSProperties;
833
+ labelBgPadding?: [number, number];
834
+ labelBgBorderRadius?: number;
835
+ style?: import("react").CSSProperties;
836
+ className?: string;
837
+ updatable?: import("@xyflow/react").EdgeUpdatable;
838
+ focusable?: boolean;
839
+ data: import("..").RelationshipData;
840
+ readonly id: string;
841
+ readonly type: "relationship";
842
+ }>) => void) => () => void;
843
+ }) => void;
844
+ nextDynamicStep: (increment?: number | undefined) => void;
845
+ stopDynamicView: () => void;
138
846
  }) => void): () => void;
139
847
  <U>(selector: (state: {
140
848
  view: import("@likec4/core").DiagramView;
@@ -148,11 +856,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
148
856
  nodesSelectable: boolean;
149
857
  xyflow: import("..").XYFlowInstance;
150
858
  initialized: boolean;
859
+ xyflowSynced: boolean;
860
+ activeDynamicViewStep: number | null;
151
861
  lastClickedNodeId: string | null;
152
862
  lastClickedEdgeId: string | null;
153
863
  focusedNodeId: string | null;
154
864
  hoveredNodeId: string | null;
155
865
  hoveredEdgeId: string | null;
866
+ dimmed: ReadonlySet<string>;
156
867
  previousViews: import("@likec4/core").DiagramView[];
157
868
  lastOnNavigate: {
158
869
  fromView: import("@likec4/core").ViewID;
@@ -171,15 +882,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
171
882
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
172
883
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
173
884
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
885
+ isDynamicView: () => boolean;
174
886
  updateView: (view: import("@likec4/core").DiagramView) => void;
887
+ focusOnNode: (nodeId: string) => void;
175
888
  setHoveredNode: (nodeId: string | null) => void;
176
889
  setHoveredEdge: (edgeId: string | null) => void;
177
890
  setLastClickedNode: (nodeId: string | null) => void;
178
891
  setLastClickedEdge: (edgeId: string | null) => void;
892
+ resetLastClicked: () => void;
179
893
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
180
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
894
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
181
895
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
182
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
896
+ fitDiagram: (xyStore: {
897
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
898
+ source: string;
899
+ target: string;
900
+ sourceHandle?: string | null;
901
+ targetHandle?: string | null;
902
+ animated?: boolean;
903
+ hidden?: boolean;
904
+ deletable?: boolean;
905
+ selectable?: boolean;
906
+ selected?: boolean;
907
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
908
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
909
+ zIndex?: number;
910
+ ariaLabel?: string;
911
+ interactionWidth?: number;
912
+ label?: import("react").ReactNode;
913
+ labelStyle?: import("react").CSSProperties;
914
+ labelShowBg?: boolean;
915
+ labelBgStyle?: import("react").CSSProperties;
916
+ labelBgPadding?: [number, number];
917
+ labelBgBorderRadius?: number;
918
+ style?: import("react").CSSProperties;
919
+ className?: string;
920
+ updatable?: import("@xyflow/react").EdgeUpdatable;
921
+ focusable?: boolean;
922
+ data: import("..").RelationshipData;
923
+ readonly id: string;
924
+ readonly type: "relationship";
925
+ }>;
926
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
927
+ source: string;
928
+ target: string;
929
+ sourceHandle?: string | null;
930
+ targetHandle?: string | null;
931
+ animated?: boolean;
932
+ hidden?: boolean;
933
+ deletable?: boolean;
934
+ selectable?: boolean;
935
+ selected?: boolean;
936
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
937
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
938
+ zIndex?: number;
939
+ ariaLabel?: string;
940
+ interactionWidth?: number;
941
+ label?: import("react").ReactNode;
942
+ labelStyle?: import("react").CSSProperties;
943
+ labelShowBg?: boolean;
944
+ labelBgStyle?: import("react").CSSProperties;
945
+ labelBgPadding?: [number, number];
946
+ labelBgBorderRadius?: number;
947
+ style?: import("react").CSSProperties;
948
+ className?: string;
949
+ updatable?: import("@xyflow/react").EdgeUpdatable;
950
+ focusable?: boolean;
951
+ data: import("..").RelationshipData;
952
+ readonly id: string;
953
+ readonly type: "relationship";
954
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
955
+ source: string;
956
+ target: string;
957
+ sourceHandle?: string | null;
958
+ targetHandle?: string | null;
959
+ animated?: boolean;
960
+ hidden?: boolean;
961
+ deletable?: boolean;
962
+ selectable?: boolean;
963
+ selected?: boolean;
964
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
965
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
966
+ zIndex?: number;
967
+ ariaLabel?: string;
968
+ interactionWidth?: number;
969
+ label?: import("react").ReactNode;
970
+ labelStyle?: import("react").CSSProperties;
971
+ labelShowBg?: boolean;
972
+ labelBgStyle?: import("react").CSSProperties;
973
+ labelBgPadding?: [number, number];
974
+ labelBgBorderRadius?: number;
975
+ style?: import("react").CSSProperties;
976
+ className?: string;
977
+ updatable?: import("@xyflow/react").EdgeUpdatable;
978
+ focusable?: boolean;
979
+ data: import("..").RelationshipData;
980
+ readonly id: string;
981
+ readonly type: "relationship";
982
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
983
+ source: string;
984
+ target: string;
985
+ sourceHandle?: string | null;
986
+ targetHandle?: string | null;
987
+ animated?: boolean;
988
+ hidden?: boolean;
989
+ deletable?: boolean;
990
+ selectable?: boolean;
991
+ selected?: boolean;
992
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
993
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
994
+ zIndex?: number;
995
+ ariaLabel?: string;
996
+ interactionWidth?: number;
997
+ label?: import("react").ReactNode;
998
+ labelStyle?: import("react").CSSProperties;
999
+ labelShowBg?: boolean;
1000
+ labelBgStyle?: import("react").CSSProperties;
1001
+ labelBgPadding?: [number, number];
1002
+ labelBgBorderRadius?: number;
1003
+ style?: import("react").CSSProperties;
1004
+ className?: string;
1005
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1006
+ focusable?: boolean;
1007
+ data: import("..").RelationshipData;
1008
+ readonly id: string;
1009
+ readonly type: "relationship";
1010
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1011
+ source: string;
1012
+ target: string;
1013
+ sourceHandle?: string | null;
1014
+ targetHandle?: string | null;
1015
+ animated?: boolean;
1016
+ hidden?: boolean;
1017
+ deletable?: boolean;
1018
+ selectable?: boolean;
1019
+ selected?: boolean;
1020
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1021
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1022
+ zIndex?: number;
1023
+ ariaLabel?: string;
1024
+ interactionWidth?: number;
1025
+ label?: import("react").ReactNode;
1026
+ labelStyle?: import("react").CSSProperties;
1027
+ labelShowBg?: boolean;
1028
+ labelBgStyle?: import("react").CSSProperties;
1029
+ labelBgPadding?: [number, number];
1030
+ labelBgBorderRadius?: number;
1031
+ style?: import("react").CSSProperties;
1032
+ className?: string;
1033
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1034
+ focusable?: boolean;
1035
+ data: import("..").RelationshipData;
1036
+ readonly id: string;
1037
+ readonly type: "relationship";
1038
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1039
+ source: string;
1040
+ target: string;
1041
+ sourceHandle?: string | null;
1042
+ targetHandle?: string | null;
1043
+ animated?: boolean;
1044
+ hidden?: boolean;
1045
+ deletable?: boolean;
1046
+ selectable?: boolean;
1047
+ selected?: boolean;
1048
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1049
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1050
+ zIndex?: number;
1051
+ ariaLabel?: string;
1052
+ interactionWidth?: number;
1053
+ label?: import("react").ReactNode;
1054
+ labelStyle?: import("react").CSSProperties;
1055
+ labelShowBg?: boolean;
1056
+ labelBgStyle?: import("react").CSSProperties;
1057
+ labelBgPadding?: [number, number];
1058
+ labelBgBorderRadius?: number;
1059
+ style?: import("react").CSSProperties;
1060
+ className?: string;
1061
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1062
+ focusable?: boolean;
1063
+ data: import("..").RelationshipData;
1064
+ readonly id: string;
1065
+ readonly type: "relationship";
1066
+ }>>), replace?: boolean | undefined) => void;
1067
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1068
+ source: string;
1069
+ target: string;
1070
+ sourceHandle?: string | null;
1071
+ targetHandle?: string | null;
1072
+ animated?: boolean;
1073
+ hidden?: boolean;
1074
+ deletable?: boolean;
1075
+ selectable?: boolean;
1076
+ selected?: boolean;
1077
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1078
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1079
+ zIndex?: number;
1080
+ ariaLabel?: string;
1081
+ interactionWidth?: number;
1082
+ label?: import("react").ReactNode;
1083
+ labelStyle?: import("react").CSSProperties;
1084
+ labelShowBg?: boolean;
1085
+ labelBgStyle?: import("react").CSSProperties;
1086
+ labelBgPadding?: [number, number];
1087
+ labelBgBorderRadius?: number;
1088
+ style?: import("react").CSSProperties;
1089
+ className?: string;
1090
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1091
+ focusable?: boolean;
1092
+ data: import("..").RelationshipData;
1093
+ readonly id: string;
1094
+ readonly type: "relationship";
1095
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1096
+ source: string;
1097
+ target: string;
1098
+ sourceHandle?: string | null;
1099
+ targetHandle?: string | null;
1100
+ animated?: boolean;
1101
+ hidden?: boolean;
1102
+ deletable?: boolean;
1103
+ selectable?: boolean;
1104
+ selected?: boolean;
1105
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1106
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1107
+ zIndex?: number;
1108
+ ariaLabel?: string;
1109
+ interactionWidth?: number;
1110
+ label?: import("react").ReactNode;
1111
+ labelStyle?: import("react").CSSProperties;
1112
+ labelShowBg?: boolean;
1113
+ labelBgStyle?: import("react").CSSProperties;
1114
+ labelBgPadding?: [number, number];
1115
+ labelBgBorderRadius?: number;
1116
+ style?: import("react").CSSProperties;
1117
+ className?: string;
1118
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1119
+ focusable?: boolean;
1120
+ data: import("..").RelationshipData;
1121
+ readonly id: string;
1122
+ readonly type: "relationship";
1123
+ }>) => void) => () => void;
1124
+ }) => void;
1125
+ nextDynamicStep: (increment?: number | undefined) => void;
1126
+ stopDynamicView: () => void;
183
1127
  }) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
184
1128
  equalityFn?: (a: U, b: U) => boolean;
185
1129
  fireImmediately?: boolean;
@@ -200,11 +1144,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
200
1144
  nodesSelectable: boolean;
201
1145
  xyflow: import("..").XYFlowInstance;
202
1146
  initialized: boolean;
1147
+ xyflowSynced: boolean;
1148
+ activeDynamicViewStep: number | null;
203
1149
  lastClickedNodeId: string | null;
204
1150
  lastClickedEdgeId: string | null;
205
1151
  focusedNodeId: string | null;
206
1152
  hoveredNodeId: string | null;
207
1153
  hoveredEdgeId: string | null;
1154
+ dimmed: ReadonlySet<string>;
208
1155
  previousViews: import("@likec4/core").DiagramView[];
209
1156
  lastOnNavigate: {
210
1157
  fromView: import("@likec4/core").ViewID;
@@ -223,15 +1170,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
223
1170
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
224
1171
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
225
1172
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
1173
+ isDynamicView: () => boolean;
226
1174
  updateView: (view: import("@likec4/core").DiagramView) => void;
1175
+ focusOnNode: (nodeId: string) => void;
227
1176
  setHoveredNode: (nodeId: string | null) => void;
228
1177
  setHoveredEdge: (edgeId: string | null) => void;
229
1178
  setLastClickedNode: (nodeId: string | null) => void;
230
1179
  setLastClickedEdge: (edgeId: string | null) => void;
1180
+ resetLastClicked: () => void;
231
1181
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
232
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
1182
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
233
1183
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
234
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
1184
+ fitDiagram: (xyStore: {
1185
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1186
+ source: string;
1187
+ target: string;
1188
+ sourceHandle?: string | null;
1189
+ targetHandle?: string | null;
1190
+ animated?: boolean;
1191
+ hidden?: boolean;
1192
+ deletable?: boolean;
1193
+ selectable?: boolean;
1194
+ selected?: boolean;
1195
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1196
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1197
+ zIndex?: number;
1198
+ ariaLabel?: string;
1199
+ interactionWidth?: number;
1200
+ label?: import("react").ReactNode;
1201
+ labelStyle?: import("react").CSSProperties;
1202
+ labelShowBg?: boolean;
1203
+ labelBgStyle?: import("react").CSSProperties;
1204
+ labelBgPadding?: [number, number];
1205
+ labelBgBorderRadius?: number;
1206
+ style?: import("react").CSSProperties;
1207
+ className?: string;
1208
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1209
+ focusable?: boolean;
1210
+ data: import("..").RelationshipData;
1211
+ readonly id: string;
1212
+ readonly type: "relationship";
1213
+ }>;
1214
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1215
+ source: string;
1216
+ target: string;
1217
+ sourceHandle?: string | null;
1218
+ targetHandle?: string | null;
1219
+ animated?: boolean;
1220
+ hidden?: boolean;
1221
+ deletable?: boolean;
1222
+ selectable?: boolean;
1223
+ selected?: boolean;
1224
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1225
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1226
+ zIndex?: number;
1227
+ ariaLabel?: string;
1228
+ interactionWidth?: number;
1229
+ label?: import("react").ReactNode;
1230
+ labelStyle?: import("react").CSSProperties;
1231
+ labelShowBg?: boolean;
1232
+ labelBgStyle?: import("react").CSSProperties;
1233
+ labelBgPadding?: [number, number];
1234
+ labelBgBorderRadius?: number;
1235
+ style?: import("react").CSSProperties;
1236
+ className?: string;
1237
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1238
+ focusable?: boolean;
1239
+ data: import("..").RelationshipData;
1240
+ readonly id: string;
1241
+ readonly type: "relationship";
1242
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1243
+ source: string;
1244
+ target: string;
1245
+ sourceHandle?: string | null;
1246
+ targetHandle?: string | null;
1247
+ animated?: boolean;
1248
+ hidden?: boolean;
1249
+ deletable?: boolean;
1250
+ selectable?: boolean;
1251
+ selected?: boolean;
1252
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1253
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1254
+ zIndex?: number;
1255
+ ariaLabel?: string;
1256
+ interactionWidth?: number;
1257
+ label?: import("react").ReactNode;
1258
+ labelStyle?: import("react").CSSProperties;
1259
+ labelShowBg?: boolean;
1260
+ labelBgStyle?: import("react").CSSProperties;
1261
+ labelBgPadding?: [number, number];
1262
+ labelBgBorderRadius?: number;
1263
+ style?: import("react").CSSProperties;
1264
+ className?: string;
1265
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1266
+ focusable?: boolean;
1267
+ data: import("..").RelationshipData;
1268
+ readonly id: string;
1269
+ readonly type: "relationship";
1270
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1271
+ source: string;
1272
+ target: string;
1273
+ sourceHandle?: string | null;
1274
+ targetHandle?: string | null;
1275
+ animated?: boolean;
1276
+ hidden?: boolean;
1277
+ deletable?: boolean;
1278
+ selectable?: boolean;
1279
+ selected?: boolean;
1280
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1281
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1282
+ zIndex?: number;
1283
+ ariaLabel?: string;
1284
+ interactionWidth?: number;
1285
+ label?: import("react").ReactNode;
1286
+ labelStyle?: import("react").CSSProperties;
1287
+ labelShowBg?: boolean;
1288
+ labelBgStyle?: import("react").CSSProperties;
1289
+ labelBgPadding?: [number, number];
1290
+ labelBgBorderRadius?: number;
1291
+ style?: import("react").CSSProperties;
1292
+ className?: string;
1293
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1294
+ focusable?: boolean;
1295
+ data: import("..").RelationshipData;
1296
+ readonly id: string;
1297
+ readonly type: "relationship";
1298
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1299
+ source: string;
1300
+ target: string;
1301
+ sourceHandle?: string | null;
1302
+ targetHandle?: string | null;
1303
+ animated?: boolean;
1304
+ hidden?: boolean;
1305
+ deletable?: boolean;
1306
+ selectable?: boolean;
1307
+ selected?: boolean;
1308
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1309
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1310
+ zIndex?: number;
1311
+ ariaLabel?: string;
1312
+ interactionWidth?: number;
1313
+ label?: import("react").ReactNode;
1314
+ labelStyle?: import("react").CSSProperties;
1315
+ labelShowBg?: boolean;
1316
+ labelBgStyle?: import("react").CSSProperties;
1317
+ labelBgPadding?: [number, number];
1318
+ labelBgBorderRadius?: number;
1319
+ style?: import("react").CSSProperties;
1320
+ className?: string;
1321
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1322
+ focusable?: boolean;
1323
+ data: import("..").RelationshipData;
1324
+ readonly id: string;
1325
+ readonly type: "relationship";
1326
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1327
+ source: string;
1328
+ target: string;
1329
+ sourceHandle?: string | null;
1330
+ targetHandle?: string | null;
1331
+ animated?: boolean;
1332
+ hidden?: boolean;
1333
+ deletable?: boolean;
1334
+ selectable?: boolean;
1335
+ selected?: boolean;
1336
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1337
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1338
+ zIndex?: number;
1339
+ ariaLabel?: string;
1340
+ interactionWidth?: number;
1341
+ label?: import("react").ReactNode;
1342
+ labelStyle?: import("react").CSSProperties;
1343
+ labelShowBg?: boolean;
1344
+ labelBgStyle?: import("react").CSSProperties;
1345
+ labelBgPadding?: [number, number];
1346
+ labelBgBorderRadius?: number;
1347
+ style?: import("react").CSSProperties;
1348
+ className?: string;
1349
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1350
+ focusable?: boolean;
1351
+ data: import("..").RelationshipData;
1352
+ readonly id: string;
1353
+ readonly type: "relationship";
1354
+ }>>), replace?: boolean | undefined) => void;
1355
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1356
+ source: string;
1357
+ target: string;
1358
+ sourceHandle?: string | null;
1359
+ targetHandle?: string | null;
1360
+ animated?: boolean;
1361
+ hidden?: boolean;
1362
+ deletable?: boolean;
1363
+ selectable?: boolean;
1364
+ selected?: boolean;
1365
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1366
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1367
+ zIndex?: number;
1368
+ ariaLabel?: string;
1369
+ interactionWidth?: number;
1370
+ label?: import("react").ReactNode;
1371
+ labelStyle?: import("react").CSSProperties;
1372
+ labelShowBg?: boolean;
1373
+ labelBgStyle?: import("react").CSSProperties;
1374
+ labelBgPadding?: [number, number];
1375
+ labelBgBorderRadius?: number;
1376
+ style?: import("react").CSSProperties;
1377
+ className?: string;
1378
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1379
+ focusable?: boolean;
1380
+ data: import("..").RelationshipData;
1381
+ readonly id: string;
1382
+ readonly type: "relationship";
1383
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1384
+ source: string;
1385
+ target: string;
1386
+ sourceHandle?: string | null;
1387
+ targetHandle?: string | null;
1388
+ animated?: boolean;
1389
+ hidden?: boolean;
1390
+ deletable?: boolean;
1391
+ selectable?: boolean;
1392
+ selected?: boolean;
1393
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1394
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1395
+ zIndex?: number;
1396
+ ariaLabel?: string;
1397
+ interactionWidth?: number;
1398
+ label?: import("react").ReactNode;
1399
+ labelStyle?: import("react").CSSProperties;
1400
+ labelShowBg?: boolean;
1401
+ labelBgStyle?: import("react").CSSProperties;
1402
+ labelBgPadding?: [number, number];
1403
+ labelBgBorderRadius?: number;
1404
+ style?: import("react").CSSProperties;
1405
+ className?: string;
1406
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1407
+ focusable?: boolean;
1408
+ data: import("..").RelationshipData;
1409
+ readonly id: string;
1410
+ readonly type: "relationship";
1411
+ }>) => void) => () => void;
1412
+ }) => void;
1413
+ nextDynamicStep: (increment?: number | undefined) => void;
1414
+ stopDynamicView: () => void;
235
1415
  } | Partial<{
236
1416
  view: import("@likec4/core").DiagramView;
237
1417
  readonly: boolean;
@@ -244,11 +1424,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
244
1424
  nodesSelectable: boolean;
245
1425
  xyflow: import("..").XYFlowInstance;
246
1426
  initialized: boolean;
1427
+ xyflowSynced: boolean;
1428
+ activeDynamicViewStep: number | null;
247
1429
  lastClickedNodeId: string | null;
248
1430
  lastClickedEdgeId: string | null;
249
1431
  focusedNodeId: string | null;
250
1432
  hoveredNodeId: string | null;
251
1433
  hoveredEdgeId: string | null;
1434
+ dimmed: ReadonlySet<string>;
252
1435
  previousViews: import("@likec4/core").DiagramView[];
253
1436
  lastOnNavigate: {
254
1437
  fromView: import("@likec4/core").ViewID;
@@ -267,15 +1450,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
267
1450
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
268
1451
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
269
1452
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
1453
+ isDynamicView: () => boolean;
270
1454
  updateView: (view: import("@likec4/core").DiagramView) => void;
1455
+ focusOnNode: (nodeId: string) => void;
271
1456
  setHoveredNode: (nodeId: string | null) => void;
272
1457
  setHoveredEdge: (edgeId: string | null) => void;
273
1458
  setLastClickedNode: (nodeId: string | null) => void;
274
1459
  setLastClickedEdge: (edgeId: string | null) => void;
1460
+ resetLastClicked: () => void;
275
1461
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
276
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
1462
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
277
1463
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
278
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
1464
+ fitDiagram: (xyStore: {
1465
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1466
+ source: string;
1467
+ target: string;
1468
+ sourceHandle?: string | null;
1469
+ targetHandle?: string | null;
1470
+ animated?: boolean;
1471
+ hidden?: boolean;
1472
+ deletable?: boolean;
1473
+ selectable?: boolean;
1474
+ selected?: boolean;
1475
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1476
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1477
+ zIndex?: number;
1478
+ ariaLabel?: string;
1479
+ interactionWidth?: number;
1480
+ label?: import("react").ReactNode;
1481
+ labelStyle?: import("react").CSSProperties;
1482
+ labelShowBg?: boolean;
1483
+ labelBgStyle?: import("react").CSSProperties;
1484
+ labelBgPadding?: [number, number];
1485
+ labelBgBorderRadius?: number;
1486
+ style?: import("react").CSSProperties;
1487
+ className?: string;
1488
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1489
+ focusable?: boolean;
1490
+ data: import("..").RelationshipData;
1491
+ readonly id: string;
1492
+ readonly type: "relationship";
1493
+ }>;
1494
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1495
+ source: string;
1496
+ target: string;
1497
+ sourceHandle?: string | null;
1498
+ targetHandle?: string | null;
1499
+ animated?: boolean;
1500
+ hidden?: boolean;
1501
+ deletable?: boolean;
1502
+ selectable?: boolean;
1503
+ selected?: boolean;
1504
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1505
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1506
+ zIndex?: number;
1507
+ ariaLabel?: string;
1508
+ interactionWidth?: number;
1509
+ label?: import("react").ReactNode;
1510
+ labelStyle?: import("react").CSSProperties;
1511
+ labelShowBg?: boolean;
1512
+ labelBgStyle?: import("react").CSSProperties;
1513
+ labelBgPadding?: [number, number];
1514
+ labelBgBorderRadius?: number;
1515
+ style?: import("react").CSSProperties;
1516
+ className?: string;
1517
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1518
+ focusable?: boolean;
1519
+ data: import("..").RelationshipData;
1520
+ readonly id: string;
1521
+ readonly type: "relationship";
1522
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1523
+ source: string;
1524
+ target: string;
1525
+ sourceHandle?: string | null;
1526
+ targetHandle?: string | null;
1527
+ animated?: boolean;
1528
+ hidden?: boolean;
1529
+ deletable?: boolean;
1530
+ selectable?: boolean;
1531
+ selected?: boolean;
1532
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1533
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1534
+ zIndex?: number;
1535
+ ariaLabel?: string;
1536
+ interactionWidth?: number;
1537
+ label?: import("react").ReactNode;
1538
+ labelStyle?: import("react").CSSProperties;
1539
+ labelShowBg?: boolean;
1540
+ labelBgStyle?: import("react").CSSProperties;
1541
+ labelBgPadding?: [number, number];
1542
+ labelBgBorderRadius?: number;
1543
+ style?: import("react").CSSProperties;
1544
+ className?: string;
1545
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1546
+ focusable?: boolean;
1547
+ data: import("..").RelationshipData;
1548
+ readonly id: string;
1549
+ readonly type: "relationship";
1550
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1551
+ source: string;
1552
+ target: string;
1553
+ sourceHandle?: string | null;
1554
+ targetHandle?: string | null;
1555
+ animated?: boolean;
1556
+ hidden?: boolean;
1557
+ deletable?: boolean;
1558
+ selectable?: boolean;
1559
+ selected?: boolean;
1560
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1561
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1562
+ zIndex?: number;
1563
+ ariaLabel?: string;
1564
+ interactionWidth?: number;
1565
+ label?: import("react").ReactNode;
1566
+ labelStyle?: import("react").CSSProperties;
1567
+ labelShowBg?: boolean;
1568
+ labelBgStyle?: import("react").CSSProperties;
1569
+ labelBgPadding?: [number, number];
1570
+ labelBgBorderRadius?: number;
1571
+ style?: import("react").CSSProperties;
1572
+ className?: string;
1573
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1574
+ focusable?: boolean;
1575
+ data: import("..").RelationshipData;
1576
+ readonly id: string;
1577
+ readonly type: "relationship";
1578
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1579
+ source: string;
1580
+ target: string;
1581
+ sourceHandle?: string | null;
1582
+ targetHandle?: string | null;
1583
+ animated?: boolean;
1584
+ hidden?: boolean;
1585
+ deletable?: boolean;
1586
+ selectable?: boolean;
1587
+ selected?: boolean;
1588
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1589
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1590
+ zIndex?: number;
1591
+ ariaLabel?: string;
1592
+ interactionWidth?: number;
1593
+ label?: import("react").ReactNode;
1594
+ labelStyle?: import("react").CSSProperties;
1595
+ labelShowBg?: boolean;
1596
+ labelBgStyle?: import("react").CSSProperties;
1597
+ labelBgPadding?: [number, number];
1598
+ labelBgBorderRadius?: number;
1599
+ style?: import("react").CSSProperties;
1600
+ className?: string;
1601
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1602
+ focusable?: boolean;
1603
+ data: import("..").RelationshipData;
1604
+ readonly id: string;
1605
+ readonly type: "relationship";
1606
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1607
+ source: string;
1608
+ target: string;
1609
+ sourceHandle?: string | null;
1610
+ targetHandle?: string | null;
1611
+ animated?: boolean;
1612
+ hidden?: boolean;
1613
+ deletable?: boolean;
1614
+ selectable?: boolean;
1615
+ selected?: boolean;
1616
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1617
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1618
+ zIndex?: number;
1619
+ ariaLabel?: string;
1620
+ interactionWidth?: number;
1621
+ label?: import("react").ReactNode;
1622
+ labelStyle?: import("react").CSSProperties;
1623
+ labelShowBg?: boolean;
1624
+ labelBgStyle?: import("react").CSSProperties;
1625
+ labelBgPadding?: [number, number];
1626
+ labelBgBorderRadius?: number;
1627
+ style?: import("react").CSSProperties;
1628
+ className?: string;
1629
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1630
+ focusable?: boolean;
1631
+ data: import("..").RelationshipData;
1632
+ readonly id: string;
1633
+ readonly type: "relationship";
1634
+ }>>), replace?: boolean | undefined) => void;
1635
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1636
+ source: string;
1637
+ target: string;
1638
+ sourceHandle?: string | null;
1639
+ targetHandle?: string | null;
1640
+ animated?: boolean;
1641
+ hidden?: boolean;
1642
+ deletable?: boolean;
1643
+ selectable?: boolean;
1644
+ selected?: boolean;
1645
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1646
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1647
+ zIndex?: number;
1648
+ ariaLabel?: string;
1649
+ interactionWidth?: number;
1650
+ label?: import("react").ReactNode;
1651
+ labelStyle?: import("react").CSSProperties;
1652
+ labelShowBg?: boolean;
1653
+ labelBgStyle?: import("react").CSSProperties;
1654
+ labelBgPadding?: [number, number];
1655
+ labelBgBorderRadius?: number;
1656
+ style?: import("react").CSSProperties;
1657
+ className?: string;
1658
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1659
+ focusable?: boolean;
1660
+ data: import("..").RelationshipData;
1661
+ readonly id: string;
1662
+ readonly type: "relationship";
1663
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1664
+ source: string;
1665
+ target: string;
1666
+ sourceHandle?: string | null;
1667
+ targetHandle?: string | null;
1668
+ animated?: boolean;
1669
+ hidden?: boolean;
1670
+ deletable?: boolean;
1671
+ selectable?: boolean;
1672
+ selected?: boolean;
1673
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1674
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1675
+ zIndex?: number;
1676
+ ariaLabel?: string;
1677
+ interactionWidth?: number;
1678
+ label?: import("react").ReactNode;
1679
+ labelStyle?: import("react").CSSProperties;
1680
+ labelShowBg?: boolean;
1681
+ labelBgStyle?: import("react").CSSProperties;
1682
+ labelBgPadding?: [number, number];
1683
+ labelBgBorderRadius?: number;
1684
+ style?: import("react").CSSProperties;
1685
+ className?: string;
1686
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1687
+ focusable?: boolean;
1688
+ data: import("..").RelationshipData;
1689
+ readonly id: string;
1690
+ readonly type: "relationship";
1691
+ }>) => void) => () => void;
1692
+ }) => void;
1693
+ nextDynamicStep: (increment?: number | undefined) => void;
1694
+ stopDynamicView: () => void;
279
1695
  }> | ((state: {
280
1696
  view: import("@likec4/core").DiagramView;
281
1697
  readonly: boolean;
@@ -288,11 +1704,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
288
1704
  nodesSelectable: boolean;
289
1705
  xyflow: import("..").XYFlowInstance;
290
1706
  initialized: boolean;
1707
+ xyflowSynced: boolean;
1708
+ activeDynamicViewStep: number | null;
291
1709
  lastClickedNodeId: string | null;
292
1710
  lastClickedEdgeId: string | null;
293
1711
  focusedNodeId: string | null;
294
1712
  hoveredNodeId: string | null;
295
1713
  hoveredEdgeId: string | null;
1714
+ dimmed: ReadonlySet<string>;
296
1715
  previousViews: import("@likec4/core").DiagramView[];
297
1716
  lastOnNavigate: {
298
1717
  fromView: import("@likec4/core").ViewID;
@@ -311,15 +1730,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
311
1730
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
312
1731
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
313
1732
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
1733
+ isDynamicView: () => boolean;
314
1734
  updateView: (view: import("@likec4/core").DiagramView) => void;
1735
+ focusOnNode: (nodeId: string) => void;
315
1736
  setHoveredNode: (nodeId: string | null) => void;
316
1737
  setHoveredEdge: (edgeId: string | null) => void;
317
1738
  setLastClickedNode: (nodeId: string | null) => void;
318
1739
  setLastClickedEdge: (edgeId: string | null) => void;
1740
+ resetLastClicked: () => void;
319
1741
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
320
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
1742
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
321
1743
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
322
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
1744
+ fitDiagram: (xyStore: {
1745
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1746
+ source: string;
1747
+ target: string;
1748
+ sourceHandle?: string | null;
1749
+ targetHandle?: string | null;
1750
+ animated?: boolean;
1751
+ hidden?: boolean;
1752
+ deletable?: boolean;
1753
+ selectable?: boolean;
1754
+ selected?: boolean;
1755
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1756
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1757
+ zIndex?: number;
1758
+ ariaLabel?: string;
1759
+ interactionWidth?: number;
1760
+ label?: import("react").ReactNode;
1761
+ labelStyle?: import("react").CSSProperties;
1762
+ labelShowBg?: boolean;
1763
+ labelBgStyle?: import("react").CSSProperties;
1764
+ labelBgPadding?: [number, number];
1765
+ labelBgBorderRadius?: number;
1766
+ style?: import("react").CSSProperties;
1767
+ className?: string;
1768
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1769
+ focusable?: boolean;
1770
+ data: import("..").RelationshipData;
1771
+ readonly id: string;
1772
+ readonly type: "relationship";
1773
+ }>;
1774
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1775
+ source: string;
1776
+ target: string;
1777
+ sourceHandle?: string | null;
1778
+ targetHandle?: string | null;
1779
+ animated?: boolean;
1780
+ hidden?: boolean;
1781
+ deletable?: boolean;
1782
+ selectable?: boolean;
1783
+ selected?: boolean;
1784
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1785
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1786
+ zIndex?: number;
1787
+ ariaLabel?: string;
1788
+ interactionWidth?: number;
1789
+ label?: import("react").ReactNode;
1790
+ labelStyle?: import("react").CSSProperties;
1791
+ labelShowBg?: boolean;
1792
+ labelBgStyle?: import("react").CSSProperties;
1793
+ labelBgPadding?: [number, number];
1794
+ labelBgBorderRadius?: number;
1795
+ style?: import("react").CSSProperties;
1796
+ className?: string;
1797
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1798
+ focusable?: boolean;
1799
+ data: import("..").RelationshipData;
1800
+ readonly id: string;
1801
+ readonly type: "relationship";
1802
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1803
+ source: string;
1804
+ target: string;
1805
+ sourceHandle?: string | null;
1806
+ targetHandle?: string | null;
1807
+ animated?: boolean;
1808
+ hidden?: boolean;
1809
+ deletable?: boolean;
1810
+ selectable?: boolean;
1811
+ selected?: boolean;
1812
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1813
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1814
+ zIndex?: number;
1815
+ ariaLabel?: string;
1816
+ interactionWidth?: number;
1817
+ label?: import("react").ReactNode;
1818
+ labelStyle?: import("react").CSSProperties;
1819
+ labelShowBg?: boolean;
1820
+ labelBgStyle?: import("react").CSSProperties;
1821
+ labelBgPadding?: [number, number];
1822
+ labelBgBorderRadius?: number;
1823
+ style?: import("react").CSSProperties;
1824
+ className?: string;
1825
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1826
+ focusable?: boolean;
1827
+ data: import("..").RelationshipData;
1828
+ readonly id: string;
1829
+ readonly type: "relationship";
1830
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1831
+ source: string;
1832
+ target: string;
1833
+ sourceHandle?: string | null;
1834
+ targetHandle?: string | null;
1835
+ animated?: boolean;
1836
+ hidden?: boolean;
1837
+ deletable?: boolean;
1838
+ selectable?: boolean;
1839
+ selected?: boolean;
1840
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1841
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1842
+ zIndex?: number;
1843
+ ariaLabel?: string;
1844
+ interactionWidth?: number;
1845
+ label?: import("react").ReactNode;
1846
+ labelStyle?: import("react").CSSProperties;
1847
+ labelShowBg?: boolean;
1848
+ labelBgStyle?: import("react").CSSProperties;
1849
+ labelBgPadding?: [number, number];
1850
+ labelBgBorderRadius?: number;
1851
+ style?: import("react").CSSProperties;
1852
+ className?: string;
1853
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1854
+ focusable?: boolean;
1855
+ data: import("..").RelationshipData;
1856
+ readonly id: string;
1857
+ readonly type: "relationship";
1858
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1859
+ source: string;
1860
+ target: string;
1861
+ sourceHandle?: string | null;
1862
+ targetHandle?: string | null;
1863
+ animated?: boolean;
1864
+ hidden?: boolean;
1865
+ deletable?: boolean;
1866
+ selectable?: boolean;
1867
+ selected?: boolean;
1868
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1869
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1870
+ zIndex?: number;
1871
+ ariaLabel?: string;
1872
+ interactionWidth?: number;
1873
+ label?: import("react").ReactNode;
1874
+ labelStyle?: import("react").CSSProperties;
1875
+ labelShowBg?: boolean;
1876
+ labelBgStyle?: import("react").CSSProperties;
1877
+ labelBgPadding?: [number, number];
1878
+ labelBgBorderRadius?: number;
1879
+ style?: import("react").CSSProperties;
1880
+ className?: string;
1881
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1882
+ focusable?: boolean;
1883
+ data: import("..").RelationshipData;
1884
+ readonly id: string;
1885
+ readonly type: "relationship";
1886
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1887
+ source: string;
1888
+ target: string;
1889
+ sourceHandle?: string | null;
1890
+ targetHandle?: string | null;
1891
+ animated?: boolean;
1892
+ hidden?: boolean;
1893
+ deletable?: boolean;
1894
+ selectable?: boolean;
1895
+ selected?: boolean;
1896
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1897
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1898
+ zIndex?: number;
1899
+ ariaLabel?: string;
1900
+ interactionWidth?: number;
1901
+ label?: import("react").ReactNode;
1902
+ labelStyle?: import("react").CSSProperties;
1903
+ labelShowBg?: boolean;
1904
+ labelBgStyle?: import("react").CSSProperties;
1905
+ labelBgPadding?: [number, number];
1906
+ labelBgBorderRadius?: number;
1907
+ style?: import("react").CSSProperties;
1908
+ className?: string;
1909
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1910
+ focusable?: boolean;
1911
+ data: import("..").RelationshipData;
1912
+ readonly id: string;
1913
+ readonly type: "relationship";
1914
+ }>>), replace?: boolean | undefined) => void;
1915
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1916
+ source: string;
1917
+ target: string;
1918
+ sourceHandle?: string | null;
1919
+ targetHandle?: string | null;
1920
+ animated?: boolean;
1921
+ hidden?: boolean;
1922
+ deletable?: boolean;
1923
+ selectable?: boolean;
1924
+ selected?: boolean;
1925
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1926
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1927
+ zIndex?: number;
1928
+ ariaLabel?: string;
1929
+ interactionWidth?: number;
1930
+ label?: import("react").ReactNode;
1931
+ labelStyle?: import("react").CSSProperties;
1932
+ labelShowBg?: boolean;
1933
+ labelBgStyle?: import("react").CSSProperties;
1934
+ labelBgPadding?: [number, number];
1935
+ labelBgBorderRadius?: number;
1936
+ style?: import("react").CSSProperties;
1937
+ className?: string;
1938
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1939
+ focusable?: boolean;
1940
+ data: import("..").RelationshipData;
1941
+ readonly id: string;
1942
+ readonly type: "relationship";
1943
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
1944
+ source: string;
1945
+ target: string;
1946
+ sourceHandle?: string | null;
1947
+ targetHandle?: string | null;
1948
+ animated?: boolean;
1949
+ hidden?: boolean;
1950
+ deletable?: boolean;
1951
+ selectable?: boolean;
1952
+ selected?: boolean;
1953
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
1954
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
1955
+ zIndex?: number;
1956
+ ariaLabel?: string;
1957
+ interactionWidth?: number;
1958
+ label?: import("react").ReactNode;
1959
+ labelStyle?: import("react").CSSProperties;
1960
+ labelShowBg?: boolean;
1961
+ labelBgStyle?: import("react").CSSProperties;
1962
+ labelBgPadding?: [number, number];
1963
+ labelBgBorderRadius?: number;
1964
+ style?: import("react").CSSProperties;
1965
+ className?: string;
1966
+ updatable?: import("@xyflow/react").EdgeUpdatable;
1967
+ focusable?: boolean;
1968
+ data: import("..").RelationshipData;
1969
+ readonly id: string;
1970
+ readonly type: "relationship";
1971
+ }>) => void) => () => void;
1972
+ }) => void;
1973
+ nextDynamicStep: (increment?: number | undefined) => void;
1974
+ stopDynamicView: () => void;
323
1975
  }) => {
324
1976
  view: import("@likec4/core").DiagramView;
325
1977
  readonly: boolean;
@@ -332,11 +1984,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
332
1984
  nodesSelectable: boolean;
333
1985
  xyflow: import("..").XYFlowInstance;
334
1986
  initialized: boolean;
1987
+ xyflowSynced: boolean;
1988
+ activeDynamicViewStep: number | null;
335
1989
  lastClickedNodeId: string | null;
336
1990
  lastClickedEdgeId: string | null;
337
1991
  focusedNodeId: string | null;
338
1992
  hoveredNodeId: string | null;
339
1993
  hoveredEdgeId: string | null;
1994
+ dimmed: ReadonlySet<string>;
340
1995
  previousViews: import("@likec4/core").DiagramView[];
341
1996
  lastOnNavigate: {
342
1997
  fromView: import("@likec4/core").ViewID;
@@ -355,15 +2010,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
355
2010
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
356
2011
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
357
2012
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
2013
+ isDynamicView: () => boolean;
358
2014
  updateView: (view: import("@likec4/core").DiagramView) => void;
2015
+ focusOnNode: (nodeId: string) => void;
359
2016
  setHoveredNode: (nodeId: string | null) => void;
360
2017
  setHoveredEdge: (edgeId: string | null) => void;
361
2018
  setLastClickedNode: (nodeId: string | null) => void;
362
2019
  setLastClickedEdge: (edgeId: string | null) => void;
2020
+ resetLastClicked: () => void;
363
2021
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
364
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
2022
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
365
2023
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
366
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
2024
+ fitDiagram: (xyStore: {
2025
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2026
+ source: string;
2027
+ target: string;
2028
+ sourceHandle?: string | null;
2029
+ targetHandle?: string | null;
2030
+ animated?: boolean;
2031
+ hidden?: boolean;
2032
+ deletable?: boolean;
2033
+ selectable?: boolean;
2034
+ selected?: boolean;
2035
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2036
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2037
+ zIndex?: number;
2038
+ ariaLabel?: string;
2039
+ interactionWidth?: number;
2040
+ label?: import("react").ReactNode;
2041
+ labelStyle?: import("react").CSSProperties;
2042
+ labelShowBg?: boolean;
2043
+ labelBgStyle?: import("react").CSSProperties;
2044
+ labelBgPadding?: [number, number];
2045
+ labelBgBorderRadius?: number;
2046
+ style?: import("react").CSSProperties;
2047
+ className?: string;
2048
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2049
+ focusable?: boolean;
2050
+ data: import("..").RelationshipData;
2051
+ readonly id: string;
2052
+ readonly type: "relationship";
2053
+ }>;
2054
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2055
+ source: string;
2056
+ target: string;
2057
+ sourceHandle?: string | null;
2058
+ targetHandle?: string | null;
2059
+ animated?: boolean;
2060
+ hidden?: boolean;
2061
+ deletable?: boolean;
2062
+ selectable?: boolean;
2063
+ selected?: boolean;
2064
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2065
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2066
+ zIndex?: number;
2067
+ ariaLabel?: string;
2068
+ interactionWidth?: number;
2069
+ label?: import("react").ReactNode;
2070
+ labelStyle?: import("react").CSSProperties;
2071
+ labelShowBg?: boolean;
2072
+ labelBgStyle?: import("react").CSSProperties;
2073
+ labelBgPadding?: [number, number];
2074
+ labelBgBorderRadius?: number;
2075
+ style?: import("react").CSSProperties;
2076
+ className?: string;
2077
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2078
+ focusable?: boolean;
2079
+ data: import("..").RelationshipData;
2080
+ readonly id: string;
2081
+ readonly type: "relationship";
2082
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2083
+ source: string;
2084
+ target: string;
2085
+ sourceHandle?: string | null;
2086
+ targetHandle?: string | null;
2087
+ animated?: boolean;
2088
+ hidden?: boolean;
2089
+ deletable?: boolean;
2090
+ selectable?: boolean;
2091
+ selected?: boolean;
2092
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2093
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2094
+ zIndex?: number;
2095
+ ariaLabel?: string;
2096
+ interactionWidth?: number;
2097
+ label?: import("react").ReactNode;
2098
+ labelStyle?: import("react").CSSProperties;
2099
+ labelShowBg?: boolean;
2100
+ labelBgStyle?: import("react").CSSProperties;
2101
+ labelBgPadding?: [number, number];
2102
+ labelBgBorderRadius?: number;
2103
+ style?: import("react").CSSProperties;
2104
+ className?: string;
2105
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2106
+ focusable?: boolean;
2107
+ data: import("..").RelationshipData;
2108
+ readonly id: string;
2109
+ readonly type: "relationship";
2110
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2111
+ source: string;
2112
+ target: string;
2113
+ sourceHandle?: string | null;
2114
+ targetHandle?: string | null;
2115
+ animated?: boolean;
2116
+ hidden?: boolean;
2117
+ deletable?: boolean;
2118
+ selectable?: boolean;
2119
+ selected?: boolean;
2120
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2121
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2122
+ zIndex?: number;
2123
+ ariaLabel?: string;
2124
+ interactionWidth?: number;
2125
+ label?: import("react").ReactNode;
2126
+ labelStyle?: import("react").CSSProperties;
2127
+ labelShowBg?: boolean;
2128
+ labelBgStyle?: import("react").CSSProperties;
2129
+ labelBgPadding?: [number, number];
2130
+ labelBgBorderRadius?: number;
2131
+ style?: import("react").CSSProperties;
2132
+ className?: string;
2133
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2134
+ focusable?: boolean;
2135
+ data: import("..").RelationshipData;
2136
+ readonly id: string;
2137
+ readonly type: "relationship";
2138
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2139
+ source: string;
2140
+ target: string;
2141
+ sourceHandle?: string | null;
2142
+ targetHandle?: string | null;
2143
+ animated?: boolean;
2144
+ hidden?: boolean;
2145
+ deletable?: boolean;
2146
+ selectable?: boolean;
2147
+ selected?: boolean;
2148
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2149
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2150
+ zIndex?: number;
2151
+ ariaLabel?: string;
2152
+ interactionWidth?: number;
2153
+ label?: import("react").ReactNode;
2154
+ labelStyle?: import("react").CSSProperties;
2155
+ labelShowBg?: boolean;
2156
+ labelBgStyle?: import("react").CSSProperties;
2157
+ labelBgPadding?: [number, number];
2158
+ labelBgBorderRadius?: number;
2159
+ style?: import("react").CSSProperties;
2160
+ className?: string;
2161
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2162
+ focusable?: boolean;
2163
+ data: import("..").RelationshipData;
2164
+ readonly id: string;
2165
+ readonly type: "relationship";
2166
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2167
+ source: string;
2168
+ target: string;
2169
+ sourceHandle?: string | null;
2170
+ targetHandle?: string | null;
2171
+ animated?: boolean;
2172
+ hidden?: boolean;
2173
+ deletable?: boolean;
2174
+ selectable?: boolean;
2175
+ selected?: boolean;
2176
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2177
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2178
+ zIndex?: number;
2179
+ ariaLabel?: string;
2180
+ interactionWidth?: number;
2181
+ label?: import("react").ReactNode;
2182
+ labelStyle?: import("react").CSSProperties;
2183
+ labelShowBg?: boolean;
2184
+ labelBgStyle?: import("react").CSSProperties;
2185
+ labelBgPadding?: [number, number];
2186
+ labelBgBorderRadius?: number;
2187
+ style?: import("react").CSSProperties;
2188
+ className?: string;
2189
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2190
+ focusable?: boolean;
2191
+ data: import("..").RelationshipData;
2192
+ readonly id: string;
2193
+ readonly type: "relationship";
2194
+ }>>), replace?: boolean | undefined) => void;
2195
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2196
+ source: string;
2197
+ target: string;
2198
+ sourceHandle?: string | null;
2199
+ targetHandle?: string | null;
2200
+ animated?: boolean;
2201
+ hidden?: boolean;
2202
+ deletable?: boolean;
2203
+ selectable?: boolean;
2204
+ selected?: boolean;
2205
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2206
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2207
+ zIndex?: number;
2208
+ ariaLabel?: string;
2209
+ interactionWidth?: number;
2210
+ label?: import("react").ReactNode;
2211
+ labelStyle?: import("react").CSSProperties;
2212
+ labelShowBg?: boolean;
2213
+ labelBgStyle?: import("react").CSSProperties;
2214
+ labelBgPadding?: [number, number];
2215
+ labelBgBorderRadius?: number;
2216
+ style?: import("react").CSSProperties;
2217
+ className?: string;
2218
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2219
+ focusable?: boolean;
2220
+ data: import("..").RelationshipData;
2221
+ readonly id: string;
2222
+ readonly type: "relationship";
2223
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2224
+ source: string;
2225
+ target: string;
2226
+ sourceHandle?: string | null;
2227
+ targetHandle?: string | null;
2228
+ animated?: boolean;
2229
+ hidden?: boolean;
2230
+ deletable?: boolean;
2231
+ selectable?: boolean;
2232
+ selected?: boolean;
2233
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2234
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2235
+ zIndex?: number;
2236
+ ariaLabel?: string;
2237
+ interactionWidth?: number;
2238
+ label?: import("react").ReactNode;
2239
+ labelStyle?: import("react").CSSProperties;
2240
+ labelShowBg?: boolean;
2241
+ labelBgStyle?: import("react").CSSProperties;
2242
+ labelBgPadding?: [number, number];
2243
+ labelBgBorderRadius?: number;
2244
+ style?: import("react").CSSProperties;
2245
+ className?: string;
2246
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2247
+ focusable?: boolean;
2248
+ data: import("..").RelationshipData;
2249
+ readonly id: string;
2250
+ readonly type: "relationship";
2251
+ }>) => void) => () => void;
2252
+ }) => void;
2253
+ nextDynamicStep: (increment?: number | undefined) => void;
2254
+ stopDynamicView: () => void;
367
2255
  } | Partial<{
368
2256
  view: import("@likec4/core").DiagramView;
369
2257
  readonly: boolean;
@@ -376,11 +2264,14 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
376
2264
  nodesSelectable: boolean;
377
2265
  xyflow: import("..").XYFlowInstance;
378
2266
  initialized: boolean;
2267
+ xyflowSynced: boolean;
2268
+ activeDynamicViewStep: number | null;
379
2269
  lastClickedNodeId: string | null;
380
2270
  lastClickedEdgeId: string | null;
381
2271
  focusedNodeId: string | null;
382
2272
  hoveredNodeId: string | null;
383
2273
  hoveredEdgeId: string | null;
2274
+ dimmed: ReadonlySet<string>;
384
2275
  previousViews: import("@likec4/core").DiagramView[];
385
2276
  lastOnNavigate: {
386
2277
  fromView: import("@likec4/core").ViewID;
@@ -399,15 +2290,248 @@ export declare const DiagramContext: import('react').Context<import("zustand/tra
399
2290
  onEdgeContextMenu: import("..").OnEdgeClick | null | undefined;
400
2291
  onCanvasClick: import("..").OnCanvasClick | null | undefined;
401
2292
  onCanvasDblClick: import("..").OnCanvasClick | null | undefined;
2293
+ isDynamicView: () => boolean;
402
2294
  updateView: (view: import("@likec4/core").DiagramView) => void;
2295
+ focusOnNode: (nodeId: string) => void;
403
2296
  setHoveredNode: (nodeId: string | null) => void;
404
2297
  setHoveredEdge: (edgeId: string | null) => void;
405
2298
  setLastClickedNode: (nodeId: string | null) => void;
406
2299
  setLastClickedEdge: (edgeId: string | null) => void;
2300
+ resetLastClicked: () => void;
407
2301
  getElement: (id: import("@likec4/core").Fqn) => import("@likec4/core").DiagramNode | null;
408
- triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Change>) => void;
2302
+ triggerOnChange: (changes: import("@likec4/core").NonEmptyArray<import("..").Changes.ChangeElementStyle>) => void;
409
2303
  triggerOnNavigateTo: (xynodeId: string, event: import("react").MouseEvent<Element, MouseEvent>) => void;
410
- fitDiagram: (centerNode?: import("..").XYFlowNode | undefined) => void;
2304
+ fitDiagram: (xyStore: {
2305
+ getState: () => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2306
+ source: string;
2307
+ target: string;
2308
+ sourceHandle?: string | null;
2309
+ targetHandle?: string | null;
2310
+ animated?: boolean;
2311
+ hidden?: boolean;
2312
+ deletable?: boolean;
2313
+ selectable?: boolean;
2314
+ selected?: boolean;
2315
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2316
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2317
+ zIndex?: number;
2318
+ ariaLabel?: string;
2319
+ interactionWidth?: number;
2320
+ label?: import("react").ReactNode;
2321
+ labelStyle?: import("react").CSSProperties;
2322
+ labelShowBg?: boolean;
2323
+ labelBgStyle?: import("react").CSSProperties;
2324
+ labelBgPadding?: [number, number];
2325
+ labelBgBorderRadius?: number;
2326
+ style?: import("react").CSSProperties;
2327
+ className?: string;
2328
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2329
+ focusable?: boolean;
2330
+ data: import("..").RelationshipData;
2331
+ readonly id: string;
2332
+ readonly type: "relationship";
2333
+ }>;
2334
+ setState: (partial: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2335
+ source: string;
2336
+ target: string;
2337
+ sourceHandle?: string | null;
2338
+ targetHandle?: string | null;
2339
+ animated?: boolean;
2340
+ hidden?: boolean;
2341
+ deletable?: boolean;
2342
+ selectable?: boolean;
2343
+ selected?: boolean;
2344
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2345
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2346
+ zIndex?: number;
2347
+ ariaLabel?: string;
2348
+ interactionWidth?: number;
2349
+ label?: import("react").ReactNode;
2350
+ labelStyle?: import("react").CSSProperties;
2351
+ labelShowBg?: boolean;
2352
+ labelBgStyle?: import("react").CSSProperties;
2353
+ labelBgPadding?: [number, number];
2354
+ labelBgBorderRadius?: number;
2355
+ style?: import("react").CSSProperties;
2356
+ className?: string;
2357
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2358
+ focusable?: boolean;
2359
+ data: import("..").RelationshipData;
2360
+ readonly id: string;
2361
+ readonly type: "relationship";
2362
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2363
+ source: string;
2364
+ target: string;
2365
+ sourceHandle?: string | null;
2366
+ targetHandle?: string | null;
2367
+ animated?: boolean;
2368
+ hidden?: boolean;
2369
+ deletable?: boolean;
2370
+ selectable?: boolean;
2371
+ selected?: boolean;
2372
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2373
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2374
+ zIndex?: number;
2375
+ ariaLabel?: string;
2376
+ interactionWidth?: number;
2377
+ label?: import("react").ReactNode;
2378
+ labelStyle?: import("react").CSSProperties;
2379
+ labelShowBg?: boolean;
2380
+ labelBgStyle?: import("react").CSSProperties;
2381
+ labelBgPadding?: [number, number];
2382
+ labelBgBorderRadius?: number;
2383
+ style?: import("react").CSSProperties;
2384
+ className?: string;
2385
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2386
+ focusable?: boolean;
2387
+ data: import("..").RelationshipData;
2388
+ readonly id: string;
2389
+ readonly type: "relationship";
2390
+ }>> | ((state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2391
+ source: string;
2392
+ target: string;
2393
+ sourceHandle?: string | null;
2394
+ targetHandle?: string | null;
2395
+ animated?: boolean;
2396
+ hidden?: boolean;
2397
+ deletable?: boolean;
2398
+ selectable?: boolean;
2399
+ selected?: boolean;
2400
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2401
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2402
+ zIndex?: number;
2403
+ ariaLabel?: string;
2404
+ interactionWidth?: number;
2405
+ label?: import("react").ReactNode;
2406
+ labelStyle?: import("react").CSSProperties;
2407
+ labelShowBg?: boolean;
2408
+ labelBgStyle?: import("react").CSSProperties;
2409
+ labelBgPadding?: [number, number];
2410
+ labelBgBorderRadius?: number;
2411
+ style?: import("react").CSSProperties;
2412
+ className?: string;
2413
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2414
+ focusable?: boolean;
2415
+ data: import("..").RelationshipData;
2416
+ readonly id: string;
2417
+ readonly type: "relationship";
2418
+ }>) => import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2419
+ source: string;
2420
+ target: string;
2421
+ sourceHandle?: string | null;
2422
+ targetHandle?: string | null;
2423
+ animated?: boolean;
2424
+ hidden?: boolean;
2425
+ deletable?: boolean;
2426
+ selectable?: boolean;
2427
+ selected?: boolean;
2428
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2429
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2430
+ zIndex?: number;
2431
+ ariaLabel?: string;
2432
+ interactionWidth?: number;
2433
+ label?: import("react").ReactNode;
2434
+ labelStyle?: import("react").CSSProperties;
2435
+ labelShowBg?: boolean;
2436
+ labelBgStyle?: import("react").CSSProperties;
2437
+ labelBgPadding?: [number, number];
2438
+ labelBgBorderRadius?: number;
2439
+ style?: import("react").CSSProperties;
2440
+ className?: string;
2441
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2442
+ focusable?: boolean;
2443
+ data: import("..").RelationshipData;
2444
+ readonly id: string;
2445
+ readonly type: "relationship";
2446
+ }> | Partial<import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2447
+ source: string;
2448
+ target: string;
2449
+ sourceHandle?: string | null;
2450
+ targetHandle?: string | null;
2451
+ animated?: boolean;
2452
+ hidden?: boolean;
2453
+ deletable?: boolean;
2454
+ selectable?: boolean;
2455
+ selected?: boolean;
2456
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2457
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2458
+ zIndex?: number;
2459
+ ariaLabel?: string;
2460
+ interactionWidth?: number;
2461
+ label?: import("react").ReactNode;
2462
+ labelStyle?: import("react").CSSProperties;
2463
+ labelShowBg?: boolean;
2464
+ labelBgStyle?: import("react").CSSProperties;
2465
+ labelBgPadding?: [number, number];
2466
+ labelBgBorderRadius?: number;
2467
+ style?: import("react").CSSProperties;
2468
+ className?: string;
2469
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2470
+ focusable?: boolean;
2471
+ data: import("..").RelationshipData;
2472
+ readonly id: string;
2473
+ readonly type: "relationship";
2474
+ }>>), replace?: boolean | undefined) => void;
2475
+ subscribe: (listener: (state: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2476
+ source: string;
2477
+ target: string;
2478
+ sourceHandle?: string | null;
2479
+ targetHandle?: string | null;
2480
+ animated?: boolean;
2481
+ hidden?: boolean;
2482
+ deletable?: boolean;
2483
+ selectable?: boolean;
2484
+ selected?: boolean;
2485
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2486
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2487
+ zIndex?: number;
2488
+ ariaLabel?: string;
2489
+ interactionWidth?: number;
2490
+ label?: import("react").ReactNode;
2491
+ labelStyle?: import("react").CSSProperties;
2492
+ labelShowBg?: boolean;
2493
+ labelBgStyle?: import("react").CSSProperties;
2494
+ labelBgPadding?: [number, number];
2495
+ labelBgBorderRadius?: number;
2496
+ style?: import("react").CSSProperties;
2497
+ className?: string;
2498
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2499
+ focusable?: boolean;
2500
+ data: import("..").RelationshipData;
2501
+ readonly id: string;
2502
+ readonly type: "relationship";
2503
+ }>, prevState: import("@xyflow/react").ReactFlowState<import("..").XYFlowNode, {
2504
+ source: string;
2505
+ target: string;
2506
+ sourceHandle?: string | null;
2507
+ targetHandle?: string | null;
2508
+ animated?: boolean;
2509
+ hidden?: boolean;
2510
+ deletable?: boolean;
2511
+ selectable?: boolean;
2512
+ selected?: boolean;
2513
+ markerStart?: import("@xyflow/system").EdgeMarkerType;
2514
+ markerEnd?: import("@xyflow/system").EdgeMarkerType;
2515
+ zIndex?: number;
2516
+ ariaLabel?: string;
2517
+ interactionWidth?: number;
2518
+ label?: import("react").ReactNode;
2519
+ labelStyle?: import("react").CSSProperties;
2520
+ labelShowBg?: boolean;
2521
+ labelBgStyle?: import("react").CSSProperties;
2522
+ labelBgPadding?: [number, number];
2523
+ labelBgBorderRadius?: number;
2524
+ style?: import("react").CSSProperties;
2525
+ className?: string;
2526
+ updatable?: import("@xyflow/react").EdgeUpdatable;
2527
+ focusable?: boolean;
2528
+ data: import("..").RelationshipData;
2529
+ readonly id: string;
2530
+ readonly type: "relationship";
2531
+ }>) => void) => () => void;
2532
+ }) => void;
2533
+ nextDynamicStep: (increment?: number | undefined) => void;
2534
+ stopDynamicView: () => void;
411
2535
  }>), replace?: boolean | undefined, action?: A | undefined): void;
412
2536
  }> | null>;
413
- export declare function DiagramContextProvider({ children, view, ...props }: PropsWithChildren<DiagramInitialState>): JSX.Element;
2537
+ export declare function DiagramContextProvider({ children, view, ...props }: PropsWithChildren<DiagramInitialState>): import("react/jsx-runtime").JSX.Element;