@visactor/vchart 2.0.8-alpha.0 → 2.0.8-alpha.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.
@@ -1,7 +1,7 @@
1
1
  import { VChart } from './vchart';
2
2
  import { Factory } from './factory';
3
3
  export { VChart, Factory };
4
- export declare const version = "2.0.8-alpha.0";
4
+ export declare const version = "2.0.8-alpha.1";
5
5
  export type { IVChart } from './interface';
6
6
  export type { IStateSpec, StateValueType } from '../compile/mark';
7
7
  export type { IRegion } from '../region/interface';
package/cjs/core/index.js CHANGED
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "Factory", {
35
35
  get: function() {
36
36
  return factory_1.Factory;
37
37
  }
38
- }), exports.version = "2.0.8-alpha.0", __exportStar(require("../event/interface"), exports),
38
+ }), exports.version = "2.0.8-alpha.1", __exportStar(require("../event/interface"), exports),
39
39
  __exportStar(require("../theme/interface"), exports), __exportStar(require("../model/interface"), exports),
40
40
  __exportStar(require("./interface"), exports), __exportStar(require("../typings"), exports),
41
41
  __exportStar(require("../constant/base"), exports), __exportStar(require("../constant/data"), exports),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,eAAe,CAAC;AAOvC,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AAEnC,8CAA4B;AAC5B,6CAA2B;AAI3B,mDAAiC;AACjC,mDAAiC;AACjC,qDAAmC;AACnC,mDAAuD;AAA9C,2GAAA,cAAc,OAAA;AACvB,iDAAoD;AAA3C,4GAAA,cAAc,OAAA;AACvB,uDAA6D;AAApD,6GAAA,gBAAgB,OAAA;AACzB,2CAA+C;AAAtC,mGAAA,UAAU,OAAA;AAKnB,wDAAsC;AACtC,oDAAkC;AAGlC,qDAAmC;AAGnC,iDAA+B;AAG/B,uDAUgC;AAT9B,uGAAA,OAAO,OAAA;AACP,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,0GAAA,UAAU,OAAA;AACV,yGAAA,SAAS,OAAA;AACT,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,4GAAA,YAAY,OAAA;AAEd,6DAAsE;AAA7D,+GAAA,YAAY,OAAA;AAAE,8GAAA,WAAW,OAAA;AAGlC,gDAA8B;AAC9B,uCAAmD;AAA1C,2GAAA,kBAAkB,OAAA;AAC3B,0CAAgD;AAAvC,mGAAA,WAAW,OAAA;AACpB,6CAAmG;AAA1F,yHAAA,6BAA6B,OAAA;AAAE,4HAAA,gCAAgC,OAAA;AACxE,oDAAmD;AAA1C,gGAAA,MAAM,OAAA;AACf,uCAAqC;AAA5B,6FAAA,IAAI,OAAA;AACb,qCAA2C;AAAlC,mGAAA,WAAW,OAAA","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"2.0.8-alpha.0\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\nexport type { IRegion } from '../region/interface';\n\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../model/interface';\n\nexport * from './interface';\nexport * from '../typings';\nexport type { IMarkGraphic, IGraphicContext } from '../mark/interface/';\n\n// some constants\nexport * from '../constant/base';\nexport * from '../constant/data';\nexport * from '../constant/layout';\nexport { AttributeLevel } from '../constant/attribute';\nexport { TransformLevel } from '../data/initialize';\nexport { STATE_VALUE_ENUM } from '../compile/mark/interface';\nexport { ChartEvent } from '../constant/event';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\nexport * from '../typings/visual';\n\n// tooltip\nexport * from '../typings/tooltip';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport {\n vglobal,\n createGroup,\n createRichText,\n createText,\n createArc,\n createArea,\n createRect,\n createLine,\n createSymbol\n} from '@visactor/vrender-core';\nexport { ManualTicker, StreamLight } from '@visactor/vrender-animate';\n\n// utils\nexport * from '../util/space';\nexport { transformToGraphic } from '../util/style';\nexport { getSpecInfo } from '../component/util';\nexport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../data/register';\nexport { lookup } from '../data/transforms/lookup';\nexport { warn } from '../util/debug';\nexport { measureText } from '../util/text';\n"]}
1
+ {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,eAAe,CAAC;AAOvC,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AAEnC,8CAA4B;AAC5B,6CAA2B;AAI3B,mDAAiC;AACjC,mDAAiC;AACjC,qDAAmC;AACnC,mDAAuD;AAA9C,2GAAA,cAAc,OAAA;AACvB,iDAAoD;AAA3C,4GAAA,cAAc,OAAA;AACvB,uDAA6D;AAApD,6GAAA,gBAAgB,OAAA;AACzB,2CAA+C;AAAtC,mGAAA,UAAU,OAAA;AAKnB,wDAAsC;AACtC,oDAAkC;AAGlC,qDAAmC;AAGnC,iDAA+B;AAG/B,uDAUgC;AAT9B,uGAAA,OAAO,OAAA;AACP,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,0GAAA,UAAU,OAAA;AACV,yGAAA,SAAS,OAAA;AACT,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,4GAAA,YAAY,OAAA;AAEd,6DAAsE;AAA7D,+GAAA,YAAY,OAAA;AAAE,8GAAA,WAAW,OAAA;AAGlC,gDAA8B;AAC9B,uCAAmD;AAA1C,2GAAA,kBAAkB,OAAA;AAC3B,0CAAgD;AAAvC,mGAAA,WAAW,OAAA;AACpB,6CAAmG;AAA1F,yHAAA,6BAA6B,OAAA;AAAE,4HAAA,gCAAgC,OAAA;AACxE,oDAAmD;AAA1C,gGAAA,MAAM,OAAA;AACf,uCAAqC;AAA5B,6FAAA,IAAI,OAAA;AACb,qCAA2C;AAAlC,mGAAA,WAAW,OAAA","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"2.0.8-alpha.1\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\nexport type { IRegion } from '../region/interface';\n\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../model/interface';\n\nexport * from './interface';\nexport * from '../typings';\nexport type { IMarkGraphic, IGraphicContext } from '../mark/interface/';\n\n// some constants\nexport * from '../constant/base';\nexport * from '../constant/data';\nexport * from '../constant/layout';\nexport { AttributeLevel } from '../constant/attribute';\nexport { TransformLevel } from '../data/initialize';\nexport { STATE_VALUE_ENUM } from '../compile/mark/interface';\nexport { ChartEvent } from '../constant/event';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\nexport * from '../typings/visual';\n\n// tooltip\nexport * from '../typings/tooltip';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport {\n vglobal,\n createGroup,\n createRichText,\n createText,\n createArc,\n createArea,\n createRect,\n createLine,\n createSymbol\n} from '@visactor/vrender-core';\nexport { ManualTicker, StreamLight } from '@visactor/vrender-animate';\n\n// utils\nexport * from '../util/space';\nexport { transformToGraphic } from '../util/style';\nexport { getSpecInfo } from '../component/util';\nexport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../data/register';\nexport { lookup } from '../data/transforms/lookup';\nexport { warn } from '../util/debug';\nexport { measureText } from '../util/text';\n"]}
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=interface.js.map
6
+ //# sourceMappingURL=interface.js.map
package/cjs/core/util.js CHANGED
@@ -9,4 +9,4 @@ const util_1 = require("../util");
9
9
  exports.VCHART_UTILS = {
10
10
  measureText: util_1.measureText
11
11
  };
12
- //# sourceMappingURL=util.js.map
12
+ //# sourceMappingURL=util.js.map
@@ -85,4 +85,4 @@ function(TransformLevel) {
85
85
  TransformLevel[TransformLevel.linkDotInfo = -7] = "linkDotInfo", TransformLevel[TransformLevel.sankeyLayout = -7] = "sankeyLayout",
86
86
  TransformLevel[TransformLevel.dataZoomFilter = -6] = "dataZoomFilter", TransformLevel[TransformLevel.legendFilter = -5] = "legendFilter";
87
87
  }(TransformLevel = exports.TransformLevel || (exports.TransformLevel = {}));
88
- //# sourceMappingURL=initialize.js.map
88
+ //# sourceMappingURL=initialize.js.map
@@ -12,4 +12,4 @@ Object.defineProperty(exports, "__esModule", {
12
12
  value: !0
13
13
  }), exports.registerDataSetInstanceParser = exports.registerDataSetInstanceTransform = void 0,
14
14
  exports.registerDataSetInstanceTransform = registerDataSetInstanceTransform, exports.registerDataSetInstanceParser = registerDataSetInstanceParser;
15
- //# sourceMappingURL=register.js.map
15
+ //# sourceMappingURL=register.js.map
@@ -12,6 +12,7 @@ export declare class ChartResizeZoomPlugin extends BasePlugin<IChartPluginServic
12
12
  protected _maxZoom?: number;
13
13
  protected _zoom: number;
14
14
  protected _rate?: number;
15
+ protected _beforeWheel?: (e: WheelEvent) => boolean;
15
16
  constructor();
16
17
  onAfterInitChart(service: IChartPluginService, chartSpec: any): void;
17
18
  protected _onWheel: (e: WheelEvent) => void;
@@ -10,6 +10,7 @@ class ChartResizeZoomPlugin extends base_plugin_1.BasePlugin {
10
10
  constructor() {
11
11
  super(ChartResizeZoomPlugin.type), this.type = "ChartResizeZoomPlugin", this._zoom = 1,
12
12
  this._onWheel = e => {
13
+ if (this._beforeWheel && !1 == !this._beforeWheel(e)) return;
13
14
  e.preventDefault(), e.stopImmediatePropagation();
14
15
  const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * .2 * this._rate), center = {
15
16
  x: e.offsetX,
@@ -25,7 +26,8 @@ class ChartResizeZoomPlugin extends base_plugin_1.BasePlugin {
25
26
  };
26
27
  !0 === spec.enabled && (this._minZoom = null !== (_c = spec.min) && void 0 !== _c ? _c : .1,
27
28
  this._maxZoom = null !== (_d = spec.max) && void 0 !== _d ? _d : 10, this._rate = null !== (_e = spec.rate) && void 0 !== _e ? _e : .1,
28
- this._container = chart.getContainer(), this._triggerEvent = (0, config_1.getDefaultTriggerEventByMode)(service.globalInstance.getChart().getOption().mode).zoom,
29
+ this._beforeWheel = spec.beforeWheel, this._container = chart.getContainer(), this._triggerEvent = (0,
30
+ config_1.getDefaultTriggerEventByMode)(service.globalInstance.getChart().getOption().mode).zoom,
29
31
  this._container && this._triggerEvent && this._container.addEventListener(this._triggerEvent, this._onWheel));
30
32
  }
31
33
  zoom(zoom, pointerPos) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin/chart/resize-zoom/zoom.ts"],"names":[],"mappings":";;;AACA,wDAAoD;AACpD,0CAAkD;AAElD,qEAAwF;AAExF,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,MAAa,qBAAsB,SAAQ,wBAA+B;IAaxE;QACE,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAV3B,SAAI,GAAW,uBAAuB,CAAC;QAMtC,UAAK,GAAW,CAAC,CAAC;QAuBlB,aAAQ,GAAG,CAAC,CAAa,EAAE,EAAE;YACrC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,wBAAwB,EAAE,CAAC;YAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAA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e,GAAG,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;SAC9E;IACH,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,aAAa,EAAE;YACzC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CACjC,IAAI,CAAC,aAA0C,EAC/C,IAAI,CAAC,QAAyB,CAC/B,CAAC;SACH;IACH,CAAC;;AAvFH,sDAwFC;AAtFiB,6BAAO,GAAG,YAAY,CAAC;AACvB,0BAAI,GAAW,uBAAuB,CAAC;AAuFlD,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,IAAA,8BAAmB,EAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAFW,QAAA,6BAA6B,iCAExC","file":"zoom.js","sourcesContent":["import type { IChartPlugin, IChartPluginService } from '../interface';\nimport { BasePlugin } from '../../base/base-plugin';\nimport { registerChartPlugin } from '../register';\nimport type { IPoint } from '../../../typings';\nimport { getDefaultTriggerEventByMode } from '../../../component/common/trigger/config';\n\nconst MIN_ZOOM = 0.1;\nconst MAX_ZOOM = 10;\n\nexport class ChartResizeZoomPlugin extends BasePlugin<IChartPluginService> implements IChartPlugin {\n static readonly pluginType: 'chart';\n static readonly specKey = 'resizeZoom';\n static readonly type: string = 'ChartResizeZoomPlugin';\n readonly type: string = 'ChartResizeZoomPlugin';\n\n protected _container?: HTMLElement;\n protected _triggerEvent?: string;\n protected _minZoom?: number;\n protected _maxZoom?: number;\n protected _zoom: number = 1;\n protected _rate?: number;\n\n constructor() {\n super(ChartResizeZoomPlugin.type);\n }\n\n onAfterInitChart(service: IChartPluginService, chartSpec: any) {\n const chart = service.globalInstance;\n const spec = chart.getSpec()?.[ChartResizeZoomPlugin.specKey] ?? { enabled: false };\n if (spec.enabled !== true) {\n return;\n }\n this._minZoom = spec.min ?? MIN_ZOOM;\n this._maxZoom = spec.max ?? MAX_ZOOM;\n this._rate = spec.rate ?? 0.1;\n this._container = chart.getContainer();\n this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom;\n if (this._container && this._triggerEvent) {\n this._container.addEventListener(this._triggerEvent as keyof HTMLElementEventMap, this._onWheel as EventListener);\n }\n }\n\n protected _onWheel = (e: WheelEvent) => {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * 0.2 * this._rate);\n const center = { x: e.offsetX, y: e.offsetY };\n this.zoom(zoom, center);\n };\n\n /**\n * 缩放图表\n * @param zoom 缩放比例\n * @param pointerPos 缩放中心,即鼠标位置\n */\n zoom(zoom: number, pointerPos?: IPoint) {\n const vchart = this.service.globalInstance;\n if (!vchart) {\n return;\n }\n const oldZoom = this._zoom;\n let tempZoom = this._zoom * zoom;\n if ((tempZoom <= this._minZoom && zoom < 1) || (tempZoom >= this._maxZoom && zoom > 1)) {\n if (tempZoom <= this._minZoom && this._zoom > this._minZoom) {\n tempZoom = this._minZoom;\n } else if (tempZoom >= this._maxZoom && this._zoom < this._maxZoom) {\n tempZoom = this._maxZoom;\n } else {\n return;\n }\n }\n\n if (tempZoom === oldZoom) {\n return;\n }\n\n const actualZoomRatio = tempZoom / oldZoom;\n this._zoom = tempZoom;\n\n vchart.resize(vchart.getCurrentSize().width * this._zoom, vchart.getCurrentSize().height * this._zoom);\n // 滚动容器滚动, 保持当前鼠标位置在缩放后不变\n if (pointerPos && this._container) {\n const { scrollLeft, scrollTop } = this._container;\n this._container.scrollLeft = scrollLeft + pointerPos.x * (actualZoomRatio - 1);\n this._container.scrollTop = scrollTop + pointerPos.y * (actualZoomRatio - 1);\n }\n }\n\n release(): void {\n if (this._container && this._triggerEvent) {\n this._container.removeEventListener(\n this._triggerEvent as keyof HTMLElementEventMap,\n this._onWheel as EventListener\n );\n }\n }\n}\n\nexport const register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GAAW,uBAAuB,CAAC;AAgGlD,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,IAAA,8BAAmB,EAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAFW,QAAA,6BAA6B,iCAExC","file":"zoom.js","sourcesContent":["import type { IChartPlugin, IChartPluginService } from '../interface';\nimport { BasePlugin } from '../../base/base-plugin';\nimport { registerChartPlugin } from '../register';\nimport type { IPoint } from '../../../typings';\nimport { getDefaultTriggerEventByMode } from '../../../component/common/trigger/config';\n\nconst MIN_ZOOM = 0.1;\nconst MAX_ZOOM = 10;\n\nexport class ChartResizeZoomPlugin extends BasePlugin<IChartPluginService> implements IChartPlugin {\n static readonly pluginType: 'chart';\n static readonly specKey = 'resizeZoom';\n static readonly type: string = 'ChartResizeZoomPlugin';\n readonly type: string = 'ChartResizeZoomPlugin';\n\n protected _container?: HTMLElement;\n protected _triggerEvent?: string;\n protected _minZoom?: number;\n protected _maxZoom?: number;\n protected _zoom: number = 1;\n protected _rate?: number;\n protected _beforeWheel?: (e: WheelEvent) => boolean;\n\n constructor() {\n super(ChartResizeZoomPlugin.type);\n }\n\n onAfterInitChart(service: IChartPluginService, chartSpec: any) {\n const chart = service.globalInstance;\n const spec = chart.getSpec()?.[ChartResizeZoomPlugin.specKey] ?? { enabled: false };\n if (spec.enabled !== true) {\n return;\n }\n this._minZoom = spec.min ?? MIN_ZOOM;\n this._maxZoom = spec.max ?? MAX_ZOOM;\n this._rate = spec.rate ?? 0.1;\n this._beforeWheel = spec.beforeWheel;\n this._container = chart.getContainer();\n this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom;\n if (this._container && this._triggerEvent) {\n this._container.addEventListener(this._triggerEvent as keyof HTMLElementEventMap, this._onWheel as EventListener);\n }\n }\n\n protected _onWheel = (e: WheelEvent) => {\n // 先执行 beforeWheel 回调函数\n if (this._beforeWheel) {\n // 如果 beforeWheel 回调函数返回 false,则阻止默认行为\n if (!this._beforeWheel(e) === false) {\n return;\n }\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * 0.2 * this._rate);\n const center = { x: e.offsetX, y: e.offsetY };\n this.zoom(zoom, center);\n };\n\n /**\n * 缩放图表\n * @param zoom 缩放比例\n * @param pointerPos 缩放中心,即鼠标位置\n */\n zoom(zoom: number, pointerPos?: IPoint) {\n const vchart = this.service.globalInstance;\n if (!vchart) {\n return;\n }\n const oldZoom = this._zoom;\n let tempZoom = this._zoom * zoom;\n if ((tempZoom <= this._minZoom && zoom < 1) || (tempZoom >= this._maxZoom && zoom > 1)) {\n if (tempZoom <= this._minZoom && this._zoom > this._minZoom) {\n tempZoom = this._minZoom;\n } else if (tempZoom >= this._maxZoom && this._zoom < this._maxZoom) {\n tempZoom = this._maxZoom;\n } else {\n return;\n }\n }\n\n if (tempZoom === oldZoom) {\n return;\n }\n\n const actualZoomRatio = tempZoom / oldZoom;\n this._zoom = tempZoom;\n\n vchart.resize(vchart.getCurrentSize().width * this._zoom, vchart.getCurrentSize().height * this._zoom);\n // 滚动容器滚动, 保持当前鼠标位置在缩放后不变\n if (pointerPos && this._container) {\n const { scrollLeft, scrollTop } = this._container;\n this._container.scrollLeft = scrollLeft + pointerPos.x * (actualZoomRatio - 1);\n this._container.scrollTop = scrollTop + pointerPos.y * (actualZoomRatio - 1);\n }\n }\n\n release(): void {\n if (this._container && this._triggerEvent) {\n this._container.removeEventListener(\n this._triggerEvent as keyof HTMLElementEventMap,\n this._onWheel as EventListener\n );\n }\n }\n}\n\nexport const registerChartResizeZoomPlugin = () => {\n registerChartPlugin(ChartResizeZoomPlugin);\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  import { VChart } from './vchart';
2
2
  import { Factory } from './factory';
3
3
  export { VChart, Factory };
4
- export declare const version = "2.0.8-alpha.0";
4
+ export declare const version = "2.0.8-alpha.1";
5
5
  export type { IVChart } from './interface';
6
6
  export type { IStateSpec, StateValueType } from '../compile/mark';
7
7
  export type { IRegion } from '../region/interface';
package/esm/core/index.js CHANGED
@@ -4,7 +4,7 @@ import { Factory } from "./factory";
4
4
 
5
5
  export { VChart, Factory };
6
6
 
7
- export const version = "2.0.8-alpha.0";
7
+ export const version = "2.0.8-alpha.1";
8
8
 
9
9
  export * from "../event/interface";
10
10
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAG3B,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAOvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAI3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGtE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"2.0.8-alpha.0\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\nexport type { IRegion } from '../region/interface';\n\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../model/interface';\n\nexport * from './interface';\nexport * from '../typings';\nexport type { IMarkGraphic, IGraphicContext } from '../mark/interface/';\n\n// some constants\nexport * from '../constant/base';\nexport * from '../constant/data';\nexport * from '../constant/layout';\nexport { AttributeLevel } from '../constant/attribute';\nexport { TransformLevel } from '../data/initialize';\nexport { STATE_VALUE_ENUM } from '../compile/mark/interface';\nexport { ChartEvent } from '../constant/event';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\nexport * from '../typings/visual';\n\n// tooltip\nexport * from '../typings/tooltip';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport {\n vglobal,\n createGroup,\n createRichText,\n createText,\n createArc,\n createArea,\n createRect,\n createLine,\n createSymbol\n} from '@visactor/vrender-core';\nexport { ManualTicker, StreamLight } from '@visactor/vrender-animate';\n\n// utils\nexport * from '../util/space';\nexport { transformToGraphic } from '../util/style';\nexport { getSpecInfo } from '../component/util';\nexport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../data/register';\nexport { lookup } from '../data/transforms/lookup';\nexport { warn } from '../util/debug';\nexport { measureText } from '../util/text';\n"]}
1
+ {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAG3B,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAOvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAI3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGtE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"2.0.8-alpha.1\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\nexport type { IRegion } from '../region/interface';\n\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../model/interface';\n\nexport * from './interface';\nexport * from '../typings';\nexport type { IMarkGraphic, IGraphicContext } from '../mark/interface/';\n\n// some constants\nexport * from '../constant/base';\nexport * from '../constant/data';\nexport * from '../constant/layout';\nexport { AttributeLevel } from '../constant/attribute';\nexport { TransformLevel } from '../data/initialize';\nexport { STATE_VALUE_ENUM } from '../compile/mark/interface';\nexport { ChartEvent } from '../constant/event';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\nexport * from '../typings/visual';\n\n// tooltip\nexport * from '../typings/tooltip';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport {\n vglobal,\n createGroup,\n createRichText,\n createText,\n createArc,\n createArea,\n createRect,\n createLine,\n createSymbol\n} from '@visactor/vrender-core';\nexport { ManualTicker, StreamLight } from '@visactor/vrender-animate';\n\n// utils\nexport * from '../util/space';\nexport { transformToGraphic } from '../util/style';\nexport { getSpecInfo } from '../component/util';\nexport { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../data/register';\nexport { lookup } from '../data/transforms/lookup';\nexport { warn } from '../util/debug';\nexport { measureText } from '../util/text';\n"]}
@@ -1,2 +1,2 @@
1
1
  export { };
2
- //# sourceMappingURL=interface.js.map
2
+ //# sourceMappingURL=interface.js.map
package/esm/core/util.js CHANGED
@@ -3,4 +3,4 @@ import { measureText } from "../util";
3
3
  export const VCHART_UTILS = {
4
4
  measureText: measureText
5
5
  };
6
- //# sourceMappingURL=util.js.map
6
+ //# sourceMappingURL=util.js.map
@@ -81,4 +81,4 @@ export var TransformLevel;
81
81
  TransformLevel[TransformLevel.linkDotInfo = -7] = "linkDotInfo", TransformLevel[TransformLevel.sankeyLayout = -7] = "sankeyLayout",
82
82
  TransformLevel[TransformLevel.dataZoomFilter = -6] = "dataZoomFilter", TransformLevel[TransformLevel.legendFilter = -5] = "legendFilter";
83
83
  }(TransformLevel || (TransformLevel = {}));
84
- //# sourceMappingURL=initialize.js.map
84
+ //# sourceMappingURL=initialize.js.map
@@ -5,4 +5,4 @@ export function registerDataSetInstanceTransform(dataSet, name, transform) {
5
5
  export function registerDataSetInstanceParser(dataSet, name, parse) {
6
6
  dataSet.getParser(name) || dataSet.registerParser(name, parse);
7
7
  }
8
- //# sourceMappingURL=register.js.map
8
+ //# sourceMappingURL=register.js.map
@@ -12,6 +12,7 @@ export declare class ChartResizeZoomPlugin extends BasePlugin<IChartPluginServic
12
12
  protected _maxZoom?: number;
13
13
  protected _zoom: number;
14
14
  protected _rate?: number;
15
+ protected _beforeWheel?: (e: WheelEvent) => boolean;
15
16
  constructor();
16
17
  onAfterInitChart(service: IChartPluginService, chartSpec: any): void;
17
18
  protected _onWheel: (e: WheelEvent) => void;
@@ -10,6 +10,7 @@ export class ChartResizeZoomPlugin extends BasePlugin {
10
10
  constructor() {
11
11
  super(ChartResizeZoomPlugin.type), this.type = "ChartResizeZoomPlugin", this._zoom = 1,
12
12
  this._onWheel = e => {
13
+ if (this._beforeWheel && !1 == !this._beforeWheel(e)) return;
13
14
  e.preventDefault(), e.stopImmediatePropagation();
14
15
  const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * .2 * this._rate), center = {
15
16
  x: e.offsetX,
@@ -25,7 +26,7 @@ export class ChartResizeZoomPlugin extends BasePlugin {
25
26
  };
26
27
  !0 === spec.enabled && (this._minZoom = null !== (_c = spec.min) && void 0 !== _c ? _c : .1,
27
28
  this._maxZoom = null !== (_d = spec.max) && void 0 !== _d ? _d : 10, this._rate = null !== (_e = spec.rate) && void 0 !== _e ? _e : .1,
28
- this._container = chart.getContainer(), this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom,
29
+ this._beforeWheel = spec.beforeWheel, this._container = chart.getContainer(), this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom,
29
30
  this._container && this._triggerEvent && this._container.addEventListener(this._triggerEvent, this._onWheel));
30
31
  }
31
32
  zoom(zoom, pointerPos) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin/chart/resize-zoom/zoom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAExF,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,MAAM,OAAO,qBAAsB,SAAQ,UAA+B;IAaxE;QACE,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAV3B,SAAI,GAAW,uBAAuB,CAAC;QAMtC,UAAK,GAAW,CAAC,CAAC;QAuBlB,aAAQ,GAAG,CAAC,CAAa,EAAE,EAAE;YACrC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,wBAAwB,EAAE,CAAC;YAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YACvF,MAAM,MAAM,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,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QACL,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,aAAa,EAAE;YACzC,IAAI,CAAC,UAAU,CAAC,mBAAmB,CACjC,IAAI,CAAC,aAA0C,EAC/C,IAAI,CAAC,QAAyB,CAC/B,CAAC;SACH;IACH,CAAC;;AArFe,6BAAO,GAAG,YAAY,CAAC;AACvB,0BAAI,GAAW,uBAAuB,CAAC;AAuFzD,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC,CAAC","file":"zoom.js","sourcesContent":["import type { IChartPlugin, IChartPluginService } from '../interface';\nimport { BasePlugin } from '../../base/base-plugin';\nimport { registerChartPlugin } from '../register';\nimport type { IPoint } from '../../../typings';\nimport { getDefaultTriggerEventByMode } from '../../../component/common/trigger/config';\n\nconst MIN_ZOOM = 0.1;\nconst MAX_ZOOM = 10;\n\nexport class ChartResizeZoomPlugin extends BasePlugin<IChartPluginService> implements IChartPlugin {\n static readonly pluginType: 'chart';\n static readonly specKey = 'resizeZoom';\n static readonly type: string = 'ChartResizeZoomPlugin';\n readonly type: string = 'ChartResizeZoomPlugin';\n\n protected _container?: HTMLElement;\n protected _triggerEvent?: string;\n protected _minZoom?: number;\n protected _maxZoom?: number;\n protected _zoom: number = 1;\n protected _rate?: number;\n\n constructor() {\n super(ChartResizeZoomPlugin.type);\n }\n\n onAfterInitChart(service: IChartPluginService, chartSpec: any) {\n const chart = service.globalInstance;\n const spec = chart.getSpec()?.[ChartResizeZoomPlugin.specKey] ?? { enabled: false };\n if (spec.enabled !== true) {\n return;\n }\n this._minZoom = spec.min ?? MIN_ZOOM;\n this._maxZoom = spec.max ?? MAX_ZOOM;\n this._rate = spec.rate ?? 0.1;\n this._container = chart.getContainer();\n this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom;\n if (this._container && this._triggerEvent) {\n this._container.addEventListener(this._triggerEvent as keyof HTMLElementEventMap, this._onWheel as EventListener);\n }\n }\n\n protected _onWheel = (e: WheelEvent) => {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * 0.2 * this._rate);\n const center = { x: e.offsetX, y: e.offsetY };\n this.zoom(zoom, center);\n };\n\n /**\n * 缩放图表\n * @param zoom 缩放比例\n * @param pointerPos 缩放中心,即鼠标位置\n */\n zoom(zoom: number, pointerPos?: IPoint) {\n const vchart = this.service.globalInstance;\n if (!vchart) {\n return;\n }\n const oldZoom = this._zoom;\n let tempZoom = this._zoom * zoom;\n if ((tempZoom <= this._minZoom && zoom < 1) || (tempZoom >= this._maxZoom && zoom > 1)) {\n if (tempZoom <= this._minZoom && this._zoom > this._minZoom) {\n tempZoom = this._minZoom;\n } else if (tempZoom >= this._maxZoom && this._zoom < this._maxZoom) {\n tempZoom = this._maxZoom;\n } else {\n return;\n }\n }\n\n if (tempZoom === oldZoom) {\n return;\n }\n\n const actualZoomRatio = tempZoom / oldZoom;\n this._zoom = tempZoom;\n\n vchart.resize(vchart.getCurrentSize().width * this._zoom, vchart.getCurrentSize().height * this._zoom);\n // 滚动容器滚动, 保持当前鼠标位置在缩放后不变\n if (pointerPos && this._container) {\n const { scrollLeft, scrollTop } = this._container;\n this._container.scrollLeft = scrollLeft + pointerPos.x * (actualZoomRatio - 1);\n this._container.scrollTop = scrollTop + pointerPos.y * (actualZoomRatio - 1);\n }\n }\n\n release(): void {\n if (this._container && this._triggerEvent) {\n this._container.removeEventListener(\n this._triggerEvent as keyof HTMLElementEventMap,\n this._onWheel as EventListener\n );\n }\n }\n}\n\nexport const registerChartResizeZoomPlugin = () => {\n registerChartPlugin(ChartResizeZoomPlugin);\n};\n"]}
1
+ {"version":3,"sources":["../src/plugin/chart/resize-zoom/zoom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,a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C,CAAC,CAAC","file":"zoom.js","sourcesContent":["import type { IChartPlugin, IChartPluginService } from '../interface';\nimport { BasePlugin } from '../../base/base-plugin';\nimport { registerChartPlugin } from '../register';\nimport type { IPoint } from '../../../typings';\nimport { getDefaultTriggerEventByMode } from '../../../component/common/trigger/config';\n\nconst MIN_ZOOM = 0.1;\nconst MAX_ZOOM = 10;\n\nexport class ChartResizeZoomPlugin extends BasePlugin<IChartPluginService> implements IChartPlugin {\n static readonly pluginType: 'chart';\n static readonly specKey = 'resizeZoom';\n static readonly type: string = 'ChartResizeZoomPlugin';\n readonly type: string = 'ChartResizeZoomPlugin';\n\n protected _container?: HTMLElement;\n protected _triggerEvent?: string;\n protected _minZoom?: number;\n protected _maxZoom?: number;\n protected _zoom: number = 1;\n protected _rate?: number;\n protected _beforeWheel?: (e: WheelEvent) => boolean;\n\n constructor() {\n super(ChartResizeZoomPlugin.type);\n }\n\n onAfterInitChart(service: IChartPluginService, chartSpec: any) {\n const chart = service.globalInstance;\n const spec = chart.getSpec()?.[ChartResizeZoomPlugin.specKey] ?? { enabled: false };\n if (spec.enabled !== true) {\n return;\n }\n this._minZoom = spec.min ?? MIN_ZOOM;\n this._maxZoom = spec.max ?? MAX_ZOOM;\n this._rate = spec.rate ?? 0.1;\n this._beforeWheel = spec.beforeWheel;\n this._container = chart.getContainer();\n this._triggerEvent = getDefaultTriggerEventByMode(service.globalInstance.getChart().getOption().mode).zoom;\n if (this._container && this._triggerEvent) {\n this._container.addEventListener(this._triggerEvent as keyof HTMLElementEventMap, this._onWheel as EventListener);\n }\n }\n\n protected _onWheel = (e: WheelEvent) => {\n // 先执行 beforeWheel 回调函数\n if (this._beforeWheel) {\n // 如果 beforeWheel 回调函数返回 false,则阻止默认行为\n if (!this._beforeWheel(e) === false) {\n return;\n }\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const zoom = Math.pow(1.005, -e.deltaY * Math.pow(16, e.deltaMode) * 0.2 * this._rate);\n const center = { x: e.offsetX, y: e.offsetY };\n this.zoom(zoom, center);\n };\n\n /**\n * 缩放图表\n * @param zoom 缩放比例\n * @param pointerPos 缩放中心,即鼠标位置\n */\n zoom(zoom: number, pointerPos?: IPoint) {\n const vchart = this.service.globalInstance;\n if (!vchart) {\n return;\n }\n const oldZoom = this._zoom;\n let tempZoom = this._zoom * zoom;\n if ((tempZoom <= this._minZoom && zoom < 1) || (tempZoom >= this._maxZoom && zoom > 1)) {\n if (tempZoom <= this._minZoom && this._zoom > this._minZoom) {\n tempZoom = this._minZoom;\n } else if (tempZoom >= this._maxZoom && this._zoom < this._maxZoom) {\n tempZoom = this._maxZoom;\n } else {\n return;\n }\n }\n\n if (tempZoom === oldZoom) {\n return;\n }\n\n const actualZoomRatio = tempZoom / oldZoom;\n this._zoom = tempZoom;\n\n vchart.resize(vchart.getCurrentSize().width * this._zoom, vchart.getCurrentSize().height * this._zoom);\n // 滚动容器滚动, 保持当前鼠标位置在缩放后不变\n if (pointerPos && this._container) {\n const { scrollLeft, scrollTop } = this._container;\n this._container.scrollLeft = scrollLeft + pointerPos.x * (actualZoomRatio - 1);\n this._container.scrollTop = scrollTop + pointerPos.y * (actualZoomRatio - 1);\n }\n }\n\n release(): void {\n if (this._container && this._triggerEvent) {\n this._container.removeEventListener(\n this._triggerEvent as keyof HTMLElementEventMap,\n this._onWheel as EventListener\n );\n }\n }\n}\n\nexport const registerChartResizeZoomPlugin = () => {\n registerChartPlugin(ChartResizeZoomPlugin);\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vchart",
3
- "version": "2.0.8-alpha.0",
3
+ "version": "2.0.8-alpha.1",
4
4
  "description": "charts lib based @visactor/VGrammar",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -81,10 +81,10 @@
81
81
  "@size-limit/file": "9.0.0",
82
82
  "rimraf": "3.0.2",
83
83
  "cross-env": "^7.0.3",
84
- "@internal/typescript-json-schema": "0.0.1",
84
+ "@internal/ts-config": "0.0.1",
85
85
  "@internal/bundler": "0.0.1",
86
- "@internal/eslint-config": "0.0.1",
87
- "@internal/ts-config": "0.0.1"
86
+ "@internal/typescript-json-schema": "0.0.1",
87
+ "@internal/eslint-config": "0.0.1"
88
88
  },
89
89
  "dependencies": {
90
90
  "@visactor/vutils": "~1.0.12",
@@ -95,7 +95,7 @@
95
95
  "@visactor/vrender-kits": "~1.0.24",
96
96
  "@visactor/vrender-components": "~1.0.24",
97
97
  "@visactor/vrender-animate": "~1.0.24",
98
- "@visactor/vutils-extension": "2.0.8-alpha.0"
98
+ "@visactor/vutils-extension": "2.0.8-alpha.1"
99
99
  },
100
100
  "publishConfig": {
101
101
  "access": "public",