@krainovsd/graph 0.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/README.md +31 -0
- package/lib/esm/index.js +764 -0
- package/lib/esm/index.js.map +1 -0
- package/package.json +73 -0
- package/tmp/app/index.d.ts +1 -0
- package/tmp/app/lib/get-link-count.d.ts +3 -0
- package/tmp/app/lib/get-node-neighbors.d.ts +3 -0
- package/tmp/app/lib/index.d.ts +3 -0
- package/tmp/app/lib/perf-test-wrapper.d.ts +1 -0
- package/tmp/app/mock/custom-mock.d.ts +3 -0
- package/tmp/app/mock/dynamic-mock.d.ts +3 -0
- package/tmp/app/mock/index.d.ts +7 -0
- package/tmp/app/types.d.ts +4 -0
- package/tmp/index.d.ts +1 -0
- package/tmp/lib/check-type.d.ts +1 -0
- package/tmp/lib/color-getter.d.ts +1 -0
- package/tmp/lib/index.d.ts +3 -0
- package/tmp/lib/underscore.d.ts +2 -0
- package/tmp/module/Graph/Graph.d.ts +0 -0
- package/tmp/module/Graph/Graph.types.d.ts +0 -0
- package/tmp/module/Graph/index.d.ts +0 -0
- package/tmp/module/GraphCanvas/GraphCanvas.d.ts +49 -0
- package/tmp/module/GraphCanvas/constants/index.d.ts +1 -0
- package/tmp/module/GraphCanvas/constants/settings.d.ts +50 -0
- package/tmp/module/GraphCanvas/index.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/force-settings-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/graph-settings-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/index.d.ts +6 -0
- package/tmp/module/GraphCanvas/lib/links/index.d.ts +3 -0
- package/tmp/module/GraphCanvas/lib/links/link-iteration-extractor.d.ts +5 -0
- package/tmp/module/GraphCanvas/lib/links/link-options-getter.d.ts +4 -0
- package/tmp/module/GraphCanvas/lib/links/link-settings-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/listeners-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/nodes/drag-place-coefficient-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/nodes/index.d.ts +8 -0
- package/tmp/module/GraphCanvas/lib/nodes/is-overlaps-node.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-by-pointer-getter.d.ts +11 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-id-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-iteration-extractor.d.ts +5 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-options-getter.d.ts +4 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-radius-getter.d.ts +8 -0
- package/tmp/module/GraphCanvas/lib/nodes/node-settings-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/lib/pointer-getter.d.ts +2 -0
- package/tmp/module/GraphCanvas/types/graph.d.ts +15 -0
- package/tmp/module/GraphCanvas/types/index.d.ts +3 -0
- package/tmp/module/GraphCanvas/types/listeners.d.ts +21 -0
- package/tmp/module/GraphCanvas/types/settings.d.ts +62 -0
- package/tmp/module/GraphCanvasEngine/GraphCanvasEngine.d.ts +0 -0
- package/tmp/module/GraphCanvasEngine/GraphCanvasEngine.types.d.ts +0 -0
- package/tmp/module/GraphCanvasEngine/index.d.ts +0 -0
- package/tmp/types/index.d.ts +2 -0
- package/tmp/types/links.d.ts +5 -0
- package/tmp/types/nodes.d.ts +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @krainovsd/graph
|
|
2
|
+
|
|
3
|
+
## Download
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
pnpm i @krainovsd/graph
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { Graph } from "@krainovsd/graph";
|
|
14
|
+
|
|
15
|
+
const root = document.querySelector<HTMLElement>("div#container");
|
|
16
|
+
const graph = new Graph({
|
|
17
|
+
links,
|
|
18
|
+
nodes,
|
|
19
|
+
root,
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## API
|
|
24
|
+
|
|
25
|
+
### root
|
|
26
|
+
|
|
27
|
+
Type: `HTMLElement`<br>
|
|
28
|
+
Required: `true`
|
|
29
|
+
|
|
30
|
+
The node for mounting the graph.
|
|
31
|
+
|