@antv/gpt-vis 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +75 -12
  2. package/README.zh-CN.md +73 -12
  3. package/dist/cjs/ConfigProvider/hooks/useConfig.js +2 -1
  4. package/dist/cjs/FishboneDiagram/index.d.ts +6 -0
  5. package/dist/cjs/FishboneDiagram/index.js +49 -0
  6. package/dist/cjs/GPTVis/Lite.d.ts +10 -0
  7. package/dist/cjs/GPTVis/Lite.js +54 -0
  8. package/dist/cjs/GPTVis/index.d.ts +2 -6
  9. package/dist/cjs/GPTVis/index.js +3 -12
  10. package/dist/cjs/Text/VisText.js +7 -1
  11. package/dist/cjs/Text/config.js +14 -14
  12. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +2 -2
  13. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +3 -3
  14. package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +2 -2
  15. package/dist/cjs/Text/mini-charts/line/useLineCompute.js +2 -2
  16. package/dist/cjs/Text/mini-charts/proportion/index.js +2 -3
  17. package/dist/cjs/Text/theme.d.ts +24 -0
  18. package/dist/cjs/Text/{constants.js → theme.js} +25 -10
  19. package/dist/cjs/Text/utils/getThemeColor.d.ts +11 -0
  20. package/dist/cjs/Text/utils/getThemeColor.js +46 -0
  21. package/dist/cjs/Text/utils/index.d.ts +2 -0
  22. package/dist/cjs/Text/utils/index.js +25 -0
  23. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +2 -0
  24. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +40 -0
  25. package/dist/cjs/export.d.ts +11 -7
  26. package/dist/cjs/export.js +11 -10
  27. package/dist/cjs/index.d.ts +7 -2
  28. package/dist/cjs/index.js +8 -2
  29. package/dist/cjs/types/chart.d.ts +3 -2
  30. package/dist/cjs/types/chart.js +3 -2
  31. package/dist/cjs/types/config.d.ts +5 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/ConfigProvider/hooks/useConfig.js +4 -2
  35. package/dist/esm/FishboneDiagram/index.d.ts +6 -0
  36. package/dist/esm/FishboneDiagram/index.js +23 -0
  37. package/dist/esm/GPTVis/Lite.d.ts +10 -0
  38. package/dist/esm/GPTVis/Lite.js +18 -0
  39. package/dist/esm/GPTVis/index.d.ts +2 -6
  40. package/dist/esm/GPTVis/index.js +4 -8
  41. package/dist/esm/Text/VisText.js +12 -1
  42. package/dist/esm/Text/config.js +14 -14
  43. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +1 -1
  44. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +1 -1
  45. package/dist/esm/Text/mini-charts/line/SingleLineChart.js +3 -3
  46. package/dist/esm/Text/mini-charts/line/useLineCompute.js +1 -1
  47. package/dist/esm/Text/mini-charts/proportion/index.js +4 -5
  48. package/dist/esm/Text/theme.d.ts +24 -0
  49. package/dist/esm/Text/theme.js +24 -0
  50. package/dist/esm/Text/utils/getThemeColor.d.ts +11 -0
  51. package/dist/esm/Text/utils/getThemeColor.js +29 -0
  52. package/dist/esm/Text/utils/index.d.ts +2 -0
  53. package/dist/esm/Text/utils/index.js +2 -0
  54. package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +2 -0
  55. package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +13 -0
  56. package/dist/esm/export.d.ts +11 -7
  57. package/dist/esm/export.js +17 -9
  58. package/dist/esm/index.d.ts +7 -2
  59. package/dist/esm/index.js +9 -2
  60. package/dist/esm/types/chart.d.ts +3 -2
  61. package/dist/esm/types/chart.js +3 -2
  62. package/dist/esm/types/config.d.ts +5 -0
  63. package/dist/esm/version.d.ts +1 -1
  64. package/dist/esm/version.js +1 -1
  65. package/dist/umd/558.async.js +1 -0
  66. package/dist/umd/index.min.js +1 -1
  67. package/package.json +2 -2
  68. package/dist/cjs/Text/constants.d.ts +0 -9
  69. package/dist/esm/Text/constants.d.ts +0 -9
  70. package/dist/esm/Text/constants.js +0 -9
  71. package/dist/umd/861.async.js +0 -1
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  var _excluded = ["children"];
5
5
  import React, { useLayoutEffect, useRef, useState } from 'react';
6
- import { TEXT_THEME } from "../../constants";
6
+ import { TEXT_THEME } from "../../theme";
7
7
  import { getElementFontSize } from "./getElementFontSize";
8
8
  export var useSvgWrapper = function useSvgWrapper() {
9
9
  var ele = useRef(null);
@@ -1,10 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import { isArray, isString, size } from 'lodash';
3
3
  import React, { useMemo } from 'react';
4
+ import { TEXT_THEME } from "../../theme";
4
5
  import { useSvgWrapper } from "../hooks";
5
6
  import { useLineCompute } from "./useLineCompute";
6
7
  var LINEAR_FILL_COLOR_ID = 'wsc-line-fill';
7
- var LINE_STROKE_COLOR = '#5B8FF9';
8
8
  function getLineChartData(origin) {
9
9
  if (isArray(origin)) return origin;
10
10
  if (isString(origin)) {
@@ -40,7 +40,7 @@ export var SingleLineChart = function SingleLineChart(_ref) {
40
40
  y2: "122.389541%",
41
41
  id: LINEAR_FILL_COLOR_ID
42
42
  }, /*#__PURE__*/React.createElement("stop", {
43
- stopColor: LINE_STROKE_COLOR,
43
+ stopColor: TEXT_THEME.chart.lineStrokeColor,
44
44
  offset: "0%"
45
45
  }), /*#__PURE__*/React.createElement("stop", {
46
46
  stopColor: "#FFFFFF",
@@ -48,7 +48,7 @@ export var SingleLineChart = function SingleLineChart(_ref) {
48
48
  offset: "100%"
49
49
  }))), linePath && /*#__PURE__*/React.createElement("path", {
50
50
  d: linePath,
51
- stroke: LINE_STROKE_COLOR,
51
+ stroke: TEXT_THEME.chart.lineStrokeColor,
52
52
  fill: "transparent"
53
53
  }), polygonPath && /*#__PURE__*/React.createElement("polygon", {
54
54
  points: polygonPath,
@@ -4,7 +4,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/esm/createClass";
5
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import { useEffect, useState } from 'react';
7
- import { TEXT_THEME } from "../../constants";
7
+ import { TEXT_THEME } from "../../theme";
8
8
  import { scaleLinear } from "./scaleLinear";
9
9
 
10
10
  // adjust to draw line width
@@ -1,10 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import { isNaN, isString, toNumber } from 'lodash';
3
3
  import React, { useMemo } from 'react';
4
+ import { TEXT_THEME } from "../../theme";
4
5
  import { useSvgWrapper } from "../hooks/useSvgWrapper";
5
6
  import { getArcPath } from "./getArcPath";
6
- var SHADOW_COLOR = '#CDDDFD';
7
- var FILL_COLOR = '#3471F9';
8
7
  function getProportionNumber(children,
9
8
  // markdown 中传入的 children 文本为 string[]
10
9
  origin) {
@@ -47,14 +46,14 @@ export var ProportionChart = function ProportionChart(_ref) {
47
46
  cx: r,
48
47
  cy: r,
49
48
  r: r,
50
- fill: SHADOW_COLOR
49
+ fill: TEXT_THEME.chart.proportionShadowColor
51
50
  }), data >= 1 ? /*#__PURE__*/React.createElement("circle", {
52
51
  cx: r,
53
52
  cy: r,
54
53
  r: r,
55
- fill: FILL_COLOR
54
+ fill: TEXT_THEME.chart.proportionFillColor
56
55
  }) : /*#__PURE__*/React.createElement("path", {
57
56
  d: getArcPath(fontSize, data),
58
- fill: FILL_COLOR
57
+ fill: TEXT_THEME.chart.proportionFillColor
59
58
  }));
60
59
  };
@@ -0,0 +1,24 @@
1
+ export declare const TEXT_THEME: {
2
+ fontSizeBase: number;
3
+ chart: {
4
+ proportionShadowColor: string;
5
+ proportionFillColor: string;
6
+ lineStrokeColor: string;
7
+ };
8
+ light: {
9
+ primaryColor: string;
10
+ default88Color: string;
11
+ default65Color: string;
12
+ posColor: string;
13
+ negColor: string;
14
+ conclusionColor: string;
15
+ };
16
+ dark: {
17
+ primaryColor: string;
18
+ default88Color: string;
19
+ default65Color: string;
20
+ posColor: string;
21
+ negColor: string;
22
+ conclusionColor: string;
23
+ };
24
+ };
@@ -0,0 +1,24 @@
1
+ export var TEXT_THEME = {
2
+ fontSizeBase: 14,
3
+ chart: {
4
+ proportionShadowColor: '#CDDDFD',
5
+ proportionFillColor: '#3471F9',
6
+ lineStrokeColor: '#5B8FF9'
7
+ },
8
+ light: {
9
+ primaryColor: '#1677FF',
10
+ default88Color: 'rgba(0, 0, 0, 0.88)',
11
+ default65Color: 'rgba(0, 0, 0, 0.65)',
12
+ posColor: '#FA541C',
13
+ negColor: '#13A8A8',
14
+ conclusionColor: '#1F0352'
15
+ },
16
+ dark: {
17
+ primaryColor: '#4B91FF',
18
+ default88Color: 'rgba(255, 255, 255, 0.88)',
19
+ default65Color: 'rgba(255, 255, 255, 0.65)',
20
+ posColor: '#FA541C',
21
+ negColor: '#13A8A8',
22
+ conclusionColor: '#D8C3F3'
23
+ }
24
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 自动适配暗黑模式
3
+ * @params type 类型
4
+ * @params color 当前颜色
5
+ * @params theme 当前主题
6
+ */
7
+ export declare const getThemeColor: ({ type, color, theme, }: {
8
+ type?: string | undefined;
9
+ color: string | undefined;
10
+ theme: 'dark' | 'light';
11
+ }) => string | undefined;
@@ -0,0 +1,29 @@
1
+ import { findKey, get } from 'lodash';
2
+ import { DEFAULT_VIS_TEXT_CONFIG } from "../config";
3
+ import { TEXT_THEME } from "../theme";
4
+
5
+ /**
6
+ * 自动适配暗黑模式
7
+ * @params type 类型
8
+ * @params color 当前颜色
9
+ * @params theme 当前主题
10
+ */
11
+ export var getThemeColor = function getThemeColor(_ref) {
12
+ var type = _ref.type,
13
+ color = _ref.color,
14
+ theme = _ref.theme;
15
+ // 仅暗黑主题才处理
16
+ if (type && color && theme === 'dark') {
17
+ var defaultLightColor = get(DEFAULT_VIS_TEXT_CONFIG, [type, 'color']);
18
+ // 仅当前颜色为默认的浅色主题时才处理
19
+ if (color === defaultLightColor) {
20
+ // 找到浅色主题的 token
21
+ var token = findKey(TEXT_THEME.light, function (i) {
22
+ return i === color;
23
+ });
24
+ // 返回暗黑主题的对应 token 的颜色
25
+ if (token) return TEXT_THEME.dark[token];
26
+ }
27
+ }
28
+ return color;
29
+ };
@@ -0,0 +1,2 @@
1
+ export * from './getThemeColor';
2
+ export * from './useAntdDarkAlgorithm';
@@ -0,0 +1,2 @@
1
+ export * from "./getThemeColor";
2
+ export * from "./useAntdDarkAlgorithm";
@@ -0,0 +1,2 @@
1
+ /** 判断是否运用了 antd dark algorithm */
2
+ export declare const useAntdDarkAlgorithm: () => boolean;
@@ -0,0 +1,13 @@
1
+ import { ConfigProvider, theme as antdTheme } from 'antd';
2
+ import { isArray } from 'lodash';
3
+ import { useContext } from 'react';
4
+ var darkAlgorithm = antdTheme.darkAlgorithm;
5
+
6
+ /** 判断是否运用了 antd dark algorithm */
7
+ export var useAntdDarkAlgorithm = function useAntdDarkAlgorithm() {
8
+ var _config$theme;
9
+ var config = useContext(ConfigProvider.ConfigContext);
10
+ var currentAlgorithm = (_config$theme = config.theme) === null || _config$theme === void 0 ? void 0 : _config$theme.algorithm;
11
+ if (isArray(currentAlgorithm) && currentAlgorithm.includes(darkAlgorithm)) return true;
12
+ return currentAlgorithm === darkAlgorithm;
13
+ };
@@ -1,25 +1,29 @@
1
1
  /// <reference types="react" />
2
+ /********** plot chart **********/
2
3
  import { default as Area, type AreaProps } from './Area';
3
4
  import { default as Bar, type BarProps } from './Bar';
4
5
  import { default as Column, type ColumnProps } from './Column';
5
6
  import { default as DualAxes, type DualAxesProps } from './DualAxes';
6
- import { default as FlowDiagram, type FlowDiagramProps } from './FlowDiagram';
7
7
  import { default as HeatMap, type HeatMapProps } from './HeatMap';
8
8
  import { default as Histogram, type HistogramProps } from './Histogram';
9
9
  import { default as Line, type LineProps } from './Line';
10
- import { default as MindMap, type MindMapProps } from './MindMap';
11
- import { default as NetworkGraph, type NetworkGraphProps } from './NetworkGraph';
12
- import { default as PathMap, type PathMapProps } from './PathMap';
13
10
  import { default as Pie, type PieProps } from './Pie';
14
- import { default as PinMap, type PinMapProps } from './PinMap';
15
11
  import { default as Radar, type RadarProps } from './Radar';
16
12
  import { default as Scatter, type ScatterProps } from './Scatter';
17
13
  import { default as Treemap, type TreemapProps } from './Treemap';
18
14
  import { default as WordCloud, type WordCloudProps } from './WordCloud';
19
- export { default as ConfigProvider, type ConfigProviderProps } from './ConfigProvider';
15
+ /********** graph chart **********/
16
+ import { default as FishboneDiagram, type FishboneDiagramProps } from './FishboneDiagram';
17
+ import { default as FlowDiagram, type FlowDiagramProps } from './FlowDiagram';
18
+ import { default as MindMap, type MindMapProps } from './MindMap';
19
+ import { default as NetworkGraph, type NetworkGraphProps } from './NetworkGraph';
20
20
  export { default as IndentedTree, type IndentedTreeProps } from './IndentedTree';
21
21
  export { default as Map, type MapProps } from './Map';
22
22
  export { default as OrganizationChart, type OrganizationChartProps } from './OrganizationChart';
23
- export { Area, Bar, Column, DualAxes, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud, type AreaProps, type BarProps, type ColumnProps, type DualAxesProps, type FlowDiagramProps, type HeatMapProps, type HistogramProps, type LineProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type ScatterProps, type TreemapProps, type WordCloudProps, };
23
+ /********** map chart **********/
24
+ import { default as PathMap, type PathMapProps } from './PathMap';
25
+ import { default as PinMap, type PinMapProps } from './PinMap';
26
+ /********** NTV **********/
24
27
  export { VisText, type VisTextProps } from './Text';
28
+ export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud, type AreaProps, type BarProps, type ColumnProps, type DualAxesProps, type FishboneDiagramProps, type FlowDiagramProps, type HeatMapProps, type HistogramProps, type LineProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type ScatterProps, type TreemapProps, type WordCloudProps, };
25
29
  export declare const DEFAULT_CHART_COMPONENTS: Record<string, React.FC<any>>;
@@ -1,27 +1,35 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  var _DEFAULT_CHART_COMPON;
3
+ import { ChartType } from "./types";
4
+
5
+ /********** plot chart **********/
3
6
  import { default as Area } from "./Area";
4
7
  import { default as Bar } from "./Bar";
5
8
  import { default as Column } from "./Column";
6
9
  import { default as DualAxes } from "./DualAxes";
7
- import { default as FlowDiagram } from "./FlowDiagram";
8
10
  import { default as HeatMap } from "./HeatMap";
9
11
  import { default as Histogram } from "./Histogram";
10
12
  import { default as Line } from "./Line";
11
- import { default as MindMap } from "./MindMap";
12
- import { default as NetworkGraph } from "./NetworkGraph";
13
- import { default as PathMap } from "./PathMap";
14
13
  import { default as Pie } from "./Pie";
15
- import { default as PinMap } from "./PinMap";
16
14
  import { default as Radar } from "./Radar";
17
15
  import { default as Scatter } from "./Scatter";
18
16
  import { default as Treemap } from "./Treemap";
19
- import { ChartType } from "./types";
20
17
  import { default as WordCloud } from "./WordCloud";
21
- export { default as ConfigProvider } from "./ConfigProvider";
18
+
19
+ /********** graph chart **********/
20
+ import { default as FishboneDiagram } from "./FishboneDiagram";
21
+ import { default as FlowDiagram } from "./FlowDiagram";
22
+ import { default as MindMap } from "./MindMap";
23
+ import { default as NetworkGraph } from "./NetworkGraph";
22
24
  export { default as IndentedTree } from "./IndentedTree";
23
25
  export { default as Map } from "./Map";
24
26
  export { default as OrganizationChart } from "./OrganizationChart";
25
- export { Area, Bar, Column, DualAxes, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud };
27
+
28
+ /********** map chart **********/
29
+ import { default as PathMap } from "./PathMap";
30
+ import { default as PinMap } from "./PinMap";
31
+
32
+ /********** NTV **********/
26
33
  export { VisText } from "./Text";
27
- export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Line, Line), ChartType.Column, Column), ChartType.Pie, Pie), ChartType.Bar, Bar), ChartType.Area, Area), ChartType.Scatter, Scatter), ChartType.PinMap, PinMap), ChartType.PathMap, PathMap), ChartType.HeatMap, HeatMap), ChartType.MindMap, MindMap), _defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.FlowDiagram, FlowDiagram), ChartType.NetworkGraph, NetworkGraph));
34
+ export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud };
35
+ export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Line, Line), ChartType.Column, Column), ChartType.Pie, Pie), ChartType.Bar, Bar), ChartType.Area, Area), ChartType.Scatter, Scatter), ChartType.PinMap, PinMap), ChartType.PathMap, PathMap), ChartType.HeatMap, HeatMap), ChartType.MindMap, MindMap), _defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.FlowDiagram, FlowDiagram), ChartType.NetworkGraph, NetworkGraph), ChartType.FishboneDiagram, FishboneDiagram));
@@ -1,6 +1,11 @@
1
+ /********** export chart **********/
1
2
  export * from './export';
2
- export { default as version } from './version';
3
+ /********** export types **********/
4
+ export * from './types';
5
+ /********** export GPTVis **********/
3
6
  export { withChartCode, withDefaultChartCode } from './ChartCodeRender';
4
7
  export type { CodeBlockComponent, WithChartCodeOptions } from './ChartCodeRender/type';
8
+ export { default as ConfigProvider, type ConfigProviderProps } from './ConfigProvider';
5
9
  export { default as GPTVis, type GPTVisProps } from './GPTVis';
6
- export * from './types';
10
+ export { default as GPTVisLite, type GPTVisLiteProps } from './GPTVis/Lite';
11
+ export { default as version } from './version';
package/dist/esm/index.js CHANGED
@@ -1,5 +1,12 @@
1
+ /********** export chart **********/
1
2
  export * from "./export";
2
- export { default as version } from "./version";
3
+
4
+ /********** export types **********/
5
+ export * from "./types";
6
+
7
+ /********** export GPTVis **********/
3
8
  export { withChartCode, withDefaultChartCode } from "./ChartCodeRender";
9
+ export { default as ConfigProvider } from "./ConfigProvider";
4
10
  export { default as GPTVis } from "./GPTVis";
5
- export * from "./types";
11
+ export { default as GPTVisLite } from "./GPTVis/Lite";
12
+ export { default as version } from "./version";
@@ -18,10 +18,11 @@ export declare enum ChartType {
18
18
  PathMap = "path-map",
19
19
  HeatMap = "heat-map",
20
20
  MindMap = "mind-map",
21
- NetworkGraph = "network-graph",
21
+ FishboneDiagram = "fishbone-diagram",
22
22
  FlowDiagram = "flow-diagram",
23
- OrganizationChart = "organization-chart",
24
23
  IndentedTree = "indented-tree",
24
+ NetworkGraph = "network-graph",
25
+ OrganizationChart = "organization-chart",
25
26
  VisText = "vis-text"
26
27
  }
27
28
  export type Charts = keyof typeof ChartType;
@@ -14,10 +14,11 @@ export var ChartType = /*#__PURE__*/function (ChartType) {
14
14
  ChartType["PathMap"] = "path-map";
15
15
  ChartType["HeatMap"] = "heat-map";
16
16
  ChartType["MindMap"] = "mind-map";
17
- ChartType["NetworkGraph"] = "network-graph";
17
+ ChartType["FishboneDiagram"] = "fishbone-diagram";
18
18
  ChartType["FlowDiagram"] = "flow-diagram";
19
- ChartType["OrganizationChart"] = "organization-chart";
20
19
  ChartType["IndentedTree"] = "indented-tree";
20
+ ChartType["NetworkGraph"] = "network-graph";
21
+ ChartType["OrganizationChart"] = "organization-chart";
21
22
  ChartType["VisText"] = "vis-text";
22
23
  return ChartType;
23
24
  }({});
@@ -1,9 +1,13 @@
1
+ import type { GraphOptions as ADCGraphOptions } from '@ant-design/graphs';
1
2
  import type { G2 } from '@ant-design/plots';
2
3
  import type { Charts } from './chart';
3
4
  type PlotGlobalConfig = {
4
5
  theme?: G2.Theme;
5
6
  [key: string]: any;
6
7
  };
8
+ type GraphGlobalConfig = ADCGraphOptions & {
9
+ [key: string]: any;
10
+ };
7
11
  type MapGlobalConfig = {
8
12
  style?: 'normal' | 'light' | 'dark' | string;
9
13
  token?: string;
@@ -14,6 +18,7 @@ type MapGlobalConfig = {
14
18
  type ComponentsGlobalConfig = Partial<Record<Charts, Record<string, any>>>;
15
19
  export type GlobalConfig = {
16
20
  plot?: PlotGlobalConfig;
21
+ graph?: GraphGlobalConfig;
17
22
  map?: MapGlobalConfig;
18
23
  components?: ComponentsGlobalConfig;
19
24
  };
@@ -1,2 +1,2 @@
1
- declare const _default: "0.1.0";
1
+ declare const _default: "0.2.1";
2
2
  export default _default;
@@ -1 +1 @@
1
- export default '0.1.0';
1
+ export default '0.2.1';