@antv/g6 5.0.0-beta.31 → 5.0.0-beta.32
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/g6.min.js +2 -2
- package/dist/lib/behaviors/collapse-expand.d.ts +4 -5
- package/dist/lib/behaviors/create-edge.d.ts +55 -0
- package/dist/lib/behaviors/drag-canvas.d.ts +6 -6
- package/dist/lib/behaviors/drag-element.d.ts +5 -3
- package/dist/lib/behaviors/focus-element.d.ts +4 -3
- package/dist/lib/behaviors/hover-element.d.ts +4 -5
- package/dist/lib/behaviors/index.d.ts +2 -0
- package/dist/lib/behaviors/zoom-canvas.d.ts +7 -6
- package/dist/lib/constants/events/graph.d.ts +5 -13
- package/dist/lib/constants/index.d.ts +1 -0
- package/dist/lib/constants/registry.d.ts +20 -0
- package/dist/lib/elements/combos/base-combo.d.ts +21 -0
- package/dist/lib/elements/edges/base-edge.d.ts +21 -0
- package/dist/lib/elements/nodes/base-node.d.ts +22 -1
- package/dist/lib/exports.d.ts +16 -14
- package/dist/lib/plugins/camera-setting.d.ts +95 -0
- package/dist/lib/plugins/contextmenu.d.ts +8 -5
- package/dist/lib/plugins/index.d.ts +4 -0
- package/dist/lib/plugins/legend.d.ts +49 -0
- package/dist/lib/plugins/tooltip.d.ts +12 -10
- package/dist/lib/registry/extension/index.d.ts +2 -2
- package/dist/lib/registry/index.d.ts +6 -4
- package/dist/lib/registry/types.d.ts +0 -6
- package/dist/lib/runtime/canvas.d.ts +2 -1
- package/dist/lib/runtime/data.d.ts +1 -1
- package/dist/lib/runtime/element.d.ts +4 -5
- package/dist/lib/runtime/graph.d.ts +31 -4
- package/dist/lib/runtime/plugin.d.ts +1 -0
- package/dist/lib/types/event.d.ts +42 -7
- package/dist/lib/types/index.d.ts +0 -1
- package/dist/lib/utils/bbox.d.ts +1 -1
- package/dist/lib/utils/element.d.ts +19 -11
- package/dist/lib/utils/event/events.d.ts +8 -13
- package/dist/lib/utils/shortcut.d.ts +10 -0
- package/esm/behaviors/collapse-expand.d.ts +4 -5
- package/esm/behaviors/collapse-expand.js +8 -4
- package/esm/behaviors/collapse-expand.js.map +1 -1
- package/esm/behaviors/create-edge.d.ts +55 -0
- package/esm/behaviors/create-edge.js +141 -0
- package/esm/behaviors/create-edge.js.map +1 -0
- package/esm/behaviors/drag-canvas.d.ts +6 -6
- package/esm/behaviors/drag-canvas.js +15 -7
- package/esm/behaviors/drag-canvas.js.map +1 -1
- package/esm/behaviors/drag-element.d.ts +5 -3
- package/esm/behaviors/drag-element.js.map +1 -1
- package/esm/behaviors/focus-element.d.ts +4 -3
- package/esm/behaviors/focus-element.js.map +1 -1
- package/esm/behaviors/hover-element.d.ts +4 -5
- package/esm/behaviors/hover-element.js.map +1 -1
- package/esm/behaviors/index.d.ts +2 -0
- package/esm/behaviors/index.js +1 -0
- package/esm/behaviors/index.js.map +1 -1
- package/esm/behaviors/zoom-canvas.d.ts +7 -6
- package/esm/behaviors/zoom-canvas.js +6 -2
- package/esm/behaviors/zoom-canvas.js.map +1 -1
- package/esm/constants/events/graph.d.ts +5 -13
- package/esm/constants/events/graph.js +4 -12
- package/esm/constants/events/graph.js.map +1 -1
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +1 -0
- package/esm/constants/index.js.map +1 -1
- package/esm/constants/registry.d.ts +20 -0
- package/esm/constants/registry.js +22 -0
- package/esm/constants/registry.js.map +1 -0
- package/esm/elements/combos/base-combo.d.ts +21 -0
- package/esm/elements/combos/base-combo.js +21 -0
- package/esm/elements/combos/base-combo.js.map +1 -1
- package/esm/elements/edges/base-edge.d.ts +21 -0
- package/esm/elements/edges/base-edge.js +21 -0
- package/esm/elements/edges/base-edge.js.map +1 -1
- package/esm/elements/nodes/base-node.d.ts +22 -1
- package/esm/elements/nodes/base-node.js +21 -0
- package/esm/elements/nodes/base-node.js.map +1 -1
- package/esm/exports.d.ts +16 -14
- package/esm/exports.js +7 -6
- package/esm/exports.js.map +1 -1
- package/esm/plugins/camera-setting.d.ts +95 -0
- package/esm/plugins/camera-setting.js +65 -0
- package/esm/plugins/camera-setting.js.map +1 -0
- package/esm/plugins/contextmenu.d.ts +8 -5
- package/esm/plugins/contextmenu.js.map +1 -1
- package/esm/plugins/index.d.ts +4 -0
- package/esm/plugins/index.js +2 -0
- package/esm/plugins/index.js.map +1 -1
- package/esm/plugins/legend.d.ts +49 -0
- package/esm/plugins/legend.js +267 -0
- package/esm/plugins/legend.js.map +1 -0
- package/esm/plugins/tooltip.d.ts +12 -10
- package/esm/plugins/tooltip.js +0 -1
- package/esm/plugins/tooltip.js.map +1 -1
- package/esm/preset.js +2 -5
- package/esm/preset.js.map +1 -1
- package/esm/registry/build-in.js +4 -2
- package/esm/registry/build-in.js.map +1 -1
- package/esm/registry/extension/index.d.ts +2 -2
- package/esm/registry/extension/index.js.map +1 -1
- package/esm/registry/index.d.ts +6 -4
- package/esm/registry/index.js.map +1 -1
- package/esm/registry/types.d.ts +0 -6
- package/esm/runtime/behavior.js +3 -2
- package/esm/runtime/behavior.js.map +1 -1
- package/esm/runtime/canvas.d.ts +2 -1
- package/esm/runtime/canvas.js +68 -30
- package/esm/runtime/canvas.js.map +1 -1
- package/esm/runtime/data.d.ts +1 -1
- package/esm/runtime/element.d.ts +4 -5
- package/esm/runtime/element.js +32 -13
- package/esm/runtime/element.js.map +1 -1
- package/esm/runtime/graph.d.ts +31 -4
- package/esm/runtime/graph.js +48 -9
- package/esm/runtime/graph.js.map +1 -1
- package/esm/runtime/plugin.d.ts +1 -0
- package/esm/runtime/plugin.js +3 -0
- package/esm/runtime/plugin.js.map +1 -1
- package/esm/types/event.d.ts +42 -7
- package/esm/types/index.d.ts +0 -1
- package/esm/utils/bbox.d.ts +1 -1
- package/esm/utils/element.d.ts +19 -11
- package/esm/utils/element.js +19 -9
- package/esm/utils/element.js.map +1 -1
- package/esm/utils/event/events.d.ts +8 -13
- package/esm/utils/event/events.js +3 -8
- package/esm/utils/event/events.js.map +1 -1
- package/esm/utils/shortcut.d.ts +10 -0
- package/esm/utils/shortcut.js +24 -3
- package/esm/utils/shortcut.js.map +1 -1
- package/lib/behaviors/collapse-expand.d.ts +4 -5
- package/lib/behaviors/collapse-expand.js +8 -4
- package/lib/behaviors/collapse-expand.js.map +1 -1
- package/lib/behaviors/create-edge.d.ts +55 -0
- package/lib/behaviors/create-edge.js +145 -0
- package/lib/behaviors/create-edge.js.map +1 -0
- package/lib/behaviors/drag-canvas.d.ts +6 -6
- package/lib/behaviors/drag-canvas.js +15 -7
- package/lib/behaviors/drag-canvas.js.map +1 -1
- package/lib/behaviors/drag-element.d.ts +5 -3
- package/lib/behaviors/drag-element.js.map +1 -1
- package/lib/behaviors/focus-element.d.ts +4 -3
- package/lib/behaviors/focus-element.js.map +1 -1
- package/lib/behaviors/hover-element.d.ts +4 -5
- package/lib/behaviors/hover-element.js.map +1 -1
- package/lib/behaviors/index.d.ts +2 -0
- package/lib/behaviors/index.js +3 -1
- package/lib/behaviors/index.js.map +1 -1
- package/lib/behaviors/zoom-canvas.d.ts +7 -6
- package/lib/behaviors/zoom-canvas.js +6 -2
- package/lib/behaviors/zoom-canvas.js.map +1 -1
- package/lib/constants/events/graph.d.ts +5 -13
- package/lib/constants/events/graph.js +4 -12
- package/lib/constants/events/graph.js.map +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +1 -0
- package/lib/constants/index.js.map +1 -1
- package/lib/constants/registry.d.ts +20 -0
- package/lib/constants/registry.js +25 -0
- package/lib/constants/registry.js.map +1 -0
- package/lib/elements/combos/base-combo.d.ts +21 -0
- package/lib/elements/combos/base-combo.js +21 -0
- package/lib/elements/combos/base-combo.js.map +1 -1
- package/lib/elements/edges/base-edge.d.ts +21 -0
- package/lib/elements/edges/base-edge.js +21 -0
- package/lib/elements/edges/base-edge.js.map +1 -1
- package/lib/elements/nodes/base-node.d.ts +22 -1
- package/lib/elements/nodes/base-node.js +21 -0
- package/lib/elements/nodes/base-node.js.map +1 -1
- package/lib/exports.d.ts +16 -14
- package/lib/exports.js +23 -1
- package/lib/exports.js.map +1 -1
- package/lib/plugins/camera-setting.d.ts +95 -0
- package/lib/plugins/camera-setting.js +69 -0
- package/lib/plugins/camera-setting.js.map +1 -0
- package/lib/plugins/contextmenu.d.ts +8 -5
- package/lib/plugins/contextmenu.js.map +1 -1
- package/lib/plugins/index.d.ts +4 -0
- package/lib/plugins/index.js +5 -1
- package/lib/plugins/index.js.map +1 -1
- package/lib/plugins/legend.d.ts +49 -0
- package/lib/plugins/legend.js +271 -0
- package/lib/plugins/legend.js.map +1 -0
- package/lib/plugins/tooltip.d.ts +12 -10
- package/lib/plugins/tooltip.js +0 -1
- package/lib/plugins/tooltip.js.map +1 -1
- package/lib/preset.js +2 -5
- package/lib/preset.js.map +1 -1
- package/lib/registry/build-in.js +2 -0
- package/lib/registry/build-in.js.map +1 -1
- package/lib/registry/extension/index.d.ts +2 -2
- package/lib/registry/extension/index.js.map +1 -1
- package/lib/registry/index.d.ts +6 -4
- package/lib/registry/index.js.map +1 -1
- package/lib/registry/types.d.ts +0 -6
- package/lib/runtime/behavior.js +3 -2
- package/lib/runtime/behavior.js.map +1 -1
- package/lib/runtime/canvas.d.ts +2 -1
- package/lib/runtime/canvas.js +68 -30
- package/lib/runtime/canvas.js.map +1 -1
- package/lib/runtime/data.d.ts +1 -1
- package/lib/runtime/element.d.ts +4 -5
- package/lib/runtime/element.js +31 -12
- package/lib/runtime/element.js.map +1 -1
- package/lib/runtime/graph.d.ts +31 -4
- package/lib/runtime/graph.js +47 -8
- package/lib/runtime/graph.js.map +1 -1
- package/lib/runtime/plugin.d.ts +1 -0
- package/lib/runtime/plugin.js +3 -0
- package/lib/runtime/plugin.js.map +1 -1
- package/lib/types/event.d.ts +42 -7
- package/lib/types/index.d.ts +0 -1
- package/lib/utils/bbox.d.ts +1 -1
- package/lib/utils/element.d.ts +19 -11
- package/lib/utils/element.js +21 -10
- package/lib/utils/element.js.map +1 -1
- package/lib/utils/event/events.d.ts +8 -13
- package/lib/utils/event/events.js +4 -10
- package/lib/utils/event/events.js.map +1 -1
- package/lib/utils/shortcut.d.ts +10 -0
- package/lib/utils/shortcut.js +24 -3
- package/lib/utils/shortcut.js.map +1 -1
- package/package.json +2 -2
- package/src/behaviors/collapse-expand.ts +13 -11
- package/src/behaviors/create-edge.ts +206 -0
- package/src/behaviors/drag-canvas.ts +22 -14
- package/src/behaviors/drag-element.ts +8 -11
- package/src/behaviors/focus-element.ts +7 -6
- package/src/behaviors/hover-element.ts +14 -10
- package/src/behaviors/index.ts +2 -0
- package/src/behaviors/zoom-canvas.ts +14 -9
- package/src/constants/events/graph.ts +4 -12
- package/src/constants/index.ts +1 -0
- package/src/constants/registry.ts +20 -0
- package/src/elements/combos/base-combo.ts +24 -0
- package/src/elements/edges/base-edge.ts +25 -1
- package/src/elements/nodes/base-node.ts +25 -1
- package/src/exports.ts +55 -12
- package/src/plugins/camera-setting.ts +153 -0
- package/src/plugins/contextmenu.ts +10 -7
- package/src/plugins/index.ts +4 -0
- package/src/plugins/legend.ts +321 -0
- package/src/plugins/tooltip.ts +16 -15
- package/src/preset.ts +2 -6
- package/src/registry/build-in.ts +12 -2
- package/src/registry/extension/index.ts +4 -4
- package/src/registry/index.ts +10 -4
- package/src/registry/types.ts +0 -7
- package/src/runtime/behavior.ts +3 -2
- package/src/runtime/canvas.ts +80 -40
- package/src/runtime/element.ts +52 -20
- package/src/runtime/graph.ts +56 -12
- package/src/runtime/plugin.ts +4 -0
- package/src/types/event.ts +62 -7
- package/src/types/index.ts +0 -1
- package/src/utils/bbox.ts +1 -1
- package/src/utils/element.ts +22 -11
- package/src/utils/event/events.ts +15 -17
- package/src/utils/shortcut.ts +28 -3
- package/dist/lib/types/behavior.d.ts +0 -5
- package/esm/types/behavior.d.ts +0 -5
- package/esm/types/behavior.js +0 -2
- package/esm/types/behavior.js.map +0 -1
- package/lib/types/behavior.d.ts +0 -5
- package/lib/types/behavior.js +0 -3
- package/lib/types/behavior.js.map +0 -1
- package/src/types/behavior.ts +0 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Cursor
|
|
1
|
+
import type { Cursor } from '@antv/g';
|
|
2
2
|
import { isFunction, isObject } from '@antv/util';
|
|
3
3
|
import { CanvasEvent } from '../constants';
|
|
4
|
-
import { RuntimeContext } from '../runtime/types';
|
|
5
|
-
import type {
|
|
4
|
+
import type { RuntimeContext } from '../runtime/types';
|
|
5
|
+
import type { IKeyboardEvent, IPointerEvent, Vector2, ViewportAnimationEffectTiming } from '../types';
|
|
6
6
|
import type { ShortcutKey } from '../utils/shortcut';
|
|
7
7
|
import { Shortcut } from '../utils/shortcut';
|
|
8
8
|
import { multiply } from '../utils/vector';
|
|
@@ -21,7 +21,7 @@ export interface DragCanvasOptions extends BaseBehaviorOptions {
|
|
|
21
21
|
*
|
|
22
22
|
* <en/> Whether to enable the function of dragging the canvas
|
|
23
23
|
*/
|
|
24
|
-
enable?: boolean | ((event:
|
|
24
|
+
enable?: boolean | ((event: IPointerEvent | IKeyboardEvent) => boolean);
|
|
25
25
|
/**
|
|
26
26
|
* <zh/> 触发拖拽的方式,默认使用指针按下拖拽
|
|
27
27
|
*
|
|
@@ -39,7 +39,7 @@ export interface DragCanvasOptions extends BaseBehaviorOptions {
|
|
|
39
39
|
*
|
|
40
40
|
* <en/> Callback when dragging is completed
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
onFinish?: () => void;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
type CombinationKey = {
|
|
@@ -78,29 +78,36 @@ export class DragCanvas extends BaseBehavior<DragCanvasOptions> {
|
|
|
78
78
|
graph.off(CanvasEvent.DRAG, this.onDrag);
|
|
79
79
|
const { up = [], down = [], left = [], right = [] } = trigger;
|
|
80
80
|
|
|
81
|
-
this.shortcut.bind(up, (event) => this.
|
|
82
|
-
this.shortcut.bind(down, (event) => this.
|
|
83
|
-
this.shortcut.bind(left, (event) => this.
|
|
84
|
-
this.shortcut.bind(right, (event) => this.
|
|
81
|
+
this.shortcut.bind(up, (event) => this.onTranslate([0, 1], event));
|
|
82
|
+
this.shortcut.bind(down, (event) => this.onTranslate([0, -1], event));
|
|
83
|
+
this.shortcut.bind(left, (event) => this.onTranslate([1, 0], event));
|
|
84
|
+
this.shortcut.bind(right, (event) => this.onTranslate([-1, 0], event));
|
|
85
85
|
} else {
|
|
86
86
|
graph.on(CanvasEvent.DRAG, this.onDrag);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
private onDrag = (event:
|
|
90
|
+
private onDrag = (event: IPointerEvent) => {
|
|
91
|
+
if (!this.validate(event)) return;
|
|
91
92
|
if (event.targetType === 'canvas') {
|
|
92
|
-
this.
|
|
93
|
+
this.translate([event.movement.x, event.movement.y], false);
|
|
94
|
+
this.options.onFinish?.();
|
|
93
95
|
}
|
|
94
96
|
};
|
|
95
97
|
|
|
96
|
-
private
|
|
98
|
+
private async onTranslate(value: Vector2, event: IPointerEvent | IKeyboardEvent) {
|
|
97
99
|
if (!this.validate(event)) return;
|
|
98
100
|
const { sensitivity } = this.options;
|
|
99
101
|
const delta = sensitivity * -1;
|
|
100
|
-
this.
|
|
102
|
+
await this.translate(multiply(value, delta) as Vector2, this.options.animation);
|
|
103
|
+
this.options.onFinish?.();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
protected async translate(offset: Vector2, animation?: ViewportAnimationEffectTiming) {
|
|
107
|
+
await this.context.graph.translateBy(offset, animation);
|
|
101
108
|
}
|
|
102
109
|
|
|
103
|
-
private validate(event:
|
|
110
|
+
private validate(event: IPointerEvent | IKeyboardEvent) {
|
|
104
111
|
if (this.destroyed) return false;
|
|
105
112
|
const { enable } = this.options;
|
|
106
113
|
if (isFunction(enable)) return enable(event);
|
|
@@ -108,6 +115,7 @@ export class DragCanvas extends BaseBehavior<DragCanvasOptions> {
|
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
public destroy(): void {
|
|
118
|
+
this.shortcut.destroy();
|
|
111
119
|
this.context.canvas.setCursor(this.defaultCursor);
|
|
112
120
|
super.destroy();
|
|
113
121
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { BaseStyleProps
|
|
1
|
+
import type { BaseStyleProps } from '@antv/g';
|
|
2
2
|
import { Rect } from '@antv/g';
|
|
3
3
|
import { ID } from '@antv/graphlib';
|
|
4
4
|
import { isFunction } from '@antv/util';
|
|
5
5
|
import { COMBO_KEY, CommonEvent } from '../constants';
|
|
6
6
|
import { RuntimeContext } from '../runtime/types';
|
|
7
|
-
import type {
|
|
7
|
+
import type { EdgeDirection, Element, IDragEvent, Point, PrefixObject } from '../types';
|
|
8
8
|
import { getBBoxSize, getCombinedBBox } from '../utils/bbox';
|
|
9
9
|
import { idOf } from '../utils/id';
|
|
10
10
|
import { subStyleProps } from '../utils/prefix';
|
|
@@ -24,7 +24,7 @@ export interface DragElementOptions extends BaseBehaviorOptions, PrefixObject<Ba
|
|
|
24
24
|
*
|
|
25
25
|
* <en/> Whether to enable the function of dragging the node
|
|
26
26
|
*/
|
|
27
|
-
enable?: boolean | ((event:
|
|
27
|
+
enable?: boolean | ((event: IElementDragEvent) => boolean);
|
|
28
28
|
/**
|
|
29
29
|
* <zh/> 拖拽操作效果
|
|
30
30
|
* - link: 将拖拽元素置入为目标元素的子元素
|
|
@@ -150,7 +150,7 @@ export class DragElement extends BaseBehavior<DragElementOptions> {
|
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
private onDragStart = (event:
|
|
153
|
+
private onDragStart = (event: IElementDragEvent) => {
|
|
154
154
|
this.enable = this.validate(event);
|
|
155
155
|
if (!this.enable) return;
|
|
156
156
|
|
|
@@ -160,7 +160,7 @@ export class DragElement extends BaseBehavior<DragElementOptions> {
|
|
|
160
160
|
if (this.options.shadow) this.createShadow(this.target);
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
private onDrag = (event:
|
|
163
|
+
private onDrag = (event: IElementDragEvent) => {
|
|
164
164
|
if (!this.enable) return;
|
|
165
165
|
const zoom = this.context.graph.getZoom();
|
|
166
166
|
const { dx, dy } = event;
|
|
@@ -184,7 +184,7 @@ export class DragElement extends BaseBehavior<DragElementOptions> {
|
|
|
184
184
|
this.target = [];
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
private onDrop = async (event:
|
|
187
|
+
private onDrop = async (event: IElementDragEvent) => {
|
|
188
188
|
if (this.options.dropEffect !== 'link') return;
|
|
189
189
|
const { model, element } = this.context;
|
|
190
190
|
const modifiedParentId = event.target.id;
|
|
@@ -200,7 +200,7 @@ export class DragElement extends BaseBehavior<DragElementOptions> {
|
|
|
200
200
|
await element?.draw({ animation: true });
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
-
private validate(event:
|
|
203
|
+
private validate(event: IElementDragEvent) {
|
|
204
204
|
if (this.destroyed) return false;
|
|
205
205
|
const { enable } = this.options;
|
|
206
206
|
if (isFunction(enable)) return enable(event);
|
|
@@ -295,7 +295,4 @@ export class DragElement extends BaseBehavior<DragElementOptions> {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
|
|
299
|
-
dx: number;
|
|
300
|
-
dy: number;
|
|
301
|
-
}
|
|
298
|
+
type IElementDragEvent = IDragEvent<Element>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { FederatedMouseEvent } from '@antv/g';
|
|
2
1
|
import type { ID } from '@antv/graphlib';
|
|
3
2
|
import { isFunction } from '@antv/util';
|
|
4
3
|
import { CommonEvent } from '../constants';
|
|
5
4
|
import type { RuntimeContext } from '../runtime/types';
|
|
6
|
-
import type {
|
|
5
|
+
import type { Element, IPointerEvent, ViewportAnimationEffectTiming } from '../types';
|
|
7
6
|
import type { BaseBehaviorOptions } from './base-behavior';
|
|
8
7
|
import { BaseBehavior } from './base-behavior';
|
|
9
8
|
|
|
@@ -21,7 +20,7 @@ export interface FocusElementOptions extends BaseBehaviorOptions {
|
|
|
21
20
|
*
|
|
22
21
|
* <en/> Whether to enable the function of dragging the node
|
|
23
22
|
*/
|
|
24
|
-
enable?: boolean | ((event:
|
|
23
|
+
enable?: boolean | ((event: IElementEvent) => boolean);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
export class FocusElement extends BaseBehavior<FocusElementOptions> {
|
|
@@ -58,16 +57,16 @@ export class FocusElement extends BaseBehavior<FocusElementOptions> {
|
|
|
58
57
|
);
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
private clickFocusElement = async (event:
|
|
60
|
+
private clickFocusElement = async (event: IElementEvent) => {
|
|
62
61
|
if (!this.validate(event)) return;
|
|
63
62
|
const { animation } = this.options;
|
|
64
63
|
const { graph } = this.context;
|
|
65
|
-
const id = this.getSelectedNodeIDs([event.target.id]);
|
|
64
|
+
const id = this.getSelectedNodeIDs([(event.target as Element).id]);
|
|
66
65
|
|
|
67
66
|
await graph.focusElement(id, animation);
|
|
68
67
|
};
|
|
69
68
|
|
|
70
|
-
private validate(event:
|
|
69
|
+
private validate(event: IElementEvent) {
|
|
71
70
|
if (this.destroyed) return false;
|
|
72
71
|
const { enable } = this.options;
|
|
73
72
|
if (isFunction(enable)) return enable(event);
|
|
@@ -87,3 +86,5 @@ export class FocusElement extends BaseBehavior<FocusElementOptions> {
|
|
|
87
86
|
super.destroy();
|
|
88
87
|
}
|
|
89
88
|
}
|
|
89
|
+
|
|
90
|
+
type IElementEvent = IPointerEvent<Element>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { FederatedMouseEvent } from '@antv/g';
|
|
2
1
|
import type { ID } from '@antv/graphlib';
|
|
3
2
|
import { isFunction } from '@antv/util';
|
|
4
3
|
import { CommonEvent } from '../constants';
|
|
5
4
|
import { ELEMENT_TYPES } from '../constants/element';
|
|
6
5
|
import type { RuntimeContext } from '../runtime/types';
|
|
7
|
-
import type {
|
|
6
|
+
import type { Element, ElementType, IPointerEvent, State } from '../types';
|
|
8
7
|
import { getIds } from '../utils/id';
|
|
9
8
|
import { getElementNthDegreeIds } from '../utils/relation';
|
|
10
9
|
import type { BaseBehaviorOptions } from './base-behavior';
|
|
@@ -22,7 +21,7 @@ export interface HoverElementOptions extends BaseBehaviorOptions {
|
|
|
22
21
|
*
|
|
23
22
|
* <en/> Whether to enable hover element function
|
|
24
23
|
*/
|
|
25
|
-
enable?: boolean | ((event:
|
|
24
|
+
enable?: boolean | ((event: IPointerEvent) => boolean);
|
|
26
25
|
/**
|
|
27
26
|
* <zh/> 激活元素的n度关系,默认为0,表示只激活当前节点,1表示激活当前节点及其直接相邻的节点和边,以此类推
|
|
28
27
|
*
|
|
@@ -46,13 +45,13 @@ export interface HoverElementOptions extends BaseBehaviorOptions {
|
|
|
46
45
|
*
|
|
47
46
|
* <en/> Callback when the element is hovered
|
|
48
47
|
*/
|
|
49
|
-
onHover?: (event:
|
|
48
|
+
onHover?: (event: IPointerEvent) => void;
|
|
50
49
|
/**
|
|
51
50
|
* <zh/> 当悬停结束时的回调
|
|
52
51
|
*
|
|
53
52
|
* <en/> Callback when the hover ends
|
|
54
53
|
*/
|
|
55
|
-
onHoverEnd?: (event:
|
|
54
|
+
onHoverEnd?: (event: IPointerEvent) => void;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
export class HoverElement extends BaseBehavior<HoverElementOptions> {
|
|
@@ -79,25 +78,30 @@ export class HoverElement extends BaseBehavior<HoverElementOptions> {
|
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
private hoverElement = (event:
|
|
81
|
+
private hoverElement = (event: IPointerEvent) => {
|
|
83
82
|
if (!this.validate(event)) return;
|
|
84
83
|
this.updateElementsState(event, true);
|
|
85
84
|
this.options.onHover?.(event);
|
|
86
85
|
};
|
|
87
86
|
|
|
88
|
-
private hoverEndElement = (event:
|
|
87
|
+
private hoverEndElement = (event: IPointerEvent) => {
|
|
89
88
|
if (!this.validate(event)) return;
|
|
90
89
|
this.updateElementsState(event, false);
|
|
91
90
|
this.options.onHoverEnd?.(event);
|
|
92
91
|
};
|
|
93
92
|
|
|
94
|
-
private updateElementsState = (event:
|
|
93
|
+
private updateElementsState = (event: IPointerEvent, add: boolean) => {
|
|
95
94
|
if (!this.options.activeState && !this.options.inactiveState) return;
|
|
96
95
|
|
|
97
96
|
const { graph } = this.context;
|
|
98
97
|
const { targetType, target } = event;
|
|
99
98
|
|
|
100
|
-
const activeIds = getElementNthDegreeIds(
|
|
99
|
+
const activeIds = getElementNthDegreeIds(
|
|
100
|
+
graph,
|
|
101
|
+
targetType as ElementType,
|
|
102
|
+
(target as Element).id,
|
|
103
|
+
this.options.degree,
|
|
104
|
+
);
|
|
101
105
|
|
|
102
106
|
const states: Record<ID, State[]> = {};
|
|
103
107
|
|
|
@@ -124,7 +128,7 @@ export class HoverElement extends BaseBehavior<HoverElementOptions> {
|
|
|
124
128
|
return states;
|
|
125
129
|
};
|
|
126
130
|
|
|
127
|
-
private validate(event:
|
|
131
|
+
private validate(event: IPointerEvent) {
|
|
128
132
|
if (this.destroyed) return false;
|
|
129
133
|
const { enable } = this.options;
|
|
130
134
|
if (isFunction(enable)) return enable(event);
|
package/src/behaviors/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { BaseBehavior } from './base-behavior';
|
|
2
2
|
export { CollapseExpand } from './collapse-expand';
|
|
3
|
+
export { CreateEdge } from './create-edge';
|
|
3
4
|
export { DragCanvas } from './drag-canvas';
|
|
4
5
|
export { DragElement } from './drag-element';
|
|
5
6
|
export { FocusElement } from './focus-element';
|
|
@@ -8,6 +9,7 @@ export { ZoomCanvas } from './zoom-canvas';
|
|
|
8
9
|
|
|
9
10
|
export type { BaseBehaviorOptions } from './base-behavior';
|
|
10
11
|
export type { CollapseExpandOptions } from './collapse-expand';
|
|
12
|
+
export type { CreateEdgeOptions } from './create-edge';
|
|
11
13
|
export type { DragCanvasOptions } from './drag-canvas';
|
|
12
14
|
export type { DragElementOptions } from './drag-element';
|
|
13
15
|
export type { FocusElementOptions } from './focus-element';
|
|
@@ -2,7 +2,7 @@ import type { PointLike } from '@antv/g';
|
|
|
2
2
|
import { clamp, isArray, isFunction, isObject } from '@antv/util';
|
|
3
3
|
import { CanvasEvent } from '../constants';
|
|
4
4
|
import type { RuntimeContext } from '../runtime/types';
|
|
5
|
-
import type {
|
|
5
|
+
import type { IKeyboardEvent, IWheelEvent, Point, ViewportAnimationEffectTiming } from '../types';
|
|
6
6
|
import { parsePoint } from '../utils/point';
|
|
7
7
|
import type { ShortcutKey } from '../utils/shortcut';
|
|
8
8
|
import { Shortcut } from '../utils/shortcut';
|
|
@@ -21,7 +21,7 @@ export interface ZoomCanvasOptions extends BaseBehaviorOptions {
|
|
|
21
21
|
*
|
|
22
22
|
* <en/> Whether to enable the function of zooming the canvas
|
|
23
23
|
*/
|
|
24
|
-
enable?: boolean | ((event:
|
|
24
|
+
enable?: boolean | ((event: IWheelEvent | IKeyboardEvent) => boolean);
|
|
25
25
|
/**
|
|
26
26
|
* <zh/> 触发缩放的方式
|
|
27
27
|
*
|
|
@@ -47,7 +47,7 @@ export interface ZoomCanvasOptions extends BaseBehaviorOptions {
|
|
|
47
47
|
*
|
|
48
48
|
* <en/> Callback when zooming is completed
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
onFinish?: () => void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
type CombinationKey = {
|
|
@@ -107,9 +107,9 @@ export class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
|
|
|
107
107
|
* @param event - <zh/> 事件对象 | <en/> Event object
|
|
108
108
|
* @param animation - <zh/> 缩放动画配置 | <en/> Zoom animation configuration
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
protected zoom = async (
|
|
111
111
|
value: number,
|
|
112
|
-
event:
|
|
112
|
+
event: IWheelEvent | IKeyboardEvent,
|
|
113
113
|
animation: ZoomCanvasOptions['animation'],
|
|
114
114
|
) => {
|
|
115
115
|
if (!this.validate(event)) return;
|
|
@@ -120,19 +120,19 @@ export class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
|
|
|
120
120
|
origin = parsePoint(event.viewport as PointLike);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
const { sensitivity,
|
|
123
|
+
const { sensitivity, onFinish } = this.options;
|
|
124
124
|
const ratio = 1 + (clamp(value, -50, 50) * sensitivity) / 100;
|
|
125
125
|
const zoom = graph.getZoom();
|
|
126
126
|
await graph.zoomTo(zoom * ratio, animation, origin);
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
onFinish?.();
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
protected onReset = async () => {
|
|
132
132
|
await this.context.graph.zoomTo(1, this.options.animation);
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
protected validate(event: IWheelEvent | IKeyboardEvent) {
|
|
136
136
|
if (this.destroyed) return false;
|
|
137
137
|
const { enable } = this.options;
|
|
138
138
|
if (isFunction(enable)) return enable(event);
|
|
@@ -145,4 +145,9 @@ export class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
|
|
|
145
145
|
if (!container) return;
|
|
146
146
|
container.addEventListener(eventName, listener);
|
|
147
147
|
}
|
|
148
|
+
|
|
149
|
+
public destroy() {
|
|
150
|
+
this.shortcut.destroy();
|
|
151
|
+
super.destroy();
|
|
152
|
+
}
|
|
148
153
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export enum GraphEvent {
|
|
2
|
+
/** <zh/> 画布初始化之前 | <en/> Before the canvas is initialized */
|
|
3
|
+
BEFORE_CANVAS_INIT = 'beforecanvasinit',
|
|
4
|
+
/** <zh/> 画布初始化之后 | <en/> After the canvas is initialized */
|
|
5
|
+
AFTER_CANVAS_INIT = 'aftercanvasinit',
|
|
2
6
|
/** <zh/> 视口尺寸变更之前 | <en/> Before the viewport size changes */
|
|
3
7
|
BEFORE_SIZE_CHANGE = 'beforesizechange',
|
|
4
8
|
/** <zh/> 视口尺寸变更之后 | <en/> After the viewport size changes */
|
|
@@ -39,18 +43,6 @@ export enum GraphEvent {
|
|
|
39
43
|
BEFORE_TRANSFORM = 'beforetransform',
|
|
40
44
|
/** <zh/> 可视区域变化之后 | <en/> After the visible area changes */
|
|
41
45
|
AFTER_TRANSFORM = 'aftertransform',
|
|
42
|
-
/** <zh/> 元素可见性变化之前 | <en/> Before the visibility of the element changes */
|
|
43
|
-
BEFORE_ELEMENT_VISIBILITY_CHANGE = 'beforeelementvisibilitychange',
|
|
44
|
-
/** <zh/> 元素可见性变化之后 | <en/> After the visibility of the element changes */
|
|
45
|
-
AFTER_ELEMENT_VISIBILITY_CHANGE = 'afterelementvisibilitychange',
|
|
46
|
-
/** <zh/> 元素层级变化之前 | <en/> Before the layer of the element changes */
|
|
47
|
-
BEFORE_ELEMENT_Z_INDEX_CHANGE = 'beforeelementzindexchange',
|
|
48
|
-
/** <zh/> 元素层级变化之后 | <en/> After the layer of the element changes */
|
|
49
|
-
AFTER_ELEMENT_Z_INDEX_CHANGE = 'afterelementzindexchange',
|
|
50
|
-
/** <zh/> 状态变化之前 | <en/> Before the state changes */
|
|
51
|
-
BEFORE_ELEMENT_STATE_CHANGE = 'beforeelementstatechange',
|
|
52
|
-
/** <zh/> 状态变化之后 | <en/> After the state changes */
|
|
53
|
-
AFTER_ELEMENT_STATE_CHANGE = 'afterelementstatechange',
|
|
54
46
|
}
|
|
55
47
|
|
|
56
48
|
export const enum AnimationTypeEnum {
|
package/src/constants/index.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export enum ExtensionCategory {
|
|
2
|
+
/** <zh/> 节点元素 | <en/> Node element */
|
|
3
|
+
NODE = 'node',
|
|
4
|
+
/** <zh/> 边元素 | <en/> Edge element */
|
|
5
|
+
EDGE = 'edge',
|
|
6
|
+
/** <zh/> 组合元素 | <en/> Combination element */
|
|
7
|
+
COMBO = 'combo',
|
|
8
|
+
/** <zh/> 主题 | <en/> Theme */
|
|
9
|
+
THEME = 'theme',
|
|
10
|
+
/** <zh/> 色板 | <en/> Palette */
|
|
11
|
+
PALETTE = 'palette',
|
|
12
|
+
/** <zh/> 布局 | <en/> Layout */
|
|
13
|
+
LAYOUT = 'layout',
|
|
14
|
+
/** <zh/> 交互 | <en/> Behavior */
|
|
15
|
+
BEHAVIOR = 'behavior',
|
|
16
|
+
/** <zh/> 插件 | <en/> Plugin */
|
|
17
|
+
PLUGIN = 'plugin',
|
|
18
|
+
/** <zh/> 动画 | <en/> Animation */
|
|
19
|
+
ANIMATION = 'animation',
|
|
20
|
+
}
|
|
@@ -183,4 +183,28 @@ export abstract class BaseCombo<S extends BaseComboStyleProps = BaseComboStylePr
|
|
|
183
183
|
// collapsed marker
|
|
184
184
|
this.drawCollapsedMarkerShape(attributes, container);
|
|
185
185
|
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* <zh/> 在元素完成创建并执行完入场动画后调用
|
|
189
|
+
*
|
|
190
|
+
* <en/> Called after the element is created and the entrance animation is completed
|
|
191
|
+
* @override
|
|
192
|
+
*/
|
|
193
|
+
public onCreate() {}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* <zh/> 在元素更新并执行完过渡动画后调用
|
|
197
|
+
*
|
|
198
|
+
* <en/> Called after the element is updated and the transition animation is completed
|
|
199
|
+
* @override
|
|
200
|
+
*/
|
|
201
|
+
public onUpdate() {}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* <zh/> 在元素完成退场动画并销毁后调用
|
|
205
|
+
*
|
|
206
|
+
* <en/> Called after the element completes the exit animation and is destroyed
|
|
207
|
+
* @override
|
|
208
|
+
*/
|
|
209
|
+
public onDestroy() {}
|
|
186
210
|
}
|
|
@@ -227,7 +227,31 @@ export abstract class BaseEdge extends BaseShape<BaseEdgeStyleProps> {
|
|
|
227
227
|
this.drawHaloShape(attributes, container);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
/**
|
|
231
|
+
* <zh/> 在元素完成创建并执行完入场动画后调用
|
|
232
|
+
*
|
|
233
|
+
* <en/> Called after the element is created and the entrance animation is completed
|
|
234
|
+
* @override
|
|
235
|
+
*/
|
|
236
|
+
public onCreate() {}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* <zh/> 在元素更新并执行完过渡动画后调用
|
|
240
|
+
*
|
|
241
|
+
* <en/> Called after the element is updated and the transition animation is completed
|
|
242
|
+
* @override
|
|
243
|
+
*/
|
|
244
|
+
public onUpdate() {}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* <zh/> 在元素完成退场动画并销毁后调用
|
|
248
|
+
*
|
|
249
|
+
* <en/> Called after the element completes the exit animation and is destroyed
|
|
250
|
+
* @override
|
|
251
|
+
*/
|
|
252
|
+
public onDestroy() {}
|
|
253
|
+
|
|
254
|
+
public animate(keyframes: Keyframe[], options?: number | KeyframeAnimationOptions) {
|
|
231
255
|
const result = super.animate(keyframes, options);
|
|
232
256
|
|
|
233
257
|
if (result) {
|
|
@@ -283,7 +283,31 @@ export abstract class BaseNode<S extends BaseNodeStyleProps = any> extends BaseS
|
|
|
283
283
|
this.drawPortShapes(attributes, container);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
/**
|
|
287
|
+
* <zh/> 在元素完成创建并执行完入场动画后调用
|
|
288
|
+
*
|
|
289
|
+
* <en/> Called after the element is created and the entrance animation is completed
|
|
290
|
+
* @override
|
|
291
|
+
*/
|
|
292
|
+
public onCreate() {}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* <zh/> 在元素更新并执行完过渡动画后调用
|
|
296
|
+
*
|
|
297
|
+
* <en/> Called after the element is updated and the transition animation is completed
|
|
298
|
+
* @override
|
|
299
|
+
*/
|
|
300
|
+
public onUpdate() {}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* <zh/> 在元素完成退场动画并销毁后调用
|
|
304
|
+
*
|
|
305
|
+
* <en/> Called after the element completes the exit animation and is destroyed
|
|
306
|
+
* @override
|
|
307
|
+
*/
|
|
308
|
+
public onDestroy() {}
|
|
309
|
+
|
|
310
|
+
public animate(keyframes: Keyframe[], options?: number | KeyframeAnimationOptions) {
|
|
287
311
|
const result = super.animate(keyframes, options);
|
|
288
312
|
|
|
289
313
|
if (result) {
|
package/src/exports.ts
CHANGED
|
@@ -3,22 +3,50 @@ import { idOf } from './utils/id';
|
|
|
3
3
|
import { omitStyleProps, subStyleProps } from './utils/prefix';
|
|
4
4
|
import { treeToGraphData } from './utils/tree';
|
|
5
5
|
|
|
6
|
-
export { BaseBehavior } from './behaviors';
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export { BaseBehavior, DragCanvas, ZoomCanvas } from './behaviors';
|
|
7
|
+
export {
|
|
8
|
+
CanvasEvent,
|
|
9
|
+
ComboEvent,
|
|
10
|
+
CommonEvent,
|
|
11
|
+
ContainerEvent,
|
|
12
|
+
EdgeEvent,
|
|
13
|
+
ExtensionCategory,
|
|
14
|
+
GraphEvent,
|
|
15
|
+
NodeEvent,
|
|
16
|
+
} from './constants';
|
|
17
|
+
export { BaseCombo, CircleCombo, RectCombo } from './elements/combos';
|
|
18
|
+
export { BaseEdge, Cubic, CubicHorizontal, CubicVertical, Line, Polyline, Quadratic } from './elements/edges';
|
|
19
|
+
export { BaseNode, Circle, Diamond, Ellipse, Hexagon, Image, Rect, Star, Triangle } from './elements/nodes';
|
|
11
20
|
export { BaseShape } from './elements/shapes';
|
|
12
|
-
export { BasePlugin } from './plugins';
|
|
21
|
+
export { BasePlugin, CameraSetting } from './plugins';
|
|
13
22
|
export { getExtension, getExtensions, register } from './registry';
|
|
14
23
|
export { Graph } from './runtime/graph';
|
|
24
|
+
export { Shortcut } from './utils/shortcut';
|
|
15
25
|
|
|
16
|
-
export type { BaseBehaviorOptions } from './behaviors';
|
|
17
|
-
export type { BaseComboStyleProps } from './elements/combos';
|
|
18
|
-
export type {
|
|
19
|
-
|
|
26
|
+
export type { BaseBehaviorOptions, DragCanvasOptions, ZoomCanvasOptions } from './behaviors';
|
|
27
|
+
export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
|
|
28
|
+
export type {
|
|
29
|
+
BaseEdgeStyleProps,
|
|
30
|
+
CubicHorizontalStyleProps,
|
|
31
|
+
CubicStyleProps,
|
|
32
|
+
CubicVerticalStyleProps,
|
|
33
|
+
LineStyleProps,
|
|
34
|
+
PolylineStyleProps,
|
|
35
|
+
QuadraticStyleProps,
|
|
36
|
+
} from './elements/edges';
|
|
37
|
+
export type {
|
|
38
|
+
BaseNodeStyleProps,
|
|
39
|
+
CircleStyleProps,
|
|
40
|
+
DiamondStyleProps,
|
|
41
|
+
EllipseStyleProps,
|
|
42
|
+
HexagonStyleProps,
|
|
43
|
+
ImageStyleProps,
|
|
44
|
+
RectStyleProps,
|
|
45
|
+
StarStyleProps,
|
|
46
|
+
TriangleStyleProps,
|
|
47
|
+
} from './elements/nodes';
|
|
20
48
|
export type { BaseShapeStyleProps } from './elements/shapes';
|
|
21
|
-
export type { BasePluginOptions } from './plugins';
|
|
49
|
+
export type { BasePluginOptions, CameraSettingOptions } from './plugins';
|
|
22
50
|
export type { RuntimeContext } from './runtime/types';
|
|
23
51
|
export type {
|
|
24
52
|
BehaviorOptions,
|
|
@@ -36,7 +64,22 @@ export type {
|
|
|
36
64
|
ThemeOptions,
|
|
37
65
|
ViewportOptions,
|
|
38
66
|
} from './spec';
|
|
39
|
-
export type {
|
|
67
|
+
export type {
|
|
68
|
+
IAnimateEvent,
|
|
69
|
+
IDragEvent,
|
|
70
|
+
IElementLifeCycleEvent,
|
|
71
|
+
IEvent,
|
|
72
|
+
IGraphLifeCycleEvent,
|
|
73
|
+
IKeyboardEvent,
|
|
74
|
+
IPointerEvent,
|
|
75
|
+
IViewportEvent,
|
|
76
|
+
IWheelEvent,
|
|
77
|
+
Point,
|
|
78
|
+
Vector2,
|
|
79
|
+
Vector3,
|
|
80
|
+
ViewportAnimationEffectTiming,
|
|
81
|
+
} from './types';
|
|
82
|
+
export type { ShortcutKey } from './utils/shortcut';
|
|
40
83
|
|
|
41
84
|
const Utils = {
|
|
42
85
|
idOf,
|