@html-graph/html-graph 0.1.6 → 1.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.
- package/dist/main.d.ts +90 -90
- package/dist/main.js +246 -262
- package/dist/main.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare interface AddEdgeRequest {
|
|
2
|
-
readonly id?: unknown;
|
|
2
|
+
readonly id?: unknown | undefined;
|
|
3
3
|
readonly from: string;
|
|
4
4
|
readonly to: string;
|
|
5
|
-
readonly shape?: EdgeShape;
|
|
6
|
-
readonly priority?: number;
|
|
5
|
+
readonly shape?: EdgeShape | undefined;
|
|
6
|
+
readonly priority?: number | undefined;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
declare interface AddEdgeRequest_2 {
|
|
@@ -17,13 +17,13 @@ declare interface AddEdgeRequest_2 {
|
|
|
17
17
|
export declare type AddNodePorts = Iterable<MarkNodePortRequest>;
|
|
18
18
|
|
|
19
19
|
export declare interface AddNodeRequest {
|
|
20
|
-
readonly id?: unknown;
|
|
20
|
+
readonly id?: unknown | undefined;
|
|
21
21
|
readonly element: HTMLElement;
|
|
22
22
|
readonly x: number;
|
|
23
23
|
readonly y: number;
|
|
24
|
-
readonly ports?: AddNodePorts;
|
|
25
|
-
readonly centerFn?: CenterFn;
|
|
26
|
-
readonly priority?: number;
|
|
24
|
+
readonly ports?: AddNodePorts | undefined;
|
|
25
|
+
readonly centerFn?: CenterFn | undefined;
|
|
26
|
+
readonly priority?: number | undefined;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
declare interface AddNodeRequest_2 {
|
|
@@ -76,18 +76,18 @@ export declare class BezierEdgeShape implements EdgeShape {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
declare interface BezierEdgeShape_2 {
|
|
79
|
-
readonly type?: "bezier";
|
|
80
|
-
readonly color?: string;
|
|
81
|
-
readonly width?: number;
|
|
82
|
-
readonly curvature?: number;
|
|
83
|
-
readonly arrowLength?: number;
|
|
84
|
-
readonly arrowWidth?: number;
|
|
85
|
-
readonly hasSourceArrow?: boolean;
|
|
86
|
-
readonly hasTargetArrow?: boolean;
|
|
87
|
-
readonly cycleRadius?: number;
|
|
88
|
-
readonly smallCycleRadius?: number;
|
|
89
|
-
readonly detourDistance?: number;
|
|
90
|
-
readonly detourDirection?: number;
|
|
79
|
+
readonly type?: "bezier" | undefined;
|
|
80
|
+
readonly color?: string | undefined;
|
|
81
|
+
readonly width?: number | undefined;
|
|
82
|
+
readonly curvature?: number | undefined;
|
|
83
|
+
readonly arrowLength?: number | undefined;
|
|
84
|
+
readonly arrowWidth?: number | undefined;
|
|
85
|
+
readonly hasSourceArrow?: boolean | undefined;
|
|
86
|
+
readonly hasTargetArrow?: boolean | undefined;
|
|
87
|
+
readonly cycleRadius?: number | undefined;
|
|
88
|
+
readonly smallCycleRadius?: number | undefined;
|
|
89
|
+
readonly detourDistance?: number | undefined;
|
|
90
|
+
readonly detourDirection?: number | undefined;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
export declare interface Canvas {
|
|
@@ -244,8 +244,8 @@ export declare interface DragOptions {
|
|
|
244
244
|
readonly moveOnTop?: boolean;
|
|
245
245
|
readonly mouse?: {
|
|
246
246
|
readonly dragCursor?: string | null;
|
|
247
|
-
readonly
|
|
248
|
-
readonly
|
|
247
|
+
readonly mouseDownEventVerifier?: (event: MouseEvent) => boolean;
|
|
248
|
+
readonly mouseUpEventVerifier?: (event: MouseEvent) => boolean;
|
|
249
249
|
};
|
|
250
250
|
readonly events?: {
|
|
251
251
|
readonly onNodeDrag?: (payload: NodeDragPayload) => void;
|
|
@@ -262,8 +262,8 @@ declare interface EdgePayload {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
export declare interface EdgeRenderParams {
|
|
265
|
-
readonly
|
|
266
|
-
readonly
|
|
265
|
+
readonly from: EdgeRenderPort;
|
|
266
|
+
readonly to: EdgeRenderPort;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
export declare interface EdgeRenderPort {
|
|
@@ -375,17 +375,17 @@ export declare class HorizontalEdgeShape implements EdgeShape {
|
|
|
375
375
|
|
|
376
376
|
declare interface HorizontalEdgeShape_2 {
|
|
377
377
|
readonly type: "horizontal";
|
|
378
|
-
readonly color?: string;
|
|
379
|
-
readonly width?: number;
|
|
380
|
-
readonly arrowLength?: number;
|
|
381
|
-
readonly arrowWidth?: number;
|
|
382
|
-
readonly arrowOffset?: number;
|
|
383
|
-
readonly hasSourceArrow?: boolean;
|
|
384
|
-
readonly hasTargetArrow?: boolean;
|
|
385
|
-
readonly cycleSquareSide?: number;
|
|
386
|
-
readonly roundness?: number;
|
|
387
|
-
readonly detourDistance?: number;
|
|
388
|
-
readonly detourDirection?: number;
|
|
378
|
+
readonly color?: string | undefined;
|
|
379
|
+
readonly width?: number | undefined;
|
|
380
|
+
readonly arrowLength?: number | undefined;
|
|
381
|
+
readonly arrowWidth?: number | undefined;
|
|
382
|
+
readonly arrowOffset?: number | undefined;
|
|
383
|
+
readonly hasSourceArrow?: boolean | undefined;
|
|
384
|
+
readonly hasTargetArrow?: boolean | undefined;
|
|
385
|
+
readonly cycleSquareSide?: number | undefined;
|
|
386
|
+
readonly roundness?: number | undefined;
|
|
387
|
+
readonly detourDistance?: number | undefined;
|
|
388
|
+
readonly detourDirection?: number | undefined;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
export declare class HtmlGraphBuilder {
|
|
@@ -409,16 +409,16 @@ export declare class HtmlGraphError extends Error {
|
|
|
409
409
|
declare type IncrementalPriority = "incremental";
|
|
410
410
|
|
|
411
411
|
export declare type MarkNodePortRequest = {
|
|
412
|
-
readonly id?: unknown;
|
|
412
|
+
readonly id?: unknown | undefined;
|
|
413
413
|
readonly element: HTMLElement;
|
|
414
|
-
readonly direction?: number;
|
|
414
|
+
readonly direction?: number | undefined;
|
|
415
415
|
};
|
|
416
416
|
|
|
417
417
|
export declare interface MarkPortRequest {
|
|
418
|
-
readonly id?: unknown;
|
|
418
|
+
readonly id?: unknown | undefined;
|
|
419
419
|
readonly element: HTMLElement;
|
|
420
420
|
readonly nodeId: unknown;
|
|
421
|
-
readonly direction?: number;
|
|
421
|
+
readonly direction?: number | undefined;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
export declare interface NodeDragPayload {
|
|
@@ -437,15 +437,15 @@ declare interface NodePayload {
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
export declare interface PatchMatrixRequest {
|
|
440
|
-
readonly scale?: number;
|
|
441
|
-
readonly
|
|
442
|
-
readonly
|
|
440
|
+
readonly scale?: number | undefined;
|
|
441
|
+
readonly x?: number | undefined;
|
|
442
|
+
readonly y?: number | undefined;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
declare interface PatchTransformRequest {
|
|
446
446
|
readonly scale?: number;
|
|
447
|
-
readonly
|
|
448
|
-
readonly
|
|
447
|
+
readonly x?: number;
|
|
448
|
+
readonly y?: number;
|
|
449
449
|
}
|
|
450
450
|
|
|
451
451
|
export declare interface Point {
|
|
@@ -469,18 +469,18 @@ export declare class PublicGraphStore {
|
|
|
469
469
|
getAllNodeIds(): readonly unknown[];
|
|
470
470
|
getPort(portId: unknown): GraphPort | null;
|
|
471
471
|
getAllPortIds(): readonly unknown[];
|
|
472
|
-
getNodePortIds(nodeId: unknown): readonly unknown[] |
|
|
472
|
+
getNodePortIds(nodeId: unknown): readonly unknown[] | null;
|
|
473
473
|
getPortNodeId(portId: unknown): unknown | null;
|
|
474
474
|
getAllEdgeIds(): readonly unknown[];
|
|
475
475
|
getEdge(edgeId: unknown): GraphEdge | null;
|
|
476
|
-
getPortIncomingEdgeIds(portId: unknown): readonly unknown[];
|
|
477
|
-
getPortOutcomingEdgeIds(portId: unknown): readonly unknown[];
|
|
478
|
-
getPortCycleEdgeIds(portId: unknown): readonly unknown[];
|
|
479
|
-
getPortAdjacentEdgeIds(portId: unknown): readonly unknown[];
|
|
480
|
-
getNodeIncomingEdgeIds(nodeId: unknown): readonly unknown[];
|
|
481
|
-
getNodeOutcomingEdgeIds(nodeId: unknown): readonly unknown[];
|
|
482
|
-
getNodeCycleEdgeIds(nodeId: unknown): readonly unknown[];
|
|
483
|
-
getNodeAdjacentEdgeIds(nodeId: unknown): readonly unknown[];
|
|
476
|
+
getPortIncomingEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
477
|
+
getPortOutcomingEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
478
|
+
getPortCycleEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
479
|
+
getPortAdjacentEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
480
|
+
getNodeIncomingEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
481
|
+
getNodeOutcomingEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
482
|
+
getNodeCycleEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
483
|
+
getNodeAdjacentEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
export declare class PublicViewportTransformer {
|
|
@@ -565,28 +565,28 @@ export declare class StraightEdgeShape implements EdgeShape {
|
|
|
565
565
|
|
|
566
566
|
declare interface StraightEdgeShape_2 {
|
|
567
567
|
readonly type: "straight";
|
|
568
|
-
readonly color?: string;
|
|
569
|
-
readonly width?: number;
|
|
570
|
-
readonly arrowLength?: number;
|
|
571
|
-
readonly arrowWidth?: number;
|
|
572
|
-
readonly arrowOffset?: number;
|
|
573
|
-
readonly hasSourceArrow?: boolean;
|
|
574
|
-
readonly hasTargetArrow?: boolean;
|
|
575
|
-
readonly cycleSquareSide?: number;
|
|
576
|
-
readonly roundness?: number;
|
|
577
|
-
readonly detourDistance?: number;
|
|
578
|
-
readonly detourDirection?: number;
|
|
568
|
+
readonly color?: string | undefined;
|
|
569
|
+
readonly width?: number | undefined;
|
|
570
|
+
readonly arrowLength?: number | undefined;
|
|
571
|
+
readonly arrowWidth?: number | undefined;
|
|
572
|
+
readonly arrowOffset?: number | undefined;
|
|
573
|
+
readonly hasSourceArrow?: boolean | undefined;
|
|
574
|
+
readonly hasTargetArrow?: boolean | undefined;
|
|
575
|
+
readonly cycleSquareSide?: number | undefined;
|
|
576
|
+
readonly roundness?: number | undefined;
|
|
577
|
+
readonly detourDistance?: number | undefined;
|
|
578
|
+
readonly detourDirection?: number | undefined;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
export declare interface TransformOptions {
|
|
582
582
|
readonly scale?: {
|
|
583
583
|
readonly mouseWheelSensitivity?: number;
|
|
584
|
-
readonly
|
|
584
|
+
readonly mouseWheelEventVerifier?: (event: WheelEvent) => boolean;
|
|
585
585
|
};
|
|
586
586
|
readonly shift?: {
|
|
587
587
|
readonly cursor?: string | null;
|
|
588
|
-
readonly
|
|
589
|
-
readonly
|
|
588
|
+
readonly mouseDownEventVerifier?: (event: MouseEvent) => boolean;
|
|
589
|
+
readonly mouseUpEventVerifier?: (event: MouseEvent) => boolean;
|
|
590
590
|
};
|
|
591
591
|
readonly transformPreprocessor?: TransformPreprocessorOption | TransformPreprocessorOption[];
|
|
592
592
|
readonly events?: {
|
|
@@ -599,8 +599,8 @@ export declare interface TransformOptions {
|
|
|
599
599
|
|
|
600
600
|
export declare interface TransformPayload {
|
|
601
601
|
readonly scale: number;
|
|
602
|
-
readonly
|
|
603
|
-
readonly
|
|
602
|
+
readonly x: number;
|
|
603
|
+
readonly y: number;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
export declare type TransformPreprocessorFn = (params: TransformPreprocessorParams) => TransformPayload;
|
|
@@ -626,26 +626,26 @@ export declare interface TransformPreprocessorParams {
|
|
|
626
626
|
|
|
627
627
|
declare interface TransformState {
|
|
628
628
|
readonly scale: number;
|
|
629
|
-
readonly
|
|
630
|
-
readonly
|
|
629
|
+
readonly x: number;
|
|
630
|
+
readonly y: number;
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
export declare interface UpdateEdgeRequest {
|
|
634
|
-
readonly from?: unknown;
|
|
635
|
-
readonly to?: unknown;
|
|
636
|
-
readonly shape?: EdgeShape;
|
|
637
|
-
readonly priority?: number;
|
|
634
|
+
readonly from?: unknown | undefined;
|
|
635
|
+
readonly to?: unknown | undefined;
|
|
636
|
+
readonly shape?: EdgeShape | undefined;
|
|
637
|
+
readonly priority?: number | undefined;
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
export declare interface UpdateNodeRequest {
|
|
641
|
-
readonly x?: number;
|
|
642
|
-
readonly y?: number;
|
|
643
|
-
readonly priority?: number;
|
|
644
|
-
readonly centerFn?: CenterFn;
|
|
641
|
+
readonly x?: number | undefined;
|
|
642
|
+
readonly y?: number | undefined;
|
|
643
|
+
readonly priority?: number | undefined;
|
|
644
|
+
readonly centerFn?: CenterFn | undefined;
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
export declare interface UpdatePortRequest {
|
|
648
|
-
readonly direction?: number;
|
|
648
|
+
readonly direction?: number | undefined;
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
export declare class UserDraggableNodesCanvas implements Canvas {
|
|
@@ -764,17 +764,17 @@ export declare class VerticalEdgeShape implements EdgeShape {
|
|
|
764
764
|
|
|
765
765
|
declare interface VerticalEdgeShape_2 {
|
|
766
766
|
readonly type: "vertical";
|
|
767
|
-
readonly color?: string;
|
|
768
|
-
readonly width?: number;
|
|
769
|
-
readonly arrowLength?: number;
|
|
770
|
-
readonly arrowWidth?: number;
|
|
771
|
-
readonly arrowOffset?: number;
|
|
772
|
-
readonly hasSourceArrow?: boolean;
|
|
773
|
-
readonly hasTargetArrow?: boolean;
|
|
774
|
-
readonly cycleSquareSide?: number;
|
|
775
|
-
readonly roundness?: number;
|
|
776
|
-
readonly detourDistance?: number;
|
|
777
|
-
readonly detourDirection?: number;
|
|
767
|
+
readonly color?: string | undefined;
|
|
768
|
+
readonly width?: number | undefined;
|
|
769
|
+
readonly arrowLength?: number | undefined;
|
|
770
|
+
readonly arrowWidth?: number | undefined;
|
|
771
|
+
readonly arrowOffset?: number | undefined;
|
|
772
|
+
readonly hasSourceArrow?: boolean | undefined;
|
|
773
|
+
readonly hasTargetArrow?: boolean | undefined;
|
|
774
|
+
readonly cycleSquareSide?: number | undefined;
|
|
775
|
+
readonly roundness?: number | undefined;
|
|
776
|
+
readonly detourDistance?: number | undefined;
|
|
777
|
+
readonly detourDirection?: number | undefined;
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
declare class ViewportTransformer {
|