@xyflow/system 0.0.20 → 0.0.21
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.
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { XYPosition, Dimensions, NodeBase, EdgeBase } from '.';
|
|
2
|
+
export type NodeDimensionChange = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: 'dimensions';
|
|
5
|
+
dimensions?: Dimensions;
|
|
6
|
+
resizing?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type NodePositionChange = {
|
|
9
|
+
id: string;
|
|
10
|
+
type: 'position';
|
|
11
|
+
position?: XYPosition;
|
|
12
|
+
positionAbsolute?: XYPosition;
|
|
13
|
+
dragging?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type NodeSelectionChange = {
|
|
16
|
+
id: string;
|
|
17
|
+
type: 'select';
|
|
18
|
+
selected: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type NodeRemoveChange = {
|
|
21
|
+
id: string;
|
|
22
|
+
type: 'remove';
|
|
23
|
+
};
|
|
24
|
+
export type NodeAddChange<NodeType extends NodeBase = NodeBase> = {
|
|
25
|
+
item: NodeType;
|
|
26
|
+
type: 'add';
|
|
27
|
+
};
|
|
28
|
+
export type NodeReplaceChange<NodeType extends NodeBase = NodeBase> = {
|
|
29
|
+
id: string;
|
|
30
|
+
item: NodeType;
|
|
31
|
+
type: 'replace';
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Union type of all possible node changes.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export type NodeChange<NodeType extends NodeBase = NodeBase> = NodeDimensionChange | NodePositionChange | NodeSelectionChange | NodeRemoveChange | NodeAddChange<NodeType> | NodeReplaceChange<NodeType>;
|
|
38
|
+
export type EdgeSelectionChange = NodeSelectionChange;
|
|
39
|
+
export type EdgeRemoveChange = NodeRemoveChange;
|
|
40
|
+
export type EdgeAddChange<EdgeType extends EdgeBase = EdgeBase> = {
|
|
41
|
+
item: EdgeType;
|
|
42
|
+
type: 'add';
|
|
43
|
+
};
|
|
44
|
+
export type EdgeReplaceChange<EdgeType extends EdgeBase = EdgeBase> = {
|
|
45
|
+
id: string;
|
|
46
|
+
item: EdgeType;
|
|
47
|
+
type: 'replace';
|
|
48
|
+
};
|
|
49
|
+
export type EdgeChange<EdgeType extends EdgeBase = EdgeBase> = EdgeSelectionChange | EdgeRemoveChange | EdgeAddChange<EdgeType> | EdgeReplaceChange<EdgeType>;
|
|
50
|
+
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/types/changes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,Q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5
5
|
"keywords": [
|
|
6
6
|
"node-based UI",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@types/node": "^18.7.16",
|
|
49
49
|
"typescript": "5.1.3",
|
|
50
50
|
"@xyflow/rollup-config": "0.0.0",
|
|
51
|
-
"@xyflow/
|
|
52
|
-
"@xyflow/
|
|
51
|
+
"@xyflow/eslint-config": "0.0.0",
|
|
52
|
+
"@xyflow/tsconfig": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"rollup": {
|
|
55
55
|
"globals": {
|