@yurialvesbordin/graphium 0.0.0-stage → 2.0.0

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/dist/Graphium.d.ts +156 -0
  4. package/dist/Graphium.d.ts.map +1 -0
  5. package/dist/Graphium.js +413 -0
  6. package/dist/Graphium.js.map +1 -0
  7. package/dist/core/FocusController.d.ts +16 -0
  8. package/dist/core/FocusController.d.ts.map +1 -0
  9. package/dist/core/FocusController.js +53 -0
  10. package/dist/core/FocusController.js.map +1 -0
  11. package/dist/core/GraphEditor.d.ts +61 -0
  12. package/dist/core/GraphEditor.d.ts.map +1 -0
  13. package/dist/core/GraphEditor.js +165 -0
  14. package/dist/core/GraphEditor.js.map +1 -0
  15. package/dist/core/GraphModel.d.ts +166 -0
  16. package/dist/core/GraphModel.d.ts.map +1 -0
  17. package/dist/core/GraphModel.js +730 -0
  18. package/dist/core/GraphModel.js.map +1 -0
  19. package/dist/core/SelectionController.d.ts +26 -0
  20. package/dist/core/SelectionController.d.ts.map +1 -0
  21. package/dist/core/SelectionController.js +78 -0
  22. package/dist/core/SelectionController.js.map +1 -0
  23. package/dist/core/colors.d.ts +27 -0
  24. package/dist/core/colors.d.ts.map +1 -0
  25. package/dist/core/colors.js +141 -0
  26. package/dist/core/colors.js.map +1 -0
  27. package/dist/core/events.d.ts +21 -0
  28. package/dist/core/events.d.ts.map +1 -0
  29. package/dist/core/events.js +64 -0
  30. package/dist/core/events.js.map +1 -0
  31. package/dist/core/handles.d.ts +60 -0
  32. package/dist/core/handles.d.ts.map +1 -0
  33. package/dist/core/handles.js +116 -0
  34. package/dist/core/handles.js.map +1 -0
  35. package/dist/core/theme.d.ts +9 -0
  36. package/dist/core/theme.d.ts.map +1 -0
  37. package/dist/core/theme.js +167 -0
  38. package/dist/core/theme.js.map +1 -0
  39. package/dist/core/themes.d.ts +9 -0
  40. package/dist/core/themes.d.ts.map +1 -0
  41. package/dist/core/themes.js +103 -0
  42. package/dist/core/themes.js.map +1 -0
  43. package/dist/core/types.d.ts +287 -0
  44. package/dist/core/types.d.ts.map +1 -0
  45. package/dist/core/types.js +7 -0
  46. package/dist/core/types.js.map +1 -0
  47. package/dist/index.d.ts +21 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +20 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/interaction/InteractionBinder.d.ts +43 -0
  52. package/dist/interaction/InteractionBinder.d.ts.map +1 -0
  53. package/dist/interaction/InteractionBinder.js +121 -0
  54. package/dist/interaction/InteractionBinder.js.map +1 -0
  55. package/dist/interaction/PointerController.d.ts +83 -0
  56. package/dist/interaction/PointerController.d.ts.map +1 -0
  57. package/dist/interaction/PointerController.js +294 -0
  58. package/dist/interaction/PointerController.js.map +1 -0
  59. package/dist/physics/PhysicsEngine.d.ts +82 -0
  60. package/dist/physics/PhysicsEngine.d.ts.map +1 -0
  61. package/dist/physics/PhysicsEngine.js +469 -0
  62. package/dist/physics/PhysicsEngine.js.map +1 -0
  63. package/dist/physics/SpatialHash.d.ts +36 -0
  64. package/dist/physics/SpatialHash.d.ts.map +1 -0
  65. package/dist/physics/SpatialHash.js +126 -0
  66. package/dist/physics/SpatialHash.js.map +1 -0
  67. package/dist/physics/presets.d.ts +14 -0
  68. package/dist/physics/presets.d.ts.map +1 -0
  69. package/dist/physics/presets.js +108 -0
  70. package/dist/physics/presets.js.map +1 -0
  71. package/dist/render/Camera.d.ts +55 -0
  72. package/dist/render/Camera.d.ts.map +1 -0
  73. package/dist/render/Camera.js +94 -0
  74. package/dist/render/Camera.js.map +1 -0
  75. package/dist/render/LabelLayer.d.ts +32 -0
  76. package/dist/render/LabelLayer.d.ts.map +1 -0
  77. package/dist/render/LabelLayer.js +142 -0
  78. package/dist/render/LabelLayer.js.map +1 -0
  79. package/dist/render/RenderLoop.d.ts +67 -0
  80. package/dist/render/RenderLoop.d.ts.map +1 -0
  81. package/dist/render/RenderLoop.js +126 -0
  82. package/dist/render/RenderLoop.js.map +1 -0
  83. package/dist/render/Renderer.d.ts +73 -0
  84. package/dist/render/Renderer.d.ts.map +1 -0
  85. package/dist/render/Renderer.js +512 -0
  86. package/dist/render/Renderer.js.map +1 -0
  87. package/dist/render/TextureAtlas.d.ts +51 -0
  88. package/dist/render/TextureAtlas.d.ts.map +1 -0
  89. package/dist/render/TextureAtlas.js +160 -0
  90. package/dist/render/TextureAtlas.js.map +1 -0
  91. package/dist/render/ViewportController.d.ts +34 -0
  92. package/dist/render/ViewportController.d.ts.map +1 -0
  93. package/dist/render/ViewportController.js +57 -0
  94. package/dist/render/ViewportController.js.map +1 -0
  95. package/dist/render/geometry.d.ts +19 -0
  96. package/dist/render/geometry.d.ts.map +1 -0
  97. package/dist/render/geometry.js +71 -0
  98. package/dist/render/geometry.js.map +1 -0
  99. package/dist/render/shaders.d.ts +13 -0
  100. package/dist/render/shaders.d.ts.map +1 -0
  101. package/dist/render/shaders.js +183 -0
  102. package/dist/render/shaders.js.map +1 -0
  103. package/package.json +73 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Graphium contributors
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,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # Graphium
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![TypeScript](https://img.shields.io/badge/built%20with-TypeScript-0074c1.svg)](http://www.typescriptlang.org/)
5
+ [![WebGL2](https://img.shields.io/badge/WebGL2-enabled-ff69b4.svg)](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API)
6
+ [![npm version](https://img.shields.io/npm/v/@yurialvesbordin/graphium.svg)](https://www.npmjs.com/package/@yurialvesbordin/graphium)
7
+
8
+ High-performance WebGL2 graph visualization with silk-smooth force physics, curved edges and node images.
9
+
10
+ ![Graphium clusters layout](docs/assets/hero.png)
11
+
12
+ <table>
13
+ <tr>
14
+ <td width="50%"><img src="docs/assets/curved-edges.png" alt="Curved edges"></td>
15
+ <td width="50%"><img src="docs/assets/light-theme.png" alt="Light theme"></td>
16
+ </tr>
17
+ <tr>
18
+ <td align="center">Curved edges rendered on the GPU</td>
19
+ <td align="center">Built-in light theme</td>
20
+ </tr>
21
+ </table>
22
+
23
+ ![Tree layout with arrows](docs/assets/tree.png)
24
+
25
+ Install: `npm install @yurialvesbordin/graphium`
26
+
27
+ Full guides live in the [`docs/`](docs) directory:
28
+
29
+ - [Getting Started](docs/getting-started.md)
30
+ - [Physics Configuration](docs/physics-configuration.md)
31
+ - [Theming Guide](docs/theming-guide.md)
32
+ - [Node Images](docs/node-images.md)
33
+ - [Events & Interaction](docs/events-interaction.md)
34
+ - [Performance Tuning](docs/performance-tuning.md)
35
+
36
+ Interactive playground: run `npm run demo` and open the served URL.
37
+
38
+ License: MIT
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Implements the main Graphium facade. The class wires the data model,
3
+ * physics engine, camera, renderer, label layer and pointer controller into
4
+ * one object, exposes a fluent chainable API with sensible defaults, and
5
+ * runs an on demand render loop that pauses completely while the simulation
6
+ * sleeps.
7
+ */
8
+ import { Emitter } from './core/events.js';
9
+ import { GraphEditor } from './core/GraphEditor.js';
10
+ import { GraphModel } from './core/GraphModel.js';
11
+ import { LinkHandle, NodeHandle } from './core/handles.js';
12
+ import type { GraphData, GraphiumOptions, InteractionOptions, LinkId, LinkOptions, LinkSnapshot, NodeId, NodeOptions, NodeSnapshot, PhysicsOptions, PhysicsPresetName, StatsSnapshot, ThemeOptions, ThemeResolved } from './core/types.js';
13
+ import { PhysicsEngine } from './physics/PhysicsEngine.js';
14
+ import { Camera } from './render/Camera.js';
15
+ import { LabelLayer } from './render/LabelLayer.js';
16
+ import { Renderer } from './render/Renderer.js';
17
+ import { TextureAtlas } from './render/TextureAtlas.js';
18
+ export declare class Graphium {
19
+ readonly model: GraphModel;
20
+ readonly physics: PhysicsEngine;
21
+ readonly camera: Camera;
22
+ readonly renderer: Renderer;
23
+ readonly atlas: TextureAtlas;
24
+ readonly labels: LabelLayer;
25
+ readonly editor: GraphEditor;
26
+ readonly events: Emitter;
27
+ theme: ThemeResolved;
28
+ running: boolean;
29
+ destroyed: boolean;
30
+ private options;
31
+ private readonly loop;
32
+ private readonly selection;
33
+ private readonly focusController;
34
+ private readonly viewport;
35
+ private readonly binder;
36
+ constructor(options?: GraphiumOptions);
37
+ /** Creates a Graphium instance with the supplied configuration. */
38
+ static create(options?: GraphiumOptions): Graphium;
39
+ /** Subscribes to an event and returns an unsubscribe function. */
40
+ on<T = unknown>(type: string, listener: (payload: T) => void): () => void;
41
+ /** Subscribes to an event exactly once. */
42
+ once<T = unknown>(type: string, listener: (payload: T) => void): () => void;
43
+ /** Removes one listener, or every listener of a type. */
44
+ off<T = unknown>(type: string, listener?: (payload: T) => void): this;
45
+ /** Dispatches an event payload to the registered listeners. */
46
+ emit<T = unknown>(type: string, payload: T): this;
47
+ /** Adds one node and returns the graph for chaining. */
48
+ addNode(id: NodeId, options?: NodeOptions): this;
49
+ /** Adds many nodes in one call and returns the graph for chaining. */
50
+ addNodes(nodes: Array<NodeOptions & {
51
+ id: NodeId;
52
+ }>): this;
53
+ /** Links two nodes, reusing an existing link with the same auto id. */
54
+ link(source: NodeId, target: NodeId, options?: LinkOptions): this;
55
+ /** Returns a fluent handle when called with a single link id. */
56
+ link(id: LinkId): LinkHandle | null;
57
+ /** Adds many links in one call and returns the graph for chaining. */
58
+ addLinks(links: Array<LinkOptions & {
59
+ source: NodeId;
60
+ target: NodeId;
61
+ }>): this;
62
+ /** Returns a fluent handle for one node, or null when it is missing. */
63
+ node(id: NodeId): NodeHandle | null;
64
+ /** Returns a fluent handle for one link, or null when it is missing. */
65
+ linkById(id: LinkId): LinkHandle | null;
66
+ /** Replaces the entire graph with the supplied data payload. */
67
+ setData(data: GraphData): this;
68
+ /** Removes one node together with its links. */
69
+ removeNode(id: NodeId): boolean;
70
+ /** Removes one link by id. */
71
+ removeLink(id: LinkId): boolean;
72
+ /** Removes every node and link while keeping the current theme. */
73
+ clear(): this;
74
+ /** Returns a snapshot of one node or null when it does not exist. */
75
+ getNode(id: NodeId): NodeSnapshot | null;
76
+ /** Returns a snapshot of one link or null when it does not exist. */
77
+ getLink(id: LinkId): LinkSnapshot | null;
78
+ /** Returns the ids of every node currently in the graph. */
79
+ nodeIds(): NodeId[];
80
+ /** Returns the ids of every link currently in the graph. */
81
+ linkIds(): LinkId[];
82
+ /** Sets the node image and starts the asynchronous load. */
83
+ setNodeImage(id: NodeId | number, url: string | null, mode?: 'cover' | 'contain'): this;
84
+ /** Selects one node, optionally keeping the current selection. */
85
+ selectNode(id: NodeId | number, selected?: boolean, additive?: boolean): this;
86
+ /** Selects one link, optionally keeping the current selection. */
87
+ selectLink(id: LinkId | number, selected?: boolean, additive?: boolean): this;
88
+ /** Clears the selection of every node and link. */
89
+ clearSelection(): this;
90
+ /** Returns the ids of every selected node. */
91
+ selectedNodes(): NodeId[];
92
+ /** Returns the ids of every selected link. */
93
+ selectedLinks(): LinkId[];
94
+ /** Dims every node and link that is not adjacent to the focus node. */
95
+ focus(id: NodeId | number): this;
96
+ /** Removes all dimming applied by focus. */
97
+ unfocus(): this;
98
+ /** Merges theme values, optionally starting from a built in theme name. */
99
+ setTheme(theme: ThemeOptions & {
100
+ name?: string;
101
+ }): this;
102
+ /** Updates physics options live and wakes the simulation. */
103
+ setPhysics(options: PhysicsOptions): this;
104
+ /** Applies a named physics preset with optional overrides. */
105
+ usePreset(name: PhysicsPresetName, overrides?: PhysicsOptions): this;
106
+ /** Updates interaction options on the live pointer controller. */
107
+ setInteraction(options: InteractionOptions): this;
108
+ /** Restarts the simulation and returns the graph for chaining. */
109
+ reboot(): this;
110
+ /** Scales the view so the whole graph fits with padding. */
111
+ fit(padding?: number): this;
112
+ /** Centers the view on a world point. */
113
+ centerOn(x: number, y: number): this;
114
+ /** Multiplies the current zoom level. */
115
+ zoomBy(factor: number): this;
116
+ /** Sets an absolute zoom level. */
117
+ zoomTo(zoom: number): this;
118
+ /** Resizes the renderer to the canvas client size. */
119
+ resize(): this;
120
+ /** Advances physics and renders once, returning the kinetic energy. */
121
+ step(dt?: number): number;
122
+ /** Renders a frame immediately without stepping the simulation. */
123
+ render(): this;
124
+ /** Requests a render on the next scheduled frame. */
125
+ requestRender(): this;
126
+ /** Marks the view dirty and guarantees a scheduled frame. */
127
+ private invalidate;
128
+ /** Starts the run loop and returns the graph for chaining. */
129
+ start(): this;
130
+ /** Stops the run loop and returns the graph for chaining. */
131
+ stop(): this;
132
+ /** Resolves when every requested node image finished loading. */
133
+ loadImages(): Promise<void>;
134
+ /** Finds the link index closest to a world position within a radius. */
135
+ pickLinkAt(worldX: number, worldY: number, hitRadius?: number): number;
136
+ /** Returns the world position under a screen position. */
137
+ screenToWorld(screenX: number, screenY: number): {
138
+ x: number;
139
+ y: number;
140
+ };
141
+ /** Returns a performance statistics snapshot for dashboards. */
142
+ stats(): StatsSnapshot;
143
+ /** Captures the current canvas contents as a PNG data URL. */
144
+ screenshot(): string;
145
+ /** Exports the current graph as a plain JSON friendly object. */
146
+ toJSON(): GraphData;
147
+ /** Releases every resource owned by the instance. */
148
+ destroy(): void;
149
+ /** Returns the number of nodes in the graph. */
150
+ get nodeCount(): number;
151
+ /** Returns the number of links in the graph. */
152
+ get linkCount(): number;
153
+ /** Reports whether the physics simulation is currently asleep. */
154
+ get sleeping(): boolean;
155
+ }
156
+ //# sourceMappingURL=Graphium.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graphium.d.ts","sourceRoot":"","sources":["../src/Graphium.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,MAAM,EACN,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;A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,GAAG,IAAI;IAKpC,yCAAyC;IACzC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B,mCAAmC;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK1B,sDAAsD;IACtD,MAAM,IAAI,IAAI;IAKd,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM;IAIzB,mEAAmE;IACnE,MAAM,IAAI,IAAI;IAKd,qDAAqD;IACrD,aAAa,IAAI,IAAI;IAKrB,6DAA6D;IAC7D,OAAO,CAAC,UAAU;IAIlB,8DAA8D;IAC9D,KAAK,IAAI,IAAI;IAWb,6DAA6D;IAC7D,IAAI,IAAI,IAAI;IASZ,iEAAiE;IACjE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,wEAAwE;IACxE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,MAAM;IAIjE,0DAA0D;IAC1D,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAIzE,gEAAgE;IAChE,KAAK,IAAI,aAAa;IAYtB,8DAA8D;IAC9D,UAAU,IAAI,MAAM;IAKpB,iEAAiE;IACjE,MAAM,IAAI,SAAS;IAInB,qDAAqD;IACrD,OAAO,IAAI,IAAI;IAef,gDAAgD;IAChD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,gDAAgD;IAChD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,kEAAkE;IAClE,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACF"}
@@ -0,0 +1,413 @@
1
+ /**
2
+ * Implements the main Graphium facade. The class wires the data model,
3
+ * physics engine, camera, renderer, label layer and pointer controller into
4
+ * one object, exposes a fluent chainable API with sensible defaults, and
5
+ * runs an on demand render loop that pauses completely while the simulation
6
+ * sleeps.
7
+ */
8
+ import { Emitter } from './core/events.js';
9
+ import { FocusController } from './core/FocusController.js';
10
+ import { GraphEditor } from './core/GraphEditor.js';
11
+ import { GraphModel } from './core/GraphModel.js';
12
+ import { LinkHandle, NodeHandle } from './core/handles.js';
13
+ import { SelectionController } from './core/SelectionController.js';
14
+ import { resolveTheme } from './core/theme.js';
15
+ import { BUILT_IN_THEMES } from './core/themes.js';
16
+ import { InteractionBinder } from './interaction/InteractionBinder.js';
17
+ import { PhysicsEngine } from './physics/PhysicsEngine.js';
18
+ import { Camera } from './render/Camera.js';
19
+ import { LabelLayer } from './render/LabelLayer.js';
20
+ import { RenderLoop } from './render/RenderLoop.js';
21
+ import { Renderer } from './render/Renderer.js';
22
+ import { TextureAtlas } from './render/TextureAtlas.js';
23
+ import { ViewportController } from './render/ViewportController.js';
24
+ export class Graphium {
25
+ constructor(options = {}) {
26
+ this.events = new Emitter();
27
+ this.running = false;
28
+ this.destroyed = false;
29
+ this.options = options;
30
+ this.theme = resolveTheme(options.theme);
31
+ this.model = new GraphModel({
32
+ nodeCapacity: options.nodeCapacity,
33
+ linkCapacity: options.linkCapacity,
34
+ theme: this.theme,
35
+ });
36
+ this.physics = new PhysicsEngine(this.model, options.physics ?? {});
37
+ this.physics.hash.setCellSize(this.physics.options.repulsionRadius);
38
+ this.camera = new Camera(options.camera ?? {});
39
+ const canvas = options.canvas ?? (options.container ? createCanvasIn(options.container) : createCanvasIn(document.body));
40
+ this.renderer = new Renderer(canvas, this.theme, options.renderer ?? {});
41
+ this.renderer.setCamera(this.camera);
42
+ this.atlas = new TextureAtlas(this.renderer.gl);
43
+ this.renderer.setAtlas(this.atlas);
44
+ this.atlas.onEvent = event => {
45
+ this.events.emit(event.type, event);
46
+ this.invalidate();
47
+ };
48
+ const host = canvas.parentElement ?? document.body;
49
+ this.labels = new LabelLayer(host, this.theme);
50
+ this.labels.attach(this.model, this.camera);
51
+ this.loop = new RenderLoop({
52
+ model: this.model,
53
+ physics: this.physics,
54
+ camera: this.camera,
55
+ renderer: this.renderer,
56
+ labels: this.labels,
57
+ atlas: this.atlas,
58
+ isRunning: () => this.running,
59
+ isDestroyed: () => this.destroyed,
60
+ autoFit: options.autoFit ?? false,
61
+ fitView: () => this.fit(),
62
+ });
63
+ this.editor = new GraphEditor({
64
+ model: this.model,
65
+ physics: this.physics,
66
+ events: this.events,
67
+ resetAutoFit: () => this.loop.resetAutoFit(),
68
+ invalidate: () => this.invalidate(),
69
+ });
70
+ this.selection = new SelectionController(this.model, () => this.invalidate());
71
+ this.focusController = new FocusController(this.model, () => this.invalidate());
72
+ this.viewport = new ViewportController({
73
+ model: this.model,
74
+ camera: this.camera,
75
+ renderer: this.renderer,
76
+ invalidate: () => this.invalidate(),
77
+ });
78
+ this.binder = new InteractionBinder({
79
+ canvas,
80
+ model: this.model,
81
+ physics: this.physics,
82
+ camera: this.camera,
83
+ hash: this.physics.hash,
84
+ events: this.events,
85
+ interaction: options.interaction,
86
+ selection: this.selection,
87
+ invalidate: () => this.invalidate(),
88
+ });
89
+ this.resize();
90
+ if (typeof ResizeObserver !== 'undefined' && (options.autoResize ?? true)) {
91
+ new ResizeObserver(() => this.resize()).observe(canvas);
92
+ }
93
+ if (options.autoStart ?? true) {
94
+ this.start();
95
+ }
96
+ }
97
+ /** Creates a Graphium instance with the supplied configuration. */
98
+ static create(options = {}) {
99
+ return new Graphium(options);
100
+ }
101
+ /** Subscribes to an event and returns an unsubscribe function. */
102
+ on(type, listener) {
103
+ return this.events.on(type, listener);
104
+ }
105
+ /** Subscribes to an event exactly once. */
106
+ once(type, listener) {
107
+ return this.events.once(type, listener);
108
+ }
109
+ /** Removes one listener, or every listener of a type. */
110
+ off(type, listener) {
111
+ this.events.off(type, listener);
112
+ return this;
113
+ }
114
+ /** Dispatches an event payload to the registered listeners. */
115
+ emit(type, payload) {
116
+ this.events.emit(type, payload);
117
+ return this;
118
+ }
119
+ /** Adds one node and returns the graph for chaining. */
120
+ addNode(id, options = {}) {
121
+ this.editor.addNode(id, options);
122
+ return this;
123
+ }
124
+ /** Adds many nodes in one call and returns the graph for chaining. */
125
+ addNodes(nodes) {
126
+ this.editor.addNodes(nodes);
127
+ return this;
128
+ }
129
+ link(sourceOrId, target, options = {}) {
130
+ if (target === undefined) {
131
+ return this.linkById(sourceOrId);
132
+ }
133
+ this.editor.link(sourceOrId, target, options);
134
+ return this;
135
+ }
136
+ /** Adds many links in one call and returns the graph for chaining. */
137
+ addLinks(links) {
138
+ this.editor.addLinks(links);
139
+ return this;
140
+ }
141
+ /** Returns a fluent handle for one node, or null when it is missing. */
142
+ node(id) {
143
+ const index = this.model.nodeIndexOf(id);
144
+ return index < 0 ? null : new NodeHandle(this, this.model.nodeIdAt(index));
145
+ }
146
+ /** Returns a fluent handle for one link, or null when it is missing. */
147
+ linkById(id) {
148
+ const index = this.model.linkIndexOf(id);
149
+ return index < 0 ? null : new LinkHandle(this, this.model.linkIdAt(index));
150
+ }
151
+ /** Replaces the entire graph with the supplied data payload. */
152
+ setData(data) {
153
+ this.editor.setData(data);
154
+ return this;
155
+ }
156
+ /** Removes one node together with its links. */
157
+ removeNode(id) {
158
+ return this.editor.removeNode(id);
159
+ }
160
+ /** Removes one link by id. */
161
+ removeLink(id) {
162
+ return this.editor.removeLink(id);
163
+ }
164
+ /** Removes every node and link while keeping the current theme. */
165
+ clear() {
166
+ this.editor.clear();
167
+ return this;
168
+ }
169
+ /** Returns a snapshot of one node or null when it does not exist. */
170
+ getNode(id) {
171
+ const index = this.model.nodeIndexOf(id);
172
+ return index < 0 ? null : this.model.nodeSnapshot(index);
173
+ }
174
+ /** Returns a snapshot of one link or null when it does not exist. */
175
+ getLink(id) {
176
+ const index = this.model.linkIndexOf(id);
177
+ return index < 0 ? null : this.model.linkSnapshot(index);
178
+ }
179
+ /** Returns the ids of every node currently in the graph. */
180
+ nodeIds() {
181
+ const ids = [];
182
+ for (let index = 0; index < this.model.nodeCount; index++) {
183
+ ids.push(this.model.nodeIdAt(index));
184
+ }
185
+ return ids;
186
+ }
187
+ /** Returns the ids of every link currently in the graph. */
188
+ linkIds() {
189
+ const ids = [];
190
+ for (let index = 0; index < this.model.linkCount; index++) {
191
+ ids.push(this.model.linkIdAt(index));
192
+ }
193
+ return ids;
194
+ }
195
+ /** Sets the node image and starts the asynchronous load. */
196
+ setNodeImage(id, url, mode = 'cover') {
197
+ this.editor.setNodeImage(id, url, mode);
198
+ return this;
199
+ }
200
+ /** Selects one node, optionally keeping the current selection. */
201
+ selectNode(id, selected = true, additive = false) {
202
+ this.selection.selectNode(id, selected, additive);
203
+ return this;
204
+ }
205
+ /** Selects one link, optionally keeping the current selection. */
206
+ selectLink(id, selected = true, additive = false) {
207
+ this.selection.selectLink(id, selected, additive);
208
+ return this;
209
+ }
210
+ /** Clears the selection of every node and link. */
211
+ clearSelection() {
212
+ this.selection.clear();
213
+ return this;
214
+ }
215
+ /** Returns the ids of every selected node. */
216
+ selectedNodes() {
217
+ return this.selection.selectedNodes();
218
+ }
219
+ /** Returns the ids of every selected link. */
220
+ selectedLinks() {
221
+ return this.selection.selectedLinks();
222
+ }
223
+ /** Dims every node and link that is not adjacent to the focus node. */
224
+ focus(id) {
225
+ this.focusController.focus(id);
226
+ return this;
227
+ }
228
+ /** Removes all dimming applied by focus. */
229
+ unfocus() {
230
+ this.focusController.unfocus();
231
+ return this;
232
+ }
233
+ /** Merges theme values, optionally starting from a built in theme name. */
234
+ setTheme(theme) {
235
+ const base = theme.name && BUILT_IN_THEMES[theme.name] ? BUILT_IN_THEMES[theme.name] : this.options.theme ?? {};
236
+ const merged = { ...base, ...theme };
237
+ delete merged.name;
238
+ this.options.theme = merged;
239
+ this.theme = resolveTheme(merged, this.theme);
240
+ this.model.palette = this.theme.nodeColorPalette;
241
+ this.renderer.setTheme(this.theme);
242
+ this.labels.theme = this.theme;
243
+ this.labels.applyTheme();
244
+ this.labels.minZoom = this.theme.labelEnabled ? 0.3 : 2;
245
+ this.invalidate();
246
+ return this;
247
+ }
248
+ /** Updates physics options live and wakes the simulation. */
249
+ setPhysics(options) {
250
+ this.physics.setOptions(options);
251
+ this.physics.hash.setCellSize(this.physics.options.repulsionRadius);
252
+ return this;
253
+ }
254
+ /** Applies a named physics preset with optional overrides. */
255
+ usePreset(name, overrides = {}) {
256
+ this.physics.usePreset(name, overrides);
257
+ this.physics.hash.setCellSize(this.physics.options.repulsionRadius);
258
+ return this;
259
+ }
260
+ /** Updates interaction options on the live pointer controller. */
261
+ setInteraction(options) {
262
+ this.binder.setInteraction(options);
263
+ return this;
264
+ }
265
+ /** Restarts the simulation and returns the graph for chaining. */
266
+ reboot() {
267
+ this.physics.reset();
268
+ return this;
269
+ }
270
+ /** Scales the view so the whole graph fits with padding. */
271
+ fit(padding = 60) {
272
+ this.viewport.fit(padding);
273
+ return this;
274
+ }
275
+ /** Centers the view on a world point. */
276
+ centerOn(x, y) {
277
+ this.viewport.centerOn(x, y);
278
+ return this;
279
+ }
280
+ /** Multiplies the current zoom level. */
281
+ zoomBy(factor) {
282
+ this.viewport.zoomBy(factor);
283
+ return this;
284
+ }
285
+ /** Sets an absolute zoom level. */
286
+ zoomTo(zoom) {
287
+ this.viewport.zoomTo(zoom);
288
+ return this;
289
+ }
290
+ /** Resizes the renderer to the canvas client size. */
291
+ resize() {
292
+ this.viewport.resize();
293
+ return this;
294
+ }
295
+ /** Advances physics and renders once, returning the kinetic energy. */
296
+ step(dt = 1 / 60) {
297
+ return this.loop.step(dt);
298
+ }
299
+ /** Renders a frame immediately without stepping the simulation. */
300
+ render() {
301
+ this.loop.renderNow();
302
+ return this;
303
+ }
304
+ /** Requests a render on the next scheduled frame. */
305
+ requestRender() {
306
+ this.loop.requestRender();
307
+ return this;
308
+ }
309
+ /** Marks the view dirty and guarantees a scheduled frame. */
310
+ invalidate() {
311
+ this.loop.invalidate();
312
+ }
313
+ /** Starts the run loop and returns the graph for chaining. */
314
+ start() {
315
+ if (this.running || this.destroyed) {
316
+ return this;
317
+ }
318
+ this.running = true;
319
+ this.physics.wake();
320
+ this.events.emit('start', {});
321
+ this.loop.schedule();
322
+ return this;
323
+ }
324
+ /** Stops the run loop and returns the graph for chaining. */
325
+ stop() {
326
+ if (!this.running) {
327
+ return this;
328
+ }
329
+ this.running = false;
330
+ this.events.emit('stop', {});
331
+ return this;
332
+ }
333
+ /** Resolves when every requested node image finished loading. */
334
+ loadImages() {
335
+ return this.atlas.loadAll();
336
+ }
337
+ /** Finds the link index closest to a world position within a radius. */
338
+ pickLinkAt(worldX, worldY, hitRadius = 8) {
339
+ return this.binder.pickLinkAt(worldX, worldY, hitRadius);
340
+ }
341
+ /** Returns the world position under a screen position. */
342
+ screenToWorld(screenX, screenY) {
343
+ return this.viewport.screenToWorld(screenX, screenY);
344
+ }
345
+ /** Returns a performance statistics snapshot for dashboards. */
346
+ stats() {
347
+ return {
348
+ nodeCount: this.model.nodeCount,
349
+ linkCount: this.model.linkCount,
350
+ fps: Math.round(this.loop.fps),
351
+ frameMs: Math.round(this.loop.frameMs * 100) / 100,
352
+ physicsMs: Math.round(this.loop.physicsMs * 100) / 100,
353
+ renderMs: Math.round(this.renderer.lastRenderMs * 100) / 100,
354
+ sleeping: this.physics.sleeping,
355
+ };
356
+ }
357
+ /** Captures the current canvas contents as a PNG data URL. */
358
+ screenshot() {
359
+ this.loop.renderNow();
360
+ return this.renderer.canvas.toDataURL('image/png');
361
+ }
362
+ /** Exports the current graph as a plain JSON friendly object. */
363
+ toJSON() {
364
+ return this.editor.toJSON();
365
+ }
366
+ /** Releases every resource owned by the instance. */
367
+ destroy() {
368
+ if (this.destroyed) {
369
+ return;
370
+ }
371
+ this.destroyed = true;
372
+ this.running = false;
373
+ this.loop.cancel();
374
+ this.binder.destroy();
375
+ this.labels.destroy();
376
+ this.atlas.onEvent = null;
377
+ this.renderer.destroy();
378
+ this.events.clear();
379
+ this.model.clear();
380
+ }
381
+ /** Returns the number of nodes in the graph. */
382
+ get nodeCount() {
383
+ return this.model.nodeCount;
384
+ }
385
+ /** Returns the number of links in the graph. */
386
+ get linkCount() {
387
+ return this.model.linkCount;
388
+ }
389
+ /** Reports whether the physics simulation is currently asleep. */
390
+ get sleeping() {
391
+ return this.physics.sleeping;
392
+ }
393
+ }
394
+ /** Creates a canvas element appended to a host element. */
395
+ function createCanvasIn(host) {
396
+ const canvas = document.createElement('canvas');
397
+ Object.assign(canvas.style, {
398
+ display: 'block',
399
+ width: '100%',
400
+ height: '100%',
401
+ position: 'absolute',
402
+ top: '0',
403
+ left: '0',
404
+ zIndex: '0',
405
+ touchAction: 'none',
406
+ });
407
+ if (host !== document.body) {
408
+ Object.assign(host.style, { position: 'relative' });
409
+ }
410
+ host.appendChild(canvas);
411
+ return canvas;
412
+ }
413
+ //# sourceMappingURL=Graphium.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graphium.js","sourceRoot":"","sources":["../src/Graphium.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAiBnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB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