react-html-graph 1.0.0 → 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/LICENSE +21 -21
- package/README.md +1 -1
- package/dist/example/App.css +38 -38
- package/dist/example/index.css +47 -47
- package/dist/style.css +77 -77
- package/package.json +77 -73
- package/dist/example/App.d.ts +0 -3
- package/dist/example/App.d.ts.map +0 -1
- package/dist/example/App.js +0 -7
- package/dist/example/App.js.map +0 -1
- package/dist/example/graph-teste.d.ts +0 -2
- package/dist/example/graph-teste.d.ts.map +0 -1
- package/dist/example/graph-teste.js +0 -205
- package/dist/example/graph-teste.js.map +0 -1
- package/dist/example/reportWebVitals.d.ts +0 -4
- package/dist/example/reportWebVitals.d.ts.map +0 -1
- package/dist/example/reportWebVitals.js +0 -13
- package/dist/example/reportWebVitals.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Jefferson Raylan
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jefferson Raylan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
**To be documented**...
|
|
1
|
+
**To be documented**...
|
package/dist/example/App.css
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
.App {
|
|
2
|
-
text-align: center;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.App-logo {
|
|
6
|
-
height: 40vmin;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
-
.App-logo {
|
|
12
|
-
animation: App-logo-spin infinite 20s linear;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.App-header {
|
|
17
|
-
background-color: #282c34;
|
|
18
|
-
min-height: 100vh;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
font-size: calc(10px + 2vmin);
|
|
24
|
-
color: white;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.App-link {
|
|
28
|
-
color: #61dafb;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes App-logo-spin {
|
|
32
|
-
from {
|
|
33
|
-
transform: rotate(0deg);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
to {
|
|
37
|
-
transform: rotate(360deg);
|
|
38
|
-
}
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
height: 40vmin;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
+
.App-logo {
|
|
12
|
+
animation: App-logo-spin infinite 20s linear;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.App-header {
|
|
17
|
+
background-color: #282c34;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
font-size: calc(10px + 2vmin);
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.App-link {
|
|
28
|
+
color: #61dafb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes App-logo-spin {
|
|
32
|
+
from {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
to {
|
|
37
|
+
transform: rotate(360deg);
|
|
38
|
+
}
|
|
39
39
|
}
|
package/dist/example/index.css
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
-
sans-serif;
|
|
6
|
-
-webkit-font-smoothing: antialiased;
|
|
7
|
-
-moz-osx-font-smoothing: grayscale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
code {
|
|
11
|
-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
-
monospace;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.graph-test-container {
|
|
16
|
-
width: 100vw;
|
|
17
|
-
height: 100vh;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
|
|
21
|
-
.graph-test-graph {
|
|
22
|
-
flex: 1;
|
|
23
|
-
background: #000;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.node-port {
|
|
28
|
-
width: 10px;
|
|
29
|
-
height: 10px;
|
|
30
|
-
border-radius: 50%;
|
|
31
|
-
background: #888;
|
|
32
|
-
cursor: crosshair;
|
|
33
|
-
flex-shrink: 0;
|
|
34
|
-
transition: background 0.15s ease, transform 0.15s ease;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.node-port:hover {
|
|
38
|
-
background: #fff;
|
|
39
|
-
transform: scale(1.4);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.port-input {
|
|
43
|
-
margin-right: 6px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.port-output {
|
|
47
|
-
margin-left: 6px;
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
+
sans-serif;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
code {
|
|
11
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
+
monospace;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.graph-test-container {
|
|
16
|
+
width: 100vw;
|
|
17
|
+
height: 100vh;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
|
|
21
|
+
.graph-test-graph {
|
|
22
|
+
flex: 1;
|
|
23
|
+
background: #000;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.node-port {
|
|
28
|
+
width: 10px;
|
|
29
|
+
height: 10px;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
background: #888;
|
|
32
|
+
cursor: crosshair;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.node-port:hover {
|
|
38
|
+
background: #fff;
|
|
39
|
+
transform: scale(1.4);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.port-input {
|
|
43
|
+
margin-right: 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.port-output {
|
|
47
|
+
margin-left: 6px;
|
|
48
48
|
}
|
package/dist/style.css
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
graph-root {
|
|
2
|
-
display: block;
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: 100%;
|
|
6
|
-
background: #000;
|
|
7
|
-
color: #fff;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
|
|
10
|
-
graph-viewbox {
|
|
11
|
-
display: block;
|
|
12
|
-
position: relative;
|
|
13
|
-
min-width: 100%;
|
|
14
|
-
min-height: 100%;
|
|
15
|
-
transform-origin: 0 0;
|
|
16
|
-
overflow: visible;
|
|
17
|
-
|
|
18
|
-
node-graph-object {
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: fit-content;
|
|
21
|
-
height: fit-content;
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@keyframes graph-link-flow {
|
|
31
|
-
from {
|
|
32
|
-
stroke-dashoffset: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
to {
|
|
36
|
-
stroke-dashoffset: var(--cycle-len);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
node-graph-link,
|
|
41
|
-
node-graph-node {
|
|
42
|
-
position: absolute;
|
|
43
|
-
pointer-events: all;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
node-graph-temp-link {
|
|
47
|
-
position: absolute;
|
|
48
|
-
|
|
49
|
-
>svg {
|
|
50
|
-
position: absolute;
|
|
51
|
-
left: 0;
|
|
52
|
-
top: 0;
|
|
53
|
-
width: 0;
|
|
54
|
-
height: 0;
|
|
55
|
-
overflow: visible;
|
|
56
|
-
pointer-events: none;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
node-graph-link>svg {
|
|
61
|
-
position: absolute;
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
overflow: visible;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
node-graph-link>svg path {
|
|
67
|
-
animation-name: graph-link-flow;
|
|
68
|
-
animation-timing-function: linear;
|
|
69
|
-
animation-iteration-count: infinite;
|
|
70
|
-
transition: stroke 0.3s ease, stroke-width 0.15s ease;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
node-graph-link>svg text {
|
|
74
|
-
pointer-events: none;
|
|
75
|
-
-webkit-user-select: none;
|
|
76
|
-
user-select: none;
|
|
77
|
-
transition: font-size 0.15s ease;
|
|
1
|
+
graph-root {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
background: #000;
|
|
7
|
+
color: #fff;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
graph-viewbox {
|
|
11
|
+
display: block;
|
|
12
|
+
position: relative;
|
|
13
|
+
min-width: 100%;
|
|
14
|
+
min-height: 100%;
|
|
15
|
+
transform-origin: 0 0;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
|
|
18
|
+
node-graph-object {
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: fit-content;
|
|
21
|
+
height: fit-content;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@keyframes graph-link-flow {
|
|
31
|
+
from {
|
|
32
|
+
stroke-dashoffset: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
to {
|
|
36
|
+
stroke-dashoffset: var(--cycle-len);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
node-graph-link,
|
|
41
|
+
node-graph-node {
|
|
42
|
+
position: absolute;
|
|
43
|
+
pointer-events: all;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
node-graph-temp-link {
|
|
47
|
+
position: absolute;
|
|
48
|
+
|
|
49
|
+
>svg {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 0;
|
|
52
|
+
top: 0;
|
|
53
|
+
width: 0;
|
|
54
|
+
height: 0;
|
|
55
|
+
overflow: visible;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
node-graph-link>svg {
|
|
61
|
+
position: absolute;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
overflow: visible;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
node-graph-link>svg path {
|
|
67
|
+
animation-name: graph-link-flow;
|
|
68
|
+
animation-timing-function: linear;
|
|
69
|
+
animation-iteration-count: infinite;
|
|
70
|
+
transition: stroke 0.3s ease, stroke-width 0.15s ease;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
node-graph-link>svg text {
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
-webkit-user-select: none;
|
|
76
|
+
user-select: none;
|
|
77
|
+
transition: font-size 0.15s ease;
|
|
78
78
|
}
|
package/package.json
CHANGED
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-html-graph",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./dist/module.js",
|
|
6
|
-
"module": "./dist/module.js",
|
|
7
|
-
"types": "./dist/module.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"react
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "react-html-graph",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/module.js",
|
|
6
|
+
"module": "./dist/module.js",
|
|
7
|
+
"types": "./dist/module.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/jraylan/react-html-graph"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"**/*.css"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/module.d.ts",
|
|
21
|
+
"import": "./dist/module.js",
|
|
22
|
+
"default": "./dist/module.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"start": "react-scripts start",
|
|
28
|
+
"clean": "node scripts/clean-dist.mjs",
|
|
29
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/copy-library-assets.mjs",
|
|
30
|
+
"build:demo": "react-scripts build",
|
|
31
|
+
"test": "react-scripts test",
|
|
32
|
+
"eject": "react-scripts eject",
|
|
33
|
+
"prepack": "npm run build"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^19.0.0",
|
|
37
|
+
"react-dom": "^19.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@testing-library/dom": "^10.4.1",
|
|
41
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
42
|
+
"@testing-library/react": "^16.3.2",
|
|
43
|
+
"@testing-library/user-event": "^14.6.1",
|
|
44
|
+
"@types/jest": "^30.0.0",
|
|
45
|
+
"@types/node": "^25.6.0",
|
|
46
|
+
"@types/react": "^19.2.14",
|
|
47
|
+
"@types/react-dom": "^19.2.3",
|
|
48
|
+
"react": "^19.2.5",
|
|
49
|
+
"react-dom": "^19.2.5",
|
|
50
|
+
"react-scripts": "^5.0.1",
|
|
51
|
+
"typescript": "^6.0.2",
|
|
52
|
+
"web-vitals": "^5.2.0"
|
|
53
|
+
},
|
|
54
|
+
"eslintConfig": {
|
|
55
|
+
"extends": [
|
|
56
|
+
"react-app",
|
|
57
|
+
"react-app/jest"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"overrides": {
|
|
61
|
+
"react-scripts": {
|
|
62
|
+
"typescript": "^6.0.2"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"browserslist": {
|
|
66
|
+
"production": [
|
|
67
|
+
">0.2%",
|
|
68
|
+
"not dead",
|
|
69
|
+
"not op_mini all"
|
|
70
|
+
],
|
|
71
|
+
"development": [
|
|
72
|
+
"last 1 chrome version",
|
|
73
|
+
"last 1 firefox version",
|
|
74
|
+
"last 1 safari version"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
package/dist/example/App.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/example/App.tsx"],"names":[],"mappings":"AAGA,iBAAS,GAAG,4CAIX;AAED,eAAe,GAAG,CAAC"}
|
package/dist/example/App.js
DELETED
package/dist/example/App.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/example/App.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,eAAe,CAAC;AAGtC,SAAS,GAAG;IACV,OAAO,CACL,KAAC,SAAS,KAAG,CACd,CAAC;AACJ,CAAC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph-teste.d.ts","sourceRoot":"","sources":["../../src/example/graph-teste.tsx"],"names":[],"mappings":"AA2LA,MAAM,CAAC,OAAO,UAAU,SAAS,4CAiEhC"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useRef } from "react";
|
|
3
|
-
import Graph from "../graph";
|
|
4
|
-
const TEST_LINKS = [
|
|
5
|
-
{
|
|
6
|
-
id: "link-a",
|
|
7
|
-
from: {
|
|
8
|
-
node: "foo",
|
|
9
|
-
port: "output"
|
|
10
|
-
},
|
|
11
|
-
to: {
|
|
12
|
-
node: "bar",
|
|
13
|
-
port: "output"
|
|
14
|
-
},
|
|
15
|
-
labels: [
|
|
16
|
-
{ text: "Link A", position: -0.5, color: "#fff", fontSize: 14, textAnchor: "forward", offset: 10 },
|
|
17
|
-
{ text: "Link B", position: 0.5, color: "#fff", fontSize: 14, textAnchor: "reverse", offset: 10 },
|
|
18
|
-
],
|
|
19
|
-
width: 1,
|
|
20
|
-
forwardColor: "#c7c700",
|
|
21
|
-
reverseColor: "#c71d07",
|
|
22
|
-
forwardDuration: 3,
|
|
23
|
-
reverseDuration: 0,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: "link-b",
|
|
27
|
-
from: {
|
|
28
|
-
node: "tar",
|
|
29
|
-
port: "input"
|
|
30
|
-
},
|
|
31
|
-
to: {
|
|
32
|
-
node: "bar",
|
|
33
|
-
port: "input"
|
|
34
|
-
},
|
|
35
|
-
width: 2,
|
|
36
|
-
labels: [
|
|
37
|
-
{ text: "Link A", position: -0.5, color: "#fff", fontSize: 14, textAnchor: "forward", offset: 10 },
|
|
38
|
-
{ text: "Link B", position: 0.5, color: "#fff", fontSize: 14, textAnchor: "reverse", offset: 10 },
|
|
39
|
-
],
|
|
40
|
-
forwardColor: "#c71d07",
|
|
41
|
-
reverseColor: "#1dc707",
|
|
42
|
-
forwardDuration: 0,
|
|
43
|
-
reverseDuration: 1,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "link-c",
|
|
47
|
-
from: {
|
|
48
|
-
node: "foo",
|
|
49
|
-
port: "input"
|
|
50
|
-
},
|
|
51
|
-
to: {
|
|
52
|
-
node: "tar",
|
|
53
|
-
port: "output"
|
|
54
|
-
},
|
|
55
|
-
width: 3,
|
|
56
|
-
labels: [
|
|
57
|
-
{ text: "Link A", position: -0.5, color: "#fff", fontSize: 14, textAnchor: "forward", offset: 10 },
|
|
58
|
-
{ text: "Link B", position: 0.5, color: "#fff", fontSize: 14, textAnchor: "reverse", offset: 10 },
|
|
59
|
-
],
|
|
60
|
-
forwardColor: "#c71d07",
|
|
61
|
-
reverseColor: "#1dc707",
|
|
62
|
-
forwardDuration: 0,
|
|
63
|
-
reverseDuration: 1,
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
const TEST_OBJECTS = [
|
|
67
|
-
{
|
|
68
|
-
id: "foo",
|
|
69
|
-
position: { x: 300, y: 100, z: 0 },
|
|
70
|
-
ports: [
|
|
71
|
-
{
|
|
72
|
-
id: "input",
|
|
73
|
-
type: "data",
|
|
74
|
-
direction: "input",
|
|
75
|
-
location: "left",
|
|
76
|
-
children: () => _jsx("div", { className: "node-port" }),
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: "output",
|
|
80
|
-
type: "data",
|
|
81
|
-
direction: "output",
|
|
82
|
-
location: "right",
|
|
83
|
-
onDragEnd: async (api, event) => {
|
|
84
|
-
if (event.targetNodeId && event.targetPortName) {
|
|
85
|
-
api.connect({
|
|
86
|
-
connectionType: event.connectionType,
|
|
87
|
-
from: { nodeId: event.sourceNodeId, portName: event.sourcePortName },
|
|
88
|
-
to: { nodeId: event.targetNodeId, portName: event.targetPortName },
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
children: () => _jsx("div", { className: "node-port" }),
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
template: ({ id, ports }) => (_jsxs("div", { style: { background: "red", display: "flex", alignItems: "center" }, children: [ports.left, _jsx("span", { children: "Foo" }), ports.right] }))
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "bar",
|
|
99
|
-
position: { x: 200, y: 300, z: 0 },
|
|
100
|
-
ports: [
|
|
101
|
-
{
|
|
102
|
-
id: "input",
|
|
103
|
-
type: "data",
|
|
104
|
-
direction: "input",
|
|
105
|
-
location: "left",
|
|
106
|
-
children: () => _jsx("div", { className: "node-port" }),
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: "output",
|
|
110
|
-
type: "data",
|
|
111
|
-
direction: "output",
|
|
112
|
-
location: "right",
|
|
113
|
-
onDragEnd: async (api, event) => {
|
|
114
|
-
if (event.targetNodeId && event.targetPortName) {
|
|
115
|
-
api.connect({
|
|
116
|
-
connectionType: event.connectionType,
|
|
117
|
-
from: { nodeId: event.sourceNodeId, portName: event.sourcePortName },
|
|
118
|
-
to: { nodeId: event.targetNodeId, portName: event.targetPortName },
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}, children: () => _jsx("div", { className: "node-port" }),
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
template: ({ id, ports }) => (_jsxs("div", { style: { background: "blue", display: "flex", alignItems: "center" }, children: [ports.left, _jsx("span", { children: "Bar" }), ports.right] }))
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
id: "tar",
|
|
128
|
-
position: { x: 100, y: 100, z: 0 },
|
|
129
|
-
ports: [
|
|
130
|
-
{
|
|
131
|
-
id: "input",
|
|
132
|
-
type: "data",
|
|
133
|
-
direction: "input",
|
|
134
|
-
location: "left",
|
|
135
|
-
children: () => _jsx("div", { className: "node-port" }),
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
id: "output",
|
|
139
|
-
type: "data",
|
|
140
|
-
direction: "output",
|
|
141
|
-
location: "right",
|
|
142
|
-
onDragEnd: async (api, event) => {
|
|
143
|
-
if (event.targetNodeId && event.targetPortName) {
|
|
144
|
-
api.connect({
|
|
145
|
-
connectionType: event.connectionType,
|
|
146
|
-
from: { nodeId: event.sourceNodeId, portName: event.sourcePortName },
|
|
147
|
-
to: { nodeId: event.targetNodeId, portName: event.targetPortName },
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}, children: () => _jsx("div", { className: "node-port" }),
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
template: ({ id, ports }) => (_jsxs("div", { style: { background: "blue", display: "flex", alignItems: "center" }, children: [ports.left, _jsx("span", { children: "Tar" }), ports.right] }))
|
|
154
|
-
}
|
|
155
|
-
];
|
|
156
|
-
export default function GraphTest() {
|
|
157
|
-
const apiRef = useRef(null);
|
|
158
|
-
const fpsRef = useRef(null);
|
|
159
|
-
const fpsCountRef = useRef(0);
|
|
160
|
-
const lastTimeRef = useRef(0);
|
|
161
|
-
useEffect(() => {
|
|
162
|
-
const timeout = window.setTimeout(() => {
|
|
163
|
-
const api = apiRef.current;
|
|
164
|
-
if (api) {
|
|
165
|
-
TEST_OBJECTS.forEach(obj => {
|
|
166
|
-
api.addNode(obj);
|
|
167
|
-
});
|
|
168
|
-
TEST_LINKS.forEach(obj => {
|
|
169
|
-
api.addLink(obj);
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}, 1000);
|
|
173
|
-
return () => {
|
|
174
|
-
window.clearTimeout(timeout);
|
|
175
|
-
};
|
|
176
|
-
}, []);
|
|
177
|
-
useEffect(() => {
|
|
178
|
-
let running = true;
|
|
179
|
-
function calculateFPS(td) {
|
|
180
|
-
if (!running)
|
|
181
|
-
return;
|
|
182
|
-
if (!lastTimeRef.current)
|
|
183
|
-
lastTimeRef.current = performance.now();
|
|
184
|
-
fpsCountRef.current += 1;
|
|
185
|
-
requestAnimationFrame(calculateFPS);
|
|
186
|
-
}
|
|
187
|
-
requestAnimationFrame(calculateFPS);
|
|
188
|
-
let interval = window.setInterval(() => {
|
|
189
|
-
const now = performance.now();
|
|
190
|
-
const delta = now - lastTimeRef.current;
|
|
191
|
-
const fps = ((fpsCountRef.current / delta) * 1000);
|
|
192
|
-
if (fpsRef.current) {
|
|
193
|
-
fpsRef.current.textContent = `FPS: ${fps.toFixed(0)}`;
|
|
194
|
-
}
|
|
195
|
-
fpsCountRef.current = 0;
|
|
196
|
-
lastTimeRef.current = now;
|
|
197
|
-
}, 500);
|
|
198
|
-
return () => {
|
|
199
|
-
running = false;
|
|
200
|
-
window.clearInterval(interval);
|
|
201
|
-
};
|
|
202
|
-
}, []);
|
|
203
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "graph-test-container", children: [_jsx("span", { ref: fpsRef }), _jsx("div", { className: "graph-test-graph", children: _jsx(Graph, { ref: apiRef, mode: "edit", onError: (err) => console.error("[GraphError]", err) }) })] }) }));
|
|
204
|
-
}
|
|
205
|
-
//# sourceMappingURL=graph-teste.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph-teste.js","sourceRoot":"","sources":["../../src/example/graph-teste.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,MAAM,UAAU,CAAC;AAW7B,MAAM,UAAU,GAAqB;IACjC;QACI,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE;YACF,IAAI,EAAE,KAA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AC,CAAA;IAEL,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACH,4BACI,eAAK,SAAS,EAAC,sBAAsB,aACjC,eAAM,GAAG,EAAE,MAAM,GAAI,EACrB,cAAK,SAAS,EAAC,kBAAkB,YAC7B,KAAC,KAAK,IACF,GAAG,EAAE,MAAM,EACX,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,GACtD,GACA,IACJ,GACP,CACN,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reportWebVitals.d.ts","sourceRoot":"","sources":["../../src/example/reportWebVitals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,QAAA,MAAM,eAAe,GAAI,cAAc,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,SAUlE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const reportWebVitals = (onPerfEntry) => {
|
|
2
|
-
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
-
import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
|
|
4
|
-
onCLS(onPerfEntry);
|
|
5
|
-
onINP(onPerfEntry);
|
|
6
|
-
onFCP(onPerfEntry);
|
|
7
|
-
onLCP(onPerfEntry);
|
|
8
|
-
onTTFB(onPerfEntry);
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export default reportWebVitals;
|
|
13
|
-
//# sourceMappingURL=reportWebVitals.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reportWebVitals.js","sourceRoot":"","sources":["../../src/example/reportWebVitals.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG,CAAC,WAA0C,EAAE,EAAE;IACrE,IAAI,WAAW,IAAI,WAAW,YAAY,QAAQ,EAAE,CAAC;QACnD,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;YACnE,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,KAAK,CAAC,WAAW,CAAC,CAAC;YACnB,MAAM,CAAC,WAAW,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|