@antv/g6 5.0.3 → 5.0.4
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/README.en-US.md +118 -0
- package/README.md +118 -0
- package/dist/g6.min.js +2 -2
- package/dist/lib/behaviors/base-behavior.d.ts +1 -1
- package/dist/lib/behaviors/scroll-canvas.d.ts +1 -1
- package/dist/lib/behaviors/types.d.ts +0 -4
- package/dist/lib/behaviors/zoom-canvas.d.ts +1 -1
- package/dist/lib/elements/shapes/badge.d.ts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/layouts/index.d.ts +0 -1
- package/dist/lib/plugins/types.d.ts +0 -2
- package/dist/lib/registry/extension/index.d.ts +17 -6
- package/dist/lib/registry/extension/types.d.ts +15 -33
- package/dist/lib/runtime/data.d.ts +1 -1
- package/dist/lib/runtime/element.d.ts +1 -1
- package/dist/lib/spec/behavior.d.ts +4 -5
- package/dist/lib/spec/element/combo.d.ts +8 -4
- package/dist/lib/spec/element/edge.d.ts +8 -4
- package/dist/lib/spec/element/node.d.ts +8 -4
- package/dist/lib/spec/plugin.d.ts +4 -5
- package/dist/lib/spec/transform.d.ts +5 -6
- package/dist/lib/transforms/types.d.ts +1 -2
- package/dist/lib/types/index.d.ts +0 -1
- package/dist/lib/types/style.d.ts +2 -0
- package/dist/lib/utils/event/events.d.ts +4 -4
- package/dist/lib/utils/extension.d.ts +5 -2
- package/dist/lib/utils/style.d.ts +5 -2
- package/dist/lib/utils/transform.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -0
- package/esm/behaviors/base-behavior.d.ts +1 -1
- package/esm/behaviors/base-behavior.js.map +1 -1
- package/esm/behaviors/scroll-canvas.d.ts +1 -1
- package/esm/behaviors/scroll-canvas.js.map +1 -1
- package/esm/behaviors/types.d.ts +0 -4
- package/esm/behaviors/zoom-canvas.d.ts +1 -1
- package/esm/elements/shapes/badge.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/layouts/index.d.ts +0 -1
- package/esm/plugins/camera-setting.js.map +1 -1
- package/esm/plugins/types.d.ts +0 -2
- package/esm/registry/extension/index.d.ts +17 -6
- package/esm/registry/extension/index.js +1 -1
- package/esm/registry/extension/index.js.map +1 -1
- package/esm/registry/extension/types.d.ts +15 -33
- package/esm/runtime/data.d.ts +1 -1
- package/esm/runtime/element.d.ts +1 -1
- package/esm/runtime/element.js +7 -4
- package/esm/runtime/element.js.map +1 -1
- package/esm/runtime/graph.js +3 -3
- package/esm/runtime/graph.js.map +1 -1
- package/esm/spec/behavior.d.ts +4 -5
- package/esm/spec/element/combo.d.ts +8 -4
- package/esm/spec/element/edge.d.ts +8 -4
- package/esm/spec/element/node.d.ts +8 -4
- package/esm/spec/plugin.d.ts +4 -5
- package/esm/spec/transform.d.ts +5 -6
- package/esm/transforms/types.d.ts +1 -2
- package/esm/types/index.d.ts +0 -1
- package/esm/types/style.d.ts +2 -0
- package/esm/utils/event/events.d.ts +4 -4
- package/esm/utils/extension.d.ts +5 -2
- package/esm/utils/extension.js +5 -1
- package/esm/utils/extension.js.map +1 -1
- package/esm/utils/style.d.ts +5 -2
- package/esm/utils/style.js +5 -6
- package/esm/utils/style.js.map +1 -1
- package/esm/utils/transform.d.ts +1 -1
- package/esm/version.d.ts +1 -0
- package/esm/version.js +2 -0
- package/esm/version.js.map +1 -0
- package/lib/behaviors/base-behavior.d.ts +1 -1
- package/lib/behaviors/base-behavior.js.map +1 -1
- package/lib/behaviors/scroll-canvas.d.ts +1 -1
- package/lib/behaviors/scroll-canvas.js.map +1 -1
- package/lib/behaviors/types.d.ts +0 -4
- package/lib/behaviors/zoom-canvas.d.ts +1 -1
- package/lib/elements/effect.js +1 -2
- package/lib/elements/effect.js.map +1 -1
- package/lib/elements/shapes/badge.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/layouts/index.d.ts +0 -1
- package/lib/plugins/camera-setting.js.map +1 -1
- package/lib/plugins/contextmenu/util.js +2 -2
- package/lib/plugins/contextmenu/util.js.map +1 -1
- package/lib/plugins/history/util.js +2 -3
- package/lib/plugins/history/util.js.map +1 -1
- package/lib/plugins/hull/util.js +1 -2
- package/lib/plugins/hull/util.js.map +1 -1
- package/lib/plugins/toolbar/util.js +2 -2
- package/lib/plugins/toolbar/util.js.map +1 -1
- package/lib/plugins/types.d.ts +0 -2
- package/lib/plugins/watermark/util.js +2 -3
- package/lib/plugins/watermark/util.js.map +1 -1
- package/lib/registry/extension/index.d.ts +17 -6
- package/lib/registry/extension/index.js +1 -1
- package/lib/registry/extension/index.js.map +1 -1
- package/lib/registry/extension/types.d.ts +15 -33
- package/lib/registry/index.js +4 -5
- package/lib/registry/index.js.map +1 -1
- package/lib/runtime/data.d.ts +1 -1
- package/lib/runtime/element.d.ts +1 -1
- package/lib/runtime/element.js +7 -4
- package/lib/runtime/element.js.map +1 -1
- package/lib/runtime/graph.js +3 -3
- package/lib/runtime/graph.js.map +1 -1
- package/lib/spec/behavior.d.ts +4 -5
- package/lib/spec/element/combo.d.ts +8 -4
- package/lib/spec/element/edge.d.ts +8 -4
- package/lib/spec/element/node.d.ts +8 -4
- package/lib/spec/plugin.d.ts +4 -5
- package/lib/spec/transform.d.ts +5 -6
- package/lib/themes/base.js +1 -2
- package/lib/themes/base.js.map +1 -1
- package/lib/transforms/types.d.ts +1 -2
- package/lib/transforms/utils.js +1 -2
- package/lib/transforms/utils.js.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/style.d.ts +2 -0
- package/lib/utils/anchor.js +1 -2
- package/lib/utils/anchor.js.map +1 -1
- package/lib/utils/animation.js +5 -6
- package/lib/utils/animation.js.map +1 -1
- package/lib/utils/array.js +1 -2
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/bbox.js +13 -14
- package/lib/utils/bbox.js.map +1 -1
- package/lib/utils/cache.js +4 -5
- package/lib/utils/cache.js.map +1 -1
- package/lib/utils/change.js +2 -3
- package/lib/utils/change.js.map +1 -1
- package/lib/utils/collapsibility.js +1 -2
- package/lib/utils/collapsibility.js.map +1 -1
- package/lib/utils/data.js +3 -4
- package/lib/utils/data.js.map +1 -1
- package/lib/utils/diff.js +1 -2
- package/lib/utils/diff.js.map +1 -1
- package/lib/utils/dom.js +4 -5
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/edge.js +18 -18
- package/lib/utils/edge.js.map +1 -1
- package/lib/utils/element.js +26 -27
- package/lib/utils/element.js.map +1 -1
- package/lib/utils/event/events.d.ts +4 -4
- package/lib/utils/event/index.js +2 -3
- package/lib/utils/event/index.js.map +1 -1
- package/lib/utils/extension.d.ts +5 -2
- package/lib/utils/extension.js +6 -3
- package/lib/utils/extension.js.map +1 -1
- package/lib/utils/graphlib.js +3 -4
- package/lib/utils/graphlib.js.map +1 -1
- package/lib/utils/id.js +3 -4
- package/lib/utils/id.js.map +1 -1
- package/lib/utils/is.js +4 -5
- package/lib/utils/is.js.map +1 -1
- package/lib/utils/layout.js +7 -8
- package/lib/utils/layout.js.map +1 -1
- package/lib/utils/line.js +2 -3
- package/lib/utils/line.js.map +1 -1
- package/lib/utils/math.js +1 -2
- package/lib/utils/math.js.map +1 -1
- package/lib/utils/node.js +1 -2
- package/lib/utils/node.js.map +1 -1
- package/lib/utils/padding.js +1 -2
- package/lib/utils/padding.js.map +1 -1
- package/lib/utils/palette.js +3 -4
- package/lib/utils/palette.js.map +1 -1
- package/lib/utils/path.js +4 -4
- package/lib/utils/path.js.map +1 -1
- package/lib/utils/placement.js +1 -2
- package/lib/utils/placement.js.map +1 -1
- package/lib/utils/point.js +21 -22
- package/lib/utils/point.js.map +1 -1
- package/lib/utils/polygon.js +1 -2
- package/lib/utils/polygon.js.map +1 -1
- package/lib/utils/position.js +5 -5
- package/lib/utils/position.js.map +1 -1
- package/lib/utils/prefix.js +7 -8
- package/lib/utils/prefix.js.map +1 -1
- package/lib/utils/relation.js +2 -3
- package/lib/utils/relation.js.map +1 -1
- package/lib/utils/router/orth.js +9 -10
- package/lib/utils/router/orth.js.map +1 -1
- package/lib/utils/shape.js +1 -2
- package/lib/utils/shape.js.map +1 -1
- package/lib/utils/size.js +1 -2
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/style.d.ts +5 -2
- package/lib/utils/style.js +8 -10
- package/lib/utils/style.js.map +1 -1
- package/lib/utils/text.js +3 -4
- package/lib/utils/text.js.map +1 -1
- package/lib/utils/theme.js +1 -2
- package/lib/utils/theme.js.map +1 -1
- package/lib/utils/transform.d.ts +1 -1
- package/lib/utils/transform.js +2 -2
- package/lib/utils/transform.js.map +1 -1
- package/lib/utils/traverse.js +2 -3
- package/lib/utils/traverse.js.map +1 -1
- package/lib/utils/tree.js +1 -2
- package/lib/utils/tree.js.map +1 -1
- package/lib/utils/vector.js +16 -17
- package/lib/utils/vector.js.map +1 -1
- package/lib/utils/visibility.js +1 -2
- package/lib/utils/visibility.js.map +1 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +5 -0
- package/lib/version.js.map +1 -0
- package/package.json +6 -3
- package/src/behaviors/base-behavior.ts +1 -1
- package/src/behaviors/scroll-canvas.ts +1 -1
- package/src/behaviors/types.ts +0 -4
- package/src/index.ts +1 -1
- package/src/plugins/camera-setting.ts +2 -2
- package/src/plugins/types.ts +0 -2
- package/src/registry/extension/index.ts +15 -8
- package/src/registry/extension/types.ts +15 -40
- package/src/runtime/element.ts +7 -4
- package/src/runtime/graph.ts +3 -3
- package/src/spec/behavior.ts +4 -5
- package/src/spec/element/combo.ts +16 -4
- package/src/spec/element/edge.ts +16 -4
- package/src/spec/element/node.ts +16 -4
- package/src/spec/plugin.ts +4 -5
- package/src/spec/transform.ts +5 -6
- package/src/transforms/types.ts +1 -2
- package/src/types/index.ts +0 -1
- package/src/types/style.ts +2 -0
- package/src/utils/extension.ts +10 -3
- package/src/utils/style.ts +11 -6
- package/src/version.ts +1 -0
- package/dist/lib/types/callable.d.ts +0 -19
- package/esm/types/callable.d.ts +0 -19
- package/esm/types/callable.js +0 -2
- package/esm/types/callable.js.map +0 -1
- package/lib/types/callable.d.ts +0 -19
- package/lib/types/callable.js +0 -3
- package/lib/types/callable.js.map +0 -1
- package/src/types/callable.ts +0 -21
|
@@ -2,5 +2,5 @@ import { BaseExtension } from '../registry/extension';
|
|
|
2
2
|
import type { CustomBehaviorOption } from '../spec/behavior';
|
|
3
3
|
export interface BaseBehaviorOptions extends CustomBehaviorOption {
|
|
4
4
|
}
|
|
5
|
-
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions> extends BaseExtension<T> {
|
|
5
|
+
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions = BaseBehaviorOptions> extends BaseExtension<T> {
|
|
6
6
|
}
|
|
@@ -59,7 +59,7 @@ export interface ScrollCanvasOptions extends BaseBehaviorOptions {
|
|
|
59
59
|
* <en/> Scroll canvas behavior
|
|
60
60
|
*/
|
|
61
61
|
export declare class ScrollCanvas extends BaseBehavior<ScrollCanvasOptions> {
|
|
62
|
-
static defaultOptions: ScrollCanvasOptions
|
|
62
|
+
static defaultOptions: Partial<ScrollCanvasOptions>;
|
|
63
63
|
private shortcut;
|
|
64
64
|
constructor(context: RuntimeContext, options: ScrollCanvasOptions);
|
|
65
65
|
/**
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { BaseBehavior } from './base-behavior';
|
|
2
|
-
import type { DragCanvasOptions } from './drag-canvas';
|
|
3
|
-
import type { ScrollCanvasOptions } from './scroll-canvas';
|
|
4
|
-
import type { ZoomCanvasOptions } from './zoom-canvas';
|
|
5
|
-
export type BuiltInBehaviorOptions = DragCanvasOptions | ZoomCanvasOptions | ScrollCanvasOptions;
|
|
6
2
|
export type Behavior = BaseBehavior<any>;
|
|
@@ -77,7 +77,7 @@ export declare class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
|
|
|
77
77
|
* @param event - <zh/> 事件对象 | <en/> Event object
|
|
78
78
|
* @param animation - <zh/> 缩放动画配置 | <en/> Zoom animation configuration
|
|
79
79
|
*/
|
|
80
|
-
protected zoom: (value: number, event: IWheelEvent | IKeyboardEvent, animation: ZoomCanvasOptions[
|
|
80
|
+
protected zoom: (value: number, event: IWheelEvent | IKeyboardEvent, animation: ZoomCanvasOptions["animation"]) => Promise<void>;
|
|
81
81
|
protected onReset: () => Promise<void>;
|
|
82
82
|
/**
|
|
83
83
|
* <zh/> 验证是否可以缩放
|
|
@@ -20,7 +20,7 @@ export interface BadgeStyleProps extends LabelStyleProps {
|
|
|
20
20
|
export declare class Badge extends BaseShape<BadgeStyleProps> {
|
|
21
21
|
static defaultStyleProps: Partial<BadgeStyleProps>;
|
|
22
22
|
constructor(options: DisplayObjectConfig<BadgeStyleProps>);
|
|
23
|
-
protected getBadgeStyle(attributes: Required<BadgeStyleProps>): Omit<Required<BadgeStyleProps>, "x" | "y" | "z" | "
|
|
23
|
+
protected getBadgeStyle(attributes: Required<BadgeStyleProps>): Omit<Required<BadgeStyleProps>, "x" | "y" | "z" | "class" | "transform" | "transformOrigin" | "zIndex" | "context" | "className">;
|
|
24
24
|
render(attributes?: Required<BadgeStyleProps>, container?: Group): void;
|
|
25
25
|
getGeometryBounds(): import("@antv/g").AABB;
|
|
26
26
|
}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="src/layouts/hierarchy" />
|
|
2
1
|
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
|
|
3
2
|
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
|
|
4
3
|
export { BaseLayout } from './base-layout';
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import type EventEmitter from '@antv/event-emitter';
|
|
2
|
+
import type { Graph } from '../../runtime/graph';
|
|
2
3
|
import type { RuntimeContext } from '../../runtime/types';
|
|
3
4
|
import type { IEvent } from '../../types';
|
|
4
|
-
import type {
|
|
5
|
-
export declare abstract class ExtensionController<
|
|
5
|
+
import type { STDExtensionOption } from './types';
|
|
6
|
+
export declare abstract class ExtensionController<E extends BaseExtension<any>> {
|
|
6
7
|
protected context: RuntimeContext;
|
|
7
8
|
protected extensions: STDExtensionOption[];
|
|
8
|
-
protected extensionMap: Record<string,
|
|
9
|
+
protected extensionMap: Record<string, E>;
|
|
9
10
|
abstract category: 'plugin' | 'behavior' | 'transform';
|
|
10
11
|
constructor(context: RuntimeContext);
|
|
11
|
-
setExtensions(extensions:
|
|
12
|
+
setExtensions(extensions: (string | {
|
|
13
|
+
type: string;
|
|
14
|
+
[keys: string]: unknown;
|
|
15
|
+
} | ((this: Graph) => {
|
|
16
|
+
type: string;
|
|
17
|
+
[keys: string]: unknown;
|
|
18
|
+
}))[]): void;
|
|
12
19
|
protected createExtension(extension: STDExtensionOption): void;
|
|
13
20
|
protected createExtensions(extensions: STDExtensionOption[]): void;
|
|
14
21
|
protected updateExtension(extension: STDExtensionOption): void;
|
|
@@ -22,12 +29,16 @@ export declare abstract class ExtensionController<Extension extends BaseExtensio
|
|
|
22
29
|
*
|
|
23
30
|
* <en/> Base class for extension instance
|
|
24
31
|
*/
|
|
25
|
-
export declare class BaseExtension<T extends
|
|
32
|
+
export declare class BaseExtension<T extends {
|
|
33
|
+
type: string;
|
|
34
|
+
key?: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}> {
|
|
26
37
|
protected context: RuntimeContext;
|
|
27
38
|
protected options: Required<T>;
|
|
28
39
|
protected events: [EventEmitter | HTMLElement, string, (event: IEvent) => void][];
|
|
29
40
|
destroyed: boolean;
|
|
30
|
-
constructor(context: RuntimeContext, options: T);
|
|
41
|
+
constructor(context: RuntimeContext, options: Partial<T>);
|
|
31
42
|
update(options: Partial<T>): void;
|
|
32
43
|
destroy(): void;
|
|
33
44
|
}
|
|
@@ -1,38 +1,20 @@
|
|
|
1
|
-
interface ExtensionMetaOptions {
|
|
2
|
-
type: string;
|
|
3
|
-
key: string;
|
|
4
|
-
}
|
|
5
|
-
interface CustomExtensionOptions {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* <zh/> 扩展配置项
|
|
10
|
-
*
|
|
11
|
-
* <en/> Extension options
|
|
12
|
-
*/
|
|
13
|
-
export type ExtensionOptions<Registry extends CustomExtensionOptions = CustomExtensionOptions> = ExtensionOption<Registry | LooselyExtensionOption>[];
|
|
14
|
-
/**
|
|
15
|
-
* <zh/> 扩展配置项
|
|
16
|
-
*
|
|
17
|
-
* <en/> Extension option
|
|
18
|
-
*/
|
|
19
|
-
type ExtensionOption<Registry extends CustomExtensionOptions> = AbbrExtensionOption<Registry>;
|
|
20
1
|
/**
|
|
21
2
|
* <zh/> 标准扩展配置项
|
|
22
3
|
*
|
|
23
4
|
* <en/> Standard extension options
|
|
24
5
|
*/
|
|
25
|
-
export
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
6
|
+
export interface STDExtensionOption {
|
|
7
|
+
/**
|
|
8
|
+
* <zh/> 扩展类型
|
|
9
|
+
*
|
|
10
|
+
* <en/> Extension type
|
|
11
|
+
*/
|
|
12
|
+
type: string;
|
|
13
|
+
/**
|
|
14
|
+
* <zh/> 扩展 key,即唯一标识
|
|
15
|
+
*
|
|
16
|
+
* <en/> Extension key, that is, the unique identifier
|
|
17
|
+
*/
|
|
18
|
+
key: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
@@ -104,7 +104,7 @@ export declare class DataController {
|
|
|
104
104
|
* @returns <zh/> 节点和 combo 的数据 | <en/> node and combo data
|
|
105
105
|
*/
|
|
106
106
|
getNodeLikeData(ids?: ID[]): NodeLikeData[];
|
|
107
|
-
getElementDataByState(elementType: ElementType, state: string): (NodeData |
|
|
107
|
+
getElementDataByState(elementType: ElementType, state: string): (NodeData | ComboData | EdgeData)[];
|
|
108
108
|
getElementState(id: ID): State[];
|
|
109
109
|
hasNode(id: ID): boolean;
|
|
110
110
|
hasEdge(id: ID): boolean;
|
|
@@ -13,7 +13,7 @@ export declare class ElementController {
|
|
|
13
13
|
private forEachElementData;
|
|
14
14
|
getElementType(elementType: ElementType, datum: ElementDatum): string;
|
|
15
15
|
private getTheme;
|
|
16
|
-
getThemeStyle(elementType: ElementType): import("../spec/element/node").NodeStyle | import("../spec/element/
|
|
16
|
+
getThemeStyle(elementType: ElementType): import("../spec/element/node").NodeStyle | import("../spec/element/combo").ComboStyle | import("../spec/element/edge").EdgeStyle;
|
|
17
17
|
getThemeStateStyle(elementType: ElementType, states: State[]): any;
|
|
18
18
|
private paletteStyle;
|
|
19
19
|
private computePaletteStyle;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type BehaviorOptions = ExtensionOptions<BuiltInBehaviorOptions>;
|
|
1
|
+
import type { Graph } from '../runtime/graph';
|
|
2
|
+
export type BehaviorOptions = (string | CustomBehaviorOption | ((this: Graph) => CustomBehaviorOption))[];
|
|
4
3
|
export interface UpdateBehaviorOption {
|
|
5
4
|
key: string;
|
|
6
|
-
[key: string]:
|
|
5
|
+
[key: string]: unknown;
|
|
7
6
|
}
|
|
8
7
|
export interface CustomBehaviorOption extends Record<string, any> {
|
|
9
8
|
/**
|
|
@@ -11,7 +10,7 @@ export interface CustomBehaviorOption extends Record<string, any> {
|
|
|
11
10
|
*
|
|
12
11
|
* <en/> Behavior type
|
|
13
12
|
*/
|
|
14
|
-
type
|
|
13
|
+
type: string;
|
|
15
14
|
/**
|
|
16
15
|
* <zh/> 交互 key,即唯一标识
|
|
17
16
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnimationOptions } from '../../animations/types';
|
|
2
2
|
import type { BaseComboStyleProps } from '../../elements/combos';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Graph } from '../../runtime/graph';
|
|
4
4
|
import type { ComboData } from '../data';
|
|
5
5
|
import type { AnimationStage } from './animation';
|
|
6
6
|
import type { PaletteOptions } from './palette';
|
|
@@ -15,19 +15,23 @@ export interface ComboOptions {
|
|
|
15
15
|
*
|
|
16
16
|
* <en/> Combo type
|
|
17
17
|
*/
|
|
18
|
-
type?: string | ((datum: ComboData) => string);
|
|
18
|
+
type?: string | ((this: Graph, datum: ComboData) => string);
|
|
19
19
|
/**
|
|
20
20
|
* <zh/> 组合样式
|
|
21
21
|
*
|
|
22
22
|
* <en/> Combo style
|
|
23
23
|
*/
|
|
24
|
-
style?:
|
|
24
|
+
style?: ComboStyle | ((this: Graph, data: ComboData) => ComboStyle) | {
|
|
25
|
+
[K in keyof ComboStyle]: ComboStyle[K] | ((this: Graph, data: ComboData) => ComboStyle[K]);
|
|
26
|
+
};
|
|
25
27
|
/**
|
|
26
28
|
* <zh/> 组合状态样式
|
|
27
29
|
*
|
|
28
30
|
* <en/> Combo state style
|
|
29
31
|
*/
|
|
30
|
-
state?: Record<string,
|
|
32
|
+
state?: Record<string, ComboStyle | ((this: Graph, data: ComboData) => ComboStyle) | {
|
|
33
|
+
[K in keyof ComboStyle]: ComboStyle[K] | ((this: Graph, data: ComboData) => ComboStyle[K]);
|
|
34
|
+
}>;
|
|
31
35
|
/**
|
|
32
36
|
* <zh/> 组合动画
|
|
33
37
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnimationOptions } from '../../animations/types';
|
|
2
2
|
import type { BaseEdgeStyleProps } from '../../elements/edges';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Graph } from '../../runtime/graph';
|
|
4
4
|
import type { EdgeData } from '../data';
|
|
5
5
|
import type { AnimationStage } from './animation';
|
|
6
6
|
import type { PaletteOptions } from './palette';
|
|
@@ -15,19 +15,23 @@ export interface EdgeOptions {
|
|
|
15
15
|
*
|
|
16
16
|
* <en/> Edge type
|
|
17
17
|
*/
|
|
18
|
-
type?: string | ((datum: EdgeData) => string);
|
|
18
|
+
type?: string | ((this: Graph, datum: EdgeData) => string);
|
|
19
19
|
/**
|
|
20
20
|
* <zh/> 边样式
|
|
21
21
|
*
|
|
22
22
|
* <en/> Edge style
|
|
23
23
|
*/
|
|
24
|
-
style?:
|
|
24
|
+
style?: EdgeStyle | ((this: Graph, data: EdgeData) => EdgeStyle) | {
|
|
25
|
+
[K in keyof EdgeStyle]: EdgeStyle[K] | ((this: Graph, data: EdgeData) => EdgeStyle[K]);
|
|
26
|
+
};
|
|
25
27
|
/**
|
|
26
28
|
* <zh/> 边状态样式
|
|
27
29
|
*
|
|
28
30
|
* <en/> Edge state style
|
|
29
31
|
*/
|
|
30
|
-
state?: Record<string,
|
|
32
|
+
state?: Record<string, EdgeStyle | ((this: Graph, data: EdgeData) => EdgeStyle) | {
|
|
33
|
+
[K in keyof EdgeStyle]: EdgeStyle[K] | ((this: Graph, data: EdgeData) => EdgeStyle[K]);
|
|
34
|
+
}>;
|
|
31
35
|
/**
|
|
32
36
|
* <zh/> 边动画
|
|
33
37
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnimationOptions } from '../../animations/types';
|
|
2
2
|
import type { BaseNodeStyleProps } from '../../elements/nodes';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Graph } from '../../runtime/graph';
|
|
4
4
|
import type { NodeData } from '../data';
|
|
5
5
|
import type { AnimationStage } from './animation';
|
|
6
6
|
import type { PaletteOptions } from './palette';
|
|
@@ -15,19 +15,23 @@ export interface NodeOptions {
|
|
|
15
15
|
*
|
|
16
16
|
* <en/> Node type
|
|
17
17
|
*/
|
|
18
|
-
type?: string | ((datum: NodeData) => string);
|
|
18
|
+
type?: string | ((this: Graph, datum: NodeData) => string);
|
|
19
19
|
/**
|
|
20
20
|
* <zh/> 节点样式
|
|
21
21
|
*
|
|
22
22
|
* <en/> Node style
|
|
23
23
|
*/
|
|
24
|
-
style?:
|
|
24
|
+
style?: NodeStyle | ((this: Graph, data: NodeData) => NodeStyle) | {
|
|
25
|
+
[K in keyof NodeStyle]: NodeStyle[K] | ((this: Graph, data: NodeData) => NodeStyle[K]);
|
|
26
|
+
};
|
|
25
27
|
/**
|
|
26
28
|
* <zh/> 节点状态样式
|
|
27
29
|
*
|
|
28
30
|
* <en/> Node state style
|
|
29
31
|
*/
|
|
30
|
-
state?: Record<string,
|
|
32
|
+
state?: Record<string, NodeStyle | ((this: Graph, data: NodeData) => NodeStyle) | {
|
|
33
|
+
[K in keyof NodeStyle]: NodeStyle[K] | ((this: Graph, data: NodeData) => NodeStyle[K]);
|
|
34
|
+
}>;
|
|
31
35
|
/**
|
|
32
36
|
* <zh/> 节点动画
|
|
33
37
|
*
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type PluginOptions = ExtensionOptions<BuiltInPluginOptions>;
|
|
1
|
+
import type { Graph } from '../runtime/graph';
|
|
2
|
+
export type PluginOptions = (string | CustomPluginOption | ((this: Graph) => CustomPluginOption))[];
|
|
4
3
|
export interface UpdatePluginOption {
|
|
5
4
|
key: string;
|
|
6
|
-
[key: string]:
|
|
5
|
+
[key: string]: unknown;
|
|
7
6
|
}
|
|
8
7
|
export interface CustomPluginOption extends Record<string, any> {
|
|
9
8
|
/**
|
|
@@ -11,7 +10,7 @@ export interface CustomPluginOption extends Record<string, any> {
|
|
|
11
10
|
*
|
|
12
11
|
* <en/> Plugin type
|
|
13
12
|
*/
|
|
14
|
-
type
|
|
13
|
+
type: string;
|
|
15
14
|
/**
|
|
16
15
|
* <zh/> 插件 key,即唯一标识
|
|
17
16
|
*
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type TransformOptions = ExtensionOptions<BuiltInTransformOptions>;
|
|
1
|
+
import type { Graph } from '../runtime/graph';
|
|
2
|
+
export type TransformOptions = (string | CustomTransformOption | ((this: Graph) => CustomTransformOption))[];
|
|
4
3
|
export interface UpdateTransformOption {
|
|
5
4
|
key: string;
|
|
6
|
-
[key: string]:
|
|
5
|
+
[key: string]: unknown;
|
|
7
6
|
}
|
|
8
7
|
export interface CustomTransformOption {
|
|
9
|
-
type
|
|
8
|
+
type: string;
|
|
10
9
|
key?: string;
|
|
11
|
-
[key: string]:
|
|
10
|
+
[key: string]: unknown;
|
|
12
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComboData, EdgeData, NodeData } from '../spec';
|
|
2
2
|
import type { ID } from '../types';
|
|
3
|
-
import type { BaseTransform
|
|
4
|
-
export type BuiltInTransformOptions = BaseTransformOptions;
|
|
3
|
+
import type { BaseTransform } from './base-transform';
|
|
5
4
|
export type Transform = BaseTransform<any>;
|
|
6
5
|
/**
|
|
7
6
|
* <zh/> 在 Element Controller 中,为了提高查询性能,统一使用 Map 存储数据
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Graph } from '../runtime/graph';
|
|
1
2
|
import type { ElementDatum } from './data';
|
|
2
3
|
/**
|
|
3
4
|
* <zh/> 样式计算迭代上下文
|
|
@@ -6,4 +7,5 @@ import type { ElementDatum } from './data';
|
|
|
6
7
|
*/
|
|
7
8
|
export type StyleIterationContext = {
|
|
8
9
|
datum: ElementDatum;
|
|
10
|
+
graph: Graph;
|
|
9
11
|
};
|
|
@@ -6,14 +6,14 @@ export declare class BaseEvent {
|
|
|
6
6
|
constructor(type: string);
|
|
7
7
|
}
|
|
8
8
|
export declare class GraphLifeCycleEvent extends BaseEvent implements IGraphLifeCycleEvent {
|
|
9
|
-
data?: any;
|
|
10
|
-
constructor(type: GraphEvent.BEFORE_RENDER | GraphEvent.AFTER_RENDER | GraphEvent.BEFORE_DRAW | GraphEvent.AFTER_DRAW | GraphEvent.BEFORE_LAYOUT | GraphEvent.AFTER_LAYOUT | GraphEvent.BEFORE_SIZE_CHANGE | GraphEvent.AFTER_SIZE_CHANGE | GraphEvent.BATCH_START | GraphEvent.BATCH_END | GraphEvent.BEFORE_DESTROY | GraphEvent.AFTER_DESTROY, data?: any);
|
|
9
|
+
data?: any | undefined;
|
|
10
|
+
constructor(type: GraphEvent.BEFORE_RENDER | GraphEvent.AFTER_RENDER | GraphEvent.BEFORE_DRAW | GraphEvent.AFTER_DRAW | GraphEvent.BEFORE_LAYOUT | GraphEvent.AFTER_LAYOUT | GraphEvent.BEFORE_SIZE_CHANGE | GraphEvent.AFTER_SIZE_CHANGE | GraphEvent.BATCH_START | GraphEvent.BATCH_END | GraphEvent.BEFORE_DESTROY | GraphEvent.AFTER_DESTROY, data?: any | undefined);
|
|
11
11
|
}
|
|
12
12
|
export declare class AnimateEvent extends BaseEvent implements IAnimateEvent {
|
|
13
13
|
animationType: AnimationType;
|
|
14
14
|
animation: IAnimation | null;
|
|
15
|
-
data?: any;
|
|
16
|
-
constructor(type: GraphEvent.BEFORE_ANIMATE | GraphEvent.AFTER_ANIMATE, animationType: AnimationType, animation: IAnimation | null, data?: any);
|
|
15
|
+
data?: any | undefined;
|
|
16
|
+
constructor(type: GraphEvent.BEFORE_ANIMATE | GraphEvent.AFTER_ANIMATE, animationType: AnimationType, animation: IAnimation | null, data?: any | undefined);
|
|
17
17
|
}
|
|
18
18
|
export declare class ElementLifeCycleEvent extends BaseEvent implements IElementLifeCycleEvent {
|
|
19
19
|
elementType: ElementType;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { STDExtensionOption } from '../registry/extension/types';
|
|
2
|
+
import type { Graph } from '../runtime/graph';
|
|
3
|
+
import type { TransformOptions } from '../spec/transform';
|
|
2
4
|
/**
|
|
3
5
|
* <zh/> 将模块配置项转换为标准模块格式
|
|
4
6
|
*
|
|
5
7
|
* <en/> Convert extension options to standard format
|
|
8
|
+
* @param graph - <zh/> 图实例 <en/> graph instance
|
|
6
9
|
* @param category - <zh/> 模块类型 <en/> extension type
|
|
7
10
|
* @param extensions - <zh/> 模块配置项 <en/> extension options
|
|
8
11
|
* @returns <zh/> 标准模块配置项 <en/> Standard extension options
|
|
9
12
|
*/
|
|
10
|
-
export declare function parseExtensions(category: string, extensions:
|
|
13
|
+
export declare function parseExtensions(graph: Graph, category: string, extensions: TransformOptions): STDExtensionOption[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DisplayObjectConfig } from '@antv/g';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Graph } from '../runtime/graph';
|
|
3
|
+
import type { ElementDatum, StyleIterationContext } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* <zh/> 计算支持回调的动态样式
|
|
5
6
|
*
|
|
@@ -8,7 +9,9 @@ import type { CallableObject, ElementDatum, StyleIterationContext } from '../typ
|
|
|
8
9
|
* @param context - <zh/> 样式计算迭代上下文 | <en/> style iteration context
|
|
9
10
|
* @returns <zh/> 静态样式 | <en/> static style
|
|
10
11
|
*/
|
|
11
|
-
export declare function computeElementCallbackStyle(callableStyle:
|
|
12
|
+
export declare function computeElementCallbackStyle(callableStyle: Record<string, unknown> | ((this: Graph, datum: ElementDatum) => Record<string, unknown>) | {
|
|
13
|
+
[key: string]: (this: Graph, datum: ElementDatum) => unknown;
|
|
14
|
+
}, context: StyleIterationContext): {
|
|
12
15
|
[k: string]: any;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
@@ -21,4 +21,4 @@ export declare function replaceTranslateInTransform(x: number, y: number, z: num
|
|
|
21
21
|
* @param datum - <zh>数据 | <en>data
|
|
22
22
|
* @param merge - <zh>是否合并 | <en>whether to merge
|
|
23
23
|
*/
|
|
24
|
-
export declare const reassignTo: (input: DrawData, type:
|
|
24
|
+
export declare const reassignTo: (input: DrawData, type: "add" | "update" | "remove", elementType: ElementType, datum: ElementDatum, merge?: boolean) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "5.0.4";
|
|
@@ -2,5 +2,5 @@ import { BaseExtension } from '../registry/extension';
|
|
|
2
2
|
import type { CustomBehaviorOption } from '../spec/behavior';
|
|
3
3
|
export interface BaseBehaviorOptions extends CustomBehaviorOption {
|
|
4
4
|
}
|
|
5
|
-
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions> extends BaseExtension<T> {
|
|
5
|
+
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions = BaseBehaviorOptions> extends BaseExtension<T> {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-behavior.js","sourceRoot":"src/","sources":["behaviors/base-behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKtD,MAAM,OAAgB,
|
|
1
|
+
{"version":3,"file":"base-behavior.js","sourceRoot":"src/","sources":["behaviors/base-behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKtD,MAAM,OAAgB,YAAkE,SAAQ,aAAgB;CAAG"}
|
|
@@ -59,7 +59,7 @@ export interface ScrollCanvasOptions extends BaseBehaviorOptions {
|
|
|
59
59
|
* <en/> Scroll canvas behavior
|
|
60
60
|
*/
|
|
61
61
|
export declare class ScrollCanvas extends BaseBehavior<ScrollCanvasOptions> {
|
|
62
|
-
static defaultOptions: ScrollCanvasOptions
|
|
62
|
+
static defaultOptions: Partial<ScrollCanvasOptions>;
|
|
63
63
|
private shortcut;
|
|
64
64
|
constructor(context: RuntimeContext, options: ScrollCanvasOptions);
|
|
65
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-canvas.js","sourceRoot":"src/","sources":["behaviors/scroll-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAe,MAAM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C;QAEjC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAChC,IAAI,UAAU,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,CAAC,MAAM,CAAC;IAClB,CAAC;IACD;;;;OAIG;IACI,OAAO;QACZ,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACpE,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC"}
|
package/esm/behaviors/types.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import type { BaseBehavior } from './base-behavior';
|
|
2
|
-
import type { DragCanvasOptions } from './drag-canvas';
|
|
3
|
-
import type { ScrollCanvasOptions } from './scroll-canvas';
|
|
4
|
-
import type { ZoomCanvasOptions } from './zoom-canvas';
|
|
5
|
-
export type BuiltInBehaviorOptions = DragCanvasOptions | ZoomCanvasOptions | ScrollCanvasOptions;
|
|
6
2
|
export type Behavior = BaseBehavior<any>;
|
|
@@ -77,7 +77,7 @@ export declare class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
|
|
|
77
77
|
* @param event - <zh/> 事件对象 | <en/> Event object
|
|
78
78
|
* @param animation - <zh/> 缩放动画配置 | <en/> Zoom animation configuration
|
|
79
79
|
*/
|
|
80
|
-
protected zoom: (value: number, event: IWheelEvent | IKeyboardEvent, animation: ZoomCanvasOptions[
|
|
80
|
+
protected zoom: (value: number, event: IWheelEvent | IKeyboardEvent, animation: ZoomCanvasOptions["animation"]) => Promise<void>;
|
|
81
81
|
protected onReset: () => Promise<void>;
|
|
82
82
|
/**
|
|
83
83
|
* <zh/> 验证是否可以缩放
|
|
@@ -20,7 +20,7 @@ export interface BadgeStyleProps extends LabelStyleProps {
|
|
|
20
20
|
export declare class Badge extends BaseShape<BadgeStyleProps> {
|
|
21
21
|
static defaultStyleProps: Partial<BadgeStyleProps>;
|
|
22
22
|
constructor(options: DisplayObjectConfig<BadgeStyleProps>);
|
|
23
|
-
protected getBadgeStyle(attributes: Required<BadgeStyleProps>): Omit<Required<BadgeStyleProps>, "x" | "y" | "z" | "
|
|
23
|
+
protected getBadgeStyle(attributes: Required<BadgeStyleProps>): Omit<Required<BadgeStyleProps>, "x" | "y" | "z" | "class" | "transform" | "transformOrigin" | "zIndex" | "context" | "className">;
|
|
24
24
|
render(attributes?: Required<BadgeStyleProps>, container?: Group): void;
|
|
25
25
|
getGeometryBounds(): import("@antv/g").AABB;
|
|
26
26
|
}
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAElB,cAAc,WAAW,CAAC;AAE1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAElB,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,iDAAiD;IACtD,EAAE,EAAE,gDAAgD;CACrD,CAAC"}
|
package/esm/layouts/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="src/layouts/hierarchy" />
|
|
2
1
|
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
|
|
3
2
|
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
|
|
4
3
|
export { BaseLayout } from './base-layout';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-setting.js","sourceRoot":"src/","sources":["plugins/camera-setting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4F3C;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAgC;IACjE,YAAY,OAAuB,EAAE,OAA6B;QAChE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,OAAsC;QAClD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACzB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvF,CAAC;IAEO,UAAU,GAAG,CAAC,OAAsC,EAAE,EAAE;QAC9D,MAAM,MAAM,GAAG;YACb,UAAU,EAAE,SAAS;YACrB,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;YACb,MAAM,EAAE,WAAW;YACnB,+CAA+C;YAC/C,8DAA8D;YAC9D,cAAc,EAAE,mBAAmB;YACnC,QAAQ,EAAE,aAAa;YACvB,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,cAAc;YACzB,OAAO,EAAE,YAAY;SACb,CAAC;QAEX,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"camera-setting.js","sourceRoot":"src/","sources":["plugins/camera-setting.ts"],"names":[],"mappings":"A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