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.
- package/LICENSE +21 -21
- package/README.md +1 -1
- package/dist/calculations/index.d.ts +15 -1
- package/dist/calculations/index.d.ts.map +1 -1
- package/dist/calculations/index.js +696 -0
- package/dist/calculations/index.js.map +1 -1
- package/dist/calculations/types.d.ts +70 -0
- package/dist/calculations/types.d.ts.map +1 -1
- package/dist/example/App.css +38 -38
- package/dist/example/index.css +47 -47
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +218 -16
- package/dist/graph/index.js.map +1 -1
- package/dist/hooks/connection.d.ts.map +1 -1
- package/dist/hooks/connection.js +5 -2
- package/dist/hooks/connection.js.map +1 -1
- package/dist/hooks/get-viewbox.d.ts +9 -0
- package/dist/hooks/get-viewbox.d.ts.map +1 -0
- package/dist/hooks/get-viewbox.js +20 -0
- package/dist/hooks/get-viewbox.js.map +1 -0
- package/dist/layouts/centralizar.d.ts +1 -0
- package/dist/layouts/centralizar.d.ts.map +1 -0
- package/dist/layouts/centralizar.js +2 -0
- package/dist/layouts/centralizar.js.map +1 -0
- package/dist/layouts/force-direction-layout.d.ts +9 -0
- package/dist/layouts/force-direction-layout.d.ts.map +1 -0
- package/dist/layouts/force-direction-layout.js +11 -0
- package/dist/layouts/force-direction-layout.js.map +1 -0
- package/dist/layouts/index.d.ts +13 -0
- package/dist/layouts/index.d.ts.map +1 -0
- package/dist/layouts/index.js +17 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/layouts/organic-layout.d.ts +9 -0
- package/dist/layouts/organic-layout.d.ts.map +1 -0
- package/dist/layouts/organic-layout.js +11 -0
- package/dist/layouts/organic-layout.js.map +1 -0
- package/dist/layouts/radial-layout.d.ts +9 -0
- package/dist/layouts/radial-layout.d.ts.map +1 -0
- package/dist/layouts/radial-layout.js +11 -0
- package/dist/layouts/radial-layout.js.map +1 -0
- package/dist/layouts/sequential-layout.d.ts +9 -0
- package/dist/layouts/sequential-layout.d.ts.map +1 -0
- package/dist/layouts/sequential-layout.js +11 -0
- package/dist/layouts/sequential-layout.js.map +1 -0
- package/dist/layouts/shared.d.ts +10 -0
- package/dist/layouts/shared.d.ts.map +1 -0
- package/dist/layouts/shared.js +39 -0
- package/dist/layouts/shared.js.map +1 -0
- package/dist/layouts/structural-layout.d.ts +9 -0
- package/dist/layouts/structural-layout.d.ts.map +1 -0
- package/dist/layouts/structural-layout.js +11 -0
- package/dist/layouts/structural-layout.js.map +1 -0
- package/dist/layouts/tree-layout.d.ts +9 -0
- package/dist/layouts/tree-layout.d.ts.map +1 -0
- package/dist/layouts/tree-layout.js +11 -0
- package/dist/layouts/tree-layout.js.map +1 -0
- package/dist/link/base.d.ts +3 -2
- package/dist/link/base.d.ts.map +1 -1
- package/dist/link/base.js +113 -20
- package/dist/link/base.js.map +1 -1
- package/dist/link/temp-link.d.ts.map +1 -1
- package/dist/link/temp-link.js +6 -4
- package/dist/link/temp-link.js.map +1 -1
- package/dist/module.d.ts +2 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +2 -1
- package/dist/module.js.map +1 -1
- package/dist/nodes/base.d.ts +1 -1
- package/dist/nodes/base.d.ts.map +1 -1
- package/dist/nodes/base.js +59 -22
- package/dist/nodes/base.js.map +1 -1
- package/dist/ports/base.d.ts.map +1 -1
- package/dist/style.css +77 -77
- package/dist/types.d.ts +153 -0
- package/dist/types.d.ts.map +1 -1
- 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**...
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PathInput, PathOutput, LabelsInput, LabelOutput } from './types';
|
|
1
|
+
import { PathInput, PathOutput, LabelsInput, LabelOutput, LayoutInput, LayoutOutput, FitViewInput, FitViewOutput } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Configura o tamanho do pool de workers.
|
|
4
4
|
* Deve ser chamado antes do primeiro cálculo para definir quantos workers
|
|
@@ -29,4 +29,18 @@ export declare function calculatePath(input: PathInput): Promise<PathOutput>;
|
|
|
29
29
|
export declare function calculateLabels(input: LabelsInput): Promise<{
|
|
30
30
|
positions: LabelOutput[];
|
|
31
31
|
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Calcula um layout completo para os nós do grafo em um worker do pool.
|
|
34
|
+
*
|
|
35
|
+
* @param input Dados de entrada do algoritmo de layout
|
|
36
|
+
* @returns Promise com as novas posições e bounds resultantes
|
|
37
|
+
*/
|
|
38
|
+
export declare function calculateLayout(input: LayoutInput): Promise<LayoutOutput>;
|
|
39
|
+
/**
|
|
40
|
+
* Calcula o viewbox ideal para enquadrar todos os nós em uma viewport.
|
|
41
|
+
*
|
|
42
|
+
* @param input Dados de entrada para fit da viewport
|
|
43
|
+
* @returns Promise com x, y e zoom calculados
|
|
44
|
+
*/
|
|
45
|
+
export declare function calculateFitView(input: FitViewInput): Promise<FitViewOutput>;
|
|
32
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/calculations/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/calculations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EAChB,MAAM,SAAS,CAAC;AAkhCjB;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,QAK/C;AAqCD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAEnE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAE5E"}
|