@likec4/diagram 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/KeepAspectRatioContainer.d.ts +1 -1
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.props.d.ts +10 -5
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/hooks/useUpdateEffect.d.ts +1 -1
- package/dist/icons/Clipboard.d.ts +1 -1
- package/dist/icons/Link.d.ts +1 -1
- package/dist/icons/ZoomIn.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +2604 -1502
- package/dist/mantine/EnsureMantine.d.ts +1 -1
- package/dist/state/DiagramContext.d.ts +2307 -192
- package/dist/state/WhenInitialized.d.ts +1 -1
- package/dist/state/diagramStore.d.ts +2220 -97
- package/dist/state/useDiagramStore.d.ts +2124 -9
- package/dist/style.css +210 -136
- package/dist/theme.css.d.ts +1 -0
- package/dist/ui/DiagramTitlePanel.d.ts +1 -2
- package/dist/ui/DynamicViewWalkthrough.css.d.ts +3 -0
- package/dist/ui/DynamicViewWalkthrough.d.ts +1 -0
- package/dist/ui/OptionsPanel.d.ts +1 -2
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/options/NodeOptions.d.ts +1 -2
- package/dist/xyflow/FitviewOnDiagramChange.d.ts +4 -2
- package/dist/xyflow/SyncWithDiagram.d.ts +1 -2
- package/dist/xyflow/XYFlow.d.ts +5 -8
- package/dist/xyflow/XYFlowBackground.d.ts +6 -5
- package/dist/xyflow/XYFlowEvents.d.ts +60 -66
- package/dist/xyflow/XYFlowInner.d.ts +11 -0
- package/dist/xyflow/diagram-to-xyflow.d.ts +2 -2
- package/dist/xyflow/edges/RelationshipEdge.d.ts +17 -17
- package/dist/xyflow/edges/edges.css.d.ts +4 -2
- package/dist/xyflow/edges/utils.d.ts +3 -1
- package/dist/xyflow/hooks/useLayoutConstraints.d.ts +1 -1
- package/dist/xyflow/hooks/useXYFlow.d.ts +162 -162
- package/dist/xyflow/nodes/compound/CompoundNode.css.d.ts +1 -0
- package/dist/xyflow/nodes/compound/CompoundNode.d.ts +1 -1
- package/dist/xyflow/nodes/element/ElementIcon.d.ts +1 -1
- package/dist/xyflow/nodes/element/ElementLink.d.ts +1 -1
- package/dist/xyflow/nodes/element/ElementNode.d.ts +2 -2
- package/dist/xyflow/nodes/element/ElementShapeSvg.d.ts +2 -2
- package/dist/xyflow/nodes/element/element.css.d.ts +2 -1
- package/dist/xyflow/nodes/shared/NavigateToBtn.d.ts +1 -2
- package/dist/xyflow/types.d.ts +23 -23
- package/package.json +23 -21
- package/src/KeepAspectRatioContainer.tsx +1 -1
- package/src/LikeC4Diagram.css.ts +2 -0
- package/src/LikeC4Diagram.props.ts +9 -4
- package/src/LikeC4Diagram.tsx +17 -11
- package/src/StaticLikeC4Diagram.tsx +1 -0
- package/src/globals.css.ts +1 -0
- package/src/index.ts +0 -3
- package/src/state/DiagramContext.tsx +21 -12
- package/src/state/diagramStore.ts +177 -38
- package/src/theme.css.ts +1 -0
- package/src/ui/DiagramTitlePanel.css.ts +2 -1
- package/src/ui/DiagramTitlePanel.tsx +3 -4
- package/src/ui/DynamicViewWalkthrough.css.ts +46 -0
- package/src/ui/DynamicViewWalkthrough.tsx +86 -0
- package/src/ui/OptionsPanel.tsx +5 -3
- package/src/ui/index.ts +1 -0
- package/src/ui/options/NodeOptions.tsx +23 -24
- package/src/xyflow/FitviewOnDiagramChange.tsx +89 -69
- package/src/xyflow/SelectEdgesOnNodeFocus.tsx +57 -39
- package/src/xyflow/SyncWithDiagram.tsx +55 -107
- package/src/xyflow/XYFlow.tsx +51 -35
- package/src/xyflow/XYFlowBackground.tsx +7 -5
- package/src/xyflow/XYFlowEvents.tsx +100 -95
- package/src/xyflow/XYFlowInner.tsx +50 -0
- package/src/xyflow/diagram-to-xyflow.ts +16 -21
- package/src/xyflow/edges/RelationshipEdge.tsx +70 -34
- package/src/xyflow/edges/edges.css.ts +68 -34
- package/src/xyflow/edges/utils.ts +31 -0
- package/src/xyflow/nodes/compound/CompoundNode.css.ts +6 -2
- package/src/xyflow/nodes/compound/CompoundNode.tsx +6 -3
- package/src/xyflow/nodes/element/ElementLink.tsx +13 -3
- package/src/xyflow/nodes/element/ElementNode.tsx +24 -19
- package/src/xyflow/nodes/element/element.css.ts +9 -2
- package/src/xyflow/nodes/shared/NavigateToBtn.tsx +1 -0
- package/src/xyflow/types.ts +7 -8
|
@@ -3,31 +3,31 @@ import { XYFlowNode, XYFlowState } from '../types';
|
|
|
3
3
|
export declare const useXYFlow: () => import('@xyflow/react').ReactFlowInstance<XYFlowNode, {
|
|
4
4
|
source: string;
|
|
5
5
|
target: string;
|
|
6
|
-
style?: import("react").CSSProperties;
|
|
7
|
-
id: string;
|
|
8
|
-
zIndex?: number;
|
|
9
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
10
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
11
|
-
hidden?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
label?: import("react").ReactNode;
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
selectable?: boolean;
|
|
16
|
-
deletable?: boolean;
|
|
17
|
-
ariaLabel?: string;
|
|
18
|
-
focusable?: boolean;
|
|
19
6
|
sourceHandle?: string | null;
|
|
20
7
|
targetHandle?: string | null;
|
|
21
8
|
animated?: boolean;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
deletable?: boolean;
|
|
11
|
+
selectable?: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
14
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
ariaLabel?: string;
|
|
22
17
|
interactionWidth?: number;
|
|
23
|
-
|
|
18
|
+
label?: import('react').ReactNode;
|
|
19
|
+
labelStyle?: import('react').CSSProperties;
|
|
24
20
|
labelShowBg?: boolean;
|
|
25
|
-
labelBgStyle?: import(
|
|
21
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
26
22
|
labelBgPadding?: [number, number];
|
|
27
23
|
labelBgBorderRadius?: number;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
style?: import('react').CSSProperties;
|
|
25
|
+
className?: string;
|
|
26
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
27
|
+
focusable?: boolean;
|
|
28
|
+
data: import('../types').RelationshipData;
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly type: "relationship";
|
|
31
31
|
}>;
|
|
32
32
|
export declare const useXYNodesData: {
|
|
33
33
|
(nodeId: string): Pick<XYFlowNode, "id" | "data" | "type"> | null;
|
|
@@ -38,229 +38,229 @@ export declare const useXYStoreApi: () => {
|
|
|
38
38
|
getState: () => import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
39
39
|
source: string;
|
|
40
40
|
target: string;
|
|
41
|
-
style?: import("react").CSSProperties;
|
|
42
|
-
id: string;
|
|
43
|
-
zIndex?: number;
|
|
44
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
45
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
46
|
-
hidden?: boolean;
|
|
47
|
-
className?: string;
|
|
48
|
-
label?: import("react").ReactNode;
|
|
49
|
-
selected?: boolean;
|
|
50
|
-
selectable?: boolean;
|
|
51
|
-
deletable?: boolean;
|
|
52
|
-
ariaLabel?: string;
|
|
53
|
-
focusable?: boolean;
|
|
54
41
|
sourceHandle?: string | null;
|
|
55
42
|
targetHandle?: string | null;
|
|
56
43
|
animated?: boolean;
|
|
44
|
+
hidden?: boolean;
|
|
45
|
+
deletable?: boolean;
|
|
46
|
+
selectable?: boolean;
|
|
47
|
+
selected?: boolean;
|
|
48
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
49
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
50
|
+
zIndex?: number;
|
|
51
|
+
ariaLabel?: string;
|
|
57
52
|
interactionWidth?: number;
|
|
58
|
-
|
|
53
|
+
label?: import('react').ReactNode;
|
|
54
|
+
labelStyle?: import('react').CSSProperties;
|
|
59
55
|
labelShowBg?: boolean;
|
|
60
|
-
labelBgStyle?: import(
|
|
56
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
61
57
|
labelBgPadding?: [number, number];
|
|
62
58
|
labelBgBorderRadius?: number;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
style?: import('react').CSSProperties;
|
|
60
|
+
className?: string;
|
|
61
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
62
|
+
focusable?: boolean;
|
|
63
|
+
data: import('../types').RelationshipData;
|
|
64
|
+
readonly id: string;
|
|
65
|
+
readonly type: "relationship";
|
|
66
66
|
}>;
|
|
67
67
|
setState: (partial: import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
68
68
|
source: string;
|
|
69
69
|
target: string;
|
|
70
|
-
style?: import("react").CSSProperties;
|
|
71
|
-
id: string;
|
|
72
|
-
zIndex?: number;
|
|
73
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
74
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
75
|
-
hidden?: boolean;
|
|
76
|
-
className?: string;
|
|
77
|
-
label?: import("react").ReactNode;
|
|
78
|
-
selected?: boolean;
|
|
79
|
-
selectable?: boolean;
|
|
80
|
-
deletable?: boolean;
|
|
81
|
-
ariaLabel?: string;
|
|
82
|
-
focusable?: boolean;
|
|
83
70
|
sourceHandle?: string | null;
|
|
84
71
|
targetHandle?: string | null;
|
|
85
72
|
animated?: boolean;
|
|
73
|
+
hidden?: boolean;
|
|
74
|
+
deletable?: boolean;
|
|
75
|
+
selectable?: boolean;
|
|
76
|
+
selected?: boolean;
|
|
77
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
78
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
79
|
+
zIndex?: number;
|
|
80
|
+
ariaLabel?: string;
|
|
86
81
|
interactionWidth?: number;
|
|
87
|
-
|
|
82
|
+
label?: import('react').ReactNode;
|
|
83
|
+
labelStyle?: import('react').CSSProperties;
|
|
88
84
|
labelShowBg?: boolean;
|
|
89
|
-
labelBgStyle?: import(
|
|
85
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
90
86
|
labelBgPadding?: [number, number];
|
|
91
87
|
labelBgBorderRadius?: number;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
style?: import('react').CSSProperties;
|
|
89
|
+
className?: string;
|
|
90
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
91
|
+
focusable?: boolean;
|
|
92
|
+
data: import('../types').RelationshipData;
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly type: "relationship";
|
|
95
95
|
}> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
96
96
|
source: string;
|
|
97
97
|
target: string;
|
|
98
|
-
style?: import("react").CSSProperties;
|
|
99
|
-
id: string;
|
|
100
|
-
zIndex?: number;
|
|
101
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
102
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
103
|
-
hidden?: boolean;
|
|
104
|
-
className?: string;
|
|
105
|
-
label?: import("react").ReactNode;
|
|
106
|
-
selected?: boolean;
|
|
107
|
-
selectable?: boolean;
|
|
108
|
-
deletable?: boolean;
|
|
109
|
-
ariaLabel?: string;
|
|
110
|
-
focusable?: boolean;
|
|
111
98
|
sourceHandle?: string | null;
|
|
112
99
|
targetHandle?: string | null;
|
|
113
100
|
animated?: boolean;
|
|
101
|
+
hidden?: boolean;
|
|
102
|
+
deletable?: boolean;
|
|
103
|
+
selectable?: boolean;
|
|
104
|
+
selected?: boolean;
|
|
105
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
106
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
107
|
+
zIndex?: number;
|
|
108
|
+
ariaLabel?: string;
|
|
114
109
|
interactionWidth?: number;
|
|
115
|
-
|
|
110
|
+
label?: import('react').ReactNode;
|
|
111
|
+
labelStyle?: import('react').CSSProperties;
|
|
116
112
|
labelShowBg?: boolean;
|
|
117
|
-
labelBgStyle?: import(
|
|
113
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
118
114
|
labelBgPadding?: [number, number];
|
|
119
115
|
labelBgBorderRadius?: number;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
style?: import('react').CSSProperties;
|
|
117
|
+
className?: string;
|
|
118
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
119
|
+
focusable?: boolean;
|
|
120
|
+
data: import('../types').RelationshipData;
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly type: "relationship";
|
|
123
123
|
}>> | ((state: import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
124
124
|
source: string;
|
|
125
125
|
target: string;
|
|
126
|
-
style?: import("react").CSSProperties;
|
|
127
|
-
id: string;
|
|
128
|
-
zIndex?: number;
|
|
129
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
130
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
131
|
-
hidden?: boolean;
|
|
132
|
-
className?: string;
|
|
133
|
-
label?: import("react").ReactNode;
|
|
134
|
-
selected?: boolean;
|
|
135
|
-
selectable?: boolean;
|
|
136
|
-
deletable?: boolean;
|
|
137
|
-
ariaLabel?: string;
|
|
138
|
-
focusable?: boolean;
|
|
139
126
|
sourceHandle?: string | null;
|
|
140
127
|
targetHandle?: string | null;
|
|
141
128
|
animated?: boolean;
|
|
129
|
+
hidden?: boolean;
|
|
130
|
+
deletable?: boolean;
|
|
131
|
+
selectable?: boolean;
|
|
132
|
+
selected?: boolean;
|
|
133
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
134
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
135
|
+
zIndex?: number;
|
|
136
|
+
ariaLabel?: string;
|
|
142
137
|
interactionWidth?: number;
|
|
143
|
-
|
|
138
|
+
label?: import('react').ReactNode;
|
|
139
|
+
labelStyle?: import('react').CSSProperties;
|
|
144
140
|
labelShowBg?: boolean;
|
|
145
|
-
labelBgStyle?: import(
|
|
141
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
146
142
|
labelBgPadding?: [number, number];
|
|
147
143
|
labelBgBorderRadius?: number;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
style?: import('react').CSSProperties;
|
|
145
|
+
className?: string;
|
|
146
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
147
|
+
focusable?: boolean;
|
|
148
|
+
data: import('../types').RelationshipData;
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly type: "relationship";
|
|
151
151
|
}>) => import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
152
152
|
source: string;
|
|
153
153
|
target: string;
|
|
154
|
-
style?: import("react").CSSProperties;
|
|
155
|
-
id: string;
|
|
156
|
-
zIndex?: number;
|
|
157
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
158
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
159
|
-
hidden?: boolean;
|
|
160
|
-
className?: string;
|
|
161
|
-
label?: import("react").ReactNode;
|
|
162
|
-
selected?: boolean;
|
|
163
|
-
selectable?: boolean;
|
|
164
|
-
deletable?: boolean;
|
|
165
|
-
ariaLabel?: string;
|
|
166
|
-
focusable?: boolean;
|
|
167
154
|
sourceHandle?: string | null;
|
|
168
155
|
targetHandle?: string | null;
|
|
169
156
|
animated?: boolean;
|
|
157
|
+
hidden?: boolean;
|
|
158
|
+
deletable?: boolean;
|
|
159
|
+
selectable?: boolean;
|
|
160
|
+
selected?: boolean;
|
|
161
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
162
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
163
|
+
zIndex?: number;
|
|
164
|
+
ariaLabel?: string;
|
|
170
165
|
interactionWidth?: number;
|
|
171
|
-
|
|
166
|
+
label?: import('react').ReactNode;
|
|
167
|
+
labelStyle?: import('react').CSSProperties;
|
|
172
168
|
labelShowBg?: boolean;
|
|
173
|
-
labelBgStyle?: import(
|
|
169
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
174
170
|
labelBgPadding?: [number, number];
|
|
175
171
|
labelBgBorderRadius?: number;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
style?: import('react').CSSProperties;
|
|
173
|
+
className?: string;
|
|
174
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
175
|
+
focusable?: boolean;
|
|
176
|
+
data: import('../types').RelationshipData;
|
|
177
|
+
readonly id: string;
|
|
178
|
+
readonly type: "relationship";
|
|
179
179
|
}> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
180
180
|
source: string;
|
|
181
181
|
target: string;
|
|
182
|
-
style?: import("react").CSSProperties;
|
|
183
|
-
id: string;
|
|
184
|
-
zIndex?: number;
|
|
185
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
186
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
187
|
-
hidden?: boolean;
|
|
188
|
-
className?: string;
|
|
189
|
-
label?: import("react").ReactNode;
|
|
190
|
-
selected?: boolean;
|
|
191
|
-
selectable?: boolean;
|
|
192
|
-
deletable?: boolean;
|
|
193
|
-
ariaLabel?: string;
|
|
194
|
-
focusable?: boolean;
|
|
195
182
|
sourceHandle?: string | null;
|
|
196
183
|
targetHandle?: string | null;
|
|
197
184
|
animated?: boolean;
|
|
185
|
+
hidden?: boolean;
|
|
186
|
+
deletable?: boolean;
|
|
187
|
+
selectable?: boolean;
|
|
188
|
+
selected?: boolean;
|
|
189
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
190
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
191
|
+
zIndex?: number;
|
|
192
|
+
ariaLabel?: string;
|
|
198
193
|
interactionWidth?: number;
|
|
199
|
-
|
|
194
|
+
label?: import('react').ReactNode;
|
|
195
|
+
labelStyle?: import('react').CSSProperties;
|
|
200
196
|
labelShowBg?: boolean;
|
|
201
|
-
labelBgStyle?: import(
|
|
197
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
202
198
|
labelBgPadding?: [number, number];
|
|
203
199
|
labelBgBorderRadius?: number;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
style?: import('react').CSSProperties;
|
|
201
|
+
className?: string;
|
|
202
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
203
|
+
focusable?: boolean;
|
|
204
|
+
data: import('../types').RelationshipData;
|
|
205
|
+
readonly id: string;
|
|
206
|
+
readonly type: "relationship";
|
|
207
207
|
}>>), replace?: boolean | undefined) => void;
|
|
208
208
|
subscribe: (listener: (state: import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
209
209
|
source: string;
|
|
210
210
|
target: string;
|
|
211
|
-
style?: import("react").CSSProperties;
|
|
212
|
-
id: string;
|
|
213
|
-
zIndex?: number;
|
|
214
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
215
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
216
|
-
hidden?: boolean;
|
|
217
|
-
className?: string;
|
|
218
|
-
label?: import("react").ReactNode;
|
|
219
|
-
selected?: boolean;
|
|
220
|
-
selectable?: boolean;
|
|
221
|
-
deletable?: boolean;
|
|
222
|
-
ariaLabel?: string;
|
|
223
|
-
focusable?: boolean;
|
|
224
211
|
sourceHandle?: string | null;
|
|
225
212
|
targetHandle?: string | null;
|
|
226
213
|
animated?: boolean;
|
|
214
|
+
hidden?: boolean;
|
|
215
|
+
deletable?: boolean;
|
|
216
|
+
selectable?: boolean;
|
|
217
|
+
selected?: boolean;
|
|
218
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
219
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
220
|
+
zIndex?: number;
|
|
221
|
+
ariaLabel?: string;
|
|
227
222
|
interactionWidth?: number;
|
|
228
|
-
|
|
223
|
+
label?: import('react').ReactNode;
|
|
224
|
+
labelStyle?: import('react').CSSProperties;
|
|
229
225
|
labelShowBg?: boolean;
|
|
230
|
-
labelBgStyle?: import(
|
|
226
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
231
227
|
labelBgPadding?: [number, number];
|
|
232
228
|
labelBgBorderRadius?: number;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
style?: import('react').CSSProperties;
|
|
230
|
+
className?: string;
|
|
231
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
232
|
+
focusable?: boolean;
|
|
233
|
+
data: import('../types').RelationshipData;
|
|
234
|
+
readonly id: string;
|
|
235
|
+
readonly type: "relationship";
|
|
236
236
|
}>, prevState: import('@xyflow/react').ReactFlowState<XYFlowNode, {
|
|
237
237
|
source: string;
|
|
238
238
|
target: string;
|
|
239
|
-
style?: import("react").CSSProperties;
|
|
240
|
-
id: string;
|
|
241
|
-
zIndex?: number;
|
|
242
|
-
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
243
|
-
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
244
|
-
hidden?: boolean;
|
|
245
|
-
className?: string;
|
|
246
|
-
label?: import("react").ReactNode;
|
|
247
|
-
selected?: boolean;
|
|
248
|
-
selectable?: boolean;
|
|
249
|
-
deletable?: boolean;
|
|
250
|
-
ariaLabel?: string;
|
|
251
|
-
focusable?: boolean;
|
|
252
239
|
sourceHandle?: string | null;
|
|
253
240
|
targetHandle?: string | null;
|
|
254
241
|
animated?: boolean;
|
|
242
|
+
hidden?: boolean;
|
|
243
|
+
deletable?: boolean;
|
|
244
|
+
selectable?: boolean;
|
|
245
|
+
selected?: boolean;
|
|
246
|
+
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
247
|
+
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
248
|
+
zIndex?: number;
|
|
249
|
+
ariaLabel?: string;
|
|
255
250
|
interactionWidth?: number;
|
|
256
|
-
|
|
251
|
+
label?: import('react').ReactNode;
|
|
252
|
+
labelStyle?: import('react').CSSProperties;
|
|
257
253
|
labelShowBg?: boolean;
|
|
258
|
-
labelBgStyle?: import(
|
|
254
|
+
labelBgStyle?: import('react').CSSProperties;
|
|
259
255
|
labelBgPadding?: [number, number];
|
|
260
256
|
labelBgBorderRadius?: number;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
style?: import('react').CSSProperties;
|
|
258
|
+
className?: string;
|
|
259
|
+
updatable?: import('@xyflow/react').EdgeUpdatable;
|
|
260
|
+
focusable?: boolean;
|
|
261
|
+
data: import('../types').RelationshipData;
|
|
262
|
+
readonly id: string;
|
|
263
|
+
readonly type: "relationship";
|
|
264
264
|
}>) => void) => () => void;
|
|
265
265
|
};
|
|
266
266
|
export type XYStoreApi = ReturnType<typeof useXYStoreApi>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const container: string;
|
|
2
|
+
export declare const dimmed: string;
|
|
2
3
|
export declare const varTransparency: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
3
4
|
export declare const compoundBody: string;
|
|
4
5
|
export declare const transparent: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CompoundXYFlowNode } from '../../types';
|
|
2
1
|
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { CompoundXYFlowNode } from '../../types';
|
|
3
3
|
|
|
4
4
|
type CompoundNodeProps = Pick<NodeProps<CompoundXYFlowNode>, 'id' | 'data' | 'width' | 'height' | 'selected'>;
|
|
5
5
|
export declare const CompoundNodeMemo: import('react').NamedExoticComponent<CompoundNodeProps>;
|
|
@@ -6,5 +6,5 @@ type ElementIconProps = {
|
|
|
6
6
|
paddingX?: number | undefined;
|
|
7
7
|
paddingY?: number | undefined;
|
|
8
8
|
};
|
|
9
|
-
export declare function ElementIcon({ node, paddingY }: ElementIconProps): JSX.Element | null;
|
|
9
|
+
export declare function ElementIcon({ node, paddingY }: ElementIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -3,5 +3,5 @@ import { XYFlowNode } from '../../types';
|
|
|
3
3
|
type ElementLinkProps = {
|
|
4
4
|
element: XYFlowNode['data']['element'];
|
|
5
5
|
};
|
|
6
|
-
export declare function ElementLink({ element }: ElementLinkProps): JSX.Element;
|
|
6
|
+
export declare function ElementLink({ element }: ElementLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementXYFlowNode } from '../../types';
|
|
2
1
|
import { NodeProps } from '@xyflow/react';
|
|
2
|
+
import { ElementXYFlowNode } from '../../types';
|
|
3
3
|
|
|
4
4
|
type ElementNodeProps = NodeProps<ElementXYFlowNode>;
|
|
5
|
-
export declare function ElementNode({ id, data: { element }, dragging, selected, width, height }: ElementNodeProps): JSX.Element;
|
|
5
|
+
export declare function ElementNode({ id, data: { element }, dragging, selected, width, height }: ElementNodeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -5,9 +5,9 @@ type ElementShapeSvgProps = {
|
|
|
5
5
|
w: number;
|
|
6
6
|
h: number;
|
|
7
7
|
};
|
|
8
|
-
export declare function ElementShapeSvg({ shape, w, h }: ElementShapeSvgProps): JSX.Element;
|
|
8
|
+
export declare function ElementShapeSvg({ shape, w, h }: ElementShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* When element is selected, this component is used to render the indicator
|
|
11
11
|
*/
|
|
12
|
-
export declare function SelectedIndicator({ shape, w, h }: ElementShapeSvgProps): JSX.Element;
|
|
12
|
+
export declare function SelectedIndicator({ shape, w, h }: ElementShapeSvgProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const stokeFillMix: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
2
2
|
export declare const container: string;
|
|
3
|
+
export declare const dimmed: string;
|
|
3
4
|
export declare const indicator: string;
|
|
4
5
|
export declare const fillElementFill: string;
|
|
5
6
|
export declare const fillElementStroke: string;
|
|
@@ -7,7 +8,7 @@ export declare const fillMixStroke: string;
|
|
|
7
8
|
export declare const title: string;
|
|
8
9
|
export declare const description: string;
|
|
9
10
|
export declare const technology: string;
|
|
10
|
-
export declare const
|
|
11
|
+
export declare const element: string;
|
|
11
12
|
export declare const iconMaxH: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
13
|
export declare const elementIcon: string;
|
|
13
14
|
export declare const cssShapeSvg: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type NavigateToBtnProps = {
|
|
3
2
|
xynodeId: string;
|
|
4
3
|
className?: string;
|
|
5
4
|
};
|
|
6
|
-
export declare function NavigateToBtn({ xynodeId, className }: NavigateToBtnProps): JSX.Element;
|
|
5
|
+
export declare function NavigateToBtn({ xynodeId, className }: NavigateToBtnProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/xyflow/types.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { SetReadonly, SetRequired, Simplify } from 'type-fest';
|
|
2
|
-
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
3
|
-
import { Edge, EdgeMouseHandler, InternalNode, Node, NodeMouseHandler, OnMoveEnd, OnMoveStart, ReactFlowInstance, ReactFlowState } from '@xyflow/react';
|
|
4
1
|
import { BBox, DiagramEdge, DiagramNode, Fqn, Point } from '@likec4/core';
|
|
2
|
+
import { Edge, EdgeMouseHandler, InternalNode, Node, NodeMouseHandler, OnMoveEnd, OnMoveStart, ReactFlowInstance, ReactFlowState } from '@xyflow/react';
|
|
3
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
4
|
+
import { SetReadonly, SetRequired } from 'type-fest';
|
|
5
5
|
|
|
6
6
|
export type ElementNodeData = {
|
|
7
7
|
fqn: Fqn;
|
|
8
8
|
element: DiagramNode;
|
|
9
9
|
};
|
|
10
10
|
type TypedXYFlowNode<D extends Record<string, unknown>, T extends string> = SetReadonly<SetRequired<Node<D, T>, 'type'>, 'id' | 'type'>;
|
|
11
|
+
type TypedXYFlowEdge<D extends Record<string, unknown>, T extends string> = SetReadonly<SetRequired<Edge<D, T>, 'type' | 'data'>, 'id' | 'type'>;
|
|
11
12
|
export type ElementXYFlowNode = TypedXYFlowNode<ElementNodeData, 'element'>;
|
|
12
13
|
export type CompoundNodeData = {
|
|
13
14
|
fqn: Fqn;
|
|
@@ -28,45 +29,44 @@ export type RelationshipData = {
|
|
|
28
29
|
headPoint: Point | null;
|
|
29
30
|
tailPoint: Point | null;
|
|
30
31
|
type: 'bezier' | 'poly';
|
|
32
|
+
stepNum: number | null;
|
|
31
33
|
label: null | {
|
|
32
34
|
bbox: BBox;
|
|
33
35
|
text: string;
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
|
-
export type RelationshipEdge =
|
|
37
|
-
type: 'relationship';
|
|
38
|
-
}>;
|
|
38
|
+
export type RelationshipEdge = TypedXYFlowEdge<RelationshipData, 'relationship'>;
|
|
39
39
|
export type XYFlowEdge = RelationshipEdge;
|
|
40
40
|
export declare namespace XYFlowEdge {
|
|
41
41
|
type Data = RelationshipData;
|
|
42
42
|
const isRelationship: (e: Edge) => e is {
|
|
43
43
|
source: string;
|
|
44
44
|
target: string;
|
|
45
|
-
style?: import('react').CSSProperties;
|
|
46
|
-
id: string;
|
|
47
|
-
zIndex?: number;
|
|
48
|
-
markerEnd?: import('@xyflow/react').EdgeMarkerType;
|
|
49
|
-
markerStart?: import('@xyflow/react').EdgeMarkerType;
|
|
50
|
-
hidden?: boolean;
|
|
51
|
-
className?: string;
|
|
52
|
-
label?: import('react').ReactNode;
|
|
53
|
-
selected?: boolean;
|
|
54
|
-
selectable?: boolean;
|
|
55
|
-
deletable?: boolean;
|
|
56
|
-
ariaLabel?: string;
|
|
57
|
-
focusable?: boolean;
|
|
58
45
|
sourceHandle?: string | null;
|
|
59
46
|
targetHandle?: string | null;
|
|
60
47
|
animated?: boolean;
|
|
48
|
+
hidden?: boolean;
|
|
49
|
+
deletable?: boolean;
|
|
50
|
+
selectable?: boolean;
|
|
51
|
+
selected?: boolean;
|
|
52
|
+
markerStart?: import("@xyflow/react").EdgeMarkerType;
|
|
53
|
+
markerEnd?: import("@xyflow/react").EdgeMarkerType;
|
|
54
|
+
zIndex?: number;
|
|
55
|
+
ariaLabel?: string;
|
|
61
56
|
interactionWidth?: number;
|
|
62
|
-
|
|
57
|
+
label?: import("react").ReactNode;
|
|
58
|
+
labelStyle?: import("react").CSSProperties;
|
|
63
59
|
labelShowBg?: boolean;
|
|
64
|
-
labelBgStyle?: import(
|
|
60
|
+
labelBgStyle?: import("react").CSSProperties;
|
|
65
61
|
labelBgPadding?: [number, number];
|
|
66
62
|
labelBgBorderRadius?: number;
|
|
67
|
-
|
|
63
|
+
style?: import("react").CSSProperties;
|
|
64
|
+
className?: string;
|
|
65
|
+
updatable?: import("@xyflow/react").EdgeUpdatable;
|
|
66
|
+
focusable?: boolean;
|
|
68
67
|
data: RelationshipData;
|
|
69
|
-
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly type: "relationship";
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
export type XYFlowInstance = ReactFlowInstance<XYFlowNode, XYFlowEdge>;
|