@visactor/vchart 2.1.2-alpha.1 → 2.1.2-alpha.3

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.
@@ -49,5 +49,4 @@ class AnimationPlanner {
49
49
  }
50
50
  }
51
51
 
52
- exports.AnimationPlanner = AnimationPlanner;
53
- //# sourceMappingURL=animation-planner.js.map
52
+ exports.AnimationPlanner = AnimationPlanner;
@@ -102,4 +102,5 @@ class GrammarDetector {
102
102
  }
103
103
  }
104
104
 
105
- exports.GrammarDetector = GrammarDetector;
105
+ exports.GrammarDetector = GrammarDetector;
106
+ //# sourceMappingURL=grammar-dector.js.map
@@ -11,4 +11,5 @@ exports.ARC_START_ANGLE = `${base_1.PREFIX}_ARC_START_ANGLE`, exports.ARC_END_AN
11
11
  exports.ARC_K = `${base_1.PREFIX}_ARC_K`, exports.ARC_MIDDLE_ANGLE = `${base_1.PREFIX}_ARC_MIDDLE_ANGLE`,
12
12
  exports.ARC_QUADRANT = `${base_1.PREFIX}_ARC_QUADRANT`, exports.ARC_RADIAN = `${base_1.PREFIX}_ARC_RADIAN`,
13
13
  exports.POLAR_START_RADIAN = -Math.PI / 2, exports.POLAR_END_RADIAN = 3 * Math.PI / 2,
14
- exports.POLAR_START_ANGLE = -90, exports.POLAR_END_ANGLE = 270, exports.POLAR_DEFAULT_RADIUS = .6;
14
+ exports.POLAR_START_ANGLE = -90, exports.POLAR_END_ANGLE = 270, exports.POLAR_DEFAULT_RADIUS = .6;
15
+ //# sourceMappingURL=polar.js.map
@@ -2,5 +2,4 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.SCROLL_BAR_DEFAULT_SIZE = void 0, exports.SCROLL_BAR_DEFAULT_SIZE = 12;
6
- //# sourceMappingURL=scroll-bar.js.map
5
+ }), exports.SCROLL_BAR_DEFAULT_SIZE = void 0, exports.SCROLL_BAR_DEFAULT_SIZE = 12;
package/cjs/index.d.ts CHANGED
@@ -31,12 +31,7 @@ export * from './interaction';
31
31
  export { createImage, createPath, createArc3d, createPyramid3d, createRect3d, registerDirectionalLight, registerOrthoCamera, registerViewTransform3dPlugin, graphicCreator, type IGraphic, type IGlyph, type IGroup, type IText, type ILine, type IArea, type IRect, type INode, type IStage, type EasingType, type ILineGraphicAttribute, type ITextGraphicAttribute, type IRectGraphicAttribute, type IGroupGraphicAttribute, type TextAlignType, type TextBaselineType, type GraphicEventType, type IAreaGraphicAttribute, type ISymbolGraphicAttribute } from '@visactor/vrender-core';
32
32
  export { ACustomAnimate, AnimateExecutor, RotateBySphereAnimate } from '@visactor/vrender-animate';
33
33
  export { AbstractComponent, Segment, MarkPoint, type SegmentAttributes, type Point } from '@visactor/vrender-components';
34
- export { registerLine } from '@visactor/vrender-kits/register/register-line';
35
- export { registerRect } from '@visactor/vrender-kits/register/register-rect';
36
- export { registerArc3d } from '@visactor/vrender-kits/register/register-arc3d';
37
- export { registerPyramid3d } from '@visactor/vrender-kits/register/register-pyramid3d';
38
- export { registerRect3d } from '@visactor/vrender-kits/register/register-rect3d';
39
- export { registerShadowRoot } from '@visactor/vrender-kits/register/register-shadowRoot';
34
+ export { registerLine, registerRect, registerArc3d, registerPyramid3d, registerRect3d, registerShadowRoot } from '@visactor/vrender-kits';
40
35
  export * from '@visactor/vlayouts';
41
36
  export { DataView, DataSet, svgParser } from '@visactor/vdataset';
42
37
  export type { SVGParsedElement, SVGParserResult, ISVGSourceOption } from '@visactor/vdataset';
package/cjs/index.js CHANGED
@@ -124,57 +124,37 @@ Object.defineProperty(exports, "AbstractComponent", {
124
124
  }
125
125
  });
126
126
 
127
- var register_line_1 = require("@visactor/vrender-kits/register/register-line");
127
+ var vrender_kits_1 = require("@visactor/vrender-kits");
128
128
 
129
129
  Object.defineProperty(exports, "registerLine", {
130
130
  enumerable: !0,
131
131
  get: function() {
132
- return register_line_1.registerLine;
132
+ return vrender_kits_1.registerLine;
133
133
  }
134
- });
135
-
136
- var register_rect_1 = require("@visactor/vrender-kits/register/register-rect");
137
-
138
- Object.defineProperty(exports, "registerRect", {
134
+ }), Object.defineProperty(exports, "registerRect", {
139
135
  enumerable: !0,
140
136
  get: function() {
141
- return register_rect_1.registerRect;
137
+ return vrender_kits_1.registerRect;
142
138
  }
143
- });
144
-
145
- var register_arc3d_1 = require("@visactor/vrender-kits/register/register-arc3d");
146
-
147
- Object.defineProperty(exports, "registerArc3d", {
139
+ }), Object.defineProperty(exports, "registerArc3d", {
148
140
  enumerable: !0,
149
141
  get: function() {
150
- return register_arc3d_1.registerArc3d;
142
+ return vrender_kits_1.registerArc3d;
151
143
  }
152
- });
153
-
154
- var register_pyramid3d_1 = require("@visactor/vrender-kits/register/register-pyramid3d");
155
-
156
- Object.defineProperty(exports, "registerPyramid3d", {
144
+ }), Object.defineProperty(exports, "registerPyramid3d", {
157
145
  enumerable: !0,
158
146
  get: function() {
159
- return register_pyramid3d_1.registerPyramid3d;
147
+ return vrender_kits_1.registerPyramid3d;
160
148
  }
161
- });
162
-
163
- var register_rect3d_1 = require("@visactor/vrender-kits/register/register-rect3d");
164
-
165
- Object.defineProperty(exports, "registerRect3d", {
149
+ }), Object.defineProperty(exports, "registerRect3d", {
166
150
  enumerable: !0,
167
151
  get: function() {
168
- return register_rect3d_1.registerRect3d;
152
+ return vrender_kits_1.registerRect3d;
169
153
  }
170
- });
171
-
172
- var register_shadowRoot_1 = require("@visactor/vrender-kits/register/register-shadowRoot");
173
-
174
- Object.defineProperty(exports, "registerShadowRoot", {
154
+ }), Object.defineProperty(exports, "registerShadowRoot", {
175
155
  enumerable: !0,
176
156
  get: function() {
177
- return register_shadowRoot_1.registerShadowRoot;
157
+ return vrender_kits_1.registerShadowRoot;
178
158
  }
179
159
  }), __exportStar(require("@visactor/vlayouts"), exports);
180
160
 
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAAsC;AAEtC,kBAAe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OAAA;AAKrC,mDAAiC","file":"index.js","sourcesContent":["import { VChart } from './vchart-all';\n\nexport default VChart;\n\nexport * from './core';\n\n// chart model for extension\nexport * from './chart';\nexport * from './chart/base';\nexport * from './chart/cartesian';\nexport * from './chart/common';\nexport * from './chart/stack';\nexport * from './series';\nexport * from './mark';\nexport * from './component';\nexport * from './layout';\nexport * from './env';\nexport * from './event';\n// plugin路径太深,如果直接引用,会导致tree-shaking失效\nexport * from './plugin/chart';\nexport * from './plugin/components/tooltip-handler';\nexport * from './plugin/components/axis-sync';\nexport * from './plugin/other';\nexport * from './plugin/base/base-plugin';\nexport * from './vrender-tools';\n// util\nexport * from './util/data';\nexport * from './util/spec/transform';\nexport * from './util/mark';\nexport * from './util/region';\nexport * from './util/scale';\n// constant\nexport * from './constant/data';\n\n// base component model for extension\nexport * from './component/base';\nexport * from './compile/data/compilable-data';\nexport * from './animation';\nexport * from './interaction';\n\nexport {\n createImage,\n createPath,\n createArc3d,\n createPyramid3d,\n createRect3d,\n registerDirectionalLight,\n registerOrthoCamera,\n registerViewTransform3dPlugin,\n graphicCreator,\n type IGraphic,\n type IGlyph,\n type IGroup,\n type IText,\n type ILine,\n type IArea,\n type IRect,\n type INode,\n type IStage,\n type EasingType,\n type ILineGraphicAttribute,\n type ITextGraphicAttribute,\n type IRectGraphicAttribute,\n type IGroupGraphicAttribute,\n type TextAlignType,\n type TextBaselineType,\n type GraphicEventType,\n type IAreaGraphicAttribute,\n type ISymbolGraphicAttribute\n} from '@visactor/vrender-core';\n\nexport { ACustomAnimate, AnimateExecutor, RotateBySphereAnimate } from '@visactor/vrender-animate';\n\n// vrender-components\nexport {\n AbstractComponent,\n Segment,\n MarkPoint,\n type SegmentAttributes,\n type Point\n} from '@visactor/vrender-components';\n\n// vrender-kits\nexport { registerLine } from '@visactor/vrender-kits/register/register-line';\nexport { registerRect } from '@visactor/vrender-kits/register/register-rect';\nexport { registerArc3d } from '@visactor/vrender-kits/register/register-arc3d';\nexport { registerPyramid3d } from '@visactor/vrender-kits/register/register-pyramid3d';\nexport { registerRect3d } from '@visactor/vrender-kits/register/register-rect3d';\nexport { registerShadowRoot } from '@visactor/vrender-kits/register/register-shadowRoot';\n\n// vlayouts\nexport * from '@visactor/vlayouts';\n\n// vdataset\nexport { DataView, DataSet, svgParser } from '@visactor/vdataset';\nexport type { SVGParsedElement, SVGParserResult, ISVGSourceOption } from '@visactor/vdataset';\n\n// vutils\n// @ts-ignore\nexport * from '@visactor/vutils';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAAsC;AAEtC,kBAAe,mBAAM,CAAC;AAEtB,yCAAuB;AAGvB,0CAAwB;AACxB,+CAA6B;AAC7B,oDAAkC;AAClC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,yCAAuB;AACvB,8CAA4B;AAC5B,2CAAyB;AACzB,wCAAsB;AACtB,0CAAwB;AAExB,iDAA+B;AAC/B,sEAAoD;AACpD,gEAA8C;AAC9C,iDAA+B;AAC/B,4DAA0C;AAC1C,kDAAgC;AAEhC,8CAA4B;AAC5B,wDAAsC;AACtC,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAE7B,kDAAgC;AAGhC,mDAAiC;AACjC,iEAA+C;AAC/C,8CAA4B;AAC5B,gDAA8B;AAE9B,uDA6BgC;AA5B9B,2GAAA,WAAW,OAAA;AACX,0GAAA,UAAU,OAAA;AACV,2GAAA,WAAW,OAAA;AACX,+GAAA,eAAe,OAAA;AACf,4GAAA,YAAY,OAAA;AACZ,wHAAA,wBAAwB,OAAA;AACxB,mHAAA,mBAAmB,OAAA;AACnB,6HAAA,6BAA6B,OAAA;AAC7B,8GAAA,cAAc,OAAA;AAsBhB,6DAAmG;AAA1F,iHAAA,cAAc,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAG/D,mEAMsC;AALpC,uHAAA,iBAAiB,OAAA;AACjB,6GAAA,OAAO,OAAA;AACP,+GAAA,SAAS,OAAA;AAMX,uDAOgC;AAN9B,4GAAA,YAAY,OAAA;AACZ,4GAAA,YAAY,OAAA;AACZ,6GAAA,aAAa,OAAA;AACb,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,kHAAA,kBAAkB,OAAA;AAIpB,qDAAmC;AAGnC,+CAAkE;AAAzD,oGAAA,QAAQ,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAKrC,mDAAiC","file":"index.js","sourcesContent":["import { VChart } from './vchart-all';\n\nexport default VChart;\n\nexport * from './core';\n\n// chart model for extension\nexport * from './chart';\nexport * from './chart/base';\nexport * from './chart/cartesian';\nexport * from './chart/common';\nexport * from './chart/stack';\nexport * from './series';\nexport * from './mark';\nexport * from './component';\nexport * from './layout';\nexport * from './env';\nexport * from './event';\n// plugin路径太深,如果直接引用,会导致tree-shaking失效\nexport * from './plugin/chart';\nexport * from './plugin/components/tooltip-handler';\nexport * from './plugin/components/axis-sync';\nexport * from './plugin/other';\nexport * from './plugin/base/base-plugin';\nexport * from './vrender-tools';\n// util\nexport * from './util/data';\nexport * from './util/spec/transform';\nexport * from './util/mark';\nexport * from './util/region';\nexport * from './util/scale';\n// constant\nexport * from './constant/data';\n\n// base component model for extension\nexport * from './component/base';\nexport * from './compile/data/compilable-data';\nexport * from './animation';\nexport * from './interaction';\n\nexport {\n createImage,\n createPath,\n createArc3d,\n createPyramid3d,\n createRect3d,\n registerDirectionalLight,\n registerOrthoCamera,\n registerViewTransform3dPlugin,\n graphicCreator,\n type IGraphic,\n type IGlyph,\n type IGroup,\n type IText,\n type ILine,\n type IArea,\n type IRect,\n type INode,\n type IStage,\n type EasingType,\n type ILineGraphicAttribute,\n type ITextGraphicAttribute,\n type IRectGraphicAttribute,\n type IGroupGraphicAttribute,\n type TextAlignType,\n type TextBaselineType,\n type GraphicEventType,\n type IAreaGraphicAttribute,\n type ISymbolGraphicAttribute\n} from '@visactor/vrender-core';\n\nexport { ACustomAnimate, AnimateExecutor, RotateBySphereAnimate } from '@visactor/vrender-animate';\n\n// vrender-components\nexport {\n AbstractComponent,\n Segment,\n MarkPoint,\n type SegmentAttributes,\n type Point\n} from '@visactor/vrender-components';\n\n// vrender-kits\nexport {\n registerLine,\n registerRect,\n registerArc3d,\n registerPyramid3d,\n registerRect3d,\n registerShadowRoot\n} from '@visactor/vrender-kits';\n\n// vlayouts\nexport * from '@visactor/vlayouts';\n\n// vdataset\nexport { DataView, DataSet, svgParser } from '@visactor/vdataset';\nexport type { SVGParsedElement, SVGParserResult, ISVGSourceOption } from '@visactor/vdataset';\n\n// vutils\n// @ts-ignore\nexport * from '@visactor/vutils';\n"]}
@@ -167,6 +167,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
167
167
  protected _runEncoder(graphics: IMarkGraphic[], noGroupEncode?: boolean): void;
168
168
  protected _excludeStateControlledDiffAttrs(g: IMarkGraphic, diffAttrs: Record<string, any>): Record<string, any>;
169
169
  protected _hasDiffAttrs(g: IMarkGraphic): boolean;
170
+ protected _commitPreventedAnimationStaticAttrs(g: IMarkGraphic, attrs: Record<string, any>): void;
170
171
  protected _runApplyGraphic(graphics: IMarkGraphic[]): void;
171
172
  protected _updateEncoderByState(): void;
172
173
  protected _runState(graphics: IMarkGraphic[]): void;
@@ -725,6 +725,13 @@ class BaseMark extends grammar_item_1.GrammarItem {
725
725
  _hasDiffAttrs(g) {
726
726
  return !!g.context.diffAttrs && Object.keys(g.context.diffAttrs).length > 0;
727
727
  }
728
+ _commitPreventedAnimationStaticAttrs(g, attrs) {
729
+ var _a, _b;
730
+ if (!attrs || !Object.keys(attrs).length) return;
731
+ const graphic = g;
732
+ null === (_a = graphic.setFinalAttributes) || void 0 === _a || _a.call(graphic, attrs),
733
+ graphic._commitAnimationStaticAttributes ? graphic._commitAnimationStaticAttributes(attrs) : null === (_b = graphic.commitInternalBaseAttributes) || void 0 === _b || _b.call(graphic, attrs);
734
+ }
728
735
  _runApplyGraphic(graphics) {
729
736
  const hasAnimation = this.hasAnimation();
730
737
  graphics.forEach(((g, index) => {
@@ -733,7 +740,8 @@ class BaseMark extends grammar_item_1.GrammarItem {
733
740
  if (g.setAttributes) {
734
741
  const diffAttrs = this._excludeStateControlledDiffAttrs(g, (0, mark_2.getDiffAttributesOfGraphic)(g, finalAttrs));
735
742
  g.context.diffAttrs = diffAttrs, g.context.reusing ? (g.context.lastAttrs = g.attribute,
736
- g.initAttributes(finalAttrs), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? g.setAttributesAndPreventAnimate(diffAttrs) : g.setAttributes(diffAttrs)),
743
+ g.initAttributes(finalAttrs), g.context.reusing = !1) : hasStateAnimation || (hasAnimation ? (g.setAttributesAndPreventAnimate(diffAttrs),
744
+ this._commitPreventedAnimationStaticAttrs(g, diffAttrs)) : g.setAttributes(diffAttrs)),
737
745
  !(null === (_b = this.renderContext) || void 0 === _b ? void 0 : _b.progressive) && this._product && g.parent !== this._product && this._product.appendChild(g);
738
746
  } else {
739
747
  const mockGraphic = g;