@react-fabric/graph 1.0.0-beta.63 → 1.0.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/cjs/context/context.js +16 -0
- package/dist/cjs/graph/index.js +58 -381
- package/dist/cjs/index.js +25 -21
- package/dist/cjs/utils/edge.js +76 -0
- package/dist/cjs/utils/node.js +93 -0
- package/dist/cjs/utils/sdfFolder.js +107 -0
- package/dist/cjs/viewer/Graph.js +174 -0
- package/dist/esm/context/context.js +15 -0
- package/dist/esm/graph/index.js +59 -382
- package/dist/esm/index.js +24 -20
- package/dist/esm/utils/edge.js +75 -0
- package/dist/esm/utils/node.js +92 -0
- package/dist/esm/utils/sdfFolder.js +107 -0
- package/dist/esm/viewer/Graph.js +174 -0
- package/dist/types/context/context.d.ts +35 -0
- package/dist/types/graph/index.d.ts +47 -24
- package/dist/types/index.d.ts +28 -2
- package/dist/types/types/index.d.ts +124 -175
- package/dist/types/utils/edge.d.ts +28 -0
- package/dist/types/utils/node.d.ts +28 -0
- package/dist/types/utils/sdfFolder.d.ts +75 -0
- package/dist/types/viewer/Graph.d.ts +31 -0
- package/package.json +19 -25
- package/src/context/context.tsx +43 -0
- package/src/graph/index.ts +76 -399
- package/src/index.ts +24 -26
- package/src/types/index.ts +139 -185
- package/src/utils/edge.ts +65 -0
- package/src/utils/node.ts +105 -0
- package/src/utils/sdfFolder.ts +141 -0
- package/src/viewer/Graph.tsx +159 -0
- package/css/styles.css +0 -56
- package/dist/cjs/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +0 -14
- package/dist/cjs/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +0 -9
- package/dist/cjs/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -35
- package/dist/cjs/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +0 -11
- package/dist/cjs/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +0 -20
- package/dist/cjs/_virtual/elk-worker.js +0 -8
- package/dist/cjs/components/ContextMenu.js +0 -133
- package/dist/cjs/components/Provider.js +0 -103
- package/dist/cjs/components/Tools.js +0 -205
- package/dist/cjs/components/Viewer.js +0 -59
- package/dist/cjs/components/context.js +0 -34
- package/dist/cjs/constants/index.js +0 -16
- package/dist/cjs/hooks/sigmaDragSelect.js +0 -169
- package/dist/cjs/hooks/sigmaHilighter.js +0 -83
- package/dist/cjs/hooks/sigmaMouseActions.js +0 -145
- package/dist/cjs/hooks/useGraphology.js +0 -41
- package/dist/cjs/hooks/useSigma.js +0 -112
- package/dist/cjs/programs/arrow-head/frag.glsl.js +0 -8
- package/dist/cjs/programs/arrow-head/index.js +0 -142
- package/dist/cjs/programs/arrow-head/vert.glsl.js +0 -8
- package/dist/cjs/programs/edge-curve/drawLabel.js +0 -136
- package/dist/cjs/programs/edge-curve/frag.glsl.js +0 -8
- package/dist/cjs/programs/edge-curve/index.js +0 -157
- package/dist/cjs/programs/edge-curve/vert.glsl.js +0 -8
- package/dist/cjs/programs/edge-line/drawLabel.js +0 -70
- package/dist/cjs/programs/edge-line/frag.glsl.js +0 -8
- package/dist/cjs/programs/edge-line/index.js +0 -166
- package/dist/cjs/programs/edge-line/vert.glsl.js +0 -8
- package/dist/cjs/programs/node-badge/factory.js +0 -250
- package/dist/cjs/programs/node-badge/frag.glsl.js +0 -8
- package/dist/cjs/programs/node-badge/index.js +0 -33
- package/dist/cjs/programs/node-badge/texture.js +0 -455
- package/dist/cjs/programs/node-badge/vert.glsl.js +0 -19
- package/dist/cjs/programs/node-circle/base/drawHover.js +0 -71
- package/dist/cjs/programs/node-circle/base/drawLabel.js +0 -113
- package/dist/cjs/programs/node-circle/base/frag.glsl.js +0 -8
- package/dist/cjs/programs/node-circle/base/index.js +0 -136
- package/dist/cjs/programs/node-circle/base/vert.glsl.js +0 -8
- package/dist/cjs/programs/node-circle/index.js +0 -15
- package/dist/cjs/programs/node-image/factory.js +0 -224
- package/dist/cjs/programs/node-image/frag.glsl.js +0 -8
- package/dist/cjs/programs/node-image/index.js +0 -14
- package/dist/cjs/programs/node-image/texture.js +0 -472
- package/dist/cjs/programs/node-image/vert.glsl.js +0 -8
- package/dist/cjs/programs/node-rect/base/drawHover.js +0 -68
- package/dist/cjs/programs/node-rect/base/drawLabel.js +0 -107
- package/dist/cjs/programs/node-rect/base/frag.glsl.js +0 -8
- package/dist/cjs/programs/node-rect/base/index.js +0 -135
- package/dist/cjs/programs/node-rect/base/vert.glsl.js +0 -8
- package/dist/cjs/programs/node-rect/index.js +0 -15
- package/dist/esm/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +0 -14
- package/dist/esm/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +0 -9
- package/dist/esm/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -34
- package/dist/esm/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +0 -13
- package/dist/esm/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +0 -20
- package/dist/esm/_virtual/elk-worker.js +0 -8
- package/dist/esm/components/ContextMenu.js +0 -133
- package/dist/esm/components/Provider.js +0 -103
- package/dist/esm/components/Tools.js +0 -205
- package/dist/esm/components/Viewer.js +0 -59
- package/dist/esm/components/context.js +0 -33
- package/dist/esm/constants/index.js +0 -16
- package/dist/esm/hooks/sigmaDragSelect.js +0 -169
- package/dist/esm/hooks/sigmaHilighter.js +0 -83
- package/dist/esm/hooks/sigmaMouseActions.js +0 -145
- package/dist/esm/hooks/useGraphology.js +0 -41
- package/dist/esm/hooks/useSigma.js +0 -112
- package/dist/esm/programs/arrow-head/frag.glsl.js +0 -8
- package/dist/esm/programs/arrow-head/index.js +0 -141
- package/dist/esm/programs/arrow-head/vert.glsl.js +0 -8
- package/dist/esm/programs/edge-curve/drawLabel.js +0 -136
- package/dist/esm/programs/edge-curve/frag.glsl.js +0 -8
- package/dist/esm/programs/edge-curve/index.js +0 -156
- package/dist/esm/programs/edge-curve/vert.glsl.js +0 -8
- package/dist/esm/programs/edge-line/drawLabel.js +0 -70
- package/dist/esm/programs/edge-line/frag.glsl.js +0 -8
- package/dist/esm/programs/edge-line/index.js +0 -166
- package/dist/esm/programs/edge-line/vert.glsl.js +0 -8
- package/dist/esm/programs/node-badge/factory.js +0 -250
- package/dist/esm/programs/node-badge/frag.glsl.js +0 -8
- package/dist/esm/programs/node-badge/index.js +0 -32
- package/dist/esm/programs/node-badge/texture.js +0 -445
- package/dist/esm/programs/node-badge/vert.glsl.js +0 -19
- package/dist/esm/programs/node-circle/base/drawHover.js +0 -71
- package/dist/esm/programs/node-circle/base/drawLabel.js +0 -113
- package/dist/esm/programs/node-circle/base/frag.glsl.js +0 -8
- package/dist/esm/programs/node-circle/base/index.js +0 -136
- package/dist/esm/programs/node-circle/base/vert.glsl.js +0 -8
- package/dist/esm/programs/node-circle/index.js +0 -15
- package/dist/esm/programs/node-image/factory.js +0 -224
- package/dist/esm/programs/node-image/frag.glsl.js +0 -8
- package/dist/esm/programs/node-image/index.js +0 -13
- package/dist/esm/programs/node-image/texture.js +0 -462
- package/dist/esm/programs/node-image/vert.glsl.js +0 -8
- package/dist/esm/programs/node-rect/base/drawHover.js +0 -68
- package/dist/esm/programs/node-rect/base/drawLabel.js +0 -107
- package/dist/esm/programs/node-rect/base/frag.glsl.js +0 -8
- package/dist/esm/programs/node-rect/base/index.js +0 -135
- package/dist/esm/programs/node-rect/base/vert.glsl.js +0 -8
- package/dist/esm/programs/node-rect/index.js +0 -15
- package/dist/types/components/ContextMenu.d.ts +0 -1
- package/dist/types/components/Provider.d.ts +0 -3
- package/dist/types/components/Tools.d.ts +0 -1
- package/dist/types/components/Viewer.d.ts +0 -2
- package/dist/types/components/context.d.ts +0 -17
- package/dist/types/constants/index.d.ts +0 -12
- package/dist/types/graph/layout.worker.d.ts +0 -1
- package/dist/types/hooks/sigmaDragSelect.d.ts +0 -8
- package/dist/types/hooks/sigmaHilighter.d.ts +0 -3
- package/dist/types/hooks/sigmaMouseActions.d.ts +0 -3
- package/dist/types/hooks/useGraphology.d.ts +0 -6
- package/dist/types/hooks/useSigma.d.ts +0 -8
- package/dist/types/i18n/index.d.ts +0 -0
- package/dist/types/programs/arrow-head/frag.glsl.d.ts +0 -2
- package/dist/types/programs/arrow-head/index.d.ts +0 -9
- package/dist/types/programs/arrow-head/vert.glsl.d.ts +0 -2
- package/dist/types/programs/edge-curve/drawLabel.d.ts +0 -6
- package/dist/types/programs/edge-curve/frag.glsl.d.ts +0 -2
- package/dist/types/programs/edge-curve/index.d.ts +0 -43
- package/dist/types/programs/edge-curve/vert.glsl.d.ts +0 -2
- package/dist/types/programs/edge-line/drawLabel.d.ts +0 -5
- package/dist/types/programs/edge-line/frag.glsl.d.ts +0 -2
- package/dist/types/programs/edge-line/index.d.ts +0 -11
- package/dist/types/programs/edge-line/vert.glsl.d.ts +0 -2
- package/dist/types/programs/node-badge/factory.d.ts +0 -27
- package/dist/types/programs/node-badge/frag.glsl.d.ts +0 -2
- package/dist/types/programs/node-badge/index.d.ts +0 -5
- package/dist/types/programs/node-badge/texture.d.ts +0 -102
- package/dist/types/programs/node-badge/vert.glsl.d.ts +0 -2
- package/dist/types/programs/node-circle/base/drawHover.d.ts +0 -8
- package/dist/types/programs/node-circle/base/drawLabel.d.ts +0 -8
- package/dist/types/programs/node-circle/base/frag.glsl.d.ts +0 -2
- package/dist/types/programs/node-circle/base/index.d.ts +0 -37
- package/dist/types/programs/node-circle/base/vert.glsl.d.ts +0 -2
- package/dist/types/programs/node-circle/index.d.ts +0 -11
- package/dist/types/programs/node-image/factory.d.ts +0 -25
- package/dist/types/programs/node-image/frag.glsl.d.ts +0 -2
- package/dist/types/programs/node-image/index.d.ts +0 -5
- package/dist/types/programs/node-image/texture.d.ts +0 -102
- package/dist/types/programs/node-image/vert.glsl.d.ts +0 -2
- package/dist/types/programs/node-rect/base/drawHover.d.ts +0 -8
- package/dist/types/programs/node-rect/base/drawLabel.d.ts +0 -8
- package/dist/types/programs/node-rect/base/frag.glsl.d.ts +0 -2
- package/dist/types/programs/node-rect/base/index.d.ts +0 -34
- package/dist/types/programs/node-rect/base/vert.glsl.d.ts +0 -2
- package/dist/types/programs/node-rect/index.d.ts +0 -11
- package/src/components/ContextMenu.tsx +0 -138
- package/src/components/Provider.tsx +0 -116
- package/src/components/Tools.tsx +0 -68
- package/src/components/Viewer.tsx +0 -75
- package/src/components/context.ts +0 -43
- package/src/constants/index.ts +0 -22
- package/src/graph/layout.worker.ts +0 -42
- package/src/hooks/sigmaDragSelect.ts +0 -219
- package/src/hooks/sigmaHilighter.ts +0 -107
- package/src/hooks/sigmaMouseActions.ts +0 -153
- package/src/hooks/useGraphology.ts +0 -31
- package/src/hooks/useSigma.ts +0 -118
- package/src/i18n/index.ts +0 -0
- package/src/programs/arrow-head/frag.glsl.ts +0 -18
- package/src/programs/arrow-head/index.ts +0 -156
- package/src/programs/arrow-head/vert.glsl.ts +0 -75
- package/src/programs/edge-curve/drawLabel.ts +0 -166
- package/src/programs/edge-curve/frag.glsl.ts +0 -86
- package/src/programs/edge-curve/index.ts +0 -156
- package/src/programs/edge-curve/vert.glsl.ts +0 -110
- package/src/programs/edge-line/drawLabel.ts +0 -113
- package/src/programs/edge-line/frag.glsl.ts +0 -34
- package/src/programs/edge-line/index.ts +0 -163
- package/src/programs/edge-line/vert.glsl.ts +0 -104
- package/src/programs/node-badge/factory.ts +0 -325
- package/src/programs/node-badge/frag.glsl.ts +0 -79
- package/src/programs/node-badge/index.ts +0 -35
- package/src/programs/node-badge/texture.ts +0 -425
- package/src/programs/node-badge/vert.glsl.ts +0 -99
- package/src/programs/node-circle/base/drawHover.ts +0 -80
- package/src/programs/node-circle/base/drawLabel.ts +0 -145
- package/src/programs/node-circle/base/frag.glsl.ts +0 -72
- package/src/programs/node-circle/base/index.ts +0 -100
- package/src/programs/node-circle/base/vert.glsl.ts +0 -83
- package/src/programs/node-circle/index.ts +0 -19
- package/src/programs/node-image/factory.ts +0 -299
- package/src/programs/node-image/frag.glsl.ts +0 -97
- package/src/programs/node-image/index.ts +0 -7
- package/src/programs/node-image/texture.ts +0 -435
- package/src/programs/node-image/vert.glsl.ts +0 -60
- package/src/programs/node-rect/base/drawHover.ts +0 -77
- package/src/programs/node-rect/base/drawLabel.ts +0 -149
- package/src/programs/node-rect/base/frag.glsl.ts +0 -67
- package/src/programs/node-rect/base/index.ts +0 -107
- package/src/programs/node-rect/base/vert.glsl.ts +0 -87
- package/src/programs/node-rect/index.ts +0 -19
|
@@ -1,189 +1,138 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
export interface NodeAttributes<N extends KeyValue = KeyValue> {
|
|
26
|
+
data?: N;
|
|
27
|
+
id: string;
|
|
28
|
+
type?: string;
|
|
21
29
|
label?: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
type?: "circle" | "rect";
|
|
26
|
-
/**
|
|
27
|
-
* node size
|
|
28
|
-
*/
|
|
29
|
-
size?: number;
|
|
30
|
-
/**
|
|
31
|
-
* node weight to apply proportional size
|
|
32
|
-
*/
|
|
33
|
-
weight?: number;
|
|
34
|
-
/**
|
|
35
|
-
* label color
|
|
36
|
-
*/
|
|
37
|
-
labelColor?: string;
|
|
38
|
-
/**
|
|
39
|
-
* border color
|
|
40
|
-
*/
|
|
41
|
-
borderColor?: string;
|
|
42
|
-
/**
|
|
43
|
-
* icon color
|
|
44
|
-
*/
|
|
45
|
-
iconColor?: string;
|
|
46
|
-
/**
|
|
47
|
-
* fill color
|
|
48
|
-
*/
|
|
30
|
+
icon?: string;
|
|
31
|
+
image?: string;
|
|
49
32
|
color?: string;
|
|
50
|
-
/**
|
|
51
|
-
* border width
|
|
52
|
-
*/
|
|
53
33
|
border?: number;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
highlightColor?: string;
|
|
62
|
-
/**
|
|
63
|
-
* define node type
|
|
64
|
-
*/
|
|
65
|
-
nodeType?: string;
|
|
66
|
-
/**
|
|
67
|
-
* pie colors
|
|
68
|
-
*/
|
|
69
|
-
pie?: string[];
|
|
70
|
-
/**
|
|
71
|
-
* svg path
|
|
72
|
-
*/
|
|
73
|
-
path?: string;
|
|
74
|
-
/**
|
|
75
|
-
* avatar/image url
|
|
76
|
-
*/
|
|
77
|
-
image?: string;
|
|
78
|
-
/**
|
|
79
|
-
* selected state
|
|
80
|
-
*/
|
|
81
|
-
selected?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* highlighted state
|
|
84
|
-
*/
|
|
85
|
-
highlight?: boolean;
|
|
86
|
-
badge?: NodeBadge[];
|
|
34
|
+
borderColor?: string;
|
|
35
|
+
segments?: string[] | number[] | {
|
|
36
|
+
[color: string]: number;
|
|
37
|
+
};
|
|
38
|
+
size?: number;
|
|
39
|
+
shape?: "square" | "circle" | "folder" | "diamond" | "triangle" | "folderOpen";
|
|
40
|
+
visible?: boolean;
|
|
87
41
|
x?: number;
|
|
88
42
|
y?: number;
|
|
89
|
-
|
|
90
|
-
data?: N;
|
|
43
|
+
z?: number;
|
|
91
44
|
}
|
|
92
|
-
export interface EdgeAttributes<E = KeyValue> {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* edge label
|
|
99
|
-
*/
|
|
45
|
+
export interface EdgeAttributes<E extends KeyValue = KeyValue> {
|
|
46
|
+
data?: E;
|
|
47
|
+
id: string;
|
|
48
|
+
source: string;
|
|
49
|
+
target: string;
|
|
50
|
+
type?: string;
|
|
100
51
|
label?: string;
|
|
101
|
-
|
|
102
|
-
* edge size
|
|
103
|
-
*/
|
|
52
|
+
count?: number;
|
|
104
53
|
size?: number;
|
|
105
|
-
/**
|
|
106
|
-
* edge weight to apply proportional size
|
|
107
|
-
*/
|
|
108
|
-
weight?: number;
|
|
109
|
-
/**
|
|
110
|
-
* edge color
|
|
111
|
-
*/
|
|
112
54
|
color?: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
edgeType?: "curved" | "line";
|
|
125
|
-
/**
|
|
126
|
-
* edge arrow head
|
|
127
|
-
*/
|
|
128
|
-
arrow?: "source" | "target" | "both";
|
|
129
|
-
/**
|
|
130
|
-
* edge count
|
|
131
|
-
*/
|
|
132
|
-
count?: number;
|
|
133
|
-
/**
|
|
134
|
-
* selected state
|
|
135
|
-
*/
|
|
136
|
-
selected?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* highlighted state
|
|
139
|
-
*/
|
|
140
|
-
highlight?: boolean;
|
|
141
|
-
data?: E;
|
|
55
|
+
path?: "straight" | "curved" | "stepCurved" | "curvedS";
|
|
56
|
+
style?: "solid" | "dashed" | "dotted";
|
|
57
|
+
head?: "arrow";
|
|
58
|
+
tail?: "arrow";
|
|
59
|
+
visible?: boolean;
|
|
60
|
+
/** Marks a link that was created as a clone during `groupNodes`. Used by `ungroupNodes` to drop clones and revert the originals. */
|
|
61
|
+
groupEdge?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface RawGraph<N extends KeyValue = KeyValue, E extends KeyValue = KeyValue> {
|
|
64
|
+
nodes: NodeAttributes<N>[];
|
|
65
|
+
edges: EdgeAttributes<E>[];
|
|
142
66
|
}
|
|
143
|
-
export interface
|
|
67
|
+
export interface InternalNode<N extends KeyValue = KeyValue> extends NodeAttributes<N> {
|
|
68
|
+
group?: boolean;
|
|
69
|
+
groupExpanded?: boolean;
|
|
70
|
+
groupNodes?: string[];
|
|
71
|
+
/** Back-reference to the group node that owns this (hidden) member. Empty for top-level nodes. */
|
|
144
72
|
groupId?: string;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
73
|
+
locked?: boolean;
|
|
74
|
+
/** Transient selection state, toggled by `selectNodes` / `unselectNodes`. */
|
|
75
|
+
selected?: boolean;
|
|
76
|
+
hilighted?: boolean;
|
|
77
|
+
x?: number;
|
|
78
|
+
y?: number;
|
|
79
|
+
z?: number;
|
|
80
|
+
fx?: number;
|
|
81
|
+
fy?: number;
|
|
82
|
+
fz?: number;
|
|
83
|
+
pieSize?: number;
|
|
84
|
+
slice_0?: number;
|
|
85
|
+
slice_1?: number;
|
|
86
|
+
slice_2?: number;
|
|
87
|
+
slice_3?: number;
|
|
88
|
+
slice_4?: number;
|
|
89
|
+
slice_5?: number;
|
|
90
|
+
slice_6?: number;
|
|
91
|
+
slice_7?: number;
|
|
92
|
+
slice_8?: number;
|
|
93
|
+
slice_9?: number;
|
|
94
|
+
slice_10?: number;
|
|
95
|
+
slice_11?: number;
|
|
96
|
+
color_0?: string;
|
|
97
|
+
color_1?: string;
|
|
98
|
+
color_2?: string;
|
|
99
|
+
color_3?: string;
|
|
100
|
+
color_4?: string;
|
|
101
|
+
color_5?: string;
|
|
102
|
+
color_6?: string;
|
|
103
|
+
color_7?: string;
|
|
104
|
+
color_8?: string;
|
|
105
|
+
color_9?: string;
|
|
106
|
+
color_10?: string;
|
|
107
|
+
color_11?: string;
|
|
157
108
|
}
|
|
158
|
-
export interface
|
|
159
|
-
|
|
109
|
+
export interface InternalEdge<E extends KeyValue = KeyValue> extends EdgeAttributes<E> {
|
|
110
|
+
group?: boolean;
|
|
111
|
+
/** Curvature of a `path: "curved"` edge; 0 = straight. Assigned by `assignCurvature` for parallel edges. */
|
|
160
112
|
curvature?: number;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
attributes?: KeyValue;
|
|
175
|
-
options?: GraphOptions;
|
|
176
|
-
}
|
|
177
|
-
export interface GraphRef<N = KeyValue, E = KeyValue> {
|
|
178
|
-
graph: Graph<N, E>;
|
|
179
|
-
}
|
|
180
|
-
export interface GraphProps<N = KeyValue, E = KeyValue> {
|
|
181
|
-
ref?: RefObject<GraphRef<N, E> | null>;
|
|
182
|
-
data: RawGraph<N, E> | Graph<N, E>;
|
|
183
|
-
nodeReducer?: (node: NodeAttributes<N>) => NodeAttributes<N>;
|
|
184
|
-
edgeReducer?: (edge: EdgeAttributes<E>) => EdgeAttributes<E>;
|
|
185
|
-
onSelectChange?: (selected: string[]) => void;
|
|
186
|
-
onNodeDoubleClick?: (node: string, attributes: NodeAttributes<N>) => void;
|
|
187
|
-
onContextMenu?: (type: "canvas" | "node" | "edge", nodesOrEdge?: string | string[]) => void;
|
|
113
|
+
/** Dash length for `layerDashed`, in relative edge-length units. Assigned by `assignEdgeDash` from `shape`. */
|
|
114
|
+
dashSize?: number;
|
|
115
|
+
/** Dash gap length for `layerDashed`, in relative edge-length units. Assigned by `assignEdgeDash` from `shape`. */
|
|
116
|
+
gapSize?: number;
|
|
117
|
+
rotation?: number;
|
|
118
|
+
/** Transient selection state. */
|
|
119
|
+
selected?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The endpoint before it was re-pointed onto a group / merge node. Captured by
|
|
122
|
+
* `hydrateEdge` when the link is added; read back by `ungroupNode`.
|
|
123
|
+
*/
|
|
124
|
+
originalSource?: string;
|
|
125
|
+
originalTarget?: string;
|
|
188
126
|
}
|
|
189
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Public, listener-facing node: the node `id` merged with its `data` bag. This is
|
|
129
|
+
* what every `nodes*` event emits — internal fields (positions, pins, group and
|
|
130
|
+
* selection state) never leak to listeners.
|
|
131
|
+
*/
|
|
132
|
+
export type PublicNode<N extends KeyValue = KeyValue> = {
|
|
133
|
+
id: string;
|
|
134
|
+
} & N;
|
|
135
|
+
/** Public, listener-facing link: the link `id` merged with its `data` bag. Emitted by `edges*` events. */
|
|
136
|
+
export type PublicEdge<E extends KeyValue = KeyValue> = {
|
|
137
|
+
id: string;
|
|
138
|
+
} & E;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
import type { DisplayData } from "sigma/types";
|
|
26
|
+
import type { EdgeAttributes } from "../types";
|
|
27
|
+
export declare function edgeReducer(_: unknown, edge: DisplayData, attrs: EdgeAttributes): DisplayData;
|
|
28
|
+
export declare function defaultEdgeStyles(isDark?: boolean): never[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
import { type DisplayData } from "sigma/types";
|
|
26
|
+
import type { InternalNode } from "../types";
|
|
27
|
+
export declare function nodeReducer(_: unknown, node: DisplayData, attrs: InternalNode): DisplayData;
|
|
28
|
+
export declare function defaultNodeStyles(isDark?: boolean): never;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
import { type SDFShape, type ValueSource } from "sigma/rendering";
|
|
26
|
+
/**
|
|
27
|
+
* Options for the {@link sdfFolder} shape.
|
|
28
|
+
*
|
|
29
|
+
* @property cornerRadius - Corner rounding as a fraction of the node size.
|
|
30
|
+
* `0` gives sharp corners; larger values round the body and the tab. May
|
|
31
|
+
* also be a per-node attribute via `{ attribute, default }`.
|
|
32
|
+
* @property rotation - Rotation of the folder, in radians, applied before the
|
|
33
|
+
* distance field is evaluated. May also be a per-node attribute via
|
|
34
|
+
* `{ attribute, default }`.
|
|
35
|
+
*/
|
|
36
|
+
export interface FolderOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Corner rounding as a fraction of the node size. Defaults to `0` (sharp
|
|
39
|
+
* corners).
|
|
40
|
+
*/
|
|
41
|
+
cornerRadius?: ValueSource<number>;
|
|
42
|
+
/**
|
|
43
|
+
* Rotation of the folder, in radians, applied before the distance is
|
|
44
|
+
* computed. Defaults to `0`.
|
|
45
|
+
*/
|
|
46
|
+
rotation?: ValueSource<number>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates a folder SDF shape.
|
|
50
|
+
*
|
|
51
|
+
* The outline is the union of two rounded rectangles: a wide **body** and a
|
|
52
|
+
* smaller **tab** flap that rises above the body's top-left corner — the shape
|
|
53
|
+
* of a classic manila folder. Each panel is an Inigo Quilez rounded-box
|
|
54
|
+
* distance field (https://iquilezles.org/articles/distfunctions2d/) and the
|
|
55
|
+
* union is the closer of the two distances.
|
|
56
|
+
*
|
|
57
|
+
* @param options - Configuration for the folder
|
|
58
|
+
* @returns Folder SDF shape definition
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Sharp folder with a top-left tab
|
|
63
|
+
* const folder = sdfFolder();
|
|
64
|
+
*
|
|
65
|
+
* // Rounded folder
|
|
66
|
+
* const rounded = sdfFolder({ cornerRadius: 0.12 });
|
|
67
|
+
*
|
|
68
|
+
* // Per-node folder, driven by attributes
|
|
69
|
+
* const perNode = sdfFolder({
|
|
70
|
+
* cornerRadius: { attribute: "folderCorner" },
|
|
71
|
+
* rotation: { attribute: "folderRotation" },
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function sdfFolder(options?: FolderOptions): SDFShape;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
import type { Graph } from "../graph";
|
|
26
|
+
interface GraphViewerProps<N extends KeyValue = KeyValue, E extends KeyValue = KeyValue> {
|
|
27
|
+
data: Graph<N, E>;
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function GraphViewer<N extends KeyValue = KeyValue, E extends KeyValue = KeyValue>({ data, children }: GraphViewerProps<N, E>): import("react").JSX.Element;
|
|
31
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/graph",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "RUF: SigmaJS link analysis graph",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"repository": "https://github.com/adarshpastakia/react-
|
|
7
|
+
"repository": "https://github.com/adarshpastakia/react-fabric/tree/main/packages/graph",
|
|
8
8
|
"source": "src/index.ts",
|
|
9
9
|
"main": "dist/cjs/index.js",
|
|
10
10
|
"module": "dist/esm/index.js",
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"registry": "https://registry.npmjs.org/"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"makelink": "yarn link",
|
|
28
|
-
"removelink": "yarn unlink",
|
|
29
27
|
"prebuild": "rm -rf ./dist",
|
|
30
28
|
"build:dts": "tsc -p ./tsconfig.build.json",
|
|
31
29
|
"build:rollup": "rollup -c ../../rollup.config.mjs",
|
|
@@ -35,35 +33,31 @@
|
|
|
35
33
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
36
34
|
},
|
|
37
35
|
"dependencies": {
|
|
38
|
-
"@floating-ui/react": "~0.27.
|
|
39
|
-
"@react-fabric/core": "^1.0.
|
|
40
|
-
"@react-fabric/utilities": "^1.0.
|
|
41
|
-
"@sigma/
|
|
42
|
-
"@sigma/
|
|
43
|
-
"
|
|
36
|
+
"@floating-ui/react": "~0.27.20",
|
|
37
|
+
"@react-fabric/core": "^1.0.1",
|
|
38
|
+
"@react-fabric/utilities": "^1.0.1",
|
|
39
|
+
"@sigma/layer-webgl": "beta",
|
|
40
|
+
"@sigma/node-border": "beta",
|
|
41
|
+
"@sigma/node-image": "beta",
|
|
42
|
+
"@sigma/node-piechart": "beta",
|
|
43
|
+
"@sigma/utils": "beta",
|
|
44
44
|
"dom-to-image": "~2.6.0",
|
|
45
45
|
"graphology": "~0.26.0",
|
|
46
|
-
"graphology-canvas": "~0.4.3",
|
|
47
46
|
"graphology-layout": "~0.6.1",
|
|
47
|
+
"graphology-layout-force": "~0.2.4",
|
|
48
48
|
"graphology-layout-forceatlas2": "~0.10.1",
|
|
49
|
-
"graphology-shortest-path": "~2.1.0",
|
|
50
49
|
"graphology-types": "~0.24.8",
|
|
51
|
-
"sigma": "
|
|
50
|
+
"sigma": "beta"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
|
-
"i18next": "~
|
|
55
|
-
"react": "~19.
|
|
56
|
-
"react-dom": "~19.
|
|
57
|
-
"react-i18next": "~
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@types/dom-to-image": "~2.6.7",
|
|
61
|
-
"@types/highlight.js": "~10.1.0",
|
|
62
|
-
"elkjs": "~0.11.0"
|
|
53
|
+
"i18next": "~26.3.6",
|
|
54
|
+
"react": "~19.3.0",
|
|
55
|
+
"react-dom": "~19.3.0",
|
|
56
|
+
"react-i18next": "~17.0.11"
|
|
63
57
|
},
|
|
64
58
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
66
|
-
"npm": ">=
|
|
59
|
+
"node": ">=24.0.0",
|
|
60
|
+
"npm": ">=11.0.0"
|
|
67
61
|
},
|
|
68
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1419a9df05b5e3850e1d2b4e896ab63df702c7e8"
|
|
69
63
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version 1.0.0
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2024 Adarsh Pastakia
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { createContext, use } from "react";
|
|
27
|
+
import type Sigma from "sigma";
|
|
28
|
+
import type { Graph } from "../graph";
|
|
29
|
+
import type { EdgeAttributes, NodeAttributes } from "../types";
|
|
30
|
+
|
|
31
|
+
interface ContextType<N extends KeyValue = KeyValue, E extends KeyValue = KeyValue> {
|
|
32
|
+
data: Graph<N, E>;
|
|
33
|
+
sigma: Sigma<NodeAttributes<N>, EdgeAttributes<E>>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Context = createContext<ContextType>({} as ContextType);
|
|
37
|
+
|
|
38
|
+
export const useGraph = <N extends KeyValue = KeyValue, E extends KeyValue = KeyValue>() => use(Context) as ContextType<N, E>;
|
|
39
|
+
|
|
40
|
+
export const Provider = <N extends KeyValue = KeyValue, E extends KeyValue = KeyValue>(props: AnyObject) => {
|
|
41
|
+
const Provider = Context.Provider as React.Provider<ContextType<N, E>>;
|
|
42
|
+
return <Provider {...props} />;
|
|
43
|
+
};
|