@xyo-network/react-node-renderer 7.5.5 → 7.5.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-node-renderer",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.6",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
"src"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@xylabs/react-async-effect": "~7.1.
|
|
47
|
-
"@xylabs/react-flexbox": "~7.1.
|
|
48
|
-
"@xylabs/react-identicon": "~7.1.
|
|
49
|
-
"@xylabs/react-promise": "~7.1.
|
|
50
|
-
"@xylabs/react-shared": "~7.1.
|
|
51
|
-
"@xylabs/react-theme": "~7.1.
|
|
52
|
-
"@xylabs/sdk-js": "~5.0.
|
|
53
|
-
"@xyo-network/account-model": "~5.3.
|
|
54
|
-
"@xyo-network/archivist-model": "~5.3.
|
|
55
|
-
"@xyo-network/bridge-model": "~5.3.
|
|
56
|
-
"@xyo-network/diviner-model": "~5.3.
|
|
57
|
-
"@xyo-network/module-model": "~5.3.
|
|
58
|
-
"@xyo-network/node-model": "~5.3.
|
|
59
|
-
"@xyo-network/react-archivist": "7.5.
|
|
60
|
-
"@xyo-network/react-module": "7.5.
|
|
61
|
-
"@xyo-network/react-node": "7.5.
|
|
62
|
-
"@xyo-network/sentinel-model": "~5.3.
|
|
63
|
-
"@xyo-network/witness-model": "~5.3.
|
|
46
|
+
"@xylabs/react-async-effect": "~7.1.17",
|
|
47
|
+
"@xylabs/react-flexbox": "~7.1.17",
|
|
48
|
+
"@xylabs/react-identicon": "~7.1.17",
|
|
49
|
+
"@xylabs/react-promise": "~7.1.17",
|
|
50
|
+
"@xylabs/react-shared": "~7.1.17",
|
|
51
|
+
"@xylabs/react-theme": "~7.1.17",
|
|
52
|
+
"@xylabs/sdk-js": "~5.0.90",
|
|
53
|
+
"@xyo-network/account-model": "~5.3.17",
|
|
54
|
+
"@xyo-network/archivist-model": "~5.3.17",
|
|
55
|
+
"@xyo-network/bridge-model": "~5.3.17",
|
|
56
|
+
"@xyo-network/diviner-model": "~5.3.17",
|
|
57
|
+
"@xyo-network/module-model": "~5.3.17",
|
|
58
|
+
"@xyo-network/node-model": "~5.3.17",
|
|
59
|
+
"@xyo-network/react-archivist": "7.5.6",
|
|
60
|
+
"@xyo-network/react-module": "7.5.6",
|
|
61
|
+
"@xyo-network/react-node": "7.5.6",
|
|
62
|
+
"@xyo-network/sentinel-model": "~5.3.17",
|
|
63
|
+
"@xyo-network/witness-model": "~5.3.17",
|
|
64
64
|
"cytoscape": "~3.33.1",
|
|
65
65
|
"cytoscape-cola": "~2.5.1",
|
|
66
66
|
"cytoscape-cose-bilkent": "~4.1.0",
|
|
@@ -68,33 +68,33 @@
|
|
|
68
68
|
"cytoscape-euler": "~1.2.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@mui/icons-material": "~7.3.
|
|
72
|
-
"@mui/material": "~7.3.
|
|
73
|
-
"@storybook/react-vite": "~10.
|
|
71
|
+
"@mui/icons-material": "~7.3.9",
|
|
72
|
+
"@mui/material": "~7.3.9",
|
|
73
|
+
"@storybook/react-vite": "~10.3.3",
|
|
74
74
|
"@types/cytoscape": "~3.31.0",
|
|
75
75
|
"@types/react": "^19.2.14",
|
|
76
76
|
"@types/react-dom": "~19.2.3",
|
|
77
|
-
"@xylabs/events": "~5.0.
|
|
78
|
-
"@xylabs/ts-scripts-yarn3": "~7.
|
|
79
|
-
"@xylabs/tsconfig": "~7.
|
|
80
|
-
"@xylabs/tsconfig-dom": "~7.
|
|
81
|
-
"@xylabs/tsconfig-react": "~7.
|
|
82
|
-
"@xyo-network/archivist": "~5.3.
|
|
83
|
-
"@xyo-network/archivist-memory": "~5.3.
|
|
84
|
-
"@xyo-network/bridge-http": "~5.3.
|
|
85
|
-
"@xyo-network/bridge-model": "~5.3.
|
|
77
|
+
"@xylabs/events": "~5.0.90",
|
|
78
|
+
"@xylabs/ts-scripts-yarn3": "~7.5.6",
|
|
79
|
+
"@xylabs/tsconfig": "~7.5.6",
|
|
80
|
+
"@xylabs/tsconfig-dom": "~7.5.6",
|
|
81
|
+
"@xylabs/tsconfig-react": "~7.5.6",
|
|
82
|
+
"@xyo-network/archivist": "~5.3.17",
|
|
83
|
+
"@xyo-network/archivist-memory": "~5.3.17",
|
|
84
|
+
"@xyo-network/bridge-http": "~5.3.17",
|
|
85
|
+
"@xyo-network/bridge-model": "~5.3.17",
|
|
86
86
|
"@xyo-network/id-plugin": "~5.3.1",
|
|
87
|
-
"@xyo-network/node-memory": "~5.3.
|
|
88
|
-
"@xyo-network/react-storybook": "7.5.
|
|
89
|
-
"@xyo-network/react-wallet": "7.5.
|
|
90
|
-
"@xyo-network/sentinel": "~5.3.
|
|
91
|
-
"@xyo-network/sentinel-memory": "~5.3.
|
|
87
|
+
"@xyo-network/node-memory": "~5.3.17",
|
|
88
|
+
"@xyo-network/react-storybook": "7.5.6",
|
|
89
|
+
"@xyo-network/react-wallet": "7.5.6",
|
|
90
|
+
"@xyo-network/sentinel": "~5.3.17",
|
|
91
|
+
"@xyo-network/sentinel-memory": "~5.3.17",
|
|
92
92
|
"react": "^19.2.4",
|
|
93
93
|
"react-dom": "^19.2.4",
|
|
94
|
-
"react-router-dom": "^7.13.
|
|
95
|
-
"storybook": "~10.
|
|
94
|
+
"react-router-dom": "^7.13.2",
|
|
95
|
+
"storybook": "~10.3.3",
|
|
96
96
|
"typescript": "^5.9.3",
|
|
97
|
-
"vite": "~
|
|
97
|
+
"vite": "~8.0.3",
|
|
98
98
|
"zod": "^4.3.6"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PopperProps } from '@mui/material'
|
|
2
2
|
import type { NodeSingular } from 'cytoscape'
|
|
3
3
|
import {
|
|
4
|
-
useEffect,
|
|
4
|
+
useEffect, useRef, useState,
|
|
5
5
|
} from 'react'
|
|
6
6
|
|
|
7
7
|
export const useNodeElement = (node?: NodeSingular) => {
|
|
@@ -10,11 +10,11 @@ export const useNodeElement = (node?: NodeSingular) => {
|
|
|
10
10
|
const [boundingBox, setBoundingBox] = useState(node?.renderedBoundingBox())
|
|
11
11
|
|
|
12
12
|
// Ensure first render clears the previous element when node changes to avoid flicker
|
|
13
|
-
|
|
13
|
+
useEffect(() => {
|
|
14
14
|
setCurrentElement(null)
|
|
15
15
|
}, [node])
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
useEffect(() => {
|
|
18
18
|
setBoundingBox(node?.renderedBoundingBox())
|
|
19
19
|
}, [node])
|
|
20
20
|
|
|
@@ -31,7 +31,7 @@ export const useNodeElement = (node?: NodeSingular) => {
|
|
|
31
31
|
}, [node])
|
|
32
32
|
|
|
33
33
|
// Once boundingBox state is set and applied to the layout, update the ref
|
|
34
|
-
|
|
34
|
+
useEffect(() => {
|
|
35
35
|
setCurrentElement(ref.current)
|
|
36
36
|
}, [boundingBox])
|
|
37
37
|
|