@likec4/diagram 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { XYFlowEdge, XYFlowNode } from './types';
2
1
  import { CSSProperties, PropsWithChildren } from 'react';
2
+ import { XYFlowEdge, XYFlowNode } from './types';
3
3
 
4
4
  type XYFlowWrapperProps = PropsWithChildren<{
5
5
  className?: string | undefined;
@@ -1,5 +1,5 @@
1
- import { OverrideProperties } from 'type-fest';
2
1
  import { BackgroundProps } from '@xyflow/react';
2
+ import { OverrideProperties } from 'type-fest';
3
3
 
4
4
  export type XYBackgroundVariant = 'dots' | 'lines' | 'cross';
5
5
  export type XYBackground = XYBackgroundVariant | OverrideProperties<BackgroundProps, {
@@ -66,9 +66,9 @@ export declare function useXYFlowEvents(): {
66
66
  readonly type: "relationship";
67
67
  }) => void;
68
68
  onMoveEnd: (event: MouseEvent | TouchEvent | null, _viewport: import('@xyflow/react').Viewport) => void;
69
- onNodeMouseEnter: (event: import('react').MouseEvent<Element, MouseEvent>, xynode: XYFlowNode) => void;
70
- onNodeMouseLeave: (event: import('react').MouseEvent<Element, MouseEvent>, xynode: XYFlowNode) => void;
71
- onEdgeMouseEnter: (event: import('react').MouseEvent<Element, MouseEvent>, { id, source, target }: {
69
+ onNodeMouseEnter: (_event: import('react').MouseEvent<Element, MouseEvent>, xynode: XYFlowNode) => void;
70
+ onNodeMouseLeave: (_event: import('react').MouseEvent<Element, MouseEvent>, xynode: XYFlowNode) => void;
71
+ onEdgeMouseEnter: (_event: import('react').MouseEvent<Element, MouseEvent>, { id, source, target }: {
72
72
  source: string;
73
73
  target: string;
74
74
  sourceHandle?: string | null;
@@ -97,7 +97,7 @@ export declare function useXYFlowEvents(): {
97
97
  readonly id: string;
98
98
  readonly type: "relationship";
99
99
  }) => void;
100
- onEdgeMouseLeave: (event: import('react').MouseEvent<Element, MouseEvent>, xyedge: {
100
+ onEdgeMouseLeave: (_event: import('react').MouseEvent<Element, MouseEvent>, xyedge: {
101
101
  source: string;
102
102
  target: string;
103
103
  sourceHandle?: string | null;
@@ -1,5 +1,5 @@
1
- import { LikeC4DiagramProperties } from '../LikeC4Diagram.props';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { LikeC4DiagramProperties } from '../LikeC4Diagram.props';
3
3
 
4
4
  type XYFlowInnerProps = PropsWithChildren<{
5
5
  background: NonNullable<LikeC4DiagramProperties['background']>;
@@ -1,5 +1,5 @@
1
- import { XYFlowData } from '../xyflow/types';
2
1
  import { DiagramView } from '@likec4/core';
2
+ import { XYFlowData } from '../xyflow/types';
3
3
 
4
4
  export declare function diagramViewToXYFlowData(view: Pick<DiagramView, 'nodes' | 'edges' | '__'>, opts: {
5
5
  draggable: boolean;
@@ -1,5 +1,5 @@
1
- import { CSSProperties } from 'react';
2
1
  import { EdgeProps } from '@xyflow/react';
2
+ import { CSSProperties } from 'react';
3
3
 
4
4
  export declare const RelationshipEdge: import('react').NamedExoticComponent<EdgeProps<{
5
5
  source: string;
@@ -11,12 +11,12 @@ export declare const RelationshipEdge: import('react').NamedExoticComponent<Edge
11
11
  deletable?: boolean;
12
12
  selectable?: boolean;
13
13
  selected?: boolean;
14
- markerStart?: import("@xyflow/react").EdgeMarkerType;
15
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
14
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
15
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
16
16
  zIndex?: number;
17
17
  ariaLabel?: string;
18
18
  interactionWidth?: number;
19
- label?: import("react").ReactNode;
19
+ label?: import('react').ReactNode;
20
20
  labelStyle?: CSSProperties;
21
21
  labelShowBg?: boolean;
22
22
  labelBgStyle?: CSSProperties;
@@ -24,9 +24,9 @@ export declare const RelationshipEdge: import('react').NamedExoticComponent<Edge
24
24
  labelBgBorderRadius?: number;
25
25
  style?: CSSProperties;
26
26
  className?: string;
27
- updatable?: import("@xyflow/react").EdgeUpdatable;
27
+ updatable?: import('@xyflow/react').EdgeUpdatable;
28
28
  focusable?: boolean;
29
- data: import("../types").RelationshipData;
29
+ data: import('../types').RelationshipData;
30
30
  readonly id: string;
31
31
  readonly type: "relationship";
32
32
  }>>;
@@ -1,6 +1,6 @@
1
- import { InternalXYFlowNode } from '../types';
2
- import { Position, XYPosition } from '@xyflow/react';
3
1
  import { Point } from '@likec4/core';
2
+ import { Position, XYPosition } from '@xyflow/react';
3
+ import { InternalXYFlowNode } from '../types';
4
4
 
5
5
  export declare function getNodeIntersectionFromCenterToPoint(intersectionNode: InternalXYFlowNode, [x1, y1]: Point): readonly [number, number];
6
6
  export declare function getPointPosition(node: InternalXYFlowNode, intersectionPoint: XYPosition): readonly [number, number, Position];
@@ -1,5 +1,5 @@
1
- import { XYFlowNode } from '../types';
2
1
  import { ReactFlowProps } from '@xyflow/react';
2
+ import { XYFlowNode } from '../types';
3
3
 
4
4
  type LayoutConstraints = Required<Pick<ReactFlowProps<XYFlowNode>, 'onNodeDragStart' | 'onNodeDrag' | 'onNodeDragStop'>>;
5
5
  /**
@@ -10,22 +10,22 @@ export declare const useXYFlow: () => import('@xyflow/react').ReactFlowInstance<
10
10
  deletable?: boolean;
11
11
  selectable?: boolean;
12
12
  selected?: boolean;
13
- markerStart?: import("@xyflow/react").EdgeMarkerType;
14
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
13
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
14
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
15
15
  zIndex?: number;
16
16
  ariaLabel?: string;
17
17
  interactionWidth?: number;
18
- label?: import("react").ReactNode;
19
- labelStyle?: import("react").CSSProperties;
18
+ label?: import('react').ReactNode;
19
+ labelStyle?: import('react').CSSProperties;
20
20
  labelShowBg?: boolean;
21
- labelBgStyle?: import("react").CSSProperties;
21
+ labelBgStyle?: import('react').CSSProperties;
22
22
  labelBgPadding?: [number, number];
23
23
  labelBgBorderRadius?: number;
24
- style?: import("react").CSSProperties;
24
+ style?: import('react').CSSProperties;
25
25
  className?: string;
26
- updatable?: import("@xyflow/react").EdgeUpdatable;
26
+ updatable?: import('@xyflow/react').EdgeUpdatable;
27
27
  focusable?: boolean;
28
- data: import("../types").RelationshipData;
28
+ data: import('../types').RelationshipData;
29
29
  readonly id: string;
30
30
  readonly type: "relationship";
31
31
  }>;
@@ -45,22 +45,22 @@ export declare const useXYStoreApi: () => {
45
45
  deletable?: boolean;
46
46
  selectable?: boolean;
47
47
  selected?: boolean;
48
- markerStart?: import("@xyflow/react").EdgeMarkerType;
49
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
48
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
49
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
50
50
  zIndex?: number;
51
51
  ariaLabel?: string;
52
52
  interactionWidth?: number;
53
- label?: import("react").ReactNode;
54
- labelStyle?: import("react").CSSProperties;
53
+ label?: import('react').ReactNode;
54
+ labelStyle?: import('react').CSSProperties;
55
55
  labelShowBg?: boolean;
56
- labelBgStyle?: import("react").CSSProperties;
56
+ labelBgStyle?: import('react').CSSProperties;
57
57
  labelBgPadding?: [number, number];
58
58
  labelBgBorderRadius?: number;
59
- style?: import("react").CSSProperties;
59
+ style?: import('react').CSSProperties;
60
60
  className?: string;
61
- updatable?: import("@xyflow/react").EdgeUpdatable;
61
+ updatable?: import('@xyflow/react').EdgeUpdatable;
62
62
  focusable?: boolean;
63
- data: import("../types").RelationshipData;
63
+ data: import('../types').RelationshipData;
64
64
  readonly id: string;
65
65
  readonly type: "relationship";
66
66
  }>;
@@ -74,22 +74,22 @@ export declare const useXYStoreApi: () => {
74
74
  deletable?: boolean;
75
75
  selectable?: boolean;
76
76
  selected?: boolean;
77
- markerStart?: import("@xyflow/react").EdgeMarkerType;
78
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
77
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
78
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
79
79
  zIndex?: number;
80
80
  ariaLabel?: string;
81
81
  interactionWidth?: number;
82
- label?: import("react").ReactNode;
83
- labelStyle?: import("react").CSSProperties;
82
+ label?: import('react').ReactNode;
83
+ labelStyle?: import('react').CSSProperties;
84
84
  labelShowBg?: boolean;
85
- labelBgStyle?: import("react").CSSProperties;
85
+ labelBgStyle?: import('react').CSSProperties;
86
86
  labelBgPadding?: [number, number];
87
87
  labelBgBorderRadius?: number;
88
- style?: import("react").CSSProperties;
88
+ style?: import('react').CSSProperties;
89
89
  className?: string;
90
- updatable?: import("@xyflow/react").EdgeUpdatable;
90
+ updatable?: import('@xyflow/react').EdgeUpdatable;
91
91
  focusable?: boolean;
92
- data: import("../types").RelationshipData;
92
+ data: import('../types').RelationshipData;
93
93
  readonly id: string;
94
94
  readonly type: "relationship";
95
95
  }> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
@@ -102,22 +102,22 @@ export declare const useXYStoreApi: () => {
102
102
  deletable?: boolean;
103
103
  selectable?: boolean;
104
104
  selected?: boolean;
105
- markerStart?: import("@xyflow/react").EdgeMarkerType;
106
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
105
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
106
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
107
107
  zIndex?: number;
108
108
  ariaLabel?: string;
109
109
  interactionWidth?: number;
110
- label?: import("react").ReactNode;
111
- labelStyle?: import("react").CSSProperties;
110
+ label?: import('react').ReactNode;
111
+ labelStyle?: import('react').CSSProperties;
112
112
  labelShowBg?: boolean;
113
- labelBgStyle?: import("react").CSSProperties;
113
+ labelBgStyle?: import('react').CSSProperties;
114
114
  labelBgPadding?: [number, number];
115
115
  labelBgBorderRadius?: number;
116
- style?: import("react").CSSProperties;
116
+ style?: import('react').CSSProperties;
117
117
  className?: string;
118
- updatable?: import("@xyflow/react").EdgeUpdatable;
118
+ updatable?: import('@xyflow/react').EdgeUpdatable;
119
119
  focusable?: boolean;
120
- data: import("../types").RelationshipData;
120
+ data: import('../types').RelationshipData;
121
121
  readonly id: string;
122
122
  readonly type: "relationship";
123
123
  }>> | ((state: import('@xyflow/react').ReactFlowState<XYFlowNode, {
@@ -130,22 +130,22 @@ export declare const useXYStoreApi: () => {
130
130
  deletable?: boolean;
131
131
  selectable?: boolean;
132
132
  selected?: boolean;
133
- markerStart?: import("@xyflow/react").EdgeMarkerType;
134
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
133
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
134
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
135
135
  zIndex?: number;
136
136
  ariaLabel?: string;
137
137
  interactionWidth?: number;
138
- label?: import("react").ReactNode;
139
- labelStyle?: import("react").CSSProperties;
138
+ label?: import('react').ReactNode;
139
+ labelStyle?: import('react').CSSProperties;
140
140
  labelShowBg?: boolean;
141
- labelBgStyle?: import("react").CSSProperties;
141
+ labelBgStyle?: import('react').CSSProperties;
142
142
  labelBgPadding?: [number, number];
143
143
  labelBgBorderRadius?: number;
144
- style?: import("react").CSSProperties;
144
+ style?: import('react').CSSProperties;
145
145
  className?: string;
146
- updatable?: import("@xyflow/react").EdgeUpdatable;
146
+ updatable?: import('@xyflow/react').EdgeUpdatable;
147
147
  focusable?: boolean;
148
- data: import("../types").RelationshipData;
148
+ data: import('../types').RelationshipData;
149
149
  readonly id: string;
150
150
  readonly type: "relationship";
151
151
  }>) => import('@xyflow/react').ReactFlowState<XYFlowNode, {
@@ -158,22 +158,22 @@ export declare const useXYStoreApi: () => {
158
158
  deletable?: boolean;
159
159
  selectable?: boolean;
160
160
  selected?: boolean;
161
- markerStart?: import("@xyflow/react").EdgeMarkerType;
162
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
161
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
162
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
163
163
  zIndex?: number;
164
164
  ariaLabel?: string;
165
165
  interactionWidth?: number;
166
- label?: import("react").ReactNode;
167
- labelStyle?: import("react").CSSProperties;
166
+ label?: import('react').ReactNode;
167
+ labelStyle?: import('react').CSSProperties;
168
168
  labelShowBg?: boolean;
169
- labelBgStyle?: import("react").CSSProperties;
169
+ labelBgStyle?: import('react').CSSProperties;
170
170
  labelBgPadding?: [number, number];
171
171
  labelBgBorderRadius?: number;
172
- style?: import("react").CSSProperties;
172
+ style?: import('react').CSSProperties;
173
173
  className?: string;
174
- updatable?: import("@xyflow/react").EdgeUpdatable;
174
+ updatable?: import('@xyflow/react').EdgeUpdatable;
175
175
  focusable?: boolean;
176
- data: import("../types").RelationshipData;
176
+ data: import('../types').RelationshipData;
177
177
  readonly id: string;
178
178
  readonly type: "relationship";
179
179
  }> | Partial<import('@xyflow/react').ReactFlowState<XYFlowNode, {
@@ -186,22 +186,22 @@ export declare const useXYStoreApi: () => {
186
186
  deletable?: boolean;
187
187
  selectable?: boolean;
188
188
  selected?: boolean;
189
- markerStart?: import("@xyflow/react").EdgeMarkerType;
190
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
189
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
190
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
191
191
  zIndex?: number;
192
192
  ariaLabel?: string;
193
193
  interactionWidth?: number;
194
- label?: import("react").ReactNode;
195
- labelStyle?: import("react").CSSProperties;
194
+ label?: import('react').ReactNode;
195
+ labelStyle?: import('react').CSSProperties;
196
196
  labelShowBg?: boolean;
197
- labelBgStyle?: import("react").CSSProperties;
197
+ labelBgStyle?: import('react').CSSProperties;
198
198
  labelBgPadding?: [number, number];
199
199
  labelBgBorderRadius?: number;
200
- style?: import("react").CSSProperties;
200
+ style?: import('react').CSSProperties;
201
201
  className?: string;
202
- updatable?: import("@xyflow/react").EdgeUpdatable;
202
+ updatable?: import('@xyflow/react').EdgeUpdatable;
203
203
  focusable?: boolean;
204
- data: import("../types").RelationshipData;
204
+ data: import('../types').RelationshipData;
205
205
  readonly id: string;
206
206
  readonly type: "relationship";
207
207
  }>>), replace?: boolean | undefined) => void;
@@ -215,22 +215,22 @@ export declare const useXYStoreApi: () => {
215
215
  deletable?: boolean;
216
216
  selectable?: boolean;
217
217
  selected?: boolean;
218
- markerStart?: import("@xyflow/react").EdgeMarkerType;
219
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
218
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
219
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
220
220
  zIndex?: number;
221
221
  ariaLabel?: string;
222
222
  interactionWidth?: number;
223
- label?: import("react").ReactNode;
224
- labelStyle?: import("react").CSSProperties;
223
+ label?: import('react').ReactNode;
224
+ labelStyle?: import('react').CSSProperties;
225
225
  labelShowBg?: boolean;
226
- labelBgStyle?: import("react").CSSProperties;
226
+ labelBgStyle?: import('react').CSSProperties;
227
227
  labelBgPadding?: [number, number];
228
228
  labelBgBorderRadius?: number;
229
- style?: import("react").CSSProperties;
229
+ style?: import('react').CSSProperties;
230
230
  className?: string;
231
- updatable?: import("@xyflow/react").EdgeUpdatable;
231
+ updatable?: import('@xyflow/react').EdgeUpdatable;
232
232
  focusable?: boolean;
233
- data: import("../types").RelationshipData;
233
+ data: import('../types').RelationshipData;
234
234
  readonly id: string;
235
235
  readonly type: "relationship";
236
236
  }>, prevState: import('@xyflow/react').ReactFlowState<XYFlowNode, {
@@ -243,22 +243,22 @@ export declare const useXYStoreApi: () => {
243
243
  deletable?: boolean;
244
244
  selectable?: boolean;
245
245
  selected?: boolean;
246
- markerStart?: import("@xyflow/react").EdgeMarkerType;
247
- markerEnd?: import("@xyflow/react").EdgeMarkerType;
246
+ markerStart?: import('@xyflow/react').EdgeMarkerType;
247
+ markerEnd?: import('@xyflow/react').EdgeMarkerType;
248
248
  zIndex?: number;
249
249
  ariaLabel?: string;
250
250
  interactionWidth?: number;
251
- label?: import("react").ReactNode;
252
- labelStyle?: import("react").CSSProperties;
251
+ label?: import('react').ReactNode;
252
+ labelStyle?: import('react').CSSProperties;
253
253
  labelShowBg?: boolean;
254
- labelBgStyle?: import("react").CSSProperties;
254
+ labelBgStyle?: import('react').CSSProperties;
255
255
  labelBgPadding?: [number, number];
256
256
  labelBgBorderRadius?: number;
257
- style?: import("react").CSSProperties;
257
+ style?: import('react').CSSProperties;
258
258
  className?: string;
259
- updatable?: import("@xyflow/react").EdgeUpdatable;
259
+ updatable?: import('@xyflow/react').EdgeUpdatable;
260
260
  focusable?: boolean;
261
- data: import("../types").RelationshipData;
261
+ data: import('../types').RelationshipData;
262
262
  readonly id: string;
263
263
  readonly type: "relationship";
264
264
  }>) => void) => () => void;
@@ -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>;
@@ -1,5 +1,5 @@
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
5
  export declare function ElementNode({ id, data: { element }, dragging, selected, width, height }: ElementNodeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { SetReadonly, SetRequired } 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;
@@ -49,20 +49,20 @@ export declare namespace XYFlowEdge {
49
49
  deletable?: boolean;
50
50
  selectable?: boolean;
51
51
  selected?: boolean;
52
- markerStart?: import('@xyflow/react').EdgeMarkerType;
53
- markerEnd?: import('@xyflow/react').EdgeMarkerType;
52
+ markerStart?: import("@xyflow/react").EdgeMarkerType;
53
+ markerEnd?: import("@xyflow/react").EdgeMarkerType;
54
54
  zIndex?: number;
55
55
  ariaLabel?: string;
56
56
  interactionWidth?: number;
57
- label?: import('react').ReactNode;
58
- labelStyle?: import('react').CSSProperties;
57
+ label?: import("react").ReactNode;
58
+ labelStyle?: import("react").CSSProperties;
59
59
  labelShowBg?: boolean;
60
- labelBgStyle?: import('react').CSSProperties;
60
+ labelBgStyle?: import("react").CSSProperties;
61
61
  labelBgPadding?: [number, number];
62
62
  labelBgBorderRadius?: number;
63
- style?: import('react').CSSProperties;
63
+ style?: import("react").CSSProperties;
64
64
  className?: string;
65
- updatable?: import('@xyflow/react').EdgeUpdatable;
65
+ updatable?: import("@xyflow/react").EdgeUpdatable;
66
66
  focusable?: boolean;
67
67
  data: RelationshipData;
68
68
  readonly id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/diagram",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "license": "MIT",
5
5
  "bugs": "https://github.com/likec4/likec4/issues",
6
6
  "homepage": "https://likec4.dev",
@@ -42,15 +42,13 @@
42
42
  },
43
43
  "packageManager": "yarn@4.3.0",
44
44
  "scripts": {
45
- "typecheck": "tsc -b",
45
+ "typecheck": "tsc --noEmit",
46
46
  "prepack": "vite build --mode production",
47
- "build:turbo": "run -T turbo build --filter='diagram'",
48
- "build": "vite build --mode development && tsc -b",
49
47
  "lint": "run -T eslint src/ --fix",
50
48
  "clean": "run -T rimraf -v -g 'dist/*' .tsbuildinfo"
51
49
  },
52
50
  "dependencies": {
53
- "@likec4/core": "1.2.0",
51
+ "@likec4/core": "1.2.2",
54
52
  "@react-hookz/web": "^24.0.4",
55
53
  "@tabler/icons-react": "^3.0.0",
56
54
  "d3-shape": "^3.2.0",
@@ -67,6 +65,7 @@
67
65
  "react-dom": "^18.3.1"
68
66
  },
69
67
  "devDependencies": {
68
+ "@likec4/tsconfig": "1.2.2",
70
69
  "@lume/kiwi": "^0.4.3",
71
70
  "@mantine/core": "^7.10.1",
72
71
  "@mantine/hooks": "^7.10.1",
@@ -79,7 +78,7 @@
79
78
  "@vanilla-extract/css": "^1.15.2",
80
79
  "@vanilla-extract/dynamic": "^2.1.1",
81
80
  "@vanilla-extract/esbuild-plugin": "^2.3.6",
82
- "@vitejs/plugin-react": "^4.2.1",
81
+ "@vitejs/plugin-react": "^4.3.1",
83
82
  "@xyflow/react": "^12.0.0-next",
84
83
  "bezier-js": "^6.1.4",
85
84
  "clsx": "^2.1.1",
@@ -91,7 +90,7 @@
91
90
  "type-fest": "^4.18.2",
92
91
  "typescript": "^5.4.5",
93
92
  "unbuild": "^2.0.0",
94
- "vite": "^5.2.11",
95
- "vite-plugin-dts": "^3.8.1"
93
+ "vite": "5.3.0",
94
+ "vite-plugin-dts": "^3.9.1"
96
95
  }
97
96
  }
@@ -164,20 +164,20 @@ export function useXYFlowEvents() {
164
164
  diagramApi.setState({ viewportChanged }, false, `viewport-changed: ${viewportChanged}`)
165
165
  }
166
166
  },
167
- onNodeMouseEnter: (event, xynode) => {
167
+ onNodeMouseEnter: (_event, xynode) => {
168
168
  hoveredNodeFromOnEdgeEnterRef.current = ''
169
169
  const { hoveredNodeId, setHoveredNode } = diagramApi.getState()
170
170
  if (hoveredNodeId !== xynode.id) {
171
171
  setHoveredNode(xynode.id)
172
172
  }
173
173
  },
174
- onNodeMouseLeave: (event, xynode) => {
174
+ onNodeMouseLeave: (_event, xynode) => {
175
175
  const { hoveredNodeId, setHoveredNode } = diagramApi.getState()
176
176
  if (hoveredNodeId === xynode.id) {
177
177
  setHoveredNode(null)
178
178
  }
179
179
  },
180
- onEdgeMouseEnter: (event, { id, source, target }) => {
180
+ onEdgeMouseEnter: (_event, { id, source, target }) => {
181
181
  const { hoveredNodeId, focusedNodeId, setHoveredEdge, setHoveredNode } = diagramApi.getState()
182
182
  setHoveredEdge(id)
183
183
  if ((focusedNodeId === source || focusedNodeId === target) && focusedNodeId !== hoveredNodeId) {
@@ -185,7 +185,7 @@ export function useXYFlowEvents() {
185
185
  setHoveredNode(next)
186
186
  }
187
187
  },
188
- onEdgeMouseLeave: (event, xyedge) => {
188
+ onEdgeMouseLeave: (_event, xyedge) => {
189
189
  const { hoveredEdgeId, setHoveredEdge, hoveredNodeId, setHoveredNode } = diagramApi.getState()
190
190
  if (hoveredEdgeId === xyedge.id) {
191
191
  setHoveredEdge(null)