@kortexya/nodus 0.1.7 → 0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortexya/nodus",
3
- "version": "0.1.7",
3
+ "version": "0.2.2",
4
4
  "description": "Nodus — a high-performance graph visualization engine (WebGL/WebGPU/Canvas/SVG).",
5
5
  "homepage": "https://kortexya.com",
6
6
  "author": "Kortexya <david.loiret@kortexya.com>",
@@ -8,6 +8,12 @@ export declare class Edge<ED = any, ND = any> {
8
8
  get _indexes(): Uint32Array;
9
9
  setAttributes(attrs: any, opts?: any): Promise<void>;
10
10
  setAttribute(name: string, value: any, opts?: any): Promise<void>;
11
+ /**
12
+ * Incrementally update this edge's visual attributes (e.g. `{ color, width }`)
13
+ * in place: re-renders only this edge and preserves the current pan/zoom — no
14
+ * `setGraph`/full re-upload. Convenience alias of `setAttributes`.
15
+ */
16
+ set(attrs: any, opts?: any): Promise<void>;
11
17
  getAttributes(names?: any): any;
12
18
  getAttribute(name: string): any;
13
19
  resetAttributes(names?: any, opts?: any): Promise<void>;
@@ -36,6 +42,8 @@ export declare class Edge<ED = any, ND = any> {
36
42
  slice(): any;
37
43
  get(index: number): this | undefined;
38
44
  getId(): string | number;
45
+ /** The element's user-facing id, exposed directly on event targets. */
46
+ get id(): string | number;
39
47
  toJSON(opts?: any): any;
40
48
  setSelected(value: boolean): void;
41
49
  isSelected(): boolean;
@@ -13,6 +13,12 @@ export declare class Node<ND = any, ED = any> {
13
13
  get _indexes(): Uint32Array;
14
14
  setAttributes(attrs: any, opts?: any): Promise<void>;
15
15
  setAttribute(name: string, value: any, opts?: any): Promise<void>;
16
+ /**
17
+ * Incrementally update this node's visual attributes (e.g. `{ color, radius }`)
18
+ * in place: re-renders only this node and preserves the current pan/zoom — no
19
+ * `setGraph`/full re-upload. Convenience alias of `setAttributes`.
20
+ */
21
+ set(attrs: any, opts?: any): Promise<void>;
16
22
  getAttributes(names?: any): any;
17
23
  getAttribute(name: string): any;
18
24
  resetAttributes(names?: any, opts?: any): Promise<void>;
@@ -50,6 +56,8 @@ export declare class Node<ND = any, ED = any> {
50
56
  setVisible(value: boolean): void;
51
57
  toList(): any;
52
58
  getId(): string | number;
59
+ /** The element's user-facing id, exposed directly on event targets. */
60
+ get id(): string | number;
53
61
  slice(): any;
54
62
  get(index: number): this | undefined;
55
63
  toJSON(opts?: any): any;
package/types/index.d.ts CHANGED
@@ -18,4 +18,5 @@ export * as geometry from './geometry/index';
18
18
  export * as parse from './modules/ParseAPI';
19
19
  export { radialFactory, forceFactory, forceLinkFactory, gridFactory, hierarchicalFactory, sequentialFactory, concentricFactory, } from './modules/LayoutsAPI';
20
20
  export { enableWasmBackend, configureBackends, useWasm, type Subsystem, type Backend } from './internals/wasmBackend';
21
+ export { wasmExports } from './internals/wasmBackend';
21
22
  export { Nodus as default } from './Nodus';
@@ -12,6 +12,7 @@ export declare class Captor extends Module {
12
12
  private _prevX;
13
13
  private _prevY;
14
14
  private _buttons;
15
+ private _clickMoveTolerance2;
15
16
  private _onGraphChanged;
16
17
  onMounted(): void;
17
18
  triggerUnhover(): void;
@@ -16,6 +16,20 @@ export declare class GraphAPI {
16
16
  getEdges(filter?: any): any;
17
17
  getNode(id: any): any;
18
18
  getEdge(id: any): any;
19
+ /**
20
+ * Incrementally update a node's visual attributes by id (e.g. `{ color, radius }`),
21
+ * re-rendering only that node and preserving the current pan/zoom — no
22
+ * `setGraph`/full re-upload. Returns the update Promise, or `undefined` if no
23
+ * node has that id.
24
+ */
25
+ updateNode(id: any, attrs: any, opts?: any): any;
26
+ /**
27
+ * Incrementally update an edge's visual attributes by id (e.g. `{ color, width }`),
28
+ * re-rendering only that edge and preserving the current pan/zoom — no
29
+ * `setGraph`/full re-upload. Returns the update Promise, or `undefined` if no
30
+ * edge has that id.
31
+ */
32
+ updateEdge(id: any, attrs: any, opts?: any): any;
19
33
  clearGraph(): void;
20
34
  setGraph(graph: any, opts?: any): any;
21
35
  addGraph(graph: any, opts?: any): any;
@@ -4,6 +4,17 @@
4
4
  */
5
5
  export declare class SelectionAPI<ND = any, ED = any> {
6
6
  modules: any;
7
+ /**
8
+ * Select one or more elements, applying the built-in selection highlight
9
+ * (outer-stroke) incrementally — preserves the current pan/zoom, no `setGraph`.
10
+ * Accepts a node/edge handle, a list, an id, or an array of any of these. A
11
+ * bare id resolves to the node with that id, or the edge with that id if no
12
+ * node matches.
13
+ */
14
+ select(target: any): this;
15
+ /** Inverse of `select` — removes the built-in highlight from the target(s). */
16
+ deselect(target: any): this;
17
+ _applySelection(target: any, value: boolean): void;
7
18
  clearSelection(): any;
8
19
  getSelectedNodes(): any;
9
20
  getNonSelectedNodes(): any;
@@ -101,7 +101,12 @@ export declare class WasmGraphRenderer {
101
101
  private _badgeText;
102
102
  private _badgeFont;
103
103
  private _badgeTextCol;
104
+ private _dataDirty;
105
+ private _uploaded;
104
106
  private constructor();
107
+ /** Is the experimental GPU viewport-culling path active? Opt-in (globalThis.__NODUS_CULL),
108
+ * WebGPU-only (indirect draw), and guarded for bundles without the cached-render export. */
109
+ private _cullActive;
105
110
  /** Coalesce redraw requests into a single rAF-driven frame (no-op if one is already pending or the
106
111
  * environment has no rAF). Keeps event-driven redraws cheap when many events fire in one tick. */
107
112
  private _scheduleFrame;