@html-graph/html-graph 3.7.0 → 3.8.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.
- package/dist/html-graph.d.ts +22 -2
- package/dist/html-graph.js +1171 -1163
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/html-graph.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export declare class Canvas {
|
|
|
106
106
|
private readonly graphStore;
|
|
107
107
|
private readonly viewportStore;
|
|
108
108
|
private readonly htmlView;
|
|
109
|
+
private readonly defaults;
|
|
109
110
|
/**
|
|
110
111
|
* provides api for accessing model of rendered graph
|
|
111
112
|
*/
|
|
@@ -114,7 +115,6 @@ export declare class Canvas {
|
|
|
114
115
|
* provides api for accessing viewport state
|
|
115
116
|
*/
|
|
116
117
|
readonly viewport: Viewport;
|
|
117
|
-
private readonly defaults;
|
|
118
118
|
private readonly nodeIdGenerator;
|
|
119
119
|
private readonly portIdGenerator;
|
|
120
120
|
private readonly edgeIdGenerator;
|
|
@@ -139,7 +139,7 @@ export declare class Canvas {
|
|
|
139
139
|
/**
|
|
140
140
|
* @deprecated access element directly instead
|
|
141
141
|
*/
|
|
142
|
-
element: HTMLElement, graphStore: GraphStore, viewportStore: ViewportStore, htmlView: HtmlView, defaults:
|
|
142
|
+
element: HTMLElement, graphStore: GraphStore, viewportStore: ViewportStore, htmlView: HtmlView, defaults: Defaults);
|
|
143
143
|
/**
|
|
144
144
|
* adds new node
|
|
145
145
|
*/
|
|
@@ -333,6 +333,20 @@ export declare type CreatePathFn = (sourceDirection: Point, targetDirection: Poi
|
|
|
333
333
|
|
|
334
334
|
declare type CustomPriority = PriorityFn;
|
|
335
335
|
|
|
336
|
+
declare interface Defaults {
|
|
337
|
+
readonly nodes: {
|
|
338
|
+
readonly centerFn: CenterFn;
|
|
339
|
+
readonly priorityFn: PriorityFn;
|
|
340
|
+
};
|
|
341
|
+
readonly ports: {
|
|
342
|
+
readonly direction: number;
|
|
343
|
+
};
|
|
344
|
+
readonly edges: {
|
|
345
|
+
readonly shapeFactory: EdgeShapeFactory;
|
|
346
|
+
readonly priorityFn: PriorityFn;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
336
350
|
declare interface DotsRenderer {
|
|
337
351
|
readonly radius?: number;
|
|
338
352
|
readonly color?: string;
|
|
@@ -433,6 +447,7 @@ export declare class Graph {
|
|
|
433
447
|
readonly onBeforeClear: EventHandler<void>;
|
|
434
448
|
constructor(graphStore: GraphStore);
|
|
435
449
|
getNode(nodeId: unknown): GraphNode | null;
|
|
450
|
+
getElementNodeId(element: HTMLElement): unknown | null;
|
|
436
451
|
getAllNodeIds(): readonly unknown[];
|
|
437
452
|
getPort(portId: unknown): GraphPort | null;
|
|
438
453
|
getAllPortIds(): readonly unknown[];
|
|
@@ -477,6 +492,7 @@ declare class GraphStore {
|
|
|
477
492
|
private readonly nodes;
|
|
478
493
|
private readonly ports;
|
|
479
494
|
private readonly edges;
|
|
495
|
+
private readonly nodesElementsMap;
|
|
480
496
|
private readonly incomingEdges;
|
|
481
497
|
private readonly outcomingEdges;
|
|
482
498
|
private readonly cycleEdges;
|
|
@@ -511,6 +527,7 @@ declare class GraphStore {
|
|
|
511
527
|
addNode(request: AddNodeRequest_2): void;
|
|
512
528
|
getAllNodeIds(): readonly unknown[];
|
|
513
529
|
getNode(nodeId: unknown): NodePayload | undefined;
|
|
530
|
+
getElementNodeId(element: HTMLElement): unknown | undefined;
|
|
514
531
|
updateNode(nodeId: unknown, request: UpdateNodeRequest_2): void;
|
|
515
532
|
removeNode(nodeId: unknown): void;
|
|
516
533
|
addPort(request: AddPortRequest): void;
|
|
@@ -615,6 +632,9 @@ export declare class InteractiveEdgeError extends Error {
|
|
|
615
632
|
}
|
|
616
633
|
|
|
617
634
|
export declare interface InteractiveEdgeParams {
|
|
635
|
+
/**
|
|
636
|
+
* TODO: rename to 'radius'
|
|
637
|
+
*/
|
|
618
638
|
readonly width?: number;
|
|
619
639
|
}
|
|
620
640
|
|