@html-graph/html-graph 2.1.0 → 2.2.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/dist/html-graph.d.ts +10 -6
- package/dist/html-graph.js +242 -236
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/html-graph.d.ts
CHANGED
|
@@ -360,6 +360,10 @@ export declare class Graph {
|
|
|
360
360
|
getPort(portId: unknown): GraphPort | null;
|
|
361
361
|
getAllPortIds(): readonly unknown[];
|
|
362
362
|
getNodePortIds(nodeId: unknown): readonly unknown[] | null;
|
|
363
|
+
/**
|
|
364
|
+
* @deprecated
|
|
365
|
+
* use graph.getPort()?.nodeId ?? null instead
|
|
366
|
+
*/
|
|
363
367
|
getPortNodeId(portId: unknown): unknown | null;
|
|
364
368
|
getAllEdgeIds(): readonly unknown[];
|
|
365
369
|
getEdge(edgeId: unknown): GraphEdge | null;
|
|
@@ -390,6 +394,7 @@ export declare interface GraphNode {
|
|
|
390
394
|
export declare interface GraphPort {
|
|
391
395
|
readonly element: HTMLElement;
|
|
392
396
|
readonly direction: number;
|
|
397
|
+
readonly nodeId: unknown;
|
|
393
398
|
}
|
|
394
399
|
|
|
395
400
|
/**
|
|
@@ -398,8 +403,6 @@ export declare interface GraphPort {
|
|
|
398
403
|
declare class GraphStore {
|
|
399
404
|
private readonly nodes;
|
|
400
405
|
private readonly ports;
|
|
401
|
-
private readonly nodePorts;
|
|
402
|
-
private readonly portNodeId;
|
|
403
406
|
private readonly edges;
|
|
404
407
|
private readonly incommingEdges;
|
|
405
408
|
private readonly outcommingEdges;
|
|
@@ -412,7 +415,6 @@ declare class GraphStore {
|
|
|
412
415
|
getPort(portId: unknown): PortPayload | undefined;
|
|
413
416
|
getAllPortIds(): readonly unknown[];
|
|
414
417
|
getNodePortIds(nodeId: unknown): readonly unknown[] | undefined;
|
|
415
|
-
getPortNodeId(portId: unknown): unknown | undefined;
|
|
416
418
|
removePort(portId: unknown): void;
|
|
417
419
|
addEdge(request: AddEdgeRequest_2): void;
|
|
418
420
|
updateEdgeFrom(edgeId: unknown, from: unknown): void;
|
|
@@ -502,11 +504,12 @@ export declare interface NodeDragPayload {
|
|
|
502
504
|
}
|
|
503
505
|
|
|
504
506
|
declare interface NodePayload {
|
|
505
|
-
element: HTMLElement;
|
|
507
|
+
readonly element: HTMLElement;
|
|
506
508
|
x: number;
|
|
507
509
|
y: number;
|
|
508
510
|
centerFn: CenterFn;
|
|
509
511
|
priority: number;
|
|
512
|
+
readonly ports: Map<unknown, HTMLElement>;
|
|
510
513
|
}
|
|
511
514
|
|
|
512
515
|
export declare interface PatchMatrixRequest {
|
|
@@ -535,6 +538,7 @@ export declare interface Point {
|
|
|
535
538
|
declare interface PortPayload {
|
|
536
539
|
readonly element: HTMLElement;
|
|
537
540
|
direction: number;
|
|
541
|
+
readonly nodeId: unknown;
|
|
538
542
|
}
|
|
539
543
|
|
|
540
544
|
declare type Priority = ConstantPriority | IncrementalPriority | CustomPriority;
|
|
@@ -731,7 +735,7 @@ declare type VerticalEdgeShapeConfig = {
|
|
|
731
735
|
*/
|
|
732
736
|
export declare class Viewport {
|
|
733
737
|
private readonly transformer;
|
|
734
|
-
constructor(transformer:
|
|
738
|
+
constructor(transformer: ViewportStore);
|
|
735
739
|
getViewportMatrix(): TransformState;
|
|
736
740
|
getContentMatrix(): TransformState;
|
|
737
741
|
}
|
|
@@ -739,7 +743,7 @@ export declare class Viewport {
|
|
|
739
743
|
/**
|
|
740
744
|
* This entity is responsible for storing viewport transformation
|
|
741
745
|
*/
|
|
742
|
-
declare class
|
|
746
|
+
declare class ViewportStore {
|
|
743
747
|
private viewportMatrix;
|
|
744
748
|
private contentMatrix;
|
|
745
749
|
private readonly emitter;
|