@visactor/vgrammar-core 0.13.12-alpha.0 → 0.13.13

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.
@@ -14,7 +14,7 @@ const vutils_1 = require("@visactor/vutils"), getCenterPoints = (element, option
14
14
  })), center.x /= points.length, center.y /= points.length, options && options.center && ((0,
15
15
  vutils_1.isValidNumber)(options.center.x) && (center.x = options.center.x), (0,
16
16
  vutils_1.isValidNumber)(options.center.y) && (center.y = options.center.y)), "area" === element.mark.markType && (center.x1 = center.x,
17
- center.y1 = center.y), points.map((() => Object.assign(center)));
17
+ center.y1 = center.y), points.map((point => Object.assign({}, point, center)));
18
18
  }, growPointsIn = (element, options, animationParameters) => ({
19
19
  from: {
20
20
  points: getCenterPoints(element, options)
@@ -42,21 +42,21 @@ const changePointsX = (element, options, animationParameters) => element.getGrap
42
42
  if (options && "negative" === options.orient) {
43
43
  let groupRight = animationParameters.width;
44
44
  return animationParameters.group && (groupRight = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(),
45
- animationParameters.groupWidth = groupRight), {
45
+ animationParameters.groupWidth = groupRight), Object.assign(Object.assign({}, point), {
46
46
  x: groupRight,
47
47
  y: point.y,
48
48
  x1: groupRight,
49
49
  y1: point.y1,
50
50
  defined: !1 !== point.defined
51
- };
51
+ });
52
52
  }
53
- return {
53
+ return Object.assign(Object.assign({}, point), {
54
54
  x: 0,
55
55
  y: point.y,
56
56
  x1: 0,
57
57
  y1: point.y1,
58
58
  defined: !1 !== point.defined
59
- };
59
+ });
60
60
  })), growPointsXIn = (element, options, animationParameters) => ({
61
61
  from: {
62
62
  points: changePointsX(element, options, animationParameters)
@@ -84,21 +84,21 @@ const changePointsY = (element, options, animationParameters) => element.getGrap
84
84
  if (options && "negative" === options.orient) {
85
85
  let groupBottom = animationParameters.height;
86
86
  return animationParameters.group && (groupBottom = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(),
87
- animationParameters.groupHeight = groupBottom), {
87
+ animationParameters.groupHeight = groupBottom), Object.assign(Object.assign({}, point), {
88
88
  x: point.x,
89
89
  y: groupBottom,
90
90
  x1: point.x1,
91
91
  y1: groupBottom,
92
92
  defined: !1 !== point.defined
93
- };
93
+ });
94
94
  }
95
- return {
95
+ return Object.assign(Object.assign({}, point), {
96
96
  x: point.x,
97
97
  y: 0,
98
98
  x1: point.x1,
99
99
  y1: 0,
100
100
  defined: !1 !== point.defined
101
- };
101
+ });
102
102
  })), growPointsYIn = (element, options, animationParameters) => ({
103
103
  from: {
104
104
  points: changePointsY(element, options, animationParameters)
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graph/animation/animation/grow-points.ts"],"names":[],"mappings":";;;AAEA,6CAAiD;AASjD,MAAM,eAAe,GAAG,CACtB,OAAiB,EACjB,OAA2C,EAC3C,mBAAyC,EACzC,EAAE;IACF,MAAM,MAAM,GAAiB,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAE1B,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE;QAC7B,IAAI,IAAA,sBAAa,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7B;QACD,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;AAEK,MAAM,aAAa,GAA4B,CACpD,OAAiB,EACjB,OAAoC,EACpC,mBAAyC,EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;QACtE,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;KAC7D,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB;AAEK,MAAM,cAAc,GAA4B,CACrD,OAAiB,EACjB,OAAoC,EACpC,mBAAyC,EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC7D,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;KACrE,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB","file":"grow-points.js","sourcesContent":["import type { IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValidNumber } from '@visactor/vutils';\nimport type {\n IElement,\n IGrowPointsOverallAnimationOptions,\n IAnimationParameters,\n IGrowPointsAnimationOptions,\n TypeAnimation\n} from '../../../types';\n\nconst getCenterPoints = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points: IPointLike[] = element.getGraphicAttribute('points', false);\n const center: IPointLike = { x: 0, y: 0 };\n points.forEach(point => {\n center.x += point.x;\n center.y += point.y;\n });\n center.x /= points.length;\n center.y /= points.length;\n\n if (options && options.center) {\n if (isValidNumber(options.center.x)) {\n center.x = options.center.x;\n }\n if (isValidNumber(options.center.y)) {\n center.y = options.center.y;\n }\n }\n\n if (element.mark.markType === 'area') {\n center.x1 = center.x;\n center.y1 = center.y;\n }\n\n return points.map(() => Object.assign(center));\n};\n\nexport const growPointsIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: getCenterPoints(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: getCenterPoints(element, options, animationParameters) }\n };\n};\n\n// grow points x\n\nconst changePointsX = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupRight = animationParameters.width;\n\n if (animationParameters.group) {\n groupRight = (animationParameters as any).groupWidth ?? animationParameters.group.getBounds().width();\n\n (animationParameters as any).groupWidth = groupRight;\n }\n\n return {\n x: groupRight,\n y: point.y,\n x1: groupRight,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n x: 0,\n y: point.y,\n x1: 0,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsXIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsX(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsXOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsX(element, options, animationParameters) }\n };\n};\n\n// grow points y\n\nconst changePointsY = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupBottom = animationParameters.height;\n\n if (animationParameters.group) {\n groupBottom = (animationParameters as any).groupHeight ?? animationParameters.group.getBounds().height();\n\n (animationParameters as any).groupHeight = groupBottom;\n }\n\n return {\n x: point.x,\n y: groupBottom,\n x1: point.x1,\n y1: groupBottom,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n x: point.x,\n y: 0,\n x1: point.x1,\n y1: 0,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsYIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsY(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsYOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsY(element, options, animationParameters) }\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/graph/animation/animation/grow-points.ts"],"names":[],"mappings":";;;AAEA,6CAAiD;AASjD,MAAM,eAAe,GAAG,CACtB,OAAiB,EACjB,OAA2C,EAC3C,mBAAyC,EACzC,EAAE;IACF,MAAM,MAAM,GAAiB,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,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CAAC,OAAO,KAAK,KAAK,GACnB,CAAC;SACjB;QACD,OAAO,gCACF,KAAK,KACR,CAAC,EAAE,KAAK,CAAC,CAAC,EACV,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,EAAE,EAAE,CAAC,EACL,OAAO,EAAE,KAAK,CAAC,OAAO,KAAK,KAAK,GACnB,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,aAAa,GAA4B,CACpD,OAAiB,EACjB,OAAoC,EACpC,mBAAyC,EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;QACtE,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;KAC7D,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB;AAEK,MAAM,cAAc,GAA4B,CACrD,OAAiB,EACjB,OAAoC,EACpC,mBAAyC,EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC7D,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;KACrE,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB","file":"grow-points.js","sourcesContent":["import type { IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValidNumber } from '@visactor/vutils';\nimport type {\n IElement,\n IGrowPointsOverallAnimationOptions,\n IAnimationParameters,\n IGrowPointsAnimationOptions,\n TypeAnimation\n} from '../../../types';\n\nconst getCenterPoints = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points: IPointLike[] = element.getGraphicAttribute('points', false);\n const center: IPointLike = { x: 0, y: 0 };\n points.forEach(point => {\n center.x += point.x;\n center.y += point.y;\n });\n center.x /= points.length;\n center.y /= points.length;\n\n if (options && options.center) {\n if (isValidNumber(options.center.x)) {\n center.x = options.center.x;\n }\n if (isValidNumber(options.center.y)) {\n center.y = options.center.y;\n }\n }\n\n if (element.mark.markType === 'area') {\n center.x1 = center.x;\n center.y1 = center.y;\n }\n\n return points.map(point => Object.assign({}, point, center));\n};\n\nexport const growPointsIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: getCenterPoints(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: getCenterPoints(element, options, animationParameters) }\n };\n};\n\n// grow points x\n\nconst changePointsX = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupRight = animationParameters.width;\n\n if (animationParameters.group) {\n groupRight = (animationParameters as any).groupWidth ?? animationParameters.group.getBounds().width();\n\n (animationParameters as any).groupWidth = groupRight;\n }\n\n return {\n ...point,\n x: groupRight,\n y: point.y,\n x1: groupRight,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n ...point,\n x: 0,\n y: point.y,\n x1: 0,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsXIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsX(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsXOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsX(element, options, animationParameters) }\n };\n};\n\n// grow points y\n\nconst changePointsY = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupBottom = animationParameters.height;\n\n if (animationParameters.group) {\n groupBottom = (animationParameters as any).groupHeight ?? animationParameters.group.getBounds().height();\n\n (animationParameters as any).groupHeight = groupBottom;\n }\n\n return {\n ...point,\n x: point.x,\n y: groupBottom,\n x1: point.x1,\n y1: groupBottom,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n ...point,\n x: point.x,\n y: 0,\n x1: point.x1,\n y1: 0,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsYIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsY(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsYOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsY(element, options, animationParameters) }\n };\n};\n"]}
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.13.12-alpha.0";
1
+ export declare const version = "0.13.13";
2
2
  export * from './graph';
3
3
  export * from './interactions';
4
4
  export { View } from './view';
package/cjs/index.js CHANGED
@@ -18,8 +18,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), exports.vglobal = exports.ThemeManager = exports.SIGNAL_VIEW_BOX = exports.SIGNAL_WIDTH = exports.SIGNAL_VIEW_WIDTH = exports.SIGNAL_VIEW_HEIGHT = exports.SIGNAL_PADDING = exports.SIGNAL_HEIGHT = exports.SIGNAL_AUTOFIT = exports.Factory = exports.GrammarBase = exports.invokeFunctionType = exports.parseFunctionType = exports.registerCoordinate = exports.Coordinate = exports.registerScale = exports.Scale = exports.View = exports.version = void 0,
21
- exports.version = "0.13.12-alpha.0", __exportStar(require("./graph"), exports),
22
- __exportStar(require("./interactions"), exports);
21
+ exports.version = "0.13.13", __exportStar(require("./graph"), exports), __exportStar(require("./interactions"), exports);
23
22
 
24
23
  var view_1 = require("./view");
25
24
 
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,0CAAwB;AAExB,iDAA+B;AAE/B,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,sCAAoD;AAA3C,8FAAA,KAAK,OAAA;AAAE,sGAAA,aAAa,OAAA;AAC7B,gDAAmE;AAA1D,wGAAA,UAAU,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AACvC,qCAAqE;AAA5D,yGAAA,iBAAiB,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAC9C,oDAAkD;AAAzC,2GAAA,WAAW,OAAA;AACpB,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAyC;AAAhC,kGAAA,OAAO,OAAA;AAChB,8CAQ0B;AAPxB,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AACjB,yGAAA,YAAY,OAAA;AACZ,4GAAA,eAAe,OAAA;AAGjB,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AAErB,0CAAwB;AACxB,8CAA4B;AAC5B,+CAA6B;AAC7B,8DAA4C;AAE5C,uDAAiD;AAAxC,uGAAA,OAAO,OAAA;AAChB,wCAAsB;AACtB,iDAA+B;AAC/B,wDAAsC;AACtC,4DAA0C;AAC1C,uDAAqC","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.13.12-alpha.0\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,0CAAwB;AAExB,iDAA+B;AAE/B,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,sCAAoD;AAA3C,8FAAA,KAAK,OAAA;AAAE,sGAAA,aAAa,OAAA;AAC7B,gDAAmE;AAA1D,wGAAA,UAAU,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AACvC,qCAAqE;AAA5D,yGAAA,iBAAiB,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAC9C,oDAAkD;AAAzC,2GAAA,WAAW,OAAA;AACpB,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAyC;AAAhC,kGAAA,OAAO,OAAA;AAChB,8CAQ0B;AAPxB,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AACjB,yGAAA,YAAY,OAAA;AACZ,4GAAA,eAAe,OAAA;AAGjB,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AAErB,0CAAwB;AACxB,8CAA4B;AAC5B,+CAA6B;AAC7B,8DAA4C;AAE5C,uDAAiD;AAAxC,uGAAA,OAAO,OAAA;AAChB,wCAAsB;AACtB,iDAA+B;AAC/B,wDAAsC;AACtC,4DAA0C;AAC1C,uDAAqC","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.13.13\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\n"]}
@@ -9,7 +9,7 @@ const getCenterPoints = (element, options, animationParameters) => {
9
9
  center.x += point.x, center.y += point.y;
10
10
  })), center.x /= points.length, center.y /= points.length, options && options.center && (isValidNumber(options.center.x) && (center.x = options.center.x),
11
11
  isValidNumber(options.center.y) && (center.y = options.center.y)), "area" === element.mark.markType && (center.x1 = center.x,
12
- center.y1 = center.y), points.map((() => Object.assign(center)));
12
+ center.y1 = center.y), points.map((point => Object.assign({}, point, center)));
13
13
  };
14
14
 
15
15
  export const growPointsIn = (element, options, animationParameters) => ({
@@ -35,21 +35,21 @@ const changePointsX = (element, options, animationParameters) => element.getGrap
35
35
  if (options && "negative" === options.orient) {
36
36
  let groupRight = animationParameters.width;
37
37
  return animationParameters.group && (groupRight = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(),
38
- animationParameters.groupWidth = groupRight), {
38
+ animationParameters.groupWidth = groupRight), Object.assign(Object.assign({}, point), {
39
39
  x: groupRight,
40
40
  y: point.y,
41
41
  x1: groupRight,
42
42
  y1: point.y1,
43
43
  defined: !1 !== point.defined
44
- };
44
+ });
45
45
  }
46
- return {
46
+ return Object.assign(Object.assign({}, point), {
47
47
  x: 0,
48
48
  y: point.y,
49
49
  x1: 0,
50
50
  y1: point.y1,
51
51
  defined: !1 !== point.defined
52
- };
52
+ });
53
53
  }));
54
54
 
55
55
  export const growPointsXIn = (element, options, animationParameters) => ({
@@ -75,21 +75,21 @@ const changePointsY = (element, options, animationParameters) => element.getGrap
75
75
  if (options && "negative" === options.orient) {
76
76
  let groupBottom = animationParameters.height;
77
77
  return animationParameters.group && (groupBottom = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : animationParameters.group.getBounds().height(),
78
- animationParameters.groupHeight = groupBottom), {
78
+ animationParameters.groupHeight = groupBottom), Object.assign(Object.assign({}, point), {
79
79
  x: point.x,
80
80
  y: groupBottom,
81
81
  x1: point.x1,
82
82
  y1: groupBottom,
83
83
  defined: !1 !== point.defined
84
- };
84
+ });
85
85
  }
86
- return {
86
+ return Object.assign(Object.assign({}, point), {
87
87
  x: point.x,
88
88
  y: 0,
89
89
  x1: point.x1,
90
90
  y1: 0,
91
91
  defined: !1 !== point.defined
92
- };
92
+ });
93
93
  }));
94
94
 
95
95
  export const growPointsYIn = (element, options, animationParameters) => ({
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graph/animation/animation/grow-points.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASjD,MAAM,eAAe,GAAG,CACtB,OAAiB,EACjB,OAA2C,EAC3C,mBAAyC,EACzC,EAAE;IACF,MAAM,MAAM,GAAiB,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAE1B,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE;QAC7B,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7B;QACD,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7B;KACF;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,KAAK,MAAM,EAAE;QACpC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;KACtB;IAED,OAAO,MAAM,CAAC,GAAG,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EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC7D,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;KACrE,CAAC;AACJ,CAAC,CAAC","file":"grow-points.js","sourcesContent":["import type { IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValidNumber } from '@visactor/vutils';\nimport type {\n IElement,\n IGrowPointsOverallAnimationOptions,\n IAnimationParameters,\n IGrowPointsAnimationOptions,\n TypeAnimation\n} from '../../../types';\n\nconst getCenterPoints = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points: IPointLike[] = element.getGraphicAttribute('points', false);\n const center: IPointLike = { x: 0, y: 0 };\n points.forEach(point => {\n center.x += point.x;\n center.y += point.y;\n });\n center.x /= points.length;\n center.y /= points.length;\n\n if (options && options.center) {\n if (isValidNumber(options.center.x)) {\n center.x = options.center.x;\n }\n if (isValidNumber(options.center.y)) {\n center.y = options.center.y;\n }\n }\n\n if (element.mark.markType === 'area') {\n center.x1 = center.x;\n center.y1 = center.y;\n }\n\n return points.map(() => Object.assign(center));\n};\n\nexport const growPointsIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: getCenterPoints(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: getCenterPoints(element, options, animationParameters) }\n };\n};\n\n// grow points x\n\nconst changePointsX = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupRight = animationParameters.width;\n\n if (animationParameters.group) {\n groupRight = (animationParameters as any).groupWidth ?? animationParameters.group.getBounds().width();\n\n (animationParameters as any).groupWidth = groupRight;\n }\n\n return {\n x: groupRight,\n y: point.y,\n x1: groupRight,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n x: 0,\n y: point.y,\n x1: 0,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsXIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsX(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsXOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsX(element, options, animationParameters) }\n };\n};\n\n// grow points y\n\nconst changePointsY = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupBottom = animationParameters.height;\n\n if (animationParameters.group) {\n groupBottom = (animationParameters as any).groupHeight ?? animationParameters.group.getBounds().height();\n\n (animationParameters as any).groupHeight = groupBottom;\n }\n\n return {\n x: point.x,\n y: groupBottom,\n x1: point.x1,\n y1: groupBottom,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n x: point.x,\n y: 0,\n x1: point.x1,\n y1: 0,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsYIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsY(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsYOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsY(element, options, animationParameters) }\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/graph/animation/animation/grow-points.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASjD,MAAM,eAAe,GAAG,CACtB,OAAiB,EACjB,OAA2C,EAC3C,mBAAyC,EACzC,EAAE;IACF,MAAM,MAAM,GAAiB,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC1E,MAAM,MAAM,GAAe,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IAE1B,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE;QAC7B,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7B;QACD,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC7B;KACF;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,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AAE,mBAAmB,CAAC,EAAE;QACtE,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE;KAC7D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA4B,CACrD,OAAiB,EACjB,OAAoC,EACpC,mBAAyC,EACzC,EAAE;IACF,OAAO;QACL,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC7D,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;KACrE,CAAC;AACJ,CAAC,CAAC","file":"grow-points.js","sourcesContent":["import type { IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { isValidNumber } from '@visactor/vutils';\nimport type {\n IElement,\n IGrowPointsOverallAnimationOptions,\n IAnimationParameters,\n IGrowPointsAnimationOptions,\n TypeAnimation\n} from '../../../types';\n\nconst getCenterPoints = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points: IPointLike[] = element.getGraphicAttribute('points', false);\n const center: IPointLike = { x: 0, y: 0 };\n points.forEach(point => {\n center.x += point.x;\n center.y += point.y;\n });\n center.x /= points.length;\n center.y /= points.length;\n\n if (options && options.center) {\n if (isValidNumber(options.center.x)) {\n center.x = options.center.x;\n }\n if (isValidNumber(options.center.y)) {\n center.y = options.center.y;\n }\n }\n\n if (element.mark.markType === 'area') {\n center.x1 = center.x;\n center.y1 = center.y;\n }\n\n return points.map(point => Object.assign({}, point, center));\n};\n\nexport const growPointsIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: getCenterPoints(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsOverallAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: getCenterPoints(element, options, animationParameters) }\n };\n};\n\n// grow points x\n\nconst changePointsX = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupRight = animationParameters.width;\n\n if (animationParameters.group) {\n groupRight = (animationParameters as any).groupWidth ?? animationParameters.group.getBounds().width();\n\n (animationParameters as any).groupWidth = groupRight;\n }\n\n return {\n ...point,\n x: groupRight,\n y: point.y,\n x1: groupRight,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n ...point,\n x: 0,\n y: point.y,\n x1: 0,\n y1: point.y1,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsXIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsX(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsXOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsX(element, options, animationParameters) }\n };\n};\n\n// grow points y\n\nconst changePointsY = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n const points = element.getGraphicAttribute('points', false);\n return points.map((point: IPointLike) => {\n if (options && options.orient === 'negative') {\n let groupBottom = animationParameters.height;\n\n if (animationParameters.group) {\n groupBottom = (animationParameters as any).groupHeight ?? animationParameters.group.getBounds().height();\n\n (animationParameters as any).groupHeight = groupBottom;\n }\n\n return {\n ...point,\n x: point.x,\n y: groupBottom,\n x1: point.x1,\n y1: groupBottom,\n defined: point.defined !== false\n } as IPointLike;\n }\n return {\n ...point,\n x: point.x,\n y: 0,\n x1: point.x1,\n y1: 0,\n defined: point.defined !== false\n } as IPointLike;\n });\n};\n\nexport const growPointsYIn: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: changePointsY(element, options, animationParameters) },\n to: { points: element.getGraphicAttribute('points', false) }\n };\n};\n\nexport const growPointsYOut: TypeAnimation<IElement> = (\n element: IElement,\n options: IGrowPointsAnimationOptions,\n animationParameters: IAnimationParameters\n) => {\n return {\n from: { points: element.getGraphicAttribute('points', true) },\n to: { points: changePointsY(element, options, animationParameters) }\n };\n};\n"]}
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.13.12-alpha.0";
1
+ export declare const version = "0.13.13";
2
2
  export * from './graph';
3
3
  export * from './interactions';
4
4
  export { View } from './view';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.13.12-alpha.0";
1
+ export const version = "0.13.13";
2
2
 
3
3
  export * from "./graph";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,SAAS,CAAC;AAExB,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.13.12-alpha.0\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAEjC,cAAc,SAAS,CAAC;AAExB,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.13.13\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\n"]}
@@ -29,4 +29,5 @@ export class BrushFilter extends BrushBase {
29
29
  }
30
30
  }
31
31
 
32
- BrushFilter.type = "brush-filter", BrushFilter.defaultOptions = {};
32
+ BrushFilter.type = "brush-filter", BrushFilter.defaultOptions = {};
33
+ //# sourceMappingURL=brush-filter.js.map
@@ -60,5 +60,4 @@ ElementHighlightByGroup.type = "element-highlight-by-group", ElementHighlightByG
60
60
  blurState: InteractionStateEnum.blur,
61
61
  trigger: "pointerover",
62
62
  triggerOff: "pointerout"
63
- };
64
- //# sourceMappingURL=element-highlight-by-group.js.map
63
+ };
@@ -147,4 +147,5 @@ export const registerViewRoam = () => {
147
147
 
148
148
  export const registerFishEye = () => {
149
149
  Factory.registerInteraction(FishEye.type, FishEye);
150
- };
150
+ };
151
+ //# sourceMappingURL=index.js.map
@@ -29,4 +29,4 @@ export class LegendFilter extends Filter {
29
29
  }
30
30
 
31
31
  LegendFilter.type = "legend-filter", LegendFilter.defaultOptions = {};
32
- //# sourceMappingURL=legend-filter.js.map
32
+ //# sourceMappingURL=legend-filter.js.map
@@ -29,4 +29,4 @@ export class PlayerFilter extends Filter {
29
29
  }
30
30
 
31
31
  PlayerFilter.type = "player-filter", PlayerFilter.defaultOptions = {};
32
- //# sourceMappingURL=player-filter.js.map
32
+ //# sourceMappingURL=player-filter.js.map
@@ -42,4 +42,4 @@ RollUp.type = "roll-up", RollUp.defaultOptions = {
42
42
  trigger: "click",
43
43
  triggerOff: "empty"
44
44
  };
45
- //# sourceMappingURL=roll-up.js.map
45
+ //# sourceMappingURL=roll-up.js.map
@@ -50,4 +50,4 @@ export class ScrollbarFilter extends Filter {
50
50
  }
51
51
 
52
52
  ScrollbarFilter.type = "scrollbar-filter", ScrollbarFilter.defaultOptions = {};
53
- //# sourceMappingURL=scrollbar-filter.js.map
53
+ //# sourceMappingURL=scrollbar-filter.js.map
@@ -26,4 +26,4 @@ export class SliderFilter extends Filter {
26
26
  }
27
27
 
28
28
  SliderFilter.type = "slider-filter", SliderFilter.defaultOptions = {};
29
- //# sourceMappingURL=slider-filter.js.map
29
+ //# sourceMappingURL=slider-filter.js.map
@@ -44,4 +44,4 @@ export class ToggleStateMixin {
44
44
  }));
45
45
  }
46
46
  }
47
- //# sourceMappingURL=toggle-state-mixin.js.map
47
+ //# sourceMappingURL=toggle-state-mixin.js.map
@@ -56,4 +56,4 @@ Tooltip.type = "tooltip", Tooltip.defaultOptions = {
56
56
  trigger: "pointermove",
57
57
  triggerOff: "pointerleave"
58
58
  };
59
- //# sourceMappingURL=tooltip.js.map
59
+ //# sourceMappingURL=tooltip.js.map
@@ -62,4 +62,4 @@ export function configureCoordinate(spec, coordinate, parameters) {
62
62
  }
63
63
  coordinate.applyTransforms(transforms);
64
64
  }
65
- //# sourceMappingURL=coordinate.js.map
65
+ //# sourceMappingURL=coordinate.js.map
package/es/parse/event.js CHANGED
@@ -24,4 +24,4 @@ export const parseEventSelector = (selector, source = EVENT_SOURCE_VIEW) => {
24
24
  } else 1 === splitArr.length && (spec.type = selector, spec.source = source);
25
25
  return spec;
26
26
  };
27
- //# sourceMappingURL=event.js.map
27
+ //# sourceMappingURL=event.js.map
package/es/parse/mark.js CHANGED
@@ -16,4 +16,4 @@ export function parseEncodeType(encoder, view) {
16
16
  return encoder.scale && (dependencies = isGrammar(encoder.scale) ? [ encoder.scale ] : array(view.getScaleById(encoder.scale))),
17
17
  dependencies.concat(parseFunctionType(encoder, view));
18
18
  }
19
- //# sourceMappingURL=mark.js.map
19
+ //# sourceMappingURL=mark.js.map
@@ -8,4 +8,4 @@ export const parseOptions = (options, params) => options ? isObject(options) ? O
8
8
  const option = options[key];
9
9
  return res[key] = parseOptionValue(option, params), res;
10
10
  }), {}) : options.map((option => parseOptionValue(option, params))) : options;
11
- //# sourceMappingURL=option.js.map
11
+ //# sourceMappingURL=option.js.map
package/es/parse/scale.js CHANGED
@@ -343,5 +343,4 @@ export function configureScale(spec, scale, parameters) {
343
343
  case "quantile":
344
344
  scale.rescale();
345
345
  }
346
- }
347
- //# sourceMappingURL=scale.js.map
346
+ }
@@ -99,4 +99,4 @@ export const parseTransformSpec = (spec, view) => {
99
99
  }
100
100
  return null;
101
101
  };
102
- //# sourceMappingURL=transform.js.map
102
+ //# sourceMappingURL=transform.js.map
package/es/parse/util.js CHANGED
@@ -62,4 +62,4 @@ export const isGrammar = el => el && !isNil(el.grammarType);
62
62
  export const parseField = field => isFunction(field) ? field : datum => datum[field];
63
63
 
64
64
  export const parseColor = color => isString(color) && Color.parseColorString(color) ? color : null;
65
- //# sourceMappingURL=util.js.map
65
+ //# sourceMappingURL=util.js.map
package/es/parse/view.js CHANGED
@@ -96,4 +96,4 @@ export const normalizeRunningConfig = runningConfig => {
96
96
  enableExitAnimation: enableExitAnimation
97
97
  };
98
98
  };
99
- //# sourceMappingURL=view.js.map
99
+ //# sourceMappingURL=view.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vgrammar-core",
3
- "version": "0.13.12-alpha.0",
3
+ "version": "0.13.13",
4
4
  "description": "VGrammar is a visual grammar library",
5
5
  "keywords": [
6
6
  "grammar",
@@ -26,12 +26,12 @@
26
26
  "dependencies": {
27
27
  "@visactor/vutils": "~0.18.10",
28
28
  "@visactor/vdataset": "~0.18.10",
29
- "@visactor/vgrammar-coordinate": "0.13.12-alpha.0",
30
- "@visactor/vgrammar-util": "0.13.12-alpha.0",
29
+ "@visactor/vgrammar-coordinate": "0.13.13",
30
+ "@visactor/vgrammar-util": "0.13.13",
31
31
  "@visactor/vscale": "~0.18.10",
32
- "@visactor/vrender-core": "0.19.14",
33
- "@visactor/vrender-kits": "0.19.14",
34
- "@visactor/vrender-components": "0.19.14"
32
+ "@visactor/vrender-core": "0.19.15",
33
+ "@visactor/vrender-kits": "0.19.15",
34
+ "@visactor/vrender-components": "0.19.15"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@rushstack/eslint-patch": "~1.1.4",
@@ -46,8 +46,8 @@
46
46
  "typescript": "4.9.5",
47
47
  "@internal/bundler": "0.0.1",
48
48
  "@internal/ts-config": "0.0.1",
49
- "@internal/jest-config": "0.0.1",
50
- "@internal/eslint-config": "0.0.1"
49
+ "@internal/eslint-config": "0.0.1",
50
+ "@internal/jest-config": "0.0.1"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public",