react-html-graph 1.0.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.
Files changed (88) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1 -1
  3. package/dist/calculations/index.d.ts +15 -1
  4. package/dist/calculations/index.d.ts.map +1 -1
  5. package/dist/calculations/index.js +696 -0
  6. package/dist/calculations/index.js.map +1 -1
  7. package/dist/calculations/types.d.ts +70 -0
  8. package/dist/calculations/types.d.ts.map +1 -1
  9. package/dist/example/App.css +38 -38
  10. package/dist/example/index.css +47 -47
  11. package/dist/graph/index.d.ts.map +1 -1
  12. package/dist/graph/index.js +218 -16
  13. package/dist/graph/index.js.map +1 -1
  14. package/dist/hooks/connection.d.ts.map +1 -1
  15. package/dist/hooks/connection.js +5 -2
  16. package/dist/hooks/connection.js.map +1 -1
  17. package/dist/hooks/get-viewbox.d.ts +9 -0
  18. package/dist/hooks/get-viewbox.d.ts.map +1 -0
  19. package/dist/hooks/get-viewbox.js +20 -0
  20. package/dist/hooks/get-viewbox.js.map +1 -0
  21. package/dist/layouts/centralizar.d.ts +1 -0
  22. package/dist/layouts/centralizar.d.ts.map +1 -0
  23. package/dist/layouts/centralizar.js +2 -0
  24. package/dist/layouts/centralizar.js.map +1 -0
  25. package/dist/layouts/force-direction-layout.d.ts +9 -0
  26. package/dist/layouts/force-direction-layout.d.ts.map +1 -0
  27. package/dist/layouts/force-direction-layout.js +11 -0
  28. package/dist/layouts/force-direction-layout.js.map +1 -0
  29. package/dist/layouts/index.d.ts +13 -0
  30. package/dist/layouts/index.d.ts.map +1 -0
  31. package/dist/layouts/index.js +17 -0
  32. package/dist/layouts/index.js.map +1 -0
  33. package/dist/layouts/organic-layout.d.ts +9 -0
  34. package/dist/layouts/organic-layout.d.ts.map +1 -0
  35. package/dist/layouts/organic-layout.js +11 -0
  36. package/dist/layouts/organic-layout.js.map +1 -0
  37. package/dist/layouts/radial-layout.d.ts +9 -0
  38. package/dist/layouts/radial-layout.d.ts.map +1 -0
  39. package/dist/layouts/radial-layout.js +11 -0
  40. package/dist/layouts/radial-layout.js.map +1 -0
  41. package/dist/layouts/sequential-layout.d.ts +9 -0
  42. package/dist/layouts/sequential-layout.d.ts.map +1 -0
  43. package/dist/layouts/sequential-layout.js +11 -0
  44. package/dist/layouts/sequential-layout.js.map +1 -0
  45. package/dist/layouts/shared.d.ts +10 -0
  46. package/dist/layouts/shared.d.ts.map +1 -0
  47. package/dist/layouts/shared.js +39 -0
  48. package/dist/layouts/shared.js.map +1 -0
  49. package/dist/layouts/structural-layout.d.ts +9 -0
  50. package/dist/layouts/structural-layout.d.ts.map +1 -0
  51. package/dist/layouts/structural-layout.js +11 -0
  52. package/dist/layouts/structural-layout.js.map +1 -0
  53. package/dist/layouts/tree-layout.d.ts +9 -0
  54. package/dist/layouts/tree-layout.d.ts.map +1 -0
  55. package/dist/layouts/tree-layout.js +11 -0
  56. package/dist/layouts/tree-layout.js.map +1 -0
  57. package/dist/link/base.d.ts +3 -2
  58. package/dist/link/base.d.ts.map +1 -1
  59. package/dist/link/base.js +113 -20
  60. package/dist/link/base.js.map +1 -1
  61. package/dist/link/temp-link.d.ts.map +1 -1
  62. package/dist/link/temp-link.js +6 -4
  63. package/dist/link/temp-link.js.map +1 -1
  64. package/dist/module.d.ts +2 -1
  65. package/dist/module.d.ts.map +1 -1
  66. package/dist/module.js +2 -1
  67. package/dist/module.js.map +1 -1
  68. package/dist/nodes/base.d.ts +1 -1
  69. package/dist/nodes/base.d.ts.map +1 -1
  70. package/dist/nodes/base.js +59 -22
  71. package/dist/nodes/base.js.map +1 -1
  72. package/dist/ports/base.d.ts.map +1 -1
  73. package/dist/style.css +77 -77
  74. package/dist/types.d.ts +153 -0
  75. package/dist/types.d.ts.map +1 -1
  76. package/package.json +77 -73
  77. package/dist/example/App.d.ts +0 -3
  78. package/dist/example/App.d.ts.map +0 -1
  79. package/dist/example/App.js +0 -7
  80. package/dist/example/App.js.map +0 -1
  81. package/dist/example/graph-teste.d.ts +0 -2
  82. package/dist/example/graph-teste.d.ts.map +0 -1
  83. package/dist/example/graph-teste.js +0 -205
  84. package/dist/example/graph-teste.js.map +0 -1
  85. package/dist/example/reportWebVitals.d.ts +0 -4
  86. package/dist/example/reportWebVitals.d.ts.map +0 -1
  87. package/dist/example/reportWebVitals.js +0 -13
  88. package/dist/example/reportWebVitals.js.map +0 -1
package/package.json CHANGED
@@ -1,73 +1,77 @@
1
- {
2
- "name": "react-html-graph",
3
- "version": "1.0.0",
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
- "sideEffects": [
12
- "**/*.css"
13
- ],
14
- "exports": {
15
- ".": {
16
- "types": "./dist/module.d.ts",
17
- "import": "./dist/module.js",
18
- "default": "./dist/module.js"
19
- },
20
- "./package.json": "./package.json"
21
- },
22
- "scripts": {
23
- "start": "react-scripts start",
24
- "clean": "node scripts/clean-dist.mjs",
25
- "build": "npm run clean && tsc -p tsconfig.build.json && node scripts/copy-library-assets.mjs",
26
- "build:demo": "react-scripts build",
27
- "test": "react-scripts test",
28
- "eject": "react-scripts eject",
29
- "prepack": "npm run build"
30
- },
31
- "peerDependencies": {
32
- "react": "^19.0.0",
33
- "react-dom": "^19.0.0"
34
- },
35
- "devDependencies": {
36
- "@testing-library/dom": "^10.4.1",
37
- "@testing-library/jest-dom": "^6.9.1",
38
- "@testing-library/react": "^16.3.2",
39
- "@testing-library/user-event": "^14.6.1",
40
- "@types/jest": "^30.0.0",
41
- "@types/node": "^25.6.0",
42
- "@types/react": "^19.2.14",
43
- "@types/react-dom": "^19.2.3",
44
- "react": "^19.2.5",
45
- "react-dom": "^19.2.5",
46
- "react-scripts": "^5.0.1",
47
- "typescript": "^6.0.2",
48
- "web-vitals": "^5.2.0"
49
- },
50
- "eslintConfig": {
51
- "extends": [
52
- "react-app",
53
- "react-app/jest"
54
- ]
55
- },
56
- "overrides": {
57
- "react-scripts": {
58
- "typescript": "^6.0.2"
59
- }
60
- },
61
- "browserslist": {
62
- "production": [
63
- ">0.2%",
64
- "not dead",
65
- "not op_mini all"
66
- ],
67
- "development": [
68
- "last 1 chrome version",
69
- "last 1 firefox version",
70
- "last 1 safari version"
71
- ]
72
- }
73
- }
1
+ {
2
+ "name": "react-html-graph",
3
+ "version": "1.2.2",
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
+ }
@@ -1,3 +0,0 @@
1
- declare function App(): import("react/jsx-runtime").JSX.Element;
2
- export default App;
3
- //# sourceMappingURL=App.d.ts.map
@@ -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"}
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import GraphTest from "./graph-teste";
3
- function App() {
4
- return (_jsx(GraphTest, {}));
5
- }
6
- export default App;
7
- //# sourceMappingURL=App.js.map
@@ -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,2 +0,0 @@
1
- export default function GraphTest(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=graph-teste.d.ts.map
@@ -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,CA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C,EAAE,GAAG,CAAC,CAAC;QACR,OAAO,GAAG,EAAE;YACR,OAAO,GAAG,KAAK,CAAC;YAChB,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC,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,4 +0,0 @@
1
- import { MetricType } from 'web-vitals';
2
- declare const reportWebVitals: (onPerfEntry?: (metric: MetricType) => void) => void;
3
- export default reportWebVitals;
4
- //# sourceMappingURL=reportWebVitals.d.ts.map
@@ -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"}