Skip to content

Commit

Permalink
chore: upgrade gui to component (#5615)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc authored Oct 8, 2023
1 parent c4c275d commit 296b50f
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@antv/g-canvas": "^1.11.5",
"@antv/g-plugin-3d": "^1.9.14",
"@antv/g-plugin-dragndrop": "^1.8.3",
"@antv/gui": "^0.5.0",
"@antv/component": "^1.0.0-beta.1",
"@antv/path-util": "^3.0.1",
"@antv/scale": "^0.4.7",
"@antv/util": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion site/docs/manual/extra-topics/bundle.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ chart.point3D();
目前是推出了按需打包的能力,但是可以发现效果不是很明显,只减少了 10% 左右的大小。通过分析如下 G2 5.0.18 使用 [G2.stdlib](#g2corelib) 依赖图可以有以下几个可以进一步优化思路:

- 减少 Runtime 的体积:把一些能力放在 library 里面可以按需使用。
- 依赖治理:去掉一些重复依赖,比如 `@antv/util`;减少一些依赖的大小 `@antv/gui`
- 依赖治理:去掉一些重复依赖,比如 `@antv/util`;减少一些依赖的大小 `@antv/component`
- 提供比 corelib 更小的 library:可以实现 Mark 级别的按需打包。

<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*Z-bZT5lHPkkAAAAAAAAAAAAADmJ7AQ/original" alt="dep" style="margin-top: 1em"/>
Expand Down
2 changes: 1 addition & 1 deletion src/component/axis.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Coordinate } from '@antv/coord';
import type { DisplayObject } from '@antv/g';
import { Axis as AxisComponent } from '@antv/gui';
import { Axis as AxisComponent } from '@antv/component';
import { Linear as LinearScale } from '@antv/scale';
import { deepMix, omit, upperFirst } from '@antv/util';
import { extent } from 'd3-array';
Expand Down
2 changes: 1 addition & 1 deletion src/component/legendCategory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DisplayObject } from '@antv/g';
import { Category } from '@antv/gui';
import { Category } from '@antv/component';
import { last } from '@antv/util';
import { format } from 'd3-format';
import { Identity } from '@antv/scale';
Expand Down
2 changes: 1 addition & 1 deletion src/component/legendContinuous.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DisplayObject, parseColor } from '@antv/g';
import { Continuous } from '@antv/gui';
import { Continuous } from '@antv/component';
import { Constant, Quantile, Quantize, Threshold } from '@antv/scale';
import { format } from 'd3-format';
import type {
Expand Down
2 changes: 1 addition & 1 deletion src/component/scrollbar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Scrollbar as ScrollbarComponent } from '@antv/gui';
import { Scrollbar as ScrollbarComponent } from '@antv/component';
import { DisplayObject } from '@antv/g';
import { GuideComponentComponent as GCC } from '../runtime';

Expand Down
2 changes: 1 addition & 1 deletion src/component/slider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Slider as SliderComponent } from '@antv/gui';
import { Slider as SliderComponent } from '@antv/component';
import { format } from 'd3-format';
import { DisplayObject } from '@antv/g';
import { isTranspose } from '../utils/coordinate';
Expand Down
2 changes: 1 addition & 1 deletion src/component/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CustomElement, DisplayObjectConfig, Group } from '@antv/g';
import { Layout } from '@antv/gui';
import { Layout } from '@antv/component';
import { deepMix, upperFirst } from '@antv/util';
import {
FlexLayout,
Expand Down
2 changes: 1 addition & 1 deletion src/interaction/tooltip.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Circle, DisplayObject, IElement, Line } from '@antv/g';
import { sort, group, mean, bisector, minIndex } from 'd3-array';
import { deepMix, lowerFirst, throttle } from '@antv/util';
import { Tooltip as TooltipComponent } from '@antv/gui';
import { Tooltip as TooltipComponent } from '@antv/component';
import { Constant, Band } from '@antv/scale';
import { defined, subObject } from '../utils/helper';
import { isTranspose, isPolar } from '../utils/coordinate';
Expand Down
2 changes: 1 addition & 1 deletion src/shape/connector/connector.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Coordinate } from '@antv/coord';
import type { PathArray } from '@antv/util';
import { PathStyleProps, Path } from '@antv/g';
import { Marker } from '@antv/gui';
import { Marker } from '@antv/component';
import { line as d3line } from 'd3-shape';
import { ShapeComponent as SC, Vector2, WithPrefix } from '../../runtime';
import { isTranspose } from '../../utils/coordinate';
Expand Down
2 changes: 1 addition & 1 deletion src/shape/text/advance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PathStyleProps,
} from '@antv/g';
import { isNumber } from '@antv/util';
import { Marker } from '@antv/gui';
import { Marker } from '@antv/component';
import { line } from 'd3-shape';
import { WithPrefix } from '../../runtime';
import { createElement } from '../../utils/createElement';
Expand Down
2 changes: 1 addition & 1 deletion src/shape/text/badge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TextStyleProps, DisplayObject } from '@antv/g';
import { Marker } from '@antv/gui';
import { Marker } from '@antv/component';
import { ShapeComponent as SC, WithPrefix } from '../../runtime';
import { createElement } from '../../utils/createElement';
import { subObject } from '../../utils/helper';
Expand Down
2 changes: 1 addition & 1 deletion src/spec/interaction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TooltipStyleProps } from '@antv/gui';
import type { TooltipStyleProps } from '@antv/component';
import { BBox, InteractionComponent } from '../runtime';
import { FisheyeCoordinate } from './coordinateTransform';
import { TooltipItemValue } from './component';
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { LINK, MODULE } = process.env;

if (LINK === '1' && !MODULE) {
throw new Error(
`Please specify MODULE, for example: $ MODULE=@antv/gui npm run dev:link.`,
`Please specify MODULE, for example: $ MODULE=@antv/component npm run dev:link.`,
);
}

Expand Down

0 comments on commit 296b50f

Please sign in to comment.