@moxa/graph 3.0.0-beta.1 → 3.0.0-beta.11
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.md +615 -114
- package/assets/icon-sprite.svg +1 -1
- package/behaviors/click-select/index.d.ts.map +1 -1
- package/behaviors/drag-element/index.d.ts.map +1 -1
- package/behaviors/drill-down/drill-down-manager.d.ts +55 -0
- package/behaviors/drill-down/drill-down-manager.d.ts.map +1 -0
- package/behaviors/drill-down/index.d.ts +71 -0
- package/behaviors/drill-down/index.d.ts.map +1 -0
- package/behaviors/drill-down/models/index.d.ts +7 -0
- package/behaviors/drill-down/models/index.d.ts.map +1 -0
- package/behaviors/hover-activate/index.d.ts.map +1 -1
- package/components/edge-arrow/transforms/index.d.ts.map +1 -1
- package/components/edge-label/index.d.ts +4 -4
- package/components/edge-label/index.d.ts.map +1 -1
- package/components/edge-label/utils/style.d.ts.map +1 -1
- package/components/edge-line/index.d.ts.map +1 -1
- package/components/edge-polyline/index.d.ts.map +1 -1
- package/components/edge-quadratic/index.d.ts.map +1 -1
- package/components/group-device/index.d.ts +34 -0
- package/components/group-device/index.d.ts.map +1 -1
- package/components/group-device/models/index.d.ts +11 -1
- package/components/group-device/models/index.d.ts.map +1 -1
- package/components/group-device/transforms/index.d.ts.map +1 -1
- package/components/group-device/utils/style.d.ts.map +1 -1
- package/components/node-device/models/index.d.ts +2 -0
- package/components/node-device/models/index.d.ts.map +1 -1
- package/components/node-device/utils/style.d.ts.map +1 -1
- package/components/node-label/index.d.ts +1 -1
- package/components/node-label/index.d.ts.map +1 -1
- package/components/shared/transforms/edge-transform.d.ts.map +1 -1
- package/components/shared/transforms/group-transform.d.ts.map +1 -1
- package/components/shared/transforms/node-transform.d.ts.map +1 -1
- package/components/shared/utils/edge-utils/index.d.ts +1 -0
- package/components/shared/utils/edge-utils/index.d.ts.map +1 -1
- package/components/shared/utils/edge-utils/state-style.d.ts +24 -0
- package/components/shared/utils/edge-utils/state-style.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/style.d.ts +19 -1
- package/components/shared/utils/edge-utils/style.d.ts.map +1 -1
- package/components/shared/utils/group-utils/drill-icon.d.ts +10 -0
- package/components/shared/utils/group-utils/drill-icon.d.ts.map +1 -0
- package/components/shared/utils/group-utils/index.d.ts +3 -0
- package/components/shared/utils/group-utils/index.d.ts.map +1 -0
- package/components/shared/utils/group-utils/label-background.d.ts +10 -0
- package/components/shared/utils/group-utils/label-background.d.ts.map +1 -0
- package/components/shared/utils/index.d.ts +1 -0
- package/components/shared/utils/index.d.ts.map +1 -1
- package/components/shared/utils/node-utils/config.d.ts +27 -0
- package/components/shared/utils/node-utils/config.d.ts.map +1 -0
- package/components/shared/utils/node-utils/icon-style.d.ts.map +1 -1
- package/components/shared/utils/node-utils/index.d.ts +6 -5
- package/components/shared/utils/node-utils/index.d.ts.map +1 -1
- package/components/shared/utils/node-utils/label-background.d.ts.map +1 -1
- package/components/shared/utils/node-utils/offset.d.ts +2 -6
- package/components/shared/utils/node-utils/offset.d.ts.map +1 -1
- package/components/shared/utils/node-utils/state-styles.d.ts +64 -0
- package/components/shared/utils/node-utils/state-styles.d.ts.map +1 -0
- package/components/shared/utils/node-utils/status-style.d.ts.map +1 -1
- package/components/shared/utils/node-utils/text-style.d.ts.map +1 -1
- package/components/shared/utils/node-utils/theme.d.ts +1 -1
- package/components/shared/utils/node-utils/theme.d.ts.map +1 -1
- package/components/shared/utils/node-utils/title-style.d.ts.map +1 -1
- package/core/graph/graph.d.ts +218 -187
- package/core/graph/graph.d.ts.map +1 -1
- package/core/model/behavior.model.d.ts +6 -2
- package/core/model/behavior.model.d.ts.map +1 -1
- package/core/model/edge.model.d.ts +221 -0
- package/core/model/edge.model.d.ts.map +1 -1
- package/core/model/event.model.d.ts +7 -1
- package/core/model/event.model.d.ts.map +1 -1
- package/core/model/group.model.d.ts +57 -0
- package/core/model/group.model.d.ts.map +1 -1
- package/core/model/index.d.ts +1 -0
- package/core/model/index.d.ts.map +1 -1
- package/core/model/label.model.d.ts +2 -1
- package/core/model/label.model.d.ts.map +1 -1
- package/core/model/node.model.d.ts +106 -0
- package/core/model/node.model.d.ts.map +1 -1
- package/core/model/plugin.model.d.ts +6 -2
- package/core/model/plugin.model.d.ts.map +1 -1
- package/core/model/state.model.d.ts +1 -1
- package/core/model/state.model.d.ts.map +1 -1
- package/core/model/text.model.d.ts +5 -0
- package/core/model/text.model.d.ts.map +1 -0
- package/index.cjs +77 -77
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +19959 -18690
- package/layouts/grid/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugins/context-menu/index.d.ts +11 -1
- package/plugins/context-menu/index.d.ts.map +1 -1
- package/plugins/history/config/command-filter.d.ts +5 -0
- package/plugins/history/config/command-filter.d.ts.map +1 -0
- package/plugins/history/config/drill-integration.d.ts +7 -0
- package/plugins/history/config/drill-integration.d.ts.map +1 -0
- package/plugins/history/config/history-options.d.ts +4 -0
- package/plugins/history/config/history-options.d.ts.map +1 -0
- package/plugins/history/history.model.d.ts +5 -0
- package/plugins/history/history.model.d.ts.map +1 -0
- package/plugins/history/index.d.ts +8 -6
- package/plugins/history/index.d.ts.map +1 -1
- package/plugins/index.d.ts +10 -0
- package/plugins/index.d.ts.map +1 -0
- package/plugins/minimap/index.d.ts +3 -2
- package/plugins/minimap/index.d.ts.map +1 -1
- package/plugins/rich-tooltip/index.d.ts +11 -0
- package/plugins/rich-tooltip/index.d.ts.map +1 -0
- package/plugins/snapline/index.d.ts +130 -2
- package/plugins/snapline/index.d.ts.map +1 -1
- package/plugins/snapline/models/index.d.ts +1 -1
- package/plugins/snapline/models/index.d.ts.map +1 -1
- package/plugins/snapline/models/snapline-models.d.ts +61 -0
- package/plugins/snapline/models/snapline-models.d.ts.map +1 -0
- package/plugins/tooltip/index.d.ts +1 -2
- package/plugins/tooltip/index.d.ts.map +1 -1
- package/shared/transforms/behavior-transform.d.ts +1 -0
- package/shared/transforms/behavior-transform.d.ts.map +1 -1
- package/shared/transforms/graph-transform.d.ts.map +1 -1
- package/shared/transforms/plugin-transform.d.ts +5 -4
- package/shared/transforms/plugin-transform.d.ts.map +1 -1
- package/shared/utils/config-setter.d.ts +9 -0
- package/shared/utils/config-setter.d.ts.map +1 -0
- package/shared/utils/index.d.ts +3 -2
- package/shared/utils/index.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/layouts/grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,SAAS,OAAO,CAAC,gBAAgB,CAAC,KACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/layouts/grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,SAAS,OAAO,CAAC,gBAAgB,CAAC,KACjC,mBAmDF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { BasePluginOptions, Contextmenu, ContextmenuOptions } from '@antv/g6';
|
|
2
2
|
import { PluginFunction } from '../../core/model';
|
|
3
3
|
export type ContextMenu = Contextmenu;
|
|
4
|
-
export
|
|
4
|
+
export interface ContextMenuItem {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onClick?: (value: any, element: any) => void;
|
|
8
|
+
visible?: (element: any) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ContextMenuOptions = BasePluginOptions & {
|
|
11
|
+
items?: ContextMenuItem[];
|
|
12
|
+
trigger?: 'contextmenu' | 'click';
|
|
13
|
+
enable?: (e: any) => boolean;
|
|
14
|
+
};
|
|
5
15
|
export declare const getContextMenuOptions: PluginFunction<ContextMenuOptions, ContextmenuOptions>;
|
|
6
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/context-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/context-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AACtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;CACrC;AAED,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAChD,kBAAkB,EAClB,kBAAkB,CA8BnB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Command } from '@antv/g6';
|
|
2
|
+
/** Minimum position change (in pixels) to be recorded in history */
|
|
3
|
+
export declare const POSITION_THRESHOLD = 0.1;
|
|
4
|
+
export declare const shouldRecordCommand: (cmd: Command) => boolean;
|
|
5
|
+
//# sourceMappingURL=command-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-filter.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/history/config/command-filter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,OAAO,EAGR,MAAM,UAAU,CAAC;AAMlB,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAyCtC,eAAO,MAAM,mBAAmB,GAAI,KAAK,OAAO,KAAG,OAII,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Graph as G6Graph } from '@antv/g6';
|
|
2
|
+
/**
|
|
3
|
+
* Sets up history integration with drill-down behavior.
|
|
4
|
+
* Clears history on any drill navigation change (in/out/reset).
|
|
5
|
+
*/
|
|
6
|
+
export declare function setupHistoryDrillIntegration(g6Graph: G6Graph): () => void;
|
|
7
|
+
//# sourceMappingURL=drill-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drill-integration.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/history/config/drill-integration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAI5C;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,IAAI,CAuBzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-options.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/history/config/history-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAC5C,cAAc,EACd,cAAc,CAMd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.model.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/history/history.model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,cAAc,IAAI,gBAAgB,EACnC,MAAM,UAAU,CAAC;AAElB,cAAc;AACd,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* History Plugin
|
|
3
|
+
*
|
|
4
|
+
* Provides undo/redo functionality for graph operations.
|
|
5
|
+
*/
|
|
6
|
+
export { getHistoryOptions } from './config/history-options';
|
|
7
|
+
export { setupHistoryDrillIntegration } from './config/drill-integration';
|
|
8
|
+
export type { History, HistoryOptions } from './history.model';
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/history/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/history/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './context-menu';
|
|
2
|
+
export * from './element-toolbar';
|
|
3
|
+
export * from './fixed-toolbar';
|
|
4
|
+
export * from './graph-background';
|
|
5
|
+
export * from './history';
|
|
6
|
+
export * from './minimap';
|
|
7
|
+
export * from './rich-tooltip';
|
|
8
|
+
export * from './snapline';
|
|
9
|
+
export * from './tooltip';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../libs/graph/src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { BasePluginOptions, Minimap as G6Minimap
|
|
1
|
+
import { BasePluginOptions, Minimap as G6Minimap } from '@antv/g6';
|
|
2
2
|
import { Graph } from '../../core/graph';
|
|
3
3
|
import { PluginFunction } from '../../core/model';
|
|
4
4
|
export type Minimap = G6Minimap;
|
|
5
|
+
export type MinimapPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
5
6
|
export type MinimapOptions = BasePluginOptions & {
|
|
6
|
-
position?:
|
|
7
|
+
position?: MinimapPosition;
|
|
7
8
|
className?: string;
|
|
8
9
|
size?: [number, number];
|
|
9
10
|
offset?: [number, number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/minimap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/minimap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAGhC,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAC/C,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3B,CAAC;AAUF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAC5C,cAAc,EACd,cAAc,CAuBf,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,SAOxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BasePluginOptions, ContextmenuOptions, Tooltip as G6Tooltip, IElementEvent } from '@antv/g6';
|
|
2
|
+
import { ElementType, PluginFunction } from '../../core/model';
|
|
3
|
+
export type RichTooltip = G6Tooltip;
|
|
4
|
+
export type RichTooltipOptions = BasePluginOptions & {
|
|
5
|
+
enable?: boolean | ((event: IElementEvent) => boolean);
|
|
6
|
+
itemTypes?: ElementType[];
|
|
7
|
+
render?: (event: IElementEvent) => string | HTMLElement;
|
|
8
|
+
trigger?: 'hover' | 'click';
|
|
9
|
+
};
|
|
10
|
+
export declare const getRichTooltipOptions: PluginFunction<RichTooltipOptions, ContextmenuOptions>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/rich-tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,IAAI,SAAS,EACpB,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC;IACvD,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,MAAM,GAAG,WAAW,CAAC;IACxD,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAChD,kBAAkB,EAClB,kBAAkB,CA8DnB,CAAC"}
|
|
@@ -1,9 +1,137 @@
|
|
|
1
|
-
import { BasePluginOptions, Snapline as G6Snapline } from '@antv/g6';
|
|
1
|
+
import { BasePlugin, BasePluginOptions, Snapline as G6Snapline, RuntimeContext } from '@antv/g6';
|
|
2
2
|
import { PluginFunction } from '../../core/model';
|
|
3
|
+
import { ExtendedSnaplineOptions } from './models';
|
|
3
4
|
export type Snapline = G6Snapline;
|
|
4
5
|
export type SnaplineOptions = BasePluginOptions;
|
|
6
|
+
export * from './models';
|
|
7
|
+
/**
|
|
8
|
+
* Enhanced snapline plugin with node boundary alignment
|
|
9
|
+
*
|
|
10
|
+
* @description Provides visual alignment guides and auto-snap during node drag operations.
|
|
11
|
+
* Aligns nodes based on complete render bounds (including all visual elements).
|
|
12
|
+
* Supports six-point alignment: 4 edges + 2 centers.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const graph = new Graph({
|
|
17
|
+
* plugins: {
|
|
18
|
+
* snapline: {
|
|
19
|
+
* tolerance: 20,
|
|
20
|
+
* autoSnap: true,
|
|
21
|
+
* },
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @see {@link ExtendedSnaplineOptions} for configuration options
|
|
27
|
+
* @see {@link https://g6.antv.antgroup.com/en/api/plugins/snapline} G6 Snapline Plugin
|
|
28
|
+
*
|
|
29
|
+
* @since 3.1.0
|
|
30
|
+
*/
|
|
31
|
+
export declare class BoundarySnapline extends BasePlugin<ExtendedSnaplineOptions> {
|
|
32
|
+
static defaultOptions: Partial<ExtendedSnaplineOptions>;
|
|
33
|
+
private verticalLine?;
|
|
34
|
+
private horizontalLine?;
|
|
35
|
+
private verticalState;
|
|
36
|
+
private horizontalState;
|
|
37
|
+
constructor(context: RuntimeContext, options: ExtendedSnaplineOptions);
|
|
38
|
+
/**
|
|
39
|
+
* Initialize snapline visual elements on transient canvas layer
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
private initSnapline;
|
|
43
|
+
/**
|
|
44
|
+
* Get visible nodes within viewport for alignment calculation
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
private getNodes;
|
|
48
|
+
/**
|
|
49
|
+
* Hide alignment guide lines
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
private hideSnapline;
|
|
53
|
+
/**
|
|
54
|
+
* Get line width adjusted for current zoom level
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
private getLineWidth;
|
|
58
|
+
/**
|
|
59
|
+
* Update snapline visual elements based on alignment metadata
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
private updateSnapline;
|
|
63
|
+
/**
|
|
64
|
+
* Set snap timer with automatic cleanup
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
private setSnapTimer;
|
|
68
|
+
/**
|
|
69
|
+
* Reset snap state and clear timer
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
private resetSnapState;
|
|
73
|
+
/**
|
|
74
|
+
* Handle snap logic for a single axis
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
private handleSnapLogic;
|
|
78
|
+
/**
|
|
79
|
+
* Calculate snapline metadata based on node alignment
|
|
80
|
+
* @description Detects six-point alignment (4 edges + 2 centers)
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
private calcSnaplineMetadata;
|
|
84
|
+
/**
|
|
85
|
+
* Handle drag start event
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
private onDragStart;
|
|
89
|
+
/**
|
|
90
|
+
* Handle drag event
|
|
91
|
+
* @description Applies snap during drag if autoSnap is enabled
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
private onDrag;
|
|
95
|
+
/**
|
|
96
|
+
* Handle drag end event
|
|
97
|
+
* @description Hides snapline when drag ends and resets snap states
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
private onDragEnd;
|
|
101
|
+
/**
|
|
102
|
+
* Clear snap timers to prevent memory leaks
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
private clearSnapTimers;
|
|
106
|
+
/**
|
|
107
|
+
* Apply snap to alignment position during drag with timer-based auto-release
|
|
108
|
+
* @description Implements temporary snap behavior:
|
|
109
|
+
* - Snaps immediately when within tolerance (alignment guide appears)
|
|
110
|
+
* - Holds snap for snapDuration milliseconds (default 300ms)
|
|
111
|
+
* - Auto-releases after timeout to allow free movement
|
|
112
|
+
* - Disabled flag prevents re-snap after timeout until far from alignment
|
|
113
|
+
* - Both X and Y directions can snap independently with separate timers
|
|
114
|
+
* - Provides smooth dragging experience with helpful but non-sticky alignment
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
private applySnap;
|
|
118
|
+
/**
|
|
119
|
+
* Bind drag event listeners
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
private bindEvents;
|
|
123
|
+
/**
|
|
124
|
+
* Unbind drag event listeners
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
private unbindEvents;
|
|
128
|
+
/**
|
|
129
|
+
* Cleanup resources on plugin destruction
|
|
130
|
+
*/
|
|
131
|
+
destroy(): void;
|
|
132
|
+
}
|
|
5
133
|
/**
|
|
6
134
|
* @internal
|
|
7
135
|
*/
|
|
8
|
-
export declare const getSnaplineOptions: PluginFunction<
|
|
136
|
+
export declare const getSnaplineOptions: PluginFunction<ExtendedSnaplineOptions, ExtendedSnaplineOptions>;
|
|
9
137
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/snapline/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/snapline/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,iBAAiB,EAGjB,QAAQ,IAAI,UAAU,EAItB,cAAc,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAGhD,cAAc,UAAU,CAAC;AAkDzB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IACvE,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAKrD;IAEF,OAAO,CAAC,YAAY,CAAC,CAAO;IAC5B,OAAO,CAAC,cAAc,CAAC,CAAO;IAG9B,OAAO,CAAC,aAAa,CAInB;IACF,OAAO,CAAC,eAAe,CAIrB;gBAEU,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB;IAKrE;;;OAGG;IACH,OAAO,CAAC,YAAY;IAiCpB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IA4BhB;;;OAGG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAMpB;;;OAGG;IACH,OAAO,CAAC,cAAc;IA8CtB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAmBpB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAStB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAgDvB;;;;OAIG;IACH,OAAO,CAAC,oBAAoB,CA4F1B;IAEF;;;OAGG;IACH,OAAO,CAAC,WAAW,CAKjB;IAEF;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAaZ;IAEF;;;;OAIG;IACH,OAAO,CAAC,SAAS,CAKf;IAEF;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,SAAS;IA6EjB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAQlB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAQpB;;OAEG;IACM,OAAO,IAAI,IAAI;CAOzB;AAKD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAC7C,uBAAuB,EACvB,uBAAuB,CA0BxB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from './snapline-models';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/snapline/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/snapline/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BasePluginOptions, BaseStyleProps, Node } from '@antv/g6';
|
|
2
|
+
/**
|
|
3
|
+
* Alignment reference points on a node
|
|
4
|
+
* @since 3.1.0
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AlignmentPoint {
|
|
7
|
+
LEFT_EDGE = "left-edge",
|
|
8
|
+
RIGHT_EDGE = "right-edge",
|
|
9
|
+
TOP_EDGE = "top-edge",
|
|
10
|
+
BOTTOM_EDGE = "bottom-edge",
|
|
11
|
+
HORIZONTAL_CENTER = "horizontal-center",
|
|
12
|
+
VERTICAL_CENTER = "vertical-center"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Extended snapline options with boundary alignment toggle
|
|
16
|
+
* @since 3.1.0
|
|
17
|
+
*/
|
|
18
|
+
export interface ExtendedSnaplineOptions extends BasePluginOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Alignment accuracy in pixels
|
|
21
|
+
* @description Distance threshold for triggering alignment guides and auto-snap
|
|
22
|
+
* @default 20
|
|
23
|
+
*/
|
|
24
|
+
tolerance?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Extension distance for alignment guide lines
|
|
27
|
+
* @description How far guides extend beyond aligned nodes
|
|
28
|
+
* @default 20
|
|
29
|
+
*/
|
|
30
|
+
offset?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Enable automatic node snapping to alignment positions
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
autoSnap?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Vertical alignment guide visual style
|
|
38
|
+
* @default { stroke: '#FF5449', lineWidth: 1, lineDash: 5 }
|
|
39
|
+
*/
|
|
40
|
+
verticalLineStyle?: BaseStyleProps;
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal alignment guide visual style
|
|
43
|
+
* @default { stroke: '#FF5449', lineWidth: 1, lineDash: 5 }
|
|
44
|
+
*/
|
|
45
|
+
horizontalLineStyle?: BaseStyleProps;
|
|
46
|
+
/**
|
|
47
|
+
* Filter function to exclude nodes from alignment
|
|
48
|
+
* @default () => true (all nodes eligible)
|
|
49
|
+
*/
|
|
50
|
+
filter?: (node: Node) => boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Duration in milliseconds to hold snap before auto-releasing
|
|
53
|
+
* @description When a node snaps to an alignment, it will automatically
|
|
54
|
+
* release after this duration, allowing free movement for smooth dragging.
|
|
55
|
+
* Set to 0 to disable auto-release (continuous snap).
|
|
56
|
+
* @default 300
|
|
57
|
+
* @since 3.1.0
|
|
58
|
+
*/
|
|
59
|
+
snapDuration?: number;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=snapline-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapline-models.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/plugins/snapline/models/snapline-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEnE;;;GAGG;AACH,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC;IAEnC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,cAAc,CAAC;IAErC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IAEjC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -3,9 +3,8 @@ import { ElementType, PluginFunction } from '../../core/model';
|
|
|
3
3
|
export type Tooltip = G6Tooltip;
|
|
4
4
|
export type TooltipOptions = BasePluginOptions & {
|
|
5
5
|
enable?: boolean | ((event: IElementEvent) => boolean);
|
|
6
|
-
trigger?: ContextmenuOptions['trigger'];
|
|
7
6
|
itemTypes?: ElementType[];
|
|
8
|
-
|
|
7
|
+
content?: (event: IElementEvent) => string;
|
|
9
8
|
};
|
|
10
9
|
export declare const getTooltipOptions: PluginFunction<TooltipOptions, ContextmenuOptions>;
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,IAAI,SAAS,EACpB,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAC/C,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC;IACvD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,IAAI,SAAS,EACpB,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAC/C,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC;IACvD,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,MAAM,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAC5C,cAAc,EACd,kBAAkB,CA2DnB,CAAC"}
|
|
@@ -10,6 +10,7 @@ export declare const BEHAVIOR_FACTORIES: {
|
|
|
10
10
|
createEdge: import('../../core/model').BehaviorFunction<import('../../behaviors/create-edge').CreateEdgeOptions>;
|
|
11
11
|
dragCanvas: import('../../core/model').BehaviorFunction<import('../../behaviors/drag-canvas').DragCanvasOptions>;
|
|
12
12
|
dragElement: import('../../core/model').BehaviorFunction<import('../../behaviors/drag-element').DragElementOptions>;
|
|
13
|
+
drillDown: import('../../core/model').BehaviorFunction<import('../../behaviors/drill-down').DrillDownOptions>;
|
|
13
14
|
fixElementSize: import('../../core/model').BehaviorFunction<import('../../behaviors/fix-element-size').FixElementSizeOption>;
|
|
14
15
|
focusElement: import('../../core/model').BehaviorFunction<import('../../core/model').BehaviorBaseOptions>;
|
|
15
16
|
hoverActivate: import('../../core/model').BehaviorFunction<import('../../core/model').BehaviorBaseOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/behavior-transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"behavior-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/behavior-transform.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;CAc9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,YAAY,EACtB,WAAW,gBAAgB,KAC1B,GAYF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,YAAY,EAAE,EAC1B,UAAU,gBAAgB,KACzB,GAQF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,YAAY,EAAE,UAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GACpC,cAAc,QAAQ,EACtB,UAAU,GAAG,yFAId,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,cAAc,MAAM,EACpB,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,SAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,KAAG,OAE3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAAM,EAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,SAAS,cAAc,KACtB,YAAY,EAoEd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,GACxC,WAAW,GAAG,EAAE,KACf,cAgBF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/graph-transform.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,YAAY,EAEb,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/graph-transform.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,YAAY,EAEb,MAAM,UAAU,CAAC;AAQlB,OAAO,EAIL,WAAW,EAEZ,MAAM,aAAa,CAAC;AAWrB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,WAAW,EACnB,UAAU,gBAAgB,KACzB,YAgCF,CAAC;AA+HF;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAO,oBAa5C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,WAAW,EAAE,EACtB,UAAU,gBAAgB,KACzB,YAAY,EAEd,CAAC"}
|
|
@@ -14,13 +14,14 @@ export declare const DEFAULT_PLUGINS: Plugin[];
|
|
|
14
14
|
* Plugin factory mapping
|
|
15
15
|
*/
|
|
16
16
|
export declare const PLUGIN_FACTORIES: {
|
|
17
|
-
|
|
17
|
+
contextmenu: import('../../core/model').PluginFunction<import('../../plugins/context-menu').ContextMenuOptions, import('@antv/g6').ContextmenuOptions>;
|
|
18
18
|
elementToolbar: import('../../core/model').PluginFunction<import('../../plugins/element-toolbar').ElementToolbarOptions, import('../../plugins/element-toolbar').ElementToolbarOptions>;
|
|
19
19
|
fixedToolbar: import('../../core/model').PluginFunction<import('../../plugins/fixed-toolbar').FixedToolbarOptions, import('../../plugins/fixed-toolbar').FixedToolbarOptions>;
|
|
20
20
|
graphBackground: import('../../core/model').PluginFunction<import('../../plugins/graph-background').GraphBackgroundOptions, import('../../plugins/graph-background').GraphBackgroundOptions>;
|
|
21
|
-
history: import('../../core/model').PluginFunction<import('@antv/g6').
|
|
21
|
+
history: import('../../core/model').PluginFunction<import('@antv/g6').HistoryOptions, import('@antv/g6').HistoryOptions>;
|
|
22
22
|
minimap: import('../../core/model').PluginFunction<import('../../plugins/minimap').MinimapOptions, import('../../plugins/minimap').MinimapOptions>;
|
|
23
|
-
|
|
23
|
+
richTooltip: import('../../core/model').PluginFunction<import('../../plugins/rich-tooltip').RichTooltipOptions, import('@antv/g6').ContextmenuOptions>;
|
|
24
|
+
snapline: import('../../core/model').PluginFunction<import('../../plugins/snapline').ExtendedSnaplineOptions, import('../../plugins/snapline').ExtendedSnaplineOptions>;
|
|
24
25
|
tooltip: import('../../core/model').PluginFunction<import('../../plugins/tooltip').TooltipOptions, import('@antv/g6').ContextmenuOptions>;
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
@@ -34,7 +35,7 @@ export declare const transformPlugins: (plugins?: UserPlugin[], context?: Transf
|
|
|
34
35
|
/**
|
|
35
36
|
* Create custom plugin transformer
|
|
36
37
|
*/
|
|
37
|
-
export declare const createPluginTransformer: (pluginType: Plugin, graph?: any, options?: any) => import('@antv/g6').
|
|
38
|
+
export declare const createPluginTransformer: (pluginType: Plugin, graph?: any, options?: any) => import('@antv/g6').HistoryOptions | import('@antv/g6').ContextmenuOptions | import('../../plugins/element-toolbar').ElementToolbarOptions | import('../../plugins/fixed-toolbar').FixedToolbarOptions | import('../../plugins/graph-background').GraphBackgroundOptions | import('../../plugins/minimap').MinimapOptions | import('../../plugins/snapline').ExtendedSnaplineOptions | null;
|
|
38
39
|
/**
|
|
39
40
|
* Register custom plugin factory
|
|
40
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/plugin-transform.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin-transform.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/transforms/plugin-transform.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,MAAM,EACN,YAAY,EACZ,UAAU,EACX,MAAM,aAAa,CAAC;AAUrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB;;GAAsC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,eAAe,UAK3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;CAU5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,UAAU,EAClB,UAAU,gBAAgB,KACzB,GAYF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,UAAU,EAAE,EACtB,UAAU,gBAAgB,KACzB,GA0BF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,EAClB,QAAQ,GAAG,EACX,UAAU,GAAG,sWAId,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,MAAM,EAClB,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,GAAG,SAG7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,KAAG,OAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAAM,EAE7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,UAAU,KAAG,OAUzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,SAAS,YAAY,KACpB,UAAU,EA4CZ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS,GAAG,EAAE,KAAG,YAoB1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,EAAE,SAAS,UAAU,EAAE,UAE3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-setter.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/utils/config-setter.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C"}
|
package/shared/utils/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './config-setter';
|
|
1
3
|
export * from './device-node';
|
|
4
|
+
export * from './edge-labels';
|
|
2
5
|
export * from './five-nodes';
|
|
3
6
|
export * from './moxa-graph';
|
|
4
7
|
export * from './node-edge-group';
|
|
5
|
-
export * from './edge-labels';
|
|
6
|
-
export * from './components';
|
|
7
8
|
export * from './utils';
|
|
8
9
|
export declare const Demo: {
|
|
9
10
|
FIVE_NODES: import('../..').GraphData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/utils/index.ts"],"names":[],"mappings":"AAKA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/shared/utils/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,IAAI;;;;;CAKhB,CAAC"}
|