@antv/g 5.7.4 → 5.7.5

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.
@@ -7,7 +7,7 @@ export declare class CSSPropertyOffsetDistance implements Partial<CSSProperty<CS
7
7
  cache: Map<any, any>;
8
8
  };
9
9
  calculator(name: string, oldParsed: CSSUnitValue, computed: CSSUnitValue): number;
10
- mixer: (left: CSSUnitValue, right: CSSUnitValue) => [number, number, (i: number) => string];
10
+ mixer: (left: number, right: number) => [number, number, (i: number) => string];
11
11
  postProcessor(object: DisplayObject): void;
12
12
  }
13
13
  //# sourceMappingURL=CSSPropertyOffsetDistance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSSPropertyOffsetDistance.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyOffsetDistance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAMa,yBAA0B,YAAW,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC1F,MAAM;;;MAAe;IAErB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM;IAIjF,KAAK,uFAA6B;IAElC,aAAa,CAAC,MAAM,EAAE,aAAa;CAiBpC"}
1
+ {"version":3,"file":"CSSPropertyOffsetDistance.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyOffsetDistance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAMa,yBAA0B,YAAW,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC1F,MAAM;;;MAAe;IAErB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM;IAIjF,KAAK,2EAA6B;IAElC,aAAa,CAAC,MAAM,EAAE,aAAa;CAiBpC"}
@@ -9,6 +9,6 @@ export declare class CSSPropertyOpacity implements Partial<CSSProperty<CSSUnitVa
9
9
  cache: Map<any, any>;
10
10
  };
11
11
  calculator(name: string, oldParsed: CSSUnitValue, computed: CSSUnitValue): number;
12
- mixer: (left: CSSUnitValue, right: CSSUnitValue) => [number, number, (i: number) => string];
12
+ mixer: (left: number, right: number) => [number, number, (i: number) => string];
13
13
  }
14
14
  //# sourceMappingURL=CSSPropertyOpacity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSSPropertyOpacity.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyOpacity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,qBAMa,kBAAmB,YAAW,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACnF,MAAM;;;MAAe;IAErB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM;IAIjF,KAAK,uFAA6B;CACnC"}
1
+ {"version":3,"file":"CSSPropertyOpacity.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyOpacity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C;;GAEG;AACH,qBAMa,kBAAmB,YAAW,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACnF,MAAM;;;MAAe;IAErB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM;IAIjF,KAAK,2EAA6B;CACnC"}
@@ -1,5 +1,5 @@
1
1
  import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
2
2
  export declare class CSSPropertyShadowBlur extends CSSPropertyLengthOrPercentage {
3
- mixer: (left: import("..").CSSUnitValue, right: import("..").CSSUnitValue) => [number, number, (i: number) => string];
3
+ mixer: (left: number, right: number) => [number, number, (i: number) => string];
4
4
  }
5
5
  //# sourceMappingURL=CSSPropertyShadowBlur.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSSPropertyShadowBlur.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyShadowBlur.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,qBAMa,qBAAsB,SAAQ,6BAA6B;IACtE,KAAK,iHAAoC;CAC1C"}
1
+ {"version":3,"file":"CSSPropertyShadowBlur.d.ts","sourceRoot":"","sources":["../src/css/properties/CSSPropertyShadowBlur.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,qBAMa,qBAAsB,SAAQ,6BAA6B;IACtE,KAAK,2EAAoC;CAC1C"}
package/dist/index.umd.js CHANGED
@@ -11268,70 +11268,6 @@
11268
11268
  }
11269
11269
  return path.err ? path.err : path.segments;
11270
11270
  }
11271
- // const SPACES =
11272
- // // '\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029';
11273
- // 's';
11274
- // const PATH_COMMAND = new RegExp(
11275
- // `([a-z])[${SPACES},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${SPACES}]*,?[${SPACES}]*)+)`,
11276
- // 'ig',
11277
- // );
11278
- // const PATH_VALUES = new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${SPACES}]*,?[${SPACES}]*`, 'ig');
11279
- // const paramCounts = {
11280
- // a: 7,
11281
- // c: 6,
11282
- // o: 2,
11283
- // h: 1,
11284
- // l: 2,
11285
- // m: 2,
11286
- // r: 4,
11287
- // q: 4,
11288
- // s: 4,
11289
- // t: 2,
11290
- // v: 1,
11291
- // u: 3,
11292
- // z: 0,
11293
- // };
11294
- // // Parse given path string into an array of arrays of path segments
11295
- // export function parsePathString(pathString: PathArray | string): PathArray | string {
11296
- // if (!pathString) {
11297
- // return null;
11298
- // }
11299
- // // skip validating
11300
- // if (Array.isArray(pathString)) {
11301
- // return clonePath(pathString) as PathArray;
11302
- // }
11303
- // const data: PathArray = [] as unknown as PathArray;
11304
- // String(pathString).replace(PATH_COMMAND, (a, b, c) => {
11305
- // const params = [];
11306
- // let name = b.toLowerCase();
11307
- // c.replace(PATH_VALUES, (a, b) => {
11308
- // b && params.push(+b);
11309
- // });
11310
- // if (name === 'm' && params.length > 2) {
11311
- // // @ts-ignore
11312
- // data.push([b].concat(params.splice(0, 2)));
11313
- // name = 'l';
11314
- // b = b === 'm' ? 'l' : 'L';
11315
- // }
11316
- // if (name === 'o' && params.length === 1) {
11317
- // data.push([b, params[0]]);
11318
- // }
11319
- // if (name === 'r') {
11320
- // // @ts-ignore
11321
- // data.push([b].concat(params));
11322
- // } else {
11323
- // while (params.length >= paramCounts[name]) {
11324
- // // @ts-ignore
11325
- // data.push([b].concat(params.splice(0, paramCounts[name])));
11326
- // if (!paramCounts[name]) {
11327
- // break;
11328
- // }
11329
- // }
11330
- // }
11331
- // return pathString;
11332
- // });
11333
- // return data;
11334
- // }
11335
11271
 
11336
11272
  function path2Absolute(pathInput) {
11337
11273
  if (isAbsoluteArray(pathInput)) {
@@ -11469,8 +11405,13 @@
11469
11405
  }
11470
11406
  var path = path2Absolute(pathInput);
11471
11407
  var params = __assign({}, paramsParser);
11472
- for (var i = 0; i < path.length; i += 1) {
11408
+ var allPathCommands = [];
11409
+ var ii = path.length;
11410
+ var pathCommand = '';
11411
+ for (var i = 0; i < ii; i += 1) {
11412
+ pathCommand = path[i][0];
11473
11413
  // Save current path command
11414
+ allPathCommands[i] = pathCommand;
11474
11415
  path[i] = normalizeSegment(path[i], params);
11475
11416
  var segment = path[i];
11476
11417
  var seglen = segment.length;
@@ -12131,7 +12072,7 @@
12131
12072
  POINT = { x: x, y: y };
12132
12073
  }
12133
12074
  // bad perf when size = 300
12134
- var sampleSize = 8;
12075
+ var sampleSize = 30;
12135
12076
  for (var j = 0; j <= sampleSize; j += 1) {
12136
12077
  t = j / sampleSize;
12137
12078
  (_a = getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t), x = _a.x, y = _a.y);